Skip to content

Conversation

@leejianwoo-collab
Copy link
Contributor

fix: remove premature MPI environment variable check in OpenMPIRunner

Resolves issue #7711 where OpenMPI launcher incorrectly checked for MPI
environment variables before mpirun execution.

The problematic check in validate_args() was removed because:

  • MPI environment variables (OMPI_COMM_WORLD_LOCAL_RANK, OMPI_COMM_WORLD_RANK,
    OMPI_COMM_WORLD_SIZE) are set by mpirun, not before it runs
  • This timing issue caused false "MPI environment variables are not set" errors
  • The _setup_mpi_environment() method is preserved for later use when appropriate

This fix allows OpenMPI launcher to work correctly without requiring users to
comment out the validation manually.

Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
@tohtana
Copy link
Contributor

tohtana commented Jan 1, 2026

Hi @leejianwoo-collab,
Thank you for the fix! It was the only usage of _setup_mpi_environment other than tests. Thus, I think we should remove the function itself and the related tests.
I opened a PR to remove the code that will be unnecessary: leejianwoo-collab#1
Can you merge it?

@tohtana tohtana merged commit 4809072 into deepspeedai:master Jan 1, 2026
13 of 15 checks passed
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