Adding New Load-Balancing Algorithms to Zoltan
The Zoltan library is designed so that adding new load-balancing algorithms
to the library is simple. In many cases, existing code can be easily modified
to use the interface query functions to build the data structures needed
for the algorithm. The process for adding new algorithms to the library
is described below; more detail is provided at each link.
-
Make sure you follow the Philosophy
of Zoltan and the Coding Principles
in Zoltan.
-
Use the Data Structures
provided by Zoltan.
-
Implement a Load-Balancing Function front-end
to the algorithm. Note that Zoltan load-balance methods should assign objects both to processors and parts, which may be different. The recommended strategy is to assign objects to parts first, then use Zoltan_LB_Part_To_Proc to generate the corresponding processors.
-
Add the algorithm to the Load-Balancing
Interface Routines.
-
Add the Parameters needed by the algorithm.
Also make sure that the algorithm uses the General Parameters in Zoltan properly, in particular
Imbalance_Tol and
Debug_Level.
-
If necessary, write a routine to free your dynamically allocated data structures.
See tips on memory management
in Zoltan.
-
If your algorithm uses persistent data structures,
like the RCB tree with KEEP_CUTS,
write a routine to copy your load balancing
data structure.
-
We recommend you add part remapping to your algorithm using
Zoltan_LB_Remap.
-
Update the Fortran
and C++ interfaces, if necessary.
-
Document your new method. The documentation should be written in a format
that can easily be converted into HTML and PDF. Consider adding a
simple application to the examples directory demonstrating the
use of your method.
-
Please contact the Zoltan team if you would like your method to be distributed
with future versions of Zoltan.
[Table of Contents | Next:
Load-Balancing Interface Routines | Previous:
Debugging Services | Privacy and Security]