Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
fwi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gmsh
fwi
Commits
64a7ba68
Commit
64a7ba68
authored
2 years ago
by
Boris Martin
Browse files
Options
Downloads
Patches
Plain Diff
new jobs
parent
d5f0879b
No related branches found
No related tags found
1 merge request
!6
Draft: "Flexible acquisition", a configuration with arbitrary sources and receivers read from a YAML file.
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
input/boris/monaco_study/gen_slurm.py
+18
-16
18 additions, 16 deletions
input/boris/monaco_study/gen_slurm.py
input/boris/monaco_study/shots_merged_receivers.py
+120
-0
120 additions, 0 deletions
input/boris/monaco_study/shots_merged_receivers.py
with
138 additions
and
16 deletions
input/boris/monaco_study/gen_slurm.py
+
18
−
16
View file @
64a7ba68
from
string
import
Template
import
os
all_files
=
[
filename
for
filename
in
os
.
listdir
()
if
filename
.
startswith
(
'
config_
'
)
and
filename
.
endswith
(
'
.txt
'
)]
all_files
.
sort
()
freq_files
=
[
filename
for
filename
in
os
.
listdir
()
if
filename
.
startswith
(
'
config_
'
)
and
filename
.
endswith
(
'
.txt
'
)]
freq_files
.
sort
()
yaml_files
=
[
"
shots.yml
"
,
"
shots_merged_receivers.yml
"
]
slurm_template
=
'''
#!/bin/bash
#SBATCH --job-name=$job_name
...
...
@@ -10,7 +11,7 @@ slurm_template = '''#!/bin/bash
#SBATCH --error=$error
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=
05
:00:00
#SBATCH --time=
12
:00:00
set -e
set -x
...
...
@@ -18,17 +19,18 @@ set -x
$command_line
'''
for
i
,
freq
in
enumerate
(
all_files
):
synth_job
=
Template
(
slurm_template
).
substitute
(
job_name
=
"
synth_{}
"
.
format
(
i
),
output
=
"
synth_{}.out
"
.
format
(
i
),
error
=
"
synth_{}.err
"
.
format
(
i
),
command_line
=
"
~/fwi/build/synthetics synthetics.txt common.txt {} -verbose 2
"
.
format
(
freq
))
with
open
(
'
synth_{}.slurm
'
.
format
(
i
),
'
w
'
)
as
f
:
f
.
write
(
synth_job
)
job_id
=
1
for
yaml_file
in
yaml_files
:
for
freq_file
in
freq_files
:
synth_inv_command_line
=
(
"
~/Bureau/gmsh/fwi/build/synthetics synthetics.txt common.txt {} -shots_config {} -verbose 2
\n
"
"
~/Bureau/gmsh/fwi/build/inversion inversion.txt common.txt localminimum_ncg.txt innerproduct_sst.txt {} -shots_config {} -verbose 2
"
).
format
(
freq_file
,
yaml_file
,
freq_file
,
yaml_file
)
inv_job
=
Template
(
slurm_template
).
substitute
(
job_name
=
"
inv_{}
"
.
format
(
i
),
output
=
"
inv_{}.out
"
.
format
(
i
),
error
=
"
inv_{}.err
"
.
format
(
i
),
command_line
=
"
~/fwi/build/inversion inversion.txt common.txt localminimum_ncg.txt innerproduct_sst.txt {} -verbose 2
"
.
format
(
freq
))
with
open
(
'
inv_{}.slurm
'
.
format
(
i
),
'
w
'
)
as
f
:
f
.
write
(
inv_job
)
synth_inv_job
=
Template
(
slurm_template
).
substitute
(
job_name
=
"
synth_inv_{}
"
.
format
(
job_id
),
output
=
"
synth_inv_{}.out
"
.
format
(
job_id
),
error
=
"
synth_inv_{}.err
"
.
format
(
job_id
),
command_line
=
synth_inv_command_line
)
with
open
(
'
synth_inv_{}.slurm
'
.
format
(
job_id
),
'
w
'
)
as
f
:
f
.
write
(
synth_inv_job
)
job_id
+=
1
This diff is collapsed.
Click to expand it.
input/boris/monaco_study/shots_merged_receivers.py
0 → 100644
+
120
−
0
View file @
64a7ba68
coordinates
:
-
[
185.71677387800653
,
-
5.0
]
-
[
190.71677387800653
,
-
39.0
]
-
[
198.71677387800653
,
-
40.0
]
-
[
206.71677387800653
,
-
40.0
]
-
[
214.71677387800653
,
-
41.0
]
-
[
222.71677387800653
,
-
42.0
]
-
[
230.71677387800653
,
-
42.0
]
-
[
159.31190600310052
,
-
5.0
]
-
[
164.31190600310052
,
-
38.0
]
-
[
172.31190600310052
,
-
38.0
]
-
[
180.31190600310052
,
-
39.0
]
-
[
188.31190600310052
,
-
39.0
]
-
[
196.31190600310052
,
-
40.0
]
-
[
204.31190600310052
,
-
40.0
]
-
[
146.8909063065247
,
-
5.0
]
-
[
151.8909063065247
,
-
37.0
]
-
[
159.8909063065247
,
-
38.0
]
-
[
167.8909063065247
,
-
38.0
]
-
[
175.8909063065247
,
-
39.0
]
-
[
183.8909063065247
,
-
39.0
]
-
[
191.8909063065247
,
-
39.0
]
-
[
124.46403626094124
,
-
5.0
]
-
[
129.46403626094124
,
-
35.0
]
-
[
137.46403626094124
,
-
36.0
]
-
[
145.46403626094124
,
-
37.0
]
-
[
153.46403626094124
,
-
37.0
]
-
[
161.46403626094124
,
-
38.0
]
-
[
169.46403626094124
,
-
38.0
]
-
[
110.48133877025934
,
-
5.0
]
-
[
115.48133877025934
,
-
34.0
]
-
[
123.48133877025934
,
-
34.0
]
-
[
131.48133877025936
,
-
35.0
]
-
[
139.48133877025936
,
-
37.0
]
-
[
147.48133877025936
,
-
37.0
]
-
[
155.48133877025936
,
-
37.0
]
-
[
93.53094719601641
,
-
5.0
]
-
[
98.53094719601641
,
-
32.0
]
-
[
106.53094719601641
,
-
33.0
]
-
[
114.53094719601641
,
-
34.0
]
-
[
122.53094719601641
,
-
34.0
]
-
[
130.53094719601643
,
-
35.0
]
-
[
138.53094719601643
,
-
37.0
]
-
[
84.27665854372322
,
-
5.0
]
-
[
89.27665854372322
,
-
31.0
]
-
[
97.27665854372322
,
-
32.0
]
-
[
105.27665854372322
,
-
33.0
]
-
[
113.27665854372322
,
-
33.0
]
-
[
121.27665854372322
,
-
34.0
]
-
[
129.27665854372322
,
-
35.0
]
-
[
68.15862613818616
,
-
5.0
]
-
[
73.15862613818616
,
-
30.0
]
-
[
81.15862613818616
,
-
31.0
]
-
[
89.15862613818616
,
-
31.0
]
-
[
97.15862613818616
,
-
32.0
]
-
[
105.15862613818616
,
-
33.0
]
-
[
113.15862613818616
,
-
33.0
]
-
[
54.35855597597082
,
-
5.0
]
-
[
59.35855597597082
,
-
28.0
]
-
[
67.35855597597083
,
-
29.0
]
-
[
75.35855597597083
,
-
30.0
]
-
[
83.35855597597083
,
-
31.0
]
-
[
91.35855597597083
,
-
31.0
]
-
[
99.35855597597083
,
-
32.0
]
-
[
31.160202537382716
,
-
5.0
]
-
[
36.160202537382716
,
-
25.0
]
-
[
44.160202537382716
,
-
26.0
]
-
[
52.160202537382716
,
-
27.0
]
-
[
60.160202537382716
,
-
28.0
]
-
[
68.16020253738272
,
-
29.0
]
-
[
76.16020253738272
,
-
30.0
]
-
[
20.864001563556506
,
-
5.0
]
-
[
25.864001563556506
,
-
23.0
]
-
[
33.864001563556506
,
-
24.0
]
-
[
41.864001563556506
,
-
26.0
]
-
[
49.864001563556506
,
-
27.0
]
-
[
57.864001563556506
,
-
27.0
]
-
[
65.86400156355651
,
-
29.0
]
-
[
17.264135958841763
,
-
5.0
]
-
[
22.264135958841763
,
-
22.0
]
-
[
30.264135958841763
,
-
24.0
]
-
[
38.26413595884176
,
-
25.0
]
-
[
46.26413595884176
,
-
26.0
]
-
[
54.26413595884176
,
-
27.0
]
-
[
62.26413595884176
,
-
28.0
]
-
[
5.1041996868822
,
-
5.0
]
-
[
10.1041996868822
,
-
18.0
]
-
[
18.1041996868822
,
-
21.0
]
-
[
26.1041996868822
,
-
23.0
]
-
[
34.1041996868822
,
-
24.0
]
-
[
42.1041996868822
,
-
26.0
]
-
[
50.1041996868822
,
-
27.0
]
shots
:
-
emitters
:
[
0
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
7
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
14
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
21
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
28
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
35
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
42
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
49
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
56
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
63
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
70
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
77
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
-
emitters
:
[
84
]
receivers
:
[
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
11
,
12
,
13
,
15
,
16
,
17
,
18
,
19
,
20
,
22
,
23
,
24
,
25
,
26
,
27
,
29
,
30
,
31
,
32
,
33
,
34
,
36
,
37
,
38
,
39
,
40
,
41
,
43
,
44
,
45
,
46
,
47
,
48
,
50
,
51
,
52
,
53
,
54
,
55
,
57
,
58
,
59
,
60
,
61
,
62
,
64
,
65
,
66
,
67
,
68
,
69
,
71
,
72
,
73
,
74
,
75
,
76
,
78
,
79
,
80
,
81
,
82
,
83
,
85
,
86
,
87
,
88
,
89
,
90
]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment