Skip to content

Commit be44c1d

Browse files
Use GitHub actions for running experiments (#1)
1 parent ce7c11e commit be44c1d

File tree

16 files changed

+427
-35
lines changed

16 files changed

+427
-35
lines changed

.github/workflows/monolithic.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Run monolithic experiments
2+
on: workflow_dispatch
3+
4+
jobs:
5+
run_experiments:
6+
strategy:
7+
matrix:
8+
experiment:
9+
- name: Newmark_beta
10+
args: '-tss Newmark_beta -w 10 -o convergence-studies/monolithic_Newmark_beta.csv'
11+
- name: generalized_alpha
12+
args: '-tss generalized_alpha -w 10 -o convergence-studies/monolithic_generalized_alpha.csv'
13+
- name: runge_kutta_4
14+
args: '-tss runge_kutta_4 -w 10 -o convergence-studies/monolithic_runge_kutta_4.csv'
15+
- name: radauIIA
16+
args: '-tss radauIIA -w 10 -o convergence-studies/monolithic_radauIIA.csv'
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
working-directory: ./monolithic
21+
steps:
22+
- name: Checkout Repository
23+
uses: actions/checkout@v4
24+
- name: Install Dependencies
25+
run: |
26+
sudo apt install -y python3-venv
27+
- name: Create venv
28+
run: |
29+
./make-venv.sh
30+
- name: Activate venv
31+
# see https://stackoverflow.com/a/74669486
32+
run: |
33+
. .venv/bin/activate
34+
echo PATH=$PATH >> $GITHUB_ENV
35+
- name: Run tutorial
36+
run: |
37+
python3 doConvergenceStudy.py --silent --executor Github ${{ matrix.experiment.args }}
38+
- name: Store results
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: monolithic ${{ matrix.experiment.name }}
42+
path: |
43+
# working directory is ignored by actions/upload-artifact
44+
./monolithic/convergence-studies
45+
merge:
46+
runs-on: ubuntu-latest
47+
needs: run_experiments
48+
steps:
49+
- name: Merge results
50+
uses: actions/upload-artifact/merge@v4
51+
with:
52+
name: monolithic

.github/workflows/multirate.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Run multirate experiments
2+
on: workflow_dispatch
3+
4+
jobs:
5+
run_experiments:
6+
strategy:
7+
matrix:
8+
experiment:
9+
- name: degree1
10+
args: '-tss radauIIA radauIIA -is BSpline -wd 1 -sb 1 1 -o convergence-studies/bspline/multirate_radauIIA_degree1.csv'
11+
- name: degree2
12+
args: '-tss radauIIA radauIIA -is BSpline -wd 2 -sb 2 2 -o convergence-studies/bspline/multirate_radauIIA_degree2.csv'
13+
- name: degree3
14+
args: '-tss radauIIA radauIIA -is BSpline -wd 3 -sb 4 4 -o convergence-studies/bspline/multirate_radauIIA_degree3.csv'
15+
- name: degree4
16+
args: '-tss radauIIA radauIIA -is BSpline -wd 4 -sb 16 16 -o convergence-studies/bspline/multirate_radauIIA_degree4.csv'
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
working-directory: ./multirate
21+
container: precice/precice:2.5.1
22+
steps:
23+
- name: Checkout Repository
24+
uses: actions/checkout@v4
25+
- name: Install Dependencies
26+
run: |
27+
apt-get -qq update
28+
apt-get -qq install python3-venv git pkg-config g++
29+
rm -rf /var/lib/apt/lists/*
30+
- name: Create venv
31+
run: |
32+
./make-venv.sh
33+
- name: Activate venv
34+
# see https://stackoverflow.com/a/74669486
35+
run: |
36+
. .venv/bin/activate
37+
echo PATH=$PATH >> $GITHUB_ENV
38+
- name: Run tutorial
39+
run: |
40+
python3 doConvergenceStudy.py precice-config-template.xml --silent --executor Github ${{ matrix.experiment.args }}
41+
- name: Store results
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: multirate ${{ matrix.experiment.name }}
45+
path: |
46+
# working directory is ignored by actions/upload-artifact
47+
./multirate/convergence-studies
48+
merge:
49+
runs-on: ubuntu-latest
50+
needs: run_experiments
51+
steps:
52+
- name: Merge results
53+
uses: actions/upload-artifact/merge@v4
54+
with:
55+
name: multirate

.github/workflows/precice-2.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Run precice-2 experiments
2+
on: workflow_dispatch
3+
4+
jobs:
5+
run_experiments:
6+
strategy:
7+
matrix:
8+
experiment:
9+
- name: Higher-order time stepping Newmark_beta
10+
args: '-tss Newmark_beta Newmark_beta -o convergence-studies/higher-order/precice_2_Newmark_beta.csv'
11+
- name: Higher-order time stepping generalized_alpha
12+
args: '-tss generalized_alpha generalized_alpha -o convergence-studies/higher-order/precice_2_generalized_alpha.csv'
13+
- name: Higher-order time stepping runge_kutta_4
14+
args: '-tss runge_kutta_4 runge_kutta_4 -o convergence-studies/higher-order/precice_2_runge_kutta_4.csv'
15+
- name: Higher-order time stepping radauIIA
16+
args: '-tss radauIIA radauIIA -o convergence-studies/higher-order/precice_2_radauIIA.csv'
17+
- name: Subcycling Newmark_beta
18+
args: '-s 5 -sb 1 1 -sf 2 1 -w 1 -tss Newmark_beta Newmark_beta -o convergence-studies/subcycling/precice_2_Newmark_beta.csv'
19+
- name: Subcycling generalized_alpha
20+
args: '-s 5 -sb 1 1 -sf 2 1 -w 1 -tss generalized_alpha generalized_alpha -o convergence-studies/subcycling/precice_2_generalized_alpha.csv'
21+
- name: Subcycling runge_kutta_4
22+
args: '-s 5 -sb 1 1 -sf 2 1 -w 1 -tss runge_kutta_4 runge_kutta_4 -o convergence-studies/subcycling/precice_2_runge_kutta_4.csv'
23+
- name: Subcycling radauIIA
24+
args: '-s 5 -sb 1 1 -sf 2 1 -w 1 -tss radauIIA radauIIA -o convergence-studies/subcycling/precice_2_radauIIA.csv'
25+
runs-on: ubuntu-latest
26+
defaults:
27+
run:
28+
working-directory: ./precice-2
29+
container: precice/precice:2.5.1
30+
steps:
31+
- name: Checkout Repository
32+
uses: actions/checkout@v4
33+
- name: Install Dependencies
34+
run: |
35+
apt-get -qq update
36+
apt-get -qq install python3-venv git pkg-config g++
37+
rm -rf /var/lib/apt/lists/*
38+
- name: Create venv
39+
run: |
40+
./make-venv.sh
41+
- name: Activate venv
42+
# see https://stackoverflow.com/a/74669486
43+
run: |
44+
. .venv/bin/activate
45+
echo PATH=$PATH >> $GITHUB_ENV
46+
- name: Run tutorial
47+
run: |
48+
python3 doConvergenceStudy.py precice-config-template.xml --silent --executor Github ${{ matrix.experiment.args }}
49+
- name: Store results
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: precice-2 ${{ matrix.experiment.name }}
53+
path: |
54+
# working directory is ignored by actions/upload-artifact
55+
./precice-2/convergence-studies
56+
merge:
57+
runs-on: ubuntu-latest
58+
needs: run_experiments
59+
steps:
60+
- name: Merge results
61+
uses: actions/upload-artifact/merge@v4
62+
with:
63+
name: precice-2

.github/workflows/precice-3.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Run precice-3 experiments
2+
on: workflow_dispatch
3+
4+
jobs:
5+
run_experiments:
6+
strategy:
7+
matrix:
8+
experiment:
9+
# Higher-order time stepping
10+
- name: Higher-order time stepping Newmark_beta
11+
args: '-tss Newmark_beta Newmark_beta -o convergence-studies/higher-order/precice_3_Newmark_beta.csv'
12+
container-tag: 3.1.2
13+
- name: Higher-order time stepping generalized_alpha
14+
args: '-tss generalized_alpha generalized_alpha -o convergence-studies/higher-order/precice_3_generalized_alpha.csv'
15+
container-tag: 3.1.2
16+
- name: Higher-order time stepping runge_kutta_4
17+
args: '-tss runge_kutta_4 runge_kutta_4 -o convergence-studies/higher-order/precice_3_runge_kutta_4.csv'
18+
container-tag: 3.1.2
19+
- name: Higher-order time stepping radauIIA
20+
args: '-tss radauIIA radauIIA -o convergence-studies/higher-order/precice_3_radauIIA.csv'
21+
container-tag: 3.1.2
22+
# Subcycling
23+
- name: Subcycling Newmark_beta
24+
args: '-s 5 -sb 1 1 -sf 2 1 -w 1 -tss Newmark_beta Newmark_beta -o convergence-studies/subcycling/precice_3_Newmark_beta.csv'
25+
container-tag: 3.1.2
26+
- name: Subcycling generalized_alpha
27+
args: '-s 5 -sb 1 1 -sf 2 1 -w 1 -tss generalized_alpha generalized_alpha -o convergence-studies/subcycling/precice_3_generalized_alpha.csv'
28+
container-tag: 3.1.2
29+
- name: Subcycling runge_kutta_4
30+
args: '-s 5 -sb 1 1 -sf 2 1 -w 1 -tss runge_kutta_4 runge_kutta_4 -o convergence-studies/subcycling/precice_3_runge_kutta_4.csv'
31+
container-tag: 3.1.2
32+
- name: Subcycling radauIIA
33+
args: '-s 5 -sb 1 1 -sf 2 1 -w 1 -tss radauIIA radauIIA -o convergence-studies/subcycling/precice_3_radauIIA.csv'
34+
container-tag: 3.1.2
35+
# Runge Kutta 4
36+
- name: runge_kutta_4 degree 1
37+
args: '-tss runge_kutta_4 runge_kutta_4 -wd 1 -dt 0.2 -sb 5 5 -o convergence-studies/runge-kutta-4/precice_3_runge_kutta_4_degree1.csv'
38+
container-tag: 3.1.2
39+
- name: runge_kutta_4 degree 2
40+
args: '-tss runge_kutta_4 runge_kutta_4 -wd 2 -dt 0.2 -sb 5 5 -o convergence-studies/runge-kutta-4/precice_3_runge_kutta_4_degree2.csv'
41+
container-tag: 3.1.2
42+
- name: runge_kutta_4 degree 3
43+
args: '-tss runge_kutta_4 runge_kutta_4 -wd 3 -dt 0.2 -sb 5 5 -o convergence-studies/runge-kutta-4/precice_3_runge_kutta_4_degree3.csv'
44+
container-tag: 3.1.2
45+
# RadauIIA
46+
- name: radauIIA degree 1
47+
args: '-tss radauIIA radauIIA -wd 1 -dt 0.2 -sb 5 5 -o convergence-studies/radauIIA/precice_3_radauIIA_degree1.csv'
48+
container-tag: 3.1.2
49+
- name: radauIIA degree 2
50+
args: '-tss radauIIA radauIIA -wd 2 -dt 0.2 -sb 5 5 -o convergence-studies/radauIIA/precice_3_radauIIA_degree2.csv'
51+
container-tag: 3.1.2
52+
- name: radauIIA degree 3
53+
args: '-tss radauIIA radauIIA -wd 3 -dt 0.2 -sb 5 5 -o convergence-studies/radauIIA/precice_3_radauIIA_degree3.csv'
54+
container-tag: 3.1.2
55+
# degree > 3 only allowed for precice > 3.2; see run_experiments_v3_nightly below
56+
- name: radauIIA degree 4
57+
args: '-tss radauIIA radauIIA -wd 4 -dt 0.2 -sb 5 5 -o convergence-studies/radauIIA/precice_3_radauIIA_degree4.csv'
58+
container-tag: nightly
59+
- name: radauIIA degree 5
60+
args: '-tss radauIIA radauIIA -wd 5 -dt 0.2 -sb 5 5 -o convergence-studies/radauIIA/precice_3_radauIIA_degree5.csv'
61+
container-tag: nightly
62+
runs-on: ubuntu-latest
63+
defaults:
64+
run:
65+
working-directory: ./precice-3
66+
container: precice/precice:${{ matrix.experiment.container-tag }}
67+
steps:
68+
- name: Checkout Repository
69+
uses: actions/checkout@v4
70+
- name: Install Dependencies
71+
run: |
72+
apt-get -qq update
73+
apt-get -qq install python3-venv git pkg-config g++
74+
rm -rf /var/lib/apt/lists/*
75+
- name: Create venv
76+
run: |
77+
./make-venv.sh
78+
- name: Activate venv
79+
# see https://stackoverflow.com/a/74669486
80+
run: |
81+
. .venv/bin/activate
82+
echo PATH=$PATH >> $GITHUB_ENV
83+
- name: Run tutorial
84+
run: |
85+
python3 doConvergenceStudy.py precice-config-template.xml --silent --executor Github ${{ matrix.experiment.args }}
86+
- name: Store logs
87+
if: always()
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: precice-3 logs ${{ matrix.experiment.name }}
91+
path: |
92+
# working directory is ignored by actions/upload-artifact
93+
./precice-3/*.log
94+
- name: Store results
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: precice-3 ${{ matrix.experiment.name }}
98+
path: |
99+
# working directory is ignored by actions/upload-artifact
100+
./precice-3/convergence-studies
101+
102+
merge:
103+
runs-on: ubuntu-latest
104+
needs: run_experiments
105+
steps:
106+
- name: Merge results
107+
uses: actions/upload-artifact/merge@v4
108+
with:
109+
name: precice-3

.github/workflows/waveform.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Run waveform experiments
2+
on: workflow_dispatch
3+
4+
jobs:
5+
run_experiments:
6+
strategy:
7+
matrix:
8+
experiment:
9+
- name: Lagrange Newmark_beta
10+
config: 'precice-config-template.xml'
11+
args: '-tss Newmark_beta Newmark_beta -o convergence-studies/lagrange/waveform_Newmark_beta.csv'
12+
- name: Lagrange generalized_alpha
13+
config: 'precice-config-template.xml'
14+
args: '-tss generalized_alpha generalized_alpha -o convergence-studies/lagrange/waveform_generalized_alpha.csv'
15+
- name: Lagrange runge_kutta_4
16+
config: 'precice-config-template.xml'
17+
args: '-tss runge_kutta_4 runge_kutta_4 -o convergence-studies/lagrange/waveform_runge_kutta_4.csv'
18+
- name: Lagrange radauIIA
19+
config: 'precice-config-template.xml'
20+
args: '-tss radauIIA radauIIA -o convergence-studies/lagrange/waveform_radauIIA.csv'
21+
- name: Hermite Newmark_beta
22+
config: 'precice-config-hermite-template.xml'
23+
args: '-is Hermite -tss Newmark_beta Newmark_beta -o convergence-studies/hermite/waveform_Newmark_beta.csv'
24+
- name: Hermite generalized_alpha
25+
config: 'precice-config-hermite-template.xml'
26+
args: '-is Hermite -tss generalized_alpha generalized_alpha -o convergence-studies/hermite/waveform_generalized_alpha.csv'
27+
- name: Hermite runge_kutta_4
28+
config: 'precice-config-hermite-template.xml'
29+
args: '-is Hermite -tss runge_kutta_4 runge_kutta_4 -o convergence-studies/hermite/waveform_runge_kutta_4.csv'
30+
- name: Hermite radauIIA
31+
config: 'precice-config-hermite-template.xml'
32+
args: '-is Hermite -tss radauIIA radauIIA -o convergence-studies/hermite/waveform_radauIIA.csv'
33+
runs-on: ubuntu-latest
34+
defaults:
35+
run:
36+
working-directory: ./waveform
37+
container: precice/precice:2.5.1
38+
steps:
39+
- name: Checkout Repository
40+
uses: actions/checkout@v4
41+
- name: Install Dependencies
42+
run: |
43+
apt-get -qq update
44+
apt-get -qq install python3-venv git pkg-config g++
45+
rm -rf /var/lib/apt/lists/*
46+
- name: Create venv
47+
run: |
48+
./make-venv.sh
49+
- name: Activate venv
50+
# see https://stackoverflow.com/a/74669486
51+
run: |
52+
. .venv/bin/activate
53+
echo PATH=$PATH >> $GITHUB_ENV
54+
- name: Run tutorial
55+
run: |
56+
python3 doConvergenceStudy.py ${{ matrix.experiment.config }} --silent --executor Github ${{ matrix.experiment.args }}
57+
- name: Store results
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: waveform ${{ matrix.experiment.name }}
61+
path: |
62+
# working directory is ignored by actions/upload-artifact
63+
./waveform/convergence-studies
64+
merge:
65+
runs-on: ubuntu-latest
66+
needs: run_experiments
67+
steps:
68+
- name: Merge results
69+
uses: actions/upload-artifact/merge@v4
70+
with:
71+
name: waveform

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ If you want to perform convergence studies, please install the package `prepesth
2828

2929
It is generally recommended to use the appropriate version of the preCICE virtual machine[^3][^4] for run all experiments. See https://precice.org/installation-vm.html for details.
3030

31+
You can also refer to the folder `.github/workflows` for CI jobs that run all experiments provided in this repository.
32+
3133
[^1]: Rodenberg, Benjamin. *Flexible and robust time stepping for partitioned multiphysics*. Technical University of Munich, 2025. Unpublished manuscript. Available at: https://doi.org/**TODO**.
3234
[^2]: Schüller, Valentina; Rodenberg, Benjamin; Uekermann, Benjamin; Bungartz, Hans-Joachim. *A Simple Test Case for Convergence Order in Time and Energy Conservation of Black-Box Coupling Schemes*. WCCM-APCOM2022, 2022. Available at: https://www.scipedia.com/public/Rodenberg_2022a.
3335
[^3]: Chourdakis, Gerasimos; Davis, Kyle; Desai, Ishaan; Rodenberg, Benjamin; Schneider, David; Simonis, Frédéric; Uekermann, Benjamin; Ariguib, Boshra; Cardiff, Philip; Jaust, Alexander; Kharitenko, Pavel; Klöfkorn, Robert; Kotarsky, Niklas; Martin, Boris; Scheurer, Erik; Schüller, Valentina; van Zwieten, Gertjan; Yurt, Kursat. *preCICE Distribution Version v2211.0*. DaRUS, 2023, V1. https://doi.org/10.18419/darus-3576.

0 commit comments

Comments
 (0)