RRZE-HPC / likwid

Performance monitoring and benchmarking suite
https://hpc.fau.de/research/tools/likwid/
GNU General Public License v3.0
1.65k stars 226 forks source link

[BUG] Cant retrieve available event groups if HOME is not set #560

Closed ntippman closed 10 months ago

ntippman commented 10 months ago

Describe the bug The current master of LIKWID can't retrieve available event groups if HOME is not set. In contrast, release v5.2.2 does not care whether HOME is set.

Since the changelog of release v5.2.2 mentions Fix if HOME environment variable is not set (systemd) I am not sure if this is intended or a bug.

To Reproduce

[ntippman@ibp04 likwid]$ env --ignore-environment /usr/local/bin/likwid-perfctr -a
No groups defined for Intel Cascadelake SP processor
[ntippman@ibp04 likwid]$ env --ignore-environment HOME=/tmp /usr/local/bin/likwid-perfctr -a
    Group name  Description
--------------------------------------------------------------------------------
        BRANCH  Branch prediction miss rate/ratio
        CACHES  Cache bandwidth in MBytes/s
         CLOCK  Power and Energy consumption
CYCLE_ACTIVITY  Cycle Activities
  CYCLE_STALLS  Cycle Activities (Stalls)
          DATA  Load to store ratio
        DIVIDE  Divide unit information
     FLOPS_AVX  Packed AVX MFLOP/s
      FLOPS_DP  Double Precision MFLOP/s
      FLOPS_SP  Single Precision MFLOP/s
            L2  L2 cache bandwidth in MBytes/s
       L2CACHE  L2 cache miss rate/ratio
            L3  L3 cache bandwidth in MBytes/s
       L3CACHE  L3 cache miss rate/ratio
           MEM  Main memory bandwidth in MBytes/s
        MEM_DP  Overview of arithmetic and main memory performance
        MEM_SP  Overview of arithmetic and main memory performance
           PMM  Intel Optane DC bandwidth in MBytes/s
      TLB_DATA  L2 data TLB miss rate/ratio
     TLB_INSTR  L1 Instruction TLB miss rate/ratio
           TMA  Top down cycle allocation
     UOPS_EXEC  UOPs execution
    UOPS_ISSUE  UOPs issueing
   UOPS_RETIRE  UOPs retirement
           UPI  UPI data traffic
        ENERGY  Power and Energy consumption

Same behaviour with the C-API where perfmon_getGroups returns -22 when HOME is not set (systemd).