abort when there was an error writing to the dump file
This commit is contained in:
@ -332,6 +332,7 @@ void Dump::write()
|
|||||||
// if file per timestep, open new file
|
// if file per timestep, open new file
|
||||||
|
|
||||||
if (multifile) openfile();
|
if (multifile) openfile();
|
||||||
|
if (fp) clearerr(fp);
|
||||||
|
|
||||||
// simulation box bounds
|
// simulation box bounds
|
||||||
|
|
||||||
@ -519,6 +520,8 @@ void Dump::write()
|
|||||||
|
|
||||||
if (filewriter && fp != nullptr) write_footer();
|
if (filewriter && fp != nullptr) write_footer();
|
||||||
|
|
||||||
|
if (fp && ferror(fp)) error->one(FLERR,"Error writing dump {}: {}", id, utils::getsyserror());
|
||||||
|
|
||||||
// if file per timestep, close file if I am filewriter
|
// if file per timestep, close file if I am filewriter
|
||||||
|
|
||||||
if (multifile) {
|
if (multifile) {
|
||||||
|
|||||||
Reference in New Issue
Block a user