Commit e49213d6 authored by Wesley Bland's avatar Wesley Bland Committed by Huiwei Lu
Browse files

Fix typo in bcast macro



The macro that called the bcast function left out an underscore in the
mpi_errno return value. This caused the test to always return MPI_ERR_OTHER
instead of the value being returned by the underlying bcast function.
Signed-off-by: default avatarHuiwei Lu <huiweilu@mcs.anl.gov>
parent 786b3e98
......@@ -982,7 +982,7 @@ fn_fail:
/* for communication errors, just record the error but continue */ \
*(errflag_) = TRUE; \
MPIU_ERR_SET(mpi_errno_, MPI_ERR_OTHER, "**fail"); \
MPIU_ERR_ADD(mpi_errno_ret_, mpi_errno); \
MPIU_ERR_ADD(mpi_errno_ret_, mpi_errno_); \
} \
} while (0)
......
......@@ -27,6 +27,10 @@ int main(int argc, char **argv)
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
MPI_Comm_group(MPI_COMM_WORLD, &world);
MPI_Group_excl(world, 1, deadprocs, &newgroup);
MPI_Comm_create_group(MPI_COMM_WORLD, newgroup, 0, &newcomm);
if (size < 3) {
fprintf( stderr, "Must run with at least 3 processes\n" );
MPI_Abort( MPI_COMM_WORLD, 1 );
......@@ -66,10 +70,6 @@ int main(int argc, char **argv)
}
#endif
MPI_Comm_group(MPI_COMM_WORLD, &world);
MPI_Group_excl(world, 1, deadprocs, &newgroup);
MPI_Comm_create_group(MPI_COMM_WORLD, newgroup, 0, &newcomm);
rc = MPI_Reduce(&errs, &toterrs, 1, MPI_INT, MPI_SUM, 0, newcomm);
if(rc)
fprintf(stderr, "Failed to get errors from other processes\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment