-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.inc.mkl-gcc
54 lines (41 loc) · 1.67 KB
/
make.inc.mkl-gcc
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
# PLASMA example make.inc, using Intel MKL and gcc
#
# PLASMA is a software package provided by:
# University of Tennessee, US,
# University of Manchester, UK.
# --------------------
# programs
CC = gcc
FC = gfortran
AR = ar
RANLIB = ranlib
# --------------------
# flags
# Use -fPIC to make shared (.so) and static (.a) libraries;
# can be commented out if making only static libraries.
FPIC = -fPIC
CFLAGS = -fopenmp $(FPIC) -O3 -std=c99 -Wall -pedantic -Wshadow -Wno-unused-function
FCFLAGS = -fopenmp $(FPIC) -O3 -std=f2008 -Wall
LDFLAGS = -fopenmp $(FPIC)
# options for MKL
CFLAGS += -DHAVE_MKL
# one of: aix bsd c89 freebsd generic linux macosx mingw posix solaris
# usually generic is fine
lua_platform = linux
# --------------------
# PLASMA is a library in C, but can be also used from Fortran.
# In this case, Fortran interface needs to be build.
# 0 = no - Fortran codes will not be touched, the FC and FCFLAGS variables
# will not be referenced
# 1 = yes - Fortran interface will be compiled and included into the library
fortran ?= 1
# --------------------
# libraries
# This assumes $MKLROOT is set in your environment.
# Add these to your .cshrc or .bashrc, adjusting for where MKL is installed:
# in .cshrc: source /opt/intel/bin/compilervars.csh intel64
# in .bashrc: source /opt/intel/bin/compilervars.sh intel64
# With gcc OpenMP (libgomp), use -lmkl_sequential or (-lmkl_gnu_thread with MKL_NUM_THREADS=1).
# With icc OpenMP (liomp5), use -lmkl_sequential or (-lmkl_intel_thread with MKL_NUM_THREADS=1).
LIBS = -L$(MKLROOT)/lib -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm -ldl
INC = -I$(MKLROOT)/include