Giter VIP home page Giter VIP logo

Comments (5)

emercadal avatar emercadal commented on August 11, 2024 1

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.

emercadal avatar emercadal commented on August 11, 2024

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.

mofeing avatar mofeing commented on August 11, 2024

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.

mofeing avatar mofeing commented on August 11, 2024

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 functionExtrae_DriverAPI_callback’:
cuda_wrapper_cupti.c:147:5: warning: passing argument 1 ofExtrae_cudaLaunch_Enterfrom 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: expectedconst char *but argument is of typeCUfunctionvoid Extrae_cudaLaunch_Enter (const char*, cudaStream_t);
      ^
cuda_wrapper_cupti.c: In functionExtrae_RuntimeAPI_callback’:
cuda_wrapper_cupti.c:185:4: error: unknown type namecudaLaunch_v3020_paramscudaLaunch_v3020_params *p =
    ^
cuda_wrapper_cupti.c:186:7: error: ‘cudaLaunch_v3020_paramsundeclared (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 memberfuncin 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.

mofeing avatar mofeing commented on August 11, 2024

You're welcome! Just pointing a couple of things:

  1. 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 of cudaLaunch_v3020_params_st.
  2. CUDA v10.2 still fails. I guess that because of the CUPTI_API_VERSION check.

from extrae.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.