-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.inc
74 lines (55 loc) · 2.45 KB
/
make.inc
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
69
70
71
72
73
74
# 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 = mpiicc
FC = mpif90
ARCH = ar
ARCHFLAGS = cr
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 = $(FPIC) -O3 -std=gnu99 -g -Wall -pedantic -Wshadow -Wunused-variable -Wno-unused-function
FCFLAGS = $(FPIC) -O3 --std=f2008 -Wall
LDFLAGS = -fopenmp $(FPIC)
# options for MKL
CFLAGS += -DPLASMA_WITH_MKL \
-DMKL_Complex16="double _Complex" \
-DMKL_Complex8="float _Complex"
# one of: aix bsd c89 freebsd generic linux macosx mingw posix solaris
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 adn FCFLAGS variables
# will not referenced
# 1 = yes - Fortran interface will be compiled and included into the library
fortran = 0
# --------------------
# StarPU
CFLAGS += $(shell pkg-config --cflags starpumpi-1.2)
LIBS += $(shell pkg-config --libs starpumpi-1.2)
# --------------------
# 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).
MKLROOT = /opt/intel/mkl
LIBS += -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm -ldl
INC += -I$(MKLROOT)/include
# BLACS and ScaLAPACK stuff
SCALAPACKDIR = /home/m/mzounon/pfs/Software/scalapack-2.0.2
LIBS += $(SCALAPACKDIR)/TESTING/LIN/pzmatgen.o \
$(SCALAPACKDIR)/TESTING/LIN/pdmatgen.o \
$(SCALAPACKDIR)/TESTING/LIN/pcmatgen.o \
$(SCALAPACKDIR)/TESTING/LIN/psmatgen.o \
$(SCALAPACKDIR)/TESTING/LIN/pmatgeninc.o
LIBS += -L/hpc2n/eb/software/Core/ifort/2018.1.163-GCC-6.4.0-2.28/lib/intel64 -lifcore -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64