#include "replicaexchange.h"
#include "simulatorbuilder.h"
-#if GMX_FAHCORE
-# include "corewrap.h"
-#endif
-
namespace gmx
{
#pragma GCC diagnostic ignored "-Wunused-result"
devFlags.enableGpuBufferOps = (getenv("GMX_USE_GPU_BUFFER_OPS") != nullptr)
&& (GMX_GPU == GMX_GPU_CUDA) && useGpuForNonbonded;
- devFlags.forceGpuUpdateDefault = (getenv("GMX_FORCE_UPDATE_DEFAULT_GPU") != nullptr);
+ devFlags.forceGpuUpdateDefault = (getenv("GMX_FORCE_UPDATE_DEFAULT_GPU") != nullptr) || GMX_FAHCORE;
devFlags.enableGpuHaloExchange =
(getenv("GMX_GPU_DD_COMMS") != nullptr && GMX_THREAD_MPI && (GMX_GPU == GMX_GPU_CUDA));
devFlags.enableGpuPmePPComm =
}
}
-#if GMX_FAHCORE
- if (MASTER(cr))
- {
- fcRegisterSteps(inputrec->nsteps, inputrec->init_step);
- }
-#endif
-
/* NMR restraints must be initialized before load_checkpoint,
* since with time averaging the history is added to t_state.
* For proper consistency check we therefore need to extend
auto deform = prepareBoxDeformation(globalState->box, cr, *inputrec);
+#if GMX_FAHCORE
+ /* We have to remember the generation's first step before reading checkpoint.
+ This way, we can report to the F@H core both the generation's first step
+ and the restored first step, thus making it able to distinguish between
+ an interruption/resume and start of the n-th generation simulation.
+ Having this information, the F@H core can correctly calculate and report
+ the progress.
+ */
+ int gen_first_step = 0;
+ if (MASTER(cr))
+ {
+ gen_first_step = inputrec->init_step;
+ }
+#endif
+
ObservablesHistory observablesHistory = {};
if (startingBehavior != StartingBehavior::NewSimulation)
}
}
+#if GMX_FAHCORE
+ if (MASTER(cr))
+ {
+ fcRegisterSteps(inputrec->nsteps + inputrec->init_step, gen_first_step);
+ }
+#endif
+
if (mdrunOptions.numStepsCommandline > -2)
{
GMX_LOG(mdlog.info)