[mpich-discuss] MPI_Irecv does block

Gholamreza Sobhaninejad grsobhani at gmail.com
Wed Aug 13 05:37:16 CDT 2008


Hi,

You can use probing techniques to determine length of the message coming
from master. It works well. Also to send large message you need to uses
non-blocking techniques which the buffer length can be determined in
advanced for MPI.(This buffer length is different from the array length).
Sending an array with 10000 element (Char array) is quiet possible based on
my experience.

Good luck,

Reza

On Tue, Aug 12, 2008 at 11:11 PM, David Gingold
<david.gingold at sicortex.com>wrote:

>
> 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
>
>
>
>


-- 
Gholamreza Sobhaninejad(Reza)
PhD candidate, University of Tokyo
Earthquake Research Institute
Tel: 090-9807-2477
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20080813/1fea7c86/attachment.htm>


More information about the mpich-discuss mailing list