1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| #MKL libraries
MKLLIB = ${MKLROOT}/lib/intel64
MKLINCLUDE = -I${MKLROOT}/include -I${MKLROOT}/include/intel64/lp64
BLAS95_LIB = ${MKLLIB}/libmkl_blas95_lp64.a
LAPACP95_LIB = ${MKLLIB}/libmkl_lapack95_lp64.a
BLACS_LIBS = ${MKLLIB}/libmkl_blacs_intelmpi_lp64.a
SCALAPACK_LIBS = ${MKLLIB}/libmkl_scalapack_lp64.a
lp64_lib = ${MKLLIB}/libmkl_intel_lp64.a
thread_lib = ${MKLLIB}/libmkl_intel_thread.a
sequential_lib = ${MKLLIB}/libmkl_sequential.a
core_lib = ${MKLLIB}/libmkl_core.a
MKL_dynamic_Link = ${BLAS95_LIB} ${LAPACP95_LIB} -L${MKLLIB} \
-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core \
-liomp5 -lpthread -lm -ldl
MKL_static_Link = ${BLAS95_LIB} ${LAPACP95_LIB} -Wl,--start-group \
${lp64_lib} ${sequential_lib} ${core_lib} \
-Wl,--end-group \
-liomp5 -lpthread -lm -ldl
#---------------------------------------------------------------
# Redefining Pattern Rules
#---------------------------------------------------------------
%.o : %.f90
$(F90) $(F90FLAGS) ${MKLINCLUDE} -c $<
%.o : %.c
$(CC) $(CFLAGS) -c $<
%.fh : %.h
$(CPP) $(CPPFLAGS) $< -o $*.fh
.PHONY: all
all: $(exe)
##
${exe} : ${OBJS} bindir tools
# ${F90} -o ${exe} ${OBJS} ${MKL_dynamic_Link}
${F90} -o ${exe} ${OBJS} ${MKL_static_Link}
cp -f ${exe} ../bin
|