add support for IBM POWER9 HPC ppc64le
@@ -18,6 +18,8 @@ MAKEFLAGS += -R
# use for parallel make
AR=./ar_lock.sh
+# use for ppc64le HPC
+HPC?=0
MKL?=0
CUDA?=0
ACML?=0
@@ -47,6 +49,10 @@ NNAME = $(shell uname -n)
MYLINK=ln
+ifneq (,$(findstring ppc64le,$(shell uname -r)))
+ HPC = 1
+endif
+
ifeq ($(UNAME),Darwin)
BUILDTYPE = MacOSX
MYLINK = ln -s
@@ -343,7 +349,9 @@ endif
# BLAS/LAPACK
-
+ifeq ($(HPC),1)
+BLAS_L := -lopenblas -lscalapack
+else
ifeq ($(ACML),1)
BLAS_H := -I$(ACML_BASE)/include
BLAS_L := -L$(ACML_BASE)/lib -lgfortran -lacml_mp -Wl,-rpath $(ACML_BASE)/lib
@@ -361,6 +369,7 @@ BLAS_L := -L$(BLAS_BASE)/lib -llapacke -lblas
endif
endif
endif
+endif
ifeq ($(MKL),1)
BLAS_H := -I$(MKL_BASE)/include
@@ -445,11 +454,15 @@ endif
# change for static linking
ifeq ($(SLINK),1)
+ifeq ($(HPC),1)
+BLAS_L += -lgfortran -lquadmath
+else
# work around fortran problems with static linking
LDFLAGS += -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -Wl,--allow-multiple-definition
LIBS += -lmvec
BLAS_L += -llapack -lblas -lgfortran -lquadmath
endif
+endif
