-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (54 loc) · 1.8 KB
/
mpi_test.yaml
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
name: Mpi Test
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
#python-version: ['3.8', '3.9', '3.10']
python-version: ['3.10']
mpi: [openmpi]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Up ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: Setup MPI (${{ matrix.mpi }})
uses: mpi4py/setup-mpi@v1
with:
mpi: ${{ matrix.mpi }}
- name: Install Software
run: |
python -m pip install --upgrade pip
python -m pip install .[dev,github-actions,test]
- name: Install mpi4py
run: |
python -m pip install mpi4py
- name: Make Enviroment
run: |
cd $GITHUB_WORKSPACE
mkdir mpi_work
cd mpi_work
cp ../examples/mpi/sphere_cpu_1node_1try/config.yaml .
cp ../examples/mpi/sphere_cpu_1node_1try/user.py .
echo `hostname` slots=2 > hostfile
- name: Run aiaccel with mpi
run: |
cd $GITHUB_WORKSPACE/mpi_work
pwd
ls -l
cat hostfile
PYTHONPATH=$GITHUB_WORKSPACE mpiexec -n 2 -hostfile hostfile python -m mpi4py.futures -m aiaccel.cli.start --config config.yaml --clean --from_mpi_bat 2>&1 | tee logf
- name: Mpi Test
run: |
cd $GITHUB_WORKSPACE
ls -l mpi_work/work/mpi/rank_log
cat mpi_work/work/mpi/rank_log/0.csv
cat mpi_work/work/mpi/rank_log/1.csv
pytest -s -v tests/mpi/test_mpi.py