Skip to content

Commit eaa69a8

Browse files
committed
universal check for MPIEXEC
1 parent c5d91f3 commit eaa69a8

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,7 @@ jobs:
5959
run: curl -L -O https://github.com/microsoft/Microsoft-MPI/releases/download/v10.1.1/msmpisetup.exe
6060

6161
- name: Install mpiexec.exe (-force needed to bypass GUI on headless)
62-
run: .\msmpisetup.exe -unattend -force
63-
64-
- name: Assert file existence
65-
run: if (-not (Test-Path -Path "C:\Program Files\Microsoft MPI\Bin\mpiexec.exe" -PathType Leaf)) { exit 1 }
66-
67-
- name: put MSMPI_BIN on PATH (where mpiexec is)
68-
run: echo "C:\Program Files\Microsoft MPI\Bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
62+
run: .\msmpisetup.exe -unattend -force -verbose
6963

7064
- uses: actions/checkout@v4
7165

cmake/mpi_launcher.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function(test_mpi_launcher target test Nworker)
22

3-
if(NOT (DEFINED MPIEXEC_EXECUTABLE AND DEFINED MPIEXEC_NUMPROC_FLAG))
3+
if(NOT MPIEXEC_EXECUTABLE OR NOT MPIEXEC_NUMPROC_FLAG)
44
message(FATAL_ERROR "MPIEXEC_EXECUTABLE and MPIEXEC_NUMPROC_FLAG must be defined to use test_mpi_launcher")
55
endif()
66

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ target_link_libraries(mpi_pass PRIVATE MPI::MPI_Fortran)
3838

3939
add_test(NAME MPIpass COMMAND mpi_pass)
4040
test_mpi_launcher(mpi_pass MPIpass 2)
41-
set_property(TEST MPIpass PROPERTY FIXTURES_REQUIRED mpi_fxt)
4241

4342
set_tests_properties(MPIpass PROPERTIES
4443
LABELS "Fortran"
4544
DISABLED $<VERSION_LESS:${MPIEXEC_MAX_NUMPROCS},2>
45+
FIXTURES_REQUIRED mpi_fxt
4646
)
4747

4848

0 commit comments

Comments
 (0)