On Fri, 14 Mar 2008, Manoj Vaghela wrote:
> When a derived datatype is created (let say, using
Vector), at what point
> does it buffer memory? I mean, after committing a
variable, how does it
> store the buffer the memory reserved by that variable?
I think you migt be a bit confused about MPI datatypes.
Creating and
committing a datatype doesn't have anything to do with
buffering for
actually moving data -- it's only creating a description of
the data you
want to move. There is obviously some storage to hold the
description of
the data layout, but when that is allocated / released is an
internal
detail of the MPI (and is different from MPI to MPI).
> As in Pack/Unpack, a buffer of required size should
be allocated, and
> after unpacking data, buffer is deallocated. How does
the same thing work in
> Vector? When is the memory freed? How does
MPI_Type_free work?
> (MPI_Type_free marks the variable for deallocation).
Again, derived datatypes aren't like pack/unpack -- you are
only creating
/ destroying the *description* of the data loayout when you
create / free
an MPI type handle. The memory required to buffer the
actual data (if
there is any at all) is allocated / released as part of the
communication
process. It's possible that there will never be such a
buffer, as the
payload will just be compied into network bounce buffers
directly --
again, this is an MPI implementation detail, and not
something the user
has to worry about.
Hope this helps,
Brian
--
Brian Barrett
LAM/MPI Developer
Make today a LAM/MPI day!
_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
|