-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathmeson.build
More file actions
122 lines (95 loc) · 3.33 KB
/
Copy pathmeson.build
File metadata and controls
122 lines (95 loc) · 3.33 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
project('GEMINI', 'c', 'fortran',
version: '0.2.0',
meson_version: '>=0.52.0',
default_options : ['default_library=static', 'buildtype=release'])
subdir('meson') # find libraries, etc.
#==========================================================
const = library('const', 'numerical/constants/phys_consts.F90',
fortran_args: real_bits)
subdir('io')
collisions = library('collisions', 'collisions/collisions.f90',
link_with: const)
subdir('temporal')
subdir('numerical')
temporal = library('temporal', 'temporal/temporal.f90',
dependencies: mpi,
link_with: [const, mesh, mpimod])
subdir('tests')
io_deps = [mpi]
if hdf5_interface.found()
io_deps += hdf5_interface
elif netcdf_interface.found()
io_deps += netcdf_interface
endif
io = library('io',
sources: io_src,
link_with: [calculus, const, pathlib, grid, mpimod, timeutils],
dependencies: io_deps) # ifort needs dep: mpi here
subdir('vendor/msis00')
# --- for setting up an equilibrium simulation --
executable('msis_setup', 'setup/MSIS00/call_msis_gfortran.f90',
link_with: msis)
subdir('neutral')
subdir('ionization')
subdir('sources')
multifluid = library('multifluid', 'multifluid/multifluid.f90',
link_with: [advection, calculus, collisions, const, diffusion, grid, mesh, ionization, mpimod,
precipBCs, sources, timeutils],
dependencies: mpi) # ifort needs dep: mpi here
# -- gemini exe
gemini_exe = executable('gemini.bin',
sources: 'gemini.f90',
link_with : [const, grid, mesh, io, mpimod, multifluid, neutral, potential, precipBCs, temporal, timeutils],
dependencies : [scalapack, blacs, lapack, blas, mpi], # ifort needs dep: mpi here
install: true,
link_language: 'fortran')
# -- magcalc exe
magcalc = executable('magcalc.bin', 'magcalc.f90',
link_with : [const, calculus, grid, mesh, neutral, io, timeutils, mpimod],
dependencies : mpi,
install: true)
# --- TESTS ---
zenodo = {
'2d_fang': meson.source_root() / 'tests/data/zenodo2d_fang',
'2d_glow': meson.source_root() / 'tests/data/zenodo2d_glow',
'3d_fang': meson.source_root() / 'tests/data/zenodo3d_fang',
'3d_glow': meson.source_root() / 'tests/data/zenodo3d_glow'}
np = get_option('np')
foreach k, v : zenodo
test_dir = meson.build_root() / 'test' + k
testname = 'Gemini' + k
test_args = ['meson_run_test.py', k, mpiexec.path(), gemini_exe,
meson.source_root() / 'initialize/test' + k / 'config.nml',
test_dir]
if np > 0
test_args += ['-np', np.to_string()]
endif
test(testname, python,
suite : k,
args : test_args,
workdir : meson.source_root() / 'script_utils',
timeout : 2700,
env: nomalloc_env,
is_parallel : false)
# --- Python-based simulation output comparision
test('Compare' + k, python,
args : ['compare_all.py', test_dir, v],
suite : k,
timeout: 60,
env: nomalloc_env,
workdir : meson.source_root() / 'tests')
# --- Matlab/Octave-based simulation output comparision
matoctargs = 'compare_all("' + test_dir + '","' + v + '")'
test('CompareMatlab' + k, matlab,
args : ['-batch', matoctargs],
suite : k,
timeout: 60,
env: nomalloc_env,
workdir : meson.source_root() / 'tests')
test('CompareOctave' + k, octave,
args : ['--eval', matoctargs],
suite : k,
timeout: 60,
env: nomalloc_env,
workdir : meson.source_root() / 'tests')
endforeach