diff --git a/src/write_dump.cpp b/src/write_dump.cpp index 0418d7c424..8cd7dec88e 100644 --- a/src/write_dump.cpp +++ b/src/write_dump.cpp @@ -47,7 +47,8 @@ void WriteDump::command(int narg, char **arg) // work around "fix not computed at compatible times" errors. - const int dumpfreq = MAX(1, update->nsteps); + int dumpfreq = MAX(1, update->nsteps); + dumpfreq += update->ntimestep % dumpfreq; auto dumpargs = new char *[modindex + 2]; dumpargs[0] = (char *) "WRITE_DUMP"; // dump id