Introducción a SLURM¶
El cluster utiliza el programa SLURM (Simple Linux Utility for Resource Management), el cual administra los recursos del cluster, los cuales pueden ser:
CPU core : Es la unidad más pequeña de procesamiento dentro de una computadora. Un nodo del cluster contiene 64 cores.
nodos CPU : El cluster está compuesto por varios nodos de trabajo, los cuales son computadoras de alto rendimiento.
El Cluster cuenta en total con 16 nodos CPU, cada uno cuenta con 64 cores y 1 TB de RAM. Adicionalmente el Cluster cuenta con 2 nodos GPU.
Comandos para el uso de la cola¶
| Comando | Descripción | Ejemplo |
|---|---|---|
squeue |
Lista de procesos en cola, aquí puede obtener el <JOBID> |
|
sbatch <script> |
Enviar cálculo a cola usando un script | sbatch run-serial.sh |
scancel <JOBID> |
Cancelar cálculo | scancel 3425 |
squeue -j <JOBID> --start |
Estima la hora de inicio de un cálculo en cola | squeue -j 4321 --start |
scontrol show job <JOBID> |
Información sobre un <JOBID> que está corriendo |
scontrol show job 4321 |
sacct -j <JOBID> |
Información sobre un <JOBID> que ya terminó. |
sacct -j 4321 |
sprio -j <JOBID> |
Información sobre la prioridad de un cálculo en cola | sprio -j 4321 |
Contabilidad¶
Por medio del siguiente comando se puede obtener la cantidad de horas/core que se ha utilizado a partir de la fecha indicada:
Con esta otra línea de comando se puede obtener la lista de todos los _jobs ejecutadosRazones por las un job está esperando en cola¶
SLURM proporciona la razón por la cuál un job está en cola y no está corriendo. Esta información se puede ver ejecutando sinfo y en la última columna NODELIST(REASON) se observará la razón por la cuál no corre el job. En la siguiente tabla se muestran los diferentes códigos y descripción:
| Reason/Code | Explanation |
|---|---|
| Priority | One or more higher priority jobs is in queue for running. Your job will eventually run. |
| Dependency | This job is waiting for a dependent job to complete and will run afterwards. |
| Resources | The job is waiting for resources to become available and will eventually run. |
| QOSMaxJobsPerUserLimit | The job requests a resource that violates a per-job limit on the requested QOS. |
| InvalidAccount | The job’s account is invalid. Cancel the job and rerun with correct account. |
| InvaldQoS | The job’s QoS is invalid. Cancel the job and rerun with correct account. |
| JobHeldAdmin | The job is held by a system administrator. |
| Reservation | The job is waiting its advanced reservation to become available. |
| Dependency | This job has a dependency on another job that has not been satisfied. |
| JobLaunchFailure | The job could not be launched. This may be due to a file system problem, invalid program name, etc. |
| NonZeroExitCode | The job terminated with a non-zero exit code. |
| SystemFailure | Failure of the Slurm system, a file system, the network, etc. |
| TimeLimit | The job exhausted its time limit. |
| WaitingForScheduling | No reason has been set for this job yet. Waiting for the scheduler to determine the appropriate reason. |
| BadConstraints | The job’s constraints can not be satisfied. |
Códigos de estatus de un job¶
Para verificar el estaod de la cola usamos:
de aquí se puede obtener el estatus (ST) de un job o cálculo. Este puede tener uno de los siguiente códigos:| Status | Code | Explanation |
|---|---|---|
| COMPLETED | CD | The job has completed successfully. |
| COMPLETING | CG | The job is finishing but some processes are still active. |
| CANCELLED | CA | Job was explicitly cancelled by the user or system administrator. |
| FAILED | F | The job terminated with a non-zero exit code and failed to execute. |
| PENDING | PD | The job is waiting for resource allocation. It will eventually run. |
| PREEMPTED | PR | The job was terminated because of preemption by another job. |
| RUNNING | R | The job currently is allocated to a node and is running. |
| SUSPENDED | S | A running job has been stopped with its cores released to other jobs. |
| STOPPED | ST | A running job has been stopped with its cores retained. |
| OUT_OF_MEMORY | OOM | Job experienced out of memory error. |
| TIMEOUT | TO | Job exited because it reached its walltime limit. |
| NODE_FAIL | NF | Job terminated due to failure of one or more allocated nodes. |
Códigos de estatus de salida o ExitCode¶
Si algún job no concluye satisfactoriamente SLURM emitirá un código de salida o ExitCode indicando la posible falla. Con este comando es posible extraer el código de salida:
Los posibles códigos son:
| ExitCode | Description | Explanation |
|---|---|---|
| 0 | Success | Indicates that the command or program executed successfully without any errors. |
| 1 | General Error | A catch-all exit code for a variety of general errors. Often used when the command or program encounters an error, but no specific exit code is available for the situation. |
| 2 | Misuse of shell built-ins | Indicates incorrect usage of shell built-in commands or misuse of shell syntax. |
| 126 | Command cannot execute | The command was found, but it could not be executed, possibly due to insufficient permissions or other issues. |
| 127 | Command not found | The command was not found in the system’s PATH, indicating that either the command does not exist or the PATH variable is incorrectly set. |
| 128 | Invalid exit argument | Returned when a script exits with an invalid argument. This usually indicates an error in the script itself. |
| 128 + N | Fatal error signal N | Indicates that the command or program was terminated by a fatal error signal. For example, an exit code of 137 (128 + 9) means that the command was terminated by a SIGKILL signal. |
| 130 | Script terminated by Control-C | Indicates that the command or script was terminated by the user using Control-C (SIGINT signal). |
| 255 | Exit status out of range | Returned when the exit status is outside the valid range (0 to 254). |
¿QUÉ PASA SI NO HAY RECURSOS?
- En caso de que los recursos solicitados estén ocupados SLURM se va a encargar de poner en cola y a la espera todo cálculo nuevo y le asignará recurso en el momento que se libere.
- Si no hay recursos disponibles y que existan cálculos esperando en cola, envíe su trabajo a la cola para que SLURM se encargue de asignarle los recursos solicitados a penas se liberen.