Skip to content

Commit

Permalink
Update a decomp check, allocate return code check, and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
apcraig committed May 16, 2024
1 parent 3f25267 commit 0cc5d02
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cicecore/cicedyn/infrastructure/ice_memusage.F90
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ logical function ice_memusage_allocErr(istat, errstr)
character(*),parameter :: subname = '(ice_memusage_allocErr)'

ice_memusage_allocErr = .false.
if (istat > 0) then
if (istat /= 0) then
ice_memusage_allocErr = .true.
if (present(errstr)) then
write(nu_diag,*) 'ERROR: '//trim(errstr)
Expand Down
5 changes: 0 additions & 5 deletions cicecore/shared/ice_distribution.F90
Original file line number Diff line number Diff line change
Expand Up @@ -933,11 +933,6 @@ function create_distrb_rake(nprocs, workPerBlock) result(newDistrb)
end do

newDistrb%numLocalBlocks = newDistrb%blockCnt(my_task+1)
if (newDistrb%numLocalBlocks < 0) then
call abort_ice(subname//'ERROR: processors left with no blocks', &
file=__FILE__, line=__LINE__)
return
endif

! set local blockGlobalID array
allocate(newDistrb%blockGlobalID(newDistrb%numLocalBlocks), stat=istat)
Expand Down
6 changes: 4 additions & 2 deletions doc/source/user_guide/ug_implementation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ four subdomains.
The user sets the ``NTASKS`` and ``NTHRDS`` settings in **cice.settings**
and chooses a block size, ``block_size_x`` :math:`\times`\ ``block_size_y``,
and decomposition information ``distribution_type``, ``processor_shape``,
and ``distribution_type`` in **ice_in**. ``max_blocks`` is computed
automatically if set to a value of -1, but it can also be set by the user.
and ``distribution_wgt`` in **ice_in**. If ``max_blocks=-1``, the model
will calculate the number of blocks needed for each task. ``max_blocks``
can also be set by the user, although this may use extra memory and the
model will abort if ``max_blocks`` is set too small for the decomposition.
This information is used to determine how the blocks are
distributed across the processors, and how the processors are
distributed across the grid domain. The model is parallelized over blocks
Expand Down

0 comments on commit 0cc5d02

Please sign in to comment.