next up previous
Next: Visualization Routines Up: PMDB User's Manual Previous: Migration

Load Balancing

 

These routines implement the Iterative Tree Balancing algorithm for PMDB meshes. This was the original load balancer in PMDB, and remains useful in some situations. For a wider variety of load balancing algorithms for use with PMDB, see the PMDB Interface to Zoltan.


void pmdb_set_load_balance_params(
pMeshPB  pmeshpb,       /* IN */
int      first_arg,     /* IN */
...,                    /* additional args, IN */
NULL)

This routine allows the application to set various paramters to the load balancing operator. This function takes a variable-length argument list, so any number of the paramters can be set with a single call. The list must be terminated with an argument NULL. Any of these parameters can also be set by using environment variables by the same names. The following is a list of arguments and possible values:

Argument NameTypeValid ValuesDescription
PMDB_DEF_LB_SEL_METHOD int selection methods Set the selection method to use when migrating elements for load balancing. Default is PMDB_LB_SLICE, which was used for PMDB versions prior to version 4.0
PMDB_LB_SEL_METHOD int selection methods Set the default selection method to use when migrating elements for load balancing. Default is PMDB_LB_SLICE, which was used for PMDB versions prior to version 4.0
PMDB_LB_MAX_ITER int any integer >= 0 Set the number of iterations for load balancing. A value of 0 disables load balancing. This corresponds to the max_iter parameter to the old load_balance() operator.
PMDB_LB_MAX_INTERNAL_ITER int any integer >= 0 Set the number of internal iterations for load balancing. This value is the number of "slices" or "interface-sized" chunks that will be migrated between recomputation of the load flow tree. Smaller values will result in a slower algorithm, but can potentially deal with the small interface values without degrading the interprocessor boundary as much. Default is 100.
PMDB_LB_DEBUG_LEVEL int 0,1,2,3
Set the amount of output to be produced by the load balancing algorithm
0No output
1Basic stats (default)
2Report on each internal iteration
3Report each element migrated
PMDB_LB_TOLERANCE long any long int >= 1 Set the load imbalance tolerance. After the greatest load difference between any two processors falls to this level, the load balancing will terminate. This corresonds to the tol argument to the old load_balance() operator. Default is 1.
PMDB_LB_INTERFACE_THRESH long any long int >= 0 Set the initial interface thrershold to consider partitions connected for the computation of the load flow tree. This value is decreased automatically in successive iterations of the iterative load balancing algorithm. Default is 0.
PMDB_LB_PRINT_MIGSTATS int any int Set the flag for whether to compute and print migration stats during ITB or Zoltan load balancing. A non-zero value turns this flag on, zero turns it off. Default is 0 (off).
PMDB_LB_PRINT_ITBTIMES int any int Set the flag for whether to compute and print detailed stats about the execution of ITB load balancing. A non-zero value turns this flag on, zero turns it off. Default is 0 (off).
PMDB_LB_PRINT_ZOLTANTIMES int any int Set the flag for whether to compute and print a timing breakdown for Zoltan load balancing. Currently, this includes only partitioning and migration times. A non-zero value turns this flag on, zero turns it off. Default is 0 (off).

Values for the load-balancing selection methods.

NameDescription
PMDB_LB_SLICE Select elements for migration by "peeling" slices from the interprocessor boundary. This is the default, and is the only method used in versions of PMDB before 4.0.
PMDB_LB_GEOM Select elements for migration by choosing elements with the greatest difference in the distances from the element to the centroids of the sending and receiving processors.
PMDB_LB_PROJECTION Select elements for migration by choosing elements with the greatest projected difference in the distances from the element to the centroids of the sending and receiving processors. The projection is from the centroid of the candidate element onto the line connecting the centroids of the sending and receiving processors.
PMDB_LB_GEOM_PRED Same as PMDB_LB_GEOM, except that partition centroids used are an estimate of the centroid after the balancing is complete.
PMDB_LB_PROJECTION_PRED Same as PMDB_LB_PROJECTION, except that partition centroids used are an estimate of the centroid after the balancing is complete.


void pmdb_load_balance(
pMeshPB  pmeshpb)       /* IN */

This routine implements the iterative tree based load balancing algorithm, based on the paramters set by environment variables or by previous calls to pmdb_set_load_balance_params().


void  load_balance(
pMeshPB  pmeshpb,       /* IN */
long     tol,           /* IN */
int      max_iter)      /* IN */

This routine implements the iterative tree based load balancing algorithm. tol is the load tolerance and max_iter is the maximum number of load balancing iterations to be performed. This function is obsolete and has been replaced with the functions described above.



Jim Teresco
Tue Jul 9 17:15:26 EDT 2002