can not compile with nvidia cuda support

Issue #91 resolved
guen gn created an issue

The error says cupti.h is missing. Assuming it is part of cupti but nvidia web site says it is packaged with cuda toolkit which I already installed:

https://developer.nvidia.com/cupti-ctk10_1u1

root@nonroot-MS-7B22:~/papi/src# dpkg -l | grep cuda | grep -i toolkit
ii cuda-toolkit-11-2 11.2.2-1 amd64 CUDA Toolkit 11.2 meta-package
ii nvidia-cuda-toolkit 9.1.85-3ubuntu1 amd64 NVIDIA CUDA development toolkit

make…

sh papi_events_table.sh papi_events.csv > papi_events_table.h
gcc -E -DFORTRANUNDERSCORE papi_fwrappers.c > papi_fwrappers_.c
gcc -E -DFORTRANDOUBLEUNDERSCORE papi_fwrappers.c > papi_fwrappers__.c
gcc -E -DFORTRANCAPS papi_fwrappers.c > upper_PAPI_FWRAPPERS.c
rm -f libpapi.so.6.0.0.1 libpapi.so libpapi.so.6.0
gcc -fPIC -DPIC -shared -Wl,-soname -Wl,libpapi.so.6.0 -Xlinker "-rpath" -Xlinker "/usr/local/lib" -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. -g -Wextra -Wall -DCUPTI_PROFILER=-1 -I/opt/cuda/include -I/opt/cuda/extras/CUPTI/include -g -DPAPI_CUDA_MAIN="" -DPAPI_CUDA_RUNTIME="" -DPAPI_CUDA_CUPTI="" -DPAPI_CUDA_PERFWORKS="" -DOSLOCK="linux-lock.h" -DOSCONTEXT="linux-context.h" -O2 x86_cpuid_info.c papi_libpfm4_events.c papi.c papi_internal.c high-level/papi_hl.c extras.c sw_multiplex.c papi_fwrappers.c papi_fwrappers_.c papi_fwrappers__.c upper_PAPI_FWRAPPERS.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 -o libpapi.so.6.0.0.1 -Bdynamic -Llibpfm4/lib -lpfm -ldl -g
components/cuda/linux-cuda.c:33:10: fatal error: cupti.h: No such file or directory
#include <cupti.h>
^~~~~
compilation terminated.
Makefile.inc:67: recipe for target 'libpapi.so.6.0.0.1' failed
make[1]: *** [libpapi.so.6.0.0.1] Error 1
make[1]: Leaving directory '/root/papi/src'
Rules.pfm4_pe:42: recipe for target 'libpfm4/lib/libpfm.a' failed
make: *** [libpfm4/lib/libpfm.a] Error 2
root@nonroot-MS-7B22:~/papi/src#
root@nonroot-MS-7B22:~/papi/src#
root@nonroot-MS-7B22:~/papi/src# find /usr/ -name cupti.h
/usr/local/cuda-11.2/targets/x86_64-linux/include/cupti.h

Comments (3)

  1. Giuseppe Congiu

    This looks like an issue with your environment. Please make sure cupti.h is reachable by setting C_INCLUDE_PATH appropriately. I am closing this issue for now as it does not look like PAPI related.

  2. Log in to comment