Replace MKL with OpenBLAS
- TwoPunctures.C: <mkl_cblas.h> → <cblas.h>
- gaussj.C: <mkl_lapacke.h> → <lapacke.h>
- makefile.inc: use -lopenblaso, remove MKLROOT dependency
- makefile: remove -I${MKLROOT}/include from all flag variables
- Add OpenMPI include path to filein (needed since g++ is used for .C
compilation, not the mpicxx wrapper)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ using namespace std;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "TwoPunctures.h"
|
#include "TwoPunctures.h"
|
||||||
#include <mkl_cblas.h>
|
#include <cblas.h>
|
||||||
|
|
||||||
TwoPunctures::TwoPunctures(double mp, double mm, double b,
|
TwoPunctures::TwoPunctures(double mp, double mm, double b,
|
||||||
double P_plusx, double P_plusy, double P_plusz,
|
double P_plusx, double P_plusy, double P_plusz,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using namespace std;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Intel oneMKL LAPACK interface
|
// Intel oneMKL LAPACK interface
|
||||||
#include <mkl_lapacke.h>
|
#include <lapacke.h>
|
||||||
/* Linear equation solution using Intel oneMKL LAPACK.
|
/* Linear equation solution using Intel oneMKL LAPACK.
|
||||||
a[0..n-1][0..n-1] is the input matrix. b[0..n-1] is input
|
a[0..n-1][0..n-1] is the input matrix. b[0..n-1] is input
|
||||||
containing the right-hand side vectors. On output a is
|
containing the right-hand side vectors. On output a is
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ ESCALAR_KERNEL_FLAG = -DBSSN_USE_ESCALAR_C_KERNEL=$(EFFECTIVE_USE_CXX_ESCALAR_KE
|
|||||||
## GCC build flags (optimized for x86-64-v4)
|
## GCC build flags (optimized for x86-64-v4)
|
||||||
## PGO disabled (used negative optimization on Intel; not tested on GCC)
|
## PGO disabled (used negative optimization on Intel; not tested on GCC)
|
||||||
CXXAPPFLAGS = -O3 -march=x86-64-v4 -ffast-math -mfma -flto \
|
CXXAPPFLAGS = -O3 -march=x86-64-v4 -ffast-math -mfma -flto \
|
||||||
-Dfortran3 -Dnewc -I${MKLROOT}/include $(INTERP_LB_FLAGS) \
|
-Dfortran3 -Dnewc $(INTERP_LB_FLAGS) \
|
||||||
$(TRANSFER_CACHE_FLAG) $(ESCALAR_KERNEL_FLAG)
|
$(TRANSFER_CACHE_FLAG) $(ESCALAR_KERNEL_FLAG)
|
||||||
f90appflags = -O3 -march=x86-64-v4 -ffast-math -mfma -flto \
|
f90appflags = -O3 -march=x86-64-v4 -ffast-math -mfma -flto \
|
||||||
-cpp -I${MKLROOT}/include $(POLINT6_FLAG)
|
-cpp $(POLINT6_FLAG)
|
||||||
|
|
||||||
.SUFFIXES: .o .f90 .C .for .cu
|
.SUFFIXES: .o .f90 .C .for .cu
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ z4c_rhs_c.o: z4c_rhs_c.C
|
|||||||
|
|
||||||
## TwoPunctureABE flags (no PGO; PGO was negative optimization)
|
## TwoPunctureABE flags (no PGO; PGO was negative optimization)
|
||||||
TP_OPTFLAGS = -O3 -march=x86-64-v4 -ffast-math -mfma -flto \
|
TP_OPTFLAGS = -O3 -march=x86-64-v4 -ffast-math -mfma -flto \
|
||||||
-Dfortran3 -Dnewc -I${MKLROOT}/include
|
-Dfortran3 -Dnewc
|
||||||
|
|
||||||
TwoPunctures.o: TwoPunctures.C
|
TwoPunctures.o: TwoPunctures.C
|
||||||
${CXX} $(TP_OPTFLAGS) -fopenmp -c $< -o $@
|
${CXX} $(TP_OPTFLAGS) -fopenmp -c $< -o $@
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
## GCC version with OpenMPI and oneMKL
|
## GCC version with OpenMPI and OpenBLAS
|
||||||
filein = -I/usr/include/ -I${MKLROOT}/include
|
filein = -I/usr/include/ -I/usr/mpi/gcc/openmpi-4.1.9a1/include
|
||||||
|
|
||||||
## Using MKL with gfortran interface (-lmkl_gf_lp64 instead of -lmkl_intel_lp64)
|
## OpenBLAS (OpenMP variant) + gfortran runtime
|
||||||
LDLIBS = -L${MKLROOT}/lib -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lgfortran -lpthread -lm -ldl -lgomp
|
LDLIBS = -lopenblaso -lgfortran -lpthread -lm -ldl -lgomp
|
||||||
|
|
||||||
## Memory allocator switch
|
## Memory allocator switch
|
||||||
## 0 (default) : use system default allocator (ptmalloc)
|
## 0 (default) : use system default allocator (ptmalloc)
|
||||||
|
|||||||
Reference in New Issue
Block a user