From edfe752b2ac14a58b74689b2af79cb9eced5596b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 3 Mar 2024 23:58:33 -0500 Subject: [PATCH] try a different workaround for "fix not computed at compatible time" with write_dump --- src/write_dump.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/write_dump.cpp b/src/write_dump.cpp index 89dd48e0ba..0418d7c424 100644 --- a/src/write_dump.cpp +++ b/src/write_dump.cpp @@ -45,11 +45,15 @@ void WriteDump::command(int narg, char **arg) // create the Dump instance // create dump command line with extra required args + // work around "fix not computed at compatible times" errors. + + const int dumpfreq = MAX(1, update->nsteps); + auto dumpargs = new char *[modindex + 2]; - dumpargs[0] = (char *) "WRITE_DUMP"; // dump id - dumpargs[1] = arg[0]; // group - dumpargs[2] = arg[1]; // dump style - dumpargs[3] = utils::strdup(std::to_string(MAX(update->ntimestep, 1))); // dump frequency + dumpargs[0] = (char *) "WRITE_DUMP"; // dump id + dumpargs[1] = arg[0]; // group + dumpargs[2] = arg[1]; // dump style + dumpargs[3] = utils::strdup(std::to_string(dumpfreq)); // dump frequency for (int i = 2; i < modindex; ++i) dumpargs[i + 2] = arg[i];