Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SMPI: redesign the end of actors/ranks' lifetime
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 1 Aug 2019 07:34:53 +0000 (09:34 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 1 Aug 2019 07:54:44 +0000 (09:54 +0200)
The problem is that we don't use enough of refcounting in SMPI, so we
should not let any rank finish before the others, because it may be
involved in a communication or something.

Previously, there were a barrier at the end of the user code, so that
every ranks finishes exactly at the same time.

Now, the MPI instance keeps a reference on every actor it contains,
and the actor terminates with no delay after its code. The terminating
actors unregister from their MPI instance, but they are still
referenced until the last actor unregisters from the MPI instance.
Once the MPI instance is empty, it unregisters all the actors,
allowing their collection by the refcounting.

This commit changes the ending time of many ranks in many examples, as
expected. The ranks now terminate as soon as they are done, they are
not waiting the others anymore.

It introduces a segfault in ampi that I fail to understand. It seems
that a container is used after being collected in this example, but I
fail to see the reason so far.


No differences found