Get stdout / stderr from slurm job at runtime
I have a batch file to submit a job with sbatch
. Batch file content
# Setting the proper SBATCH variables
...
#SBATCH --error="test_slurm-%j.err"
#SBATCH --output="test_slurm-%j.out"
...
WORKDIR=.
echo "Run 1"
${WORKDIR}/test_slurm
echo "Run 2"
${WORKDIR}/test_slurm
The file is test_slurm-%j.out
sometimes appended and exited only after each line ends. For example, the output of the first instance test_slurm
will not be flushed test_slurm-%j.out
to completion test_slurm
.
Is it possible to run stdout / stderr at runtime so I can check the file test_slurm-%j.out
for execution control?
According to How to change how often SLURM updates the output file (stdout)? and also https://unix.stackexchange.com/questions/25372/turn-off-buffering-in-pipe I tried with
stdbuf -oL -eL ${WORKDIR}/test_slurm
stdbuf -o0 -e0 ${WORKDIR}/test_slurm
stdbuf -o1 -e1 ${WORKDIR}/test_slurm
unbuffer ${WORKDIR}/test_slurm
None of this worked.
This doesn't seem to provide an answer.
source to share
No one has answered this question yet
See similar questions:
or similar: