diff --git a/code/makefile b/code/makefile index 865e5f73a..ecec7444b 100644 --- a/code/makefile +++ b/code/makefile @@ -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 diff --git a/code/setup/setup_code.py b/code/setup/setup_code.py index 7638d2d3c..e4b628f9d 100755 --- a/code/setup/setup_code.py +++ b/code/setup/setup_code.py @@ -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