From bb77f294e8056358086c63b9ffa5ee35ac7e12e7 Mon Sep 17 00:00:00 2001 From: Yaser Afshar Date: Fri, 20 Nov 2020 11:31:24 -0600 Subject: [PATCH] Update the KIM_SupportStatus WARNING message to only appear on master node --- src/KIM/pair_kim.cpp | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 82dae0ded8..2649ac186d 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -1106,25 +1106,29 @@ void PairKIM::set_kim_model_has_flags() } } - if (KIM_SupportStatus_Equal(kim_model_support_for_energy, - KIM_SUPPORT_STATUS_notSupported)) - error->warning(FLERR,"KIM Model does not provide `partialEnergy'; " - "Potential energy will be zero"); + if (comm->me == 0) { + if (KIM_SupportStatus_Equal(kim_model_support_for_energy, + KIM_SUPPORT_STATUS_notSupported)) + error->warning(FLERR,"KIM Model does not provide 'partialEnergy'; " + "Potential energy will be zero"); - if (KIM_SupportStatus_Equal(kim_model_support_for_forces, - KIM_SUPPORT_STATUS_notSupported)) - error->warning(FLERR,"KIM Model does not provide `partialForce'; " - "Forces will be zero"); + if (KIM_SupportStatus_Equal(kim_model_support_for_forces, + KIM_SUPPORT_STATUS_notSupported)) + error->warning(FLERR,"KIM Model does not provide 'partialForce'; " + "Forces will be zero"); - if (KIM_SupportStatus_Equal(kim_model_support_for_particleEnergy, - KIM_SUPPORT_STATUS_notSupported)) - error->warning(FLERR,"KIM Model does not provide `partialParticleEnergy'; " - "energy per atom will be zero"); + if (KIM_SupportStatus_Equal(kim_model_support_for_particleEnergy, + KIM_SUPPORT_STATUS_notSupported)) + error->warning(FLERR,"KIM Model does not provide " + "'partialParticleEnergy'; " + "energy per atom will be zero"); - if (KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported)) - error->warning(FLERR,"KIM Model does not provide `partialParticleVirial'; " - "virial per atom will be zero"); + if (KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, + KIM_SUPPORT_STATUS_notSupported)) + error->warning(FLERR,"KIM Model does not provide " + "'partialParticleVirial'; " + "virial per atom will be zero"); + } int numberOfComputeCallbackNames; KIM_COMPUTE_CALLBACK_NAME_GetNumberOfComputeCallbackNames(