Discussion:
[PyCUDA] PyCUDA ImportError
Andreas Kloeckner
2018-05-11 20:01:28 UTC
Permalink
My goal is to speed up my python FEA (finite elements analysis) with my
quadro GPU. I however have issues when I import pycuda.autoinit or
**code
In [6] import pycuda.autoinit
File "<ipython-input-7-78816ba4a0fc>", line 1, in <module>
import pycuda.autoinit
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/pycuda-2017.1-py3.6-linux-x86_64.egg/pycuda/autoinit.py",
line 2, in <module>
import pycuda.driver as cuda
File
"/home/bram/.anaconda3/lib/python3.6/site-packages/pycuda-2017.1-py3.6-linux-x86_64.egg/pycuda/driver.py",
line 5, in <module>
from pycuda._driver import * # noqa
ImportError: libcurand.so.8.0: cannot open shared object file: No such file
or directory
/***code
- HP Zbook Studio G3 (Quadro M1000M) Ubuntu 18.04
- Cuda 9.1 (.run installer)(I added the path variables to ~/.bashrc
- nvidia-driver-390 as driver
pycuda 2017.1 (from anaconda)
I've tried the solutions proposed by people encountering similar issues when
using tensorflow-gpu: It was proposed to make a softlink from
help however.
I've checked the installation of CUDA by running a simple vectorAdd example
in Exlips. That worked without any issues and when profiling it showed that
the gpu was working as expected.
I probably made a mistake somewhere and tell me if you need more information
It appears that your PyCUDA was built against CUDA 8. (it refers to
curand version 8) Since you're using CUDA 9, it cannot find that component.
Either rebuild pycuda yourself, or ask whoever provided your version of
PyCUDA (neither upstream Anaconda nor conda-forge ship it AFAIK) to
supply an updated version built against CUDA 9.

HTH,
Andreas
AJJ Lagerweij
2018-05-11 20:34:13 UTC
Permalink
I've discussed the issue with the Nvidia dev forum. And my setup of
using both cuda 8.0 and 9.1 should work. The path and library paths are
defined correctly and the file in question does exist on its intended
location. (/usr/local/cuda-8.0/lib64).

The problem might be with my python setup. Therefor I'll add some
details about that side for you.
I'm working in my root Anaconda environment on python 3.6. The pycuda
version I have is from the lukepfister stream. I'm using the Spyder and
found the issue when I was running a simple vector multiplication
example. Running the import lines from the console as a test resulted in
the exact error as stated before.

Please ask if you have any specific question about my setup.

Regards

.|
|
MarbHarmsen
2018-05-11 20:47:16 UTC
Permalink
I've found my mistake. My cuda installation was correct. I had forgotten
however to install the python cudatoolkit-8.0 package in anaconda however. I
used:

***@device:~$ conda install cudatoolkit=8.0

and it solved all my problems



--
Sent from: http://pycuda.2962900.n2.nabble.com/
MarbHarmsen
2018-05-11 19:55:41 UTC
Permalink
I've installed Cuda 8.0 next to my 9.1 version on advice from the nvidia
forum. This did not solve my problem however.



--
Sent from: http://pycuda.2962900.n2.nabble.com/

Loading...