Problems getting PAPI high level API to work

927 views
Skip to first unread message

Edvard Fagerholm

unread,
Mar 9, 2020, 10:46:25 AM3/9/20
to ptools-perfapi
Hi,

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

./configure && make && cd examples && make && ./high_level

gives me the error:

Error -1 high_level.c:line 54:

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.

Best,
Edvard

===== ./configure output =====

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



===== ./run_tests.sh output =====


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

Frank Winkler

unread,
Mar 9, 2020, 11:39:48 AM3/9/20
to Edvard Fagerholm, ptools-perfapi
Hi Edvard,

Can you please rebuild PAPI with debug enabled?
./configure --with-debug=yes && make && cd examples && make

export PAPI_HL_VERBOSE=1
export PAPI_DEBUG=HIGHLEVEL

./high_level

Please send me the output.

Also, please send the output of papi_avail.
cd ../utitls
./papi_avail

Thanks,
Frank


--
You received this message because you are subscribed to the Google Groups "ptools-perfapi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ptools-perfap...@icl.utk.edu.
To view this discussion on the web visit https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/dd4d0fa9-5542-480c-bb9e-586bf4a02350%40icl.utk.edu.

Edvard Fagerholm

unread,
Mar 9, 2020, 3:23:14 PM3/9/20
to Frank Winkler, ptools-perfapi
papi_avail basically showed nothing. I tried running the code on our compute clusters and it worked there, but it didn't work on the workstations I tried it on. I then noticed that some other scripts of mine for running perf didn't work either on the workstations and it seems like the problem is that Ubuntu sets kernel.perf_event_paranoid=3 by default. perf gives a more useful error message in this telling that it won't work because of this setting.

The current installation instructions say that everything should work out-of-the-box with a modern Linux distro, so it might make sense to update the instructions to mention this kernel parameter and probably add code that checks for it and prints an error if it's >= 2. I noticed that some changelogs for PAPI mention the perf_event_paranoid parameter.

Best,
Edvard

Max Smith

unread,
Nov 8, 2020, 7:14:33 PM11/8/20
to ptools-perfapi, Edvard Fagerholm, ptools-perfapi, Frank Winkler
Was your issue resolved by updating kernel.perf_event_paranoid? I am having similar issues but have this set to 1.

Frank Winkler

unread,
Nov 9, 2020, 4:21:12 AM11/9/20
to Max Smith, ptools-perfapi, Edvard Fagerholm
Hi Edvard, hi Max,

Have you tried the latest repo version of PAPI?


The last line of the "configure" output should mention the paranoid level issue.

Thanks,
Frank

Max Smith

unread,
Nov 9, 2020, 9:02:59 AM11/9/20
to Frank Winkler, ptools-perfapi, Edvard Fagerholm
Hi Frank,

Thanks for the response. Yes I have tried the latest version of PAPI. I believe it is because I am trying to run PAPI on a VM. It looks like this is not supported.

What is the ideal environment to run PAPI in? I currently have a Windows 10 machine. Guessing dual boot Linux?

Best,
Max

Frank Winkler

unread,
Nov 9, 2020, 10:53:11 AM11/9/20
to Max Smith, ptools-perfapi, Edvard Fagerholm

On 9. Nov 2020, at 15:02, Max Smith <smithm...@gmail.com> wrote:

Hi Frank,

Thanks for the response. Yes I have tried the latest version of PAPI. I believe it is because I am trying to run PAPI on a VM. It looks like this is not supported.

What is the ideal environment to run PAPI in? I currently have a Windows 10 machine. Guessing dual boot Linux?

A Linux installation in dual-boot with your Windows 10 system will definitely solve your problem.

Best,
Frank

Phil Mucci

unread,
Nov 9, 2020, 2:33:49 PM11/9/20
to Frank Winkler, Max Smith, ptools-perfapi, Edvard Fagerholm
Hi all. I have a branch of Papi 5.7 that I’ve been privately maintaining, That allows papi to work under Vms and containers. While all hardware events are not available On nearly every VM, software events from the Perf subsystem work perfectly fine.

