[Mpi-forum] Missing MPI primitives - Probe+Wait
N.M. Maclaren
nmm1 at cam.ac.uk
Mon Apr 19 15:35:16 CDT 2010
I have been drafting a design for Fortran coarrays based on MPI, and have
hit a couple of rather critical missing primitives.
One is that I need to do a blocking wait (of the form that will yield to
other threads and processes, not a spin loop) that will terminate as soon
as either a message comes in (i.e. like MPI_Probe) or one of the outstanding
non-blocking messages completes (i.e. like MPI_Waitall).
Another is the ability to interrupt one of those primitives (or, I suppose,
MPI_Probe or one of the MPI_Waits) from another thread in the same process
in the case that MPI_THREAD_MULTIPLE is NOT set. No message needed - just
a way of breaking out.
The first could easily be added by a pseudo-request that was satisfied by
the existence of an incoming message - obviously, the status would be
full of the usual 'unset' values - or by adding a separate function.
I doubt that it would be any trickier to implement than MPI_Waitany.
The second is easy to specify. It would need a three-state return value:
success, not in a wait, or failure. Allowing the last would make it
reliably implementable, though not ideal for my purposes :-( I can see
how to implement it in most cases, so that opt-out should rarely be used.
But there are circumstances when it would be needed.
Any comments? Including that I have been an idiot and missed something
obvious :-)
Regards,
Nick Maclaren.
More information about the mpi-forum
mailing list