mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 18:16:28 +01:00
Improve configure
This commit is contained in:
parent
0d5d14b8e4
commit
6c7634038f
38
configure.ac
38
configure.ac
@ -246,10 +246,41 @@ fi
|
|||||||
|
|
||||||
## Enable GPU offloading
|
## Enable GPU offloading
|
||||||
|
|
||||||
# OpenACC offloading
|
# GPU offloading
|
||||||
AC_ARG_ENABLE(openacc, [AS_HELP_STRING([--enable-openacc],[Use OpenACC-offloaded functions])], HAVE_OPENACC_OFFLOAD=$enableval, HAVE_OPENACC_OFFLOAD=no)
|
AC_ARG_ENABLE(gpu, [AS_HELP_STRING([--enable-gpu],[openmp|openacc : Use GPU-offloaded functions])], enable_gpu=$enableval, enable_gpu=no)
|
||||||
AS_IF([test "$HAVE_OPENACC_OFFLOAD" = "yes"], [
|
AS_IF([test "$enable_gpu" = "yes"], [enable_gpu="openmp"])
|
||||||
|
|
||||||
|
# OpenMP offloading
|
||||||
|
HAVE_OPENMP_OFFLOAD="no"
|
||||||
|
AS_IF([test "$enable_gpu" = "openmp"], [
|
||||||
|
AC_DEFINE([HAVE_OPENMP_OFFLOAD], [1], [If defined, activate OpenMP-offloaded routines])
|
||||||
|
HAVE_OPENMP_OFFLOAD="yes"
|
||||||
|
case $CC in
|
||||||
|
|
||||||
|
*gcc*)
|
||||||
|
CFLAGS="$CFLAGS -fopenmp"
|
||||||
|
;;
|
||||||
|
*nvc*)
|
||||||
|
CFLAGS="$CFLAGS -mp=gpu"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $FC in
|
||||||
|
|
||||||
|
*gfortran*)
|
||||||
|
FCFLAGS="$FCFLAGS -fopenmp"
|
||||||
|
;;
|
||||||
|
*nvfortran*)
|
||||||
|
FCFLAGS="$FCFLAGS -mp=gpu"
|
||||||
|
;;
|
||||||
|
esac]
|
||||||
|
)
|
||||||
|
|
||||||
|
# OpenMP offloading
|
||||||
|
HAVE_OPENACC_OFFLOAD="no"
|
||||||
|
AS_IF([test "$enable_gpu" = "openacc"], [
|
||||||
AC_DEFINE([HAVE_OPENACC_OFFLOAD], [1], [If defined, activate OpenACC-offloaded routines])
|
AC_DEFINE([HAVE_OPENACC_OFFLOAD], [1], [If defined, activate OpenACC-offloaded routines])
|
||||||
|
HAVE_OPENACC_OFFLOAD="yes"
|
||||||
case $CC in
|
case $CC in
|
||||||
|
|
||||||
*gcc*)
|
*gcc*)
|
||||||
@ -430,6 +461,7 @@ LDFLAGS:........: ${LDFLAGS}
|
|||||||
LIBS............: ${LIBS}
|
LIBS............: ${LIBS}
|
||||||
USE CHAMELEON...: ${with_chameleon}
|
USE CHAMELEON...: ${with_chameleon}
|
||||||
HPC version.....: ${HAVE_HPC}
|
HPC version.....: ${HAVE_HPC}
|
||||||
|
OpenMP offload..: ${HAVE_OPENMP_OFFLOAD}
|
||||||
OpenACC offload.: ${HAVE_OPENACC_OFFLOAD}
|
OpenACC offload.: ${HAVE_OPENACC_OFFLOAD}
|
||||||
cuBLAS offload..: ${HAVE_CUBLAS_OFFLOAD}
|
cuBLAS offload..: ${HAVE_CUBLAS_OFFLOAD}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user