From 0a1b13399c52b41e33e83e4ebe315f015e2d34b5 Mon Sep 17 00:00:00 2001 From: Jeff Hammond Date: Fri, 6 Oct 2023 17:29:32 +0300 Subject: [PATCH] move makefile include to the top so we can use its vars --- src/tce/ccsd/GNUmakefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/tce/ccsd/GNUmakefile b/src/tce/ccsd/GNUmakefile index 5a0c2edb7f..4fb3430739 100644 --- a/src/tce/ccsd/GNUmakefile +++ b/src/tce/ccsd/GNUmakefile @@ -1,5 +1,7 @@ #$Id$ +include ../../config/makefile.h + OBJ_OPTIMIZE = ccsd_e.o ccsd_t1.o ccsd_t2.o cc2_t1.o cc2_t2.o \ ccsd_1prdm.o ccsd_1prdm_hh.o ccsd_1prdm_hp.o \ ccsd_1prdm_ph.o ccsd_1prdm_pp.o \ @@ -21,6 +23,17 @@ LIB_DEFINES = -DDEBUG_PRINT # This replaces 3*TCE_SORT4+DGEMM with 6D loops (ccsd_kernels.F). #LIB_DEFINES += -DUSE_LOOPS_NOT_DGEMM +# replace this with something better later +ifdef USE_OPENACC_TRPDRV + FOPTIONS += -DUSE_TCE_CUBLAS + ifeq ($(_FC),pgf90) + FOPTIONS += -Mextend -acc -cuda -cudalib=cublas + endif + ifeq ($(_FC),gfortran) + FOPTIONS += -ffree-form -fopenacc -lcublas + endif +endif + # # Possible #defines # @@ -32,6 +45,5 @@ LIB_DEFINES = -DDEBUG_PRINT HEADERS = -include ../../config/makefile.h include ../../config/makelib.h