<div dir="ltr">Hi all,<div><br></div><div>I have some jobs which write error messages to stderr, and I've noticed that the stderr output is not being written to file. Here is a simple reproduction case:<br><br>test.sh:<br><font face="monospace" color="#674ea7">#!/bin/bash<br clear="all"></font><div><font face="monospace" color="#674ea7"><br></font></div><div><font face="monospace" color="#674ea7">echo "out"</font></div><div><font face="monospace" color="#674ea7">echo "err" >&2</font></div><font face="monospace" color="#674ea7">echo "err 2" 1>&2</font><div><font face="monospace" color="#674ea7">>&2 echo "err 3"</font></div><div><font face="monospace" color="#674ea7">echo "err 4" >/dev/stderr</font></div><div><font face="monospace" color="#674ea7">echo "err 5" 1>/dev/stderr</font></div><div><font face="monospace" color="#674ea7">echo "err 6" | tee /dev/stderr</font></div><div><br></div><div>When I run that script through srun, the output includes all the echoes:</div><div><font face="monospace" color="#3d85c6">out<br>err<br>err 2<br>err 3<br>err 4<br>err 5<br>err 6<br>err 6</font><br></div><div><br></div><div>If I run through sbatch without separating output and error into their own files, I get only the last echo (<font face="monospace" color="#3d85c6">err 6</font><font face="arial, sans-serif">). If I run with separate output files (e.g. </font><font face="monospace" color="#674ea7">sbatch --output slurm-%j.out --error slurm-%j.err</font><font face="arial, sans-serif">), I get this:</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">slurm-<id>.out:</font></div><div><font color="#3d85c6" face="monospace">out</font></div><div><font color="#3d85c6" face="monospace">err 6</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">slurm-<id>.err:</font></div><div><font face="monospace" color="#3d85c6">err 6</font></div><div><br></div><div>I would expect to see all of the err lines in the slurm-<id>.err file. I've tested this with Slurm 20.11.05 and Slurm 21.08.0 and the behaviour is the same. Any assistance would be greatly appreciated!</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Best Regards,<br></div>Maria<br></div></div></div></div>