may only close files on MPI ranks that have a file reader instance
This commit is contained in:
@ -434,8 +434,9 @@ bigint ReadDump::next(bigint ncurrent, bigint nlast, int nevery, int nskip)
|
|||||||
// all filereader procs close all their files and return
|
// all filereader procs close all their files and return
|
||||||
|
|
||||||
if (ntimestep < 0) {
|
if (ntimestep < 0) {
|
||||||
for (int i = 0; i < nreader; i++)
|
if (filereader)
|
||||||
readers[i]->close_file();
|
for (int i = 0; i < nreader; i++)
|
||||||
|
readers[i]->close_file();
|
||||||
return ntimestep;
|
return ntimestep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user