-
Notifications
You must be signed in to change notification settings - Fork 4
/
compiler.cfg
54 lines (42 loc) · 2.36 KB
/
compiler.cfg
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
# Basic settings
# TODO: profiler guided optimisation (PGO)
#
SHELL := /bin/bash
System=$(PIOL_SYSTEM)
#CXX=mpicxx
CXX=mpicxx
CC=mpicc
ICONV_LIB_FLAG=-liconv
ifeq "$(strip $(I_MPI_CXX))" "icpc" #intel
LOWER_PRECISION = -fp-model fast=2 -no-prec-sqrt -fimf-precision:low
OPTIMISATIONS = -align -xHost -O3 -fopenmp -fno-alias -qopt-report=5 -qopt-report-phase=vec # -ipo $(LOWER_PRECISION) #
FFTW_LIB_FLAG=-mkl
LIB_FLAG=-shared-intel -shared-libgcc $(FFTW_LIB_FLAG)
else #gnu
OPTIMISATIONS = -mtune=native -march=native -O1 -funroll-loops -fopenmp
#OPTIMISATIONS = -O0 -fopenmp -ffloat-store
FFTW_LIB_FLAG=-lfftw3f
LIB_FLAG=$(FFTW_LIB_FLAG) $(ICONV_LIB_FLAG)
endif
WARNINGS = -Wall -Wextra -pedantic
DEBUG = -g #-DDEBUG
CXXSTANDARD=-std=c++17
CSTANDARD=-std=c99
COLLECTIVES=-DMPIIO_COLLECTIVES
API_FOLDER=-I../api/
CXXINC_FOLDER=-I../include/ $(COLLECTIVES) $(API_FOLDER)
CINC_FOLDER=-I../include/ $(API_FOLDER)
#CXXFLAGS = $(CXXSTANDARD) $(WARNINGS) $(DEBUG) $(OPTIMISATIONS) $(CXXINC_FOLDER) -fprofile-arcs -ftest-coverage -fmax-errors=1 -Werror=implicit-function-declaration -fsanitize=address -fno-omit-frame-pointer
#CFLAGS = $(CSTANDARD) $(WARNINGS) $(DEBUG) $(OPTIMISATIONS) -fprofile-arcs -ftest-coverage -fmax-errors=1 -Werror=implicit-function-declaration -fsanitize=address
#CXXFLAGS = $(CXXSTANDARD) $(WARNINGS) $(DEBUG) $(OPTIMISATIONS) $(CXXINC_FOLDER) -fprofile-arcs -ftest-coverage -fmax-errors=1 -Werror=implicit-function-declaration -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls
CXXFLAGS = $(CXXSTANDARD) $(WARNINGS) $(DEBUG) $(OPTIMISATIONS) $(CXXINC_FOLDER) -fprofile-arcs -ftest-coverage -fmax-errors=1 -Werror=implicit-function-declaration -Wno-ignored-qualifiers
#CFLAGS = $(CSTANDARD) $(WARNINGS) $(DEBUG) $(OPTIMISATIONS) -fprofile-arcs -ftest-coverage -fmax-errors=1 -Werror=implicit-function-declaration -fsanitize=address
CFLAGS = $(CSTANDARD) $(WARNINGS) $(DEBUG) $(OPTIMISATIONS) -fprofile-arcs -ftest-coverage -fmax-errors=1 -Werror=implicit-function-declaration
ifeq "$(strip $(System))" "Tullow"
##Work arounds for Tullow's Marine cluster:
TULLOW_LIBS=/apps/intel/2016/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64/libintlc.so.5
endif
LIBS=-L../lib -lpiol -lipiol $(TULLOW_LIBS) $(FFTW_LIB_FLAG) $(ICONV_LIB_FLAG) #-lOpenCL
CXXLDFLAGS=$(LIBS) $(IMELD_FLAG) $(CXXINC_FOLDER)
CLDFLAGS=$(LIBS) $(CINC_FOLDER)
LIB_DIR=../lib