当使用 LSF 的 bsub
命令时,-o
选项会提供许多详细信息,例如作业的开始和结束时间以及作业所使用的内存和 CPU 时间。但是,在使用 SLURM 时,我只能获得与没有使用 LSF 运行脚本时相同的标准输出。
例如,假设有以下 Perl 6 脚本:
warn "standard error stream";
say "standard output stream";
如此提交:
sbatch -o test.o%j -e test.e%j -J test_warn --wrap 'perl6 test.p6'
导致文件 test.o34380
生成:
Testing standard output
和文件test.e34380
:
Testing standard Error in block <unit> at test.p6:2
使用 LSF,我可以在标准输出文件中获取各种细节,类似于:Sender: LSF System <lsfadmin@my_node>
Subject: Job 347511: <test> Done
Job <test> was submitted from host <my_cluster> by user <username> in cluster <my_cluster_act>.
Job was executed on host(s) <my_node>, in queue <normal>, as user <username> in cluster <my_cluster_act>.
</home/username> was used as the home directory.
</path/to/working/directory> was used as the working directory.
Started at Mon Mar 16 13:10:23 2015
Results reported at Mon Mar 16 13:10:29 2015
Your job looked like:
------------------------------------------------------------
# LSBATCH: User input
perl6 test.p6
------------------------------------------------------------
Successfully completed.
Resource usage summary:
CPU time : 0.19 sec.
Max Memory : 0.10 MB
Max Swap : 0.10 MB
Max Processes : 2
Max Threads : 3
The output (if any) follows:
standard output stream
PS:
Read file <test.e_347511> for stderr output of this job.
更新:
sbatch
命令中的一个或多个-v
标志可以提供更多初步信息,但不会更改标准输出。
更新2:
使用seff JOBID
获取所需信息(其中JOBID是实际编号)。请注意,它每分钟收集一次数据,因此即使您的作业由于使用超过请求的4GB内存而被终止,它可能仍然显示您的最大内存使用量为2.2GB。
seff
即可。 - Christopher Bottoms