Skip to content

EnvVariables

Thomas Gruber edited this page Oct 19, 2023 · 7 revisions

Environment variables used by the LIKWID library

Some functionality of the LIKWID library can be changed by setting environment variables. Here is a list of variables used by LIKWID:

  • LIKWID_FORCE: Enables the overwriting of counters that are detected to be in-use. The environment variable is similar to the -f/--force command line switch for likwid-perfctr
  • LIKWID_NO_ACCESS: The execution does not require the access layer (access to hardware counters). For example, this variable is set by likwid-topology or likwid-pin
  • LIKWID_PIN: The comma-separated list contains the CPUs the application threads should be pinned to. Careful, the first CPU in the cpuset must be the last entry because the application is pinned to this CPU per default.
  • LIKWID_SILENT: Disable stdout output caused by the library and the scripts. Some scripts provide the -q/--quiet command line switch which provides the same functionality
  • LIKWID_SKIP: Variable content must be a hexmask. This hexmask describes which threads should be skipped while pinning. This function is required to avoid pinning the shepherd threads used by some OpenMP and MPI implementations. The version 4.3.1 introduced an automatic detection of the shepherd threads. In most cases the detection works, but if not, the hexmask overwrites the automatic detection.
  • LIKWID_DEBUG: Verbosity settings for the LIKWID library
  • LIKWID_FORCE_SETUP: Always setup all counters in setupCounters(...) and don't respect the previous configuration. Without this environment variable set, LIKWID writes the configuration to the register only if the configuration has changed (compared to the last setupCounters(...) call)
  • LIKWID_IGNORE_CPUSET: LIKWID respects the CPUset of the calling process. If you want to measure/run outside of this CPUset, use this environment variable. It will not ignore the CPUset but create a new CPUset internally which contains sysconf(_SC_NPROCESSORS_CONF) hardware threads.
  • LIKWID_HWTHREADS: List of threads given to LIKWID regardless of pinning or no-pinning.

Environment variables used by the MarkerAPI

  • LIKWID_FILEPATH: Filepath for the result file of the MarkerAPI.
  • LIKWID_MODE: Access mode for MarkerAPI
  • LIKWID_DEBUG: Verbosity settings for the LIKWID library
  • LIKWID_EVENTS: Event string or performance group name. Multiple event strings or performance group names can be separated by |
  • LIKWID_THREADS: The CPUs LIKWID is configured to run on (comma-separated list)

Environment variables used by the LIKWID library which access mode perf_event

  • LIKWID_PERF_EXECPID: The variable causes that the PID of the wrapped executable is submitted to perf_event_open. Consequently, only this process (and its children) are measured through perf_event
  • LIKWID_PERF_PID: If you want to measure an already running process, you can put the PID in this variable and LIKWID attaches to the process
  • LIKWID_PERF_FLAGS: The perf_event_open system call accepts further flags. LIKWID itself does not set any flags, but if the user wants to, the flags can be put in this variable

Environment variables used by likwid-mpirun

  • LIKWID_MPI_CONNECT: Connection method for Intel MPI. Default is ssh, see option -r of mpdboot or similar

Environment variables for underlying libraries

  • HWLOC_FSROOT: In case you have saved the system topology with hwloc-gather-topology, you can use this topology for LIKWID. The HWLOC tool creates tarballs, you can use the tarball directly, no need to unpack it first. HWLOC_FSROOT=system.tar.bz2 likwid-topology shows the topology. Be careful when using this environment variable for anything else than topology lookups, it is not the system topology of the current node.
Clone this wiki locally