扭矩调度程序中的刷新输出?

计算科学 高性能计算
2021-11-27 22:05:15

我正在尝试 Torque 调度程序。我以前有使用 LSF 调度程序的经验,并且我非常喜欢能够使用“bsub -I make -j 12”来非常快速地编译程序,即运行“交互式”作业,并在它们发生时看到任何错误。

现在,在 Torque 中有一个交互式选项,但它确实非常具有交互性:您实际上必须手动输入命令,一直占用机器并被计费。

因此,我试图避免使用 Torque 的“交互式”工具,但我仍然希望能够实时查看作业的输出,例如通过对输出文件执行“tail -f”。据我所知,似乎没有任何方法可以在 Torque 中实时刷新输出文件,因为事情发生了?或者有吗?

目标总结: - 能够在 Torque 中模拟 LSF 的“-I”选项

子目标摘要: - 能够在作业运行时,在 Torque 中请求将输出文件连续刷新到磁盘

3个回答

从扭矩网站:

使用 qsub '-k' 选项可以禁用假脱机。使用此选项,作业输出和错误流可以直接发送到作业工作目录中的文件,绕过中间假脱机步骤。如果作业是从并行文件系统中提交的,或者输出很小并且用户希望实时查看它,这将非常有用。如果输出很大并且无法通过高性能网络访问远程工作目录,则过度使用此选项可能会导致集群性能下降。

鉴于我的问题的标题,我已将 Gert 的答案标记为正确答案。但是,为了完整起见,请注意我最后所做的是添加一个选项-x看起来-I -x在 Torque 中大约相当于-I在 LSF 中。

参考 -x 选项:http ://docs.adaptivecomputing.com/torque/4-1-3/help.htm#topics/commands/qsub.htm :

“默认情况下,如果您使用脚本提交交互式作业,脚本将被解析为 PBS 指令,但脚本的其余部分将被忽略,因为它是交互式作业。-x 选项允许脚本在交互式执行作业,然后作业完成。

“例如:

script.sh 
#!/bin/bash 
ls 
---end script--- 
qsub -I script.sh 
qsub: waiting for job 5.napali to start 
dbeer@napali:# 
<displays the contents of the directory, because of the ls command> 
qsub: job 5.napali completed

"

如果启用了自动连接到节点,您应该能够为批处理作业执行此操作:

qpeek <jobid> 

这将在本地转储输出日志。

Usage:  qpeek [options] JOBID

Options:
  -c      Show all of the output file ("cat", default)
  -h      Show only the beginning of the output file ("head")
  -t      Show only the end of the output file ("tail")
  -f      Show only the end of the file and keep listening ("tail -f")
  -e      Show the stderr file of the job
  -o      Show the stdout file of the job

  -ssh               Use the ssh command rather than rsh to remote access the mother superior node
  -spool=<spool_loc> Specifiy the location of the spool directory, defaults to /var/spool/torque/spool
  -host=<host>       The name of the host to use in the filename for the jobs stdout or stderr

  -help|? Display help message