From 383c6ac78af4eaa0b4dc869aba9f4b80c9aad5d7 Mon Sep 17 00:00:00 2001 From: Aurelien Delval Date: Mon, 28 Mar 2022 07:58:01 +0200 Subject: [PATCH] Add OFFLOAD_FLAGS, OFFLOAD_CFLAGS and OFFLOAD_FCFLAGS vars to configure --- configure.ac | 3 +++ org/qmckl_jastrow.org | 2 ++ 2 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 668fe2a..2993873 100644 --- a/configure.ac +++ b/configure.ac @@ -235,10 +235,13 @@ if test "$FC" = "verificarlo-f"; then fi # Enable GPU offloading + # OpenMP offloading AC_ARG_ENABLE(openmp-offload, [AS_HELP_STRING([--openmp-offload],[Use OpenMP-offloaded functions])], HAVE_OPENMP_OFFLOAD=$enableval, HAVE_OPENMP_OFFLOAD=no) AS_IF([test "$HAVE_OPENMP_OFFLOAD" = "yes"], [ AC_DEFINE([HAVE_OPENMP_OFFLOAD], [1], [If defined, activate OpenMP-offloaded routines]) + CFLAGS="$OFFLOAD_FLAGS $OFFLOAD_CFLAGS $CFLAGS" + FCFLAGS="$OFFLOAD_FLAGS $OFFLOAD_FCFLAGS -DHAVE_OPENMP_OFFLOAD $FCFLAGS" ]) AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[compile for debugging])], ok=$enableval, ok=no) diff --git a/org/qmckl_jastrow.org b/org/qmckl_jastrow.org index f97464b..cf0903c 100644 --- a/org/qmckl_jastrow.org +++ b/org/qmckl_jastrow.org @@ -6654,6 +6654,7 @@ integer function qmckl_compute_factor_een_deriv_e_omp_offload_f(context, walk_nu factor_een_deriv_e = 0.0d0 do nw =1, walk_num + !$omp target do n = 1, dim_cord_vect l = lkpm_combined_index(n, 1) k = lkpm_combined_index(n, 2) @@ -6688,6 +6689,7 @@ integer function qmckl_compute_factor_een_deriv_e_omp_offload_f(context, walk_nu end do end do end do + !$omp end target end do end function qmckl_compute_factor_een_deriv_e_omp_offload_f