On Tue, 22 May 2012 18:21:56 -0400, Thomas Wiecki <thomas_wie...@brown.edu> 
wrote:
> On Tue, May 22, 2012 at 4:40 PM, Andreas Kloeckner
> <li...@informa.tiker.net> wrote:
> > On Tue, 22 May 2012 15:56:33 -0400, Thomas Wiecki <thomas_wie...@brown.edu> 
> > wrote:
> >> Just to make sure: libcuda.so is provided along with the nvidia driver
> >> while the other .so files (e.g. cudart, curand) are provided by
> >> cudatoolkit, correct?
> >
> > Yup.
> >
> > Andreas
> 
> Sorry, I'm genuinely confused :)
> 
> What does the cuda.h correspond to that is packaged with cudatoolkit
> (since cudatoolkit does not contain a libcuda.so)?
> 
> The nvidia driver (and also the linux kernel for that matter) all seem
> to provide a cuda.h. Is the cudatoolkit cuda.h the incorrect one to
> use for pycuda?

The kernel's cuda.h is something entirely different.

The driver did at one point install cuda.h, but it does not do so any
more AFAIK. It does install libcuda.so. Using an older cuda.h with a
newer libcuda.so is fine. Using a newer cuda.h with an older libcuda.so
will not work.

> What is the conceptual difference between libcuda.so and libcudart.so?

cudart is the run-time interface, which is used by 'conventional' CUDA C
code. (cudaMemcpy) PyCUDA uses the driver interface. (cuMemcpy)

> Using libcuda.so of the nvidia driver I get the above error (undefined
> symbol: cuTexRefSetAddress2D_v3).
> 
> _driver.so is linked against the following:
> 
> >>ldd 
> >>/usr/local/lib/python2.7/dist-packages/pycuda-2011.2.2-py2.7-linux-x86_64.egg/pycuda/_driver.so
>         linux-vdso.so.1 =>  (0x00007fffa1160000)
>         libcuda.so.1 => /usr/lib/nvidia-current/libcuda.so.1
> (0x00007f322f248000)
>         libcurand.so.4 => /usr/local/cuda/lib64/libcurand.so.4
> (0x00007f322d084000)
>         libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> (0x00007f322cd7c000)
>         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
> (0x00007f322cb66000)
>         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> (0x00007f322c949000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f322c5a7000)
>         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f322c38f000)
>         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f322c18b000)
>         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f322bf06000)
>         libcudart.so.4 => /usr/local/cuda/lib64/libcudart.so.4
> (0x00007f322bcad000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f322ff95000)
>         librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f322baa4000)

In general, simply install matching versions of the driver and the
toolkit. In particular, use the driver from the CUDA download page, not
the 'regular' non-compute driver.

HTH,
Andreas

Attachment: pgpuiLxi5mxEJ.pgp
Description: PGP signature

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to