<html>#2309: have simfactory's "run" user command log output to files as well as screen
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>enhancement</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>SimFactory</td></tr>
</table>

<p>Changes (by Roland Haas):</p>
<p>simfactory offers two ways to start a simulation that are both demonstrate in the new user’s tutorial: “run” and “submit”. The latter being the common one used on clusters that use a queuing system. It relies on the queuing system to log stdout and stderr of the RunScript to appropriate files. “submit” is asynchronous in that it returns immediately and log output is only accessible via the <code>show-output</code> command. For machines lacking a queuing system (generic.ini only I think) we mimic this behaviour using background execution and redirection of output and error streams in <code>generic.sub</code>. The other method, which is mostly useful on private workstations without queuing system, is “run” which effectively has simfactory directly execute the runscript eg <code>generic.run</code>. Since no output redirection or backgrounding happens log output goes to screen and execution in synchronous.</p>
<p>However log output also only goes to screen and is not saved in any log files which can be confusing (for new users who would expect a behaviour more closely mimicking <code>submit</code>) or inconvenient (for more experienced users who are aware of this but might have to scroll back to earlier log output or want to have separate stdout and stderr logs).</p>
<p>It would be nice if <code>sim run</code> would duplicate log output to log files as well as screen. This is not fully trivial for a number of reasons:</p>
<ul>
<li>the same runscript ist used with <code>submit</code> and <code>run</code> commands and the former requires that the runscript does not redirect stdout and stderr so that they can be merged with stdout and stderr messages produced in the submitscript and possibly submit commands</li>
<li>simfactory does not actually know the name of the log file that <code>show-output</code> displays, instead it relies on the <code>stdout</code>, <code>stderr</code> and <code>stdout-follow</code> options in the ini file</li>
<li>
<p>stdout and stderr should be captured to different files and both be repli
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2309/have-simfactorys-run-user-command-log'>https://bitbucket.org/einsteintoolkit/tickets/issues/2309/have-simfactorys-run-user-command-log</a></p>
</html>