code setup now takes BLAS in order of precedence from IKML, ACML, and LAPACK.
Leave pathinfo blank for BLAS-options that are not available (like IKML typically)
This commit is contained in:
parent
8be14ef72e
commit
b0ba5f7ba3
|
@ -60,15 +60,14 @@ DEBUG5 =-stand std03/std95
|
|||
########################################################################################
|
||||
|
||||
#auto values will be set by setup_code.py
|
||||
FFTWROOT := auto
|
||||
ACMLROOT := auto
|
||||
FFTWROOT :=
|
||||
IKMLROOT :=
|
||||
ACMLROOT :=
|
||||
LAPACKROOT :=
|
||||
|
||||
F90 ?= ifort
|
||||
|
||||
COMPILERNAME ?= $(F90)
|
||||
|
||||
OPENMP ?= ON
|
||||
|
||||
OPTIMIZATION ?= DEFENSIVE
|
||||
|
||||
ifeq "$(OPTIMIZATION)" "OFF"
|
||||
|
@ -115,12 +114,19 @@ endif
|
|||
LIBRARIES += -lfftw3$(FFTWPREC)
|
||||
LIB_DIRS += -L$(FFTWROOT)/lib
|
||||
|
||||
ifdef IKMLROOT
|
||||
LIBRARIES += -mkl
|
||||
else
|
||||
ifdef ACMLROOT
|
||||
LIB_DIRS += -L$(ACMLROOT)/$(F90)64$(ACML_ARCH)/lib
|
||||
LIBRARIES += -lacml$(ACML_ARCH)
|
||||
else
|
||||
ifdef LAPACKROOT
|
||||
LIB_DIRS += -L$(LAPACKROOT)/lib -L$(LAPACKROOT)/lib64
|
||||
LIBRARIES += -llapack
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
OPTIMIZATION_OFF_ifort :=-O0
|
||||
|
|
|
@ -43,9 +43,14 @@ content = makefile.readlines()
|
|||
makefile.close()
|
||||
makefile = open(os.path.join(baseDir,'makefile'),'w')
|
||||
for line in content:
|
||||
m = re.match(r'(FFTW|ACML)ROOT\s*:?=',line)
|
||||
if m: line = '%sROOT := %s\n'%(m.group(1),damaskEnv.pathInfo[m.group(1).lower()])
|
||||
makefile.writelines(line)
|
||||
m = re.match(r'(FFTW|IKML|ACML|LAPACK)ROOT\s*:?=',line)
|
||||
if m:
|
||||
if m.group(1).lower() in damaskEnv.pathInfo:
|
||||
substitution = damaskEnv.pathInfo[m.group(1).lower()]
|
||||
else:
|
||||
substitution = ''
|
||||
line = '%sROOT := %s\n'%(m.group(1),substitution)
|
||||
makefile.write(line)
|
||||
makefile.close()
|
||||
|
||||
# compiling spectral code
|
||||
|
|
Loading…
Reference in New Issue