Skip to content

Commit 9495278

Browse files
committed
Reintroduce OpenMPI tests
1 parent 63c4809 commit 9495278

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/unix-openmpi.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Unix-OpenMPI
2+
3+
on:
4+
pull_request:
5+
# Run daily at midnight (UTC).
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.10', 3.11]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: conda-incubator/setup-miniconda@v3
19+
name: Setup conda
20+
with:
21+
auto-update-conda: true
22+
activate-environment: testing
23+
auto-activate-base: false
24+
channels: defaults
25+
channel-priority: true
26+
python-version: ${{ matrix.python-version }}
27+
28+
- shell: bash -l {0}
29+
name: Install dependencies
30+
run: |
31+
conda install numpy pandas pytorch cpuonly -c pytorch
32+
conda install -c conda-forge mpi4py openmpi
33+
pip install .[test]
34+
- shell: bash -l {0}
35+
name: Run unit tests with openMPI
36+
run: |
37+
python -m pytest tests/
38+
mpirun -np 3 --oversubscribe python -m pytest --with-mpi tests/test_grid_sampling_mpi.py

0 commit comments

Comments
 (0)