print warning only on MPI rank 0

This commit is contained in:
Axel Kohlmeyer 2020-08-09 13:57:04 -04:00
parent 3ebd194090
commit d8cd12b285
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ void Velocity::command(int narg, char **arg)
// check if velocities of atoms in rigid bodies are updated
if (modify->check_rigid_group_overlap(groupbit))
if (modify->check_rigid_group_overlap(groupbit) && (comm->me == 0))
error->warning(FLERR,"Changing velocities of atoms in rigid bodies. "
"This has no effect unless rigid bodies are rebuild");
@ -200,7 +200,7 @@ void Velocity::create(double t_desired, int seed)
// initialize temperature computation(s)
// warn if groups don't match
if (igroup != temperature->igroup && comm->me == 0)
if ((igroup != temperature->igroup) && (comm->me == 0))
error->warning(FLERR,"Mismatch between velocity and compute groups");
temperature->init();
temperature->setup();
@ -596,7 +596,7 @@ void Velocity::scale(int /*narg*/, char **arg)
// initialize temperature computation
// warn if groups don't match
if (igroup != temperature->igroup && comm->me == 0)
if ((igroup != temperature->igroup) && (comm->me == 0))
error->warning(FLERR,"Mismatch between velocity and compute groups");
temperature->init();
temperature->setup();