HPCL / autoperf

MIT License
5 stars 2 forks source link

Redirect program output to file #12

Open brnorris03 opened 9 years ago

brnorris03 commented 9 years ago

Add a configuration option for redirecting stdout to a user-specified filename.

xdai commented 9 years ago

For PBS, stdout/stderr can be controlled with PBS option "-e / -o / -j". We can specify them like this:

[Platform]
Queue     = PBS

[Queue]
options   = -q queue_name
          = -e stderr.log
          = -o stdout.log

In addition to that, autoperf will invoke the job like this in the PBS script:

# run the experiment
{exp_run} 2>&1 | tee {datadir}/job.log

i.e., stdout and stderr are dumped into {datadir}/job.log.

That been said, I believe you already know all the above, so I guess maybe you are asking to add a new option to change {datadir}/job.log?

brnorris03 commented 9 years ago

This is for non-PBS jobs, so we need to capture the stderr/stdout of the user-specified executable.

xdai commented 9 years ago

For serial or mic jobs, we have the similar:

# run the experiment
{exp_run} 2>&1 | tee {datadir}/job.log 

Check https://github.com/HPCL/autoperf/blob/master/autoperf/queues/serial.py#L18 and https://github.com/HPCL/autoperf/blob/master/autoperf/queues/mic.py#L22