LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Bogdan Costescu (bogdan.costescu_at_[hidden])
Date: 2004-10-21 10:20:20


On Thu, 21 Oct 2004, Josh Hursey wrote:

> 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.

Hmm, let's be more precise: the stdout/stderr of _mpirun_ is connected
to the 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.

This is the part that is not very clear. Where do you want this C
program to run with respect to mpirun and the MPI application ?
Do you want to do this in the MPI application itself ? I don't think
that this is possible; the most reliable way would be to send through
MPI the strings from n1-nX nodes to n0 and make only n0 write into a
file - then you are already aware of the ordering problem :-)

-- 
Bogdan Costescu
IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu_at_[hidden]