Yes, Eugene fomulates my question in a clear way. I have indeed been successfully using NULL for all those arguments in MPI_Gatherv (for instance) where it is explicitly stated that the argument in question is ignored. So i have been wondering whether a buffer argument is also ignored when the bufcount is 0.
Jody On Mon, Feb 23, 2009 at 9:55 PM, Eugene Loh <eugene....@sun.com> wrote: > I think the question is about passing NULL as a buffer pointer. E.g., > > MPI_Send(NULL, 0, mytype,dst, tag,comm); > > vs > > MPI_Send(&dummy,0,mytype,dst,tag,comm); > > George Bosilca wrote: > >> The only restriction the MPI standard impose on the sendcounts and >> recvcounts arrays is that the values be non-negative, so zero is a legal >> value. >> >> I don't really understand your second question. Where do you want to use >> NULL ? In general NULL is not accepted in MPI as an argument for any >> function ... >> >> On Feb 23, 2009, at 02:55 , jody wrote: >> >>> 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? >> > > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users >