Resource flag meanings

Hi, What do each resource flag mean when we create new resources- The documentation says “Resource flags can be n,h,q,f,nh,fh.” But it doesn’t explain what each one of them mean and when to use them. :

2.49.6.9 Setting Custom Resource Type and Flag(s)
You can use the qmgr command to set the type and flag(s) for custom resources. Resource type can be:
string
boolean
string_array
long
size
float
Resource flags can be:
n
h
q
f
nh
fh
set resource type =
Sets the type of the named resource to the specified type. For example:
qmgr -c “set resource foo type=string_array”
set resource flag = <flag(s)>
Sets the flag(s) of the named resource to the specified flag(s). For example:
qmgr -c “set resource foo flag=nh”
set resource type=, flag = <flag(s)>
Sets the type and flag(s) of the named resource to the specified type and flag(s). For example:
qmgr -c “set resource foo type=long,flag=nh”

I want to create a string_array resource which will contain names of some applications of interest installed on each system in the pbs network. Which flag should I use?

I am working on the scheduler in Windows. I created a custom resource called “package” of type=“string_array” and flag=“h”
saved it in resourcedef file and added “package” to the resource string in sched_priv/sched_config.
I restarted pbs_server and pbs_sched by performing net stop pbs_server , net stop pbs_sched and net start on both the services.
For a few nodes, I set resources_available.package to “p1,p2” and for the rest of the nodes, I set the value to “p1”. But when I submit a job to qsub -l select=1:package=p2, a system with no p2 label is being picked by the scheduler. What’s going wrong here?

You will need to edit the PBS_HOME/sched_priv/sched_config file and add package to the resources line. Then you will need to restart your scheduler. It should look something like

resources: “ncpus, mem, arch, host, vnode, aoe, OS, package”

1 Like