Skip to content

Commit 02e865e

Browse files
committed
Use MPI_Allreduce for error code checking
1 parent b5393ec commit 02e865e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/clib/pio_nc.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,8 @@ int PIOc_inq_unlimdims_impl(int ncid, int *nunlimdimsp, int *unlimdimidsp)
469469
#endif
470470

471471
/* A failure to inquire is not fatal */
472-
mpierr = MPI_Bcast(&ierr, 1, MPI_INT, ios->ioroot, ios->my_comm);
472+
mpierr = MPI_Allreduce(MPI_IN_PLACE, &ierr, 1, MPI_INT, MPI_BOR, ios->my_comm);
473+
473474
if(mpierr != MPI_SUCCESS){
474475
spio_ltimer_stop(ios->io_fstats->tot_timer_name);
475476
spio_ltimer_stop(file->io_fstats->tot_timer_name);

0 commit comments

Comments
 (0)