-
Notifications
You must be signed in to change notification settings - Fork 22
/
important_settings.cgal
75 lines (59 loc) · 3.18 KB
/
important_settings.cgal
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
#!/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-13"
# required compiler flags
FCFLAGS="-ffree-line-length-none -std=f2008 -cpp -fallow-argument-mismatch"
# extra flags, for debugging and such
FCFLAGS_EXTRA=""
# FCFLAGS_EXTRA="-g -fbacktrace -fcheck=all -finit-real=nan -finit-derived -fmax-errors=10 --pedantic --warn-all"
# FCFLAGS_EXTRA="-g -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_LEVEL="-O3"
# OPTIMIZATION_LEVEL="-O0"
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/env python"
# Which gnuplot terminal to use by default.
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} -Dclusterprogressbar -DAGRESSIVE_SANITY"
#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/opt/homebrew/lib"
PATH_TO_FFTW_INC="-I/opt/homebrew/include"
FFTW_LIBS=""
FFTW_LIBS="-lfftw3"
# Also need MPI
PATH_TO_MPI_LIB="-L/opt/homebrew/lib"
PATH_TO_MPI_INC="-I/opt/homebrew/include"
MPI_LIBS="-lmpi_mpifh -lmpi"
# I also use HDF5 every now and then
PATH_TO_HDF5_LIB="-L/Users/flokno/local/hdf5-1.12.2/build_2022_11/lib"
PATH_TO_HDF5_INC="-I/Users/flokno/local/hdf5-1.12.2/build_2022_11/include"
HDF5_LIBS="-lhdf5 -lhdf5_fortran"
# Optionally CGAL and FHI-Aims. You probably do not want that.
USEAIMS="no"
# Let's do it
USECGAL="yes"
CGAL_PATH=/Users/flokno/local/cgal-5.6.1/build
# CGAL is written in c++. I have wrapper functions in C, that I call from Fortran.
CPP_COMPILER="gcc-13"
CPP_FLAGS="--std=c++14 -frounding-math -O3 -Dusecgal -DCGAL_USE_GMP -DCGAL_USE_MPFR -DCGAL_EIGEN3_ENABLED -DNDEBUG -DBOOST_PARAMETER_MAX_ARITY=12 -Wno-deprecated-declarations"
CGALLINKLINE="-lstdc++ -lmpfr -lgmp -lboost_system -lboost_thread-mt"
# CGALLINKLINE="-lCGAL -lCGAL_Core" # -lmpfr -lgmp -lboost_system -lboost_thread-mt"
# CGALLINKLINE="-lstdc++ -lCGAL -lCGAL_Core -lmpfr -lgmp -lboost_system -lboost_thread-mt"
# CGALLINKLINE="-lstdc++ -lCGAL -lCGAL_Core -lmpfr -lgmp -lboost_system -lboost_thread-mt"
PATH_TO_CGAL_LIB="-L$CGAL_PATH/lib"
PATH_TO_CGAL_INC="-I$CGAL_PATH/include/ -I/opt/homebrew/include/eigen3 -I/opt/homebrew/include"