=encoding UTF-8

=head1 NAME

oar_resources_init - Connect to a list of hosts to gather system information and create the corresponding OAR resources.

=head1 SYNOPSIS

B<oar_resource_init>  [options] <hostfile>

=head1 DESCRIPTION

Hosts are read one per line from B<hostfile> (must be readable by the oar user) or STDIN if B<hostfile> is -.

The "oar-node" service must be started on all hosts (B<oar_resources_init> connects to hosts on OAR's dedicated SSH service).

The command can either just generate a script (allowing modification before execution), or directly run the OAR commands (oarnodesetting and oarproperty).

The following OAR resource hierarchy is assumed:

=over

host > cpu > core

=back

If the B<-t> option is set, it adds the thread level:

=over

host > cpu > core > thread

=back

The mem property is set along with the hierarchy.

If the B<-m> option is set, it adds the numa level and numamem property. Beware that the numa hierarchy level may differ from machine to machine.

If the B<-g> option is set, it adds the gpu level and gpudevice property. Information for the gpu hierarchy and gpudevice property is however not populated: It can be completed by editing manually the generated script.

Other properties can also be added in the generated script.

After the execution of the script, other B<oarnodesetting> can still be used to change the resource properties.

=head1 OPTIONS

=over

=item B<-t>

Create the thread hierarchy level (HyperThreading/SMT).

=item B<-n>

Create the numa hierarchy level and numamem properties.

=item B<-g>

Create the gpu hierarchy level and gpudevice properties (but not populated).

=item B<-o> [file]

Script filename.

=item B<-x>

Execute the script at the end and remove it.

=item B<-y>

Assume "yes" as answer to all prompts and run non-interactively.

=item B<-v>

Print the generated script.

=item B<-e> [path]

Path to the ssh command.

=item B<-s> [path]

Path to the oarnodesetting command.

=item B<-p> [path]

Path to the oarproperty command.

=item B<-c> [path]

Path to the oar.conf file.

=item B<-D>

Enable the debug mode for the parsing of hwloc's output.

=item B<-h>

Print the command usage.

=back

=head1 SEE ALSO

oarnodesetting(8), oarproperty(8), oar_resources_add(8), oarremoveresource(8), lstopo(1)

=head1 COPYRIGHTS

 Copyright 2003-2025 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.

=cut
