Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/issue_0105-serial-shots-with-and…
Browse files Browse the repository at this point in the history
…-without-paralellism' into issue_0123-add-fwi-tutorial-and-more-test-cases
  • Loading branch information
Olender committed Jul 25, 2024
2 parents 9b621ce + 0757158 commit 66adf53
Show file tree
Hide file tree
Showing 20 changed files with 995 additions and 191 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
mpiexec -n 6 pytest test_3d/test_hexahedral_convergence.py
mpiexec -n 6 pytest test_parallel/test_forward.py
mpiexec -n 6 pytest test_parallel/test_fwi.py
mpiexec -n 6 pytest test_parallel/test_forward_supershot.py
mpiexec -n 2 pytest test_parallel/test_parallel_io.py
mpiexec -n 3 pytest test_parallel/test_supershot_grad.py
mpiexec -n 2 pytest test_parallel/test_forward_multiple_serial_shots.py
mpiexec -n 2 pytest test_parallel/test_gradient_serialshots.py
- name: Covering parallel 3D forward test
continue-on-error: true
run: |
Expand All @@ -40,6 +45,31 @@ jobs:
run: |
source /home/olender/firedrakes/2024_07_19/firedrake/bin/activate
mpiexec -n 6 pytest --cov-report=xml --cov-append --cov=spyro test_parallel/test_fwi.py
- name: Covering parallel supershot test
continue-on-error: true
run: |
source /home/olender/firedrakes/2024_07_19/firedrake/bin/activate
mpiexec -n 6 pytest --cov-report=xml --cov-append --cov=spyro test_parallel/test_forward_supershot.py
- name: Covering parallel io test
continue-on-error: true
run: |
source /home/olender/firedrakes/2024_07_19/firedrake/bin/activate
mpiexec -n 2 pytest --cov-report=xml --cov-append --cov=spyro test_parallel/test_parallel_io.py
- name: Covering parallel supershot grad test
continue-on-error: true
run: |
source /home/olender/firedrakes/2024_07_19/firedrake/bin/activate
mpiexec -n 3 pytest --cov-report=xml --cov-append --cov=spyro test_parallel/test_supershot_grad.py
- name: Covering spatially parallelized shots in serial
continue-on-error: true
run: |
source /home/olender/firedrakes/2024_07_19/firedrake/bin/activate
mpiexec -n 2 pytest --cov-report=xml --cov-append --cov=spyro test_parallel/test_forward_multiple_serial_shots.py
- name: Covering spatially parallelized shots in serial
continue-on-error: true
run: |
source /home/olender/firedrakes/2024_07_19/firedrake/bin/activate
mpiexec -n 2 pytest --cov-report=xml --cov-append --cov=spyro test_parallel/test_test_gradient_serialshots.py
- name: Uploading coverage to Codecov
run: export CODECOV_TOKEN="057ec853-d7ea-4277-819b-0c5ea2f9ff57" && bash <(curl -s https://codecov.io/bash)

28 changes: 14 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
// {
// "name": "Python Attach 0",
// "type": "python",
// "request": "attach",
// "port": 3000,
// "host": "localhost",
// },
// {
// "name": "Python Attach 1",
// "type": "python",
// "request": "attach",
// "port": 3001,
// "host": "localhost"
// },
{
"name": "Python Attach 0",
"type": "python",
"request": "attach",
"port": 3000,
"host": "localhost",
},
{
"name": "Python Attach 1",
"type": "python",
"request": "attach",
"port": 3001,
"host": "localhost"
},
{
"name": "Python Debugger: Current File",
"type": "debugpy",
Expand Down
4 changes: 4 additions & 0 deletions cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ rm *.png
rm *.vtu
rm *.pvtu
rm *.pvd
rm *.npy
rm *.pdf
rm *.dat
rm results/*.vtu
rm results/*.pvd
rm results/*.pvtu
rm shots/*.dat
rm -rf results/shot*
rm -rf results/gradient
rm -rf results/adjoint_shot
Expand Down
13 changes: 10 additions & 3 deletions spyro/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
load_shots,
read_mesh,
interpolate,
# ensemble_forward,
# ensemble_forward_ad,
# ensemble_forward_elastic_waves,
ensemble_gradient,
# ensemble_gradient_elastic_waves,
ensemble_plot,
parallel_print,
saving_source_and_receiver_location_in_csv,
switch_serial_shot,
ensemble_save_or_load,
delete_tmp_files,
ensemble_shot_record,
ensemble_functional
)
from .model_parameters import Model_parameters
from .backwards_compatibility_io import Dictionary_conversion
Expand All @@ -28,7 +31,6 @@
"load_shots",
"read_mesh",
"interpolate",
# "ensemble_forward",
# "ensemble_forward_ad",
# "ensemble_forward_elastic_waves",
"ensemble_gradient",
Expand All @@ -41,4 +43,9 @@
"dictionaryio",
"boundary_layer_io",
"saving_source_and_receiver_location_in_csv",
"switch_serial_shot",
"ensemble_save_or_load",
"delete_tmp_files",
"ensemble_shot_record",
"ensemble_functional",
]
Loading

0 comments on commit 66adf53

Please sign in to comment.