pycuda.autoinit fails after upgrade to 14.10
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| pycuda (Ubuntu) |
Undecided
|
Unassigned | |||
| pyopencl (Ubuntu) |
Undecided
|
Unassigned | |||
Bug Description
From a Python terminal (python2 or python3):
>>> import pycuda.autoinit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
cuda.init()
pycuda.
This worked in Ubuntu 14.04, fails in Ubuntu 14.10.
I can manually compile and run at least this example (devicequery):
http://
and my system is using the proprietary NVIDIA drivers, so CUDA appears to be configured properly on my system.
ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: python-pycuda 2014.1-2
ProcVersionSign
Uname: Linux 3.16.0-24-generic x86_64
NonfreeKernelMo
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Oct 31 11:47:39 2014
InstallationDate: Installed on 2011-03-04 (1337 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110301.7)
SourcePackage: pycuda
UpgradeStatus: No upgrade log present (probably fresh install)
Oh wow. I meant 14.10, not 12.10. Sorry :)
| summary: |
- pycuda.autoinit fails after upgrade to 12.10 + pycuda.autoinit fails after upgrade to 14.10 |
| description: | updated |
| Graham Inggs (ginggs) wrote : | #4 |
Please try:
sudo apt-get install nvidia-modprobe
| larson.eric.d@gmail.com (larson-eric-d) wrote : Re: [Bug 1388217] Re: pycuda.autoinit fails after upgrade to 14.10 | #5 |
Will do when I get back to my computer on Monday, and I'll report back.
If you have time to fill me in a bit before then -- do you suspect that the
nvidia module isn't being loaded into the kernel? It seems like it is
because it's listed in lsmod (and performance indicates it, too), but I'm
not sure what that package is designed to do. I've never noticed it before.
Curious what the debugging motivation is...
| Graham Inggs (ginggs) wrote : | #6 |
I suspect the nvidia-uvm module isn't loaded. You can load it manually with 'sudo modprobe nvidia-uvm' before running python. The nvidia-modprobe package loads the necessary modules as needed, see LP: #1361207 .
Doing:
sudo apt-get install nvidia-modprobe
Did indeed work! Awesome. So I guess this is a packaging / requirements error, then?
Answered my own question (it is a requirements problem) by looking at the linked issue. Feel free to close this as a duplicate.
| Graham Inggs (ginggs) wrote : | #9 |
Thanks for the feedback!


I also git cloned the latest version of pycuda from the homepage, ran "python configure.py" and "python setup.py install --user", and have the same behavior.