Comments (5)
You are right, the problem was not only the version change but that we were also missing the declaration for cudaLaunch_v3020_params_st
. We'll add your patch to the commit with the new solution. Thanks!
from extrae.
Hi, thanks for reporting.
It's a known issue. As you say they are deprecated and were removed in CUDA 10.2, they are still available in CUDA 10 and CUDA 10.1. All of those use the same CUPTI version (12) and despite Extrae already checks the CUPTI version to define these structures or not, the fact that CUDA uses the same version number for different implementations, makes the check fail.
We are looking for a more robust solution to this problem. In the meantime you could try modifying src/tracer/wrappers/CUDA/cuda_wrapper_cupti.h and change the CUPTI_API_VERSION check to 11.
from extrae.
Changing the check (or even removing the check) still gives the same error.
As far as I see, no file includes cuda_wrapper_cupti.h
so the types are not defined. The file is included in the resulting Makefile but I think is not automatically included.
sandbox:${WORKSPACE}/srcdir/extrae-4.0.3 # grep -R cuda_wrapper_cupti.h src/tracer/wrappers/CUDA/
src/tracer/wrappers/CUDA/Makefile:am__append_1 = cuda_wrapper_cupti.c cuda_wrapper_cupti.h
src/tracer/wrappers/CUDA/Makefile: cuda_wrapper_cupti.h cuda_wrapper.c cuda_wrapper.h
src/tracer/wrappers/CUDA/Makefile.am:WRAPPERS_CUDA += cuda_wrapper_cupti.c cuda_wrapper_cupti.h
src/tracer/wrappers/CUDA/Makefile.in:@HAVE_CUDA_TRUE@@HAVE_CUPTI_TRUE@am__append_1 = cuda_wrapper_cupti.c cuda_wrapper_cupti.h
src/tracer/wrappers/CUDA/Makefile.in: cuda_wrapper_cupti.h cuda_wrapper.c cuda_wrapper.h
from extrae.
Update: If I add...
#include "cuda_wrapper_cupti.h"
...to the src/tracer/wrappers/CUDA/cuda_wrapper_cupti.c file, it almost compiles even with the unchanged CUPTI API check. Now the error is
/bin/sh ../../../../libtool --tag=CC --mode=compile cc -std=gnu11 -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/common/MPI -I../../../../src/tracer -I../../../../src/tracer/hwc -I../../../../src/tracer/clocks -I../../../../src/tracer/interfaces/API -I../../../../src/tracer/wrappers/API -I../../../.. -I../../../../include -I../../../../src/common -I/workspace/destdir/include -I/workspace/destdir/cuda/include -I/workspace/destdir/cuda/extras/CUPTI/include -g -O2 -fno-optimize-sibling-calls -Wall -W -c -o libwrap_cuda_la-cuda_wrapper_cupti.lo `test -f 'cuda_wrapper_cupti.c' || echo './'`cuda_wrapper_cupti.c
libtool: compile: cc -std=gnu11 -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/common/MPI -I../../../../src/tracer -I../../../../src/tracer/hwc -I../../../../src/tracer/clocks -I../../../../src/tracer/interfaces/API -I../../../../src/tracer/wrappers/API -I../../../.. -I../../../../include -I../../../../src/common -I/workspace/destdir/include -I/workspace/destdir/cuda/include -I/workspace/destdir/cuda/extras/CUPTI/include -g -O2 -fno-optimize-sibling-calls -Wall -W -c cuda_wrapper_cupti.c -fPIC -DPIC -o .libs/libwrap_cuda_la-cuda_wrapper_cupti.o
cuda_wrapper_cupti.c: In function ‘Extrae_DriverAPI_callback’:
cuda_wrapper_cupti.c:147:5: warning: passing argument 1 of ‘Extrae_cudaLaunch_Enter’ from incompatible pointer type [enabled by default]
Extrae_cudaLaunch_Enter(p->f, p->hStream);
^
In file included from cuda_wrapper_cupti.c:44:0:
cuda_common.h:179:6: note: expected ‘const char *’ but argument is of type ‘CUfunction’
void Extrae_cudaLaunch_Enter (const char*, cudaStream_t);
^
cuda_wrapper_cupti.c: In function ‘Extrae_RuntimeAPI_callback’:
cuda_wrapper_cupti.c:185:4: error: unknown type name ‘cudaLaunch_v3020_params’
cudaLaunch_v3020_params *p =
^
cuda_wrapper_cupti.c:186:7: error: ‘cudaLaunch_v3020_params’ undeclared (first use in this function)
(cudaLaunch_v3020_params*)cbinfo->functionParams;
^
cuda_wrapper_cupti.c:186:7: note: each undeclared identifier is reported only once for each function it appears in
cuda_wrapper_cupti.c:186:31: error: expected expression before ‘)’ token
(cudaLaunch_v3020_params*)cbinfo->functionParams;
^
cuda_wrapper_cupti.c:190:30: error: request for member ‘func’ in something not a structure or union
Extrae_cudaLaunch_Enter(p->func, NULL);
^
cuda_wrapper_cupti.c:299:6: warning: initialization from incompatible pointer type [enabled by default]
(cudaMallocArray_v3020_params *)cbinfo->functionParams;
^
make[5]: *** [Makefile:851: libwrap_cuda_la-cuda_wrapper_cupti.lo] Error 1
I solve this by adding the following code in cuda_wrapper_cupti.h
:
typedef struct cudaLaunch_v3020_params_st {
const char *func;
} cudaLaunch_v3020_params;
And now it compiles.
0004-cuda-cupti-undefined-structs-since-v12.patch
from extrae.
You're welcome! Just pointing a couple of things:
- I kind of interpolated the definition of
cudaLaunch_v3020_params_st
between your old commented definition and the error messages. I don't know the real definition ofcudaLaunch_v3020_params_st
. - CUDA v10.2 still fails. I guess that because of the
CUPTI_API_VERSION
check.
from extrae.
Related Issues (20)
- TLS free() interception causes a segfault with extrae 4.0.0 HOT 1
- other bashisms in configure
- undefined reference to symbol 'pfm_get_pmu_info' HOT 1
- mpi2prv: merging ends with segmentation fault HOT 2
- Intercepting MPI calls made in external library HOT 3
- Getting unknown type name error while running make during installation HOT 3
- avoid `AC_TRY_RUN` in autoconf scriptage to allow cross-compiling HOT 1
- Extrae build fails with binutils-2.39 HOT 1
- Identifying subroutines with too many arguments for Extrae HOT 9
- posix_memalign wrapper calls incorrect exit function
- Deadlock in random() function
- Suspicious address range condition in ObjectTable_GetBinaryObjectAt
- Extrae is not instrumenting MPI exclusive scans
- Attempting to use an MPI routine after finalizing MPICH (ParaStationMPI) HOT 1
- configure: error: Cannot find MPI libraries file in the MPI specified path HOT 8
- Issues building extrae 4.0.4 with Intel OneAPI compiler HOT 1
- Loading of user-defined events segfaults if labels are too large
- facing issue with compilation of extrae-4.0.4 HOT 2
- Callstack frame offset computation is missing the base offset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extrae.