forked from PolyChord/PolyChordLite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_intel
67 lines (60 loc) · 2.25 KB
/
Makefile_intel
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
ifdef MPI
FC = mpiifort
CC = mpiicc
CXX = mpiicpc
else
FC = ifort
CXX = icpc
CC = icc
endif
CPP = $(CC)
LD = $(FC)
LDSHARED = $(LD) -shared
# Archive tool
AR = ar rv
# default flags
# --------------
# fpp : perform preprocessing
# fpic : shared object libraries
# assume noold_maxminloc : in intel v16 compilers, they changed the default behavior of minloc (ffs).
# this flag is necessary to ensure consistent behavior across compilers
FFLAGS += -fpp -fpic -assume noold_maxminloc -heap-arrays
CXXFLAGS += -std=c++11 -fpic
# nofor_main : essential for linking c++ and fortran
LDFLAGS += -nofor-main
LDLIBS += -cxxlib
ifdef DEBUG
# Debugging mode
# --------------
# g : enable gnu debugger compatibility
# O0 : no optimisation
# traceback : create a backtrace on system failure
# check all : all checks (whilst compiling)
# warn all : all warnings (whilst running)
# ftrapuv : Traps uninitialized variables by setting them to very large values
# debug all : additional debugging information
# gen-interfaces : generate an interface block for each routine
# warn-interfaces: warn on these interface blocks
# fpe0 : halts program if dividing by zero, etc
FFLAGS += -g -O0 -traceback -check all,noarg_temp_created -warn all -ftrapuv -debug all -gen-interfaces -warn-interfaces
CXXFLAGS += -g -O0 -traceback -Wcheck -Wremarks -Wall -Weffc++ -ftrapuv -debug all
LDFLAGS += -g
else
# Optimised mode
# --------------
# ipo : interprocedural optimization (optimize entire program)
# O3 : maximum optimisation
# no-prec-div : slightly less precise floating point divides, but speeds up
# static : link intel libraries statically
# xHost : maximise architecture usage
# w : turn off all warnings
# vec-report0 : disables printing of vectorizer diagnostic information
# opt-report0 : disables printing of optimization reports
IPO = -ipo
FFLAGS += $(IPO) -O3 -no-prec-div $(HOST) -w -vec-report0 -qopt-report0
CXXFLAGS += $(IPO) -O3 -no-prec-div $(HOST) -w -vec-report0 -qopt-report0
ifdef IPO
# Archive tool for compiling with ipo.
AR = xiar rv
endif
endif