From 43fec193fec4a353f094f71d06537f0f8109cc9a Mon Sep 17 00:00:00 2001 From: Jan Thorbecke <janth@xs4all.nl> Date: Thu, 7 Mar 2019 17:41:10 +0100 Subject: [PATCH] library reorganisation --- MDD/deconvolve.c | 3 +++ Make_include_template | 16 ++++++++++------ corrvir/Makefile | 2 +- fdelmodc/Makefile | 3 +-- fdemmodc/Makefile | 2 +- marchenko/Makefile | 2 +- raytime/Makefile | 2 +- raytime3d/Makefile | 2 +- utils/Makefile | 2 +- 9 files changed, 20 insertions(+), 14 deletions(-) diff --git a/MDD/deconvolve.c b/MDD/deconvolve.c index 6b88d68..147fc7b 100644 --- a/MDD/deconvolve.c +++ b/MDD/deconvolve.c @@ -3,6 +3,9 @@ #include <assert.h> #include <math.h> #include <string.h> +#ifdef MKL +#include<mkl_cblas.h> +#endif typedef struct { /* complex number */ float r,i; diff --git a/Make_include_template b/Make_include_template index e37379b..44f672f 100644 --- a/Make_include_template +++ b/Make_include_template @@ -8,6 +8,12 @@ # the current directory (in vi ":r!pwd") ROOT=/Users/jan/src/OpenSource +############################################################################# +# Some convenient abbreviations +B = $(ROOT)/bin +I = $(ROOT)/include +L = $(ROOT)/lib + ######################################################################## # C compiler; change this only if you are using a different C-compiler @@ -87,18 +93,16 @@ BLAS = ${MKLROOT}/lib/libmkl_intel_lp64.a ${MKLROOT}/lib/libmkl_sequential.a ${M #AMD ACML 4.4.0 #AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64 #OPTC += -DACML440 -I$(AMDROOT)/include -#LIBSM = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm +#BLAS = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm #Intel MKL MKLROOT=/opt/intel/mkl/ OPTC += -DMKL -I$(MKLROOT)/include FFT = ${MKLROOT}/lib/libmkl_intel_lp64.a ${MKLROOT}/lib/libmkl_sequential.a ${MKLROOT}/lib/libmkl_core.a -lpthread -lm -ldl -############################################################################# -# Some convenient abbreviations +#LIBARIES +LIBS= -L$L -lgenfft $(FFT) $(BLAS) + -B = $(ROOT)/bin -I = $(ROOT)/include -L = $(ROOT)/lib ######################################################################## # standard CFLAGS diff --git a/corrvir/Makefile b/corrvir/Makefile index a886621..de45912 100644 --- a/corrvir/Makefile +++ b/corrvir/Makefile @@ -3,7 +3,7 @@ include ../Make_include ALLINC = -I. -LIBS += -L$L -lgenfft -lm +#LIBS += -L$L -lgenfft -lm #OPTC += -g -O0 -m64 #OPTC = -g -O0 -fno-omit-frame-pointer diff --git a/fdelmodc/Makefile b/fdelmodc/Makefile index 56b3c4d..4214ad0 100644 --- a/fdelmodc/Makefile +++ b/fdelmodc/Makefile @@ -5,8 +5,7 @@ include ../Make_include ######################################################################## # define general include and system library ALLINC = -I. -LIBS += -L$L -lgenfft -lm $(LIBSM) -#LIBS += -L$L -lgenfft -lm -lc +#LIBS += -L$L -lgenfft -lm $(LIBSM) #OPTC = -g -Wall -fsignaling-nans -O0 -fopenmp #OPTC += -fopenmp -Waddress #OPTC := $(subst -O3 -ffast-math, -O1 -g ,$(OPTC)) diff --git a/fdemmodc/Makefile b/fdemmodc/Makefile index 7625382..60fc989 100644 --- a/fdemmodc/Makefile +++ b/fdemmodc/Makefile @@ -5,7 +5,7 @@ include ../Make_include ######################################################################## # define general include and system library ALLINC = -I. -LIBS += -L$L -lgenfft -lm $(LIBSM) +#LIBS += -L$L -lgenfft -lm $(LIBSM) #LIBS += -L$L -lgenfft -lm -lc #OPTC = -g -Wall -fsignaling-nans -O0 #OPTC += -fopenmp -Waddress diff --git a/marchenko/Makefile b/marchenko/Makefile index 237c134..260e2c0 100644 --- a/marchenko/Makefile +++ b/marchenko/Makefile @@ -2,7 +2,7 @@ include ../Make_include -LIBS += -L$L -lgenfft -lm $(LIBSM) +#LIBS += -L$L -lgenfft -lm $(LIBSM) #OPTC += -g -O0 -Wall #ALL: fmute marchenko marchenko2 diff --git a/raytime/Makefile b/raytime/Makefile index b3aa6f3..398bd1f 100644 --- a/raytime/Makefile +++ b/raytime/Makefile @@ -5,7 +5,7 @@ include ../Make_include ######################################################################## # define general include and system library ALLINC = -I. -LIBS += -L$L -lgenfft -lm $(LIBSM) +#LIBS += -L$L -lgenfft -lm $(LIBSM) #LIBS += -L$L -lgenfft -lm -lc #OPTC = -g -Wall -fsignaling-nans -O0 #OPTC += -fopenmp -Waddress diff --git a/raytime3d/Makefile b/raytime3d/Makefile index be0bb6e..a71b7a3 100644 --- a/raytime3d/Makefile +++ b/raytime3d/Makefile @@ -5,7 +5,7 @@ include ../Make_include ######################################################################## # define general include and system library ALLINC = -I. -LIBS += -L$L -lgenfft -lm $(LIBSM) +#LIBS += -L$L -lgenfft -lm $(LIBSM) #LIBS += -L$L -lgenfft -lm -lc #OPTC = -g -Wall -fsignaling-nans -O0 #OPTC += -fopenmp -Waddress diff --git a/utils/Makefile b/utils/Makefile index 9d47ece..7b056b1 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -2,7 +2,7 @@ include ../Make_include -LIBS += -L$L -lgenfft -lm $(LIBSM) +#LIBS += -L$L -lgenfft -lm $(LIBSM) #OPTC += -openmp #OPTC += -g -O0 -- GitLab