numactl

Software name: 
numactl
Policy 

numactl is copyrighted under the GNU General Public License, v.2.

It is freely available to all users of HPC2N.

General 

The numactl program allows you to run your application program on specific cpu's and memory nodes. It does this by supplying a NUMA memory policy to the operating system before running your program.

Description 

The numactl program allows you to run your application program on specific cpu's and memory nodes. It does this by supplying a NUMA memory policy to the operating system before running your program.

The libnuma library provides convenient ways for you to add NUMA memory policies into your own program.

NUMA stands for Non-Uniform Memory Access, in other words a system whose memory is not all in one place. The system consists of multiple "nodes" of cpu's (processors) and/or memory which are linked together by a special high-speed network. All cpu's have access to all of memory, but a cpu's access to memory on the local or a nearby node is faster than to distant nodes.

Availability 

On HPC2N we have numactl available as a module on Abisko and Kebnekaise.

Usage at HPC2N 

To use the numactl module, first add it to your environment. Use:

module spider numactl

to see how to load the module and the needed prerequisites.

Example, loading numactl version 2.0.11

ml GCCcore/6.3.0
ml numactl/2.0.11

You can read more about loading modules on our Accessing software with Lmod page and our Using modules (Lmod) page.

Usage

Enter the command "numactl" with no options to get a list of options:

$ numactl
usage: numactl [--all | -a] [--interleave= | -i <nodes>] [--preferred= | -p <node>]
               [--physcpubind= | -C <cpus>] [--cpunodebind= | -N <nodes>]
               [--membind= | -m <nodes>] [--localalloc | -l] command args ...
       numactl [--show | -s]
       numactl [--hardware | -H]
       numactl [--length | -l <length>] [--offset | -o <offset>] [--shmmode | -M <shmmode>]
               [--strict | -t]
               [--shmid | -I <id>] --shm | -S <shmkeyfile>
               [--shmid | -I <id>] --file | -f <tmpfsfile>
               [--huge | -u] [--touch | -T]
               memory policy | --dump | -d | --dump-nodes | -D

memory policy is --interleave | -i, --preferred | -p, --membind | -m, --localalloc | -l
<nodes> is a comma delimited list of node numbers or A-B ranges or all.
Instead of a number a node can also be:
  netdev:DEV the node connected to network device DEV
  file:PATH  the node the block device of path is connected to
  ip:HOST    the node of the network device host routes through
  block:PATH the node of block device path
  pci:[seg:]bus:dev[:func] The node of a PCI device
<cpus> is a comma delimited list of cpu numbers or A-B ranges or all
all ranges can be inverted with !
all numbers and ranges can be made cpuset-relative with +
the old --cpubind argument is deprecated.
use --cpunodebind or --physcpubind instead
<length> can have g (GB), m (MB) or k (KB) suffixes
Additional info 

More information, including an example, can be found on the numactl homepage.

Updated: 2017-11-22, 19:57