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

Aleksejs Fomins aleksejs.fomins at lspr.ch
Tue Oct 14 14:18:40 CEST 2014


Dear Jo,

Thank you for your reply :)

I was interested in the context of calling ParMetis.

Do I understand correctly, that if I call it with MPI_COMM_WORLD, I will
allow it to communicate between all processes, and if MPI_COMM_SELF,
then each process will only communicate to itself?

I am just trying to understand why would anybody run parmetis with
MPI_COMM_SELF, but I think that it is for the case where the grid is
first constructed on the master node, so it need not communicate

Best,
Aleksejs

On 10/14/2014 01:46 PM, Jö Fahlke wrote:
> 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ö.
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20141014/eba0d823/attachment.sig>


More information about the Dune mailing list