[MOAB-dev] r5282 - in MOAB/trunk: . itaps

tautges at mcs.anl.gov tautges at mcs.anl.gov
Fri Dec 23 12:56:36 CST 2011


Author: tautges
Date: 2011-12-23 12:56:36 -0600 (Fri, 23 Dec 2011)
New Revision: 5282

Added:
   MOAB/trunk/itaps/iBase_f.h.in
Modified:
   MOAB/trunk/configure.ac
Log:
Adding autoconf logic to set POINTER_SIZE to result of SIZEOF_VOID_P if
more proper setting isn't found in CPP logic in iBase_f.h.

Passes make check in serial and parallel.



Modified: MOAB/trunk/configure.ac
===================================================================
--- MOAB/trunk/configure.ac	2011-12-22 18:33:13 UTC (rev 5281)
+++ MOAB/trunk/configure.ac	2011-12-23 18:56:36 UTC (rev 5282)
@@ -117,6 +117,7 @@
 SIZEOF_MBENTITYHANDLE=0
 AC_CHECK_SIZEOF([void *])
 SIZEOF_VOID_P=$ac_cv_sizeof_void_p
+AC_SUBST(SIZEOF_VOID_P)
 AC_ARG_ENABLE([64bit-handles],
   [AC_HELP_STRING([--enable-64bit-handles],[Force EntityHandle to be 64 bits])],
   [AC_CHECK_TYPE([uint64_t],
@@ -1144,6 +1145,7 @@
                  test/io/Makefile
                  test/parallel/Makefile
                  test/oldinc/Makefile
+		 itaps/iBase_f.h
                  itaps/Makefile
                  itaps/imesh/Makefile
                  itaps/imesh/iMesh-Defs.inc

Added: MOAB/trunk/itaps/iBase_f.h.in
===================================================================
--- MOAB/trunk/itaps/iBase_f.h.in	                        (rev 0)
+++ MOAB/trunk/itaps/iBase_f.h.in	2011-12-23 18:56:36 UTC (rev 5282)
@@ -0,0 +1,142 @@
+#ifndef IBASE_F_H
+#define IBASE_F_H
+
+#ifdef POINTER_SIZE
+!  user-defined override
+#  define IBASE_HANDLE_T INTEGER*POINTER_SIZE
+#elif defined(__SIZEOF_SIZE_T__)
+!  gfortran
+#  define IBASE_HANDLE_T integer*__SIZEOF_SIZE_T__
+#elif defined(__GNUC__) && defined (_LANGUAGE_FORTRAN)
+!  gfortran 4.2 and earlier
+#  ifdef _LP64
+#    define IBASE_HANDLE_T integer*8
+#  else
+!    NOTE: not integer*4 (see meaning of _LP64 in GNU docs)
+#    define IBASE_HANDLE_T integer
+#  endif
+#elif defined(__INTEL_COMPILER)
+#  ifdef __X86_64
+#    define IBASE_HANDLE_T integer*8
+#  else
+#    define IBASE_HANDLE_T integer*4
+#  endif
+#elif defined(__XLCPP__) || defined(__bgp__) || defined(__bgq__)
+!  __XLCPP__ doesn't work for IBM.  AT least make things work for BGP and BGQ


More information about the moab-dev mailing list