[Dune] Communicating IdSet elements

Patrick Leidenberger leidenberger at ifh.ee.ethz.ch
Tue Jul 26 10:55:40 CEST 2011


Hi Markus and all the others,

thanks for all your hints! The one form Markus below, did the trick for 
me: The global id in my case (ALU3d) can be sent without problems using:
Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>

I think, quite some time ago this was not possible. So thanks to all the 
great DUNE developers, making my life so easy!

In my code I use this for some data attached to the grid, that should be 
re-distributed after a loadbalance step.

Anyway a unique serialization solution within dune would be nice, 
especially for a 'stop and restart' function of a code.

Have a nice day

Patrick


On 07/24/2011 06:22 PM, Markus Blatt wrote:
> Hi,
>
> On Sun, Jul 24, 2011 at 04:31:27PM +0200, Martin Nolte wrote:
>> to the best of my knowledge there is no guarantee an id can be communicated
>> using MPI.  ...
>> If I am not mistaken, some codes actually do
>> communicate global ids (e.g., the AMG solver from dune-istl).
>
> Actually, we do not use the global ids of the grids but use our own.
> GobalIds from UG (int) and Yaspgrid (bigunsignedint) can be
> communicated with MPI without any problems. For these grids you can
> get the corresponding MPIType by using
> MPITraits<GlobalIdType>::datatype (header dune/common/mpitraits.hh or
> the grid headers). If there is no specialization for your type, we
> fall back to sending converting the object to bytes and then sending
> them (Safe for structs and classes with just PODs and no pointers,
> containers inside).
>
>
> For the other grids I am not sure because I do not know what
> type they use internally. As long as they use an int or something
> similar you should be save. (Just saw that ALU uses a size_t, which
> means the above procedure is safe).
>
> @Patrick: Still, knowing what you want to achieve would help a
> lot. Depending on it there are probably several possibilities.
>
> Cheers,
>
> Markus
>




More information about the Dune mailing list