Looking for Some Help with Job Array Dependencies in OpenPBS!

Hi everyone,

I am fairly new to OpenPBS and trying to understand how to properly set dependencies for a job array. I have a scenario where I submit a job array with something like qsub -J 1-10 myscript.sh…, and I want to make sure a separate post-processing job only starts after all jobs in the array have successfully completed.

From what I have read.., I believe the afterokarray or afterok dependency might be useful but I am unsure how to implement it correctly for an entire array. Also.., how can I make sure the post-processing script doesn’t run if even one of the array jobs fails: ??

Would appreciate if someone could walk me through the best way to handle this, especially from a production standpoint. Real-world examples or scripts would be super helpful !! I have also gone through this thread https://community.openpbs.org/t/understanding-array-jobs-salesforce-training-in-pune but still need some more help.

Thanks in advance for your time and guidance.

With Regards,
Marcelo

Job dependencies are not supported for subjobs or ranges of job array.

You would need to switch to standard jobs to use dependency.
Documenation: https://2025.help.altair.com/2025.2.0/PBS%20Professional/PBS2025.2.0.pdf
Section/page no: PBS Professional 2025.2 Reference Guide, RG-235

qsub –W depend=:<arg_lists> openpbs.sh
qsub -W depend=afterok:100.openpbs otherscript.sh
qsub -W depend=afterok:101.openpbs;102.openpbs theotherscript.sh

Note: Make sure job history is enabled
qmgr -c “set server job_history_enable=true”

Hope this helps