Re: threads and signals

Marc Snir (snir@watson.ibm.com)
Fri, 4 Apr 1997 16:25:29 -0400




To: mpi-external @ mcs.anl.gov
cc: (bcc: Marc Snir/Watson/IBM Research)
Subject: threads and signals

Rolf says:

There may be an inconsistency:

Section 2.9.2 describes "Interaction with signals in POSIX" on p.16

"and implementors should attempt to implement MPI so that
signals are transparent: an MPI call suspended by a signal should
resume and complete after the signal is handled."

7.6.2 subsection "Interaction with signals and cancelations"
on p.152 lines 10-11

"The outcome is undefined ... if a thread catches a signal while
executing an MPI call."

is not consistent with 2.9.2 (that is equivalent to MPI 1.1)
for the case that required=MPI_THREAD_SINGLE!

***********
Marc says:

There is not inconsistency, because "should attempt" is not "must".
In fact, the texts are in full agreement. The outcome is undefined by MPI,
and
implementors should attempt to do better in single-threaded environments.
In a multithreaded environment, there is an
obvious way for the user to work around an MPI implementation that is not
signal-safe, so
there is no reason even to make a recommendation to implementors, there.