Skip to content

Commit

Permalink
Merge pull request #3322 from SCOREC/cws/mpiInitWarningOnRank0
Browse files Browse the repository at this point in the history
SST with MPI dataplane: only print MPI initialization warning on rank 0
  • Loading branch information
vicentebolea committed Aug 22, 2022
2 parents f3b2075 + 5059568 commit 6ff7fc3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions source/adios2/toolkit/sst/dp/mpi_dp.c
Expand Up @@ -271,10 +271,15 @@ static void MpiInitialize()

if (provided != MPI_THREAD_MULTIPLE)
{
fprintf(stderr,
"MPI init without MPI_THREAD_MULTIPLE (Externally "
"initialized:%s)\n",
IsInitialized ? "true" : "false");
int rank;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (!rank)
{
fprintf(stderr,
"MPI init without MPI_THREAD_MULTIPLE (Externally "
"initialized:%s)\n",
IsInitialized ? "true" : "false");
}
}
}

Expand Down

0 comments on commit 6ff7fc3

Please sign in to comment.