Skip to content
Snippets Groups Projects
Commit eb311aef authored by JanThorbecke's avatar JanThorbecke
Browse files

updating MKL interface

parent e8ae2f41
No related branches found
No related tags found
No related merge requests found
...@@ -19,12 +19,12 @@ L = $(ROOT)/lib ...@@ -19,12 +19,12 @@ L = $(ROOT)/lib
#GNU #GNU
#CC = gcc-mp-5 #CC = gcc-mp-5
CC = gcc #CC = gcc
FC = gfortran #FC = gfortran
# Linux gcc version 4.x # Linux gcc version 4.x
OPTC = -O3 -ffast-math #OPTC = -O3 -ffast-math
#to include parallelisation with OpenMP #to include parallelisation with OpenMP
OPTC += -fopenmp #OPTC += -fopenmp
# for better performing code you can try: # for better performing code you can try:
#OPTC = -O3 -fno-trapping-math -ffast-math -funroll-all-loops -mavx -fomit-frame-pointer -mfpmath=sse -ftree-vectorizer-verbose=1 #OPTC = -O3 -fno-trapping-math -ffast-math -funroll-all-loops -mavx -fomit-frame-pointer -mfpmath=sse -ftree-vectorizer-verbose=1
...@@ -83,7 +83,9 @@ LDFLAGS = -Ofast ...@@ -83,7 +83,9 @@ LDFLAGS = -Ofast
############################################################################# #############################################################################
# BLAS and LAPACK libraries # BLAS and LAPACK libraries
# and FFT LIBRARIES
MKLLIB=${MKLROOT}/lib MKLLIB=${MKLROOT}/lib
OPTC += -DMKL -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
#for GNU compilers #for GNU compilers
#you might need to add intel64 to : ${MKLROOT}/lib/intel64 #you might need to add intel64 to : ${MKLROOT}/lib/intel64
#BLAS = -L${MKLROOT}/lib/ -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl #BLAS = -L${MKLROOT}/lib/ -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
...@@ -96,27 +98,14 @@ BLAS = -Wl,-rpath ${MKLLIB} -L${MKLROOT}/lib/ -lmkl_intel_lp64 -lmkl_sequential ...@@ -96,27 +98,14 @@ BLAS = -Wl,-rpath ${MKLLIB} -L${MKLROOT}/lib/ -lmkl_intel_lp64 -lmkl_sequential
#BLAS = -mkl #BLAS = -mkl
############################################################################# #############################################################################
# FOR FFT LIBRARIES # AMD ACML 4.4.0
#AMD ACML 4.4.0
#AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64 #AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64
#OPTC += -DACML440 -I$(AMDROOT)/include #OPTC += -DACML440 -I$(AMDROOT)/include
#BLAS = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm #BLAS = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm
#Intel MKL #Intel MKL
MKLLIB=${MKLROOT}/lib
OPTC += -DMKL -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
#for GNU compilers
#FFT = -Wl,-rpath ${MKLLIB} -L${MKLLIB} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#for clang on OSX
FFT = -L${MKLROOT}/lib/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#on linux you want to use groups and MKL is in lib/intel64
#MKLLIB=${MKLROOT}/lib/intel64
#FFT = -Wl,-rpath ${MKLLIB} -Wl,--start-group -L${MKLLIB} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread -lm -ldl
#for Intel compilers
#FFT = -Wl,-rpath ${MKLLIB} -L${MKLLIB} -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#LIBARIES #LIBARIES
LIBS= -L$L -lgenfft $(FFT) $(BLAS) LIBS= -L$L -lgenfft $(BLAS)
######################################################################## ########################################################################
# standard CFLAGS # standard CFLAGS
......
...@@ -83,13 +83,15 @@ OPTC += -fopenmp ...@@ -83,13 +83,15 @@ OPTC += -fopenmp
############################################################################# #############################################################################
# BLAS and LAPACK libraries # BLAS and LAPACK libraries
MKLROOT=/opt/intel/mkl/ # and FFT LIBRARIES
#MKLROOT=/opt/intel/mkl/
MKLLIB=${MKLROOT}/lib MKLLIB=${MKLROOT}/lib
OPTC += -DMKL -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
#for GNU compilers #for GNU compilers
#you might need to add intel64 to : ${MKLROOT}/lib/intel64 #you might need to add intel64 to : ${MKLROOT}/lib/intel64
BLAS = -L${MKLROOT}/lib/ -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl BLAS = -L${MKLROOT}/lib/ -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#for GNU on OSX #for GNU/clang on OSX
#BLAS = -L${MKLROOT}/lib/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl #BLAS = -Wl,-rpath ${MKLLIB} -L${MKLROOT}/lib/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#on linux you want to use groups and MKL is in lib/intel64 #on linux you want to use groups and MKL is in lib/intel64
#MKLLIB=${MKLROOT}/lib/intel64 #MKLLIB=${MKLROOT}/lib/intel64
#BLAS = -Wl,-rpath ${MKLLIB} -Wl,--start-group -L${MKLLIB} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread -lm -ldl #BLAS = -Wl,-rpath ${MKLLIB} -Wl,--start-group -L${MKLLIB} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread -lm -ldl
...@@ -97,27 +99,13 @@ BLAS = -L${MKLROOT}/lib/ -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm ...@@ -97,27 +99,13 @@ BLAS = -L${MKLROOT}/lib/ -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm
#BLAS = -mkl #BLAS = -mkl
############################################################################# #############################################################################
# FOR FFT LIBRARIES # AMD ACML 4.4.0
#AMD ACML 4.4.0
#AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64 #AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64
#OPTC += -DACML440 -I$(AMDROOT)/include #OPTC += -DACML440 -I$(AMDROOT)/include
#BLAS = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm #BLAS = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm
#Intel MKL
MKLROOT=/opt/intel/mkl/
MKLLIB=${MKLROOT}/lib
OPTC += -DMKL -I$(MKLROOT)/include
#for GNU compilers
FFT = -Wl,-rpath ${MKLLIB} -L${MKLLIB} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#for GNU on OSX
#FFT = -L${MKLROOT}/lib/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#on linux you want to use groups and MKL is in lib/intel64
#MKLLIB=${MKLROOT}/lib/intel64
#FFT = -Wl,-rpath ${MKLLIB} -Wl,--start-group -L${MKLLIB} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread -lm -ldl
#for Intel compilers
#FFT = -Wl,-rpath ${MKLLIB} -L${MKLLIB} -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#LIBARIES #LIBARIES
LIBS= -L$L -lgenfft $(FFT) $(BLAS) LIBS= -L$L -lgenfft $(BLAS)
######################################################################## ########################################################################
......
...@@ -6,7 +6,7 @@ include ../Make_include ...@@ -6,7 +6,7 @@ include ../Make_include
#OPTC += -g -O0 -Wall #OPTC += -g -O0 -Wall
ALL: fmute marchenko marchenko_primaries ALL: fmute marchenko #marchenko_primaries
SRCJ = fmute.c \ SRCJ = fmute.c \
getFileInfo.c \ getFileInfo.c \
...@@ -35,20 +35,20 @@ SRCH = marchenko.c \ ...@@ -35,20 +35,20 @@ SRCH = marchenko.c \
docpkge.c \ docpkge.c \
getpars.c getpars.c
SRCP = marchenko_primaries.c \ #SRCP = marchenko_primaries.c \
synthesis.c \ # synthesis.c \
getFileInfo.c \ # getFileInfo.c \
readData.c \ # readData.c \
readShotData.c \ # readShotData.c \
readTinvData.c \ # readTinvData.c \
writeData.c \ # writeData.c \
writeDataIter.c \ # writeDataIter.c \
wallclock_time.c \ # wallclock_time.c \
name_ext.c \ # name_ext.c \
verbosepkg.c \ # verbosepkg.c \
atopkge.c \ # atopkge.c \
docpkge.c \ # docpkge.c \
getpars.c # getpars.c
OBJJ = $(SRCJ:%.c=%.o) OBJJ = $(SRCJ:%.c=%.o)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment