Mpi

The idea is use the tag in the same way as the port is used in a socket
connection. This is needed because a MPI process could have many
Collage::MPIConnections working at the same time, so, many threads are
running MPI_Recv (or MPI_Probe in this case) at the same time. A different
tag is needed to identify the destination thread.


On 1 July 2014 11:23, Stefan Eilemann <notifications@github.com> wrote:

> In co/mpiConnection.cpp:
>
> > +#include <boost/thread/thread.hpp>
> > +
> > +#include <set>
> > +#include <mpi.h>
> > +
> > +namespace
> > +{
> > +
> > +/*
> > + * Every connection inside a process has a unique MPI tag.
> > + * This class allows to register a MPI tag and get a new unique tag.
> > + *
> > + * Due to the tag is defined by a 16 bits integer on
> > + * ConnectionDescription ( the real name is port but it
> > + * is reused for this purpuse ). The listeners always
> > + * use tags [ 0, 65535 ] and others [ 65536, 2147483648 ].
>
> Why is this needed? Couldn't the tag simply be the MPI rank of the node?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Eyescale/Collage/pull/109/files#r14394954>.
>