Fix out of sync checkpoint files in simulations sharing state
[alexxy/gromacs.git] / src / gromacs / modularsimulator / trajectoryelement.cpp
index 60998cdf0610286a153f311eaa71c82cc3cd1265..1195b294cb70b286d0bcead32fe0ebe83126b723 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -63,10 +63,24 @@ TrajectoryElement::TrajectoryElement(std::vector<SignallerCallbackPtr>     signa
                                      gmx_mtop_t*                           top_global,
                                      const gmx_output_env_t*               oenv,
                                      gmx_wallcycle*                        wcycle,
-                                     StartingBehavior                      startingBehavior) :
+                                     StartingBehavior                      startingBehavior,
+                                     const bool                            simulationsShareState) :
     writeEnergyStep_(-1),
     writeStateStep_(-1),
-    outf_(init_mdoutf(fplog, nfile, fnm, mdrunOptions, cr, outputProvider, mdModulesNotifier, inputrec, top_global, oenv, wcycle, startingBehavior)),
+    outf_(init_mdoutf(fplog,
+                      nfile,
+                      fnm,
+                      mdrunOptions,
+                      cr,
+                      outputProvider,
+                      mdModulesNotifier,
+                      inputrec,
+                      top_global,
+                      oenv,
+                      wcycle,
+                      startingBehavior,
+                      simulationsShareState,
+                      nullptr)),
     nstxout_(inputrec->nstxout),
     nstvout_(inputrec->nstvout),
     nstfout_(inputrec->nstfout),