在“时间限制”上写入日志
我在工作期间运行了一堆命令。例如:
#!/bin/bash -l
#SBATCH --time 1-00:00:00
#SBATCH --nodes 1
#SBATCH --ntasks 1
#SBATCH --cpus-per-task 1
#SBATCH --job-name foo
#SBATCH --out foo_%j.out
stdbuf -o0 -e0 mycommand input1.yaml
stdbuf -o0 -e0 mycommand input2.yaml
stdbuf -o0 -e0 mycommand input3.yaml
stdbuf -o0 -e0 mycommand input4.yaml
stdbuf -o0 -e0 mycommand input5.yaml
stdbuf -o0 -e0 mycommand input6.yaml
stdbuf -o0 -e0 mycommand input7.yaml
如果我的工作在达到时间限制时被削减,我想知道它在哪里被削减,以便能够轻松地继续和/或删除损坏的数据。
I run a bunch of commands during my job. For example:
#!/bin/bash -l
#SBATCH --time 1-00:00:00
#SBATCH --nodes 1
#SBATCH --ntasks 1
#SBATCH --cpus-per-task 1
#SBATCH --job-name foo
#SBATCH --out foo_%j.out
stdbuf -o0 -e0 mycommand input1.yaml
stdbuf -o0 -e0 mycommand input2.yaml
stdbuf -o0 -e0 mycommand input3.yaml
stdbuf -o0 -e0 mycommand input4.yaml
stdbuf -o0 -e0 mycommand input5.yaml
stdbuf -o0 -e0 mycommand input6.yaml
stdbuf -o0 -e0 mycommand input7.yaml
If my job get cut when it reaches the time limit, I would like to know where it was cut in order to be able to easily continue and/or remove corrupted data.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道这是否是您所需要的,但无论如何您可以使用
echo
将其打印出来。您也可以将其写入单独的文件中,例如。例如,
echo“message”>> job_record.out
I don't know whether this is what you need, but anyways you could just print it out using
echo
.You could also write this into a separate file like. For example,
echo "message" >> job_record.out