【问题标题】:Save slurm job ID as you submit the job with sbatch使用 sbatch 提交作业时保存 slurm 作业 ID
【发布时间】:2023-06-26 04:47:02
【问题描述】:

有没有办法用 sbatch 提交作业以将作业 id 记录到变量中?

job_id = sbatch --account my_account some_script.sh

echo $job_id

17210254

【问题讨论】:

标签: shell slurm


【解决方案1】:

这可以通过--parsable来完成

job_id=$(sbatch --parsable test.sh)
echo $job_id
17211434

【讨论】:

    最近更新 更多