Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

PS XE 2019 MPI not reading from stdin

New Contributor I


While this post should probably go to the other forum, I thought I'd ask here anyway, as this is a problem associated with the latest release of PS 2019. When running an MPI program from mpiexec, process 0 is unable to read stdin.  For instance, in this test program

   program MPItesting
      use mpi
      implicit none
      integer myRank, mpierr, noProc
      character(80) basefilename
      call MPI_INIT( mpierr )
      call MPI_COMM_RANK(MPI_COMM_WORLD, myRank, mpierr) ! get rank of this process in world
      call MPI_COMM_SIZE(MPI_COMM_WORLD, noProc, mpiErr)
      if (myRank == 0) then
         write(*,'(a,i4)') 'Number of MPI processes: ', noProc
         write(*,'(a,$)') 'Enter parameter file base name, no extension: '
         read(*,*) basefilename
      end if
      call MPI_BCAST(basefilename,80,MPI_CHARACTER,0,MPI_COMM_WORLD,mpierr)
      write(*,'(a,i3,a)') 'Process ', myRank,' filename: '//trim(basefilename)
      call MPI_FINALIZE(mpierr)         
   end program MPItesting

Process 0 properly writes to the console, but any typing done at the prompt is not echoed, nor is stdin read.  If I cntl-C out (which is the only way to exit), then what I typed at the program's prompt is instead passed to the windows command window.  This just started occurring after upgrading to the 2019 official release.  Any ideas? Thanks!

0 Kudos
2 Replies


Same problem here!

It seems related to

Launching my program with

mpiexec -localonly -n 1 abc.exe

work (i.e. can read from unit 5) whereas 


will not read from unit 5.

Any news on this?

Windows 8.1 / Windows 10.
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version Build 20181018
Intel(R) MPI Library for Windows* OS, Version 2019 Update 1 Build 20181016 (id: 1f6a76f43)

Black Belt Retired Employee

I think you'd get more response in the Intel Clusters/HPC forum. It is likely not a Fortran issue.