Setting node_group_key in a hook

Hello,

I have a problem while writing a queuejob hook. Im struggling to set node_group_key. Im following Section 5.2.4.3 (Plugins (Hooks) Guide) but it seems im missing something or doing something wrong. The way I already tried is:

pbs.event().job.node_group_key = pbs.node_group_key(“Resource_Name”)
pbs.event().job.Resource_List[“node_group_key”] = “Resource_Name”

The resource Im specified it does actually exists.

Am I missing something?

Much appreciate your support.

The node group key is a server and/or queue resource, not a job resource.

You set it on server and queues to tell the scheduler what resources to use to make placement sets when selecting nodes for a job. A job doesn’t get to determine that.

If you want ad-hoc placement sets for a job, you probably want -lplace=group=, which will ensure all nodes will have the same value for the resource listed.