print warning about missing fix nve/spin only on MPI rank 0

This commit is contained in:
Axel Kohlmeyer
2019-03-25 20:58:13 -04:00
parent 7b3f952990
commit 82d646cede
4 changed files with 5 additions and 5 deletions

View File

@ -166,7 +166,7 @@ void PairSpinMagelec::init_style()
if (strcmp(modify->fix[ifix]->style,"nve/spin") == 0) break;
ifix++;
}
if (ifix == modify->nfix)
if ((ifix == modify->nfix) && (comm->me == 0))
error->warning(FLERR,"Using pair/spin style without nve/spin");
// get the lattice_flag from nve/spin