Christoph, that is correct stdout is a tty and stderr is not. it is a pipe to orted. I do not think that would be hard to change. is this a source of problem for your applications ?
note this kind of behavior can be caused by the batch manager. if you use slurm and srun instead of mpirun, I am not even sure stdout is a tty. Cheers, Gilles On Monday, July 27, 2015, Christoph Niethammer <[email protected]> wrote: > Hello, > > I know, using stdout and stderr within MPI programs is in no way good. > Nevertheless I found that - and now wonder why - isatty inside an MPI > program reports different values for stdout and stderr in Open MPI: > > # Running as non MPI program: > ./isatty-test > [0/1] stdout FILENO: 1, TTY: 1 > [0/1] stderr FILENO: 2, TTY: 1 > > # Running with Open MPI 1.8.7: > mpirun -np 2 ./isatty-test > [1/2] stdout FILENO: 1, TTY: 1 > [1/2] stderr FILENO: 2, TTY: 0 > [0/2] stdout FILENO: 1, TTY: 1 > [0/2] stderr FILENO: 2, TTY: 0 > > ... not sure if this is good or bad. Both are forwarded correctly to the > tty as far as I see... > > Redirecting stdout or stderr to files does not change anything in the Open > MPI case. > > Best regards > Christoph Niethammer > > PS: MPICH reports in all cases 0 for isatty() on stdout and stderr. > _______________________________________________ > devel mailing list > [email protected] <javascript:;> > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel > Link to this post: > http://www.open-mpi.org/community/lists/devel/2015/07/17713.php >
