Gromacs  2021.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
#include "gmxpre.h"
#include "decidegpuusage.h"
#include "config.h"
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include "gromacs/ewald/pme.h"
#include "gromacs/hardware/cpuinfo.h"
#include "gromacs/hardware/detecthardware.h"
#include "gromacs/hardware/hardwaretopology.h"
#include "gromacs/hardware/hw_info.h"
#include "gromacs/listed_forces/gpubonded.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
#include "gromacs/mdlib/update_constrain_gpu.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/pulling/pull.h"
#include "gromacs/taskassignment/taskassignment.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/baseversion.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/logger.h"
#include "gromacs/utility/stringutil.h"
+ Include dependency graph for decidegpuusage.cpp:

Description

Defines functionality for deciding whether tasks will run on GPUs.

Author
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Functions

bool gmx::decideWhetherToUseGpusForNonbondedWithThreadMpi (TaskTarget nonbondedTarget, int numDevicesToUse, const std::vector< int > &userGpuTaskAssignment, EmulateGpuNonbonded emulateGpuNonbonded, bool buildSupportsNonbondedOnGpu, bool nonbondedOnGpuIsUseful, int numRanksPerSimulation)
 Decide whether this thread-MPI simulation will run nonbonded tasks on GPUs. More...
 
bool gmx::decideWhetherToUseGpusForPmeWithThreadMpi (bool useGpuForNonbonded, TaskTarget pmeTarget, int numDevicesToUse, const std::vector< int > &userGpuTaskAssignment, const gmx_hw_info_t &hardwareInfo, const t_inputrec &inputrec, int numRanksPerSimulation, int numPmeRanksPerSimulation)
 Decide whether this thread-MPI simulation will run PME tasks on GPUs. More...
 
bool gmx::decideWhetherToUseGpusForNonbonded (TaskTarget nonbondedTarget, const std::vector< int > &userGpuTaskAssignment, EmulateGpuNonbonded emulateGpuNonbonded, bool buildSupportsNonbondedOnGpu, bool nonbondedOnGpuIsUseful, bool gpusWereDetected)
 Decide whether the simulation will try to run nonbonded tasks on GPUs. More...
 
bool gmx::decideWhetherToUseGpusForPme (bool useGpuForNonbonded, TaskTarget pmeTarget, const std::vector< int > &userGpuTaskAssignment, const gmx_hw_info_t &hardwareInfo, const t_inputrec &inputrec, int numRanksPerSimulation, int numPmeRanksPerSimulation, bool gpusWereDetected)
 Decide whether the simulation will try to run tasks of different types on GPUs. More...
 
PmeRunMode gmx::determinePmeRunMode (bool useGpuForPme, const TaskTarget &pmeFftTarget, const t_inputrec &inputrec)
 Determine PME run mode. More...
 
bool gmx::decideWhetherToUseGpusForBonded (bool useGpuForNonbonded, bool useGpuForPme, TaskTarget bondedTarget, const t_inputrec &inputrec, const gmx_mtop_t &mtop, int numPmeRanksPerSimulation, bool gpusWereDetected)
 Decide whether the simulation will try to run bonded tasks on GPUs. More...
 
bool gmx::decideWhetherToUseGpuForUpdate (bool isDomainDecomposition, bool useUpdateGroups, PmeRunMode pmeRunMode, bool havePmeOnlyRank, bool useGpuForNonbonded, TaskTarget updateTarget, bool gpusWereDetected, const t_inputrec &inputrec, const gmx_mtop_t &mtop, bool useEssentialDynamics, bool doOrientationRestraints, bool useReplicaExchange, bool haveFrozenAtoms, bool doRerun, const DevelopmentFeatureFlags &devFlags, const gmx::MDLogger &mdlog)
 Decide whether to use GPU for update. More...
 
bool gmx::decideWhetherToUseGpuForHalo (const DevelopmentFeatureFlags &devFlags, bool havePPDomainDecomposition, bool useGpuForNonbonded, bool useModularSimulator, bool doRerun, bool haveEnergyMinimization)
 Decide whether to use GPU for halo exchange. More...
 

Variables

const char * gmx::anonymous_namespace{decidegpuusage.cpp}::g_specifyEverythingFormatString
 Helper variable to localise the text of an often repeated message. More...