[Mpi3-bwcompat] MPI timer requests

Dave Goodell goodell at [hidden]
Tue Mar 8 17:08:00 CST 2011



On Mar 8, 2011, at 4:56 PM CST, Fab Tillier wrote:

> In your example, what thread calls MPI_GREQUEST_COMPLETE?  What happens to the thread that is blocked in MPI_WAITANY when the signal comes in?

It would be the same thread that is blocked in MPI_WAITANY, but it has just been interrupted by the signal.  It would require a signal-safe MPI library that permitted MPI calls within signal handlers, which is recommended by the standard but not strictly required.  See MPI-2.2, page 24, lines 24-34:

----8<----
    MPI does not specify the interaction of processes with signals and does not require that MPI be signal safe. The implementation may reserve some signals for its own use. It is required that the implementation document which signals it uses, and it is strongly recommended that it not use SIGALRM, SIGFPE, or SIGIO. Implementations may also prohibit the use of MPI calls from within signal handlers.
    In multithreaded environments, users can avoid conflicts between signals and the MPI library by catching signals only on threads that do not execute MPI calls. High quality single-threaded implementations will be signal safe: an MPI call suspended by a signal will resume and complete normally after the signal is handled.
----8<----

-Dave

> Rajeev Thakur wrote on Tue, 8 Mar 2011 at 14:31:58
> 
>> Generalized requests could still be used in single threaded mode with
>> signals (SIGALRM) I think.



More information about the Mpi3-bwcompat mailing list