[MPICH] non-blocking sending/receiving an array

William Gropp gropp at mcs.anl.gov
Wed May 16 08:16:21 CDT 2007


You can use the message tag to carry some additional information.  In  
addition, messages from the same source and with the same tag should  
be received in the order in which they are sent, so I'm not sure why  
you are receiving the size then the array in an unexpected order (if  
the messages with the same source and tag do not arrive in order,  
that's a bug in the MPI implementation, and we'd like an example code  
that would help us fix it).

One approach that you can use is to encode the length in the tag;  
this need only be a bound on the size, e.g., the number of kilowords  
in the array.  Then you can probe with MPI_ANY_TAG.

Bill

On May 16, 2007, at 2:43 AM, Manal Helal wrote:

> Hi
>
> I am trying to send an array, I send its size first, and then send the
> array itself, however, I am sending in a loop and receiving in a loop,
> so I end up receiving in different order, like I receive the array
> size, and then receive from the same sender the array of different
> size sent at another iteration, and I am using non-blocking
> communication,  and testing now for 3 processes, but could be more
> later, so, I can only specify the sender in the receive of the array,
> as the one I received the array size from, but I can't specify the
> size, it is giving me:
>
> rank 2 in job 4  localhost.localdomain_54476   caused collective abort
> of all ranks
>  exit status of rank 2: killed by signal 9
> 2:  MPI_Wait(140)..........................:
> MPI_Wait(request=0xb6b55198, status0xb6b5519c) failed
> 2:  MPIDI_CH3U_Post_data_receive_found(163): Message from rank 0 and
> tag 92 truncated; 224 bytes received but buffer size is 56
>
>
> is there a way to probe for a specific size, and receive only if this
> is the size, in the MPI_Iprobe, there is no specification for the
> count,
>
> any ideas will greatly help,
>
> Thank you very much, Kind Regards,
>
> Manal
>




More information about the mpich-discuss mailing list