Newsgroups: comp.parallel.mpi
From: Richard Barrett <rbarrett@lanl.gov>
Subject: Re: Q: Buffer too small??
Organization: Los Alamos National Laboratory
Date: Tue, 29 Oct 1996 12:21:19 -0600
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <32764B1F.191@lanl.gov>

I had the same experience. But just as  some compilers will let
some errors through (and your code will work anyway), others
complain and bail. The buffer in question is _your_ buffer, ie
the array you are trying to unload the message into. But not in
the way you (or at least I) thought the message was trying to tell me.
In my case anyway, the message I sent was (say) 8 MPI_INTs, while I
was receiving it as 4 MPI_INTs. Won't cause a seg fault (which is what
I thought "buffer too small" was trying to tell me), but you simply
aren't unloading the entire message. Some implementations say this is
ok (Sun, SGI, T3D), but the IBM complains. Although sometimes you may
actually _want_ to do this (eg some unexpected message handling),
if done repeatedly, I guess memory will be eaten up (?).

In my case I was unnecessarily sending 8 ints while my program only
needed
the first 4 (which is all I was unloading), so it ran correctly.
I'm not sure I would say either is wrong, but in my case the IBM found a
bug in my code...Maybe an implementor or three will comment on this.

Yet another reminder that MPI is an interface definition, not an
implementation. And another reminder that code ain't portable until
you port it...(huh?)

Richard
 

SP2 wrote:
> 
> hi,
>  i have a MPI program who runs quit good on Sunworkstations and SGIs. Now  I am
> trying to run it on SP2. but it showed me the message:
> ==========================================================
> ERROR: 0032-117 Buffer too small  (0) in MPI_Recv, task 2
> ERROR: 0032-117 Buffer too small  (0) in MPI_Recv, task 1
> ==========================================================
> I use a standard Send and Receive operation. I don't know what is the Buffer here.
> May it be the System buffer or what else? (i use Fotran)
> 
> If anybody know how can I solve the problem, please help!
> 
> thanks
> 
> lei

