[Dune] example for mpicollectivecommunication
Tobias Malkmus
tomalk at mathematik.uni-freiburg.de
Wed Oct 1 11:27:10 CEST 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Aleksejs
You can use the Dune::CollectiveCommunication from
dune-common/dune/common/parallel/mpicollectivecommunication.hh.
It contains a method called sum, which does what you need.
Of cousre you will have to initialize the MPI communicator using:
MPIHelper::instance( argc, argv )
from dune-common/dune/common/parallel/mpihelper.hh at the beginning of
your main routine.
Don't forget to configure dune with parallel support(
- --enable-parallel, MPICC=/.../mpicc )
Best Tobias
On 10/01/2014 11:00 AM, Aleksejs Fomins wrote:
> Dear Dune,
>
> I would like to sum up a variable over all processes.
>
> Could you suggest an example program I can take inspiration from?
>
> Thank you, Aleksejs
>
>
>
> _______________________________________________ Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
- --
Tobias Malkmus <tomalk at mathematik.uni-freiburg.de>
Mathematisches Institut Tel: +49 761 203 5627
Abt. für Angewandte Mathematik Universität Freiburg
Hermann-Herder-Str. 10
79104 Freiburg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBAgAGBQJUK8juAAoJEBMY7DHvcWNgqmoH/2htsk2dlly03YxbeKOIz+wI
b6kMOiVUEJl/ZpybJ5/Dfx3yeHsDmVKOu+daID4QfjEzysYcQ0jvbEFcdU0nzq0f
lDXgz1C9/cVP3NEl7C2+SRGmoUJVq91Ouj3kTXV2QcQwGX0JGOuL3+UN5f7GGZBV
abcPJou5cwB3OHb6+LvHUyU95mqkPjXs+aKfy92jyE05efiY0EfJe5PgxgHvLPlK
015X3AbPKvjU0qR+jD0n8WgNeHq0lJRJNX5HNtd/qPmVdV3v82edssSn/bG7h3hD
776CfFop38+Ag4iBUw7PLhfsr0981nmgCG/22VKx7PiLC/0BAwQQDB8matfWSd8=
=PAhq
-----END PGP SIGNATURE-----
More information about the Dune
mailing list