@@ -94,7 +94,7 @@ module fpm_meta
94
94
public :: MPI_TYPE_NAME
95
95
96
96
! > Debugging information
97
- logical , parameter , private :: verbose = .true .
97
+ logical , parameter , private :: verbose = .false .
98
98
99
99
integer , parameter , private :: LANG_FORTRAN = 1
100
100
integer , parameter , private :: LANG_C = 2
@@ -572,24 +572,23 @@ logical function msmpi_init(this,compiler,error) result(found)
572
572
! Check that the runtime is installed
573
573
bindir = " "
574
574
call get_absolute_path(get_env(' MSMPI_BIN' ),bindir,error)
575
-
576
- print * , ' + bindir=' ,bindir
577
- print * , ' + windir=' ,windir
575
+ if (verbose) print * , ' + %MSMPI_BIN%=' ,bindir
578
576
579
577
! In some environments, variable %MSMPI_BIN% is missing (i.e. in GitHub Action images).
580
578
! Do a second attempt: search for the default location
581
579
if (len_trim (bindir)<= 0 .or. allocated (error)) then
582
- print * , ' + MSMPI_BIN path does not exist , searching C:\Program Files\Microsoft MPI\Bin\. ...'
580
+ if (verbose) print * , ' + % MSMPI_BIN% empty , searching C:\Program Files\Microsoft MPI\Bin\ ...'
583
581
call get_absolute_path(' C:\Program Files\Microsoft MPI\Bin\mpiexec.exe' ,bindir,error)
584
582
endif
585
583
586
584
! Do a third attempt: search for mpiexec.exe in PATH location
587
585
if (len_trim (bindir)<= 0 .or. allocated (error)) then
586
+ if (verbose) print * , ' + C:\Program Files\Microsoft MPI\Bin\ not found. searching %PATH%...'
588
587
589
588
call get_mpi_runner(runner_path,verbose,error)
590
589
591
590
if (.not. allocated (error)) then
592
- print * , ' + searching location of mpi runner, ' ,windir
591
+ if (verbose) print * , ' + mpiexec found: ' ,runner_path % s
593
592
call find_command_location(runner_path% s,bindir,verbose= verbose,error= error)
594
593
endif
595
594
@@ -731,18 +730,12 @@ subroutine find_command_location(command,path,echo,verbose,error)
731
730
return
732
731
end if
733
732
734
- print * , ' + get temp filename...'
735
-
736
733
tmp_file = get_temp_filename()
737
734
738
- print * , ' + get temp filename... ' // tmp_file
739
-
740
735
! On Windows, we try both commands because we may be on WSL
741
736
do try= merge (1 ,2 ,get_os_type()==OS_WINDOWS),2
742
737
search_command = search(try)// command
743
- print * , ' + attempt ' ,try,' : ' ,search_command
744
738
call run(search_command, echo= echo, exitstat= stat, verbose= verbose, redirect= tmp_file)
745
- print * , ' after run, stat=' ,stat
746
739
if (stat== 0 ) exit
747
740
end do
748
741
if (stat/= 0 ) then
@@ -756,7 +749,6 @@ subroutine find_command_location(command,path,echo,verbose,error)
756
749
if (stat == 0 )then
757
750
do
758
751
call getline(iunit, line, stat)
759
- print * , ' get line, stat=' ,stat
760
752
if (stat /= 0 ) exit
761
753
if (len (screen_output)>0 ) then
762
754
screen_output = screen_output// new_line(' a' )// line
@@ -774,7 +766,6 @@ subroutine find_command_location(command,path,echo,verbose,error)
774
766
! Only use the first instance
775
767
length = index (screen_output,new_line(' a' ))
776
768
777
- print * , ' + get line length: ' ,length
778
769
multiline: if (length> 1 ) then
779
770
fullpath = screen_output(1 :length-1 )
780
771
else
@@ -787,7 +778,6 @@ subroutine find_command_location(command,path,echo,verbose,error)
787
778
788
779
! Extract path only
789
780
length = index (fullpath,command,BACK= .true. )
790
- print * , ' extract fullpath, length=' ,length
791
781
if (length<= 0 ) then
792
782
call fatal_error(error,' full path to command (' // command// ' ) does not include command name' )
793
783
return
@@ -800,11 +790,7 @@ subroutine find_command_location(command,path,echo,verbose,error)
800
790
if (allocated (error)) return
801
791
802
792
! On Windows, be sure to return a path with no spaces
803
- if (get_os_type()==OS_WINDOWS) then
804
- print * , ' get dos path'
805
- path = get_dos_path(path,error)
806
- print * , ' dos path = ' ,path
807
- end if
793
+ if (get_os_type()==OS_WINDOWS) path = get_dos_path(path,error)
808
794
809
795
if (allocated (error) .or. .not. is_dir(path)) then
810
796
call fatal_error(error,' full path (' // path// ' ) to command (' // command// ' ) is not a directory' )
@@ -1195,7 +1181,7 @@ subroutine run_mpi_wrapper(wrapper,args,verbose,exitcode,cmd_success,screen_outp
1195
1181
1196
1182
! Empty command
1197
1183
if (len_trim (wrapper)<= 0 ) then
1198
- if (verbose ) print * , ' + <EMPTY COMMAND>'
1184
+ if (echo_local ) print * , ' + <EMPTY COMMAND>'
1199
1185
if (present (exitcode)) exitcode = 0
1200
1186
if (present (cmd_success)) cmd_success = .true.
1201
1187
if (present (screen_output)) screen_output = string_t(" " )
0 commit comments