[mpich-discuss] multithreaded MPI_IProbe

Biddiscombe, John A. biddisco at cscs.ch
Fri Jul 13 15:14:21 CDT 2012


Jeff + list

MPI_Send actually is blocking, and MPI_Iprobe is always returning false. The message is neither sent, nor received.

My question should have been...is this to be expected, or could there be a bug in mpich?

Thanks

JB

-----Original Message-----
From: mpich-discuss-bounces at mcs.anl.gov [mailto:mpich-discuss-bounces at mcs.anl.gov] On Behalf Of Jeff Hammond
Sent: 13 July 2012 16:31
To: mpich-discuss at mcs.anl.gov
Subject: Re: [mpich-discuss] multithreaded MPI_IProbe

If you want MPI_Send to block until the message is received, you need to use MPI_Ssend.

You may also wish to read
http://www.unixer.de/publications/img/mprobe-proposal-rev4.pdf
regarding the multithreaded use of MPI_Probe.

There's no guarantee that either of my comments resolves your issue.

Jeff

On Fri, Jul 13, 2012 at 8:40 AM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
> We have a problem caused by this ...
>
>
>
> thread 0
>
>   while (!flag) {
>
>     MPI_Iprobe(MPI_ANY_SOURCE, msg->Tag, comm, &flag, &status);
>
>   }
>
>
>
> and thread 1
>
>     status = MPI_Send(msg->Data, msg->Length, MPI_UNSIGNED_CHAR, 
> msg->Dest,
>
>         msg->Tag, comm);
>
>
>
> so thread 0 just polls for a message, and thread 1 sends one. We 
> expect thread 1 to block until the message is received, but thread 0, 
> is never returning a true flag so we can't receive it.
>
>
>
> Is there a reason for this? Are we doing something wrong 
> (multithreaded MPI_IProbe is not entirely safe), or have we found a bug of some kind?
>
>
>
> using mpich2-1.4.1p1 on windows7
>
> mpich2-1.5b2 on linux (fedora 17) and both show the same behaviour.
>
>
>
> many thanks
>
>
>
> JB
>
>
>
>
>
> --
>
> John Biddiscombe,                        email:biddisco @.at.@ cscs.ch
>
> http://www.cscs.ch/
>
> CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
>
> Via Trevano 131, 6900 Lugano, Switzerland   | Fax:  +41 (91) 610.82.82
>
>
>
>
>
>
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>



--
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute jhammond at alcf.anl.gov / (630) 252-5381 http://www.linkedin.com/in/jeffhammond
https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond
_______________________________________________
mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
To manage subscription options or unsubscribe:
https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss


More information about the mpich-discuss mailing list