Gromacs
2024.3
|
#include "gromacs/utility/real.h"
This file declares functions to interact with the dynamic load balancing machinery.
Functions | |
float | dd_pme_f_ratio (const gmx_domdec_t *dd) |
Return the PME/PP force load ratio, or -1 if nothing was measured. More... | |
void | set_dlb_limits (gmx_domdec_t *dd) |
Sets the cell size limits for DD to suit dynamic load balancing. | |
void | set_dd_dlb_max_cutoff (struct t_commrec *cr, real cutoff) |
Limit DLB to preserve the option of returning to the current cut-off. More... | |
void | dd_dlb_set_should_check_whether_to_turn_dlb_on (gmx_domdec_t *dd, bool bValue) |
Sets whether we should later check the load imbalance data, so that we can trigger dynamic load balancing if enough imbalance has arisen. More... | |
bool | dd_dlb_get_should_check_whether_to_turn_dlb_on (gmx_domdec_t *dd) |
Returns if we should check whether there has been enough load imbalance to trigger dynamic load balancing. More... | |
bool | dd_dlb_is_on (const gmx_domdec_t *dd) |
Return if we are currently using dynamic load balancing. | |
bool | dd_dlb_is_locked (const gmx_domdec_t *dd) |
Return if the DLB lock is set. | |
void | dd_dlb_lock (struct gmx_domdec_t *dd) |
Set a lock such that with DLB=auto DLB cannot get turned on. | |
void | dd_dlb_unlock (struct gmx_domdec_t *dd) |
Clear a lock such that with DLB=auto DLB may get turned on later. | |
Variables | |
constexpr int | c_checkTurnDlbOnInterval = 100 |
We check if to turn on DLB at the first and every 100 DD partitionings. With large imbalance DLB will turn on at the first step, so we can make the interval so large that the MPI overhead of the check is negligible. | |
constexpr int | c_checkTurnDlbOffInterval = 20 |
We need to check if DLB results in worse performance and then turn it off. We check this more often then for turning DLB on, because the DLB can scale the domains very rapidly, so if unlucky the load imbalance can go up quickly and furthermore, we are already synchronizing often with DLB, so the overhead of the MPI Bcast is not that high. | |
bool dd_dlb_get_should_check_whether_to_turn_dlb_on | ( | gmx_domdec_t * | dd | ) |
Returns if we should check whether there has been enough load imbalance to trigger dynamic load balancing.
We need to check whether we check because it might be always off.
void dd_dlb_set_should_check_whether_to_turn_dlb_on | ( | gmx_domdec_t * | dd, |
bool | bValue | ||
) |
Sets whether we should later check the load imbalance data, so that we can trigger dynamic load balancing if enough imbalance has arisen.
Used after PME load balancing unlocks DLB, so that the check whether DLB will be useful can happen immediately.
float dd_pme_f_ratio | ( | const gmx_domdec_t * | dd | ) |
Return the PME/PP force load ratio, or -1 if nothing was measured.
Should only be called on the DD main node.
void set_dd_dlb_max_cutoff | ( | struct t_commrec * | cr, |
real | cutoff | ||
) |
Limit DLB to preserve the option of returning to the current cut-off.
Domain boundary changes due to the DD dynamic load balancing can limit the cut-off distance that can be set in change_dd_cutoff. This function sets/changes the DLB limit such that using the passed (pair-list) cut-off should still be possible after subsequently setting a shorter cut-off with change_dd_cutoff.