Commit 96d84cbb authored by vijaysm's avatar vijaysm
Browse files

Several configuration changes to support XLF compilers on BG/Q

parent 4bfad303
......@@ -638,8 +638,8 @@ case "$cxx_compiler:$host_cpu" in
VisualAge:*)
FATHOM_CXX_32BIT=-q32
FATHOM_CXX_64BIT=-q64
FATHOM_CXX_SPECIAL="-qrtti=all"
AR="ar -X 32_64"
FATHOM_CXX_SPECIAL="$EXTRA_BG_FLAGS -qrtti=all -qminimaltoc -qpic=large -qmaxmem=-1"
AR="ar"
NM="nm -B -X 32_64"
;;
VisualAge8:*)
......@@ -791,15 +791,15 @@ case "$cc_compiler:$host_cpu" in
bgq)
FATHOM_CC_32BIT=-q32
FATHOM_CC_64BIT=-q64
FATHOM_CC_SPECIAL=-qarch=qp
FATHOM_CXX_SPECIAL="-qarch=qp -qpic=large -qmaxmem=-1"
FATHOM_CC_SPECIAL="$EXTRA_BG_FLAGS -qarch=qp -qpic=large -qmaxmem=-1 -qminimaltoc"
FATHOM_CXX_SPECIAL="$EXTRA_BG_FLAGS -qarch=qp -qpic=large -qmaxmem=-1 -qminimaltoc"
AR="ar"
NM="nm -B"
;;
*)
FATHOM_CC_32BIT=-q32
FATHOM_CC_64BIT=-q64
AR="ar -X 32_64"
AR="ar"
NM="nm -B -X 32_64"
;;
esac
......@@ -829,6 +829,9 @@ case "$cc_compiler:$host_cpu" in
;;
esac
AC_MSG_RESULT([$cc_compiler:$host_cpu])
FATHOM_FC_SPECIAL="$FATHOM_CC_SPECIAL"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
]) # end FATHOM_CC_FLAGS
......
......@@ -34,6 +34,7 @@ AC_SUBST(ENABLE_FORTRAN)
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --enable-fortran=$ENABLE_FORTRAN"
EXTRA_GNU_FLAGS='-Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -Wno-variadic-macros'
EXTRA_INTEL_FLAGS='-Wall'
EXTRA_BG_FLAGS=''
# Find out the appropriate compiler based on user options
FATHOM_CHECK_COMPILERS([yes],[yes],[$ENABLE_FORTRAN])
......@@ -62,12 +63,18 @@ LT_INIT([dlopen])
AC_C_BIGENDIAN
MB_CPPFLAGS=""
# Check if platform is BlueGene
AC_MSG_CHECKING([if platform is IBM BlueGene])
FATHOM_TRY_COMPILER_DEFINE([__bg__],
[AM_CPPFLAGS="$AM_CPPFLAGS -DBLUEGENE"
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
[MB_CPPFLAGS="$MB_CPPFLAGS -DBLUEGENE"
BGDEF="-WF,"
MB_BLUEGENE_CONF=yes
],
[MB_BLUEGENE_CONF=no
BGDEF=""])
AC_MSG_RESULT([$MB_BLUEGENE_CONF])
AC_CHECK_PROG([ZCAT],[gunzip],[gunzip -c],[])
AC_CHECK_PROG([ZCAT],[gzip],[gzip -cd],[])
......@@ -80,6 +87,7 @@ AM_CONDITIONAL([HAVE_ZCAT],[test "x" = "x$ZCAT"])
FATHOM_TEMPLATE_SPECIALIZATION
FATHOM_TEMPLATE_FUNC_SPECIALIZATION
MB_CPPFLAGS="$MB_CPPFLAGS $TEMPLATE_SPECIALIZATION $TEMPLATE_FUNC_SPECIALIZATION"
FATHOM_CHECK_CXX_WORKS([], [AC_MSG_ERROR([Cannot build without C++ compiler])])
......@@ -106,6 +114,7 @@ AC_CHECK_FUNC([vsnprintf],
FATHOM_VECTOR_TEMPLATE_INSERT
FATHOM_OLD_STD_COUNT
MB_CPPFLAGS="$MB_CPPFLAGS $NO_VECTOR_TEMPLATE_INSERT $OLD_STD_COUNT"
################################################################################
# HANDLE SIZE
......@@ -161,7 +170,7 @@ fi
# in serial_open_file and other places will fail on 32-bit systems if the file
# is larger that 2GB.
if (test "x$enable_32bit_handles" != "x"); then
AM_CPPFLAGS="$AM_CPPFLAGS -D_FILE_OFFSET_BITS=64"
MB_CPPFLAGS="$MB_CPPFLAGS -D_FILE_OFFSET_BITS=64"
# AC_DEFINE_UNQUOTED([FILE_OFFSET_BITS], [64], [Support for handling files larger than 2GB on 32-bit machines])
fi
......@@ -373,7 +382,7 @@ if test "xyes" = "x$enablempi"; then
FATHOM_CHECK_MPE
AC_SUBST([WITH_MPE])
AC_SUBST([MPE_LIBS])
test "xyes" != "x$WITH_MPE" || AM_CPPFLAGS="$AM_CPPFLAGS -DUSE_MPE"
test "xyes" != "x$WITH_MPE" || MB_CPPFLAGS="$MB_CPPFLAGS -DUSE_MPE"
fi
################################################################################
......@@ -388,7 +397,7 @@ else
fi
AM_CONDITIONAL(HAVE_HDF5, [test "xno" != "x$HAVE_HDF5"])
AC_SUBST(HAVE_HDF5)
AM_CPPFLAGS="$HDF5_CPPFLAGS $AM_CPPFLAGS"
MB_CPPFLAGS="$HDF5_CPPFLAGS $MB_CPPFLAGS"
EXPORT_LDFLAGS="$EXPORT_LDFLAGS $HDF5_LDFLAGS"
AC_SUBST(HDF5_LIBS)
......@@ -433,7 +442,7 @@ if test "xno" != "x$HAVE_CCMIO"; then
AC_DEFINE([HAVE_CCMIO],[1],["Define if configured with CCM I/O support."])
fi
AM_CONDITIONAL(HAVE_CCMIO, [test "xno" != "x$HAVE_CCMIO"])
AM_CPPFLAGS="$CCMIO_CPPFLAGS $AM_CPPFLAGS"
MB_CPPFLAGS="$CCMIO_CPPFLAGS $MB_CPPFLAGS"
EXPORT_LDFLAGS="$CCMIO_LDFLAGS $EXPORT_LDFLAGS"
AC_SUBST(CCMIO_LIBS)
......@@ -450,7 +459,7 @@ if test "xno" != "x$HAVE_DAMSEL"; then
AC_DEFINE([HAVE_DAMSEL],[1],["Define if configured with Damsel I/O format support."])
fi
AM_CONDITIONAL(HAVE_DAMSEL, [test "xno" != "x$HAVE_DAMSEL"])
AM_CPPFLAGS="$DAMSEL_CPPFLAGS $AM_CPPFLAGS"
MB_CPPFLAGS="$DAMSEL_CPPFLAGS $MB_CPPFLAGS"
EXPORT_LDFLAGS="$DAMSEL_LDFLAGS $EXPORT_LDFLAGS"
AC_SUBST(DAMSEL_LIBS)
......@@ -465,7 +474,7 @@ if test "xyes" = "x$HAVE_PNETCDF"; then
AC_DEFINE([HAVE_PNETCDF],[1],["Define if configured with Parallel NetCDF support."])
fi
AM_CONDITIONAL(HAVE_PNETCDF, [test "xyes" = "x$HAVE_PNETCDF"])
AM_CPPFLAGS="$PNETCDF_CPPFLAGS $AM_CPPFLAGS"
MB_CPPFLAGS="$PNETCDF_CPPFLAGS $MB_CPPFLAGS"
EXPORT_LDFLAGS="$PNETCDF_LDFLAGS $EXPORT_LDFLAGS"
AC_SUBST(PNETCDF_LIBS)
......@@ -477,7 +486,7 @@ if test "xyes" = "x$HAVE_NETCDF"; then
AC_DEFINE([HAVE_NETCDF],[1],["Define if configured with NetCDF support."])
fi
AM_CONDITIONAL(HAVE_NETCDF, [test "xno" != "x$HAVE_NETCDF"])
AM_CPPFLAGS="$NETCDF_CPPFLAGS $AM_CPPFLAGS"
MB_CPPFLAGS="$NETCDF_CPPFLAGS $MB_CPPFLAGS"
EXPORT_LDFLAGS="$NETCDF_LDFLAGS $EXPORT_LDFLAGS"
AC_SUBST(NETCDF_LIBS)
AC_SUBST(HAVE_NETCDF)
......@@ -495,7 +504,7 @@ if test "xno" != "x$HAVE_CGNS"; then
AC_DEFINE([HAVE_CGNS],[1],["Define if configured with CGNS support."])
fi
AM_CONDITIONAL(HAVE_CGNS, [test "xno" != "x$HAVE_CGNS"])
AM_CPPFLAGS="$CGNS_CPPFLAGS $AM_CPPFLAGS"
MB_CPPFLAGS="$CGNS_CPPFLAGS $MB_CPPFLAGS"
EXPORT_LDFLAGS="$CGNS_LDFLAGS $EXPORT_LDFLAGS"
AC_SUBST(CGNS_LIBS)
......@@ -1298,8 +1307,19 @@ if test "x" = "x$examplesdir"; then
AC_SUBST(examplesdir)
fi
AM_CPPFLAGS=""
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([MB_CPPFLAGS])
AM_CFLAGS="$MB_CPPFLAGS"
AM_CXXFLAGS="$MB_CPPFLAGS"
if (test "$MB_BLUEGENE_CONF" != "no"); then
AM_FCFLAGS=`echo $MB_CPPFLAGS | sed -e "s/-D/-WF,-D/g"`
AM_FFLAGS=`echo $MB_CPPFLAGS | sed -e "s/-D/-WF,-D/g"`
else
AM_FCFLAGS="$MB_CPPFLAGS"
AM_FFLAGS="$MB_CPPFLAGS"
fi
AC_SUBST([FCPPFLAGS])
AM_LDFLAGS="$AM_LDFLAGS $EXPORT_LTFLAGS $EXPORT_LDFLAGS"
AC_SUBST([AM_LDFLAGS])
AC_SUBST([EXPORT_LTFLAGS])
......@@ -1308,6 +1328,7 @@ AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_FCFLAGS])
AC_SUBST([AM_FFLAGS])
AC_SUBST([BGDEF])
AC_ARG_VAR([FC], [FORTRAN compiler command])
# AC_CONFIG_HEADERS([config.h])
......
......@@ -21,10 +21,11 @@
# else
# define IBASE_HANDLE_T integer*4
# endif
#elif defined(__XLCPP__) || defined(__bgp__) || defined(__bgq__)
#elif defined(__XLCPP__) || defined(__bg__) || defined(__bgp__) || defined(__bgq__)
! __XLCPP__ doesn't work for IBM. AT least make things work for BGP and BGQ
USE, INTRINSIC :: ISO_C_BINDING
# define IBASE_HANDLE_T C_PTR
! USE, INTRINSIC :: ISO_C_BINDING
!# define IBASE_HANDLE_T TYPE(C_PTR)
# define IBASE_HANDLE_T integer*8
#else
# WARNING "Unknown compiler; using SIZEOF_VOID_P."
# define IBASE_HANDLE_T integer*@SIZEOF_VOID_P@
......
......@@ -2,7 +2,7 @@ BUILT_SOURCES = iMesh_protos.h iMeshP_protos.h iMesh_extensions_protos.h iMeshP_
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
AM_CPPFLAGS = -DSRCDIR=$(srcdir) \
-DMESHDIR=$(MESHDIR) \
-I$(srcdir)/.. \
-I$(top_srcdir)/src \
......
......@@ -12,13 +12,13 @@ MOAB_INCLUDES = -I@abs_srcdir@/src \
MOAB_INCLUDES += @ZOLTAN_INC_FLAGS@
MOAB_CPPFLAGS = @CPPFLAGS@ @AM_CPPFLAGS@
MOAB_CXXFLAGS = @CXXFLAGS@ @AM_CXXFLAGS@
MOAB_CFLAGS = @CFLAGS@ @AM_CFLAGS@
MOAB_CPPFLAGS = @CPPFLAGS@
MOAB_CXXFLAGS = @CXXFLAGS@ @AM_CPPFLAGS@ @AM_CXXFLAGS@
MOAB_CFLAGS = @CFLAGS@ @AM_CPPFLAGS@ @AM_CFLAGS@
MOAB_FFLAGS = @FFLAGS@
MOAB_FCFLAGS = @FCFLAGS@
MOAB_LDFLAGS = @EXPORT_LDFLAGS@ @CXX_LDFLAGS@ @LDFLAGS@
BGDEF = @BGDEF@
MOAB_LIBS_LINK = ${MOAB_LDFLAGS} -L${MOAB_LIBDIR} -lMOAB @PNETCDF_LIBS@ @NETCDF_LIBS@ @CGNS_LIBS@ @HDF5_LIBS@ @CCMIO_LIBS@ @CGM_LIBS@ @ZOLTAN_LIBS@ @PARMETIS_LIBS@ @METIS_LIBS@ @LIBS@
DAGMC_LIBS_LINK = ${MOAB_LDFLAGS} -L${MOAB_LIBDIR} @DAGMC_LIBS@ -lMOAB @PNETCDF_LIBS@ @NETCDF_LIBS@ @CGNS_LIBS@ @HDF5_LIBS@ @CCMIO_LIBS@ @CGM_LIBS@ @ZOLTAN_LIBS@ @PARMETIS_LIBS@ @METIS_LIBS@ @LIBS@
......
......@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
noinst_LTLIBRARIES = libLocalDiscretization.la
# Some variables
AM_CPPFLAGS += -DIS_BUILDING_MB -DSRCDIR=$(srcdir) \
AM_CPPFLAGS = -DIS_BUILDING_MB -DSRCDIR=$(srcdir) \
-I$(srcdir)/.. -I.. -I$(srcdir)/../moab -I$(srcdir)/moab
# The directory in which to install headers
......
......@@ -3,6 +3,7 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
# Things to build
lib_LTLIBRARIES = libMOAB.la
AM_CPPFLAGS =
# Subdirectories to build
SUBDIRS =
......
......@@ -2,8 +2,9 @@
AUTOMAKE_OPTIONS = foreign
# Things to build
noinst_LTLIBRARIES = libRefineMesh.la
noinst_LTLIBRARIES = libRefineMesh.la
AM_CPPFLAGS =
# Some variables
AM_CPPFLAGS += -DIS_BUILDING_MB -DSRCDIR=$(srcdir) -DLOCDIR=src/RefineMesh/ \
-I$(srcdir)/.. -I.. -I$(srcdir)/../moab -I$(srcdir)/moab \
......
......@@ -9,7 +9,7 @@ endif
noinst_LTLIBRARIES = libmoabio.la
libmoabio_la_LIBADD = $(NETCDF_LIBS) $(PNETCDF_LIBS) $(CGNS_LIBS) $(HDF5_LIBS)
AM_CPPFLAGS += -DIS_BUILDING_MB \
AM_CPPFLAGS = -DIS_BUILDING_MB \
-DLOCDIR=src/io/ \
-I.. -I$(srcdir)/.. -I$(srcdir)/../moab -I$(srcdir)/../parallel
......
......@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
noinst_LTLIBRARIES = libMOABpar.la
# Some variables
AM_CPPFLAGS += -DIS_BUILDING_MB -DSRCDIR=$(srcdir) -DLOCDIR=src/parallel/ \
AM_CPPFLAGS = -DIS_BUILDING_MB -DSRCDIR=$(srcdir) -DLOCDIR=src/parallel/ \
-I$(srcdir)/.. -I.. -I$(srcdir)/../io \
-I$(srcdir)/../io/mhdf/include
......
......@@ -33,6 +33,6 @@ nobase_libmoabverdict_la_include_HEADERS = \
moab/VerdictWrapper.hpp
# Boilerplate stuff that doesn't depend on what the targets are
AM_CPPFLAGS += -DIS_BUILDING_MB -DSRCDIR=$(srcdir) \
-I$(srcdir)/.. -I..
AM_CPPFLAGS = -DIS_BUILDING_MB -DSRCDIR=$(srcdir) \
-I$(srcdir)/.. -I.. -I$(srcdir)/../io \
-I$(srcdir)/../io/mhdf/include
......@@ -19,7 +19,7 @@ LDADD = $(top_builddir)/src/libMOAB.la
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -DIS_BUILDING_MB \
AM_CPPFLAGS = -DIS_BUILDING_MB \
-DSRCDIR=$(srcdir) \
-DMESHDIR=$(MESHDIR) \
-I$(top_builddir)/src \
......
......@@ -2,8 +2,8 @@ LDADD = $(top_builddir)/src/libMOAB.la $(top_builddir)/tools/dagmc/DagMC.lo
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
-DMESHDIR=$(MESHDIR) \
AM_CPPFLAGS = $(BGDEF)-DSRCDIR=$(srcdir) \
$(BGDEF)-DMESHDIR=$(MESHDIR) \
-I$(builddir) -I.. -I$(srcdir)/.. \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
......
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src -DMESHDIR=$(MESHDIR)
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src $(BGDEF)-DMESHDIR=$(MESHDIR)
check_PROGRAMS = dual_test
dual_test_SOURCES = dual_test.cpp
LDADD = $(top_builddir)/src/libMOAB.la
......
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
-DMESHDIR=$(MESHDIR) \
AM_CPPFLAGS = $(BGDEF)-DSRCDIR=$(srcdir) \
$(BGDEF)-DMESHDIR=$(MESHDIR) \
-I.. -I$(srcdir)/.. \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/io \
......
......@@ -5,8 +5,8 @@ LDADD = $(top_builddir)/src/libMOAB.la
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
-DMESHDIR=$(MESHDIR) \
AM_CPPFLAGS = $(BGDEF)-DSRCDIR=$(srcdir) \
$(BGDEF)-DMESHDIR=$(MESHDIR) \
-I$(builddir) -I.. -I$(srcdir)/.. \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
......
......@@ -3,8 +3,8 @@ TESTS = obb_test
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
-DMESHDIR=$(MESHDIR) \
AM_CPPFLAGS = $(BGDEF)-DSRCDIR=$(srcdir) \
$(BGDEF)-DMESHDIR=$(MESHDIR) \
-I$(top_srcdir)/src -I$(top_builddir)/src -I.. \
-I$(top_srcdir)/src/parallel -I$(top_builddir)/src/parallel
......
......@@ -5,9 +5,9 @@ LDADD = $(top_builddir)/src/libMOAB.la
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -DIS_BUILDING_MB \
-DSRCDIR=$(srcdir) \
-DMESHDIR=$(MESHDIR) \
AM_CPPFLAGS = $(BGDEF)-DIS_BUILDING_MB \
$(BGDEF)-DSRCDIR=$(srcdir) \
$(BGDEF)-DMESHDIR=$(MESHDIR) \
-I. \
-I.. -I$(srcdir)/.. \
-I$(top_builddir)/src \
......
SUBDIRS = point_location
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -I$(top_srcdir)/src \
AM_CPPFLAGS = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/io/mhdf/include \
-I$(builddir) -I.. -I$(srcdir)/.. \
-I$(top_builddir)/src \
-DMESHDIR=$(MESHDIR) \
-DIS_BUILDING_MB
$(BGDEF)-DMESHDIR=$(MESHDIR) \
$(BGDEF)-DIS_BUILDING_MB
LDADD = $(top_builddir)/src/libMOAB.la
......
MESHDIR = $(abs_top_srcdir)/MeshFiles/unittest
AM_CPPFLAGS += -I$(top_srcdir)/src \
AM_CPPFLAGS = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/io/mhdf/include \
-I$(top_builddir)/ \
-I$(top_srcdir)/src/LocalDiscretization/ \
-I$(top_srcdir)/tools/mbcoupler \
-I$(top_srcdir)/src/moab/point_locator/lotte \
-I$(top_srcdir)/src/LocalDiscretization/moab/ \
-DMESHDIR=$(MESHDIR) \
-DIS_BUILDING_MB
$(BGDEF)-DMESHDIR=$(MESHDIR) \
$(BGDEF)-DIS_BUILDING_MB
# might need parallel here because of timer
if PARALLEL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment