This is an often requested feature, but it doesn’t exist (to my knowledge). Many ugly hacks have been suggested.
One ugly suggestion is to check the job specification for the “site” resource. If site includes the string “no_nags”, you let the job pass. Otherwise, you reject it with an explanation. The user can either change the job to match your preferred way, or add -l site=“no_nags” to the qsub.
Another suggestion is to have the hook put something in the pbs logs. Then have a script that runs once a day that checks for these messages and sends email to the user. The smart version of the script sends only one email per day per user.
Oh yeah, so it is leveraging .reject()… think I like that better for immediacy. But still too harsh a reaction. lol.
a shame, not sure where print to std out and error went (?) but too harsh, more a gentle FYI… e.g. we use bright cluster and the deeper you get into the config the hazier it gets. So… rather than use config2 to set the default placement packing, one of the clauses to set something like “free” and let them know. (like why that cann’t be set in queue manager is a curiosity).
Something like… (and the code can be off… just… you know. off memory
# code to get the job object.... then
pbs_place_str = str(pbs_job.resource_list["place"])
...
...
if not any(placement in pbs_place for placement in ["scatter","pack","free", "whatever"]):
pbs_job.resource_list["place"] = pbs.place("free:" + pbs_place_str)
# this next pbs function does not exist future readers, for example
pbs.usermsg(f"job placement updated to free:{pbs_place_str} cause we wanted to")
btw, “place” is a null object if old resource syntax is used.