Gromacs
2020.5
|
#include <gromacs/taskassignment/taskassignment.h>
Contains the GPU task assignment for all ranks on this physical node.
This can be used to configure the modules that might run tasks on GPUs.
This assignment is made by a GpuTaskAssignmentsBuilder object.
Public Member Functions | |
GpuTaskAssignments (GpuTaskAssignments &&source) noexcept=default | |
Public move constructor to use with the builder. | |
void | reportGpuUsage (const MDLogger &mdlog, bool printHostName, bool useGpuForBonded, PmeRunMode pmeRunMode, bool useGpuForUpdate) |
Log a report on how GPUs are being used on the ranks of the physical node of rank 0 of the simulation. More... | |
void | logPerformanceHints (const MDLogger &mdlog, size_t numCompatibleGpusOnThisNode) |
Logs to mdlog information that may help a user learn how to let mdrun make a task assignment that runs faster. More... | |
gmx_device_info_t * | initNonbondedDevice (const t_commrec *cr) const |
Return handle to the initialized GPU to use for the nonbonded task on this rank, if any. More... | |
gmx_device_info_t * | initPmeDevice () const |
Return handle to the initialized GPU to use for the PME task on this rank, if any. More... | |
bool | thisRankHasPmeGpuTask () const |
Return whether this rank has a PME task running on a GPU. | |
bool | thisRankHasAnyGpuTask () const |
Return whether this rank has any task running on a GPU. | |
Friends | |
class | GpuTaskAssignmentsBuilder |
gmx_device_info_t * gmx::GpuTaskAssignments::initNonbondedDevice | ( | const t_commrec * | cr | ) | const |
Return handle to the initialized GPU to use for the nonbonded task on this rank, if any.
Returns nullptr if no such task is assigned to this rank.
gmx_device_info_t * gmx::GpuTaskAssignments::initPmeDevice | ( | ) | const |
Return handle to the initialized GPU to use for the PME task on this rank, if any.
Returns nullptr if no such task is assigned to this rank.
void gmx::GpuTaskAssignments::logPerformanceHints | ( | const MDLogger & | mdlog, |
size_t | numCompatibleGpusOnThisNode | ||
) |
Logs to mdlog
information that may help a user learn how to let mdrun make a task assignment that runs faster.
[in] | mdlog | Logging object. |
[in] | numCompatibleGpusOnThisNode | The number of compatible GPUs on this node. |
void gmx::GpuTaskAssignments::reportGpuUsage | ( | const MDLogger & | mdlog, |
bool | printHostName, | ||
bool | useGpuForBonded, | ||
PmeRunMode | pmeRunMode, | ||
bool | useGpuForUpdate | ||
) |
Log a report on how GPUs are being used on the ranks of the physical node of rank 0 of the simulation.
[in] | mdlog | Logging object. |
[in] | printHostName | Print the hostname in the usage information. |
[in] | useGpuForBonded | Whether GPU PP tasks will do bonded work on the GPU. |
[in] | pmeRunMode | Describes the execution of PME tasks. |
[in] | useGpuForUpdate | Whether the update is offloaded on the GPU. |
std::bad_alloc | if out of memory |