-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathmeson.build
More file actions
143 lines (114 loc) · 4.33 KB
/
Copy pathmeson.build
File metadata and controls
143 lines (114 loc) · 4.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
project('GEMINI', 'fortran',
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')
if hdf5_interface.found()
io = library('io',
sources: io_src,
link_with: [calculus, const, fsutils, grid, mpimod, timeutils],
dependencies: [mpi, hdf5_interface]) # ifort needs dep: mpi here
else
io = library('io',
sources: io_src,
link_with: [calculus, const, fsutils, grid, mpimod, timeutils],
dependencies: mpi) # ifort needs dep: mpi here
endif
subdir('vendor/msis00')
# --- for setting up an equilibrium simulation --
executable('msis_setup', 'setup/MSIS00/call_msis_gfortran.f90',
link_with: msis)
neutral = library('neutral', 'neutral/neutral.f90',
dependencies : mpi,
link_with : [const, grid, interp, mpimod, msis, timeutils])
subdir('ionization')
sources = library('sources', 'sources/sources.f90',
link_with: [calculus, collisions, const, grid, mpimod],
dependencies: mpi) # ifort needs dep: mpi here
multifluid = library('multifluid', 'multifluid/multifluid.f90',
link_with: [advection, calculus, collisions, const, diffusion, grid, ionization_fang, mpimod,
precipBCs, sources, timeutils],
dependencies: mpi) # ifort needs dep: mpi here
# -- gemini exe
gemini_fang_exe = executable('gemini_fang.bin',
sources: 'gemini.f90',
link_with : [const, grid, io, mpimod, multifluid, neutral, potential, precipBCs, temporal, timeutils],
dependencies : [scalapack, blacs, lapack, blas, mpi], # ifort needs dep: mpi here
fortran_args: real_bits,
install: true,
link_language: 'fortran')
# -- gemini_glow exe
multifluid_glow = library('multifluid_glow', 'multifluid/multifluid.f90',
link_with: [advection, calculus, collisions, const, diffusion, grid, ionization_glow, mpimod,
precipBCs, sources, timeutils],
dependencies: mpi) # ifort needs dep: mpi here
gemini_glow_exe = executable('gemini_glow.bin',
sources: 'gemini.f90',
link_with : [const, grid, io, mpimod, multifluid_glow, neutral, potential, precipBCs, temporal, timeutils],
dependencies : [scalapack, blacs, lapack, blas, mpi], # ifort needs dep: mpi here
fortran_args: real_bits,
install: true,
link_language: 'fortran')
# -- magcalc exe
magcalc = executable('magcalc.bin', 'magcalc.f90',
link_with : [const, calculus, grid, neutral, io, timeutils, mpimod],
dependencies : mpi,
install: true)
# --- TESTS ---
zenodo = {
'2d_fang': {
'dir': meson.source_root() / 'tests/data/zenodo2d_fang',
'exe': gemini_fang_exe},
'2d_glow': {
'dir': meson.source_root() / 'tests/data/zenodo2d_glow',
'exe': gemini_glow_exe},
'3d_fang': {
'dir': meson.source_root() / 'tests/data/zenodo3d_fang',
'exe': gemini_fang_exe},
'3d_glow': {
'dir': meson.source_root() / 'tests/data/zenodo3d_glow',
'exe': gemini_glow_exe},
}
foreach k, v : zenodo
test_dir = meson.build_root() / 'test' + k
testname = 'Gemini' + k
test(testname, python,
suite : k,
args : ['meson_run_test.py', k, mpiexec.path(), v['exe'], meson.source_root() / 'initialize/test' + k / 'config.nml', test_dir],
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['dir']],
suite : k,
timeout: 60,
env: nomalloc_env,
workdir : meson.source_root() / 'tests')
# --- Matlab/Octave-based simulation output comparision
matoctargs = 'compare_all("' + test_dir + '","' + v['dir'] + '")'
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