|
Gromacs
2026.0-dev-20251119-5f0a571d
|
#include "gmxpre.h"#include "handlerestart.h"#include "config.h"#include <fcntl.h>#include <cerrno>#include <cstdio>#include <cstring>#include <array>#include <filesystem>#include <iterator>#include <string>#include <string_view>#include <utility>#include <vector>#include "gromacs/fileio/filetypes.h"#include "gromacs/utility/arrayref.h"#include "gromacs/utility/futil.h"#include "gromacs/utility/gmxassert.h"#include "gromacs/utility/stringutil.h"#include "gromacs/utility/unique_cptr.h"#include <algorithm>#include <exception>#include <functional>#include <optional>#include <tuple>#include "gromacs/commandline/filenm.h"#include "gromacs/fileio/checkpoint.h"#include "gromacs/fileio/gmxfio.h"#include "gromacs/mdrunutility/multisim.h"#include "gromacs/mdtypes/mdrunoptions.h"#include "gromacs/utility/basedefinitions.h"#include "gromacs/utility/coordinate_exception_handling.h"#include "gromacs/utility/enumerationhelpers.h"#include "gromacs/utility/exceptions.h"#include "gromacs/utility/fatalerror.h"#include "gromacs/utility/path.h"#include "gromacs/utility/smalloc.h"#include "gromacs/utility/stringstream.h"#include "gromacs/utility/textwriter.h"
Include dependency graph for handlerestart.cpp:This file declares functions for mdrun to call to manage the details of doing a restart (ie. reading checkpoints, appending output files).
Classes | |
| class | gmx::anonymous_namespace{handlerestart.cpp}::StartingBehaviorHandler |
| Describes how mdrun will (re)start and provides supporting functionality based on that data. More... | |
Functions | |
| gmx_bool | gmx::anonymous_namespace{handlerestart.cpp}::exist_output_file (const std::filesystem::path &fnm_cp, int nfile, const t_filenm fnm[]) |
Search for fnm_cp in fnm and return true iff found. More... | |
| void | gmx::anonymous_namespace{handlerestart.cpp}::throwBecauseOfMissingOutputFiles (const std::filesystem::path &checkpointFilename, ArrayRef< const gmx_file_position_t > outputfiles, int nfile, const t_filenm fnm[], size_t numFilesMissing) |
| Throw when mdrun -cpi fails because previous output files are missing. More... | |
| const char * | gmx::anonymous_namespace{handlerestart.cpp}::precisionToString (bool isDoublePrecision) |
| Return a string describing the precision of a build of GROMACS. | |
| StartingBehaviorHandler | gmx::anonymous_namespace{handlerestart.cpp}::chooseStartingBehavior (const AppendingBehavior appendingBehavior, const int nfile, t_filenm fnm[]) |
| Choose the starting behaviour for this simulation. More... | |
| void | gmx::anonymous_namespace{handlerestart.cpp}::checkOutputFile (t_fileio *fileToCheck, const gmx_file_position_t &outputfile) |
Check whether chksum_file output file has a checksum that matches outputfile from the checkpoint. | |
| void | gmx::anonymous_namespace{handlerestart.cpp}::lockLogFile (t_fileio *logfio, const std::filesystem::path &logFilename) |
| If supported, obtain a write lock on the log file. More... | |
| void | gmx::anonymous_namespace{handlerestart.cpp}::prepareForAppending (const ArrayRef< const gmx_file_position_t > outputFiles, t_fileio *logfio) |
| Prepare to append to output files. More... | |
| std::tuple< StartingBehavior, LogFilePtr > | gmx::anonymous_namespace{handlerestart.cpp}::handleRestartInner (const bool isSimulationMain, const gmx_multisim_t *ms, const AppendingBehavior appendingBehavior, const int nfile, t_filenm fnm[]) |
| Implement details of handleRestart directly related to restarting. More... | |
| std::tuple< StartingBehavior, LogFilePtr > | gmx::handleRestart (bool isSimulationMain, MPI_Comm communicator, const gmx_multisim_t *ms, AppendingBehavior appendingBehavior, int nfile, t_filenm fnm[]) |
| Handle startup of mdrun, particularly regarding -cpi and -append. More... | |
1.8.5