Skip to content

Add an MPITagProvider class

Marcus Mohr requested to merge mohr/MPITagProvider into master

The rationale for this MR is to catch the problem described in #282 (closed).

It introduces an MPITagProvider class for use by BufferedCommunicator, which uses it to obtain a value for an MPI tag passed to construct a walberla::OpenMPBufferSystem object. It uses the same simple approach for generating unique tags as before, which is to increment the counter after each query. However, it also verifies that the tag stays within the available range provided by the MPI library in use. This value will be between 32,767 and 2,147,483,647.

Outsourcing this functionality into a class would theoretically also allow us to handle tag provision differently, such as e.g. re-adding tags to the pool, when the walberla::OpenMPBufferSystem objects they are attached to get destroyed.

Edited by Marcus Mohr

Merge request reports