Skip to content

Commit

Permalink
Remove a seemingly-unnecessary error check
Browse files Browse the repository at this point in the history
This error check was added in commit
7379b25 (by Gerhard, Jan 12, 2018):
"Add checks to prevent redist_arraycreate1de() from trying to redist an
array where the index space is too small to span all PETs."

Note that there is no error check like this in the case where we're not
doing a redist, which makes me think that this may not be a fundamental
PIO limitation. Furthermore, in a test program, it worked to remove this
error check when writing and reading a 2x4 Field with 10 PETs (and going
through the redist function). So it seems like this check isn't
necessary.
  • Loading branch information
billsacks committed Oct 12, 2023
1 parent de86430 commit c67016d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/Infrastructure/IO/src/ESMCI_IO.C
Original file line number Diff line number Diff line change
Expand Up @@ -1297,15 +1297,6 @@ void IO::redist_arraycreate1de(Array *src_array_p, Array **dest_array_p, int pet
distgridToArrayMap = &(distgridToArrayMapVec[0]);
}

if (tileCount == 1) {
// FIXME(wjs, 2023-05-26) Generalize this error-check to work with the multi-tile case
if ((maxIndexPDimPTile[0]-minIndexPDimPTile[0]+1)<petCount){
ESMC_LogDefault.MsgFoundError(ESMF_RC_INTNRL_BAD,
"Index space too small to be distributed across all PETs", ESMC_CONTEXT, rc);
return; // bail out
}
}

DistGrid *distgrid;
if (tileCount == 1) {
ESMCI::InterArray<int> minIndexInterface((int*)minIndexPDimPTile, ndims-replicatedDims);
Expand Down

0 comments on commit c67016d

Please sign in to comment.