must call Error::all() from all MPI ranks.
This commit is contained in:
@ -218,7 +218,7 @@ void FixChargeRegulation::init() {
|
|||||||
int flagall = flag;
|
int flagall = flag;
|
||||||
|
|
||||||
MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world);
|
MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world);
|
||||||
if (flagall && comm->me == 0)
|
if (flagall)
|
||||||
error->all(FLERR, "fix charge/regulation cannot exchange "
|
error->all(FLERR, "fix charge/regulation cannot exchange "
|
||||||
"individual atoms (ions) belonging to a molecule");
|
"individual atoms (ions) belonging to a molecule");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -564,7 +564,7 @@ void FixGCMC::init()
|
|||||||
if (molecule[i]) flag = 1;
|
if (molecule[i]) flag = 1;
|
||||||
int flagall;
|
int flagall;
|
||||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
|
||||||
if (flagall && comm->me == 0)
|
if (flagall)
|
||||||
error->all(FLERR, "Fix gcmc cannot exchange individual atoms belonging to a molecule");
|
error->all(FLERR, "Fix gcmc cannot exchange individual atoms belonging to a molecule");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -579,7 +579,7 @@ void FixGCMC::init()
|
|||||||
if (molecule[i] == 0) flag = 1;
|
if (molecule[i] == 0) flag = 1;
|
||||||
int flagall;
|
int flagall;
|
||||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
|
||||||
if (flagall && comm->me == 0)
|
if (flagall)
|
||||||
error->all(FLERR, "All mol IDs should be set for fix gcmc group atoms");
|
error->all(FLERR, "All mol IDs should be set for fix gcmc group atoms");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -356,7 +356,7 @@ void FixWidom::init()
|
|||||||
if (molecule[i] == 0) flag = 1;
|
if (molecule[i] == 0) flag = 1;
|
||||||
int flagall;
|
int flagall;
|
||||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
|
||||||
if (flagall && comm->me == 0)
|
if (flagall)
|
||||||
error->all(FLERR, "All mol IDs should be set for fix widom group atoms");
|
error->all(FLERR, "All mol IDs should be set for fix widom group atoms");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user