Outils pour utilisateurs

Outils du site


varenv

Ceci est une ancienne révision du document !


Variables d'environnement SLURM

On donne ici un échantillon des variables d'environnement qui sont disponibles dans SLURM. Pour une liste exhaustive voir ici.

Information sur les tableaux de jobs

Un tableau de jobs est composé d'un job principal (le tableau) et de tâches (les jobs contenus dans le tableau). SLURM attribue à un job du tableau un numéro constitué du numéro du job principal et de son indice : < SLURM_ARRAY_JOB_ID >_<SLURM_ARRAY_TASK_ID>.

On dispose des variables d'environnement suivantes :

  • SLURM_ARRAY_JOB_ID : numéro du job principal
  • SLURM_ARRAY_TASK_ID : indice de la tâche dans le tableau
  • SLURM_ARRAY_TASK_COUNT : nombre total de tâches dans un tableau de jobs
  • SLURM_ARRAY_TASK_MAX : indice max du tableau de jobs
  • SLURM_ARRAY_TASK_MIN : indice min du tableau de jobs

Information sur l'environnement matériel

  • SLURM_CLUSTER_NAME : nom du cluster sur lequel le job s'exécute
  • SLURM_CPUS_ON_NODE : nombre de CPU (=coeurs logiques) sur le noeud alloué

Information sur le job

* SLURM_GTIDS : numéro des tâches en cours d'exécution sur le noeud alloué

  • SLURM_JOB_ID : numéro du job
  • SLURM_JOB_NAME : nom du job

* SLURM_JOB_NODELIST (and SLURM_NODELIST for backwards compatibility)

  List of nodes allocated to the job. 

SLURM_JOB_NUM_NODES (and SLURM_NNODES for backwards compatibility)

  Total number of nodes in the job's resource allocation. 

SLURM_JOB_PARTITION

  Name of the partition in which the job is running. 

SLURM_JOB_QOS

  Quality Of Service (QOS) of the job allocation. 

SLURM_JOB_RESERVATION

  Advanced reservation containing the job allocation, if any. 

SLURM_LOCALID

  Node local task ID for the process within a job. 

SLURM_MEM_PER_CPU

  Same as --mem-per-cpu 

SLURM_MEM_PER_NODE

  Same as --mem 

SLURM_NODE_ALIASES

  Sets of node name, communication address and hostname for nodes allocated to the job from the cloud. Each element in the set if colon separated and each set is comma separated. For example: SLURM_NODE_ALIASES=ec0:1.2.3.4:foo,ec1:1.2.3.5:bar 

SLURM_NODEID

  ID of the nodes allocated. 

SLURM_NTASKS (and SLURM_NPROCS for backwards compatibility)

  Same as -n, --ntasks 

SLURM_NTASKS_PER_CORE

  Number of tasks requested per core. Only set if the --ntasks-per-core option is specified. 

SLURM_NTASKS_PER_NODE

  Number of tasks requested per node. Only set if the --ntasks-per-node option is specified. 

SLURM_NTASKS_PER_SOCKET

  Number of tasks requested per socket. Only set if the --ntasks-per-socket option is specified. 

SLURM_PRIO_PROCESS

  The scheduling priority (nice value) at the time of job submission. This value is propagated to the spawned processes. 

SLURM_PROCID

  The MPI rank (or relative process ID) of the current process 

SLURM_PROFILE

  Same as --profile 

SLURM_RESTART_COUNT

  If the job has been restarted due to system failure or has been explicitly requeued, this will be sent to the number of times the job has been restarted. 

SLURM_SUBMIT_DIR

  The directory from which sbatch was invoked. 

SLURM_SUBMIT_HOST

  The hostname of the computer from which sbatch was invoked. 

SLURM_TASKS_PER_NODE

  Number of tasks to be initiated on each node. Values are comma separated and in the same order as SLURM_NODELIST. If two or more consecutive nodes are to have the same task count, that count is followed by "(x#)" where "#" is the repetition count. For example, "SLURM_TASKS_PER_NODE=2(x3),1" indicates that the first three nodes will each execute three tasks and the fourth node will execute one task. 

SLURM_TASK_PID

  The process ID of the task being started. 

SLURM_TOPOLOGY_ADDR

  This is set only if the system has the topology/tree plugin configured. The value will be set to the names network switches which may be involved in the job's communications from the system's top level switch down to the leaf switch and ending with node name. A period is used to separate each hardware component name. 

SLURM_TOPOLOGY_ADDR_PATTERN

  This is set only if the system has the topology/tree plugin configured. The value will be set component types listed in SLURM_TOPOLOGY_ADDR. Each component will be identified as either "switch" or "node". A period is used to separate each hardware component type. 

SLURMD_NODENAME

  Name of the node running the job script. 
varenv.1503905543.txt.gz · Dernière modification : 2018/10/11 20:49 (modification externe)