I’m happy to send you a link but my guess is you want PA PI for its hardware measurement capabilities.

Phil

Sent from my iPhone

On Nov 9, 2020, at 09:53, Frank Winkler <frank....@icl.utk.edu> wrote:



Devansh Jain

unread,
Dec 7, 2022, 5:19:58 PM12/7/22
to ptools-perfapi, Frank Winkler, ptools-perfapi, Edvard Fagerholm
Hi Frank,
I am having similar problems on my machine
Output of ./high_level
PAPI-HL Info: PAPI has been initiated!
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_library_init:260:16384:0x4000 master_thread_id=16384
HIGHLEVEL:high-level/papi_hl.c:_internal_PAPI_hl_set_events:1810:16384:0x4000 Set events: (null)
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_read_events:683:16384:0x4000 Read events: (null)
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_determine_default_events:369:16384:0x4000 Default events
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_checkCounter:309:16384:0x4000 Counter: PAPI_TOT_CYC
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_checkCounter:319:16384:0x4000 Cannot add counter PAPI_TOT_CYC
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_create_components:577:16384:0x4000 Create components
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_create_components:654:16384:0x4000 Number of components 0
PAPI-HL Warning: All requested events do not work, using default.
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_determine_default_events:369:16384:0x4000 Default events
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_checkCounter:309:16384:0x4000 Counter: PAPI_TOT_CYC
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_checkCounter:319:16384:0x4000 Cannot add counter PAPI_TOT_CYC
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_create_components:577:16384:0x4000 Create components
HIGHLEVEL:high-level/papi_hl.c:_internal_hl_create_components:654:16384:0x4000 Number of components 0

Error -1 high_level.c:line 54:

Output of ../utils/papi_avail
Available PAPI preset and user defined events plus hardware information.
--------------------------------------------------------------------------------
PAPI version             : 7.0.0.0
Operating system         : Linux 6.0.9-300.fc37.x86_64
Vendor string and code   : AuthenticAMD (2, 0x2)
Model string and code    : AMD Ryzen 5 5600H with Radeon Graphics (80, 0x50)
CPU revision             : 0.000000
CPUID                    : Family/Model/Stepping 25/80/0, 0x19/0x50/0x00
CPU Max MHz              : 4280
CPU Min MHz              : 400
Total cores              : 12
SMT threads per core     : 2
Cores per socket         : 6
Sockets                  : 1
Cores per NUMA region    : 12
NUMA regions             : 1
Running in a VM          : no
Number Hardware Counters : 0
Max Multiplex Counters   : 384
Fast counter read (rdpmc): yes
--------------------------------------------------------------------------------

================================================================================
  PAPI Preset Events
================================================================================
    Name        Code    Avail Deriv Description (Note)
