Navigation and service

Why is EOF not found on stdin when using llrun?

It is urgently recommend not to read from stdin on Jugene!

If you have a program doing a fixed number of reads, it works, but any read looking for EOF does not terminate when using llrun.

(EOF works fine with mpirun in a LoadLeveler job.)

It seems that EOF gets lost in stdin. This happens

  • with llrun,
  • with mpirun in a LoadLeveler job,
  • with C,
  • with Fortran.

The Job will hang in all three situations:

  • mpirun .... < my_stdin
  • cat my_stdin | mpirun (as in the example in the Redbook)
  • # @ input = my_stdin (in the job control)

As a workaround, you have to open the input file in your program and read from this file. You can pass the file name as an argument to your program if you do not want to recompile your program or to move your input file every time you change the name of your input.