Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] scatterv displacement unit
From: Ryan S. Davis (rsdavis_at_[hidden])
Date: 2012-07-06 17:27:35


Hi all,

I am trying to scatter data from the master process to the others using scatterv and my own datatype that maps out the blocks of data in memory.

The problem is that I dont know what unit size the function (scatterv) is using to measure displacements in. I assume that it is using the extent of the user-defined datatype, but I need
to specify the displacements in bytes.

For example, if I specify a displacement of 2 from the sendbuffer, does this mean 2 bytes
or 2*MPI_Type_size() or 2*MPI_Type_extent()? The man page isn't very clear on this.

I know that there is function MPI_Type_hindexed, that accepts displacements measured is bytes
when creating new datatypes.
Is there something similar for scatterv/gatherv?

Thanks.