...
- Visibility: Public
- Change Control: Stable
- Details:
- User can specify a node filter with each of their jobs and this filter will help scheduler to filter out nodes that this job is allowed to run on.
- There is a new built-in resource “nfilter”. This resource is of type string. Users/operator/manager has privileges to read/write this resource. It is not a host level resource.
- nfilter is evaluated as a python expression by PBS scheduler to filter out nodes that can be used to run the job in hand. This expression is evaluated every time scheduler considers a job to run and/or while trying to calendar the job.
- Users can specify a node filter with node resources using conditional operator like "<, >, <=, >=, !=.
- Example: qsub -lselect=3:ncpus=2:mem=18gb,nfilter=“node['resources_available'][‘ncpus’]>=4 and node['resouces_available'][‘color’] != ‘green’” job.scr
While evaluating, nfilter will be made available a node dictionary which itself consists of two dictionaries - resources_available, resources_assigned. It will look something like this -
node={'resources_available':{'ncpus':'8','mem':'16777215kb',...},'resources_assigned':{'ncpus':'2', 'mem':'4194304kb',...}}
- To access a specific resource out of resources_available, resources_assigned inputs, users must enclose each key name within square brackets “[ ]” like this - “node['resources_available'][‘ncpus’]”
- If a job with "nfilter" fails too find a node that it could run on (even if there is an exception while evaluating the expression) , it will be marked as "can not run" in the current scheduling cycle.
Interface 2: Errors logged in scheduler log file while evaluating "nfilter" resource expression
...