Node Resources Module

This module for detects and returns intranode resources


Returns the number of cores on the node.

If hyperthreads is true, this is the logical CPU cores; else the physical cores are returned.

Note: This returns cores available on the current node. It will not work for systems of multiple node types


hyperthreads (bool) –

Return type


node_resources.get_sub_node_resources(launcher=None, remote_mode=False, env_resources=None)

Returns logical and physical cores and GPUs per node as a tuple

First checks for known system values, then for environment values, and finally for detected values. If remote_mode is True, then detection launches a job via the MPI launcher.

Any value that is already valid, is not overwritten by successive stages.

  • launcher (Optional[str]) –

  • remote_mode (bool) –

  • env_resources (Optional[EnvResources]) –

Return type

Tuple[int, int, int]