-
Notifications
You must be signed in to change notification settings - Fork 15
Load Balancing Notes
For overlapping partitions, there are two zones that matter:
- buffer and
- safe zone.
For particle load balancing the safe zone is the more important one to change. This can be changed by setting the safeBFSLayers
variable of the pumipic::Input
object before creating the PICparts.
Groups are the notion of having multiple MPI processes for the same PICpart. This feature is currently only in XGCm.
pumipic::Input input(...); //Creates the input structure with the given parameters
input.bufferBFSLayers = 6; //Sets the minimum buffer region size
input.safeBFSLayers = 3; //Sets the safe zone size (bufferBFSLayers must be greater than this value)
If you use buffer method BFS and set the safe zone method to FULL then the safe zone will include all elements that are at least
input.safeBFSLayers
layers of elements away from the picpart boundary. This will allow you to get a sufficient safe zone easily by setting input.safeBFSLayers to the maximum number of elements a particle is
expected to move.
When the buffer method is BFS :
- If the safe zone is not FULL, then the safeBFSLayers are the layers from the edge of picpart core towards the boundary.
- If the safe zone is FULL, then the safeBFSLayers are used as unsafe layers from the boundary.
To call the load balancer
void rebuild(p::Mesh& picparts, PS* ptcls, o::LOs elem_ids) {
// update particle positions
...
//load balance call replacing ptcls->migrate(..)
p::migrate_lb_ptcls(picparts, ptcls, elem_ids, 1.05);
}