Martin Quinson [Sun, 25 Aug 2019 19:41:40 +0000 (21:41 +0200)]
tesh kill timeouted processes with KILL also
It seems that the sanitizers processes are surviving their timeouts on
the server, so this may help fixing the build robots.
On the way, I switched to save the PID of the forked process instead
of its PGID. This helps when I try to see if the process is still
alive, later on: I can always do PID->PGID later (as I do now) while
it seems impossible to do PGID->PID to see whether the process is
still alive.
Fun fact: I think that PID=PGID on POSIX systems, but let's play safe :)
Augustin Degomme [Mon, 19 Aug 2019 09:49:40 +0000 (11:49 +0200)]
Errors occurring during calls to routines that create MPI windows (e.g., MPI_WIN_CREATE (...,comm,...)) cause the error handler currently associated with comm to be invoked.
Augustin Degomme [Mon, 19 Aug 2019 09:33:25 +0000 (11:33 +0200)]
Allgatherv : don't output MPI_ERR_BUFFER if recvbuf is null if we don't receive any data.
FIXME : other collectives can have the same constraint relaxed
Augustin Degomme [Mon, 19 Aug 2019 08:09:22 +0000 (10:09 +0200)]
Unlike errors on communicators and windows, the default behavior for files is to have MPI_ERRORS_RETURN. ( End of advice to users.)
https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node223.htm#Node223
because why not.
Augustin Degomme [Sun, 18 Aug 2019 21:36:50 +0000 (23:36 +0200)]
This particular RMA test is filled with stupid calls... We send errors for most of them.
So let's put that to rest by setting MPI_ERRORS_RETURN for this one.
Augustin Degomme [Sun, 18 Aug 2019 19:02:50 +0000 (21:02 +0200)]
disalign tags for collectives from their nonblocking counterparts, to correctly deadlock when both are entangled
as some blocking ones used internally are actually implement with nonblocking+wait, use the right blocking tag in this case.
Martin Quinson [Sun, 18 Aug 2019 15:01:40 +0000 (17:01 +0200)]
Apply the default settings of 'smpi/buffering' too
Previously, we did obey to that option when given, but the default
value was ignored. This is because the handling was done in the value
verification callback, that is not used for the default value.
Martin Quinson [Sun, 18 Aug 2019 08:12:39 +0000 (10:12 +0200)]
Fix tesh for the new mc-sendsend test
- Test for all factories but thread (that is borken with MC)
- Don't run this test when Java, no matter what. Not sure how I came
to such a stupid idea :)
Martin Quinson [Sat, 17 Aug 2019 20:24:44 +0000 (22:24 +0200)]
Have SMPI fail on MPI_ERR_* in MC mode
The standard says that upon error, implementations should call the
current MPI error handler, which is MPI_ERRORS_ARE_FATAL by default
but could be changed to MPI_ERRORS_RETURN on need.
Since we don't implement MPI_Comm_set_errhandler() to switch between
modes, the simulation mode of SMPI is only issuing a warning on
errors (which is similar to MPI_ERRORS_RETURN).
This commit adds a MC_assert() stating that every MPI call succeed.
This will lead to a property failure (visible only in MC mode) when a
MPI_ERR_* is issued by the implementation (which is somehow similar to
MPI_ERRORS_ARE_FATAL).
Martin Quinson [Thu, 15 Aug 2019 16:28:24 +0000 (18:28 +0200)]
Restore triviality of s_smx_simcall to please GCC
Field initialization make this struct non-trivial, making GCC to panic
when we memset it. Even if we initialize some fields to nullptr and
memset it to 0.
Martin Quinson [Mon, 12 Aug 2019 10:21:51 +0000 (12:21 +0200)]
start to make generic simcalls observable from the MC
WIP, done in the easy parts for now.
Not finished in MC_state_get_request_for_process() yet. That's too bad
because this function is the core of the use of simcalls by the MC,
where the next simcall is picked.
Not done in the independence computing part either.
Martin Quinson [Fri, 2 Aug 2019 18:12:24 +0000 (20:12 +0200)]
forcefully kill exiting actors even if their host is not off
Without this, this_actor::exit() deadlocks on Thread factory because
the actor does not exit soon enough to release maestro that is joining
its thread.
Martin Quinson [Thu, 1 Aug 2019 20:44:06 +0000 (22:44 +0200)]
Actor::by_pid: also search through the dead actors
Finally, my trick works with it. MPI ranks are not garbage collected
as soon as they end because the MPI instance keeps a reference on
them. With this, by_pid() works properly, even on dead but not
collected actors.
But this only works until the trash is emptied, obviously. This seem
to be enough for the test I wanted to get running, so I will not fix
that point tonight.
Martin Quinson [Thu, 1 Aug 2019 20:41:59 +0000 (22:41 +0200)]
ActorImpl: postpone the on_destroy signal to the destructor
This is to prevent that the SMPI extension gets destroyed too early.
The problem is also that this extension is not really an extension but
manually handled, but I'll not fix that tonight.
Martin Quinson [Thu, 1 Aug 2019 07:34:53 +0000 (09:34 +0200)]
SMPI: redesign the end of actors/ranks' lifetime
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.
Martin Quinson [Thu, 1 Aug 2019 03:53:31 +0000 (05:53 +0200)]
MPI: we don't mess with argc/argv anymore nowadays
Previously, the rank and instance were added in argv, mandating a
specific handling of MPI_Init parameters. But now, they are passed as
properties, and the argv is left unmodified. So there is no need to
deal specifically with the MPI_Init parameters.
Martin Quinson [Sun, 28 Jul 2019 23:55:25 +0000 (01:55 +0200)]
kill smpi_process_count(), use smpi_get_universe_size() instead
process_count was probably the original name while universe_size was
added to implement MPI_Attr_get(MPI_UNIVERSE_SIZE). Merge both to sort
things out.
While I'm at it, move all of it to smpi_deployment to reduce the
amount of globals made visible to more than one module.