* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2013,2014,2015,2016,2017 The GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
sfree(fntemp);
#if GMX_FAHCORE
- /*code for alternate checkpointing scheme. moved from top of loop over
- steps */
- fcRequestCheckPoint();
- if (fcCheckPointParallel(cr->nodeid, NULL, 0) == 0)
- {
- gmx_fatal(3, __FILE__, __LINE__, "Checkpoint error on step %d\n", step);
- }
+ /* Always FAH checkpoint immediately after a GROMACS checkpoint.
+ *
+ * Note that it is critical that we save a FAH checkpoint directly
+ * after writing a GROMACS checkpoint. If the program dies, either
+ * by the machine powering off suddenly or the process being,
+ * killed, FAH can recover files that have only appended data by
+ * truncating them to the last recorded length. The GROMACS
+ * checkpoint does not just append data, it is fully rewritten each
+ * time so a crash between moving the new Gromacs checkpoint file in
+ * to place and writing a FAH checkpoint is not recoverable. Thus
+ * the time between these operations must be kept as short as
+ * possible.
+ */
+ fcCheckpoint();
#endif /* end GMX_FAHCORE block */
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2013,2014,2015,2016,2017, The GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
#if GMX_FAHCORE
if (MASTER(cr))
{
- fcWriteVisFrame(ir->ePBC, state_global->box, top_global, state_global->x.rvec_array());
+ fcWriteVisFrame(ir->pbcType, state_global->box, top_global, state_global->x.rvec_array());
}
#endif
}