Zoltan Developer's Guide  |  Next  |  Previous

Load-Balancing Interface Routines

Any new method that you wish to add to the Zoltan library must have an interface that conforms to the prototype LB_FN. Note that the load balancing function may return either import lists, export lists, or both. All processes must return the same type of list. If import (export) lists are not computed, then the variable num_import (num_export) must be set to a negative number (typically -1) upon return. Full support of the RETURN_LISTS parameter is not required. If RETURN_LISTS is not set to NONE, the new algorithm may return either import or export lists; the Zoltan interface will then build the lists requested by RETURN_LISTS.

A new algorithm must be added to the load-balancing interface for use with parameter LB_METHOD. An entry for the new algorithm must be added to the enumerated type Zoltan_LB_Method in lb/lb_const.h. An external LB_FN prototype for the load-balancing function must also be added to lb/lb_const.h; see the prototype for function Zoltan_RCB as an example. A character string describing the new algorithm should be chosen to be used as the parameter value for LB_METHOD. In function Zoltan_LB_Set_LB_Method, a test for this string should be added and the Method and LB_Fn fields of the Zoltan_Struct should be set to the new enumerated type value and new load-balancing function pointer.

[Table of Contents  |  Next:  Load-Balancing Function Implementation  |  Previous:  Adding New Algorithms  |  Privacy and Security]