aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL.md2
-rw-r--r--Makefile28
2 files changed, 18 insertions, 12 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 32d37f3..de6558b 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -47,7 +47,7 @@ Install listed dependencies and run
if you get an Eigen error you may need to override the include
path. E.g. on GNU Guix with shared libs this may work
- make EIGEN_INCLUDE_PATH=~/.guix-profile/include/eigen3 FORCE_DYNAMIC=1
+ make EIGEN_INCLUDE_PATH=~/.guix-profile/include/eigen3 FORCE_DYNAMIC=1 WITH_OPENBLAS=1
to run GEMMA tests
diff --git a/Makefile b/Makefile
index a15c043..7fba573 100644
--- a/Makefile
+++ b/Makefile
@@ -10,11 +10,12 @@
# Set this variable to either LNX or MAC
SYS = LNX
# Leave blank after "=" to disable; put "= 1" to enable
-WITH_LAPACK = 1
+WITH_LAPACK = 1
+WITH_OPENBLAS =
NO_INTEL_COMPAT =
-FORCE_32BIT =
-FORCE_DYNAMIC =
-DIST_NAME = gemma-0.97
+FORCE_32BIT =
+FORCE_DYNAMIC =
+DIST_NAME = gemma-0.97
# --------------------------------------------------------------------
# Edit below this line with caution
@@ -31,7 +32,7 @@ CPP = g++
CPPFLAGS = -Wall -Weffc++ -O3 -std=gnu++11 -I$(EIGEN_INCLUDE_PATH)
ifdef FORCE_DYNAMIC
-LIBS = -lgsl -lgslcblas -lblas -pthread -lz
+LIBS = -lgsl -lgslcblas -pthread -lz
else
LIBS = -lgsl -lgslcblas -pthread -lz
endif
@@ -45,6 +46,8 @@ HDR =
# Detailed libary paths, D for dynamic and S for static
LIBS_LNX_D_LAPACK = -llapack
+LIBS_LNX_D_BLAS = -lblas
+LIBS_LNX_D_OPENBLAS = -lopenblas
LIBS_MAC_D_LAPACK = -framework Veclib
LIBS_LNX_S_LAPACK = /usr/lib/lapack/liblapack.a -lgfortran /usr/lib/atlas-base/libatlas.a /usr/lib/libblas/libblas.a -Wl,--allow-multiple-definition
@@ -56,11 +59,14 @@ ifdef WITH_LAPACK
ifeq ($(SYS), MAC)
LIBS += $(LIBS_MAC_D_LAPACK)
else
-ifdef FORCE_DYNAMIC
- LIBS += $(LIBS_LNX_D_LAPACK)
-else
- LIBS += $(LIBS_LNX_S_LAPACK)
-endif
+ ifdef FORCE_DYNAMIC
+ ifdef WITH_OPENBLAS
+ LIBS += $(LIBS_LNX_D_OPENBLAS)
+ else
+ LIBS += $(LIBS_LNX_D_BLAS)
+ endif
+ LIBS += $(LIBS_LNX_D_LAPACK)
+ endif
endif
SOURCES += $(SRC_DIR)/lapack.cpp
HDR += $(SRC_DIR)/lapack.h
@@ -95,7 +101,7 @@ $(OBJS) : $(HDR)
$(CPP) $(CPPFLAGS) $(HEADERS) -c $*.cpp -o $*.o
.SUFFIXES : .cpp .c .o $(SUFFIXES)
-check:
+check: all
./run_tests.sh
clean: