LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: John Robinson (jr_at_[hidden])
Date: 2006-06-15 15:22:40


On about a microsecond's thought, but how about if you create a shell
script wrapper that takes the target app name and its args as its
arguments, and then does an exec of it after directing stdout and stderr
to files.

This simple shellscript gets at the idea:

exec $* 2>$1.stderr >$1.stdout

Try this as, e.g.,

% script ps
% script ls -l

and see what happens.

/jr

---
YoungHui Amend wrote:
> 
> There's alot of code (developed by many people) that are executed for
> each application call. So, printing to a log file (fprinf) is not an
> option (unfortunately).  Is there something I can do with lamboot or
> mpirun to redirect the stdout/stderr?
> 
> Appreciate any help in this area.
> YoungHui
> 
> -----Original Message-----
> From: lam-bounces_at_[hidden] [mailto:lam-bounces_at_[hidden]] On Behalf
> Of John Robinson
> Sent: Friday, June 09, 2006 11:01 AM
> To: General LAM/MPI mailing list
> Subject: Re: LAM: Redirect stdout in remotes nodes
> 
> Instead of stdout/stderr, log to a file with fprintf? (or if fortran,
> the equivalent idea).
> 
> /jr
> ---
> YoungHui Amend wrote:
> 
>>Hi,
>> 
>>My applications running on local and remote nodes are outputting some 
>>log data.  The log data from all nodes (local and remote) are getting 
>>captured in local node's stdout/stderr (log).  So, my log on the local
> 
> 
>>node contains conglameration of outputs from local and remote nodes 
>>not in any particular order.  It makes it very hard to determine the 
>>outcome of my job.  How can I redirect remotes nodes' stdout/stderr to
> 
> 
>>a file so I can check it after the job is done.  Ideally, I would like
> 
> 
>>an application on each node to generate it's own log.
>> 
>>Here's are my lamboot and mpirun commands:
>> 
>>$LAMHOME/bin/lamboot -d -prefix $LAMHOME -ssi boot_rsh_no_n 1 -ssi 
>>boot_rsh_fast 1 -ssi boot_rsh_no_profile 1 $hostsfile 
>>$LAMHOME/bin/mpirun -v -vv -ssi rpi tcp -O  -w -x $LAM_EXPORT 
>>$applicationSchemafile
>> 
>>Thanks for your help.
>>YoungHui
>>
>>
>>----------------------------------------------------------------------
>>--
>>
>>_______________________________________________
>>This list is archived at http://www.lam-mpi.org/MailArchives/lam/
> 
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
> 
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/