Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] MPI_Gatherv and 0 size?
From: jody (jody.xha_at_[hidden])
Date: 2009-02-23 02:55:22

I have an application in which various processes create different
amounts of data (including no data at all).
I have found that MPI_Scatterv and MPI_Gatherv do work with arrays
sendcounts or receivecounts containing zeros.

Since i didn't find the case of 0 sizes in the descriptions
of these functions in the MPI reference, i wondered whether
the use of zeroes is legal or if i was simply lucky that it worked.

An other point: currently i use 1-sized buffers in the
case of a 0-sized data transfer.
Now if 0-sized data transfer is legal, would it be ok to
pass NULL for the buffer?

Thank You