[Dune] Communicating IdSet elements
Markus Blatt
Markus.Blatt at iwr.uni-heidelberg.de
Sun Jul 24 18:22:36 CEST 2011
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
--
Markus Blatt, Interdisciplinary Center for Scientific Computing,
University Heidelberg, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 (0) 6221 548881 Fax: +49 (0) 6221 548884
'Mathematics knows no races or geographic boundaries; for
mathematics, the cultural world is one country' - David Hilbert
More information about the Dune
mailing list