如何更改 SLURM 更新输出文件 (stdout) 的频率? [英] How to change how frequently SLURM updates the output file (stdout)?
问题描述
我正在使用 SLURM 在超级计算机上调度作业.我已经设置了 --output=log.out
选项以将作业标准输出中的内容放入文件 (log.out
).我发现该文件每 30-60 分钟更新一次,这让我很难检查我的工作状态.
I am using SLURM to dispatch jobs on a supercomputer. I have set the --output=log.out
option to place the content from a job's stdout into a file (log.out
). I'm finding that the file is updated every 30-60 minutes, making it difficult for me to check on the status of my jobs.
知道为什么更新这个文件需要这么长时间吗?有没有办法更改设置,以便更频繁地更新此文件?
Any idea why it takes so long to update this file? Is there a way to change settings so that this file is updated more frequently?
使用 SLURM 14.03.4-2
Using SLURM 14.03.4-2
推荐答案
这可能与缓冲有关.
您是否尝试按照此处中的建议禁用输出缓冲?我会推荐 stdbuf 选项:
Have you tried disabling output buffering as suggested in here? I would recommend the stdbuf option:
stdbuf -o0 -e0 命令
stdbuf -o0 -e0 command
但是如果没有更多信息就无法确定,因为我从未经历过这样的行为.您使用的是哪个文件系统?
But can't be sure without more information, as I've never experienced a behavior like that. Which filesystem are you using?
此外,如果您使用 srun 来运行您的命令,您可以使用 --unbuffered 选项禁用输出缓冲.
Also if you are using srun to run your commands you can use the --unbuffered option which disables the output buffering.
这篇关于如何更改 SLURM 更新输出文件 (stdout) 的频率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!