Skip to content

Commit 1462521

Browse files
Sébastien LoiselSébastien Loisel
authored andcommitted
Switch from Open MPI to MPICH (Open MPI 5.x requires PMIx)
1 parent fab1d62 commit 1462521

3 files changed

Lines changed: 8 additions & 12 deletions

File tree

.github/workflows/CI.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ jobs:
101101
env:
102102
GH_TOKEN: ${{ github.token }}
103103

104-
- name: Configure MPI to use bundled Open MPI
104+
- name: Configure MPI to use bundled MPICH
105105
run: |
106106
# Write LocalPreferences.toml directly to configure MPI.jl
107107
# This will be picked up by julia-buildpkg
108108
cat > LocalPreferences.toml << 'EOF'
109109
[MPIPreferences]
110110
_format = "1.0"
111-
abi = "OpenMPI"
111+
abi = "MPICH"
112112
binary = "system"
113113
libmpi = "/tmp/petsc_strumpack/lib/libmpi.so"
114114
mpiexec = "/tmp/petsc_strumpack/bin/mpiexec"
@@ -138,11 +138,6 @@ jobs:
138138
JULIA_PETSC_LIBRARY: /tmp/petsc_strumpack/lib/libpetsc.so
139139
LD_LIBRARY_PATH: /tmp/petsc_strumpack/lib
140140
MPIEXEC_PATH: /tmp/petsc_strumpack/bin/mpiexec
141-
OPAL_PREFIX: /tmp/petsc_strumpack
142-
# Open MPI 5.x MCA parameters for CI environment
143-
OMPI_MCA_plm: fork
144-
OMPI_MCA_btl: tcp,self
145-
PRTE_MCA_plm: fork
146141
run: |
147142
# Run tests directly instead of Pkg.test() to preserve LocalPreferences.toml
148143
# (Pkg.test() creates a fresh temp environment that loses MPI preferences)

.github/workflows/build-petsc-strumpack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ jobs:
103103
tag_name: ${{ steps.build-info.outputs.tag }}
104104
name: PETSc ${{ steps.build-info.outputs.petsc_version }} with STRUMPACK${{ inputs.with_cuda && ' + CUDA' || '' }}
105105
body: |
106-
Pre-built PETSc library with STRUMPACK solver and bundled Open MPI.
106+
Pre-built PETSc library with STRUMPACK solver and bundled MPICH.
107107
108108
**Build Configuration:**
109109
- PETSc version: ${{ steps.build-info.outputs.petsc_version }}
110110
- STRUMPACK: enabled
111111
- CUDA: ${{ inputs.with_cuda && 'enabled' || 'disabled' }}
112112
- Platform: Linux x86_64 (Ubuntu)
113-
- MPI: Bundled Open MPI (self-contained, no system MPI required)
113+
- MPI: Bundled MPICH (self-contained, no system MPI required)
114114
115115
**Usage:**
116116
```bash

src/build_petsc.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,16 +307,17 @@ end
307307
function _build_petsc_with_strumpack(src_dir::String, install_dir::String, with_debugging::Bool,
308308
with_cuda::Bool, verbose::Bool)
309309
# Build configuration flags - includes both STRUMPACK and MUMPS
310-
# Bundle Open MPI with PETSc for ABI compatibility (avoids mismatch between build/test environments)
310+
# Bundle MPICH with PETSc for ABI compatibility (avoids mismatch between build/test environments)
311+
# Note: We use MPICH instead of Open MPI because Open MPI 5.x requires PMIx server setup
311312
configure_flags = [
312313
"--prefix=$install_dir",
313-
"--download-openmpi", # Bundle Open MPI for guaranteed ABI compatibility
314+
"--download-mpich", # Bundle MPICH for guaranteed ABI compatibility
314315
"--with-fc=gfortran", # Fortran needed for fblaslapack
315316
"--with-debugging=$(with_debugging ? 1 : 0)",
316317
"--with-shared-libraries=1",
317318
]
318319
if verbose
319-
@info "Building with bundled Open MPI (for ABI compatibility)"
320+
@info "Building with bundled MPICH (for ABI compatibility)"
320321
end
321322

322323
# Add common dependencies

0 commit comments

Comments
 (0)