Skip to content

Commit 3968cab

Browse files
authored
Merge pull request #12800 from wenduwan/test_mpi4py
[v5.0.x] .github/workflow: set up runtime params right before mpi4py test
2 parents 3bec944 + b4c98c9 commit 3968cab

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

.github/workflows/ompi_mpi4py.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ jobs:
77
runs-on: ubuntu-latest
88
timeout-minutes: 30
99
steps:
10-
- name: Configure hostname
11-
run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null
12-
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
13-
1410
- name: Install depencencies
1511
run: sudo apt-get install -y -q
1612
libnuma-dev
@@ -54,18 +50,6 @@ jobs:
5450
- name: Add Open MPI to PATH
5551
run: echo /opt/openmpi/bin >> $GITHUB_PATH
5652

57-
- name: Tweak MPI
58-
run: |
59-
# Tweak MPI
60-
mca_params="$HOME/.openmpi/mca-params.conf"
61-
mkdir -p "$(dirname "$mca_params")"
62-
echo mpi_param_check = true >> "$mca_params"
63-
echo mpi_show_handle_leaks = true >> "$mca_params"
64-
echo rmaps_base_oversubscribe = true >> "$mca_params"
65-
mca_params="$HOME/.prte/mca-params.conf"
66-
mkdir -p "$(dirname "$mca_params")"
67-
echo rmaps_default_mapping_policy = :oversubscribe >> "$mca_params"
68-
6953
- name: Show MPI
7054
run: ompi_info
7155

@@ -101,8 +85,6 @@ jobs:
10185
with:
10286
path: |
10387
/opt/openmpi
104-
~/.openmpi
105-
~/.prte
10688
test
10789
demo
10890
mpi4py-*.whl

.github/workflows/ompi_mpi4py_tests.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,40 @@ jobs:
1919
env:
2020
${{ inputs.env_name}}: 1
2121
steps:
22+
- name: Configure hostname
23+
run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null
24+
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
25+
2226
- name: Use Python
2327
uses: actions/setup-python@v5
2428
with:
2529
python-version: 3
2630
architecture: x64
31+
2732
- name: Get artifacts
2833
uses: actions/download-artifact@v4
2934
with:
3035
path: /
3136
name: build-artifacts
37+
3238
- name: Restore executable permissions
3339
run: chmod a+x /opt/openmpi/bin/*
40+
3441
- name: Add Open MPI to PATH
3542
run: echo /opt/openmpi/bin >> $GITHUB_PATH
43+
44+
- name: Tweak MPI
45+
run: |
46+
# Tweak MPI
47+
mca_params="$HOME/.openmpi/mca-params.conf"
48+
mkdir -p "$(dirname "$mca_params")"
49+
echo mpi_param_check = true >> "$mca_params"
50+
echo mpi_show_handle_leaks = true >> "$mca_params"
51+
echo rmaps_base_oversubscribe = true >> "$mca_params"
52+
mca_params="$HOME/.prte/mca-params.conf"
53+
mkdir -p "$(dirname "$mca_params")"
54+
echo rmaps_default_mapping_policy = :oversubscribe >> "$mca_params"
55+
3656
- name: Install the mpi4py wheel
3757
run: python -m pip install mpi4py --no-index --find-links=.
3858

0 commit comments

Comments
 (0)