Skip to content

Commit

Permalink
Merge pull request #266 from MFraters/add_fault_benchmark
Browse files Browse the repository at this point in the history
Add benchmark which tests faults far away.
  • Loading branch information
MFraters authored Jun 15, 2021
2 parents b3eabfb + d1c5266 commit 092c216
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
benchmark_number: [1,2,3,4,5]
benchmark_number: [1,2,3,4,5,6]
include:
- benchmark_number: 1
benchmark_name: 'slab_interpolation_simple_none'
Expand All @@ -24,6 +24,9 @@ jobs:
- benchmark_number: 5
benchmark_name: 'spherical_slab_interpolation_simple_CMS'
benchmark_gridfile: 'spherical_subducting_plate_gridfile'
- benchmark_number: 6
benchmark_name: 'spherical_fault_interpolation_simple_none'
benchmark_gridfile: 'spherical_subducting_plate_gridfile'

runs-on: ubuntu-latest

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/post_benchmark_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,24 @@ jobs:
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/benchmark_5_results.zip', Buffer.from(download.data));
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "benchmark_6_results"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/benchmark_6_results.zip', Buffer.from(download.data));
- run: |
unzip benchmark_1_results.zip;
unzip benchmark_2_results.zip;
unzip benchmark_3_results.zip;
unzip benchmark_4_results.zip;
unzip benchmark_5_results.zip;
unzip benchmark_6_results.zip;
- name: retrieve pull request number
id: retrieve_pull_request_number
Expand Down Expand Up @@ -169,6 +181,21 @@ jobs:
echo "::set-output name=wall_time_${{env.benchmark_number}}_CI_low::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep wall_time | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | sed 's/\[/ /g' | sed 's/\]/ /g' | awk '{print $8}')";
echo "::set-output name=wall_time_${{env.benchmark_number}}_CI_high::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep wall_time | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | sed 's/\[/ /g' | sed 's/\]/ /g' | awk '{print $10}')";
- name: retrieve benchmark 6
env:
benchmark_number: 6
id: retrieve_benchmark_6
run: |
cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log;
echo "::set-output name=wall_time_${{env.benchmark_number}}_master_mean::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep wall_time | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | awk '{print $2}')";
echo "::set-output name=wall_time_${{env.benchmark_number}}_master_std_dev::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep wall_time | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | awk '{print $4}')";
echo "::set-output name=wall_time_${{env.benchmark_number}}_master_samples::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep samples | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | awk '{print $2}')";
echo "::set-output name=wall_time_${{env.benchmark_number}}_feature_mean::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep wall_time | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | awk '{print $5}')";
echo "::set-output name=wall_time_${{env.benchmark_number}}_feature_std_dev::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep wall_time | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | awk '{print $7}')";
echo "::set-output name=wall_time_${{env.benchmark_number}}_feature_samples::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep samples | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | awk '{print $3}')";
echo "::set-output name=wall_time_${{env.benchmark_number}}_CI_low::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep wall_time | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | sed 's/\[/ /g' | sed 's/\]/ /g' | awk '{print $8}')";
echo "::set-output name=wall_time_${{env.benchmark_number}}_CI_high::$(cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log | grep wall_time | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | sed 's/\[/ /g' | sed 's/\]/ /g' | awk '{print $10}')";
- name: Find Comment
continue-on-error: true
uses: peter-evans/find-comment@v1
Expand All @@ -192,4 +219,5 @@ jobs:
| Spherical slab interpolation simple none | ${{ steps.retrieve_benchmark_3.outputs.wall_time_3_master_mean }} ± ${{ steps.retrieve_benchmark_3.outputs.wall_time_3_master_std_dev }} (s=${{ steps.retrieve_benchmark_3.outputs.wall_time_3_master_samples }})| ${{ steps.retrieve_benchmark_3.outputs.wall_time_3_feature_mean }} ± ${{ steps.retrieve_benchmark_3.outputs.wall_time_3_feature_std_dev }} (s=${{ steps.retrieve_benchmark_3.outputs.wall_time_3_feature_samples }})| ${{ steps.retrieve_benchmark_3.outputs.wall_time_3_CI_low }} .. ${{ steps.retrieve_benchmark_3.outputs.wall_time_3_CI_high }} |
| Slab interpolation simple curved CMS | ${{ steps.retrieve_benchmark_4.outputs.wall_time_4_master_mean }} ± ${{ steps.retrieve_benchmark_4.outputs.wall_time_4_master_std_dev }} (s=${{ steps.retrieve_benchmark_4.outputs.wall_time_4_master_samples }})| ${{ steps.retrieve_benchmark_4.outputs.wall_time_4_feature_mean }} ± ${{ steps.retrieve_benchmark_4.outputs.wall_time_4_feature_std_dev }} (s=${{ steps.retrieve_benchmark_4.outputs.wall_time_4_feature_samples }})| ${{ steps.retrieve_benchmark_4.outputs.wall_time_4_CI_low }} .. ${{ steps.retrieve_benchmark_4.outputs.wall_time_4_CI_high }} |
| Spherical slab interpolation simple CMS | ${{ steps.retrieve_benchmark_5.outputs.wall_time_5_master_mean }} ± ${{ steps.retrieve_benchmark_5.outputs.wall_time_5_master_std_dev }} (s=${{ steps.retrieve_benchmark_5.outputs.wall_time_5_master_samples }})| ${{ steps.retrieve_benchmark_5.outputs.wall_time_5_feature_mean }} ± ${{ steps.retrieve_benchmark_5.outputs.wall_time_5_feature_std_dev }} (s=${{ steps.retrieve_benchmark_5.outputs.wall_time_5_feature_samples }})| ${{ steps.retrieve_benchmark_5.outputs.wall_time_5_CI_low }} .. ${{ steps.retrieve_benchmark_5.outputs.wall_time_5_CI_high }} |
| Spherical fault interpolation simple none | ${{ steps.retrieve_benchmark_6.outputs.wall_time_6_master_mean }} ± ${{ steps.retrieve_benchmark_6.outputs.wall_time_6_master_std_dev }} (s=${{ steps.retrieve_benchmark_6.outputs.wall_time_6_master_samples }})| ${{ steps.retrieve_benchmark_6.outputs.wall_time_6_feature_mean }} ± ${{ steps.retrieve_benchmark_6.outputs.wall_time_6_feature_std_dev }} (s=${{ steps.retrieve_benchmark_6.outputs.wall_time_6_feature_samples }})| ${{ steps.retrieve_benchmark_6.outputs.wall_time_6_CI_low }} .. ${{ steps.retrieve_benchmark_6.outputs.wall_time_6_CI_high }} |
edit-mode: replace
16 changes: 16 additions & 0 deletions tests/app/spherical_fault_interpolation_simple_none.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
6150000 900000 1e6 75565 10
6100000 900000 1e6 124400 10
6050000 900000 1e6 173218 10
6000000 900000 1e6 173218 10
6100000 950000 1200000 81922 10
6100000 950000 1200000 178867 10
5950000 950000 1200000 227304 10
5900000 950000 1200000 275714 10
5800000 950000 1200000 372458 10
5800000 1100000 1200000 346881 10
5800000 1100000 1300000 326167 10
5800000 1100000 1400000 303875 10
6000000 1100000 1400000 112405 10
6000000 1100000 1300000 134013 10
6000000 1100000 1200000 154087 10
6000000 1100000 1100000 172613 10
37 changes: 37 additions & 0 deletions tests/app/spherical_fault_interpolation_simple_none.wb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version":"0.4",
"coordinate system":{"model":"spherical","depth method":"starting point"},
"features":
[
{
"model":"fault", "name":"Big in model slab", "dip point":[-10,10],
"coordinates":[[0,0],[10,10],[25,15],[35,35]],
"segments":
[
{"length":450e3, "thickness":[100e3], "angle":[20]},
{"length":450e3, "thickness":[100e3], "angle":[40]}
],
"temperature models":[{"model":"uniform", "temperature":600}]
},
{
"model":"fault", "name":"Big out model slab", "dip point":[-10,10],
"coordinates":[[120,120],[130,130],[145,135],[165,165]],
"segments":
[
{"length":450e3, "thickness":[100e3], "angle":[20]},
{"length":450e3, "thickness":[100e3], "angle":[40]}
],
"temperature models":[{"model":"uniform", "temperature":600}]
},
{
"model":"fault", "name":"Big out model slab", "dip point":[10,-10],
"coordinates":[[120,120],[130,130],[145,135],[165,165]],
"segments":
[
{"length":450e3, "thickness":[100e3], "angle":[20]},
{"length":450e3, "thickness":[100e3], "angle":[40]}
],
"temperature models":[{"model":"uniform", "temperature":600}]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# x y z d g T
6150000 900000 1e6 75565 10 600
6100000 900000 1e6 124400 10 1656.71
6050000 900000 1e6 173218 10 1679.51
6000000 900000 1e6 173218 10 1679.51
6100000 950000 1200000 81922 10 600
6100000 950000 1200000 178867 10 1682.17
5950000 950000 1200000 227304 10 1705.14
5900000 950000 1200000 275714 10 1728.41
5800000 950000 1200000 372458 10 1775.87
5800000 1100000 1200000 346881 10 1763.2
5800000 1100000 1300000 326167 10 1753
5800000 1100000 1400000 303875 10 1742.1
6000000 1100000 1400000 112405 10 600
6000000 1100000 1300000 134013 10 1661.18
6000000 1100000 1200000 154087 10 1670.54
6000000 1100000 1100000 172613 10 1679.23
20 changes: 20 additions & 0 deletions tests/app/spherical_slab_interpolation_simple_CMS.wb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@
{"length":450e3, "thickness":[100e3], "angle":[40]}
],
"temperature models":[{"model":"uniform", "temperature":600}]
},
{
"model":"fault", "name":"Big out model slab", "dip point":[-10,10],
"coordinates":[[120,120],[130,130],[145,135],[165,165]],
"segments":
[
{"length":450e3, "thickness":[100e3], "angle":[20]},
{"length":450e3, "thickness":[100e3], "angle":[40]}
],
"temperature models":[{"model":"uniform", "temperature":600}]
},
{
"model":"fault", "name":"Big out model slab", "dip point":[10,-10],
"coordinates":[[120,120],[130,130],[145,135],[165,165]],
"segments":
[
{"length":450e3, "thickness":[100e3], "angle":[20]},
{"length":450e3, "thickness":[100e3], "angle":[40]}
],
"temperature models":[{"model":"uniform", "temperature":600}]
}
]
}

0 comments on commit 092c216

Please sign in to comment.