[PyCUDA] undefined symbol: cuMemAllocPitch_v2

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[PyCUDA] undefined symbol: cuMemAllocPitch_v2

Thomas Wiecki
Hi,

I updated various packages (e.g. ugpraded cuda to 4, most recent
pycuda, ubuntu nvidia-dev drivers) on ubuntu 11.10. Pycuda was working
fine before, but after rebuilding and reinstalling the newest version
I get:

ImportError: /usr/local/lib/python2.7/dist-packages/pycuda-2011.2.2-py2.7-linux-x86_64.egg/pycuda/_driver.so:
undefined symbol: cuMemAllocPitch_v2

When I import pycuda.gpuarray. Any ideas?

Thomas

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda
Reply | Threaded
Open this post in threaded view
|

Re: undefined symbol: cuMemAllocPitch_v2

Andreas Kloeckner
On Tue, 22 May 2012 13:55:36 -0400, Thomas Wiecki <[hidden email]> wrote:

> Hi,
>
> I updated various packages (e.g. ugpraded cuda to 4, most recent
> pycuda, ubuntu nvidia-dev drivers) on ubuntu 11.10. Pycuda was working
> fine before, but after rebuilding and reinstalling the newest version
> I get:
>
> ImportError: /usr/local/lib/python2.7/dist-packages/pycuda-2011.2.2-py2.7-linux-x86_64.egg/pycuda/_driver.so:
> undefined symbol: cuMemAllocPitch_v2
>
> When I import pycuda.gpuarray. Any ideas?
Your CUDA headers don't match your installed libcuda.so. Check the
versions of both.

HTH,
Andreas

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda

attachment0 (195 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: undefined symbol: cuMemAllocPitch_v2

Thomas Wiecki
On Tue, May 22, 2012 at 2:04 PM, Andreas Kloeckner
<[hidden email]> wrote:

> On Tue, 22 May 2012 13:55:36 -0400, Thomas Wiecki <[hidden email]> wrote:
>> Hi,
>>
>> I updated various packages (e.g. ugpraded cuda to 4, most recent
>> pycuda, ubuntu nvidia-dev drivers) on ubuntu 11.10. Pycuda was working
>> fine before, but after rebuilding and reinstalling the newest version
>> I get:
>>
>> ImportError: /usr/local/lib/python2.7/dist-packages/pycuda-2011.2.2-py2.7-linux-x86_64.egg/pycuda/_driver.so:
>> undefined symbol: cuMemAllocPitch_v2
>>
>> When I import pycuda.gpuarray. Any ideas?
>
> Your CUDA headers don't match your installed libcuda.so. Check the
> versions of both.

Thanks, it was indeed caused by old cuda devel files floating around
from a launchpad package I installed earlier. I think I cleaned all of
that up and now only the cudatoolkit (4.1.28) is installed. However,
now I get:

ImportError: /usr/local/lib/python2.7/dist-packages/pycuda-2011.2.2-py2.7-linux-x86_64.egg/pycuda/_driver.so:
undefined symbol: cuTexRefSetAddress2D_v3

/usr/lib/libcuda.so (which _driver.so is linked to) seems to have this
symbol so I'm not sure why it can't be found. Any ideas?

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda
Reply | Threaded
Open this post in threaded view
|

Re: undefined symbol: cuMemAllocPitch_v2

Thomas Wiecki
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?

On Tue, May 22, 2012 at 3:54 PM, Thomas Wiecki <[hidden email]> wrote:

> On Tue, May 22, 2012 at 2:04 PM, Andreas Kloeckner
> <[hidden email]> wrote:
>> On Tue, 22 May 2012 13:55:36 -0400, Thomas Wiecki <[hidden email]> wrote:
>>> Hi,
>>>
>>> I updated various packages (e.g. ugpraded cuda to 4, most recent
>>> pycuda, ubuntu nvidia-dev drivers) on ubuntu 11.10. Pycuda was working
>>> fine before, but after rebuilding and reinstalling the newest version
>>> I get:
>>>
>>> ImportError: /usr/local/lib/python2.7/dist-packages/pycuda-2011.2.2-py2.7-linux-x86_64.egg/pycuda/_driver.so:
>>> undefined symbol: cuMemAllocPitch_v2
>>>
>>> When I import pycuda.gpuarray. Any ideas?
>>
>> Your CUDA headers don't match your installed libcuda.so. Check the
>> versions of both.
>
> Thanks, it was indeed caused by old cuda devel files floating around
> from a launchpad package I installed earlier. I think I cleaned all of
> that up and now only the cudatoolkit (4.1.28) is installed. However,
> now I get:
>
> ImportError: /usr/local/lib/python2.7/dist-packages/pycuda-2011.2.2-py2.7-linux-x86_64.egg/pycuda/_driver.so:
> undefined symbol: cuTexRefSetAddress2D_v3
>
> /usr/lib/libcuda.so (which _driver.so is linked to) seems to have this
> symbol so I'm not sure why it can't be found. Any ideas?

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda
Reply | Threaded
Open this post in threaded view
|

Re: undefined symbol: cuMemAllocPitch_v2

Andreas Kloeckner
On Tue, 22 May 2012 15:56:33 -0400, Thomas Wiecki <[hidden email]> 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

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda

attachment0 (195 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: undefined symbol: cuMemAllocPitch_v2

Thomas Wiecki
On Tue, May 22, 2012 at 4:40 PM, Andreas Kloeckner
<[hidden email]> wrote:
> On Tue, 22 May 2012 15:56:33 -0400, Thomas Wiecki <[hidden email]> 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?

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

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)

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda
Reply | Threaded
Open this post in threaded view
|

Re: undefined symbol: cuMemAllocPitch_v2

Andreas Kloeckner
On Tue, 22 May 2012 18:21:56 -0400, Thomas Wiecki <[hidden email]> wrote:

> On Tue, May 22, 2012 at 4:40 PM, Andreas Kloeckner
> <[hidden email]> wrote:
> > On Tue, 22 May 2012 15:56:33 -0400, Thomas Wiecki <[hidden email]> 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

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda

attachment0 (195 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: undefined symbol: cuMemAllocPitch_v2

Thomas Wiecki
On Tue, May 22, 2012 at 6:31 PM, Andreas Kloeckner
<[hidden email]> wrote:

> On Tue, 22 May 2012 18:21:56 -0400, Thomas Wiecki <[hidden email]> wrote:
>> On Tue, May 22, 2012 at 4:40 PM, Andreas Kloeckner
>> <[hidden email]> wrote:
>> > On Tue, 22 May 2012 15:56:33 -0400, Thomas Wiecki <[hidden email]> 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

Thanks, that clears things up. I fixed it now by reverting to the
packages provided by Aaron Haviland:
https://launchpad.net/~aaron-haviland/+archive/cuda-4.0

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda