From a795ae35fd2ae516c5899e3cb58148c8b22d96cc Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Tue, 7 Jan 2025 12:29:34 -0600 Subject: [PATCH] Single process errors in pair style kim reported using error->one Errors during a KIM compute operation that occur on a single processor were reported using error->all, which causes LAMMPS to hang when running in parallel with more than one processor. This has been fixed by replacing error->all with error->one for those cases. --- src/KIM/pair_kim.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index ded7221d76..024b5ccf40 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -225,7 +225,7 @@ void PairKIM::compute(int eflag, int vflag) KIM_COMPUTE_ARGUMENT_NAME_particleContributing, kim_particleContributing); if (kimerror) - error->all(FLERR,"Unable to set KIM particle species codes and/or contributing"); + error->one(FLERR,"Unable to set KIM particle species codes and/or contributing"); } // kim_particleSpecies = KIM atom species for each LAMMPS atom @@ -250,7 +250,7 @@ void PairKIM::compute(int eflag, int vflag) // compute via KIM model int kimerror = KIM_Model_Compute(pkim, pargs); - if (kimerror) error->all(FLERR, "KIM Compute returned error {}", kimerror); + if (kimerror) error->one(FLERR, "KIM Compute returned error {}", kimerror); // scale results for fix adapt if needed if (scale_extracted) { @@ -814,7 +814,7 @@ void PairKIM::kim_free() if (kim_init_ok) { int kimerror = KIM_Model_ComputeArgumentsDestroy(pkim, &pargs); if (kimerror) - error->all(FLERR,"Unable to destroy Compute Arguments Object"); + error->one(FLERR,"Unable to destroy Compute Arguments Object"); KIM_Model_Destroy(&pkim);