From 39b61fbdbec5cb8644bb78a24ebb1f0d68a53b64 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 Jun 2020 01:30:41 -0400 Subject: [PATCH] add exit() to one() functions since compilers may not recognize that MPI_Abort() does not return. --- src/error.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/error.cpp b/src/error.cpp index 392624f40b..7458f816c0 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -107,6 +107,7 @@ void Error::universe_one(const std::string &file, int line, const std::string &s throw LAMMPSAbortException(mesg, universe->uworld); #else MPI_Abort(universe->uworld,1); + exit(1); // to trick "smart" compilers into believing this does not return #endif } @@ -205,6 +206,7 @@ void Error::one(const std::string &file, int line, const std::string &str) if (screen) fflush(screen); if (logfile) fflush(logfile); MPI_Abort(world,1); + exit(1); // to trick "smart" compilers into believing this does not return #endif }