Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paddle-gpu总是报找不到类似libnccl.so链接库的错误 #63862

Closed
whysirier opened this issue Apr 25, 2024 · 5 comments
Closed

paddle-gpu总是报找不到类似libnccl.so链接库的错误 #63862

whysirier opened this issue Apr 25, 2024 · 5 comments
Assignees
Labels

Comments

@whysirier
Copy link

bug描述 Describe the Bug

RuntimeError: (PreconditionNotMet) The third-party dynamic library (libnccl.so) that Paddle depends on is not configured correctly. (error code is libnccl.so: cannot open shared object file: No such file or directory)

RuntimeError: (PreconditionNotMet) The third-party dynamic library (cudnn64_8.dll) that Paddle depends on is not configured correctly. (error code is 126)
————————————————

                        版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

原文链接:https://blog.csdn.net/qq_46226356/article/details/128655903

其他补充信息 Additional Supplementary Information

No response

@whysirier
Copy link
Author

没人反映过这个问题的吗?

@lijialin03
Copy link
Contributor

您好,感谢您的反馈,如果使用conda安装,可以试一下

export LD_LIBRARY_PATH='/home/{用户名}/anaconda3/envs/{虚拟环境名}/lib/'

相关问题,#51190 #49106

@jzhang533 jzhang533 changed the title 不太明白paddle-gpu总是报找不到类似libnccl.so链接库的错误,tensorflow和pytorch根本就没这么复杂,为什么就paddle这个框架写的乱七八糟的? paddle-gpu总是报找不到类似libnccl.so链接库的错误 Apr 26, 2024
@jzhang533
Copy link
Contributor

@whysirier 讨论时请遵守参与者公约

@whysirier
Copy link
Author

解决了:
1)nvidia-smi中cuda和nvcc -V的版本要一致
2)假设cuda是12的版本,python -m pip install paddlepaddle-gpu==2.6.1.post120 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
3)如果提示libstdc++.so.6: version ‘GLIBCXX_‘ not found , 使用以下命令:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-11 g++-11
sudo apt-get upgrade libstdc++6
4)如果提示RuntimeError: (PreconditionNotMet) The third-party dynamic library (libnccl)
安装nvidia nccl库,配置环境变量 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/include/nccl.h
5)如果提示libcuda, libcudnn等错误, 配置环境变量:
export CUDA_HOME=/usr/local/cuda-12.2
export PATH=$CUDA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH

@paddle-bot paddle-bot bot added the status/close 已关闭 label Apr 26, 2024
@paddle-bot paddle-bot bot closed this as completed Apr 26, 2024
@paddle-bot paddle-bot bot removed the status/new-issue 新建 label Apr 26, 2024
@whysirier
Copy link
Author

解决了: 1)nvidia-smi中cuda和nvcc -V的版本要一致 2)假设cuda是12的版本,python -m pip install paddlepaddle-gpu==2.6.1.post120 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html 3)如果提示libstdc++.so.6: version ‘GLIBCXX_‘ not found , 使用以下命令: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-11 g++-11 sudo apt-get upgrade libstdc++6 4)如果提示RuntimeError: (PreconditionNotMet) The third-party dynamic library (libnccl) 安装nvidia nccl库,配置环境变量 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/include/nccl.h 5)如果提示libcuda, libcudnn等错误, 配置环境变量: export CUDA_HOME=/usr/local/cuda-12.2 export PATH=$CUDA_HOME/bin:$PATH export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH

sudo ln -s /usr/lib/x86_64-linux-gnu/libcuda.so.1 /usr/lib/x86_64-linux-gnu/libcuda.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants