Use utils::flush_buffers() in error.cpp and thermo.cpp

This commit is contained in:
Richard Berger
2022-02-04 18:00:47 -05:00
parent bae6526b5f
commit a2ff443838
2 changed files with 2 additions and 4 deletions

View File

@ -213,8 +213,7 @@ void Error::one(const std::string &file, int line, const std::string &str)
throw LAMMPSAbortException(mesg, world);
#else
if (screen) fflush(screen);
if (logfile) fflush(logfile);
utils::flush_buffers(lmp);
KokkosLMP::finalize();
MPI_Abort(world,1);
exit(1); // to trick "smart" compilers into believing this does not return

View File

@ -375,8 +375,7 @@ void Thermo::compute(int flag)
if (me == 0) {
utils::logmesg(lmp,line);
if (screen && flushflag) fflush(screen);
if (logfile && flushflag) fflush(logfile);
if (flushflag) utils::flush_buffers(lmp);
}
// set to 1, so that subsequent invocations of CPU time will be non-zero