Quick Reference / FAQs

How do I get the MPI communicator?

Unless you are getting the communicator to give it to another library, please don’t use raw MPI communicators. ParallelZone’s design is such that you should be able to do every MPI operation directly through ParallelZone’s API. If an operation is missing (or performs poorly) please either make an issue, or better yet, add the missing feature/fix the inefficiency.

To answer the question, given a RuntimeView object rv:

rv.mpi_comm();

How do I get the current process’s MPI rank?

Like the MPI communicator, you in general shouldn’t need the rank as interacting with ResourceSet instances should suffice; however, if you still want it then given a RuntimeView object rv:

rv.my_resource_set().mpi_rank();