How can I select more than one placement group (node_group_key)

We would like to be able to select more than one placement group (node_group_key) when submitting a job. So, PBS allocates it to the most idle one.

We are currently attempting to use:
qsub -lplace=group=group_1,group_2 -lselect=ncpus=1:mem=50000mb

But jobs always go to nodes from group_1 regardless of nodes from group_2 are idle. In order to test if everything is okay with group_2, we swap the order and we could see jobs go to group_2.

Is there a way to specify more than one placement group (node_group_key)?

Background: We have around ~200 queues. Each of them specifies more than one node_group_key. This is because users can/cannot use particular nodes. Everything works. No problem with that. But due to the high number of queues, configuration is complex. We are planning to reduce that number of queues by creating a hook. So that hook passes the right placement group to each job without the need of a queue. Here is where we have the problem. Before putting this in a hook we are testing it as above, but we saw only the first placement group is considered.

Your guidance/feedback is much appreciated.

As per the documentation: Ref: AG-48 PBS Professional 2021.1.3 Administrator’s Guide
To keep a job in a single vnode, use -lplace=group=vnode; if you want to restrict it to larger sets of vnodes, identify those sets using a custom string or string_array resource and use it in -lplace=group=. If you already have resources used in node_group_key you can usually use these.

Hence you would need to update your below qsub statement

to

qsub -lselect=ncpus=1:mem=50000mb -lplace=group=group1_group2
#for example group1_group2 has all the nodes of group1 and 2

you can use only one group name here, you can have multiple groups defined via comma separation.
#Please someone correct me if i am wrong

Please also check this scheduler attribute , it might be useful
Reference: RG-304, PBS Professional 2021.1.3 Reference Guide