use MPI_SUM instead of MPI_MAX to work around OpenMPI bug on macOS with Apple CPU
This commit is contained in:
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user