add exit() to one() functions since compilers may not recognize that MPI_Abort() does not return.
This commit is contained in:
@ -107,6 +107,7 @@ void Error::universe_one(const std::string &file, int line, const std::string &s
|
|||||||
throw LAMMPSAbortException(mesg, universe->uworld);
|
throw LAMMPSAbortException(mesg, universe->uworld);
|
||||||
#else
|
#else
|
||||||
MPI_Abort(universe->uworld,1);
|
MPI_Abort(universe->uworld,1);
|
||||||
|
exit(1); // to trick "smart" compilers into believing this does not return
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,6 +206,7 @@ void Error::one(const std::string &file, int line, const std::string &str)
|
|||||||
if (screen) fflush(screen);
|
if (screen) fflush(screen);
|
||||||
if (logfile) fflush(logfile);
|
if (logfile) fflush(logfile);
|
||||||
MPI_Abort(world,1);
|
MPI_Abort(world,1);
|
||||||
|
exit(1); // to trick "smart" compilers into believing this does not return
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user