Gromacs
2019.3
|
#include "gmxpre.h"
#include "taskassignment.h"
#include "config.h"
#include <string>
#include <vector>
#include "gromacs/hardware/hw_info.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/taskassignment/usergpuids.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/gmxmpi.h"
#include "gromacs/utility/logger.h"
#include "gromacs/utility/physicalnodecommunicator.h"
#include "gromacs/utility/stringutil.h"
#include "gromacs/utility/sysinfo.h"
#include "findallgputasks.h"
#include "reportgpuusage.h"
Defines helper and factory functionality for task assignment.
Note that the GPU ID assignment could potentially match many different kinds of simulation setups, including ranks from multiple simulations, ranks from the same simulation, and/or ranks with duty only for particular tasks (e.g. PME-only ranks). Which GPU ID assignments are valid will naturally depend on the other run-time options given to mdrun, and the current capabilities of the implementation.
Functions | |
GpuTaskAssignments | gmx::anonymous_namespace{taskassignment.cpp}::buildTaskAssignment (const GpuTasksOnRanks &gpuTasksOnRanksOfThisNode, ArrayRef< const int > gpuIds) |
Build data structure of types of GPU tasks on a rank, together with the mapped GPU device IDs, for all GPU tasks on all the ranks of this node. More... | |
bool | gmx::anonymous_namespace{taskassignment.cpp}::isAnyGpuSharedBetweenRanks (const GpuTaskAssignments &gpuTaskAssignments) |
Return whether a GPU device is shared between any ranks. More... | |
void | gmx::anonymous_namespace{taskassignment.cpp}::logPerformanceHints (const MDLogger &mdlog, size_t numCompatibleGpus, size_t numGpuTasksOnThisNode, const GpuTaskAssignments &gpuTaskAssignments) |
Logs to mdlog information that may help a user learn how to let mdrun make a task assignment that runs faster. | |
size_t | gmx::anonymous_namespace{taskassignment.cpp}::countGpuTasksOnThisNode (const GpuTasksOnRanks &gpuTasksOnRanksOfThisNode) |
Counts all the GPU tasks on this node. | |
GpuTaskAssignments::value_type | gmx::runTaskAssignment (const std::vector< int > &gpuIdsToUse, const std::vector< int > &userGpuTaskAssignment, const gmx_hw_info_t &hardwareInfo, const MDLogger &mdlog, const t_commrec *cr, const gmx_multisim_t *ms, const PhysicalNodeCommunicator &physicalNodeComm, const std::vector< GpuTask > &gpuTasksOnThisRank, bool useGpuForBonded, PmeRunMode pmeRunMode) |
Coordinate the final stages of task assignment and reporting, and return the assignment for this rank. More... | |