-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathlinux_gnu.py
More file actions
executable file
·69 lines (51 loc) · 2.11 KB
/
linux_gnu.py
File metadata and controls
executable file
·69 lines (51 loc) · 2.11 KB
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
import os
from _common_search_paths import charm_path_search, grackle_path_search
is_arch_valid = 1
#
#flags_arch = '-g -fprofile-arcs -ftest-coverage' # gcov
flags_arch = '-O3 -g -ffast-math -funroll-loops -fPIC'
#flags_arch = '-Wall -O3 -g'
#flags_arch = '-Wall -O0 -g'
#flags_arch = '-O3 -pg -g'
#flags_arch = '-fprofile-arcs -ftest-coverage'
#flags_arch = '-Wall -g -fsanitize=address -fno-omit-frame-pointer'
#flags_arch = '-Wall -O3 -pg'
# rdynamic required for backtraces
#flags_link_charm = '-rdynamic'
#flags_link_charm = '-memory paranoid'
#flags_link_charm = '-fprofile-arcs' # gcov
#optional fortran flag
flags_arch_fortran = '-ffixed-line-length-132'
cc = 'gcc '
f90 = 'gfortran'
flags_prec_single = ''
flags_prec_double = '-fdefault-real-8 -fdefault-double-8'
libpath_fortran = '/usr/lib/x86_64-linux-gnu'
libs_fortran = ['gfortran']
home = os.getenv('HOME')
# use Charm++ with randomized message queues for debugging and stress-testing
# charm_path = home + '/Charm/charm.random'
charm_path = charm_path_search(home)
# use_papi = 1
# papi_inc = os.getenv('PAPI_INC', '/usr/include')
# papi_lib = os.getenv('PAPI_LIB', '/usr/lib')
hdf5_inc = os.getenv('HDF5_INC')
if hdf5_inc is None:
if os.path.exists('/usr/include/hdf5.h'):
hdf5_inc = '/usr/include'
elif os.path.exists('/usr/include/hdf5/serial/hdf5.h'):
hdf5_inc = '/usr/include/hdf5/serial'
else:
raise Exception('HDF5 include file was not found. Try setting the HDF5_INC environment variable such that $HDF5_INC/hdf5.h exists.')
hdf5_lib = os.getenv('HDF5_LIB')
if hdf5_lib is None:
if os.path.exists('/usr/lib/libhdf5.a'):
hdf5_lib = '/usr/lib'
elif os.path.exists('/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a'):
hdf5_lib = '/usr/lib/x86_64-linux-gnu/hdf5/serial'
else:
raise Exception('HDF5 lib file was not found. Try setting the HDF5_LIB environment variable such that $HDF5_LIB/libhdf5.a exists.')
png_path = os.getenv('LIBPNG_HOME', '/lib/x86_64-linux-gnu')
boost_inc = os.getenv('BOOST_INC', '/usr/include/boost')
boost_lib = os.getenv('BOOST_LIB', '/usr/lib/x86_64-linux-gnu')
grackle_path = grackle_path_search(home)