corrected to consistent naming: "IMKL"

restored xxxROOT to commented-out auto entries.
commented-out currently unused PETSC parts.
added "refblas" and "tmglib" to LAPACK library inclusion (seems to be necessary since 3.2.1).
This commit is contained in:
Philip Eisenlohr 2012-07-03 12:36:54 +00:00
parent b30584b8d7
commit 7f10ab0996
2 changed files with 28 additions and 26 deletions

View File

@ -4,20 +4,23 @@ SHELL = /bin/sh
########################################################################################
# Be sure to remove all files compiled with different options by using "make clean"
#
# Uses OpenMP to parallelize the material subroutines (set number of threads with "export DAMASK_NUM_THREADS=n" to n)
# Uses OpenMP to parallelize the material subroutines
# (set number of threads with "export DAMASK_NUM_THREADS=n" to n)
#
# Install fftw3 (v3.3 is tested):
# + run
# + execute
# ./configure --enable-threads --enable-sse2 --enable-shared [-enable-float]
# make
# make install
# + specify in the "pathinfo:FFTW" where FFTW was installed.
# We essentially look for two library files "lib/libfftw3_threads" and "lib/libfftw3", so you can copy those, for instance,
# We essentially look for two library files "lib/libfftw3_threads" and "lib/libfftw3",
# so you can copy those, for instance,
# into DAMASK_ROOT/lib/fftw/lib/ and specify "./fftw/" as pathinfo:FFTW
# Use --enable-float in above configure for single precision...
# Uses linux threads to parallelize fftw3
#
# Instead of the AMD Core Math Library a standard "liblapack.a/dylib/etc." can be used by leaving pathinfo:ACML and pathinfo:IKML blank
# Instead of the AMD Core Math Library a standard "lib(64)/liblapack.a/dylib/etc." can be used.
# leave pathinfo:ACML and pathinfo:IKML blank, but specify as pathinfo:LAPACK where the library folder is located
########################################################################################
# OPTIONS = standard (alternative): meaning
#-------------------------------------------------------------
@ -27,7 +30,7 @@ SHELL = /bin/sh
# OPTIMIZATION = DEFENSIVE (OFF,AGGRESSIVE,ULTRA): Optimization mode: O2, O0, O3 + further options for most files, O3 + further options for all files
# OPENMP = TRUE (FALSE): OpenMP multiprocessor support
# FFTWROOT = pathinfo:FFTW (will be adjusted by setup_code.py - required in pathinfo)
# IKMLROOT = pathinfo:IKML (will be adjusted by setup_code.py if present in pathinfo)
# IMKLROOT = pathinfo:IMKL (will be adjusted by setup_code.py if present in pathinfo)
# ACMLROOT = pathinfo:ACML (will be adjusted by setup_code.py if present in pathinfo)
# LAPACKROOT = pathinfo:LAPACK (will be adjusted by setup_code.py if present in pathinfo)
# PREFIX = arbitrary prefix
@ -36,25 +39,20 @@ SHELL = /bin/sh
########################################################################################
#auto values will be set by setup_code.py
FFTWROOT :=$(DAMASK_ROOT)/lib/fftw
#IKMLROOT :=/opt/intel/composerxe/mkl
#ACMLROOT :=/opt/acml4.4.0
LAPACKROOT :=/usr
#FFTWROOT := auto
#IMKLROOT := auto
#ACMLROOT := auto
#LAPACKROOT := auto
F90 ?=ifort
F90 ?= ifort
COMPILERNAME ?= $(F90)
INCLUDE_DIRS +=-I$(DAMASK_ROOT)/lib
ifdef PETSC_DIR
include ${PETSC_DIR}/conf/variables
INCLUDE_DIRS +=${PETSC_FC_INCLUDES} -DPETSC
LIBRARIES +=${PETSC_WITH_EXTERNAL_LIB}
endif
ifeq "$(FASTBUILD)" "YES"
OPENMP :=OFF
OPTIMIZATION :=OFF
OPENMP := OFF
OPTIMIZATION := OFF
else
OPENMP ?= ON
OPTIMIZATION ?= DEFENSIVE
@ -96,21 +94,25 @@ LIBRARIES +=-lfftw3_threads -lpthread
endif
LIBRARIES +=-lfftw3
LIB_DIRS +=-L$(FFTWROOT)/lib
LIB_DIRS +=-L$(FFTWROOT)/lib
ifdef IKMLROOT
#ifdef PETSC_DIR
#include ${PETSC_DIR}/conf/variables
#INCLUDE_DIRS +=${PETSC_FC_INCLUDES} -DPETSC
#LIBRARIES +=${PETSC_WITH_EXTERNAL_LIB}
#endif
ifdef IMKLROOT
LIB_DIRS +=-L$(IMKLROOT)/lib/intel64
LIBRARIES +=-mkl
LIBRARIES +=-L$(IKMLROOT)/lib/intel64
else
ifdef ACMLROOT
LIB_DIRS +=-L$(ACMLROOT)/$(F90)64$(ACML_ARCH)/lib
LIB_DIRS +=-L$(ACMLROOT)/$(F90)64$(ACML_ARCH)/lib
LIBRARIES +=-lacml$(ACML_ARCH)
else
ifdef LAPACKROOT
LIB_DIRS +=-L$(LAPACKROOT)/lib64 -L$(LAPACKROOT)/lib
LIBRARIES +=-llapack
endif
endif
LIB_DIRS +=-L$(LAPACKROOT)/lib64 -L$(LAPACKROOT)/lib
LIBRARIES +=-llapack -lrefblas -ltmglib
endif
ifdef STANDARD_CHECK

View File

@ -75,7 +75,7 @@ content = makefile.readlines()
makefile.close()
makefile = open(os.path.join(baseDir,'Makefile'),'w')
for line in content:
m = re.match(r'(FFTW|IKML|ACML|LAPACK)ROOT\s*:?=',line)
m = re.match(r'(FFTW|IMKL|ACML|LAPACK)ROOT\s*:?=',line)
if m:
if m.group(1).lower() in damaskEnv.pathInfo:
substitution = damaskEnv.pathInfo[m.group(1).lower()]