[Dune] what is Dune::MPIHelper::getLocalCommunicator()

Jö Fahlke jorrit at jorrit.de
Tue Oct 14 13:46:34 CEST 2014


Am Tue, 14. Oct 2014, 10:05:21 +0200 schrieb Aleksejs Fomins:
> A short question. What does Dune::MPIHelper::getLocalCommunicator() do?
> 
> The reference says:
> 
> "get a local communicator
> Returns a communicator to exchange data with the local process only"
> 
> But what is a local process?

This is the Dune way to get MPI_COMM_SELF.  getCommunicater() will get you
MPI_COMM_WORLD instead.

Scenario: You have an MPI program, but for some part of the computation you
need one grid on each rank.  E.g. to compute different realizations of the
same problem.  Say you grid manager is parallel in principle.  If you
instanciate the grid manager with MPI_COMM_WORLD you will get a parallel grid
over all ranks.  If instead you instantiate it with MPI_COMM_SELF you get one
sequential grid on each rank.

Of course it is up to the grid manager whether you can change the communicator
when instantiating a grid...

Regards,
Jö.

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

This message is protected by DoubleROT13 encryption
Attempting to decode it violates the DMCA/WIPO acts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20141014/94054955/attachment.sig>


More information about the Dune mailing list