New bssn_em_rhs_c.C computes EM field RHS (E,B,Kpsi,Kphi) and stress-energy tensor, then calls the C BSSN RHS kernel with source terms. Replaces empart.f90 when USE_CXX_EM_KERNEL=1. Supports all ghost_width orders via existing derivative kernels. Controlled by USE_CXX_EM_KERNEL switch (default 0, experimental). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
89 lines
3.8 KiB
PHP
Executable File
89 lines
3.8 KiB
PHP
Executable File
## GCC version (commented out)
|
|
## filein = -I/usr/include -I/usr/lib/x86_64-linux-gnu/mpich/include -I/usr/lib/x86_64-linux-gnu/openmpi/lib/ -I/usr/lib/gcc/x86_64-linux-gnu/11/ -I/usr/include/c++/11/
|
|
## filein = -I/usr/include/ -I/usr/include/openmpi-x86_64/ -I/usr/lib/x86_64-linux-gnu/openmpi/include/ -I/usr/lib/x86_64-linux-gnu/openmpi/lib/ -I/usr/lib/gcc/x86_64-linux-gnu/11/ -I/usr/include/c++/11/
|
|
## LDLIBS = -L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/11 -lgfortran -lmpi -lgfortran
|
|
|
|
## Intel oneAPI version with oneMKL (Optimized for performance)
|
|
filein = -I/usr/include/ -I${MKLROOT}/include
|
|
|
|
## Using sequential MKL (OpenMP disabled for better single-threaded performance)
|
|
## Added -lifcore for Intel Fortran runtime and -limf for Intel math library
|
|
LDLIBS = -L${MKLROOT}/lib -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lifcore -limf -lpthread -lm -ldl -liomp5
|
|
|
|
## Memory allocator switch
|
|
## 1 (default) : link Intel oneTBB allocator (libtbbmalloc)
|
|
## 0 : use system default allocator (ptmalloc)
|
|
USE_TBBMALLOC ?= 1
|
|
TBBMALLOC_SO ?= /home/intel/oneapi/2025.3/lib/libtbbmalloc.so
|
|
ifneq ($(wildcard $(TBBMALLOC_SO)),)
|
|
TBBMALLOC_LIBS = -Wl,--no-as-needed $(TBBMALLOC_SO) -Wl,--as-needed
|
|
else
|
|
TBBMALLOC_LIBS = -Wl,--no-as-needed -ltbbmalloc -Wl,--as-needed
|
|
endif
|
|
ifeq ($(USE_TBBMALLOC),1)
|
|
LDLIBS := $(TBBMALLOC_LIBS) $(LDLIBS)
|
|
endif
|
|
|
|
## PGO build mode switch (ABE only; TwoPunctureABE always uses opt flags)
|
|
## opt : (default) maximum performance with PGO profile-guided optimization
|
|
## instrument : PGO Phase 1 instrumentation to collect fresh profile data
|
|
PGO_MODE ?= opt
|
|
|
|
## Interp_Points load balance profiling mode
|
|
## off : (default) no load balance instrumentation
|
|
## profile : Pass 1 — instrument Interp_Points to collect timing profile
|
|
## optimize : Pass 2 — read profile and apply block rebalancing
|
|
INTERP_LB_MODE ?= off
|
|
|
|
ifeq ($(INTERP_LB_MODE),profile)
|
|
INTERP_LB_FLAGS = -DINTERP_LB_PROFILE
|
|
else ifeq ($(INTERP_LB_MODE),optimize)
|
|
INTERP_LB_FLAGS = -DINTERP_LB_OPTIMIZE
|
|
else
|
|
INTERP_LB_FLAGS =
|
|
endif
|
|
|
|
## Kernel implementation switch
|
|
## 1 (default) : use C++ rewrite of bssn_rhs and helper kernels (faster)
|
|
## 0 : fall back to original Fortran kernels
|
|
USE_CXX_KERNELS ?= 1
|
|
|
|
## Z4C Cartesian RHS kernel switch
|
|
## 1 (default) : use C++ rewrite of Z4c_rhs (main Cartesian path faster)
|
|
## 0 : use original Fortran Z4c_rhs.o
|
|
USE_CXX_Z4C_KERNELS ?= 1
|
|
|
|
## BSSN-EScalar RHS switch
|
|
## 1 (default) : use BSSN-EScalar C wrapper on the normal patch path
|
|
## 0 : keep the original Fortran BSSN-EScalar RHS for precision-safe runs
|
|
## Note: this requires USE_CXX_KERNELS=1 because the wrapper reuses the C BSSN kernel.
|
|
USE_CXX_ESCALAR_KERNEL ?= 1
|
|
|
|
## BSSN-EM RHS switch
|
|
## 1 : use BSSN-EM C kernel (bssn_em_rhs_c.C) on the normal patch path
|
|
## 0 : keep the original Fortran empart.f90 RHS for the EM fields (default)
|
|
## Note: experimental, requires USE_CXX_KERNELS=1
|
|
USE_CXX_EM_KERNEL ?= 0
|
|
|
|
## Cached transfer switch
|
|
## auto (default): enable for BSSN vacuum, keep other paths on the safe uncached path
|
|
## 1 : force cached Sync/Restrict/OutBd transfer on evolution hot paths
|
|
## 0 : force the original uncached transfer path
|
|
USE_TRANSFER_CACHE ?= auto
|
|
|
|
## RK4 kernel implementation switch
|
|
## 1 (default) : use C/C++ rewrite of rungekutta4_rout (for optimization experiments)
|
|
## 0 : use original Fortran rungekutta4_rout.o
|
|
USE_CXX_RK4 ?= 1
|
|
|
|
f90 = ifx
|
|
f77 = ifx
|
|
CXX = icpx
|
|
CC = icx
|
|
CLINKER = mpiicpx
|
|
|
|
Cu = nvcc
|
|
CUDA_LIB_PATH = -L/usr/lib/cuda/lib64 -I/usr/include -I/usr/lib/cuda/include
|
|
#CUDA_APP_FLAGS = -c -g -O3 --ptxas-options=-v -arch compute_13 -code compute_13,sm_13 -Dfortran3 -Dnewc
|
|
CUDA_APP_FLAGS = -c -g -O3 --ptxas-options=-v -Dfortran3 -Dnewc
|