Skip to content

Fix CMake configure failure when mpiexec --version is empty - #22

Merged
mbkumar merged 10 commits into
masterfrom
fix-mpiexec-cmake-configure
Aug 26, 2026
Merged

mbkumar merged 10 commits into
masterfrom
fix-mpiexec-cmake-configure

Conversation

@jurasic-pf

@jurasic-pf jurasic-pf commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

CMake configure fails on my machine after updating to OpenMPI 5:

CMake Error at CMakeLists.txt:61 (if):
  if given arguments:
    "MATCHES" "Open MPI" "OR" "MATCHES" "OpenRTE" "OR" ...
  Unknown arguments specified

FindMPI defines MPIEXEC_EXECUTABLE https://cmake.org/cmake/help/latest/module/FindMPI.html not MPIEXEC.
so MPI_VERSION comes back empty

jurasic-pf and others added 3 commits August 26, 2026 01:27
MPIEXEC is never set by modern FindMPI (it defines MPIEXEC_EXECUTABLE), so
MPI_VERSION came back empty and the unquoted ${MPI_VERSION} MATCHES ...
collapsed into a malformed if(), erroring out the configure step. Also fixes
NOT DEFINED ${MPI_OVERSUBSCRIBE_FLAG}, which dereferenced the variable before
testing whether it was defined, and quiets stderr from mpiexec --version.
@jurasic-pf
jurasic-pf marked this pull request as draft August 25, 2026 23:33
@jurasic-pf jurasic-pf changed the title Fix CMake configure failure when mpiexec --version yields no output Fix CMake configure failure when mpiexec --version is empty Aug 25, 2026
@mbkumar

mbkumar commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Looking at CMake release notes, MPIEXEC got deprecated in CMake 3.10.

@mbkumar
mbkumar marked this pull request as ready for review August 26, 2026 03:38
@mbkumar
mbkumar merged commit c965d31 into master Aug 26, 2026
9 of 13 checks passed
@mbkumar

mbkumar commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Conda build needs to be fixed. Will be done in another PR.

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