Changing Splitting

Hi Giuseppe,

Is “fillDeviceMapByAxisBalanced” the most recent function for changing splitting? I want to split my flume in the transverse direction (y direction) to use the maximum capability of the GPUs because when I use 4 GPUs and its splitter in the x direction, the last GPU has fewer particles than other GPUs.

Regards,
Alireza

Hello @AlirezaZarei

both fillDeviceMapByAxis and fillDeviceMapByAxisBalanced work in the same way, splitting the domain in the direction you pass as argument. The difference between the two is that fillDeviceMapByAxis tries to divide the cells equally, while fillDeviceMapByAxisBalanced tries to divide the (initial distribution of) particles equally. There are also other splitting rules available (e.g. fillDeviceMapByRegularGrid), and it’s also possible to define splitting rules manually.

Keep in mind that even though the existing fillDevice* functions try to do an initially balanced split, there are some constraints they have to stick to, and depending on the problem geometry and particle distribution it may be inevitable that the distribution will leave some GPUs underused. For example, if in the split direction you have 63 cells and split with 4 GPUs, it’s unavoidable that 3 GPUs will get 16 slices, but the last one will only have 15.

Normally this is not too much of an issue, although it may have a negative effect on scaling. It may also be indicative that you’re using “too many GPUs” for your problem/geometry/resolution. Testing is the only way to see if using one GPU more or one GPU less is better.