make command throwing error while PAPI installation

65 views
Skip to first unread message

Danny Pereira

unread,
Dec 5, 2023, 2:01:32 PM12/5/23
to ptools-perfapi
Hello,
I am trying to install PAPI 7.0.1 on my jetson Xavier board
Ubuntu 18.0 Kernel 4.9.253  aarch64 
cuda-10.2 installed at /usr/local/cuda-10.2/ 


I am following following steps to install PAPI

1. git clone https://github.com/icl-utk-edu/papi.git
2. cd papi/src
#run configuration script
3. sudo ./configure --prefix=$PWD/install --with-components=cuda --with-debug=yes
checking for architecture... aarch64
checking for OS... linux
checking for OS version... 4.9.253-BWv1.0-BWv1.0
checking for perf_event workaround level... autodetect
checking for if MIC should be used... no
checking for if NEC 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 tests... ctests ftests
checking for debug build... yes
checking for -Wno-override-init... 1
checking for CPU type... arm
forcing use of pthread mutexes...
checking for ffsll... yes
checking for working 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 building libsde... shared and static
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 cuda sysdetect
checking for PAPI event CSV filename to use... papi_events.csv
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

4. make

Host architecture   : Linux with perf_event kernel support and libpfm4
Host CPU component  : perf_event
Installation DESTDIR:
Installation PREFIX : /home/hprc-jetson-nx/project/papi/src/install
Installation EPREFIX: /home/hprc-jetson-nx/project/papi/src/install
Installation INCDIR : /home/hprc-jetson-nx/project/papi/src/install/include
Installation LIBDIR : /home/hprc-jetson-nx/project/papi/src/install/lib
Installation BINDIR : /home/hprc-jetson-nx/project/papi/src/install/bin
Installation MANDIR : /home/hprc-jetson-nx/project/papi/src/install/share/man
Installation DOCDIR : /home/hprc-jetson-nx/project/papi/src/install/share/doc/papi
Installation DATADIR: /home/hprc-jetson-nx/project/papi/src/install/share/papi

sh papi_events_table.sh papi_events.csv > papi_events_table.h
rm -f libpapi.so.7.0.1.0 libpapi.so libpapi.so.7.0
gcc -fPIC -DPIC -shared -Wl,-soname -Wl,libpapi.so.7.0 -Xlinker "-rpath" -Xlinker "/home/hprc-jetson-nx/project/papi/src/install/lib" -DDEBUG -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE  -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g3 -DUSE_PTHREAD_MUTEXES  -DHAVE_CUDA -DHAVE_NVML -DPAPI_NUM_COMP=4 -I/usr/local/cuda-10.2//include -I/usr/local/cuda-10.2//extras/CUPTI/include -g -DPAPI_CUDA_MAIN= -DPAPI_CUDA_RUNTIME= -DPAPI_CUDA_CUPTI= -DPAPI_CUDA_PERFWORKS= -I/usr/local/cuda-10.2//include -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O0  papi_libpfm4_events.c papi.c papi_internal.c high-level/papi_hl.c extras.c sw_multiplex.c  threads.c cpus.c linux-memory.c linux-timer.c linux-common.c  papi_preset.c papi_vector.c papi_memory.c components/perf_event/perf_event.c components/perf_event/pe_libpfm4_events.c components/perf_event_uncore/perf_event_uncore.c components/cuda/linux-cuda.c components/cuda/cupti_dispatch.c components/cuda/cupti_utils.c components/cuda/cupti_common.c components/cuda/cupti_profiler.c components/cuda/cupti_events.c  components/sysdetect/sysdetect.c components/sysdetect/nvidia_gpu.c components/sysdetect/amd_gpu.c components/sysdetect/cpu.c components/sysdetect/cpu_utils.c components/sysdetect/os_cpu_utils.c components/sysdetect/linux_cpu_utils.c components/sysdetect/arm_cpu_utils.c  -o libpapi.so.7.0.1.0 -Bdynamic -Llibpfm4/lib -lpfm  -ldl
components/cuda/linux-cuda.c: In function ‘cuda_init_private’:
components/cuda/linux-cuda.c:158:9: warning: format not a string literal and no format arguments [-Wformat-security]
         sprintf(_cuda_vector.cmp_info.disabled_reason, disabled_reason);
         ^~~~~~~
components/cuda/cupti_profiler.c:91:67: error: unknown type name ‘NVPW_RawMetricsConfig_SetCounterAvailability_Params’; did you mean ‘NVPW_RawMetricsConfig_GetConfigImage_Params’?
 NVPA_Status ( *NVPW_RawMetricsConfig_SetCounterAvailabilityPtr ) (NVPW_RawMetricsConfig_SetCounterAvailability_Params* params);
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                   NVPW_RawMetricsConfig_GetConfigImage_Params
components/cuda/cupti_profiler.c:115:58: error: unknown type name ‘CUpti_Profiler_GetCounterAvailability_Params’; did you mean ‘CUpti_Profiler_FlushCounterData_Params’?
 CUptiResult ( *cuptiProfilerGetCounterAvailabilityPtr ) (CUpti_Profiler_GetCounterAvailability_Params* params);
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                          CUpti_Profiler_FlushCounterData_Params
components/cuda/cupti_profiler.c: In function ‘load_cupti_perf_sym’:
components/cuda/cupti_profiler.c:156:5: error: ‘cuptiProfilerGetCounterAvailabilityPtr’ undeclared (first use in this function); did you mean ‘cuptiProfilerFlushCounterDataPtr’?
     cuptiProfilerGetCounterAvailabilityPtr = DLSYM_AND_CHECK(dl_cupti, "cuptiProfilerGetCounterAvailability");
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     cuptiProfilerFlushCounterDataPtr
components/cuda/cupti_profiler.c:156:5: note: each undeclared identifier is reported only once for each function it appears in
components/cuda/cupti_profiler.c: In function ‘unload_cupti_perf_sym’:
components/cuda/cupti_profiler.c:190:5: error: ‘cuptiProfilerGetCounterAvailabilityPtr’ undeclared (first use in this function); did you mean ‘cuptiProfilerFlushCounterDataPtr’?
     cuptiProfilerGetCounterAvailabilityPtr                     = NULL;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     cuptiProfilerFlushCounterDataPtr
components/cuda/cupti_profiler.c: In function ‘load_nvpw_sym’:
components/cuda/cupti_profiler.c:254:5: error: ‘NVPW_RawMetricsConfig_SetCounterAvailabilityPtr’ undeclared (first use in this function); did you mean ‘NVPW_RawMetricsConfig_GetConfigImagePtr’?
     NVPW_RawMetricsConfig_SetCounterAvailabilityPtr = DLSYM_AND_CHECK(dl_nvpw, "NVPW_RawMetricsConfig_SetCounterAvailability");
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     NVPW_RawMetricsConfig_GetConfigImagePtr
components/cuda/cupti_profiler.c: In function ‘unload_nvpw_sym’:
components/cuda/cupti_profiler.c:297:5: error: ‘NVPW_RawMetricsConfig_SetCounterAvailabilityPtr’ undeclared (first use in this function); did you mean ‘NVPW_RawMetricsConfig_GetConfigImagePtr’?
     NVPW_RawMetricsConfig_SetCounterAvailabilityPtr   = NULL;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     NVPW_RawMetricsConfig_GetConfigImagePtr
components/cuda/cupti_profiler.c: In function ‘get_counter_availability’:
components/cuda/cupti_profiler.c:715:5: error: unknown type name ‘CUpti_Profiler_GetCounterAvailability_Params’; did you mean ‘CUpti_Profiler_FlushCounterData_Params’?
     CUpti_Profiler_GetCounterAvailability_Params getCounterAvailabilityParams = {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     CUpti_Profiler_FlushCounterData_Params
components/cuda/cupti_profiler.c:716:9: error: field name not in record or union initializer
         .structSize = CUpti_Profiler_GetCounterAvailability_Params_STRUCT_SIZE,
         ^
components/cuda/cupti_profiler.c:716:9: note: (near initialization for ‘getCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:716:23: error: ‘CUpti_Profiler_GetCounterAvailability_Params_STRUCT_SIZE’ undeclared (first use in this function); did you mean ‘CUpti_Profiler_FlushCounterData_Params_STRUCT_SIZE’?
         .structSize = CUpti_Profiler_GetCounterAvailability_Params_STRUCT_SIZE,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       CUpti_Profiler_FlushCounterData_Params_STRUCT_SIZE
components/cuda/cupti_profiler.c:717:9: error: field name not in record or union initializer
         .pPriv = NULL,
         ^
components/cuda/cupti_profiler.c:717:9: note: (near initialization for ‘getCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:717:18: warning: excess elements in scalar initializer
         .pPriv = NULL,
                  ^~~~
components/cuda/cupti_profiler.c:717:18: note: (near initialization for ‘getCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:718:9: error: field name not in record or union initializer
         .ctx = NULL,
         ^
components/cuda/cupti_profiler.c:718:9: note: (near initialization for ‘getCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:718:16: warning: excess elements in scalar initializer
         .ctx = NULL,
                ^~~~
components/cuda/cupti_profiler.c:718:16: note: (near initialization for ‘getCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:719:9: error: field name not in record or union initializer
         .pCounterAvailabilityImage = NULL,
         ^
components/cuda/cupti_profiler.c:719:9: note: (near initialization for ‘getCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:719:38: warning: excess elements in scalar initializer
         .pCounterAvailabilityImage = NULL,
                                      ^~~~
components/cuda/cupti_profiler.c:719:38: note: (near initialization for ‘getCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:721:18: warning: implicit declaration of function ‘cuptiProfilerGetCounterAvailabilityPtr’; did you mean ‘cuptiProfilerFlushCounterDataPtr’? [-Wimplicit-function-declaration]
     papi_errno = cuptiProfilerGetCounterAvailabilityPtr(&getCounterAvailabilityParams);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  cuptiProfilerFlushCounterDataPtr
components/cuda/cupti_profiler.c:727:74: error: request for member ‘counterAvailabilityImageSize’ in something not a structure or union
     gpu_ctl->counterAvailabilityImage.size = getCounterAvailabilityParams.counterAvailabilityImageSize;
                                                                          ^
components/cuda/cupti_profiler.c:733:33: error: request for member ‘pCounterAvailabilityImage’ in something not a structure or union
     getCounterAvailabilityParams.pCounterAvailabilityImage = gpu_ctl->counterAvailabilityImage.data;
                                 ^
components/cuda/cupti_profiler.c: In function ‘metric_get_config_image’:
components/cuda/cupti_profiler.c:754:9: error: unknown type name ‘NVPW_RawMetricsConfig_SetCounterAvailability_Params’; did you mean ‘NVPW_RawMetricsConfig_GetConfigImage_Params’?
         NVPW_RawMetricsConfig_SetCounterAvailability_Params setCounterAvailabilityParams = {
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         NVPW_RawMetricsConfig_GetConfigImage_Params
components/cuda/cupti_profiler.c:755:13: error: field name not in record or union initializer
             .structSize = NVPW_RawMetricsConfig_SetCounterAvailability_Params_STRUCT_SIZE,
             ^
components/cuda/cupti_profiler.c:755:13: note: (near initialization for ‘setCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:755:27: error: ‘NVPW_RawMetricsConfig_SetCounterAvailability_Params_STRUCT_SIZE’ undeclared (first use in this function); did you mean ‘NVPW_RawMetricsConfig_GetConfigImage_Params_STRUCT_SIZE’?
             .structSize = NVPW_RawMetricsConfig_SetCounterAvailability_Params_STRUCT_SIZE,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           NVPW_RawMetricsConfig_GetConfigImage_Params_STRUCT_SIZE
components/cuda/cupti_profiler.c:756:13: error: field name not in record or union initializer
             .pPriv = NULL,
             ^
components/cuda/cupti_profiler.c:756:13: note: (near initialization for ‘setCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:756:22: warning: excess elements in scalar initializer
             .pPriv = NULL,
                      ^~~~
components/cuda/cupti_profiler.c:756:22: note: (near initialization for ‘setCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:757:13: error: field name not in record or union initializer
             .pRawMetricsConfig = nvpw_metricsConfigCreateParams.pRawMetricsConfig,
             ^
components/cuda/cupti_profiler.c:757:13: note: (near initialization for ‘setCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:757:34: warning: excess elements in scalar initializer
             .pRawMetricsConfig = nvpw_metricsConfigCreateParams.pRawMetricsConfig,
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/cuda/cupti_profiler.c:757:34: note: (near initialization for ‘setCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:758:13: error: field name not in record or union initializer
             .pCounterAvailabilityImage = gpu_ctl->counterAvailabilityImage.data,
             ^
components/cuda/cupti_profiler.c:758:13: note: (near initialization for ‘setCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:758:42: warning: excess elements in scalar initializer
             .pCounterAvailabilityImage = gpu_ctl->counterAvailabilityImage.data,
                                          ^~~~~~~
components/cuda/cupti_profiler.c:758:42: note: (near initialization for ‘setCounterAvailabilityParams’)
components/cuda/cupti_profiler.c:760:20: warning: implicit declaration of function ‘NVPW_RawMetricsConfig_SetCounterAvailabilityPtr’; did you mean ‘NVPW_RawMetricsConfig_GetConfigImagePtr’? [-Wimplicit-function-declaration]
         NVPW_CALL( NVPW_RawMetricsConfig_SetCounterAvailabilityPtr(&setCounterAvailabilityParams), goto fn_fail );
                    ^
components/cuda/cupti_profiler.c:120:32: note: in definition of macro ‘NVPW_CALL’
         NVPA_Status _status = (call);  \
                                ^~~~
make: *** [Makefile.inc:68: libpapi.so.7.0.1.0] Error 1


Help in resloving these issue is highly appreciated..

Thank  you
Danny

Giuseppe Congiu

unread,
Dec 5, 2023, 2:08:28 PM12/5/23
to ptools-perfapi, dannyjp...@gmail.com
Can you try exporting PAPI_CUDA_ROOT to the cuda toolkit installation directory and avoid using sudo in configure?

Danny Pereira

unread,
Dec 6, 2023, 1:06:33 AM12/6/23
to Giuseppe Congiu, ptools-perfapi
Dear sir,

I tried installing papi-6.0.0 and it got installed smoothly without any problem.
But now I am facing a new issue.
When I execute ./papi_avail, it list out 108 events but at the end it says

" Of 108 possible events, 0 are available, of which 0 are derived.
No events detected! Check papi_component_avail to find out why."

The output of ./papi_component_avail is as follows:

Available components and hardware information.
--------------------------------------------------------------------------------
PAPI version : 6.0.0.0
Operating system : Linux 4.9.253.0
Vendor string and code : ARM (7, 0x7)
Model string and code : ARMv8 Processor rev 0 (v8l) (0, 0x0)
CPU revision : 0.000000
CPUID : Family/Model/Stepping 8/4/0, 0x08/0x04/0x00
CPU Max MHz : 1907
CPU Min MHz : 115
Total cores : 6
SMT threads per core : 1
Cores per socket : 2
Sockets : 3
Cores per NUMA region : 6
NUMA regions : 0
Running in a VM : no
Number Hardware Counters : 0
Max Multiplex Counters : 384
Fast counter read (rdpmc): no
--------------------------------------------------------------------------------

Compiled-in components:
Name: perf_event Linux perf_event CPU counters
\-> Disabled: Unknown libpfm4 related error
Name: perf_event_uncore Linux perf_event CPU uncore and northbridge
\-> Disabled: No uncore PMUs or events found
Name: cuda CUDA events and metrics via NVIDIA
CuPTI interfaces

Active components:
Name: cuda CUDA events and metrics via NVIDIA
CuPTI interfaces
Native: 207, Preset: 0, Counters: 207

How do you enable CPU and GPU events in this scenario?
Help in this regard is highly appreciated..

Thank you

Giuseppe Congiu

unread,
Dec 6, 2023, 4:49:09 AM12/6/23
to Danny Pereira, ptools-perfapi
Unfortunately, I don't think your ARM CPU events are supported at this moment. However, Volta GPUs are definitely supported. It's hard for me to understand what is wrong with 7.0.1 in your setup as I don't have a similar hardware configuration at hand. I do have a node with V100 and I can build the latest PAPI master using cuda/10.2.89. Please try to use the latest PAPI from github for your experiments.
Reply all
Reply to author
Forward
0 new messages