Commit 5fea31a5 authored by Rajeev Jain's avatar Rajeev Jain

o Resolve merge conflicts

Merge branch 'iulian07/clang_osx_warnings' of https://bitbucket.org/fathomteam/moab into iulian07/clang_osx_warnings
parents ff472619 18862019
...@@ -122,15 +122,13 @@ if test "xno" != "x$enablempi"; then ...@@ -122,15 +122,13 @@ if test "xno" != "x$enablempi"; then
F77_LIST="mpixlf77 mpif77" F77_LIST="mpixlf77 mpif77"
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-mpi=\"${WITH_MPI}\"" DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-mpi=\"${WITH_MPI}\""
else
CC_LIST="$CC gcc icc clang"
CXX_LIST="$CXX g++ icpc clang++"
FC_LIST="$FC gfortran ifort g77 f77 nag xlf"
F77_LIST="$F77 $FC_LIST"
fi fi
CC_LIST="$CC $CC_LIST gcc icc clang"
CXX_LIST="$CXX $CXX_LIST g++ icpc clang++"
FC_LIST="$FC $FC_LIST gfortran ifort pgf90 nag xlf"
F77_LIST="$F77 $F77_LIST $FC gfortran ifort pgf77 nag xlf g77 f77"
COMPILERPATHS="" COMPILERPATHS=""
if test "xno" != "x$enablempi"; then if test "xno" != "x$enablempi"; then
COMPILERPATHS="${WITH_MPI}/bin" COMPILERPATHS="${WITH_MPI}/bin"
...@@ -152,10 +150,10 @@ AC_PROG_CXXCPP ...@@ -152,10 +150,10 @@ AC_PROG_CXXCPP
# Fortran support # Fortran support
if (test "x$CHECK_FC" != "xno"); then if (test "x$CHECK_FC" != "xno"); then
FATHOM_SET_MPI_COMPILER([FC], [$FC_LIST],[$COMPILERPATHS])
FATHOM_SET_MPI_COMPILER([F77],[$F77_LIST],[$COMPILERPATHS]) FATHOM_SET_MPI_COMPILER([F77],[$F77_LIST],[$COMPILERPATHS])
AC_PROG_FC
AC_PROG_F77 AC_PROG_F77
FATHOM_SET_MPI_COMPILER([FC], [$FC_LIST],[$COMPILERPATHS])
AC_PROG_FC
fi fi
]) # FATHOM_CHECK_COMPILERS ]) # FATHOM_CHECK_COMPILERS
...@@ -189,16 +187,20 @@ AC_ARG_ENABLE( optimize, AS_HELP_STRING([--enable-optimize],[Compile optimized ( ...@@ -189,16 +187,20 @@ AC_ARG_ENABLE( optimize, AS_HELP_STRING([--enable-optimize],[Compile optimized (
[enable_optimize=""; enable_cxx_optimize="no"; enable_cc_optimize="no"; enable_fc_optimize="no"; ] [enable_optimize=""; enable_cxx_optimize="no"; enable_cc_optimize="no"; enable_fc_optimize="no"; ]
) )
EXTRA_PGI_ONLY_FCFLAGS="-Mfree"
if (test "x$enable_debug" != "xno"); then # debug flags if (test "x$enable_debug" != "xno"); then # debug flags
# GNU # GNU
EXTRA_GNU_CXXFLAGS="-Wall -Wno-long-long -pipe -pedantic -Wshadow -Wunused-parameter -Wpointer-arith -Wformat -Wformat-security -Wextra -Wno-variadic-macros -Wno-unknown-pragmas" EXTRA_GNU_CXXFLAGS="-Wall -Wno-long-long -pipe -pedantic -Wshadow -Wunused-parameter -Wpointer-arith -Wformat -Wformat-security -Wextra -Wno-variadic-macros -Wno-unknown-pragmas"
EXTRA_GNU_FCFLAGS="-pipe -pedantic -ffree-line-length-0" EXTRA_GNU_FCFLAGS="-pipe -pedantic -ffree-line-length-0"
# CLANG
EXTRA_CLANG_CXXFLAGS="$EXTRA_GNU_CXXFLAGS"
EXTRA_CLANG_FCFLAGS="$EXTRA_GNU_FCFLAGS"
# Intel # Intel
EXTRA_INTEL_CXXFLAGS="-pipe -C" EXTRA_INTEL_CXXFLAGS="-pipe -C"
EXTRA_INTEL_FCFLAGS="-C" EXTRA_INTEL_FCFLAGS="-C"
# PGI # PGI
EXTRA_PGI_CXXFLAGS="-traceback -Mfree -C" EXTRA_PGI_CXXFLAGS="-traceback --diag_suppress 236 --diag_suppress=unrecognized_gcc_pragma -C"
EXTRA_PGI_FCFLAGS="-traceback -Mfree -C -freeform -extend-source" EXTRA_PGI_FCFLAGS="-traceback -Mbounds -Ktrap=inv,divz,ovf"
# XLC # XLC
EXTRA_BG_CXXFLAGS="-qarch=qp -qpic=large -qdebug=except" EXTRA_BG_CXXFLAGS="-qarch=qp -qpic=large -qdebug=except"
EXTRA_BG_FCFLAGS="-qarch=qp -qpic=large -qdebug=except" EXTRA_BG_FCFLAGS="-qarch=qp -qpic=large -qdebug=except"
...@@ -206,14 +208,17 @@ fi ...@@ -206,14 +208,17 @@ fi
if (test "x$enable_cxx_optimize" != "xno"); then # optimization flags if (test "x$enable_cxx_optimize" != "xno"); then # optimization flags
#GNU #GNU
EXTRA_GNU_CXXFLAGS="$EXTRA_GNU_CXXFLAGS -fprefetch-loop-arrays -finline-functions" EXTRA_GNU_CXXFLAGS="$EXTRA_GNU_CXXFLAGS -fprefetch-loop-arrays -finline-functions -march=native"
EXTRA_GNU_FCFLAGS="$EXTRA_GNU_FCFLAGS -ffree-line-length-0 -finline-functions" EXTRA_GNU_FCFLAGS="$EXTRA_GNU_FCFLAGS -ffree-line-length-0 -finline-functions"
#CLANG
EXTRA_CLANG_CXXFLAGS="$EXTRA_CLANG_CXXFLAGS -march=native"
EXTRA_CLANG_FCFLAGS="$EXTRA_CLANG_FCFLAGS -ffree-line-length-0 -finline-functions"
# Intel # Intel
EXTRA_INTEL_CXXFLAGS="$EXTRA_INTEL_CXXFLAGS -xHost -ip -no-prec-div" # -fast EXTRA_INTEL_CXXFLAGS="$EXTRA_INTEL_CXXFLAGS -xHost -ip -no-prec-div" # -fast
EXTRA_INTEL_FCFLAGS="$EXTRA_INTEL_FCFLAGS -xHost -ip -no-prec-div" # -fast EXTRA_INTEL_FCFLAGS="$EXTRA_INTEL_FCFLAGS -xHost -ip -no-prec-div" # -fast
# PGI # PGI
EXTRA_PGI_CXXFLAGS="$EXTRA_PGI_CXXFLAGS -Munroll=5 -Mnoframe" EXTRA_PGI_CXXFLAGS="$EXTRA_PGI_CXXFLAGS -fast"
EXTRA_PGI_FCFLAGS="$EXTRA_PGI_FCFLAGS -Munroll=5 -Mnoframe -freeform -extend-source" EXTRA_PGI_FCFLAGS="$EXTRA_PGI_FCFLAGS -fast"
# XLC # XLC
EXTRA_BG_CXXFLAGS="$EXTRA_BG_CXXFLAGS -qarch=qp -qtune=auto -qpic=large -qenablevmx" EXTRA_BG_CXXFLAGS="$EXTRA_BG_CXXFLAGS -qarch=qp -qtune=auto -qpic=large -qenablevmx"
EXTRA_BG_FCFLAGS="$EXTRA_BG_FCFLAGS -qarch=qp -qtune=auto -qpic=large -qenablevmx" EXTRA_BG_FCFLAGS="$EXTRA_BG_FCFLAGS -qarch=qp -qtune=auto -qpic=large -qenablevmx"
...@@ -268,7 +273,7 @@ if test "xyes" = "x$enable_debug"; then ...@@ -268,7 +273,7 @@ if test "xyes" = "x$enable_debug"; then
FFLAGS="$FFLAGS -g" FFLAGS="$FFLAGS -g"
fi fi
# Add -fstack-protector-all option for g++ in debug mode # Add -fstack-protector-all option for g++ in debug mode
if (test "x$GXX" = "xyes"); then if (test "x$cxx_compiler" = "xGNU"); then
CXXFLAGS="$CXXFLAGS -fstack-protector-all" CXXFLAGS="$CXXFLAGS -fstack-protector-all"
CFLAGS="$CFLAGS -fstack-protector-all" CFLAGS="$CFLAGS -fstack-protector-all"
LDFLAGS="$LDFLAGS -fstack-protector-all" LDFLAGS="$LDFLAGS -fstack-protector-all"
...@@ -298,13 +303,10 @@ if (test "x$ENABLE_FORTRAN" != "xno"); then ...@@ -298,13 +303,10 @@ if (test "x$ENABLE_FORTRAN" != "xno"); then
FFLAGS="$FFLAGS -O2" FFLAGS="$FFLAGS -O2"
fi fi
AC_FC_PP_DEFINE AC_FC_PP_DEFINE
AC_FC_PP_SRCEXT
# AC_F77_LIBRARY_LDFLAGS
# AC_FC_LIBRARY_LDFLAGS
fi fi
# Check for 32/64 bit. # Check for 32/64 bit.
# This requires FATHOM_CXX_FLAGS and FATHOM_CC_FLAGS to have been called first # This requires FATHOM_CXX_FLAGS and FATHOM_CC_FLAGS to have been called first
AC_ARG_ENABLE(32bit, AS_HELP_STRING([--enable-32bit],[Force 32-bit objects]), AC_ARG_ENABLE(32bit, AS_HELP_STRING([--enable-32bit],[Force 32-bit objects]),
[ [
if (test "xyes" != "x$enableval" && test "xno" != "x$enableval"); then if (test "xyes" != "x$enableval" && test "xno" != "x$enableval"); then
...@@ -381,7 +383,7 @@ if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then ...@@ -381,7 +383,7 @@ if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then
*mira*) LIBS="$LIBS /soft/compilers/ibmcmp-feb2015/vacpp/bg/12.1/bglib64/libibmc++.a"; fcxxlinkage=yes ;; *mira*) LIBS="$LIBS /soft/compilers/ibmcmp-feb2015/vacpp/bg/12.1/bglib64/libibmc++.a"; fcxxlinkage=yes ;;
esac esac
if (test "$cc_compiler" == "Intel"); then if (test "$cxx_compiler" == "Intel"); then
my_save_ldflags="$LDFLAGS" my_save_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS -cxxlib" LDFLAGS="$LDFLAGS -cxxlib"
AC_MSG_CHECKING([whether $FC supports -cxxlib]) AC_MSG_CHECKING([whether $FC supports -cxxlib])
...@@ -391,6 +393,26 @@ if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then ...@@ -391,6 +393,26 @@ if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then
[AC_MSG_RESULT([no])] [AC_MSG_RESULT([no])]
) )
LDFLAGS="$my_save_ldflags" LDFLAGS="$my_save_ldflags"
elif (test "$cxx_compiler" == "PortlandGroup"); then
my_save_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS -pgc++libs"
AC_MSG_CHECKING([whether $FC supports -pgc++libs])
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[fcxxlinkage=yes; FLIBS="$FLIBS -pgc++libs"; FCLIBS="$FCLIBS -pgc++libs"],
[AC_MSG_RESULT([no])]
)
LDFLAGS="$my_save_ldflags"
if (test "$fcxxlinkage" != "yes"); then
LDFLAGS="$LDFLAGS -pgcpplibs -lstd -lC"
AC_MSG_CHECKING([whether $FC supports -pgcpplibs -lstd -lC])
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[fcxxlinkage=yes; FLIBS="$FLIBS -pgcpplibs -lstd -lC"; FCLIBS="$FCLIBS -pgcpplibs -lstd -lC"],
[AC_MSG_RESULT([no])]
)
LDFLAGS="$my_save_ldflags"
fi
else else
if (test "$fcxxlinkage" != "yes"); then if (test "$fcxxlinkage" != "yes"); then
...@@ -411,7 +433,7 @@ if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then ...@@ -411,7 +433,7 @@ if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then
# GNU and other non-intel compilers will use the standard -lstdc++ linkage # GNU and other non-intel compilers will use the standard -lstdc++ linkage
# This case also includes the Ubuntu+Clang combination as mentioned before # This case also includes the Ubuntu+Clang combination as mentioned before
if (test "$cc_compiler" != "Clang" || test "$fcxxlinkage" != "yes"); then if (test "$cxx_compiler" != "Clang" || test "$fcxxlinkage" != "yes"); then
my_save_ldflags="$LDFLAGS" my_save_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS -lstdc++" LDFLAGS="$LDFLAGS -lstdc++"
AC_MSG_CHECKING([whether $FC supports -stdlib=libstdc++]) AC_MSG_CHECKING([whether $FC supports -stdlib=libstdc++])
...@@ -426,6 +448,10 @@ if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then ...@@ -426,6 +448,10 @@ if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then
fi fi
if (test "$fcxxlinkage" != "yes"); then
AC_MSG_WARN([Unrecognized C++ linkage for C/Fortran programs])
fi
fi fi
AC_SUBST(FLIBS) AC_SUBST(FLIBS)
...@@ -625,6 +651,7 @@ if test x$GXX = xyes; then ...@@ -625,6 +651,7 @@ if test x$GXX = xyes; then
# Intel and Clang claims to be GCC, check for it here # Intel and Clang claims to be GCC, check for it here
FATHOM_TRY_COMPILER_DEFINE([__INTEL_COMPILER],[cxx_compiler=Intel]) FATHOM_TRY_COMPILER_DEFINE([__INTEL_COMPILER],[cxx_compiler=Intel])
FATHOM_TRY_COMPILER_DEFINE([__clang__],[cxx_compiler=Clang]) FATHOM_TRY_COMPILER_DEFINE([__clang__],[cxx_compiler=Clang])
FATHOM_TRY_COMPILER_DEFINE([__PGI],[cxx_compiler=PortlandGroup])
# Search for other compiler types # Search for other compiler types
# For efficiency, limit checks to relevant OSs # For efficiency, limit checks to relevant OSs
else else
...@@ -730,8 +757,11 @@ case "$cxx_compiler:$host_cpu" in ...@@ -730,8 +757,11 @@ case "$cxx_compiler:$host_cpu" in
FATHOM_CXX_32BIT=-xarch=generic FATHOM_CXX_32BIT=-xarch=generic
FATHOM_CXX_64BIT=-xarch=generic64 FATHOM_CXX_64BIT=-xarch=generic64
;; ;;
PortlandGroup:*)
FATHOM_CXX_SPECIAL="$EXTRA_PGI_CXXFLAGS"
;;
Clang:*) Clang:*)
FATHOM_CXX_SPECIAL="$EXTRA_GNU_CXXFLAGS" FATHOM_CXX_SPECIAL="$EXTRA_CLANG_CXXFLAGS"
FATHOM_CXX_32BIT=-m32 FATHOM_CXX_32BIT=-m32
FATHOM_CXX_64BIT=-m64 FATHOM_CXX_64BIT=-m64
;; ;;
...@@ -773,6 +803,7 @@ if test x$GCC = xyes; then ...@@ -773,6 +803,7 @@ if test x$GCC = xyes; then
# Intel claims to be GCC, check for it here # Intel claims to be GCC, check for it here
FATHOM_TRY_COMPILER_DEFINE([__INTEL_COMPILER],[cc_compiler=Intel]) FATHOM_TRY_COMPILER_DEFINE([__INTEL_COMPILER],[cc_compiler=Intel])
FATHOM_TRY_COMPILER_DEFINE([__clang__],[cc_compiler=Clang]) FATHOM_TRY_COMPILER_DEFINE([__clang__],[cc_compiler=Clang])
FATHOM_TRY_COMPILER_DEFINE([__PGI],[cc_compiler=PortlandGroup])
# Search for other compiler types # Search for other compiler types
# For efficiency, limit checks to relevant OSs # For efficiency, limit checks to relevant OSs
else else
...@@ -828,34 +859,40 @@ case "$cc_compiler:$host_cpu" in ...@@ -828,34 +859,40 @@ case "$cc_compiler:$host_cpu" in
FATHOM_CC_64BIT=-m64 FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS" FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS" FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
;; ;;
GNU:powerpc*) GNU:powerpc*)
FATHOM_CC_32BIT=-m32 FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64 FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS" FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS" FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
;; ;;
GNU:i?86|GNU:x86_64) GNU:i?86|GNU:x86_64)
FATHOM_CC_32BIT=-m32 FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64 FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS" FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS" FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
;; ;;
GNU:mips*) GNU:mips*)
FATHOM_CC_32BIT="-mips32 -mabi=32" FATHOM_CC_32BIT="-mips32 -mabi=32"
FATHOM_CC_64BIT="-mips64 -mabi=64" FATHOM_CC_64BIT="-mips64 -mabi=64"
FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS" FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS" FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
;; ;;
GNU:*) GNU:*)
FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS" FATHOM_CC_SPECIAL="$EXTRA_GNU_ONLY_CXXFLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS" FATHOM_FC_SPECIAL="$EXTRA_GNU_ONLY_FCFLAGS"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
;; ;;
Intel:*) Intel:*)
FATHOM_CC_32BIT=-m32 FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64 FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_INTEL_CXXFLAGS -wd981 -wd279 -wd1418 -wd383 -wd1572" FATHOM_CC_SPECIAL="$EXTRA_INTEL_CXXFLAGS -wd981 -wd279 -wd1418 -wd383 -wd1572"
FATHOM_FC_SPECIAL="$EXTRA_INTEL_FCFLAGS" FATHOM_FC_SPECIAL="$EXTRA_INTEL_FCFLAGS"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
;; ;;
VisualAge:*) VisualAge:*)
case "$target_vendor" in case "$target_vendor" in
...@@ -870,6 +907,7 @@ case "$cc_compiler:$host_cpu" in ...@@ -870,6 +907,7 @@ case "$cc_compiler:$host_cpu" in
FATHOM_CC_64BIT=-q64 FATHOM_CC_64BIT=-q64
FATHOM_CC_SPECIAL="$EXTRA_BG_CXXFLAGS -qmaxmem=-1 -qminimaltoc" FATHOM_CC_SPECIAL="$EXTRA_BG_CXXFLAGS -qmaxmem=-1 -qminimaltoc"
FATHOM_FC_SPECIAL="$EXTRA_BG_FCFLAGS -qnoescape -WF,-C! -qddim -qalias=intptr" FATHOM_FC_SPECIAL="$EXTRA_BG_FCFLAGS -qnoescape -WF,-C! -qddim -qalias=intptr"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
AR="ar" AR="ar"
NM="nm -B" NM="nm -B"
;; ;;
...@@ -878,6 +916,7 @@ case "$cc_compiler:$host_cpu" in ...@@ -878,6 +916,7 @@ case "$cc_compiler:$host_cpu" in
FATHOM_CC_64BIT=-q64 FATHOM_CC_64BIT=-q64
FATHOM_CC_SPECIAL="$EXTRA_BG_CXXFLAGS -qmaxmem=-1 -qminimaltoc" FATHOM_CC_SPECIAL="$EXTRA_BG_CXXFLAGS -qmaxmem=-1 -qminimaltoc"
FATHOM_FC_SPECIAL="$EXTRA_BG_FCFLAGS -qnoescape -WF,-C! -qddim -qalias=intptr" FATHOM_FC_SPECIAL="$EXTRA_BG_FCFLAGS -qnoescape -WF,-C! -qddim -qalias=intptr"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
AR="ar" AR="ar"
NM="nm -B -X 32_64" NM="nm -B -X 32_64"
;; ;;
...@@ -888,14 +927,22 @@ case "$cc_compiler:$host_cpu" in ...@@ -888,14 +927,22 @@ case "$cc_compiler:$host_cpu" in
FATHOM_CC_64BIT=-64 FATHOM_CC_64BIT=-64
FATHOM_CC_SPECIAL=-LANG:std FATHOM_CC_SPECIAL=-LANG:std
FATHOM_FC_SPECIAL=-LANG:std FATHOM_FC_SPECIAL=-LANG:std
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
;; ;;
MIPSpro:*) MIPSpro:*)
FATHOM_CC_SPECIAL=-LANG:std FATHOM_CC_SPECIAL=-LANG:std
FATHOM_FC_SPECIAL=-LANG:std FATHOM_FC_SPECIAL=-LANG:std
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
;;
PortlandGroup:*)
FATHOM_CC_SPECIAL="-traceback -C"
FATHOM_FC_SPECIAL="$EXTRA_PGI_FCFLAGS $EXTRA_PGI_ONLY_FCFLAGS"
FATHOM_F77_SPECIAL="$EXTRA_PGI_FCFLAGS"
;; ;;
Clang:*) Clang:*)
FATHOM_CC_SPECIAL="$EXTRA_GNU_CXXFLAGS" FATHOM_CC_SPECIAL="$EXTRA_CLANG_CXXFLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FCFLAGS" FATHOM_FC_SPECIAL="$EXTRA_CLANG_FCFLAGS"
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
FATHOM_CC_32BIT=-m32 FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64 FATHOM_CC_64BIT=-m64
;; ;;
...@@ -912,7 +959,6 @@ case "$cc_compiler:$host_cpu" in ...@@ -912,7 +959,6 @@ case "$cc_compiler:$host_cpu" in
esac esac
AC_MSG_RESULT([$cc_compiler:$host_cpu]) AC_MSG_RESULT([$cc_compiler:$host_cpu])
FATHOM_F77_SPECIAL="$FATHOM_FC_SPECIAL"
]) # end FATHOM_CC_FLAGS ]) # end FATHOM_CC_FLAGS
......
...@@ -745,6 +745,7 @@ EXPORT_LDFLAGS="$ZOLTAN_LIB_FLAGS $EXPORT_LDFLAGS" ...@@ -745,6 +745,7 @@ EXPORT_LDFLAGS="$ZOLTAN_LIB_FLAGS $EXPORT_LDFLAGS"
################################################################################ ################################################################################
# CGM # CGM
################################################################################ ################################################################################
USING_DEV_CGM=no
AC_ARG_WITH(cgm, AC_ARG_WITH(cgm,
[AS_HELP_STRING([--with-cgm=DIR],[Specify directory containing CGM])], [AS_HELP_STRING([--with-cgm=DIR],[Specify directory containing CGM])],
[CGM_DIR=$withval [CGM_DIR=$withval
...@@ -767,7 +768,7 @@ case "x$CGM_DIR" in ...@@ -767,7 +768,7 @@ case "x$CGM_DIR" in
AC_CHECK_FILE([${CGM_DIR}/lib/cgm.make], AC_CHECK_FILE([${CGM_DIR}/lib/cgm.make],
[CGM_MAKE="${CGM_DIR}/lib/cgm.make"], [CGM_MAKE="${CGM_DIR}/lib/cgm.make"],
[AC_CHECK_FILE([${CGM_DIR}/cgm.make], [AC_CHECK_FILE([${CGM_DIR}/cgm.make],
[CGM_MAKE="${CGM_DIR}/cgm.make"], [CGM_MAKE="${CGM_DIR}/cgm.make"; USING_DEV_CGM=yes],
[AC_MSG_ERROR([$CGM_DIR : not a configured CGM]); [AC_MSG_ERROR([$CGM_DIR : not a configured CGM]);
CGM_MISSING=yes]) CGM_MISSING=yes])
]) ])
...@@ -777,7 +778,6 @@ esac ...@@ -777,7 +778,6 @@ esac
if test "x$CGM_MISSING" = "xno"; then if test "x$CGM_MISSING" = "xno"; then
CGM_CONFIG_OPTIONS="include $CGM_MAKE" CGM_CONFIG_OPTIONS="include $CGM_MAKE"
AC_MSG_CHECKING([Checking for GeometryQueryTool::ray_fire(RefFace*,...)])
FATHOM_MAKE_INC_VAR([$CGM_MAKE],[CGM_DEFINES], [CGM_CPPFLAGS="$make_val"]) FATHOM_MAKE_INC_VAR([$CGM_MAKE],[CGM_DEFINES], [CGM_CPPFLAGS="$make_val"])
FATHOM_MAKE_INC_VAR([$CGM_MAKE],[CGM_INCLUDES],[CGM_CPPFLAGS="$CGM_CPPFLAGS $make_val"]) FATHOM_MAKE_INC_VAR([$CGM_MAKE],[CGM_INCLUDES],[CGM_CPPFLAGS="$CGM_CPPFLAGS $make_val"])
FATHOM_MAKE_INC_VAR([$CGM_MAKE],[CGM_LTFLAGS], [CGM_LTFLAGS="$make_val"]) FATHOM_MAKE_INC_VAR([$CGM_MAKE],[CGM_LTFLAGS], [CGM_LTFLAGS="$make_val"])
...@@ -789,40 +789,49 @@ if test "x$CGM_MISSING" = "xno"; then ...@@ -789,40 +789,49 @@ if test "x$CGM_MISSING" = "xno"; then
CPPFLAGS="$CGM_CPPFLAGS $CPPFLAGS" CPPFLAGS="$CGM_CPPFLAGS $CPPFLAGS"
HAVE_OCC=no HAVE_OCC=no
HAVE_FACET=no HAVE_FACET=no
AC_CHECK_HEADER([OCCPoint.hpp], AC_MSG_CHECKING([for underlying geometry engine in CGM])
[HAVE_OCC=yes; AC_DEFINE(HAVE_CGM_OCC, [1], [MOAB uses CGM configured with OpenCascade]) ], AC_COMPILE_IFELSE(
[HAVE_FACET=yes; AC_DEFINE(HAVE_CGM_FACET, [1], [MOAB uses CGM configured with Facet Engine only]) ] [AC_LANG_PROGRAM([@%:@include <CGMConfig.h>],
) [ #ifndef CGM_HAVE_FACET_ENGINE_ONLY
// Perfect!
#else
# error Only Facet engine available
#endif
])
],
[HAVE_OCC=yes
AC_DEFINE(HAVE_CGM_OCC, [1], [MOAB uses CGM configured with OpenCascade])
AC_MSG_RESULT(OCC)],
[HAVE_FACET=yes
AC_DEFINE(HAVE_CGM_FACET, [1], [MOAB uses CGM configured with Facet Engine only])
AC_MSG_RESULT(Facets)] )
CPPFLAGS="$old_CPPFLAGS" CPPFLAGS="$old_CPPFLAGS"
AC_LANG_POP([C++]) AC_LANG_POP([C++])
if (test "x$HAVE_CUBIT" != "xno"); then AC_MSG_CHECKING([for GeometryQueryTool::ray_fire(RefFace*,...)])
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])
old_CPPFLAGS="$CPPFLAGS" old_CPPFLAGS="$CPPFLAGS"
old_LDFLAGS="$LDFLAGS" old_LDFLAGS="$LDFLAGS"
old_LIBS="$LIBS" old_LIBS="$LIBS"
CPPFLAGS="$CGM_CPPFLAGS $CPPFLAGS" CPPFLAGS="$CGM_CPPFLAGS $CPPFLAGS"
LDFLAGS="$CGM_LDFLAGS $CPPFLAGS" LDFLAGS="$CGM_LDFLAGS $CPPFLAGS"
LIBS="$CGM_LIBS $LIBS" LIBS="$CGM_LIBS $LIBS"
HAVE_CGM_FIRE_RAY=no HAVE_CGM_FIRE_RAY=no
AC_LINK_IFELSE( AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include "GeometryQueryTool.hpp" [AC_LANG_PROGRAM([#include "GeometryQueryTool.hpp"
#include "CubitVector.hpp"], #include "CubitVector.hpp"],
[CubitVector a,b; [CubitVector a,b;
DLIList<double> c; DLIList<double> c;
GeometryQueryTool::instance()->fire_ray((RefFace*)0, a, b, c ); GeometryQueryTool::instance()->fire_ray((RefFace*)0, a, b, c );
])], ])],
[HAVE_CGM_FIRE_RAY=yes; [HAVE_CGM_FIRE_RAY=yes;
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])
[AC_MSG_RESULT(no)]) CPPFLAGS="$old_CPPFLAGS"
CPPFLAGS="$old_CPPFLAGS" LDFLAGS="$old_LDFLAGS"
LDFLAGS="$old_LDFLAGS" LIBS="$old_LIBS"
LIBS="$old_LIBS" AC_LANG_POP([C++])
# LDFLAGS="$old_LDFLAGS"
# LIBS="$old_LIBS"
AC_LANG_POP([C++])
fi
EXPORT_LDFLAGS="$EXPORT_LDFLAGS $CGM_LDFLAGS" EXPORT_LDFLAGS="$EXPORT_LDFLAGS $CGM_LDFLAGS"
EXPORT_LTFLAGS="$EXPORT_LTFLAGS $CGM_LTFLAGS" EXPORT_LTFLAGS="$EXPORT_LTFLAGS $CGM_LTFLAGS"
fi fi
...@@ -851,6 +860,7 @@ fi ...@@ -851,6 +860,7 @@ fi
AC_MSG_CHECKING([if iRel support is to be built]) AC_MSG_CHECKING([if iRel support is to be built])
AC_MSG_RESULT([$ENABLE_irel]) AC_MSG_RESULT([$ENABLE_irel])
AM_CONDITIONAL([ENABLE_irel],[test "xyes" = "x$ENABLE_irel"]) AM_CONDITIONAL([ENABLE_irel],[test "xyes" = "x$ENABLE_irel"])
if test "x$ENABLE_irel" = "xyes"; then if test "x$ENABLE_irel" = "xyes"; then
if (test "x$ENABLE_imesh" != "xyes" || test "x$CGM_MISSING" != "xno"); then if (test "x$ENABLE_imesh" != "xyes" || test "x$CGM_MISSING" != "xno"); then
AC_MSG_ERROR([Cannot build iRel API. Enable both iGeom (CGM) and iMesh implementations.]) AC_MSG_ERROR([Cannot build iRel API. Enable both iGeom (CGM) and iMesh implementations.])
...@@ -861,9 +871,9 @@ if test "x$ENABLE_irel" = "xyes"; then ...@@ -861,9 +871,9 @@ if test "x$ENABLE_irel" = "xyes"; then
[IGEOM_CONFIG_OPTIONS="include ${CGM_DIR}/lib/iGeom-Defs.inc"; [IGEOM_CONFIG_OPTIONS="include ${CGM_DIR}/lib/iGeom-Defs.inc";
FATHOM_MAKE_INC_VAR([${CGM_DIR}/lib/iGeom-Defs.inc],[IGEOM_DEFINES], [IGEOM_DEFINES="$make_val"], FATHOM_MAKE_INC_VAR([${CGM_DIR}/lib/iGeom-Defs.inc],[IGEOM_DEFINES], [IGEOM_DEFINES="$make_val"],
[IGEOM_DEFINES=]) ], [IGEOM_DEFINES=]) ],
[AC_CHECK_FILE([${CGM_DIR}/iGeom-Defs.inc], [AC_CHECK_FILE([${CGM_DIR}/itaps/iGeom-Defs.inc],
[IGEOM_CONFIG_OPTIONS="include ${CGM_DIR}/iGeom-Defs.inc"], [IGEOM_CONFIG_OPTIONS="include ${CGM_DIR}/itaps/iGeom-Defs.inc"],
[AC_MSG_WARN([$CGM_DIR : not a configured iGeom])] [AC_MSG_WARN([$CGM_DIR : iGeom is not configured correctly])]
) )
]) ])
AC_SUBST(IGEOM_DEFINES) AC_SUBST(IGEOM_DEFINES)
...@@ -879,6 +889,7 @@ test "x$ENABLE_irel" != "xyes" || HAVE_IREL="yes" ...@@ -879,6 +889,7 @@ test "x$ENABLE_irel" != "xyes" || HAVE_IREL="yes"
AC_SUBST(HAVE_IGEOM) AC_SUBST(HAVE_IGEOM)
AC_SUBST(HAVE_IMESH) AC_SUBST(HAVE_IMESH)
AC_SUBST(HAVE_IREL) AC_SUBST(HAVE_IREL)
AM_CONDITIONAL([USING_DEV_CGM],[test "xyes" = "x$USING_DEV_CGM"])
############################################################################### ###############################################################################
# Optional Tools # Optional Tools
......
...@@ -64,7 +64,7 @@ program DirectAccessNoHolesF90 ...@@ -64,7 +64,7 @@ program DirectAccessNoHolesF90
character*120 opt character*120 opt
! initialize interface and get root set ! initialize interface and get root set
call iMesh_newMesh("", %REF(imesh), ierr) call iMesh_newMesh("", imesh, ierr)
CHECK(ierr) CHECK(ierr)
call iMesh_getRootSet(%val(imesh), root_set, ierr) call iMesh_getRootSet(%val(imesh), root_set, ierr)
CHECK(ierr) CHECK(ierr)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
! NOTE: not integer*4 (see meaning of _LP64 in GNU docs) ! NOTE: not integer*4 (see meaning of _LP64 in GNU docs)
# define IBASE_HANDLE_T integer # define IBASE_HANDLE_T integer
# endif # endif
#elif defined(__INTEL_COMPILER) #elif defined(__INTEL_COMPILER) || defined(__PGI)
# ifdef __x86_64 # ifdef __x86_64
# define IBASE_HANDLE_T integer*8 # define IBASE_HANDLE_T integer*8
# else # else
......
...@@ -2354,7 +2354,7 @@ int test_entity_copies( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const ...@@ -2354,7 +2354,7 @@ int test_entity_copies( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const
// add all vertices to local_data // add all vertices to local_data
for (size_t j = 0; j < verts.size(); ++j) { for (size_t j = 0; j < verts.size(); ++j) {
int tag; int tag=0;
ierr = vertex_tag( imesh, verts[j], tag ); ierr = vertex_tag( imesh, verts[j], tag );
if (ierr) if (ierr)
break; break;
......
...@@ -18,6 +18,6 @@ IMESH_LIBS = $(IMESH_LDFLAGS) -L$(MOAB_LIBDIR) \ ...@@ -18,6 +18,6 @@ IMESH_LIBS = $(IMESH_LDFLAGS) -L$(MOAB_LIBDIR) \
@FCLIBS@ @LIBS@ @FCLIBS@ @LIBS@
IMESH_INCLUDEDIR = @abs_srcdir@ IMESH_INCLUDEDIR = @abs_srcdir@
IMESH_INCLUDEDIR2 = -I@abs_builddir@ -I@abs_srcdir@/.. -I@abs_builddir@/.. -I@abs_top_builddir@/src IMESH_INCLUDEDIR2 = -I@abs_builddir@ -I@abs_srcdir@/.. -I@abs_builddir@/.. -I@abs_top_builddir@/src -I@abs_srcdir@/../../src
IMESH_LIBDIR = @abs_builddir@/.libs IMESH_LIBDIR = @abs_builddir@/.libs
MOAB_LIBDIR = @abs_top_builddir@/src/.libs MOAB_LIBDIR = @abs_top_builddir@/src/.libs
...@@ -2406,7 +2406,7 @@ extern "C" { ...@@ -2406,7 +2406,7 @@ extern "C" {
EntityHandle set1 = ENTITY_HANDLE(entity_set_1), EntityHandle set1 = ENTITY_HANDLE(entity_set_1),
set2 = ENTITY_HANDLE(entity_set_2); set2 = ENTITY_HANDLE(entity_set_2);
int isList1, isList2; int isList1=0, isList2=0;
iMesh_isList(instance, entity_set_1, &isList1, err); iMesh_isList(instance, entity_set_1, &isList1, err);
if (*err != iBase_SUCCESS) return; if (*err != iBase_SUCCESS) return;
iMesh_isList(instance, entity_set_2, &isList2, err); iMesh_isList(instance, entity_set_2, &isList2, err);
...@@ -2455,7 +2455,7 @@ extern "C" { ...@@ -2455,7 +2455,7 @@ extern "C" {
EntityHandle set1 = ENTITY_HANDLE(entity_set_1), EntityHandle set1 = ENTITY_HANDLE(entity_set_1),
set2 = ENTITY_HANDLE(entity_set_2); set2 = ENTITY_HANDLE(entity_set_2);
int isList1, isList2; int isList1=0, isList2=0;
iMesh_isList(instance, entity_set_1, &isList1, err); iMesh_isList(instance, entity_set_1, &isList1, err);
if (*err != iBase_SUCCESS) return; if (*err != iBase_SUCCESS) return;
iMesh_isList(instance, entity_set_2, &isList2, err); iMesh_isList(instance, entity_set_2, &isList2, err);
...@@ -2561,7 +2561,7 @@ extern "C" { ...@@ -2561,7 +2561,7 @@ extern "C" {
EntityHandle set1 = ENTITY_HANDLE(entity_set_1), EntityHandle set1 = ENTITY_HANDLE(entity_set_1),
set2 = ENTITY_HANDLE(entity_set_2); set2 = ENTITY_HANDLE(entity_set_2);