[mpich-discuss] Is MPI_SUCCESS == 0 mandated by the standard?

Rhys Ulerich rhys.ulerich at gmail.com
Thu Jan 21 15:05:37 CST 2010


Hi all,

>From peeking at mpich's headers, I can see that MPI_SUCCESS is defined
to be zero.  Is this mandated by the specification?  Or is this just
the glaringly obvious value to choose for the C binding?

I ask because stylistically I'd love to write

int error = MPI_Something(...);
if (error) {
  // Handle error
}

instead of

int status = MPI_Something(...);
if (status != MPI_SUCCESS) {
   // Handle error
}

I have looked but have been unable to find a part of the specification
that discusses the specific value of MPI_SUCCESS for C bindings.

Thanks,
Rhys


More information about the mpich-discuss mailing list