[mpich-discuss] compare two MPI_Datatypes

Wei-keng Liao wkliao at ece.northwestern.edu
Tue Feb 28 14:33:53 CST 2012


How do I compare two MPI_Datatypes to see if they are equal?

If MPI_Datatype is intended to be an opaque data type, then
one should not make a direct comparison, such as "if (type1 == type2)".
I can see in MPICH,  MPI_Datatype is typedef-ed to int.
So for the primitive data types, such as MPI_FLOAT, this is fine.
For user defined types, this may not be right.

Wei-keng




More information about the mpich-discuss mailing list