Hey @arungrover,
I just have a few comments:
- I’d explicitly say the %num comes at the end. You wouldn’t want someone to get confused and think they could do -J1-4%2,10-20%4
- Consider not bothering adding the error message if both %num and -Wmax_run_subjobs are both given. Just say which one takes precedence.
- I don’t think you can modify this in a runjob hook, since the runjob hook will be run on the subjob
- Instead of setting a default of all the subjobs, just say if this attribute is not set, it will be backwards compatible with no limit. That way if someone wants to remove the limit with qalter, they don’t have to count up to total number of subjobs. They can just unset the attribute.
- Just to mention a possible hiccup, I know that a qsub hook happens early in the jobs life. The max_run_subjobs might not be set by that time. If you set it in a qsub hook, it might clash (especially if you keep it as an error)
- There is nothing you can really do about this, but if the max_run_subjobs attribute changes after the job is submitted, the Submit_Arguments will still have -J %num in it where %num is wrong. This isn’t anything new though.