0
我试图生成一个系统,允许我检查多个作业是否已完成在群集上运行。 此bash的代码应工作要等到所有的PBS的工作已经完成:如何将PBSPRO作业存储在数组中并检查作业是否完成?
#create the array
ALLMYJOBS=()
# loop through scripts, submit them and store the job IDs in the array
for i in 1 2 3 4 5
do
ALLMYJOBS[${i}]=$(qsub script${i}.bash)
done
JOBSR=true
# check if all jobs have completed:
while [ ${JOBSR} ];do
JOBSR=false
for m in "${ALLMYJOBS[@]}"
do
if qstat ${m} &> /dev/null; then
JOBSR=true
fi
done
done
我失去了一些东西明显?
执行此操作时,结果如何? –
它没有离开循环,但我发现了错误 – Filicado