diff --git a/AMSS_NCKU_source/makefile.inc b/AMSS_NCKU_source/makefile.inc index 1918e73..8f3ac69 100755 --- a/AMSS_NCKU_source/makefile.inc +++ b/AMSS_NCKU_source/makefile.inc @@ -1,8 +1,14 @@ ## GCC version with OpenMPI and OpenBLAS -filein = -I/usr/include/ -I/usr/mpi/gcc/openmpi-4.1.9a1/include +OMPI_ROOT = /usr/mpi/gcc/openmpi-4.1.9a1 + +## Ensure mpicxx and final executables find OpenMPI libs at build- and runtime +export LD_LIBRARY_PATH := $(OMPI_ROOT)/lib64:$(LD_LIBRARY_PATH) + +filein = -I/usr/include/ -I$(OMPI_ROOT)/include ## OpenBLAS (OpenMP variant) + gfortran runtime -LDLIBS = -lopenblaso -lgfortran -lpthread -lm -ldl -lgomp +## -Wl,-rpath ensures ABE / TwoPunctureABE find libmpi at runtime without LD_LIBRARY_PATH +LDLIBS = -Wl,-rpath,$(OMPI_ROOT)/lib64 -lopenblaso -lgfortran -lpthread -lm -ldl -lgomp ## Memory allocator switch ## 0 (default) : use system default allocator (ptmalloc)