Difference between revisions of "Add resources (machines) to the pool"
From Supercomputación y Cálculo Científico UIS
(Created page with "Back to OAR 1. Agregar los recursos del nuevo nodo a OAR. Edite un archivo /tmp/nodos con el nombre de los nodos nuevos (uno por línea) Ejemplo: guane12 guane17 ....") |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | __NOTOC__ | |
− | + | <div class="thumbnail img-thumbnail">http://wiki.sc3.uis.edu.co/images/a/a8/Logo_sc33.png</div> | |
− | ( | + | <p><div class="btn btn-primary"><i class="fa fa-long-arrow-left"></i> [[Job Scheduler OAR]]</div></p> |
+ | <div class="column clearfix"> | ||
+ | <div class="col-md-14"> | ||
+ | <div class="well well-midnight"> | ||
+ | <h4>Add resources (machines) to the pool</h4> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
− | + | <div class="col-md-14"> | |
+ | <div class="panel panel-darker-white-border"> | ||
+ | <div class="panel-heading"> | ||
+ | <h3 class="panel-title">Add the resources (new nodes) to OAR</h3> | ||
+ | </div> | ||
+ | <div class="panel-body"> | ||
+ | <p> | ||
− | + | 1. Edit a file /tmp/nodos with the names of the new nodes (one per line) | |
− | + | {{File|/tmp/nodos|<pre><nowiki> | |
− | + | ... | |
− | + | guane12 | |
− | + | guane17 | |
+ | . | ||
+ | . | ||
+ | ... | ||
+ | </nowiki></pre>}} | ||
− | 2. | + | 2. Then run the following command |
+ | {{Command|<nowiki>oar_resources_init /tmp/nodos</nowiki>}} | ||
− | + | 3. Now run | |
− | + | {{Command|<nowiki>source /tmp/oar_resources_init.cmd</nowiki>}} | |
− | 3. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | 4. Add GPU resources from nodes. Edit a file (GPUresources.cmd) with the following lines: | ||
+ | {{File|GPUresources.cmd|<pre><nowiki> | ||
+ | ... | ||
+ | oarnodesetting --sql "core=169" -p gpu=YES -p gpunum=57 -p gputype=M2075 | ||
+ | oarnodesetting --sql "core=170" -p gpu=YES -p gpunum=57 -p gputype=M2075 | ||
+ | oarnodesetting --sql "core=171" -p gpu=YES -p gpunum=57 -p gputype=M2075 | ||
+ | . | ||
+ | . | ||
+ | ... | ||
+ | </nowiki></pre>}} | ||
{{Note|<nowiki> | {{Note|<nowiki> | ||
− | + | Each new core must correspond with the new GPU. In guane, for instance, where each node has 24 cores and 8 GPU, each GPU has been assigned to 3 cores. The following script can be used to generate that file. Choose the counters accordingly to the situation: i, j, k, gpu. | |
</nowiki>}} | </nowiki>}} | ||
+ | {{File|script.sh|<pre><nowiki> | ||
+ | # Este script genera un (CPUresources.cmd) que contiene | ||
+ | # las líneas necesarias para agregar los recursos GPU de un | ||
+ | # nodo a la BD de OAR | ||
+ | # En el caso de guane, hay 24 cores por nodo y 8 GPUs por nodo | ||
+ | # Entonces se asigna un GPU cada 3 cores. | ||
+ | #!/bin/bash | ||
+ | i=169 | ||
+ | j=170 | ||
+ | k=171 | ||
+ | gpu=57 | ||
− | + | while [ $gpu -lt 65 ] | |
− | + | do | |
− | + | echo "oarnodesetting --sql \"core=$i\" -p gpu=YES -p gpunum=$gpu -p gputype=M2075" >> GPUresources.cmd | |
− | + | echo "oarnodesetting --sql \"core=$j\" -p gpu=YES -p gpunum=$gpu -p gputype=M2075" >> GPUresources.cmd | |
− | + | echo "oarnodesetting --sql \"core=$k\" -p gpu=YES -p gpunum=$gpu -p gputype=M2075" >> GPUresources.cmd | |
− | + | i=`echo $i + 3 | bc` | |
− | + | j=`echo $j + 3 | bc` | |
− | + | k=`echo $k + 3 | bc` | |
− | + | gpu=`echo $gpu + 1 | bc` | |
− | + | done | |
− | + | </nowiki></pre>}} | |
− | + | 5. Add the resources with the following command: | |
− | + | {{Command|<nowiki>source GPUresources.cmd</nowiki>}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | 5. | ||
− | + | </p> | |
+ | </div> | ||
+ | </div> | ||
+ | </div> |
Latest revision as of 19:24, 9 April 2015
Add resources (machines) to the pool
Add the resources (new nodes) to OAR
1. Edit a file /tmp/nodos with the names of the new nodes (one per line)
File: /tmp/nodos
... guane12 guane17 . . ...
2. Then run the following command
oar_resources_init /tmp/nodos
3. Now run
source /tmp/oar_resources_init.cmd
4. Add GPU resources from nodes. Edit a file (GPUresources.cmd) with the following lines:
File: GPUresources.cmd
... oarnodesetting --sql "core=169" -p gpu=YES -p gpunum=57 -p gputype=M2075 oarnodesetting --sql "core=170" -p gpu=YES -p gpunum=57 -p gputype=M2075 oarnodesetting --sql "core=171" -p gpu=YES -p gpunum=57 -p gputype=M2075 . . ...
NOTE:
Each new core must correspond with the new GPU. In guane, for instance, where each node has 24 cores and 8 GPU, each GPU has been assigned to 3 cores. The following script can be used to generate that file. Choose the counters accordingly to the situation: i, j, k, gpu.
File: script.sh
# Este script genera un (CPUresources.cmd) que contiene # las líneas necesarias para agregar los recursos GPU de un # nodo a la BD de OAR # En el caso de guane, hay 24 cores por nodo y 8 GPUs por nodo # Entonces se asigna un GPU cada 3 cores. #!/bin/bash i=169 j=170 k=171 gpu=57 while [ $gpu -lt 65 ] do echo "oarnodesetting --sql \"core=$i\" -p gpu=YES -p gpunum=$gpu -p gputype=M2075" >> GPUresources.cmd echo "oarnodesetting --sql \"core=$j\" -p gpu=YES -p gpunum=$gpu -p gputype=M2075" >> GPUresources.cmd echo "oarnodesetting --sql \"core=$k\" -p gpu=YES -p gpunum=$gpu -p gputype=M2075" >> GPUresources.cmd i=`echo $i + 3 | bc` j=`echo $j + 3 | bc` k=`echo $k + 3 | bc` gpu=`echo $gpu + 1 | bc` done
5. Add the resources with the following command:
source GPUresources.cmd