How To Create Custom Resource On PBS


1)create the lscratch on compute node
/var/spool/PBS/mom_priv ->
[root@n001 mom_priv]# file lscratch
lscratch: Bourne-Again shell script text executable
[root@n001 mom_priv]# cat lscratch
echo "$(/bin/df -BG $LSCRATCH|tail -n 1| awk '{print $4}'|tr [:upper:] [:lower:])b"
[root@n001 mom_priv]# ./lscratch

2)Add the script into config file
[root@n001 mom_priv]# cat  config
lscratch !/var/spool/PBS/mom_priv/lscratch
<resource-name> !<absolute_path_of_the_resource_scrtip>

Go To The Server
1)Add the Resource to the scheduler

[root@admin aeihwula sched_priv]# cat sched_config | grep -i lscratch
resources: "ncpus, mem, arch, host, DynaTokens, dyna, dyna1, vnode, netwins, aoe, applications_enabled,pas_applications_enabled, ngpus,lscratch"
mom_resources: "lscratch"

# cat resourcedef
lscratch type=size flag=h

You can test with Interactive job
1)qsub -I -l select=1:ncpus=4:lsctach=4gb

No comments:
Write comments