Skip to content

Commit

Permalink
Use MPI_Allreduce for error code checking
Browse files Browse the repository at this point in the history
  • Loading branch information
wkliao committed Jul 3, 2024
1 parent a78cc96 commit abc7e07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/clib/pio_nc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,8 @@ int PIOc_inq_unlimdims_impl(int ncid, int *nunlimdimsp, int *unlimdimidsp)
#endif

/* A failure to inquire is not fatal */
mpierr = MPI_Bcast(&ierr, 1, MPI_INT, ios->ioroot, ios->my_comm);
mpierr = MPI_Allreduce(MPI_IN_PLACE, &ierr, 1, MPI_INT, MPI_BOR, ios->my_comm);

if(mpierr != MPI_SUCCESS){
spio_ltimer_stop(ios->io_fstats->tot_timer_name);
spio_ltimer_stop(file->io_fstats->tot_timer_name);
Expand Down

0 comments on commit abc7e07

Please sign in to comment.