#include <source/mesh/load_balance/BalanceUtilities.h>
Static Public Member Functions | |
static double | binPack (hier::ProcessorMapping &mapping, tbox::Array< double > &weights, int nproc) |
static double | spatialBinPack (hier::ProcessorMapping &mapping, tbox::Array< double > &weights, hier::BoxArray< DIM > &boxes, const int nproc) |
static void | recursiveBisectionUniform (hier::BoxList< DIM > &out_boxes, tbox::List< double > &out_workloads, const hier::BoxList< DIM > &in_boxes, double ideal_workload, const hier::IntVector< DIM > &min_size, const hier::IntVector< DIM > &cut_factor, const hier::IntVector< DIM > &bad_interval, const hier::BoxArray< DIM > &physical_domain) |
static void | recursiveBisectionNonuniform (hier::BoxList< DIM > &out_boxes, tbox::List< double > &out_workloads, const tbox::Pointer< hier::PatchLevel< DIM > > &in_level, int work_id, double ideal_workload, const hier::IntVector< DIM > &min_size, const hier::IntVector< DIM > &cut_factor, const hier::IntVector< DIM > &bad_interval, const hier::BoxArray< DIM > &physical_domain) |
static void | computeDomainDependentProcessorLayout (hier::IntVector< DIM > &proc_dist, int num_procs, const hier::Box< DIM > &box) |
static void | computeDomainIndependentProcessorLayout (hier::IntVector< DIM > &proc_dist, int num_procs, const hier::Box< DIM > &box) |
static void | sortDescendingBoxWorkloads (hier::BoxArray< DIM > &boxes, tbox::Array< double > &workload) |
static double | computeNonUniformWorkload (tbox::Pointer< hier::Patch< DIM > > patch, int wrk_indx, const hier::Box< DIM > &box) |
static double | computeLoadBalanceEfficiency (const tbox::Pointer< hier::PatchLevel< DIM > > &level, ostream &os, int workload_data_id=-1) |
|
Assign workloads to processors using a greedy algorithm that attempts to distribute the sum of weights on each processor evenly across the given number of processors.
|
|
Assign boxes to processors so that boxes spatially near each other are likely to be assigned to processors near each other (assuming that processor ordering is reflected in processor rank) and so that the workload is approximately evenly distributed among the processors. The routine uses a Morton space-filling curve algorithm. Note that this routine potentially reorders the boxes passed in to achieve the first goal.
|
|
Recursively chop chops boxes in input boxlist until each box has a workload less than the prescribed ideal workload or no more more chopping is allowed by the given constraints. A spatially-uniform workload is assumed; i.e., all cells are weighted equally. This routine attempts to create as many boxes as possible with loads equal to or slightly less than the ideal workload value so that they can be mapped to processors effectively.
|
|
Recursively chops boxes given by patches on input patch level until each box has a workload less than the prescribed ideal workload or no more more chopping is allowed by the given constraints. A spatially-nonuniform workload is assumed. Cell weights must be given bydata defined by the given patch data id on the given patch level. This routine attempts to create as many boxes as possible with loads equal to or slightly less than the ideal workload value so that they can be mapped to processors effectively.
|
|
Compute factorization of processors corresponding to dimensions of given box.
|
|
Compute a factorization of processors that does NOT necessarily correspond to the dimensions of the supplied box. For example, the processor distribution in each direction may simply be a square root (cube root in 3D) of the number of processors. The box information is used simply to determine a maximum number of processors in each coordinate direction.
|
|
Sort box array in descending order of workload according to the workload array. Both the box array and the work array will be sorted on return. Note that if you simply want to sort boxes based on their size, see hier::BoxUtilities.
|
|
Compute total workload in region of argument box based on patch data defined by given integer index. The sum is computed on the intersection of argument box and box over which data associated with workload is defined.
|
|
Compute and return load balance efficiency for a level.
|