forked from tdep-developers/tdep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimportant_settings.osx_gfortran_accelerate
77 lines (62 loc) · 3.29 KB
/
important_settings.osx_gfortran_accelerate
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
75
76
77
#!/bin/bash
# A central place to put all the important paths. You probably have to modify this to make things work.
# the fortran compiler
FORTRAN_COMPILER="gfortran-8"
# required compiler flags
FCFLAGS="-ffree-line-length-none -std=f2008 -cpp"
# extra flags, for debugging and such
FCFLAGS_EXTRA=""
#FCFLAGS_EXTRA="-fbacktrace -fcheck=all -finit-real=nan -finit-derived -fmax-errors=10 --pedantic --warn-all"
#FCFLAGS_EXTRA="-fbacktrace -fcheck=all -finit-real=nan -finit-derived -fmax-errors=10 --pedantic -Wall -Wextra -pedantic -Wcast-align -Wdisabled-optimization -Wmissing-include-dirs -Wshadow -Wunused -fdiagnostics-show-option -fcheck=all -Wstrict-overflow=0 -Wrealloc-lhs"
# optimization stuff. Go all in, sometimes
OPTIMIZATION_LEVEL="-Ofast"
OPTIMIZATION_SENSITIVE="-O0"
# the flag that sets the default real to a double.
DOUBLE_FLAG="-fdefault-real-8"
# The flag that tells the compiler where to put .o and .mod files.
MODULE_FLAG="-J"
# the header to put in python scripts.
PYTHONHEADER="#!/usr/bin/python"
# Which gnuplot terminal to use by default.
# Choices: aqua, qt, wxt
GNUPLOTTERMINAL="aqua" # nice on OSX, needs aquaterm installed and gnuplot compiled with support for it.
# Precompiler flags. Selecting default gnuplot terminal, and make the progressbars work.
#PRECOMPILER_FLAGS="-DGP${GNUPLOTTERMINAL} -Dclusterprogressbar"
PRECOMPILER_FLAGS="-DGP${GNUPLOTTERMINAL} -Dgfortranprogressbar"
#PRECOMPILER_FLAGS="-DGP${GNUPLOTTERMINAL} -Dgfortranprogressbar -DAGRESSIVE_SANITY"
# These are the BLAS/LAPACK libraries. On OSX with gfortran, use the built-in 'framework accelerate'
PATH_TO_BLASLAPACK_LIB=""
PATH_TO_BLASLAPACK_INC=""
BLASLAPACK_LIBS="-framework accelerate"
# I use fftw for Fourier transforms.
PATH_TO_FFTW_LIB="-L/usr/local/lib"
PATH_TO_FFTW_INC="-I/usr/local/include"
FFTW_LIBS="-lfftw3"
# Also need MPI
PATH_TO_MPI_LIB="-L/usr/local/lib"
PATH_TO_MPI_INC="-I/usr/local/include"
MPI_LIBS="-lmpi_mpifh -lmpi"
# I also use HDF5 every now and then
PATH_TO_HDF5_LIB="-L/usr/local/lib"
PATH_TO_HDF5_INC="-I/usr/local/include"
HDF5_LIBS="-lhdf5 -lhdf5_fortran"
# We also need a C-compiler
C_COMPILER="gcc-8"
C_FLAGS=""
# Things below this line is strictly optional, and not really needed except for testing purposes.
# If you want to try and use CGAL. Not recommended for people who do not like to sort out compiler errors.
USECGAL="no"
USEAIMS="no"
# CGAL is written in c++. I have wrapper functions in C, that I call from Fortran.
CPP_COMPILER="gcc-8"
CPP_FLAGS="--std=c++0x -frounding-math -O3 -Dusecgal -DCGAL_USE_GMP -DCGAL_USE_MPFR -DCGAL_EIGEN3_ENABLED -DNDEBUG -DBOOST_PARAMETER_MAX_ARITY=12 -Wno-deprecated-declarations"
CGALLINKLINE="-lstdc++ -lCGAL -lmpfr -lgmp -lboost_system -lboost_thread-mt"
# It's important at least a majority of these libraries are compiled with the same c++ compiler
# as above. You can get strange, strange errors otherwise. As I said, getting this up and running
# is not easy.
PATH_TO_CGAL_LIB="-L/Users/olle/software/CGAL-4.11.2/build/lib -L/usr/local/lib"
PATH_TO_CGAL_INC="-I/Users/olle/software/CGAL-4.11.2/build/include -I/usr/local/include -I/usr/local/include/eigen3"
# include AIMS things
PATH_TO_AIMS_LIB="-L/Users/olle/software/aims/src/build/lib"
PATH_TO_AIMS_INC="-I/Users/olle/software/aims/src/build/include"
AIMS_LIBS="-laims.180920.hdf5.scalapack.mpi -lscalapack"