Gromacs
2020-beta1
|
#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. | |
GpuTaskAssignments | build (const std::vector< int > &gpuIdsToUse, const std::vector< int > &userGpuTaskAssignment, const gmx_hw_info_t &hardwareInfo, const t_commrec *cr, const gmx_multisim_t *ms, const PhysicalNodeCommunicator &physicalNodeComm, TaskTarget nonbondedTarget, TaskTarget pmeTarget, TaskTarget bondedTarget, TaskTarget updateTarget, bool useGpuForNonbonded, bool useGpuForPme, bool rankHasPpTask, bool rankHasPmeTask) |
Builds a GpuTaskAssignments. More... | |
GpuTaskAssignments gmx::GpuTaskAssignmentsBuilder::build | ( | const std::vector< int > & | gpuIdsToUse, |
const std::vector< int > & | userGpuTaskAssignment, | ||
const gmx_hw_info_t & | hardwareInfo, | ||
const t_commrec * | cr, | ||
const gmx_multisim_t * | ms, | ||
const PhysicalNodeCommunicator & | physicalNodeComm, | ||
TaskTarget | nonbondedTarget, | ||
TaskTarget | pmeTarget, | ||
TaskTarget | bondedTarget, | ||
TaskTarget | updateTarget, | ||
bool | useGpuForNonbonded, | ||
bool | useGpuForPme, | ||
bool | rankHasPpTask, | ||
bool | rankHasPmeTask | ||
) |
Builds a GpuTaskAssignments.
This method reconciles
to assign the GPUs on each physical node to the tasks on the ranks of that node.
[in] | gpuIdsToUse | The compatible GPUs 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] | cr | Communication object. |
[in] | ms | Multi-simulation handler. |
[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. |