PAPI_L1_DCM  0x80000000  No    No   Level 1 data cache misses
PAPI_L1_ICM  0x80000001  No    No   Level 1 instruction cache misses
PAPI_L2_DCM  0x80000002  No    No   Level 2 data cache misses
PAPI_L2_ICM  0x80000003  No    No   Level 2 instruction cache misses
PAPI_L3_DCM  0x80000004  No    No   Level 3 data cache misses
PAPI_L3_ICM  0x80000005  No    No   Level 3 instruction cache misses
PAPI_L1_TCM  0x80000006  No    No   Level 1 cache misses
PAPI_L2_TCM  0x80000007  No    No   Level 2 cache misses
PAPI_L3_TCM  0x80000008  No    No   Level 3 cache misses
PAPI_CA_SNP  0x80000009  No    No   Requests for a snoop
PAPI_CA_SHR  0x8000000a  No    No   Requests for exclusive access to shared cache line
PAPI_CA_CLN  0x8000000b  No    No   Requests for exclusive access to clean cache line
PAPI_CA_INV  0x8000000c  No    No   Requests for cache line invalidation
PAPI_CA_ITV  0x8000000d  No    No   Requests for cache line intervention
PAPI_L3_LDM  0x8000000e  No    No   Level 3 load misses
PAPI_L3_STM  0x8000000f  No    No   Level 3 store misses
PAPI_BRU_IDL 0x80000010  No    No   Cycles branch units are idle
PAPI_FXU_IDL 0x80000011  No    No   Cycles integer units are idle
PAPI_FPU_IDL 0x80000012  No    No   Cycles floating point units are idle
PAPI_LSU_IDL 0x80000013  No    No   Cycles load/store units are idle
PAPI_TLB_DM  0x80000014  No    No   Data translation lookaside buffer misses
PAPI_TLB_IM  0x80000015  No    No   Instruction translation lookaside buffer misses
PAPI_TLB_TL  0x80000016  No    No   Total translation lookaside buffer misses
PAPI_L1_LDM  0x80000017  No    No   Level 1 load misses
PAPI_L1_STM  0x80000018  No    No   Level 1 store misses
PAPI_L2_LDM  0x80000019  No    No   Level 2 load misses
PAPI_L2_STM  0x8000001a  No    No   Level 2 store misses
PAPI_BTAC_M  0x8000001b  No    No   Branch target address cache misses
PAPI_PRF_DM  0x8000001c  No    No   Data prefetch cache misses
PAPI_L3_DCH  0x8000001d  No    No   Level 3 data cache hits
PAPI_TLB_SD  0x8000001e  No    No   Translation lookaside buffer shootdowns
PAPI_CSR_FAL 0x8000001f  No    No   Failed store conditional instructions
PAPI_CSR_SUC 0x80000020  No    No   Successful store conditional instructions
PAPI_CSR_TOT 0x80000021  No    No   Total store conditional instructions
PAPI_MEM_SCY 0x80000022  No    No   Cycles Stalled Waiting for memory accesses
PAPI_MEM_RCY 0x80000023  No    No   Cycles Stalled Waiting for memory Reads
PAPI_MEM_WCY 0x80000024  No    No   Cycles Stalled Waiting for memory writes
PAPI_STL_ICY 0x80000025  No    No   Cycles with no instruction issue
PAPI_FUL_ICY 0x80000026  No    No   Cycles with maximum instruction issue
PAPI_STL_CCY 0x80000027  No    No   Cycles with no instructions completed
PAPI_FUL_CCY 0x80000028  No    No   Cycles with maximum instructions completed
PAPI_HW_INT  0x80000029  No    No   Hardware interrupts
PAPI_BR_UCN  0x8000002a  No    No   Unconditional branch instructions
PAPI_BR_CN   0x8000002b  No    No   Conditional branch instructions
PAPI_BR_TKN  0x8000002c  No    No   Conditional branch instructions taken
PAPI_BR_NTK  0x8000002d  No    No   Conditional branch instructions not taken
PAPI_BR_MSP  0x8000002e  No    No   Conditional branch instructions mispredicted
PAPI_BR_PRC  0x8000002f  No    No   Conditional branch instructions correctly predicted
PAPI_FMA_INS 0x80000030  No    No   FMA instructions completed
PAPI_TOT_IIS 0x80000031  No    No   Instructions issued
PAPI_TOT_INS 0x80000032  No    No   Instructions completed
PAPI_INT_INS 0x80000033  No    No   Integer instructions
PAPI_FP_INS  0x80000034  No    No   Floating point instructions
PAPI_LD_INS  0x80000035  No    No   Load instructions
PAPI_SR_INS  0x80000036  No    No   Store instructions
PAPI_BR_INS  0x80000037  No    No   Branch instructions
PAPI_VEC_INS 0x80000038  No    No   Vector/SIMD instructions (could include integer)
PAPI_RES_STL 0x80000039  No    No   Cycles stalled on any resource
PAPI_FP_STAL 0x8000003a  No    No   Cycles the FP unit(s) are stalled
PAPI_TOT_CYC 0x8000003b  No    No   Total cycles
PAPI_LST_INS 0x8000003c  No    No   Load/store instructions completed
PAPI_SYC_INS 0x8000003d  No    No   Synchronization instructions completed
PAPI_L1_DCH  0x8000003e  No    No   Level 1 data cache hits
PAPI_L2_DCH  0x8000003f  No    No   Level 2 data cache hits
PAPI_L1_DCA  0x80000040  No    No   Level 1 data cache accesses
PAPI_L2_DCA  0x80000041  No    No   Level 2 data cache accesses
PAPI_L3_DCA  0x80000042  No    No   Level 3 data cache accesses
PAPI_L1_DCR  0x80000043  No    No   Level 1 data cache reads
PAPI_L2_DCR  0x80000044  No    No   Level 2 data cache reads
PAPI_L3_DCR  0x80000045  No    No   Level 3 data cache reads
PAPI_L1_DCW  0x80000046  No    No   Level 1 data cache writes
PAPI_L2_DCW  0x80000047  No    No   Level 2 data cache writes
PAPI_L3_DCW  0x80000048  No    No   Level 3 data cache writes
PAPI_L1_ICH  0x80000049  No    No   Level 1 instruction cache hits
PAPI_L2_ICH  0x8000004a  No    No   Level 2 instruction cache hits
PAPI_L3_ICH  0x8000004b  No    No   Level 3 instruction cache hits
PAPI_L1_ICA  0x8000004c  No    No   Level 1 instruction cache accesses
PAPI_L2_ICA  0x8000004d  No    No   Level 2 instruction cache accesses
PAPI_L3_ICA  0x8000004e  No    No   Level 3 instruction cache accesses
PAPI_L1_ICR  0x8000004f  No    No   Level 1 instruction cache reads
PAPI_L2_ICR  0x80000050  No    No   Level 2 instruction cache reads
PAPI_L3_ICR  0x80000051  No    No   Level 3 instruction cache reads
PAPI_L1_ICW  0x80000052  No    No   Level 1 instruction cache writes
PAPI_L2_ICW  0x80000053  No    No   Level 2 instruction cache writes
PAPI_L3_ICW  0x80000054  No    No   Level 3 instruction cache writes
PAPI_L1_TCH  0x80000055  No    No   Level 1 total cache hits
PAPI_L2_TCH  0x80000056  No    No   Level 2 total cache hits
PAPI_L3_TCH  0x80000057  No    No   Level 3 total cache hits
PAPI_L1_TCA  0x80000058  No    No   Level 1 total cache accesses
PAPI_L2_TCA  0x80000059  No    No   Level 2 total cache accesses
PAPI_L3_TCA  0x8000005a  No    No   Level 3 total cache accesses
PAPI_L1_TCR  0x8000005b  No    No   Level 1 total cache reads
PAPI_L2_TCR  0x8000005c  No    No   Level 2 total cache reads
PAPI_L3_TCR  0x8000005d  No    No   Level 3 total cache reads
PAPI_L1_TCW  0x8000005e  No    No   Level 1 total cache writes
PAPI_L2_TCW  0x8000005f  No    No   Level 2 total cache writes
PAPI_L3_TCW  0x80000060  No    No   Level 3 total cache writes
PAPI_FML_INS 0x80000061  No    No   Floating point multiply instructions
PAPI_FAD_INS 0x80000062  No    No   Floating point add instructions
PAPI_FDV_INS 0x80000063  No    No   Floating point divide instructions
PAPI_FSQ_INS 0x80000064  No    No   Floating point square root instructions
PAPI_FNV_INS 0x80000065  No    No   Floating point inverse instructions
PAPI_FP_OPS  0x80000066  No    No   Floating point operations
PAPI_SP_OPS  0x80000067  No    No   Floating point operations; optimized to count scaled single precision vector operations
PAPI_DP_OPS  0x80000068  No    No   Floating point operations; optimized to count scaled double precision vector operations
PAPI_VEC_SP  0x80000069  No    No   Single precision vector/SIMD instructions
PAPI_VEC_DP  0x8000006a  No    No   Double precision vector/SIMD instructions
PAPI_REF_CYC 0x8000006b  No    No   Reference clock cycles
--------------------------------------------------------------------------------
Of 108 possible events, 0 are available, of which 0 are derived.

No events detected!  Check papi_component_avail to find out why.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages