Skip to content

New environment variable `LIKWID_IGNORE_CPUSET` to ignore the current cpuset

Thomas Gruber requested to merge ignore_cpuset into master

Created by: TomTheBear

New environment variable LIKWID_IGNORE_CPUSET. The variable affects all tools and the library. Maybe fixes #358, not tested isolcpus explicitly.

System with 8 hardware threads (SMT active)
$ taskset -c -p $$
pid's current affinity list: 0-2
$ likwid-pin -c 0,1 -p
INFO: You are running LIKWID in a cpuset with 3 CPUs. Taking given IDs as logical ID in cpuset
0,1
$ likwid-pin -c 3,4 -p
INFO: You are running LIKWID in a cpuset with 3 CPUs. Taking given IDs as logical ID in cpuset
0,1
$ LIKWID_IGNORE_CPUSET=1 ./likwid-pin -c 3,4 -p
3,4

It does not ignore the CPUset but creates an own CPUset containing X online CPUs where X=sysconf(_SC_NPROCESSORS_CONF). This should be fine for almost all use-cases.

Merge request reports