[mpich-discuss] MPI_Irecv does block

David Gingold david.gingold at sicortex.com
Tue Aug 12 09:11:12 CDT 2008


On Aug 11, 2008, at 10:22 PM, Robert Kubrick wrote:

> I want to send a number of elements through MPI_Send. However the  
> receiving process does not know the maximum number of elements in  
> the array (it might be very large). The code will look something like:
>
> MASTER:
> char buf[500];
> ...
> MPI_Send(&buf, 500, SomeDerivedType, 1, ...);
>
> ==============
>
> WORKER:
> char buf[100];
> const int Master = 0;
> MPI_Irecv(&buf, 100, SomeDerivedType, Master, ...);

Robert, bear in mind that your example exceeds the bounds of the MPI  
standard.  MPI is required to support calling Recv with a buffer  
larger than needed, but not with one smaller than needed.

I mention this not (only) to be pedantic.  Some MPI implementations  
do not support what you are doing.

-dg

--
David Gingold
Principal Software Engineer
SiCortex
Three Clock Tower Place, Suite 210
Maynard MA 01754
(978) 897-0214 x224



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


More information about the mpich-discuss mailing list