Skip to content

Remove mpiexec in cmake test target - #3870

Merged
jhale merged 3 commits into
mainfrom
jhale/remove-mpiexec-in-test-target
Aug 24, 2025
Merged

Remove mpiexec in cmake test target#3870
jhale merged 3 commits into
mainfrom
jhale/remove-mpiexec-in-test-target

Conversation

@jhale

@jhale jhale commented Aug 23, 2025

Copy link
Copy Markdown
Member

Exporting a test target is nice but the fixed mpiexec hits walls quickly - we have no idea what downstream consumers need to use.

@schnellerhase

Copy link
Copy Markdown
Contributor

Looks good to me. Hiding the parallel nature of execution from the caller, might also cause more problems with ctest's own parallelisation options.

@jhale
jhale added this pull request to the merge queue Aug 24, 2025
Merged via the queue into main with commit ba5d295 Aug 24, 2025
30 checks passed
@jhale
jhale deleted the jhale/remove-mpiexec-in-test-target branch August 24, 2025 16:26
@jhale

jhale commented Nov 10, 2025

Copy link
Copy Markdown
Member Author

By colleagues here at uni.lu I've been persuaded that we should use the output of FindMPI to discover the correct way to invoke mpiexec:

https://cmake.org/cmake/help/latest/module/FindMPI.html

find_package(MPI)

if(MPI_FOUND)
  execute_process(
    COMMAND
      ${MPIEXEC_EXECUTABLE}
      ${MPIEXEC_NUMPROC_FLAG}
      ${MPIEXEC_MAX_NUMPROCS}
      ${MPIEXEC_PREFLAGS}
      <executable>
      ${MPIEXEC_POSTFLAGS}
      <args>
  )
endif()

@jhale

jhale commented Nov 12, 2025

Copy link
Copy Markdown
Member Author

Partial reversion to old behaviour completed in #3984.

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