错误(theano.sandbox.cuda):无法编译cuda_ndarray.cu:libcublas.so.9.0:无法打开共享库文件:没有这样的文件或目录

时间:2019-07-08 14:32:17

标签: python cuda gpu theano theano-cuda

我试图使用theano使github repo正常工作,我不得不为其建立一个新的conda环境。我似乎无法让cuda与theano一起工作。

因此,为了使cuda与theano 0.8.2配合使用,我遵循了此tuto:http://deeplearning.net/software/theano_versions/0.8.X/tutorial/using_gpu.html,但是在测试时

 THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python check1.py

出现以下消息:

ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: libcublas.so.9.0: cannot open shared object file: No such file or directory
WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available  (error: cuda unavailable)

即使nvidia-smi似乎可以找到我的GPU,也可以:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.67       Driver Version: 418.67       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 960M    On   | 00000000:01:00.0 Off |                  N/A |
| N/A   41C    P8    N/A /  N/A |      0MiB /  2004MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

我已按照此处的说明进行操作,但没有解决方案:Failed to compile cuda_ndarray.cu: libcublas.so.7.5: cannot open shared object file

运行此:

python -c "import os; print(os.environ['PATH'])"

返回此:

/usr/local/cuda-10.1/bin:/usr/local/cuda/bin:/home/vincent/torch/install/bin:/home/vincent/anaconda3/envs/jessaie/bin:/home/vincent/anaconda3/condabin:/home/vincent/torch/install/bin:/home/vincent/.local/bin:/usr/local/cuda-10.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda-10.1/bin

这可能是PATH的问题,但我真的不清楚问题到底是什么。请记住,我正在使用conda环境(以便能够降级theano和numpy,因为有必要使用github repo https://github.com/soroushmehr/sampleRNN_ICLR2017)。我整天都在忙着,请帮帮我!

0 个答案:

没有答案