Skip to content

Commit 79373b9

Browse files
committed
MS_MPI: make DOS path
1 parent 9977834 commit 79373b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/fpm_meta.f90

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,16 @@ logical function msmpi_init(this,compiler,error) result(found)
572572
! Check that the runtime is installed
573573
bindir = get_env('MSMPI_BIN')
574574

575+
! Always use DOS paths with no spaces
576+
if (len_trim(bindir)>0) then
577+
bindir = get_dos_path('C:\Program Files\Microsoft MPI\Bin\mpiexec.exe',error)
578+
endif
579+
575580
print *, 'bindir=',bindir
576581

577582
! In some environments, variable %MSMPI_BIN% is missing (i.e. in GitHub Action images).
578583
! Do a second attempt: search for mpiexec.exe
579-
if (len_trim(bindir)<=0 .or. .not.exists(bindir)) then
584+
if (len_trim(bindir)<=0 .or. .not.exists(bindir) .or. allocated(error)) then
580585
print *, '+ MSMPI_BIN path does not exist, searching mpiexec.exe....'
581586
call find_command_location('mpiexec.exe',bindir,verbose=verbose,error=error)
582587
endif

0 commit comments

Comments
 (0)