Skip to content

Commit

Permalink
Merge pull request #397 from MFraters/add_min_max_surface_benchmarks
Browse files Browse the repository at this point in the history
Add benchmarks for the new surfaces.
  • Loading branch information
MFraters authored Mar 26, 2022
2 parents 6d4a223 + 4ac3e95 commit 549cd4b
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 1 deletion.
8 changes: 7 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,6]
benchmark_number: [1,2,3,4,5,6,7,8]
include:
- benchmark_number: 1
benchmark_name: 'slab_interpolation_simple_none'
Expand All @@ -27,6 +27,12 @@ jobs:
- benchmark_number: 6
benchmark_name: 'spherical_fault_interpolation_simple_none'
benchmark_gridfile: 'spherical_subducting_plate_gridfile'
- benchmark_number: 7
benchmark_name: 'continental_min_max_surface'
benchmark_gridfile: 'cartesian_surface'
- benchmark_number: 8
benchmark_name: 'continental_min_max_surface_spherical'
benchmark_gridfile: 'spherical_surface_p180'

runs-on: ubuntu-latest

Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/post_benchmark_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,37 @@ jobs:
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/benchmark_6_results.zip', Buffer.from(download.data));
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "benchmark_7_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_7_results.zip', Buffer.from(download.data));
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "benchmark_8_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_8_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;
unzip benchmark_7_results.zip;
unzip benchmark_8_results.zip;
- name: retrieve pull request number
id: retrieve_pull_request_number
Expand Down Expand Up @@ -196,6 +220,36 @@ 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 7
env:
benchmark_number: 7
id: retrieve_benchmark_7
run: |
cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log;
echo "::set-output name=wall_time_${{env.benchmark_number}}_main_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}}_main_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}}_main_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: retrieve benchmark 8
env:
benchmark_number: 8
id: retrieve_benchmark_8
run: |
cat ${{github.workspace}}/analyze_${{env.benchmark_number}}.log;
echo "::set-output name=wall_time_${{env.benchmark_number}}_main_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}}_main_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}}_main_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 @@ -220,4 +274,6 @@ jobs:
| Slab interpolation simple curved CMS | ${{ steps.retrieve_benchmark_4.outputs.wall_time_4_main_mean }} ± ${{ steps.retrieve_benchmark_4.outputs.wall_time_4_main_std_dev }} (s=${{ steps.retrieve_benchmark_4.outputs.wall_time_4_main_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_main_mean }} ± ${{ steps.retrieve_benchmark_5.outputs.wall_time_5_main_std_dev }} (s=${{ steps.retrieve_benchmark_5.outputs.wall_time_5_main_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_main_mean }} ± ${{ steps.retrieve_benchmark_6.outputs.wall_time_6_main_std_dev }} (s=${{ steps.retrieve_benchmark_6.outputs.wall_time_6_main_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 }} |
| Cartesian min max surface | ${{ steps.retrieve_benchmark_7.outputs.wall_time_7_main_mean }} ± ${{ steps.retrieve_benchmark_7.outputs.wall_time_7_main_std_dev }} (s=${{ steps.retrieve_benchmark_7.outputs.wall_time_7_main_samples }})| ${{ steps.retrieve_benchmark_7.outputs.wall_time_7_feature_mean }} ± ${{ steps.retrieve_benchmark_7.outputs.wall_time_7_feature_std_dev }} (s=${{ steps.retrieve_benchmark_7.outputs.wall_time_7_feature_samples }})| ${{ steps.retrieve_benchmark_7.outputs.wall_time_7_CI_low }} .. ${{ steps.retrieve_benchmark_7.outputs.wall_time_7_CI_high }} |
| Spherical min max surface | ${{ steps.retrieve_benchmark_8.outputs.wall_time_8_main_mean }} ± ${{ steps.retrieve_benchmark_8.outputs.wall_time_8_main_std_dev }} (s=${{ steps.retrieve_benchmark_8.outputs.wall_time_8_main_samples }})| ${{ steps.retrieve_benchmark_8.outputs.wall_time_8_feature_mean }} ± ${{ steps.retrieve_benchmark_8.outputs.wall_time_8_feature_std_dev }} (s=${{ steps.retrieve_benchmark_8.outputs.wall_time_8_feature_samples }})| ${{ steps.retrieve_benchmark_8.outputs.wall_time_8_CI_low }} .. ${{ steps.retrieve_benchmark_8.outputs.wall_time_8_CI_high }} |
edit-mode: replace
18 changes: 18 additions & 0 deletions tests/visualization/cartesian_surface.grid
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ouput variables
grid_type = cartesian
dim = 3
compositions = 2 #5
vtu_output_format = ASCII

# domain of the grid
x_min = -100e3
x_max = 1100e3
y_min = -100e3
y_max = 1100e3
z_min = 0
z_max = 500e3

# grid properties
n_cell_x = 120
n_cell_y = 120
n_cell_z = 50
17 changes: 17 additions & 0 deletions tests/visualization/spherical_surface_p180.grid
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ouput variables
grid_type = chunk
dim = 3
compositions = 2

# domain of the grid
x_min = 170
x_max = 190
y_min = -5
y_max = 15
z_min = 5871e3
z_max = 6371e3

# grid properties
n_cell_x = 200
n_cell_y = 200
n_cell_z = 50

0 comments on commit 549cd4b

Please sign in to comment.