[Mpi-forum] Anomolies for MPI_UNWEIGHTED

Richard Treumann treumann at us.ibm.com
Mon May 10 09:42:48 CDT 2010

1) MPI 2.2 suggests that MPI_UNWEIGHTED is probably NULL in C. It also says
that all participants must either provide weighs for edges they define or
must use MPI_UNWEIGHTED. When some task has no edges to specify, the length
of its weights arrays are 0.  The natural thing to do is to pass NULL for
the weights array address if its length is 0.  How would the implementation
know if the user intended to pass MPI_UNWEIGHTED vs ordinary NULL?

I suppose an allreduce that confirms all participants passed NULL (i.e.
guess that NULL means MPI_UNWEIGHTED and test that guess) would work. If
any process passed non-NULL then the local NULL is deduced to mean an empty
array rather than MPI_UNWEIGHTED. Yuch.  That requires treating the address
of an array as significant, even if the user said it is empty .  I.E. an
empty array with a garbage address is OK if MPI_UNWEIGTHED was not intended
but an error if it was (because the address != MPI_UNWEIGHTED)

--- I think the suggestion that MPI_UNWEIGTHED is probably NULL is

2) We say that MPI_UNWEIGHTED is the same as saying all mentioned edges
have "(effectively no) weight".  I would assume an edge that is not
mentioned also has "(effectively no) weight" so why would I expect any edge
that is mentioned as having "no weight" to be treated differently than
another that has "no weight" but was not mentioned?

-- We should probably say "All specified edges have the same  positive
weight and any edge not specified is assumed to have no weight.".


Dick Treumann  -  MPI Team
IBM Systems & Technology Group
Dept X2ZA / MS P963 -- 2455 South Road -- Poughkeepsie, NY 12601
Tele (845) 433-7846         Fax (845) 433-8363
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-forum/attachments/20100510/d56f1578/attachment-0001.html>

More information about the mpi-forum mailing list