Skip to content

Commit eebaa7b

Browse files
committed
Add SOS-backed macOS OpenSHMEM packages
1 parent 42fafe8 commit eebaa7b

14 files changed

Lines changed: 1082 additions & 411 deletions

.github/workflows/nightly-openmpi.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ jobs:
2222
- platform: linux-x86_64
2323
runner: ubuntu-24.04
2424
shmem: required
25+
sos: false
2526
shmem_validation: passed
2627
- platform: macos-arm64
2728
runner: macos-15
2829
shmem: disabled
29-
shmem_validation: unsupported
30+
sos: true
31+
shmem_validation: passed
3032
env:
3133
CCACHE_DIR: ${{ github.workspace }}/_ccache
3234
MPI_EXTENSIONS_CCACHE: on
@@ -41,7 +43,7 @@ jobs:
4143
uses: actions/cache@v4
4244
with:
4345
path: _ccache
44-
key: ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.platform }}-${{ hashFiles('manifests/openmpi-version.json', '.gitmodules') }}
46+
key: ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.platform }}-${{ hashFiles('manifests/openmpi-version.json', 'manifests/sos-version.json', '.gitmodules') }}
4547
restore-keys: |
4648
ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.platform }}-
4749
ccache-${{ runner.os }}-${{ runner.arch }}-
@@ -73,7 +75,7 @@ jobs:
7375
run: |
7476
set -euo pipefail
7577
brew update
76-
brew install autoconf automake bison ccache flex libtool pkg-config rsync
78+
brew install autoconf automake bison ccache flex libfabric libtool pkg-config rsync
7779
{
7880
echo "$(brew --prefix bison)/bin"
7981
echo "$(brew --prefix flex)/bin"
@@ -92,30 +94,32 @@ jobs:
9294
run: |
9395
set -euo pipefail
9496
ccache -z
95-
./scripts/build_openmpi.sh \
97+
./scripts/build_openmpi.py \
9698
--prefix "$PWD/_install/openmpi" \
9799
--build-dir "$PWD/_build/openmpi-${{ matrix.platform }}" \
98100
--enable-shmem "${{ matrix.shmem }}" \
99101
--ccache on
100102
103+
- name: Build Sandia OpenSHMEM/SOS
104+
if: matrix.sos
105+
run: |
106+
set -euo pipefail
107+
./scripts/build_sos_shmem.py \
108+
--prefix "$PWD/_install/openmpi" \
109+
--build-dir "$PWD/_build/sos-${{ matrix.platform }}" \
110+
--mpi-prefix "$PWD/_install/openmpi" \
111+
--ccache on
112+
101113
- name: Validate MPI
102-
run: ./scripts/smoke_test_mpi.sh "$PWD/_install/openmpi"
114+
run: ./scripts/smoke_test_mpi.py "$PWD/_install/openmpi"
103115

104116
- name: Validate OpenSHMEM
105-
if: matrix.shmem == 'required'
106-
run: ./scripts/smoke_test_shmem.sh "$PWD/_install/openmpi"
107-
108-
- name: Record unsupported OpenSHMEM on macOS
109-
if: matrix.shmem != 'required'
110-
run: |
111-
set -euo pipefail
112-
MPI_EXTENSIONS_ALLOW_UNSUPPORTED_SHMEM=1 \
113-
./scripts/smoke_test_shmem.sh "$PWD/_install/openmpi"
117+
run: ./scripts/smoke_test_shmem.py "$PWD/_install/openmpi"
114118

115119
- name: Package Open MPI
116120
run: |
117121
set -euo pipefail
118-
./scripts/package_openmpi.sh \
122+
./scripts/package_openmpi.py \
119123
--prefix "$PWD/_install/openmpi" \
120124
--out "$PWD/_dist" \
121125
--platform "${{ matrix.platform }}" \

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "external/ompi"]
22
path = external/ompi
33
url = https://github.com/open-mpi/ompi
4+
[submodule "external/sos"]
5+
path = external/sos
6+
url = https://github.com/Sandia-OpenSHMEM/SOS.git

README.md

Lines changed: 60 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,38 @@
22

