spack / spack/spack

Automatic legacylaunchers (mpiexec, mpirun) in OpenMPI 5.0.x ?

Open
#44,902 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.1k
Forks
2.5k
Avg merge
3d 4h
Merged PRs (30d)
82

Description

For a while spack replaces the mpiexec & mpirun commands with a warning "use srun because of performance issues.

https://github.com/spack/spack/pull/10340

One of the comments points out that since OpenMPI 5.0.x moved to PMIx, these commands need to be restore instead of srun. (I'm a little confused at that point, since wouldn't the mpirun/mpiexec still need to interface with Slurm's allocation?).

OpenMPI says that the performance issue is "no longer true" - https://docs.open-mpi.org/en/v5.0.x/launching-apps/slurm.html#launching-with-slurm and that mpirun is the preferred way ("mpirun’s Slurm support should always be available").

Slurm's documentation suggests the opposite, but perhaps they haven't updated with respect to OpenMPI 5.0.x: https://slurm.schedmd.com/mpi_guide.html#open_mpi

I'm out of my depth as to who is "right" here, but perhaps when building scheduler=slurm with OpenMPI 5 or greater, +legacylaunchers is always set?

Link to the current logic:

https://github.com/spack/spack/blob/4bbf4a5e79483f9b2cd7e4f3b778b33da1f6f76a/var/spack/repos/builtin/packages/openmpi/package.py#L1260

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with var/spack/repos/builtin/packages/openmpi/package.py around line 1260 and compare the linked OpenMPI and Slurm documentation about mpirun, mpiexec, srun, and +legacylaunchers. Done means resolving the version- and scheduler-specific behavior and updating the package logic accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
hpc
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.