[slurm-users] Slurm and output buffering

Fernando Pereira fernando.pereira at epfl.ch
Thu Jul 26 08:11:41 MDT 2018


Dear slurm users,

I'm having a hard time making slurm to correctly output progress
information during my program execution.
Apparently by default srun line-caches output, which is fine. Nevertheless
if we want to display some progress without a line break it seems not
possible. I tried using flush() but it doesnt help, the text only shows
when a new-line is sent. Shouldn't flush be respected?

On the other hand now we have the unbuffered option (-u).
This partially solves my problem, results are shown without new-lines.
However I found another problem. For some reason, when using this mode,
isatty() always returns True, which is not correct. Most times slurm jobs
will redirect streams to files and programs which make use of this function
to control output will wrongly write a lot of irrelevant info.

Does it sound as I'm dong something wrong, or are these effectively slurm
issues?

Thanks in advance for any hints!

Fernando
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180726/02980ddf/attachment.html>


More information about the slurm-users mailing list