LAM/MPI redirects stderr and stdout from all 'children' to 'parent'
node, so when a child prints a message to stdout it is actually printed
on the parents terminal.
What I would like to do is, in software, take this stream and put it
into a file. You can do this in *nix via command line redirection, but
I need to do it in C.
For stdout and stderr on the parent I can call freopen to do the
redirection. Is there a way to grab the file descriptors from LAM
[_kio.ki_stdout, _kio.ki_stderr ?] and route them to a file in a
similar manner?
Thanks for your help!
Josh Hursey
|