Skip to content

Added configuration option and associated documentation for setting up MPItrampoline#41

Merged
omlins merged 1 commit intoJuliaParallel:mainfrom
fergu:mpitrampoline
Apr 2, 2026
Merged

Added configuration option and associated documentation for setting up MPItrampoline#41
omlins merged 1 commit intoJuliaParallel:mainfrom
fergu:mpitrampoline

Conversation

@fergu
Copy link
Copy Markdown

@fergu fergu commented Mar 5, 2026

This is a small change to allow a user to define JUHPC_MPI_TRAMPOLINE to have MPIPreferences configured to use MPItrampoline per the instructions here.

This will fix an issue where, if system versions of both MPI and HDF5 are specified, julia will segfault during precompilation of HDF5. This is a known issue associated with calls to MPI from HDF5 incorrectly picking the julia-supplied version of MPI, even when MPIPreferences is pointed to a system version. See JuliaIO/HDF5.jl#1079 and JuliaParallel/MPI.jl#835. The recommended workaround for this is to use MPITrampoline: JuliaIO/HDF5.jl#1079. There's been some interest in making MPITrampoline the default, so supporting this is probably good: JuliaParallel/MPI.jl#801

The main downside to this approach is that MPItrampoline requires the user to compile and install a wrapper and set an associated environment variable: https://github.com/eschnett/MPIwrapper, which is an extra step but not terribly difficult.

The changes are:

README.md: Adds a description of JUHPC_MPI_TRAMPOLINE and modifies the descriptions of JUHPC_MPI_HOME and JUHPC_MPI_VENDOR to indicate that JUHPC_MPI_TRAMPOLINE is incompatible with the others.

juhpc: Modifies line 218 to install MPIPreferences if JUHPC_MPI_TRAMPOLINE is defined. Also adds an additional elif statement that is executed if JUHPC_MPI_TRAMPOLINE is defined (and JUHPC_MPI_HOME and JUHPC_MPI_VENDOR are not). This sets MPIPreferences to use MPITrampoline_jll per the directions here.

@omlins
Copy link
Copy Markdown
Collaborator

omlins commented Apr 2, 2026

Nice! Thanks for the detailed explanation of your PR. If you ever feel like going one step further and automatize also the MPI trampoline installation and environment variable setting, then please open the PR again. In any case I'm merging it now as is.

@omlins omlins merged commit 1d2cfc9 into JuliaParallel:main Apr 2, 2026
@omlins
Copy link
Copy Markdown
Collaborator

omlins commented Apr 2, 2026

@fergu : released in v0.6.0!

@fergu fergu deleted the mpitrampoline branch April 2, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants