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. 

Reply via email to