[mpich-discuss] MPI polling question with MPI_Iprobe

Eric Hui Eric.Hui at ggy.com
Wed Sep 21 13:56:05 CDT 2011


I am investigating the possibility of using MPI as an alternative to Winsock in our application.

Currently we have a thread to retrieve WinSock messages in a loop that uses the Windows function called WaitMessage.
This function suspends the current thread and does not return until a new message is placed in the thread's message queue.
http://msdn.microsoft.com/en-us/library/ms644956%28v=VS.85%29.aspx

I am looking for the equivalent function in MPI that allows me to get notified when a message arrive, but haven't found anything so far.
I found that there is MPI_Probe and MPI_Iprobe.  It seems like both of these functions are doing polling instead of getting notification when there is message arrived, so it is taking up 100% of the CPU power even when it is just idling to wait for message.

I want to perform something like this:

while (true)
{
                //wait for message without using CPU power
                //receive message and process it
}

Is this possible in MPI?

Eric Hui
GGY AXIS
416-2503448
Eric.Hui at ggy.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110921/922b0515/attachment.htm>


More information about the mpich-discuss mailing list