Gromacs
2024.4
|
#include <gromacs/taskassignment/include/gromacs/taskassignment/taskassignment.h>
Builder for the GpuTaskAssignments for all ranks on this node.
This will coordinate the final stages of task assignment and reporting, and build the GpuTaskAssignments object used to configure the modules that might run tasks on GPUs.
Communicates between ranks on a node to coordinate task assignment between them onto available hardware, e.g. accelerators.
Currently the DD code assigns duty to ranks that can include PP work that currently can be executed on a single GPU, if present and compatible. This has to be coordinated across PP ranks on a node, with possible multiple devices or sharing devices on a node, either from the user selection, or automatically.
Public Member Functions | |
GpuTaskAssignmentsBuilder () | |
Constructor. | |
Static Public Member Functions | |
static GpuTaskAssignments | build (ArrayRef< const int > availableDevices, ArrayRef< const int > userGpuTaskAssignment, const gmx_hw_info_t &hardwareInfo, MPI_Comm gromacsWorldComm, const PhysicalNodeCommunicator &physicalNodeComm, TaskTarget nonbondedTarget, TaskTarget pmeTarget, TaskTarget bondedTarget, TaskTarget updateTarget, bool useGpuForNonbonded, bool useGpuForPme, bool rankHasPpTask, bool rankHasPmeTask) |
Builds a GpuTaskAssignments. More... | |
|
static |
Builds a GpuTaskAssignments.
This method reconciles
to assign the GPUs on each physical node to the tasks on the ranks of that node. It throws InconsistentInputError when a/the useful GPU task assignment is not possible.
[in] | availableDevices | The compatible devices that the user permitted us to use. |
[in] | userGpuTaskAssignment | The user-specified assignment of GPU tasks to device IDs. |
[in] | hardwareInfo | The detected hardware |
[in] | gromacsWorldComm | MPI communicator for all ranks in the current GROMACS run |
[in] | physicalNodeComm | Communication object for this physical node. |
[in] | nonbondedTarget | The user's choice for mdrun -nb for where to assign short-ranged nonbonded interaction tasks. |
[in] | pmeTarget | The user's choice for mdrun -pme for where to assign long-ranged PME nonbonded interaction tasks. |
[in] | bondedTarget | The user's choice for mdrun -bonded for where to assign tasks. |
[in] | updateTarget | The user's choice for mdrun -update for where to assign tasks. |
[in] | useGpuForNonbonded | Whether GPUs will be used for nonbonded interactions. |
[in] | useGpuForPme | Whether GPUs will be used for PME interactions. |
[in] | rankHasPpTask | Whether this rank has a PP task |
[in] | rankHasPmeTask | Whether this rank has a PME task |
std::bad_alloc | If out of memory. InconsistentInputError If user and/or detected inputs are inconsistent. |