DOKK / manpages / debian 11 / oar-server / oar_resources_add.1.en
oar_resources_add(1) OAR commands oar_resources_add(1)

oar_resource_add - Yet another helper script to define OAR resources

oar_resource_add -H <# of hosts> [options]

This tool generates the oarproperty and oarnodesetting commands to create OAR resources following the host / cpu / core (/ thread) hierarchy, possibly with GPU alongside.

REMINDER: Each physical element (each cpu, each core, each thread, each gpu) must have a unique identifier in the OAR resources database. If some resources already exists in the database (e.g. from a previously installed cluster), offsets can be given in the command line or guessed with the auto-offset option, so that identifiers for newly created resources are unique.

This tool is also a good example of how one can create OAR resources using script loops and the oarnodesetting command. If it does not exactly fit your needs, feel free to read the script code and adapt it.

Use (create) the thread property.
# of hosts.
# of cpu per host.
# of core per cpu.
# of threads per core.
# of gpus per host.

WARNING, not all hardware configurations are supported: For multi-GPU configurations, the # of cores per cpu must be a multiple of the # of gpus per cpu.

If not set, no gpu resources is handled.

Hostname prefix (default: "node-").
Hostname suffix (e.g. ".domain").
First host id to use.
First cpu id to use.
First core id to use.
First thread id to use.
First gpu id to use.
# of cpusets on host (mainly useful for development purposes when one wants to emulate more cores than systems really have).
Provide the topology for the CPUs/cores/threads affinity (see hwloc), given a ordered list of the Linux CPU ids (as used in cpuset.cpus).

Or, given the RR value, try to match a round-robin distribution of the core ids, with optionally HyperThreads as well.

# of gpudevices on host (mainly useful for development purposes when one wants to emulate more GPUs than systems really have).
Provide the topology for the CPUs/GPUs affinity (see hwloc), given a ordered list of the Linux GPU device ids.
Append a text string (extra properties).
Write commands to file.
Do not generate oarproperty commands.
Guess the next host/cpu/core/thread/gpu ids to use from the OAR database (unless host0/cpu0/core0/thread0/gpu0 is set).

WARNING: properties must already exist in your database or you will get errors.

Generate YAML output.
Display usage.

The oar_resource_add tool does not look at the actual hardware topology of the target machines. Core and GPU device affinity to CPU may not be correct. See the hwloc commands for instance to find out the correct topology and affinity, and use the --cputopo and --gputopo options accordingly.

oarnodesetting(1), oarproperty(1), oar_resources_init(1), bash(1), hwloc(7), lstopo(1)

 Copyright 2003-2018 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.
2021-01-11 oar_resources_add