Newsgroups: comp.parallel.mpi
From: salo@mrjones.engr.sgi.com (Eric Salo)
Subject: Re: Q: derived data types and isend
Organization: Silicon Graphics, Inc.  Mountain View, CA
Date: 3 Oct 1996 18:58:13 GMT
Message-ID: <5312c5$f0h@murrow.corp.sgi.com>

> I'm wondering how indexed derived data types effect performance

Any non-contiguous datatype will typically need to be "squashed" before
it can be sent out over a network to another machine. One of the motives
for providing user-defined datatypes in MPI-1 was the hope that MPI
implementations would be able to do this more efficiently than an
application could. So the "official" answer is that for best performance
you should not pack the data yourself.

On the other hand, to date only IBM has managed to actually do a good
job of it, by pipelining their packs with their transfers. The rest of
us essentially just do a malloc, then a pack, then a send.

(I do expect that I'll have my own pack-as-you-go code working in time
for our next release, though.)

Within a single machine the story is slightly different, since there
may not be any need to pack at all, depending on the system. So the
bottom line is that you should probably trust MPI to do the packing
for you.

Eric Salo         Silicon Graphics Inc.             "Do you know what the
(415)933-2998     2011 N. Shoreline Blvd, 8U-802     last Xon said, just
salo@sgi.com      Mountain View, CA   94043-1389     before he died?"

