PyCuda libcurand 导入问题

PyCuda libcurand 导入问题

有很多问题与我的问题类似,但这些问题的解决方案对我来说都不起作用。我猜测是因为之前安装了 cuda-5.5,所以某些东西仍然设置为该版本,但不知道具体是什么。

下面:符号链接后的更新。

基本上,当我在 Python 中运行时

>>> from pycuda.driver import autoinit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dawid/anaconda2/lib/python2.7/site-packages/pycuda/driver.py", line 5, in <module>
    from pycuda._driver import *  # noqa
ImportError: libcurand.so.5.5: cannot open shared object file: No such file or directory

我的设置:

.bashrc:
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64 

确认:

dawid@junkyard:~$ ldconfig -p | grep libcurand
    libcurand.so.8.0 (libc6,x86-64) => /usr/local/cuda-8.0/lib64/libcurand.so.8.0
    libcurand.so (libc6,x86-64) => /usr/local/cuda-8.0/lib64/libcurand.so

dawid@junkyard:~$ ll /usr/local/cuda*
lrwxrwxrwx  1 root root   19 Mar 15 10:13 /usr/local/cuda -> /usr/local/cuda-8.0/

/usr/local/cuda-8.0:
{bins, docs, nvcc, etc.}

NVCC 版本:

dawid@junkyard:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

执行符号链接后,路径中似乎出现了额外的特征。现在 Python 抱怨undefined symbolGoogle 建议处理 Boost 库。有什么想法吗?

>>> import pycuda.autoinit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dawid/anaconda2/lib/python2.7/site-packages/pycuda/autoinit.py", line 2, in <module>
    import pycuda.driver as cuda
  File "/home/dawid/anaconda2/lib/python2.7/site-packages/pycuda/driver.py", line 5, in <module>
    from pycuda._driver import *  # noqa
ImportError: /home/dawid/anaconda2/lib/python2.7/site-packages/pycuda/_driver.so: undefined symbol: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev

相关内容