#include <gromacs/domdec/dlbtiming.h>
Manager for starting and stopping the dynamic load balancing region.
void DDBalanceRegionHandler::closeAfterForceComputationGpu |
( |
float |
waitCyclesGpuInCpuRegion, |
|
|
DdBalanceRegionWaitedForGpu |
waitedForGpu |
|
) |
| const |
|
inline |
Close the load balance timing region on the GPU side.
This should be called after the CPU receives the last (local) results from the GPU. The wait time for these results is estimated, depending on the waitedForGpu
parameter. If called on an already closed region, this call does nothing.
- Parameters
-
[in] | waitCyclesGpuInCpuRegion | The time we waited for the GPU earlier, overlapping completely with the open CPU region |
[in] | waitedForGpu | Tells if we waited for the GPU to finish now |
Open the load balance timing region on the CPU.
Opens the balancing region for timing how much time it takes to perform the (balancable part of) the MD step. This should be called right after the last communication during the previous step to maximize the region. In practice this means right after the force communication finished or just before neighbor search at search steps. It is assumed that computation done in the region either scales along with the domain size or takes constant time.
- Parameters
-
[in] | allowReopen | Allows calling with a potentially already opened region |
void DDBalanceRegionHandler::openBeforeForceComputationGpu |
( |
| ) |
const |
|
inline |
Open the load balance timing region for the CPU.
This can only be called within a region that is open on the CPU side.
void DDBalanceRegionHandler::reopenRegionCpu |
( |
| ) |
const |
|
inline |
Re-open the, already opened, load balance timing region.
This function should be called after every MPI communication that occurs in the main MD loop. Note that the current setup assumes that all MPI communication acts like a global barrier. But if some ranks don't participate in communication or if some ranks communicate faster with neighbors than others, the obtained timings might not accurately reflect the computation time.
The documentation for this class was generated from the following files:
- src/gromacs/domdec/dlbtiming.h
- src/gromacs/domdec/dlbtiming.cpp