[mpich-commits] r10802 - mpich2/trunk/test/mpi/datatype

gropp at mcs.anl.gov gropp at mcs.anl.gov
Fri Dec 21 10:06:23 CST 2012


Author: gropp
Date: 2012-12-21 10:06:23 -0600 (Fri, 21 Dec 2012)
New Revision: 10802

Modified:
   mpich2/trunk/test/mpi/datatype/indexed-misc.c
Log:
Add necessary checks for long long support

Modified: mpich2/trunk/test/mpi/datatype/indexed-misc.c
===================================================================
--- mpich2/trunk/test/mpi/datatype/indexed-misc.c	2012-12-21 02:18:56 UTC (rev 10801)
+++ mpich2/trunk/test/mpi/datatype/indexed-misc.c	2012-12-21 16:06:23 UTC (rev 10802)
@@ -427,12 +427,16 @@
     len[2] = 0;
     /* use *_MAX vars to improve our chances of hitting any pointer-casting
      * bugs in a big way (segfaults, etc.) */
+    /* FIXME: This should also look at long, or use a different approach */
+#if defined(HAVE_LONG_LONG) && defined(LLONG_MAX)
     if (sizeof(MPI_Aint) == sizeof(long long)) {
         adisp[0] = (MPI_Aint)LLONG_MAX;
         adisp[1] = 2*sizeof(int);
         adisp[2] = (MPI_Aint)LLONG_MAX;
     }
-    else {
+    else 
+#endif
+    {
         adisp[0] = (MPI_Aint)INT_MAX;
         adisp[1] = 2*sizeof(int);
         adisp[2] = (MPI_Aint)INT_MAX;
@@ -467,6 +471,7 @@
     }
     free(buf);
 
+
     /* -------------------------------------------------------------------- */
     /* A more rigorous test of the hindexed type.  Use a hard-to-optimize struct
      * type to force a more complicated datatype processing path



More information about the commits mailing list