-
Notifications
You must be signed in to change notification settings - Fork 12
Red blood cells communication scheme
- all blood cells location known
- all to all, or something, can be used to make each proc aware of:
- the cells it owns
- the sites that are affected by the cell-vertices+stencil
knowns/assumptions:
- cells ownership can only go from one proc to its first-neighborSirVer/ultisnips
- cells move slowly: the process of changing ownership can take several LB steps if that limits the amount/complexity of communication
- ownership is determined by the location of barycenter
- sloshing - cell-barycenter goes from 0 to 1, cell sloshes about, barycenter goes back to 0 - is not a problem
- a priori, communication takes place via fixed size vectors
- non-fixed size communications will take place in at least two LB-step process
Algorithm - RequestComm 1. list of cells to change ownership at next LB step: - compute barycenter of each cell owned by proc - barycenter is equated to closest lattice site - map<neighor id, fifo queue of cells> nextCellSwap takes ownership of cells to move 1. thisCellSwap cells are communicated to the relevant neighbor. The size of this communication is known from prior steps 1. the number of cells owned by this proc is communicated to its neighbors. This will determine the size of the communication (below, giving number of cells) in next LB step. On the receiving side, this number is stored in map<neighbor id, int> maxCommSize. 1. the size of maxCommSize cells from nextCellSwap is communicated. Vector is padded with 0. throw if nextCellSwap larger than maxCommSize.
Algorithm - Post-send: 1. swap thisCellSwap nextCellSwap
Algorithm - Post-receive: 1. add received cells to owned cell-calculations 1. set maxCommSize to received value