use MPI_SUM instead of MPI_MAX to work around OpenMPI bug on macOS with Apple CPU

This commit is contained in:
Axel Kohlmeyer
2024-04-17 01:03:39 -04:00
parent db9e8aa43c
commit 09680a3857
4 changed files with 4 additions and 4 deletions

View File

@ -657,7 +657,7 @@ void PairEAMIntel::eval(const int offload, const int vflag,
fix->stop_watch(TIME_HOST_PAIR); fix->stop_watch(TIME_HOST_PAIR);
if (EFLAG && (!exceeded_rhomax)) { if (EFLAG && (!exceeded_rhomax)) {
MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_MAX, world); MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_SUM, world);
if (exceeded_rhomax) { if (exceeded_rhomax) {
if (comm->me == 0) if (comm->me == 0)
error->warning(FLERR, error->warning(FLERR,

View File

@ -328,7 +328,7 @@ void PairEAM::compute(int eflag, int vflag)
} }
if (eflag && (!exceeded_rhomax)) { if (eflag && (!exceeded_rhomax)) {
MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_MAX, world); MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_SUM, world);
if (exceeded_rhomax) { if (exceeded_rhomax) {
if (comm->me == 0) if (comm->me == 0)
error->warning(FLERR, error->warning(FLERR,

View File

@ -305,7 +305,7 @@ void PairEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
} }
if (EFLAG && (!exceeded_rhomax)) { if (EFLAG && (!exceeded_rhomax)) {
MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_MAX, world); MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_SUM, world);
if (exceeded_rhomax) { if (exceeded_rhomax) {
if (comm->me == 0) if (comm->me == 0)
error->warning(FLERR, error->warning(FLERR,

View File

@ -367,7 +367,7 @@ template <int EVFLAG, int EFLAG, int NEWTON_PAIR> void PairEAMOpt::eval()
fast_gamma = nullptr; fast_gamma = nullptr;
if (EFLAG && (!exceeded_rhomax)) { if (EFLAG && (!exceeded_rhomax)) {
MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_MAX, world); MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_SUM, world);
if (exceeded_rhomax) { if (exceeded_rhomax) {
if (comm->me == 0) if (comm->me == 0)
error->warning(FLERR, error->warning(FLERR,