【发布时间】:2012-11-24 05:37:11
【问题描述】:
The toolkit and items 1-6 of the NVIDIA_CUDA SDK have been installed and compiled , but when it gets to '6_Advanced/cdpLUDecomposition' the following error message appears.
/usr/local/cuda-5.0/bin/nvcc -m64 -Xcompiler -fopenmp -gencode arch=compute_35,code=sm_35 -o cdpLUDecomposition dlaswp.o dgetf2.o dgetrf.o cdp_lu.o cdp_lu_main.o -L/usr/local/cuda-5.0/lib64 -lcublas -lcublas_device -lcudadevrt -lgomp
/usr/local/cuda-5.0/lib64/libcublas.so: error: undefined reference to 'dlsym'
/usr/local/cuda-5.0/lib64/libcublas.so: error: undefined reference to 'dlopen'
/usr/local/cuda-5.0/lib64/libcublas.so: error: undefined reference to 'dlclose'
collect2: ld returned 1 exit status
make[1]: *** [cdpLUDecomposition] Error 1
我是 Ubuntu 和 Cuda 的新手,但尝试在 make 之前添加 LD_FLAGS=-ldl 没有帮助,并将 PATH 和 LD_LIBRARY_PATH 设置为 Nvidia 建议。我还更新了所有驱动程序,并且能够从 SDK deviceQuery Program 获得有效结果。
任何帮助将不胜感激,因为我尝试过的所有其他方法都没有奏效。
【问题讨论】:
-
您使用的是哪个版本的 Ubuntu?
-
它不是受支持的操作系统。您可以在安装程序release notes 中查看支持的操作系统。如果您不关心 cdpLUDecomposition 示例,您可以使用
make -k而不是常规的 make,它会构建它可以构建的所有目标。这是某种库命名或安装位置问题,其他人在尝试在 ubuntu 12.xx 上运行时遇到类似问题,例如 this one。 -
谢谢罗伯特。我确实看到 12.04 不在受支持的列表中,但没有与该问题建立联系。
-
使用 make -k 确实像你说的那样工作,我认为这是唯一产生错误的例子。希望对 12.04 的全面支持很快就会到来。
-
@user582184:我在新的 Ubuntu 上遇到了类似的问题,但与 CUDA 无关。您可以尝试将“-ldl”链接器标志放在链接器命令的最后。希望这会有所帮助