Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,27 @@ jobs:
run: |
rm -rf $GITHUB_WORKSPACE/performance_1_results/;
mkdir -p $GITHUB_WORKSPACE/performance_1_results/
- name: Run performance benchmark
- name: Run performance benchmark 1
shell: bash
run: |
cd $GITHUB_WORKSPACE/cbdr/;
time cargo run --release sample --timeout=1800s "main:$GITHUB_WORKSPACE/main/source/build/./aspect-release $GITHUB_WORKSPACE/feature/source/build/tests/performance_continental_extension.x.prm" "feature:$GITHUB_WORKSPACE/feature/source/build/./aspect-release $GITHUB_WORKSPACE/feature/source/build/tests/performance_continental_extension.x.prm" > $GITHUB_WORKSPACE/result_1.csv;
cat $GITHUB_WORKSPACE/result_1.csv;
cat $GITHUB_WORKSPACE/result_1.csv | cargo run --release analyze --disable-dynamic-printing > $GITHUB_WORKSPACE/performance_1_results/analyze_1.log ||:;
cat $GITHUB_WORKSPACE/performance_1_results/analyze_1.log
- name: Run performance benchmark 2
shell: bash
run: |
cd $GITHUB_WORKSPACE/cbdr/;
time cargo run --release sample --timeout=1800s "main:$GITHUB_WORKSPACE/main/source/build/./aspect-release $GITHUB_WORKSPACE/feature/source/build/tests/performance_nsinker_gmg_idr.x.prm" "feature:$GITHUB_WORKSPACE/feature/source/build/./aspect-release $GITHUB_WORKSPACE/feature/source/build/tests/performance_nsinker_gmg_idr.x.prm" > $GITHUB_WORKSPACE/result_2.csv;
cat $GITHUB_WORKSPACE/result_2.csv;
cat $GITHUB_WORKSPACE/result_2.csv | cargo run --release analyze --disable-dynamic-printing > $GITHUB_WORKSPACE/performance_1_results/analyze_2.log ||:;
cat $GITHUB_WORKSPACE/performance_2_results/analyze_2.log
- uses: actions/upload-artifact@v7
with:
name: performance_1_results
path: performance_1_results/
- uses: actions/upload-artifact@v7
with:
name: performance_2_results
path: performance_2_results/
26 changes: 24 additions & 2 deletions .github/workflows/post_performance_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
per_page: 100,
});

const names = Array.from({ length: 1 }, (_, i) => `performance_${i + 1}_results`);
const names = Array.from({ length: 2 }, (_, i) => `performance_${i + 1}_results`);

for (const name of names) {
const artifact = data.artifacts.find(a => a.name === name);
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Unzip artifacts
run: |
set -e
for i in $(seq 1 8); do
for i in $(seq 1 2); do
f="performance_${i}_results.zip"
if [ -f "$f" ]; then
unzip -o "$f"
Expand Down Expand Up @@ -96,6 +96,27 @@ jobs:
echo "wall_time_1_CI_low=$(echo "$line" | sed 's/\[/ /g; s/\]/ /g' | awk '{print $8}')"
echo "wall_time_1_CI_high=$(echo "$line" | sed 's/\[/ /g; s/\]/ /g' | awk '{print $10}')"
} >> "$GITHUB_OUTPUT"

