Gromacs
2020.3
|
#include "gmxpre.h"
#include "multisim.h"
#include "config.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/mpiinplacebuffers.h"
#include "gromacs/utility/smalloc.h"
Implements the multi-simulation support routines.
Functions | |
void | gmx_sumd_sim (int nr, double r[], const gmx_multisim_t *ms) |
Calculate the sum over the simulations of an array of doubles. | |
void | gmx_sumf_sim (int nr, float r[], const gmx_multisim_t *ms) |
Calculate the sum over the simulations of an array of floats. | |
void | gmx_sumi_sim (int nr, int r[], const gmx_multisim_t *ms) |
Calculate the sum over the simulations of an array of ints. | |
void | gmx_sumli_sim (int nr, int64_t r[], const gmx_multisim_t *ms) |
Calculate the sum over the simulations of an array of large ints. | |
std::vector< int > | gatherIntFromMultiSimulation (const gmx_multisim_t *ms, const int localValue) |
Return a vector containing the gathered values of localValue found on the master rank of each simulation. | |
void | check_multi_int (FILE *log, const gmx_multisim_t *ms, int val, const char *name, gmx_bool bQuiet) |
Check if val is the same on all simulations for a mdrun -multidir run. More... | |
void | check_multi_int64 (FILE *log, const gmx_multisim_t *ms, int64_t val, const char *name, gmx_bool bQuiet) |
Check if val is the same on all simulations for a mdrun -multidir run. More... | |
bool | findIsSimulationMasterRank (const gmx_multisim_t *ms, MPI_Comm communicator) |
Return whether this rank is the master rank of a simulation, using ms (if it is valid) and otherwise communicator . | |
bool | isMasterSim (const gmx_multisim_t *ms) |
Are we the master simulation of a possible multi-simulation? | |
bool | isMasterSimMasterRank (const gmx_multisim_t *ms, const bool isMaster) |
Are we the master rank (of the master simulation, for a multi-sim). More... | |
void check_multi_int | ( | FILE * | log, |
const gmx_multisim_t * | ms, | ||
int | val, | ||
const char * | name, | ||
gmx_bool | bQuiet | ||
) |
Check if val is the same on all simulations for a mdrun -multidir run.
The string name is used to print to the log file and in a fatal error if the val's don't match. If bQuiet is true and the check passes, no output is written.
void check_multi_int64 | ( | FILE * | log, |
const gmx_multisim_t * | ms, | ||
int64_t | val, | ||
const char * | name, | ||
gmx_bool | bQuiet | ||
) |
Check if val is the same on all simulations for a mdrun -multidir run.
The string name is used to print to the log file and in a fatal error if the val's don't match. If bQuiet is true and the check passes, no output is written.
bool isMasterSimMasterRank | ( | const gmx_multisim_t * | ms, |
bool | isMaster | ||
) |
Are we the master rank (of the master simulation, for a multi-sim).
This rank prints the remaining run time etc.