Fix BSSN build config selection
This commit is contained in:
@@ -2,7 +2,31 @@
|
||||
|
||||
include makefile.inc
|
||||
|
||||
-include AMSS_NCKU_build.mk
|
||||
|
||||
ABE_TYPE ?= $(shell awk '/^[[:space:]]*\#define[[:space:]]+ABEtype/ {print $$3; exit}' macrodef.h 2>/dev/null)
|
||||
|
||||
ifeq ($(USE_TRANSFER_CACHE),auto)
|
||||
ifeq ($(ABE_TYPE),0)
|
||||
EFFECTIVE_USE_TRANSFER_CACHE = 1
|
||||
else
|
||||
EFFECTIVE_USE_TRANSFER_CACHE = 0
|
||||
endif
|
||||
else
|
||||
EFFECTIVE_USE_TRANSFER_CACHE = $(USE_TRANSFER_CACHE)
|
||||
endif
|
||||
|
||||
ifeq ($(USE_CXX_ESCALAR_KERNEL),1)
|
||||
ifeq ($(ABE_TYPE),1)
|
||||
EFFECTIVE_USE_CXX_ESCALAR_KERNEL = 1
|
||||
else
|
||||
EFFECTIVE_USE_CXX_ESCALAR_KERNEL = 0
|
||||
endif
|
||||
else
|
||||
EFFECTIVE_USE_CXX_ESCALAR_KERNEL = 0
|
||||
endif
|
||||
|
||||
ifeq ($(EFFECTIVE_USE_CXX_ESCALAR_KERNEL),1)
|
||||
ifeq ($(USE_CXX_KERNELS),0)
|
||||
$(error USE_CXX_ESCALAR_KERNEL=1 requires USE_CXX_KERNELS=1 because bssn_escalar_rhs_c.C reuses the C BSSN kernel)
|
||||
endif
|
||||
@@ -13,8 +37,8 @@ endif
|
||||
## 0 : fallback to Neville path
|
||||
POLINT6_USE_BARY ?= 1
|
||||
POLINT6_FLAG = -DPOLINT6_USE_BARYCENTRIC=$(POLINT6_USE_BARY)
|
||||
TRANSFER_CACHE_FLAG = -DBSSN_USE_TRANSFER_CACHE=$(USE_TRANSFER_CACHE)
|
||||
ESCALAR_KERNEL_FLAG = -DBSSN_USE_ESCALAR_C_KERNEL=$(USE_CXX_ESCALAR_KERNEL)
|
||||
TRANSFER_CACHE_FLAG = -DBSSN_USE_TRANSFER_CACHE=$(EFFECTIVE_USE_TRANSFER_CACHE)
|
||||
ESCALAR_KERNEL_FLAG = -DBSSN_USE_ESCALAR_C_KERNEL=$(EFFECTIVE_USE_CXX_ESCALAR_KERNEL)
|
||||
|
||||
## ABE build flags selected by PGO_MODE (set in makefile.inc, default: opt)
|
||||
## make -> opt (PGO-guided, maximum performance)
|
||||
@@ -98,7 +122,7 @@ CFILES =
|
||||
else
|
||||
# C++ mode (default): C rewrite of bssn/bssn-escalar rhs and helper kernels
|
||||
CFILES = bssn_rhs_c.o fderivs_c.o fdderivs_c.o kodiss_c.o lopsided_c.o lopsided_kodis_c.o
|
||||
ifeq ($(USE_CXX_ESCALAR_KERNEL),1)
|
||||
ifeq ($(EFFECTIVE_USE_CXX_ESCALAR_KERNEL),1)
|
||||
CFILES += bssn_escalar_rhs_c.o
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user