Gromacs
2025-dev-20241003-bd59e46
|
#include "gmxpre.h"
#include "gromacs/taskassignment/taskassignment.h"
#include "config.h"
#include <cstddef>
#include <algorithm>
#include <exception>
#include <filesystem>
#include <memory>
#include <string>
#include <vector>
#include "gromacs/domdec/domdec.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/hardware/device_management.h"
#include "gromacs/hardware/hw_info.h"
#include "gromacs/mdrunutility/multisim.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/simulation_workload.h"
#include "gromacs/taskassignment/usergpuids.h"
#include "gromacs/utility/arrayref.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 | |
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. More... | |
bool | gmx::anonymous_namespace{taskassignment.cpp}::isAnyGpuSharedBetweenRanks (ArrayRef< const GpuTaskAssignment > gpuTaskAssignments) |
Return whether a GPU device is shared between any ranks. More... | |
size_t | gmx::anonymous_namespace{taskassignment.cpp}::countGpuTasksOnThisNode (const GpuTasksOnRanks &gpuTasksOnRanksOfThisNode) |
Counts all the GPU tasks on this node. | |
int | gmx::anonymous_namespace{taskassignment.cpp}::countOverAllRanks (MPI_Comm comm, int countOnThisRank) |
Return on each rank the total count over all ranks of all simulations. | |
void | gmx::anonymous_namespace{taskassignment.cpp}::barrierOverAllRanks (MPI_Comm comm) |
Barrier over all rank in comm . | |
template<GpuTask TaskType> | |
static bool | gmx::hasTaskType (const GpuTaskMapping &mapping) |
Function for whether the task of mapping has value TaskType . More... | |
static bool | gmx::hasPmeOrNonbondedTask (const GpuTaskMapping &mapping) |
Function for whether the mapping has the GPU PME or Nonbonded task. More... | |