1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 01:05:38 +01:00

improved LAPACK configuration

This commit is contained in:
Antonin Portelli 2016-08-02 17:26:54 +01:00
parent a7b483d67a
commit 9e5b934d21
11 changed files with 27 additions and 116 deletions

View File

@ -1,4 +1,3 @@
# additional include paths necessary to compile the C++ library AM_LDFLAGS += -L$(top_builddir)/lib
AM_LDFLAGS = -L$(top_builddir)/lib
include Make.inc include Make.inc

View File

@ -38,6 +38,19 @@ AC_ARG_WITH([mpfr],
[try this for a non-standard install prefix of the MPFR library])], [try this for a non-standard install prefix of the MPFR library])],
[AM_CXXFLAGS="$AM_CXXFLAGS -I$with_mpfr/include"] [AM_CXXFLAGS="$AM_CXXFLAGS -I$with_mpfr/include"]
[AM_LDFLAGS="$AM_LDFLAGS -L$with_mpfr/lib"]) [AM_LDFLAGS="$AM_LDFLAGS -L$with_mpfr/lib"])
AC_ARG_ENABLE([lapack],
[AC_HELP_STRING([--enable-lapack=yes|no|prefix], [enable LAPACK])],
[ac_LAPACK=${enable_lapack}],[ac_LAPACK=no])
case ${ac_LAPACK} in
no)
;;
yes)
AC_DEFINE([USE_LAPACK],[1],[use LAPACK]);;
*)
AM_CXXFLAGS="$AM_CXXFLAGS -I$ac_LAPACK/include"
AM_LDFLAGS="$AM_LDFLAGS -L$ac_LAPACK/lib"
AC_DEFINE([USE_LAPACK],[1],[use LAPACK])
esac
################ Get compiler informations ################ Get compiler informations
AC_LANG([C++]) AC_LANG([C++])
@ -53,6 +66,10 @@ AC_DEFINE_UNQUOTED([GXX_VERSION],["$GXX_VERSION"],
AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_LIB([gmp],[__gmpf_init],[],[]) AC_CHECK_LIB([gmp],[__gmpf_init],[],[])
AC_CHECK_LIB([mpfr],[mpfr_init],[],[]) AC_CHECK_LIB([mpfr],[mpfr_init],[],[])
if test "${ac_LAPACK}x" != "nox"; then
AC_CHECK_LIB([lapack],[LAPACKE_sbdsdc],[],
[AC_MSG_ERROR("LAPACK enabled but library not found")])
fi
############### SIMD instruction selection ############### SIMD instruction selection
AC_ARG_ENABLE([simd],[AC_HELP_STRING([--enable-simd=SSE4|AVX|AVXFMA4|AVX2|AVX512|AVX512MIC|IMCI|KNL|KNC],\ AC_ARG_ENABLE([simd],[AC_HELP_STRING([--enable-simd=SSE4|AVX|AVXFMA4|AVX2|AVX512|AVX512MIC|IMCI|KNL|KNC],\
@ -208,27 +225,8 @@ case ${ac_CHROMA} in
AC_MSG_ERROR([${ac_CHROMA} unsupported --enable-chroma option]); AC_MSG_ERROR([${ac_CHROMA} unsupported --enable-chroma option]);
;; ;;
esac esac
AM_CONDITIONAL(BUILD_CHROMA_REGRESSION,[ test "X${ac_CHROMA}X" == "XyesX" ]) AM_CONDITIONAL(BUILD_CHROMA_REGRESSION,[ test "X${ac_CHROMA}X" == "XyesX" ])
############### Lapack
AC_ARG_ENABLE([lapack],[AC_HELP_STRING([--enable-lapack],[Enable lapack yes/no ])],[ac_LAPACK=${enable_lapack}],[ac_LAPACK=no])
case ${ac_LAPACK} in
yes)
echo Enabling lapack
;;
no)
echo Disabling lapack
;;
*)
echo Enabling lapack at ${ac_LAPACK}
;;
esac
AM_CONDITIONAL(USE_LAPACK,[ test "X${ac_LAPACK}X" != "XnoX" ])
AM_CONDITIONAL(USE_LAPACK_LIB,[ test "X${ac_LAPACK}X" != "XyesX" ])
############### Doxygen ############### Doxygen
AC_PROG_DOXYGEN AC_PROG_DOXYGEN

View File

@ -1,5 +1,3 @@
# additional include paths necessary to compile the C++ library
extra_sources= extra_sources=
if BUILD_COMMS_MPI if BUILD_COMMS_MPI
extra_sources+=communicator/Communicator_mpi.cc extra_sources+=communicator/Communicator_mpi.cc

View File

@ -1,15 +1,3 @@
# additional include paths necessary to compile the C++ library AM_LDFLAGS += -L$(top_builddir)/lib
AM_LDFLAGS = -L$(top_builddir)/lib
if USE_LAPACK
AM_CXXFLAGS += -DUSE_LAPACK
if USE_LAPACK_LIB
#if test "X${ac_LAPACK}X" != XyesX
AM_CXXFLAGS += -I$(ac_LAPACK)/include
AM_LDFLAGS += -L$(ac_LAPACK)/lib
#fi
endif
endif
include Make.inc include Make.inc

View File

@ -4,16 +4,6 @@ if BUILD_CHROMA_REGRESSION
SUBDIRS+= qdpxx SUBDIRS+= qdpxx
endif endif
AM_LDFLAGS = -L$(top_builddir)/lib AM_LDFLAGS += -L$(top_builddir)/lib
if USE_LAPACK
AM_CXXFLAGS += -DUSE_LAPACK
if USE_LAPACK_LIB
#if test "X${ac_LAPACK}X" != XyesX
AM_CXXFLAGS += -I$(ac_LAPACK)/include
AM_LDFLAGS += -L$(ac_LAPACK)/lib
#fi
endif
endif
include Make.inc include Make.inc

View File

@ -1,15 +1,3 @@
# additional include paths necessary to compile the C++ library AM_LDFLAGS += -L$(top_builddir)/lib
AM_LDFLAGS = -L$(top_builddir)/lib
if USE_LAPACK
AM_CXXFLAGS += -DUSE_LAPACK
if USE_LAPACK_LIB
#if test "X${ac_LAPACK}X" != XyesX
AM_CXXFLAGS += -I$(ac_LAPACK)/include
AM_LDFLAGS += -L$(ac_LAPACK)/lib
#fi
endif
endif
include Make.inc include Make.inc

View File

@ -1,15 +1,3 @@
# additional include paths necessary to compile the C++ library AM_LDFLAGS += -L$(top_builddir)/lib
AM_LDFLAGS = -L$(top_builddir)/lib
if USE_LAPACK
AM_CXXFLAGS += -DUSE_LAPACK
if USE_LAPACK_LIB
#if test "X${ac_LAPACK}X" != XyesX
AM_CXXFLAGS += -I$(ac_LAPACK)/include
AM_LDFLAGS += -L$(ac_LAPACK)/lib
#fi
endif
endif
include Make.inc include Make.inc

View File

@ -1,15 +1,3 @@
# additional include paths necessary to compile the C++ library AM_LDFLAGS += -L$(top_builddir)/lib
AM_LDFLAGS = -L$(top_builddir)/lib
if USE_LAPACK
AM_CXXFLAGS += -DUSE_LAPACK
if USE_LAPACK_LIB
#if test "X${ac_LAPACK}X" != XyesX
AM_CXXFLAGS += -I$(ac_LAPACK)/include
AM_LDFLAGS += -L$(ac_LAPACK)/lib
#fi
endif
endif
include Make.inc include Make.inc

View File

@ -1,15 +1,3 @@
# additional include paths necessary to compile the C++ library AM_LDFLAGS += -L$(top_builddir)/lib
AM_LDFLAGS = -L$(top_builddir)/lib
if USE_LAPACK
AM_CXXFLAGS += -DUSE_LAPACK
if USE_LAPACK_LIB
#if test "X${ac_LAPACK}X" != XyesX
AM_CXXFLAGS += -I$(ac_LAPACK)/include
AM_LDFLAGS += -L$(ac_LAPACK)/lib
#fi
endif
endif
include Make.inc include Make.inc

View File

@ -1,6 +1,4 @@
# additional include paths necessary to compile the C++ library AM_CXXFLAGS += `chroma-config --cxxflags`
AM_LDFLAGS += -L$(top_builddir)/lib `chroma-config --ldflags` `chroma-config --libs`
AM_CXXFLAGS = `chroma-config --cxxflags`
AM_LDFLAGS = -L$(top_builddir)/lib `chroma-config --ldflags` `chroma-config --libs`
include Make.inc include Make.inc

View File

@ -1,15 +1,3 @@
# additional include paths necessary to compile the C++ library AM_LDFLAGS += -L$(top_builddir)/lib
AM_LDFLAGS = -L$(top_builddir)/lib
if USE_LAPACK
AM_CXXFLAGS += -DUSE_LAPACK
if USE_LAPACK_LIB
#if test "X${ac_LAPACK}X" != XyesX
AM_CXXFLAGS += -I$(ac_LAPACK)/include
AM_LDFLAGS += -L$(ac_LAPACK)/lib
#fi
endif
endif
include Make.inc include Make.inc