We have different queues with different wallclock limits in slurm (which users can query with sinfo). It would be very neat if the form would automatically prevent people from submitting jobs with longer-than-allowed wallclock limit and if that setup happens automatically without having to javascript it.
I would expect many people have this need, so maybe someone has already solved it or perhaps it’s already available in OOD and it’s just me not seeing it
You might want to look at dynamic form widgets. For example, you could have the user select the appropriate queue via dropdown and then have that selection set the max allowed value for the numeric time field.
Dynamic form widgets are absolutely the best way to get a num_hours widget that changes its maximum depending on the selected queue. This could be configured as a global batch connect item that you can reuse for lots of different applications, and would require no additional javascript.
However your suggestion for automatic detection is a great idea, and something we would absolutely be interested in implementing within OnDemand. I have created Add auto_wallclock_limit smart attribute · Issue #5445 · OSC/ondemand · GitHub to track this, though developing a dynamic form solution in the mean time could still be a good idea since it will not be included in the 4.2 release. If you take the global attribute approach, it would be very straightforward to replace it down the line when the automatic feature is available.
One downside here is that I don’t believe the dynamic form widgets currently work with the dynamic auto_ fields, so in this case auto_queues couldn’t also be used.
One downside here is that I don’t believe the dynamic form widgets currently work with the dynamic auto_ fields, so in this case auto_queues couldn’t also be used.
Yes, that’s exactly the reason which triggered my post!