-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.inc.mkl-icc
68 lines (50 loc) · 1.86 KB
/
make.inc.mkl-icc
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#//////////////////////////////////////////////////////////////////////////////
# -- MAGMA (version 2.0) --
# Univ. of Tennessee, Knoxville
# Univ. of California, Berkeley
# Univ. of Colorado, Denver
# @date
#//////////////////////////////////////////////////////////////////////////////
# --------------------
# programs
CC = icc
CXX = icpc
FORT = ifort
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
# --------------------
# flags
# Use -fPIC to make shared (.so) and static (.a) library;
# can be commented out if making only static library.
FPIC = -fPIC
CFLAGS = -O3 $(FPIC) -DADD_ -Wall -Wshadow -openmp -DMAGMA_WITH_MKL
FFLAGS = -O3 $(FPIC) -DADD_ -warn all -warn nounused -nogen-interfaces
F90FLAGS = -O3 $(FPIC) -DADD_ -warn all -warn nounused
LDFLAGS = $(FPIC) -openmp
# C++11 (icc >= 13) is not required, but has benefits like atomic operations
CXXFLAGS := $(CFLAGS) -std=c++11
CFLAGS += -std=c99
# --------------------
# libraries
# old MKL
#LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_lapack -lmkl_core -lguide -lpthread -lstdc++ -lm
# see MKL Link Advisor at http://software.intel.com/sites/products/mkl/
# icc with MKL 10.3, Intel threads
LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lstdc++ -lm
LIB += -lclBLAS -lOpenCL
# --------------------
# directories
# define library directories preferably in your environment, or here.
# for MKL run, e.g.: source /opt/intel/composerxe/mkl/bin/mklvars.sh intel64
#MKLROOT ?= /opt/intel/composerxe/mkl
#clBLAS ?= /opt/clBLAS
#AMDAPP ?= /opt/AMDAPP
-include make.check-mkl
-include make.check-clblas
LIBDIR = -L$(clBLAS)/lib64 \
-L$(AMDAPP)/lib/x86_64 \
-L$(MKLROOT)/lib/intel64
INC = -I$(clBLAS)/include \
-I$(AMDAPP)/include \
-I$(MKLROOT)/include