[mpich2-commits] r4168 - mpich2/trunk/src/mpi/coll

goodell at mcs.anl.gov goodell at mcs.anl.gov
Sun Mar 22 22:57:06 CDT 2009


Author: goodell
Date: 2009-03-22 22:57:06 -0500 (Sun, 22 Mar 2009)
New Revision: 4168

Modified:
   mpich2/trunk/src/mpi/coll/oputil.h
Log:
Fix for ticket #485, hopefully the last one.

MPIR_CXX_*COMPLEX_VALUE macros are defined whenever --enable-cxx is passed to
configure, whether or not they are equal to MPI_DATATYPE_NULL.  This caused some
problems in the switch/case statements if the C++ complex datatypes were not
supported.  In particular this was a problem with the Intel C++ compiler on the
breadboard cluster nightly tests.

No reviewer.

Modified: mpich2/trunk/src/mpi/coll/oputil.h
===================================================================
--- mpich2/trunk/src/mpi/coll/oputil.h	2009-03-23 03:50:14 UTC (rev 4167)
+++ mpich2/trunk/src/mpi/coll/oputil.h	2009-03-23 03:57:06 UTC (rev 4168)
@@ -128,11 +128,12 @@
 #endif
 
 /* C++ complex types */
-#if defined(MPIR_CXX_COMPLEX_VALUE)
+#if defined(HAVE_CXX_COMPLEX)
 #  undef MPIR_OP_TYPE_MACRO_HAVE_CXX_COMPLEX
 #  define MPIR_OP_TYPE_MACRO_HAVE_CXX_COMPLEX(mpi_type_,c_type_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_)
 #endif
-#if defined(MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE)
+/* also test against MPI_DATATYPE_NULL for extra safety, 0x0c000000 is the uncasted value. */
+#if defined(HAVE_CXX_COMPLEX) && (MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE != 0x0c000000)
 #  undef MPIR_OP_TYPE_MACRO_HAVE_CXX_LONG_DOUBLE_COMPLEX
 #  define MPIR_OP_TYPE_MACRO_HAVE_CXX_LONG_DOUBLE_COMPLEX(mpi_type_,c_type_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_)
 #endif



More information about the mpich2-commits mailing list