-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOptions.mk
17 lines (15 loc) · 908 Bytes
/
Options.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
OPTIMIZE = -O3 -g -Wall -ffast-math -march=native
#-fnocommon fixes linker errors on Mac.
#Without it uninitialised variables are not included in static libraries.
# For some reason apple clang doesn't build openmp into their binary.
# You must install openmpi from homebrew using gcc first with, eg, "brew install open-mpi --cc=gcc-9 --build-from-source"
OPTIMIZE += -fno-common -fopenmp
# Find the sdk path on Mac
OPT += -isysroot $(shell xcrun -sdk macosx --show-sdk-path)
GSL_INCL = $(shell pkg-config --cflags gsl)
GSL_LIBS = $(shell pkg-config --libs gsl)
OPT += -DVALGRIND # allow debugging with valgrind, disable the GADGET memory allocator.
#OPT += -DDEBUG # print a lot of debugging messages
#Use alternative OpenMP locks, instead of the pthread spinlocks. Required on mac.
OPT += -DNO_OPENMP_SPINLOCK
#OPT += -DNO_ISEND_IRECV_IN_DOMAIN #sparse MPI_Alltoallv do not use ISEND IRECV