Skip to content

Commit

Permalink
Multi-tile I/O: Ensure there are at least as many PETs as tiles
Browse files Browse the repository at this point in the history
Without this new error check, we get the following if trying to run with
fewer PETs than tiles:

20231013 064715.921 WARNING          PET1 ESMCI_PIO_Handler.C:1994 ESMCI::PIO_IODescHandler::constr I/O does not support multiple DEs per PET
20231013 064715.921 ERROR            PET1 ESMCI_PIO_Handler.C:1730 ESMCI::PIO_Handler::getIODesc() Not found  - Internal subroutine call returned Error

This new error check gives a more explicit error message for this case.
  • Loading branch information
billsacks committed Oct 13, 2023
1 parent 01f4c8c commit 3d6678e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Infrastructure/IO/src/ESMCI_IO.C
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,15 @@ void IO::redist_arraycreate1de(Array *src_array_p, Array **dest_array_p, int pet
int rank = src_array_p->getRank();
int tileCount = dg_orig->getTileCount();

if (tileCount > petCount) {
// If tileCount > petCount, the decomposition created by the default DistGrid sets
// deCount = tileCount, which leads to having more DEs than PETs, which is exactly
// what we're trying to avoid in this function.
ESMC_LogDefault.MsgFoundError(ESMF_RC_INTNRL_BAD,
"Multi-tile I/O requires at least as many PETs as tiles", ESMC_CONTEXT, rc);
return; // bail out
}

int replicatedDims = src_array_p->getReplicatedDimCount();

std::vector<int> minIndexPDimPTileVec;
Expand Down

0 comments on commit 3d6678e

Please sign in to comment.