Gromacs  2024.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gmx::anonymous_namespace{taskassignment.cpp} Namespace Reference

Functions

std::vector< GpuTaskAssignmentbuildTaskAssignment (const GpuTasksOnRanks &gpuTasksOnRanksOfThisNode, ArrayRef< const int > gpuIds)
 Build the GPU task assignment for the ranks of this node. More...
 
bool isAnyGpuSharedBetweenRanks (ArrayRef< const GpuTaskAssignment > gpuTaskAssignments)
 Return whether a GPU device is shared between any ranks. More...
 
size_t countGpuTasksOnThisNode (const GpuTasksOnRanks &gpuTasksOnRanksOfThisNode)
 Counts all the GPU tasks on this node.
 
int countOverAllRanks (MPI_Comm comm, int countOnThisRank)
 Return on each rank the total count over all ranks of all simulations.
 
void barrierOverAllRanks (MPI_Comm comm)
 Barrier over all rank in comm.
 

Function Documentation

std::vector<GpuTaskAssignment> gmx::anonymous_namespace{taskassignment.cpp}::buildTaskAssignment ( const GpuTasksOnRanks &  gpuTasksOnRanksOfThisNode,
ArrayRef< const int >  gpuIds 
)

Build the GPU task assignment for the ranks of this node.

Parameters
[in]gpuTasksOnRanksOfThisNodeFor each rank on this node, the set of tasks that are eligible to run on GPUs.
[in]gpuIdsThe GPU IDs for the tasks on this node, supplied either by the user or the automatic assignment.
Returns
A vector with elements for each rank on this node that describes the GPU tasks and the assigned device ID.
Exceptions
InvalidInputErrorwhen the user GPU assignment requests multiple devices on a rank
bool gmx::anonymous_namespace{taskassignment.cpp}::isAnyGpuSharedBetweenRanks ( ArrayRef< const GpuTaskAssignment >  gpuTaskAssignments)

Return whether a GPU device is shared between any ranks.

Sharing GPUs among multiple ranks is possible via either user or automated selection.