Reply To: Number of Cuboids for Geometry related to Parallel Compilation?
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Number of Cuboids for Geometry related to Parallel Compilation? › Reply To: Number of Cuboids for Geometry related to Parallel Compilation?
Yes, the cuboid decomposition of the geometry and as such also the number of these cuboids is essential for the parallelization. Each cuboid needs to communicate only with its direct neighbors (w.r.t. a single timestep). This communication is realized via overlap areas that are synchronized between the blocks. This is a very common pattern for parallelizing lattice-based codes.
While this is not strictly necessary for OpenMP-only (i.e. shared memory) parallelization, it is often still advantageous to do so in order to reduce the number of superfluous cells.
As such, the ideal number of cuboids is rather problem-dependent. Choosing one cuboid per process is a good base choice but in general you’ll have to benchmark if you want to optimize performance under this parameter.
For more information you can check out e.g. our overview paper, starting with figures 2 and 3.