Slurm/Task-Affinity

Aus IT der theoretischen Physik
Version vom 20. September 2021, 22:43 Uhr von Brendel (Diskussion | Beiträge) (Checking with htop: HT)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

Cf. https://www.glennklockwood.com/hpc-howtos/process-affinity.html for an explanation.

Slurm is configured with TaskPlugin=task/affinity and can reserve cores for a job. srun's option --cpu-bind provides detailed control for that.

Checking with htop

Following /proc/cpuinfo, the "logical core id" of htop on a Xeon Gold 6226R is T*32+S*16+C with

  • T = thread-ID ϵ {0,1} (the two threads on a core for enabled hyperthreading)
  • S = socket-ID ϵ {0,1} (the two CPUs with 16 cores)
  • C = core-ID ϵ {0,1,...,15} (the 16 physical cores)

In other words, the 4 columns in "htop" are S0T0 | S1T0 | S0T1 | S1T1 with hyperthreading, and S0 | S0 | S1 | S1 without.