- name: Retrieve performance benchmark 2
id: retrieve_performance_2
env:
benchmark_number: 2
run: |
set -e
file="$GITHUB_WORKSPACE/performance_2_results/analyze_2.log"
cat "$file"
line=$(grep wall_time "$file" | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g')
samples=$(grep samples "$file" | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g')
{
echo "wall_time_2_main_mean=$(echo "$line" | awk '{print $2}')"
echo "wall_time_2_main_std_dev=$(echo "$line" | awk '{print $4}')"
echo "wall_time_2_main_samples=$(echo "$samples" | awk '{print $2}')"
echo "wall_time_2_feature_mean=$(echo "$line" | awk '{print $5}')"
echo "wall_time_2_feature_std_dev=$(echo "$line" | awk '{print $7}')"
echo "wall_time_2_feature_samples=$(echo "$samples" | awk '{print $3}')"
echo "wall_time_2_CI_low=$(echo "$line" | sed 's/\[/ /g; s/\]/ /g' | awk '{print $8}')"
echo "wall_time_2_CI_high=$(echo "$line" | sed 's/\[/ /g; s/\]/ /g' | awk '{print $10}')"
} >> "$GITHUB_OUTPUT"
- name: Find Comment
id: find_comment
continue-on-error: true
Expand All @@ -115,4 +136,5 @@ jobs:
| Benchmark | Main | Feature | Difference (99.9% CI) |
| --- | --- | --- | --- |
| Continental extension | ${{ steps.retrieve_performance_1.outputs.wall_time_1_main_mean }} ± ${{ steps.retrieve_performance_1.outputs.wall_time_1_main_std_dev }} (s=${{ steps.retrieve_performance_1.outputs.wall_time_1_main_samples }})| ${{ steps.retrieve_performance_1.outputs.wall_time_1_feature_mean }} ± ${{ steps.retrieve_performance_1.outputs.wall_time_1_feature_std_dev }} (s=${{ steps.retrieve_performance_1.outputs.wall_time_1_feature_samples }})| ${{ steps.retrieve_performance_1.outputs.wall_time_1_CI_low }} .. ${{ steps.retrieve_performance_1.outputs.wall_time_1_CI_high }} |
| GMG nsinker | ${{ steps.retrieve_performance_2.outputs.wall_time_2_main_mean }} ± ${{ steps.retrieve_performance_2.outputs.wall_time_2_main_std_dev }} (s=${{ steps.retrieve_performance_2.outputs.wall_time_2_main_samples }})| ${{ steps.retrieve_performance_2.outputs.wall_time_2_feature_mean }} ± ${{ steps.retrieve_performance_2.outputs.wall_time_2_feature_std_dev }} (s=${{ steps.retrieve_performance_2.outputs.wall_time_2_feature_samples }})| ${{ steps.retrieve_performance_2.outputs.wall_time_2_CI_low }} .. ${{ steps.retrieve_performance_2.outputs.wall_time_2_CI_high }} |
edit-mode: replace
21 changes: 21 additions & 0 deletions tests/performance_nsinker_gmg_idr.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Copyright (C) 2022 by the authors of the ASPECT code.

This file is part of ASPECT.

ASPECT is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

ASPECT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with ASPECT; see the file LICENSE. If not see
<http://www.gnu.org/licenses/>.
*/

#include "../benchmarks/nsinker/nsinker.cc"
25 changes: 25 additions & 0 deletions tests/performance_nsinker_gmg_idr.prm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# MPI: 4
# Nsinker benchmark using geometric multigrid preconditioner
# with an IDR(2) solver

set Dimension = 3

include $ASPECT_SOURCE_DIR/benchmarks/nsinker/nsinker_gmg.prm


subsection Material model
set Material averaging = harmonic average only viscosity
end

subsection Solver parameters
subsection Stokes solver parameters
set Stokes solver type = block GMG
set Krylov method for cheap solver steps = IDR(s)
set IDR(s) parameter = 2
end
end

subsection Mesh refinement
set Initial adaptive refinement = 0
set Initial global refinement = 6
end
24 changes: 24 additions & 0 deletions tests/performance_nsinker_gmg_idr/screen-output
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

Loading shared library <./libperformance_nsinker_gmg_idr.release.so>

Number of active cells: 262,144 (on 7 levels)
Number of degrees of freedom: 8,861,381 (6,440,067+274,625+2,146,689)

*** Timestep 0: t=0 seconds, dt=0 seconds
Solving Stokes system (GMG)...
GMG coarse size A: 81, coarse size S: 8
GMG levels: 7
Viscosity range: 0.01 - 100
GMG workload imbalance: 1.00001
Stokes solver (IDR(2)): 12+0 iterations.
Schur complement preconditioner: 34+0 iterations.
A block preconditioner: 34+0 iterations.

Postprocessing:
System matrix memory consumption: 25.77 MB
Writing graphical output: output-performance_nsinker_gmg_idr/solution/solution-00000

Termination requested by criterion: end time

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how long does this run in CI? How long in release mode in the performance tester?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my computer between 23 (directly run) and 29 seconds (run with ctest)




Loading