git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7310 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -27,6 +27,7 @@ Error::Error(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
/* ----------------------------------------------------------------------
|
||||
called by all procs in universe
|
||||
close all output, screen, and log files in world and universe
|
||||
no abort, so insure all procs in universe call, else will hang
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::universe_all(const char *file, int line, const char *str)
|
||||
@ -53,6 +54,7 @@ void Error::universe_all(const char *file, int line, const char *str)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
called by one proc in universe
|
||||
forces abort of entire universe if any proc in universe calls
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::universe_one(const char *file, int line, const char *str)
|
||||
@ -66,9 +68,13 @@ void Error::universe_one(const char *file, int line, const char *str)
|
||||
/* ----------------------------------------------------------------------
|
||||
called by all procs in one world
|
||||
close all output, screen, and log files in world
|
||||
insure all procs in world call, else will hang
|
||||
if abort = 0 (default):
|
||||
if only one world in universe calls, universe will hang
|
||||
if abort = 1: force abort of entire universe if any world in universe calls
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::all(const char *file, int line, const char *str)
|
||||
void Error::all(const char *file, int line, const char *str, int abort)
|
||||
{
|
||||
MPI_Barrier(world);
|
||||
|
||||
@ -84,6 +90,7 @@ void Error::all(const char *file, int line, const char *str)
|
||||
if (screen && screen != stdout) fclose(screen);
|
||||
if (logfile) fclose(logfile);
|
||||
|
||||
if (abort) MPI_Abort(world,1);
|
||||
MPI_Finalize();
|
||||
exit(1);
|
||||
}
|
||||
@ -92,6 +99,7 @@ void Error::all(const char *file, int line, const char *str)
|
||||
called by one proc in world
|
||||
write to world screen only if non-NULL on this proc
|
||||
always write to universe screen
|
||||
forces abort of entire world (and universe) if any proc in world calls
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::one(const char *file, int line, const char *str)
|
||||
@ -132,6 +140,7 @@ void Error::message(const char *file, int line, char *str, int logflag)
|
||||
/* ----------------------------------------------------------------------
|
||||
called by all procs in one world
|
||||
close all output, screen, and log files in world
|
||||
no abort, so insure all procs in world call, else will hang
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::done()
|
||||
|
||||
Reference in New Issue
Block a user