[Mpi-forum] Clarification on MPI communicator semantics

Pavan Balaji balaji at mcs.anl.gov
Fri Oct 11 20:00:01 CDT 2013

It is valid to do such a comparison.  This is mentioned on page 12, lines 38-39.

"MPI procedures that operate on opaque objects are passed handle arguments to access these objects. In addition to their use by MPI calls for object access, handles can participate in assignments and comparisons."

  -- Pavan

On Oct 11, 2013, at 7:56 PM, Scott Pakin wrote:

> Is it valid or invalid to compare MPI communicators with "==" (in C)?
> I didn't see anything in the MPI 3.0 standard that addressed that
> question.  I know I can use MPI_Comm_compare() and check for
> MPI_IDENT, but "==" sure is a lot more convenient.  If the answer is
> that an "==" comparison of two MPI_Comm types isn't guaranteed to
> compile or to return correct results, then how should I compare a
> communicator to MPI_COMM_NULL, which the Argonne MPI page claims is
> not a valid argument to MPI_Comm_compare() (cf.
> http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Comm_compare.html)?
> Thanks,
> -- Scott
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum

Pavan Balaji

More information about the mpi-forum mailing list