uataq.filesystem.core.cpu_count#

uataq.filesystem.core.cpu_count()[source]#

Return the number of CPUs this process may run on.

Unlike multiprocessing.cpu_count(), which reports every core on the machine, this respects the CPU affinity a scheduler sets: a SLURM job given 16 cores on a 64-core node gets 16, not 64.

Returns:

The usable CPU count.

Return type:

int