Resources_available doesn't work

[root@mu01 ~]# pbsnodes --version
pbs_version = 20.0.1

I create resources like this:

qmgr -c “delete resource ansyslic”
qmgr -c “set queue workq resources_available.ansyslic = 4”
qmgr -c “set queue workq resources_max.ansyslic = 4”

[jobadmin@mu01 ~]$ echo sleep 130 | qsub -l ansyslic=4 -q workq
1135.mu01
[jobadmin@mu01 ~]$ echo sleep 130 | qsub -l ansyslic=5 -q workq
qsub: Job violates queue and/or server resource limits
[jobadmin@mu01 ~]$ echo sleep 130 | qsub -l ansyslic=4 -q workq
1137.mu01
[jobadmin@mu01 ~]$ qstat
Job id Name User Time Use S Queue


1135.mu01 STDIN jobadmin 00:00:00 R workq
1137.mu01 STDIN jobadmin 00:00:00 R workq

[jobadmin@mu01 ~]$ qstat -Bf
Server: mu01
server_state = Active
server_host = mu01
scheduling = True
total_jobs = 2
state_count = Transit:0 Queued:0 Held:0 Waiting:0 Running:2 Exiting:0 Begun
:0
default_queue = workq
log_events = 511
mail_from = adm
query_other_jobs = True
resources_default.ncpus = 1
default_chunk.ncpus = 1
resources_assigned.ansyslic = 8
resources_assigned.ncpus = 2
resources_assigned.nodect = 2
scheduler_iteration = 600

I noticed that :
resources_assigned.ansyslic = 8

BUT, I defined resources_available.ansyslic = 4 !!!

Why did this happen?
resources_max.ansyslic = 4 is working !
But I think resources_available doesn’t work.
Who can explain this?
Many thanks!

* qmgr -c "create resource ansyslic type=long, flag=q"
* Add ansyslic to the resources: "ncpus, aoe, ......... " of the $PBS_HOME/sched_priv/sched_config  and kill -HUP <PID of the pbs scheduler>
* qmgr -c “set queue workq resources_available.ansyslic = 4”
* qmgr -c “set queue workq resources_max.ansyslic = 4”

Seems like server is accounting for it, but not the scheduler, as it is not part of the accountable resource on the scheduler. Not sure whether you added it to the resources line of the sched_config.

PBS2020 Bigbook says static resource can be defined by qmgr.
I thought ansys license is a kind of static resource like cpus.
So I didn’ t add ansyslic to sched_config.
Maybe I misunderstand the document.

Many thanks for your replay :grinning: :grinning: :grinning:

It works!!! :smiley:
But I still think ansys license is a kind of static resource.

It is total available (ansyslic) licenses statically assigned to
that queue (workq in your configuration).

Static resources still need to be listed on the “resources” line in sched_config for the scheduler to care about them.

Dynamic resources are different: they need to also be mentioned in a server_dyn_res line (and these too can be counted --the server sets resources_assigned for them and the script needs to yield the total available for PBSPro including those used by existing jobs-- or uncounted --the scheduler just sets resources_available at the start of each scheduling cycle according to what the script returns and consumes all of these within the cycle).

1 Like