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
#GNU
#CC = gcc-mp-5
CC = gcc
FC = gfortran
#CC = gcc
#FC = gfortran
# Linux gcc version 4.x
OPTC = -O3 -ffast-math
#OPTC = -O3 -ffast-math
#to include parallelisation with OpenMP
OPTC += -fopenmp
#OPTC += -fopenmp
# 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
......@@ -83,7 +83,9 @@ LDFLAGS = -Ofast
#############################################################################
# BLAS and LAPACK libraries
# and FFT LIBRARIES
MKLLIB=${MKLROOT}/lib
OPTC += -DMKL -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
#for GNU compilers
#you might need to add intel64 to : ${MKLROOT}/lib/intel64
#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
#BLAS = -mkl
#############################################################################
# FOR FFT LIBRARIES
#AMD ACML 4.4.0
# AMD ACML 4.4.0
#AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64
#OPTC += -DACML440 -I$(AMDROOT)/include
#BLAS = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm
#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
LIBS= -L$L -lgenfft $(FFT) $(BLAS)
LIBS= -L$L -lgenfft $(BLAS)
########################################################################
# standard CFLAGS
......
......@@ -83,13 +83,15 @@ OPTC += -fopenmp
#############################################################################
# BLAS and LAPACK libraries
MKLROOT=/opt/intel/mkl/
# and FFT LIBRARIES
#MKLROOT=/opt/intel/mkl/
MKLLIB=${MKLROOT}/lib
OPTC += -DMKL -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
#for GNU compilers
#you might need to add intel64 to : ${MKLROOT}/lib/intel64
BLAS = -L${MKLROOT}/lib/ -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#for GNU on OSX
#BLAS = -L${MKLROOT}/lib/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#for GNU/clang on OSX
#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
#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
......@@ -97,27 +99,13 @@ BLAS = -L${MKLROOT}/lib/ -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm
#BLAS = -mkl
#############################################################################
# FOR FFT LIBRARIES
#AMD ACML 4.4.0
# AMD ACML 4.4.0
#AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64
#OPTC += -DACML440 -I$(AMDROOT)/include
#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
LIBS= -L$L -lgenfft $(FFT) $(BLAS)
LIBS= -L$L -lgenfft $(BLAS)
########################################################################
......
......@@ -6,7 +6,7 @@ include ../Make_include
#OPTC += -g -O0 -Wall
ALL: fmute marchenko marchenko_primaries
ALL: fmute marchenko #marchenko_primaries
SRCJ = fmute.c \
getFileInfo.c \
......@@ -35,20 +35,20 @@ SRCH = marchenko.c \
docpkge.c \
getpars.c
SRCP = marchenko_primaries.c \
synthesis.c \
getFileInfo.c \
readData.c \
readShotData.c \
readTinvData.c \
writeData.c \
writeDataIter.c \
wallclock_time.c \
name_ext.c \
verbosepkg.c \
atopkge.c \
docpkge.c \
getpars.c
#SRCP = marchenko_primaries.c \
# synthesis.c \
# getFileInfo.c \
# readData.c \
# readShotData.c \
# readTinvData.c \
# writeData.c \
# writeDataIter.c \
# wallclock_time.c \
# name_ext.c \
# verbosepkg.c \
# atopkge.c \
# docpkge.c \
# getpars.c
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