Discussion:
[PyCUDA] Problem with PyCUDA on Ubuntu 14.10
Eric Larson
2014-11-01 05:53:21 UTC
Permalink
PyCUDA worked perfectly on Ubuntu 14.04, but after upgrade to 14.10 I get
import pycuda.autoinit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/home/larsoner/.local/lib/python2.7/site-packages/pycuda-2014.1-py2.7-linux-x86_64.egg/pycuda/autoinit.py",
line 4, in <module>
cuda.init()
pycuda._driver.Error: cuInit failed: unknown

This is the same on latest `master` (shown above) and using the version in
the Ubuntu repos. I can manually compile and run at least this example
(devicequery):

http://www.cac.cornell.edu/vw/gpu/example_submit.aspx

and my system is using the proprietary NVIDIA drivers, so CUDA appears to
be configured properly. Has anyone else experienced this? I've reported the
bug here as well:

https://bugs.launchpad.net/ubuntu/+source/pycuda/+bug/1388217

Cheers,
Eric
Andreas Kloeckner
2014-11-01 06:40:53 UTC
Permalink
Post by Eric Larson
PyCUDA worked perfectly on Ubuntu 14.04, but after upgrade to 14.10 I get
import pycuda.autoinit
File "<stdin>", line 1, in <module>
File
"/home/larsoner/.local/lib/python2.7/site-packages/pycuda-2014.1-py2.7-linux-x86_64.egg/pycuda/autoinit.py",
line 4, in <module>
cuda.init()
pycuda._driver.Error: cuInit failed: unknown
This is the same on latest `master` (shown above) and using the version in
the Ubuntu repos. I can manually compile and run at least this example
http://www.cac.cornell.edu/vw/gpu/example_submit.aspx
and my system is using the proprietary NVIDIA drivers, so CUDA appears to
be configured properly. Has anyone else experienced this? I've reported the
https://bugs.launchpad.net/ubuntu/+source/pycuda/+bug/1388217
Check if 'dmesg' reveals anything. You might have a mismatch between
libcuda.so and you driver. (If so, good job, Ubuntu.)

Andreas
Eric Larson
2014-11-02 00:01:11 UTC
Permalink
Before I left work on Friday I checked to ensure that the packages in
Synaptic were all NVIDIA version 331 (I think). Even if the numbers are
right in Synaptic, I suppose there could still be a version mismatch
somewhere, so I'll check "dmesg" specifically on Monday.

FWIW I am pretty sure that the CUDA version jumped up from 5.5 (or 5.0?) in
14.04 up to CUDA 6.0 in 14.10. But I assume that PyCUDA is designed (and
tested) to be forward-compatible, so I doubt that's the problem.

Eric
Post by Eric Larson
Post by Eric Larson
PyCUDA worked perfectly on Ubuntu 14.04, but after upgrade to 14.10 I get
import pycuda.autoinit
File "<stdin>", line 1, in <module>
File
"/home/larsoner/.local/lib/python2.7/site-packages/pycuda-2014.1-py2.7-linux-x86_64.egg/pycuda/autoinit.py",
Post by Eric Larson
line 4, in <module>
cuda.init()
pycuda._driver.Error: cuInit failed: unknown
This is the same on latest `master` (shown above) and using the version
in
Post by Eric Larson
the Ubuntu repos. I can manually compile and run at least this example
http://www.cac.cornell.edu/vw/gpu/example_submit.aspx
and my system is using the proprietary NVIDIA drivers, so CUDA appears to
be configured properly. Has anyone else experienced this? I've reported
the
Post by Eric Larson
https://bugs.launchpad.net/ubuntu/+source/pycuda/+bug/1388217
Check if 'dmesg' reveals anything. You might have a mismatch between
libcuda.so and you driver. (If so, good job, Ubuntu.)
Andreas
Tomasz Rybak
2014-11-02 09:46:55 UTC
Permalink
Post by Eric Larson
Before I left work on Friday I checked to ensure that the packages in
Synaptic were all NVIDIA version 331 (I think). Even if the numbers
are right in Synaptic, I suppose there could still be a version
mismatch somewhere, so I'll check "dmesg" specifically on Monday.
FWIW I am pretty sure that the CUDA version jumped up from 5.5 (or
5.0?) in 14.04 up to CUDA 6.0 in 14.10. But I assume that PyCUDA is
designed (and tested) to be forward-compatible, so I doubt that's the
problem.
It depends on how Ubuntu builds PyCUDA.
Check pycuda package dependencies:
$ apt-cache show python-pycuda
whether there is any dependency on package
with 5.5 in its name, or only 6.0 packages.

Regards
--
Tomasz Rybak GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860
http://member.acm.org/~tomaszrybak
Eric Larson
2014-11-03 16:39:54 UTC
Permalink
Looks like it is a Ubuntu packaging problem. PyCUDA again worked once I did
`sudo apt-get install nvidia-modprobe` as suggested here:

https://bugs.launchpad.net/ubuntu/+source/pycuda/+bug/1388217

Thanks for your help Tomasz and Andreas, I'll try those debugging lines
first if anything else comes up.

Cheers,
Eric
Post by Tomasz Rybak
Post by Eric Larson
Before I left work on Friday I checked to ensure that the packages in
Synaptic were all NVIDIA version 331 (I think). Even if the numbers
are right in Synaptic, I suppose there could still be a version
mismatch somewhere, so I'll check "dmesg" specifically on Monday.
FWIW I am pretty sure that the CUDA version jumped up from 5.5 (or
5.0?) in 14.04 up to CUDA 6.0 in 14.10. But I assume that PyCUDA is
designed (and tested) to be forward-compatible, so I doubt that's the
problem.
It depends on how Ubuntu builds PyCUDA.
$ apt-cache show python-pycuda
whether there is any dependency on package
with 5.5 in its name, or only 6.0 packages.
Regards
--
Tomasz Rybak GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860
http://member.acm.org/~tomaszrybak
Loading...