mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-18 03:11:44 +02:00
Simplified configure
This commit is contained in:
parent
a3a1cc6428
commit
0489831e18
42
configure.ac
42
configure.ac
@ -205,18 +205,11 @@ case $FC in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*nvfortran*)
|
*nvfortran*)
|
||||||
FCFLAGS="$FCFLAGS -fPIC -Mnomain -mp -target=gpu"
|
FCFLAGS="$FCFLAGS -fPIC -Mnomain"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $CC in
|
|
||||||
|
|
||||||
*nvc*)
|
|
||||||
CFLAGS="$CFLAGS -fPIC -mp -target=gpu"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
# Options.
|
# Options.
|
||||||
AC_ARG_ENABLE(hpc, [AS_HELP_STRING([--enable-hpc],[Use HPC-optimized functions])], HAVE_HPC=$enableval, HAVE_HPC=no)
|
AC_ARG_ENABLE(hpc, [AS_HELP_STRING([--enable-hpc],[Use HPC-optimized functions])], HAVE_HPC=$enableval, HAVE_HPC=no)
|
||||||
@ -243,25 +236,38 @@ fi
|
|||||||
## Enable GPU offloading
|
## Enable GPU offloading
|
||||||
|
|
||||||
# OpenACC offloading
|
# OpenACC offloading
|
||||||
AC_ARG_ENABLE(openacc-offload, [AS_HELP_STRING([--openacc-offload],[Use OpenACC-offloaded functions])], HAVE_OPENACC_OFFLOAD=$enableval, HAVE_OPENACC_OFFLOAD=no)
|
AC_ARG_ENABLE(enable-openacc, [AS_HELP_STRING([--enable-openacc],[Use OpenACC-offloaded functions])], HAVE_OPENACC_OFFLOAD=$enableval, HAVE_OPENACC_OFFLOAD=no)
|
||||||
AS_IF([test "$HAVE_OPENACC_OFFLOAD" = "yes"], [
|
AS_IF([test "$HAVE_OPENACC_OFFLOAD" = "yes"], [
|
||||||
AC_DEFINE([HAVE_OPENACC_OFFLOAD], [1], [If defined, activate OpenACC-offloaded routines])
|
AC_DEFINE([HAVE_OPENACC_OFFLOAD], [1], [If defined, activate OpenACC-offloaded routines])
|
||||||
CFLAGS="$OFFLOAD_FLAGS $OFFLOAD_CFLAGS $CFLAGS"
|
case $CC in
|
||||||
FCFLAGS="$OFFLOAD_FLAGS $OFFLOAD_FCFLAGS -DHAVE_OPENACC_OFFLOAD $FCFLAGS"
|
|
||||||
|
*gcc*)
|
||||||
|
CFLAGS="$CFLAGS -fPIC -fopenacc"
|
||||||
|
;;
|
||||||
|
*nvc*)
|
||||||
|
CFLAGS="$CFLAGS -fPIC -mp -target=gpu"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS"
|
||||||
|
# FCFLAGS="$OFFLOAD_FLAGS $OFFLOAD_FCFLAGS -DHAVE_OPENACC_OFFLOAD $FCFLAGS"
|
||||||
])
|
])
|
||||||
|
|
||||||
# cuBLAS offloading
|
# cuBLAS offloading
|
||||||
AC_ARG_ENABLE(cublas-offload, [AS_HELP_STRING([--cublas-offload],[Use cuBLAS-offloaded functions])], HAVE_CUBLAS_OFFLOAD=$enableval, HAVE_CUBLAS_OFFLOAD=no)
|
AC_ARG_ENABLE(enable-cublas, [AS_HELP_STRING([--enable-cublas],[Use cuBLAS-offloaded functions])], HAVE_CUBLAS_OFFLOAD=$enableval, HAVE_CUBLAS_OFFLOAD=no)
|
||||||
AS_IF([test "$HAVE_CUBLAS_OFFLOAD" = "yes"], [
|
AS_IF([test "$HAVE_CUBLAS_OFFLOAD" = "yes"], [
|
||||||
AC_DEFINE([HAVE_CUBLAS_OFFLOAD], [1], [If defined, activate cuBLAS-offloaded routines])
|
AC_DEFINE([HAVE_CUBLAS_OFFLOAD], [1], [If defined, activate cuBLAS-offloaded routines])
|
||||||
FCFLAGS="-DHAVE_CUBLAS_OFFLOAD"
|
case $CC in
|
||||||
|
|
||||||
|
*gcc*)
|
||||||
|
CFLAGS="$CFLAGS -fPIC -fopenacc"
|
||||||
|
;;
|
||||||
|
*nvc*)
|
||||||
|
CFLAGS="$CFLAGS -fPIC -mp -target=gpu"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
])
|
])
|
||||||
|
|
||||||
# General offload
|
|
||||||
AS_IF([test "$HAVE_OPENACC_OFFLOAD" = "yes" || test "$HAVE_CUBLAS_OFFLOAD" = "yes"], [
|
|
||||||
CFLAGS="$OFFLOAD_FLAGS $OFFLOAD_CFLAGS $CFLAGS"
|
|
||||||
FCFLAGS="$OFFLOAD_FLAGS $OFFLOAD_FCFLAGS $FCFLAGS"
|
|
||||||
])
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user