auto-migration, orThe choice of migration method depends upon the complexity of the application's data. For some applications, only the objects used in balancing must be migrated; no auxiliary data structures must be moved. Particle simulations are examples of such applications; load balancing is based on the number of particles per processor, and only the particles and their data must be moved to establish the new decomposition. For such applications, Zoltan's auto-migration tools can be used. Other applications, such as finite element methods, perform load balancing on, say, the nodes of the finite element mesh, but nodes that are moved to new processors also need to have their connected elements moved to the new processors, and migrated elements may also need "ghost" nodes (i.e., copies of nodes assigned to other processors) to satisfy their connectivity requirements on the new processor. This complex data migration requires a more user-controlled approach to data migration than the auto-migration capabilities Zoltan can provide.
/* Tell Zoltan to automatically migrate data for the application.
Zoltan_Set_Param(zz, "AUTO_MIGRATE", "TRUE");
/* Register additional functions for packing and unpacking data
/* Free memory allocated for load-balancing results by Zoltan
Zoltan returns a decomposition of the */
/* nodes of a finite element mesh. */
/* Migrate the nodes as directed by the results of Zoltan_LB_Partition.
/* Prepare for migration of requested elements. */
/* From the request lists, a processor knows which elements it
/* Processor now knows which elements to send to other processors.
/* Repeat process for "ghost" nodes. */