oar_resource_add(1) Yet another helper script to define OAR resources

SYNOPSIS

oar_resource_add -H <# of hosts> [options]

DESCRIPTION

The script generate the oarproperty and oarnodesetting commands to generate resources following the host/cpu/core/thread hierarchy.

If resources are already registered, offsets can be provided, or guessed from OAR database.

This script is also a good example of how one could create resources by himself using basic program loops and the oarnodesetting command.

OPTIONS

-T, --use-threads
Use (create) the thread property
-H, --hosts <#>
# of hosts
-C, --cpus <#>
# of cpu per host
-c, --cores <#>
# of core per cpu
-t, --threads <#>
# of threads per core
--host-prefix <str>
Hostname prefix (default: ``node-'')
--host-suffix <str>
Hostname suffix (e.g. ``.domain'')
--host0 <#>
First host id to use
--cpu0 <#>
First cpu id to use
--core0 <#>
First core id to use
--thread0 <#>
First thread id to use
--cpuset <#>
# of cpusets on host (default=cpus*cores*threads)
-A, --append <str>
Append a text string (extra properties)
-o, --write-to <file>
Write commands to file
-p, --no-create-properties
Do not generate oarproperty commands
-a, --auto-offset
Guess the next host/cpu/core/thread ids to use from the OAR database (unless host0/cpu0/core0/thread0 is set)

WARNING: host, cpu, core and thread properties must exist in your database or you will get errors

-Y, --yaml
Generate YAML output
-h, --help
Display this message

EXAMPLES

$ oar_resources_add -T --hosts=2 --host0 5 --cpu0 8 --core0=64 --thread0=128 -A ``mem=1024 gpu=NO''

oarproperty -c -a host || true

oarproperty -a cpu || true

oarproperty -a core || true

oarproperty -a thread || true

oarnodesetting -a -h 'node-5' -p host='node-5' -p cpu=8 -p core=64 -p thread=128 -p cpuset=0 mem=1024 gpu=NO

oarnodesetting -a -h 'node-5' -p host='node-5' -p cpu=8 -p core=65 -p thread=129 -p cpuset=1 mem=1024 gpu=NO

oarnodesetting -a -h 'node-5' -p host='node-5' -p cpu=8 -p core=66 -p thread=130 -p cpuset=2 mem=1024 gpu=NO

oarnodesetting -a -h 'node-5' -p host='node-5' -p cpu=8 -p core=67 -p thread=131 -p cpuset=3 mem=1024 gpu=NO

oarnodesetting -a -h 'node-5' -p host='node-5' -p cpu=9 -p core=68 -p thread=132 -p cpuset=4 mem=1024 gpu=NO

oarnodesetting -a -h 'node-5' -p host='node-5' -p cpu=9 -p core=69 -p thread=133 -p cpuset=5 mem=1024 gpu=NO

oarnodesetting -a -h 'node-5' -p host='node-5' -p cpu=9 -p core=70 -p thread=134 -p cpuset=6 mem=1024 gpu=NO

oarnodesetting -a -h 'node-5' -p host='node-5' -p cpu=9 -p core=71 -p thread=135 -p cpuset=7 mem=1024 gpu=NO

oarnodesetting -a -h 'node-6' -p host='node-6' -p cpu=10 -p core=72 -p thread=136 -p cpuset=0 mem=1024 gpu=NO

oarnodesetting -a -h 'node-6' -p host='node-6' -p cpu=10 -p core=73 -p thread=137 -p cpuset=1 mem=1024 gpu=NO

oarnodesetting -a -h 'node-6' -p host='node-6' -p cpu=10 -p core=74 -p thread=138 -p cpuset=2 mem=1024 gpu=NO

oarnodesetting -a -h 'node-6' -p host='node-6' -p cpu=10 -p core=75 -p thread=139 -p cpuset=3 mem=1024 gpu=NO

oarnodesetting -a -h 'node-6' -p host='node-6' -p cpu=11 -p core=76 -p thread=140 -p cpuset=4 mem=1024 gpu=NO

oarnodesetting -a -h 'node-6' -p host='node-6' -p cpu=11 -p core=77 -p thread=141 -p cpuset=5 mem=1024 gpu=NO

oarnodesetting -a -h 'node-6' -p host='node-6' -p cpu=11 -p core=78 -p thread=142 -p cpuset=6 mem=1024 gpu=NO

oarnodesetting -a -h 'node-6' -p host='node-6' -p cpu=11 -p core=79 -p thread=143 -p cpuset=7 mem=1024 gpu=NO

COPYRIGHTS

 Copyright 2003-2016 Laboratoire d'Informatique de Grenoble (http://www.liglab.fr). This software is licensed under the GNU General Public License Version 2 or above. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.