Simplyfing MPI send to broadcast.

This commit is contained in:
Patrick Shriwise 2019-10-14 20:30:25 -05:00
parent 5c723bd360
commit e91a21add2

View file

@ -333,9 +333,7 @@ std::vector<VolumeCalculation::Result> VolumeCalculation::execute() const
#ifdef OPENMC_MPI
// update maximum error value on all processes
if (mpi::master) {
for (int i = 1; i < mpi::n_procs; i++) {
MPI_Send(&trigger_val, 1, MPI_DOUBLE, i, 0, mpi::intracomm);
}
MPI_Bcast(&trigger_val, 1, MPI_DOUBLE, mpi:intracomm);
} else {
MPI_Recv(&trigger_val, 1, MPI_DOUBLE, 0, 0, mpi::intracomm, MPI_STATUS_IGNORE);
}