33
`mpi-extensions` supplies Open MPI binary packages for
44
[`parallel_programming_course`](https://github.com/learning-process/parallel_programming_course).
5-
The packages are built from the Open MPI git submodule at `external/ompi` and
6-
are intended for rootless CI use: download, extract, add `bin/` to `PATH`, and
7-
let CMake discover `mpicc` and `mpicxx`.
5+
The packages are built from pinned git submodules and are intended for rootless
6+
CI use: download, extract, and pass the unpacked package prefix to the course
7+
CMake configure step.
88

99
This repository publishes only one public binary channel: the moving `nightly`
1010
pre-release named `Nightly Open MPI Extensions`. Stable versioned releases are
1111
not supported here.
1212

13-
## Open MPI pin
13+
## Source Pins
1414

15-
Open MPI is included as a git submodule, not vendored source:
15+
Open MPI and Sandia OpenSHMEM/SOS are included as git submodules, not vendored
16+
source:
1617

1718
- URL: `https://github.com/open-mpi/ompi`
1819
- Path: `external/ompi`
1920
- Ref: `v5.0.10`
2021
- Commit: `0d48030d410ae8f56790933135b28be1b3920ba1`
2122

22-
The same data is recorded in `manifests/openmpi-version.json`.
23+
- URL: `https://github.com/Sandia-OpenSHMEM/SOS.git`
24+
- Path: `external/sos`
25+
- Ref: `v1.5.3`
26+
- Commit: `45e6e7eb1a9b099a418237a9e677eb6603222c84`
2327

24-
Linux packages are configured with MPI and OpenSHMEM/OSHMEM enabled and bundle
25-
the UCX runtime libraries used by OpenSHMEM. Open MPI 5.0.x marks OSHMEM as
26-
Linux-only in its configure logic, so macOS packages are MPI-only and their
27-
package manifests record OpenSHMEM validation as `unsupported`.
28+
The same data is recorded in `manifests/openmpi-version.json` and
29+
`manifests/sos-version.json`.
30+
31+
Linux packages are configured with MPI and Open MPI OSHMEM/OpenSHMEM enabled
32+
and bundle the UCX runtime libraries used by OpenSHMEM. Open MPI 5.0.x marks
33+
OSHMEM as Linux-only in its configure logic, so macOS packages use Open MPI for
34+
MPI and Sandia OpenSHMEM/SOS for SHMEM. SOS is built against the package's Open
35+
MPI PMIx/hwloc install and libfabric/OFI, then packaged with the needed runtime
36+
libraries for rootless CI use.
2837

2938
## Nightly assets
3039

@@ -46,22 +55,22 @@ Archives unpack under a single top-level directory and contain `bin/`, `lib/`,
4655
For local use from this repository:
4756

4857
```bash
49-
./scripts/install_from_nightly_release.sh \
58+
./scripts/install_from_nightly_release.py \
5059
--repo learning-process/mpi-extensions \
5160
--platform auto \
5261
--prefix "$PWD/_deps/mpi-extensions-openmpi"
5362
```
5463

5564
The installer downloads only the `nightly` pre-release, verifies the SHA256
56-
checksum, extracts into the requested prefix, and prints the environment values
57-
needed by downstream builds.
65+
checksum, extracts into the requested prefix, and prints environment values for
66+
manual debugging.
5867

5968
From another repository, such as `parallel_programming_course`, fetch the
6069
installer script directly from this repository:
6170

6271
```bash
6372
curl -fsSL \
64-
https://raw.githubusercontent.com/learning-process/mpi-extensions/main/scripts/install_from_nightly_release.sh \
73+
https://raw.githubusercontent.com/learning-process/mpi-extensions/main/scripts/install_from_nightly_release.py \
6574
-o /tmp/install_mpi_extensions.py
6675
python3 /tmp/install_mpi_extensions.py \
6776
--repo learning-process/mpi-extensions \
@@ -72,29 +81,26 @@ python3 /tmp/install_mpi_extensions.py \
7281
Recommended `parallel_programming_course` CI setup:
7382

7483
```bash
75-
export MPI_EXTENSIONS_HOME="$PWD/_deps/mpi-extensions-openmpi"
76-
export MPI_HOME="$MPI_EXTENSIONS_HOME"
77-
export OPAL_PREFIX="$MPI_EXTENSIONS_HOME"
78-
export PATH="$MPI_EXTENSIONS_HOME/bin:$PATH"
79-
export LD_LIBRARY_PATH="$MPI_EXTENSIONS_HOME/lib:${LD_LIBRARY_PATH:-}"
80-
export DYLD_LIBRARY_PATH="$MPI_EXTENSIONS_HOME/lib:${DYLD_LIBRARY_PATH:-}"
81-
82-
cmake -S . -B build
84+
MPI_EXTENSIONS_HOME="$PWD/_deps/mpi-extensions-openmpi"
85+
cmake -S . -B build -D PPC_MPI_EXTENSIONS_HOME="$MPI_EXTENSIONS_HOME"
8386
cmake --build build --parallel
8487
```
8588

86-
Do not install Homebrew or apt Open MPI in the course workflow. The binary
87-
package is meant to be self-contained for CMake discovery through the wrapper
88-
compilers.
89+
Do not install Homebrew or apt Open MPI in the course workflow. The course CMake
90+
configuration must receive `PPC_MPI_EXTENSIONS_HOME`; it then points MPI
91+
discovery and runtime setup at this package.
8992

9093
## Local build
9194

95+
All repository helper scripts in `scripts/` are Python executables with `.py`
96+
extensions.
97+
9298
Install the normal compiler/autotools dependencies first. On Ubuntu this
9399
includes `build-essential`, `autoconf`, `automake`, `libtool`, `flex`, `bison`,
94100
`pkg-config`, `ccache`, `zlib1g-dev`, and `libucx-dev`; `libucx-dev` is required
95101
for the Linux OpenSHMEM provider. On macOS the workflow uses Homebrew packages
96-
for `autoconf`, `automake`, `bison`, `ccache`, `flex`, `libtool`, `pkg-config`,
97-
and `rsync`.
102+
for `autoconf`, `automake`, `bison`, `ccache`, `flex`, `libfabric`, `libtool`,
103+
`pkg-config`, and `rsync`.
98104

99105
Initialize submodules first:
100106

@@ -111,14 +117,14 @@ Build and validate on Linux:
111117
```bash
112118
export CCACHE_DIR="$MPI_EXTENSIONS_WORK_ROOT/ccache"
113119

114-
./scripts/build_openmpi.sh \
120+
./scripts/build_openmpi.py \
115121
--prefix "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi" \
116122
--build-dir "$MPI_EXTENSIONS_WORK_ROOT/build/openmpi-linux" \
117123
--enable-shmem required \
118124
--ccache on
119-
./scripts/smoke_test_mpi.sh "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi"
120-
./scripts/smoke_test_shmem.sh "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi"
121-
./scripts/package_openmpi.sh \
125+
./scripts/smoke_test_mpi.py "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi"
126+
./scripts/smoke_test_shmem.py "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi"
127+
./scripts/package_openmpi.py \
122128
--prefix "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi" \
123129
--out "$MPI_EXTENSIONS_WORK_ROOT/build/dist"
124130
```
@@ -128,24 +134,28 @@ Build and validate on macOS:
128134
```bash
129135
export CCACHE_DIR="$MPI_EXTENSIONS_WORK_ROOT/ccache"
130136

131-
./scripts/build_openmpi.sh \
137+
./scripts/build_openmpi.py \
132138
--prefix "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi" \
133139
--build-dir "$MPI_EXTENSIONS_WORK_ROOT/build/openmpi-macos" \
134140
--enable-shmem disabled \
135141
--ccache on
136-
./scripts/smoke_test_mpi.sh "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi"
137-
MPI_EXTENSIONS_ALLOW_UNSUPPORTED_SHMEM=1 \
138-
./scripts/smoke_test_shmem.sh "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi"
139-
./scripts/package_openmpi.sh \
142+
./scripts/build_sos_shmem.py \
143+
--prefix "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi" \
144+
--build-dir "$MPI_EXTENSIONS_WORK_ROOT/build/sos-macos" \
145+
--mpi-prefix "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi" \
146+
--ccache on
147+
./scripts/smoke_test_mpi.py "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi"
148+
./scripts/smoke_test_shmem.py "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi"
149+
./scripts/package_openmpi.py \
140150
--prefix "$MPI_EXTENSIONS_WORK_ROOT/install/openmpi" \
141151
--out "$MPI_EXTENSIONS_WORK_ROOT/build/dist" \
142152
--platform macos-arm64 \
143-
--shmem-smoke unsupported
153+
--shmem-smoke passed
144154
```
145155

146-
## Updating Open MPI
156+
## Updating Pins
147157

148-
To move the pin:
158+
To move the Open MPI pin:
149159

150160
```bash
151161
git -C external/ompi fetch --tags origin
@@ -154,8 +164,17 @@ git -C external/ompi submodule update --init --recursive
154164
git add external/ompi manifests/openmpi-version.json README.md
155165
```
156166

157-
Update `manifests/openmpi-version.json` and this README with the exact ref and
158-
commit. Use a stable tag or explicit commit, never a floating branch.
167+
To move the SOS pin:
168+
169+
```bash
170+
git -C external/sos fetch --tags origin
171+
git -C external/sos checkout <stable-tag-or-commit>
172+
git -C external/sos submodule update --init --recursive
173+
git add external/sos manifests/sos-version.json README.md
174+
```
175+
176+
Update the matching manifest and this README with the exact ref and commit. Use
177+
a stable tag or explicit commit, never a floating branch.
159178

160179
## Workflow
161180

docs/parallel_programming_course_integration.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,33 @@ Install the current nightly package before configuring the course build:
99

1010
```bash
1111
curl -fsSL \
12-
https://raw.githubusercontent.com/learning-process/mpi-extensions/main/scripts/install_from_nightly_release.sh \
12+
https://raw.githubusercontent.com/learning-process/mpi-extensions/main/scripts/install_from_nightly_release.py \
1313
-o /tmp/install_mpi_extensions.py
1414
python3 /tmp/install_mpi_extensions.py \
1515
--repo learning-process/mpi-extensions \
1616
--platform auto \
1717
--prefix "$PWD/_deps/mpi-extensions-openmpi"
1818

19-
export MPI_EXTENSIONS_HOME="$PWD/_deps/mpi-extensions-openmpi"
20-
export MPI_HOME="$MPI_EXTENSIONS_HOME"
21-
export OPAL_PREFIX="$MPI_EXTENSIONS_HOME"
22-
export PATH="$MPI_EXTENSIONS_HOME/bin:$PATH"
23-
export LD_LIBRARY_PATH="$MPI_EXTENSIONS_HOME/lib:${LD_LIBRARY_PATH:-}"
24-
export DYLD_LIBRARY_PATH="$MPI_EXTENSIONS_HOME/lib:${DYLD_LIBRARY_PATH:-}"
25-
26-
cmake -S . -B build
19+
MPI_EXTENSIONS_HOME="$PWD/_deps/mpi-extensions-openmpi"
20+
cmake -S . -B build -D PPC_MPI_EXTENSIONS_HOME="$MPI_EXTENSIONS_HOME"
2721
cmake --build build --parallel
2822
```
2923

30-
The package is intended to be discovered by CMake through the Open MPI wrapper
31-
compilers in `bin/`. Keep `PATH` pointed at the package before calling CMake so
32-
`find_package(MPI)` resolves `mpicc` and `mpicxx` from this archive.
24+
The package is intended to be passed to course CMake through
25+
`PPC_MPI_EXTENSIONS_HOME`. The course configuration then points MPI discovery at
26+
the wrapper compilers in the package and writes the runtime environment needed
27+
by `scripts/run_tests.py`.
3328

3429
## Platform behavior
3530

36-
Linux packages are built with MPI and OpenSHMEM/OSHMEM enabled, bundle the UCX
37-
runtime libraries needed by OpenSHMEM, and are validated with two-rank C smoke
38-
tests.
31+
Linux packages are built with MPI and Open MPI OSHMEM/OpenSHMEM enabled,
32+
bundle the UCX runtime libraries needed by OpenSHMEM, and are validated with
33+
two-rank C smoke tests.
3934

4035
Open MPI 5.0.x marks OSHMEM as Linux-only in its configure logic, so macOS
41-
packages provide MPI tooling only. Their manifest records the OpenSHMEM smoke
42-
test as `unsupported`.
36+
packages provide MPI through Open MPI and SHMEM through Sandia OpenSHMEM/SOS
37+
built against the same Open MPI PMIx/hwloc prefix and libfabric/OFI. macOS
38+
packages are also validated with two-rank MPI and SHMEM C smoke tests.
4339

4440
## Nightly channel
4541

external/sos

Submodule sos added at 45e6e7e

manifests/openmpi-version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"openmpi_ref": "v5.0.10",
44
"openmpi_commit": "0d48030d410ae8f56790933135b28be1b3920ba1",
55
"submodule_path": "external/ompi",
6-
"notes": "Pinned as a git submodule. Open MPI OSHMEM/OpenSHMEM support is enabled and validated on Linux; upstream Open MPI 5.0.x marks OSHMEM as Linux-only."
6+
"notes": "Pinned as a git submodule. Open MPI provides MPI on all supported platforms and Open MPI OSHMEM/OpenSHMEM on Linux. macOS OpenSHMEM support is supplied by the pinned Sandia OpenSHMEM/SOS submodule over Open MPI PMIx and libfabric/OFI."
77
}

manifests/sos-version.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sos_git_url": "https://github.com/Sandia-OpenSHMEM/SOS.git",
3+
"sos_ref": "v1.5.3",
4+
"sos_commit": "45e6e7eb1a9b099a418237a9e677eb6603222c84",
5+
"submodule_path": "external/sos",
6+
"notes": "Pinned as a git submodule. Used to provide macOS OpenSHMEM/SHMEM support over Open MPI PMIx and libfabric/OFI because Open MPI 5.0.x OSHMEM configure support is Linux-only."
7+
}

0 commit comments

Comments
 (0)