-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathrun-adaptivity-tests-parallel.yml
More file actions
125 lines (111 loc) · 3.84 KB
/
Copy pathrun-adaptivity-tests-parallel.yml
File metadata and controls
125 lines (111 loc) · 3.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Test adaptivity functionality in parallel
on:
workflow_run:
workflows: [Build OpenMPI cache]
types:
- completed
jobs:
integration_tests:
name: Integration tests
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
container: precice/precice:nightly
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
path: micro-manager
ref: ${{ github.event.workflow_run.head_sha }}
- name: Install sudo for MPI
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install sudo
- name: Use mpi4py
uses: mpi4py/setup-mpi@v1
- name: Install dependencies
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install python3-dev git python3-venv pkg-config
- name: Create a virtual environment and install Micro Manager in it
working-directory: micro-manager
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install .
- name: Run integration test with global adaptivity in parallel
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/integration/test_unit_cube/
mpiexec -n 2 --allow-run-as-root micro-manager-precice micro-manager-config-global-adaptivity-parallel.json &
python3 unit_cube.py 2
unit_tests:
name: Unit tests
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
container: precice/precice:nightly
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
path: micro-manager
ref: ${{ github.event.workflow_run.head_sha }}
- name: Load Cache OpenMPI 5
id: ompi-cache-load
uses: actions/cache/restore@v5
with:
path: ~/openmpi
key: openmpi-5.0.5-${{ runner.os }}-build
- name: Configure OpenMPI
run: |
if [ ! -d ~/openmpi ]; then
echo "::error::OpenMPI cache not found. The cache workflow may have failed."
exit 1
fi
cp -r ~/openmpi/* /usr/local/
ldconfig
which mpiexec
mpiexec --version
- name: Install Dependencies
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-venv git pkg-config
- name: Create a virtual environment and install Micro Manager in it
working-directory: micro-manager
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install .
- name: Run unit tests
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/unit
mpiexec -n 2 --allow-run-as-root python3 -m unittest test_adaptivity_parallel.py
- name: Run load balancing unit tests with 2 ranks
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/unit
mpiexec -n 2 --allow-run-as-root python3 -m unittest test_load_balancing.py
- name: Run load balancing unit tests with 4 ranks
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
cd tests/unit
mpiexec -n 4 --oversubscribe --allow-run-as-root python3 -m unittest test_load_balancing.py
- name: Run interpolation unit tests with 2 ranks
timeout-minutes: 3
working-directory: micro-manager
run: |
. .venv/bin/activate
pip install .[sklearn]
pip uninstall -y pyprecice
cd tests/unit
mpiexec -n 2 --allow-run-as-root python3 -m unittest test_interpolation.py