Call C and CUDA from Python (Paraview Python)

Dear All,

I have not certain if it is the right topic to post.

I want to call C (with CUDA) from Paraview Python with Ctypes package in Linux.

I tried with the following command without success. Despite if compiles Ok.

nvcc --gpu-architecture=sm_75 --shared -Xcompiler -fPIC -shared testlib.cu -o testlib.so

I used in Python:

       testlib = ctypes.CDLL('.//server//vtkpython//testlib.so')
        testlib.myprint()

If I use only C with:

gcc -shared -Wl,-soname,testlib -o testlib.so -fPIC testlib.c

it works.

I think that the code is Ok.

Any help?

Thanks,

Luís Gonçalves

Inside testlib.cu put:

extern "C" void myprint(void);