I recently stumbled up on PAPI after listening to an HPC talk and wanted to try it out. For some reason e.g. the new high-level API doesn't seem to work, i.e. it always fails calling PAPI_hl_region_begin(). My machine is an Intel Core i7-4770 running Ubuntu 18.04 with all updates applied and I've checked out the recent 6.0 stable release. Doing
Anyone have an idea what could be wrong? I don't see anything obvious in the output of configure, like missing libraries and compilation is successful without any errors. The example also fails when ran with sudo, so it's not a permissions issue. I've attached the output of ./configure and ./run_tests.sh below.
checking for architecture... x86_64
checking for OS... linux
checking for OS version... 5.3.0-40-generic
checking for perf_event workaround level... autodetect
checking for if MIC should be used... no
checking for xlc... no
checking for icc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for xlf... no
checking for ifort... no
checking for gfortran... no
checking for f95... no
checking for f90... no
checking for f77... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking for mpicc... no
checking for gawk... no
checking for mawk... mawk
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for ANSI C header files... (cached) yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking c_asm.h usability... no
checking c_asm.h presence... no
checking for c_asm.h... no
checking intrinsics.h usability... no
checking intrinsics.h presence... no
checking for intrinsics.h... no
checking mach/mach_time.h usability... no
checking mach/mach_time.h presence... no
checking for mach/mach_time.h... no
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking for gethrtime... no
checking for read_real_time... no
checking for time_base_to_time... no
checking for clock_gettime... yes
checking for mach_absolute_time... no
checking for sched_getcpu... yes
checking for timer_create and timer_*ettime symbols in base system... not found
checking for timer_create and timer_*ettime symbols in -lrt... found
checking for dlopen and dlerror symbols in base system... not found
checking for dlopen and dlerror symbols in -ldl... found
checking for debug build...
checking for -Wno-override-init... 1
checking for CPU type... x86
checking for ffsll... yes
checking for working gettid... no
checking for working syscall(SYS_gettid)... yes
checking for working MMTIMER... no
checking for working CLOCK_REALTIME_HR POSIX 1b timer... no
checking for working CLOCK_REALTIME POSIX 1b timer... yes
checking for which real time clock to use... clock_realtime
checking for working __thread... yes
checking for high performance thread local storage... __thread
checking for working CLOCK_THREAD_CPUTIME_ID POSIX 1b timer... yes
checking for which virtual timer to use... clock_thread_cputime_id
checking for static user preset events... no
checking for static PAPI preset events... yes
checking for whether to build static library... yes
checking for whether to build shared library... yes
checking for static compile of tests and utilities... no
checking for linking with papi shared library of tests and utilities... no
checking for /sys/class/perfctr... no
checking for /dev/perfctr... no
checking for /sys/kernel/perfmon/version... no
checking for /proc/perfmon... no
checking for /proc/sys/kernel/perf_event_paranoid... yes
checking for libpfm4/include/perfmon/perf_event.h... yes
checking platform... linux-pe
checking for components to build... perf_event perf_event_uncore
checking for PAPI event CSV filename to use... papi_events.csv
configure: Compiling genpapifdef with gcc
configure: Generating fpapi.h
configure: Generating f77papi.h
configure: Generating f90papi.h
configure: Rules.pfm4_pe will be included in the generated Makefile
configure: creating ./config.status
config.status: creating Makefile
config.status: creating papi.pc
config.status: creating components/Makefile_comp_tests.target
config.status: creating testlib/Makefile.target
config.status: creating utils/Makefile.target
config.status: creating ctests/Makefile.target
config.status: creating ftests/Makefile.target
config.status: creating validation_tests/Makefile.target
config.status: creating config.h
config.status: config.h is unchanged
Platform:
Linux functor 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Date:
ma 9.3.2020 09.46.03 +0200
Cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
stepping : 3
microcode : 0x27
cpu MHz : 1791.230
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 6798.16
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
The following test cases will be run:
validation_tests/cycles_validation validation_tests/flops_validation validation_tests/fp_validation_hl validation_tests/papi_br_cn validation_tests/papi_br_ins validation_tests/papi_br_msp validation_tests/papi_br_ntk validation_tests/papi_br_prc validation_tests/papi_br_tkn validation_tests/papi_br_ucn validation_tests/papi_dp_ops validation_tests/papi_fp_ops validation_tests/papi_hw_int validation_tests/papi_l1_dca validation_tests/papi_l1_dcm validation_tests/papi_l2_dca validation_tests/papi_l2_dcm validation_tests/papi_l2_dcr validation_tests/papi_l2_dcw validation_tests/papi_ld_ins validation_tests/papi_ref_cyc validation_tests/papi_sp_ops validation_tests/papi_sr_ins validation_tests/papi_tot_cyc validation_tests/papi_tot_ins ctests/all_events ctests/all_native_events ctests/attach2 ctests/attach3 ctests/attach_cpu ctests/attach_cpu_sys_validate ctests/attach_cpu_validate ctests/attach_validate ctests/branches ctests/byte_profile ctests/calibrate ctests/case1 ctests/case2 ctests/child_overflow ctests/clockres_pthreads ctests/cmpinfo ctests/code2name ctests/data_range ctests/derived ctests/describe ctests/destroy ctests/disable_component ctests/dmem_info ctests/earprofile ctests/eventname ctests/exec ctests/exec2 ctests/exec_overflow ctests/exeinfo ctests/failed_events ctests/first ctests/fork ctests/fork2 ctests/fork_overflow ctests/forkexec ctests/forkexec2 ctests/forkexec3 ctests/forkexec4 ctests/get_event_component ctests/hwinfo ctests/inherit ctests/johnmay2 ctests/krentel_pthreads ctests/kufrin ctests/locks_pthreads ctests/low-level ctests/max_multiplex ctests/memory ctests/mendes-alt ctests/multiattach ctests/multiattach2 ctests/multiplex1 ctests/multiplex1_pthreads ctests/multiplex2 ctests/multiplex3_pthreads ctests/omp_hl ctests/overflow ctests/overflow2 ctests/overflow3_pthreads ctests/overflow_allcounters ctests/overflow_force_software ctests/overflow_index ctests/overflow_one_and_read ctests/overflow_pthreads ctests/overflow_single_event ctests/overflow_twoevents ctests/p4_lst_ins ctests/profile ctests/profile_force_software ctests/profile_pthreads ctests/profile_twoevents ctests/pthread_hl ctests/pthrtough ctests/realtime ctests/remove_events ctests/reset ctests/reset_multiplex ctests/sdsc-mpx ctests/sdsc2-mpx ctests/sdsc2-mpx-noreset ctests/sdsc4-mpx ctests/second ctests/serial_hl ctests/serial_hl_ll_comb ctests/shlib ctests/sprofile ctests/system_child_overflow ctests/system_overflow ctests/tenth ctests/thrspecific ctests/version ctests/virttime ctests/zero ctests/zero_attach ctests/zero_flip ctests/zero_fork ctests/zero_named ctests/zero_omp ctests/zero_pthreads ctests/zero_shmem ctests/zero_smp components/perf_event/tests/nmi_watchdog components/perf_event/tests/broken_events components/perf_event/tests/perf_event_offcore_response components/perf_event/tests/perf_event_user_kernel components/perf_event/tests/perf_event_system_wide components/perf_event_uncore/tests/perf_event_uncore_attach components/perf_event_uncore/tests/perf_event_uncore components/perf_event_uncore/tests/perf_event_uncore_multiple components/perf_event_uncore/tests/perf_event_amd_northbridge components/perf_event_uncore/tests/perf_event_uncore_cbox
The following test cases will NOT be run:
ftests/Makefile.recipies ftests/Makefile ftests/
Makefile.target.in ctests/Makefile.recipies ctests/Makefile ctests/
Makefile.target.in ctests/Make-export components/infiniband/tests/Makefile components/cuda/tests/Makefile components/Makefile_comp_tests components/net/tests/Makefile components/lustre/tests/Makefile components/perf_event/tests/Makefile components/nvml/tests/Makefile components/perf_event_uncore/tests/Makefile components/rapl/tests/Makefile components/bcs/tests/Makefile testlib/Makefile testlib/
Makefile.target.in validation_tests/memleak_check ctests/cpi.pbs ctests/burn ctests/attach_target ctests/pthrtough2 ctests/timer_overflow ctests/omptough ctests/serial_hl_ll_comb2 ctests/mpi_hl ctests/mpi_omp_hl components/appio/tests/iozone/Gnuplot.txt components/appio/tests/iozone/Generate_Graphs components/appio/tests/iozone/
report.pl components/appio/tests/iozone/
iozone_visualizer.pl components/appio/tests/iozone/gengnuplot.sh components/appio/tests/iozone/gnu3d.dem
Running Tests
Running Event Validation Tests
Running validation_tests/cycles_validation: SKIPPED
Running validation_tests/flops_validation: PASSED
Running validation_tests/fp_validation_hl: FAILED!!!
Line # 24 Error in PAPI_hl_region_begin: Invalid argument
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
rm: cannot remove 'papi_hl_output': No such file or directory
Running validation_tests/papi_br_cn: SKIPPED
Running validation_tests/papi_br_ins: SKIPPED
Running validation_tests/papi_br_msp: SKIPPED
Running validation_tests/papi_br_ntk: SKIPPED
Running validation_tests/papi_br_prc: SKIPPED
Running validation_tests/papi_br_tkn: SKIPPED
Running validation_tests/papi_br_ucn: SKIPPED
Running validation_tests/papi_dp_ops: SKIPPED
Running validation_tests/papi_fp_ops: SKIPPED
Running validation_tests/papi_hw_int: SKIPPED
Running validation_tests/papi_l1_dca: SKIPPED
Running validation_tests/papi_l1_dcm: SKIPPED
Running validation_tests/papi_l2_dca: SKIPPED
Running validation_tests/papi_l2_dcm: SKIPPED
Running validation_tests/papi_l2_dcr: SKIPPED
Running validation_tests/papi_l2_dcw: SKIPPED
Running validation_tests/papi_ld_ins: SKIPPED
Running validation_tests/papi_ref_cyc: SKIPPED
Running validation_tests/papi_sp_ops: SKIPPED
Running validation_tests/papi_sr_ins: SKIPPED
Running validation_tests/papi_tot_cyc: SKIPPED
Running validation_tests/papi_tot_ins: SKIPPED
Running C Tests
Running ctests/all_events: FAILED!!!
Line # 105 Error: No events added
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/all_native_events: FAILED!!!
Line # 179 Error: No events added
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/attach2: SKIPPED
Running ctests/attach3: SKIPPED
Running ctests/attach_cpu: SKIPPED
Running ctests/attach_cpu_sys_validate: SKIPPED
Running ctests/attach_cpu_validate: SKIPPED
Running ctests/attach_validate: SKIPPED
Running ctests/branches: SKIPPED
Running ctests/byte_profile: SKIPPED
Running ctests/calibrate: SKIPPED
Running ctests/case1: PASSED
Running ctests/case2: PASSED
Running ctests/child_overflow: SKIPPED
Running ctests/clockres_pthreads: PASSED
Running ctests/cmpinfo: PASSED
Running ctests/code2name: SKIPPED
Running ctests/data_range: SKIPPED
Running ctests/derived: SKIPPED
Running ctests/describe: SKIPPED
Running ctests/destroy: FAILED!!!
Line # 55 Error in adding PAPI_TOT_CYC: Component containing event is disabled
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/disable_component: PASSED
Running ctests/dmem_info: PASSED
Running ctests/earprofile: SKIPPED
Running ctests/eventname: PASSED
Running ctests/exec: PASSED
Running ctests/exec2: PASSED
Running ctests/exec_overflow: SKIPPED
Running ctests/exeinfo: PASSED
Running ctests/failed_events: PASSED
Running ctests/first: SKIPPED
Running ctests/fork: PASSED
Running ctests/fork2: PASSED
Running ctests/fork_overflow: SKIPPED
Running ctests/forkexec: PASSED
Running ctests/forkexec2: PASSED
Running ctests/forkexec3: PASSED
Running ctests/forkexec4: PASSED
Running ctests/get_event_component: PASSED
Running ctests/hwinfo: PASSED
Running ctests/inherit: SKIPPED
Running ctests/johnmay2: SKIPPED
Running ctests/krentel_pthreads: SKIPPED
Running ctests/kufrin: SKIPPED
Running ctests/locks_pthreads: PASSED
Running ctests/low-level: SKIPPED
Running ctests/max_multiplex: FAILED!!!
Line # 55 Error in PAPI_create_multiplex: Permission level does not permit operation
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/memory: PASSED
Running ctests/mendes-alt: FAILED!!!
Line # 94 Error in PAPI_set_multiplex fails
: Permission level does not permit operation
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/multiattach: SKIPPED
Running ctests/multiattach2: SKIPPED
Running ctests/multiplex1: SKIPPED
Running ctests/multiplex1_pthreads: SKIPPED
Running ctests/multiplex2: FAILED!!!
Line # 74 Error in PAPI_set_multiplex: Permission level does not permit operation
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/multiplex3_pthreads: FAILED!!!
Line # 81 Error in PAPI_set_multiplex: Permission level does not permit operation
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/omp_hl: FAILED!!!
Line # 32 Error in PAPI_hl_region_begin: Invalid argument
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
FAILED!!!
Line # 32 LED!!!
Line # 32 Error in PAPI_hl_region_begin: (null)
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
rm: cannot remove 'papi_hl_output': No such file or directory
Running ctests/overflow: SKIPPED
Running ctests/overflow2: SKIPPED
Running ctests/overflow3_pthreads: SKIPPED
Running ctests/overflow_allcounters: SKIPPED
Running ctests/overflow_force_software: SKIPPED
Running ctests/overflow_index: SKIPPED
Running ctests/overflow_one_and_read: SKIPPED
Running ctests/overflow_pthreads: PASSED
Running ctests/overflow_single_event: SKIPPED
Running ctests/overflow_twoevents: SKIPPED
Running ctests/p4_lst_ins: SKIPPED
Running ctests/profile: SKIPPED
Running ctests/profile_force_software: SKIPPED
Running ctests/profile_pthreads: SKIPPED
Running ctests/profile_twoevents: SKIPPED
Running ctests/pthread_hl: FAILED!!!
Line # 34 Error in PAPI_hl_region_begin: Invalid argument
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
FAILED!!!
FAILED!!!
34 Error in PAPI_hl_region_begin: (null)
34 Error in PAPI_hl_region_begin: (null)
rm: cannot remove 'papi_hl_output': No such file or directory
Running ctests/pthrtough: PASSED
Running ctests/realtime: PASSED
Running ctests/remove_events: SKIPPED
Running ctests/reset: SKIPPED
Running ctests/reset_multiplex: SKIPPED
Running ctests/sdsc-mpx: SKIPPED
Running ctests/sdsc2-mpx: FAILED!!!
Line # 118 Error in PAPI_set_multiplex: Permission level does not permit operation
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/sdsc2-mpx-noreset: FAILED!!!
Line # 118 Error in PAPI_set_multiplex: Permission level does not permit operation
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/sdsc4-mpx: FAILED!!!
Line # 123 Error in PAPI_set_multiplex: Permission level does not permit operation
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/second: SKIPPED
Running ctests/serial_hl: FAILED!!!
Line # 27 Error in PAPI_hl_region_begin: Invalid argument
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
rm: cannot remove 'papi_hl_output': No such file or directory
Running ctests/serial_hl_ll_comb: FAILED!!!
Line # 28 Error in PAPI_hl_region_begin: Invalid argument
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
rm: cannot remove 'papi_hl_output': No such file or directory
Running ctests/shlib: PASSED
Running ctests/sprofile: FAILED!!!
Line # 112 Error in PAPI_sprofil: Component Index isn't set
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running ctests/system_child_overflow: SKIPPED
Running ctests/system_overflow: SKIPPED
Running ctests/tenth: SKIPPED
Running ctests/thrspecific: PASSED
Running ctests/version: PASSED
Running ctests/virttime: PASSED
Running ctests/zero: SKIPPED
Running ctests/zero_attach: SKIPPED
Running ctests/zero_flip: SKIPPED
Running ctests/zero_fork: SKIPPED
Running ctests/zero_named: SKIPPED
Running ctests/zero_omp: SKIPPED
Running ctests/zero_pthreads: SKIPPED
Running ctests/zero_shmem: SKIPPED
Running ctests/zero_smp: SKIPPED
Running Fortran Tests
Running Component Tests
Running components/perf_event/tests/nmi_watchdog:
WARNING Line # 72 Warning: NMI Watchdog Active, enabling slow workarounds
PASSED with WARNING
Running components/perf_event/tests/broken_events:
SKIPPED
Running components/perf_event/tests/perf_event_offcore_response:
FAILED!!!
Line # 57 Error in adding offcore event : Event does not exist
Some tests require special hardware, permissions, OS, compilers
or library versions. PAPI may still function perfectly on your
system without the particular feature being tested here.
Running components/perf_event/tests/perf_event_user_kernel:
SKIPPED
Running components/perf_event/tests/perf_event_system_wide:
SKIPPED
Running components/perf_event_uncore/tests/perf_event_uncore_attach:
SKIPPED
Running components/perf_event_uncore/tests/perf_event_uncore:
SKIPPED
Running components/perf_event_uncore/tests/perf_event_uncore_multiple:
SKIPPED
Running components/perf_event_uncore/tests/perf_event_amd_northbridge:
SKIPPED
Running components/perf_event_uncore/tests/perf_event_uncore_cbox:
SKIPPED