Skip to content

Commit

Permalink
Support handling of invalid indices withinin range of MPI_T_cvar_get_…
Browse files Browse the repository at this point in the history
…info(). This issue showed up in nightly testing on OpenMPI platforms.
  • Loading branch information
theurich committed Jul 23, 2024
1 parent 1506816 commit 5845ab6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/Infrastructure/VM/src/ESMCI_VMKernel.C
Original file line number Diff line number Diff line change
Expand Up @@ -3134,6 +3134,8 @@ void VMK::log(std::string prefix, ESMC_LogMsgType_Flag msgType)const{


void VMK::logSystem(std::string prefix, ESMC_LogMsgType_Flag msgType){
#undef ESMC_METHOD
#define ESMC_METHOD "ESMCI::VMK::logSystem()"
std::stringstream msg;
msg << prefix << "--- VMK::logSystem() start -------------------------------";
ESMC_LogDefault.Write(msg.str(), msgType);
Expand Down Expand Up @@ -3245,17 +3247,18 @@ void VMK::logSystem(std::string prefix, ESMC_LogMsgType_Flag msgType){
descLen = sizeof(desc);
mpi_rc = MPI_T_cvar_get_info(i, name, &nameLen, &verbosity, &datatype,
&enumtype, desc, &descLen, &binding, &scope);
if (mpi_rc != MPI_SUCCESS){
if (mpi_rc == MPI_SUCCESS){
msg.str(""); // clear
msg << prefix << "index=" << std::setw(4) << i << std::setw(60) << name
<< " : " << desc;
ESMC_LogDefault.Write(msg.str(), msgType);
}else if (mpi_rc != MPI_T_ERR_INVALID_INDEX){
int localrc;
ESMC_LogDefault.MsgFoundError(ESMC_RC_INTNRL_BAD,
"MPI_T_cvar_get_info() did not return MPI_SUCCESS.",
"Call to MPI_T_cvar_get_info() failed in unsupported way.",
ESMC_CONTEXT, &localrc);
throw localrc; // bail out with exception
}
msg.str(""); // clear
msg << prefix << "index=" << std::setw(4) << i << std::setw(60) << name
<< " : " << desc;
ESMC_LogDefault.Write(msg.str(), msgType);
}
#if 0
// testing to change the MPICH EAGER limit for the shared memory channel
Expand Down

0 comments on commit 5845ab6

Please sign in to comment.