From 82d646cede4ffa447de256b5ec77754d3e4ff711 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 25 Mar 2019 20:58:13 -0400 Subject: [PATCH] print warning about missing fix nve/spin only on MPI rank 0 --- src/SPIN/pair_spin_dmi.cpp | 2 +- src/SPIN/pair_spin_exchange.cpp | 2 +- src/SPIN/pair_spin_magelec.cpp | 2 +- src/SPIN/pair_spin_neel.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SPIN/pair_spin_dmi.cpp b/src/SPIN/pair_spin_dmi.cpp index d26f5e917e..d0506e972d 100644 --- a/src/SPIN/pair_spin_dmi.cpp +++ b/src/SPIN/pair_spin_dmi.cpp @@ -173,7 +173,7 @@ void PairSpinDmi::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 diff --git a/src/SPIN/pair_spin_exchange.cpp b/src/SPIN/pair_spin_exchange.cpp index 7edd6cec0c..cb3242c711 100644 --- a/src/SPIN/pair_spin_exchange.cpp +++ b/src/SPIN/pair_spin_exchange.cpp @@ -160,7 +160,7 @@ void PairSpinExchange::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 diff --git a/src/SPIN/pair_spin_magelec.cpp b/src/SPIN/pair_spin_magelec.cpp index 5c0abe894d..6ff003521d 100644 --- a/src/SPIN/pair_spin_magelec.cpp +++ b/src/SPIN/pair_spin_magelec.cpp @@ -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 diff --git a/src/SPIN/pair_spin_neel.cpp b/src/SPIN/pair_spin_neel.cpp index 1eea62d02c..a39d6f3461 100644 --- a/src/SPIN/pair_spin_neel.cpp +++ b/src/SPIN/pair_spin_neel.cpp @@ -173,7 +173,7 @@ void PairSpinNeel::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 @@ -343,7 +343,7 @@ void PairSpinNeel::compute_single_pair(int ii, double fmi[3]) double xi[3], rij[3], eij[3]; double spi[3], spj[3]; - int i,j,jnum,itype,jtype,ntypes; + int j,jnum,itype,jtype,ntypes; int k,locflag; int *jlist,*numneigh,**firstneigh;