Skip to content

Commit 1743ae2

Browse files
committed
Using system install of MPI 🎌
1 parent f5c10d8 commit 1743ae2

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

.github/workflows/test.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tests
1+
name: Run Karabo Tests
22

33
on:
44
schedule: # Every night at 5am
@@ -17,6 +17,23 @@ jobs:
1717
steps:
1818
- name: Checkout Code
1919
uses: actions/checkout@v5
20+
21+
- name: Install system MPICH (needed for external mpich) + compat symlink for wsclean
22+
shell: bash
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y mpich libmpich-dev libmpich12
26+
arch="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
27+
# wsclean expects libmpicxx.so.12 but Ubuntu provides libmpichcxx.so.12
28+
if [ -e "/usr/lib/$arch/libmpichcxx.so.12" ] && [ ! -e "/usr/lib/$arch/libmpicxx.so.12" ]; then
29+
sudo ln -s "/usr/lib/$arch/libmpichcxx.so.12" "/usr/lib/$arch/libmpicxx.so.12"
30+
sudo ldconfig
31+
fi
32+
# Optional sanity:
33+
ldconfig -p | grep -E 'libmpi\.so\.12|libmpichcxx\.so\.12|libmpicxx\.so\.12' || true
34+
which mpirun
35+
mpirun --version
36+
2037
- name: Install Conda
2138
uses: conda-incubator/setup-miniconda@v3
2239
with:
@@ -26,38 +43,39 @@ jobs:
2643
conda-remove-defaults: "true"
2744
activate-environment: test_karabo
2845
python-version: "3.10"
29-
- name: Install System MPI
30-
run: |
31-
sudo apt-get update
32-
sudo apt-get install -y mpich libmpich-dev
33-
which mpirun
34-
mpirun --version
3546

3647
- name: Install Deps
3748
shell: bash -el {0}
3849
run: |
3950
conda create -y -n test_karabo python=3.10
51+
conda env update -n test_karabo -f environment.yaml --prune
4052
conda activate test_karabo
41-
# Entfernen Sie mpich aus environment.yaml oder überschreiben Sie es:
42-
conda env update -f environment.yaml
43-
# mpi4py wird gegen System-MPI gebaut:
4453
pip install --no-binary mpi4py mpi4py==4.1.1
4554
pip install -e ".[dev]"
46-
python -m ipykernel install --user --name python3.10
55+
python -m ipykernel install --user --name python3.10
56+
57+
# Debug since we had problems with mpi installation
58+
python -c "import h5py; print('h5py ok')"
59+
which wsclean || true
60+
ldd "$(which wsclean)" | grep -i mpi || tru
4761
4862
- name: Test Dev-Tools
4963
shell: bash -el {0}
5064
run: |
65+
conda activate test_karabo
5166
flake8 .
5267
black --check .
5368
isort --check .
5469
mypy .
70+
5571
- name: Test Code
5672
shell: bash -el {0}
5773
run: |
5874
export IS_GITHUB_RUNNER=true RUN_GPU_TESTS=false RUN_NOTEBOOK_TESTS=true
75+
conda activate test_karabo
5976
mpirun -n 2 pytest --only-mpi
6077
pytest --cov=./ --cov-report=xml
78+
6179
- name: Upload coverage reports to Codecov
6280
uses: codecov/codecov-action@v3
6381
with:

0 commit comments

Comments
 (0)