PaddlePaddle系列-基础知识
1. 错误解决
1.1. FatalError: Segmentation fault
is detected by the operating system.
是因为paddlepaddle_gpu
版本和cuda
版本不对应导致的,下载对应的版本安装即可解决
百度官方下载地址
1.2. The third-party dynamic library (libcuda.so) that Paddle depends on is not configured correctly
- 问题描述:
W0420 10:43:16.226497 24143 dynamic_loader.cc:307] The third-party dynamic library (libcuda.so) that Paddle depends on is not configured correctly. (error code is libcuda.so: cannot open shared object file: No such file or directory)
Suggestions:
1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed.
2. Configure third-party dynamic library environment variables as follows:
- Linux: set LD_LIBRARY_PATH by `export LD_LIBRARY_PATH=...`
- Windows: set PATH by `set PATH=XXX;
--------------------------------------
C++ Traceback (most recent call last):
--------------------------------------
No stack trace in paddle, may be caused by external reasons.
----------------------
Error Message Summary:
----------------------
FatalError: `Segmentation fault` is detected by the operating system.
[TimeInfo: *** Aborted at 1681958596 (unix time) try "date -d @1681958596" if you are using GNU date ***]
[SignalInfo: *** SIGSEGV (@0x0) received by PID 24143 (TID 0x7f0515e59740) from PID 0 ***]
段错误 (核心已转储)
- 问题解决
- 查找
libcuda.so
所在目录
sudo find / -name libcuda.so
返回
/usr/local/cuda-11.7/targets/x86_64-linux/lib/stubs/libcuda.so
- 加入环境变量
gedit ~/.bashrc
export LD_LIBRARY_PATH=/usr/local/cuda-11.7/targets/x86_64-linux/lib/stubs:$LD_LIBRARY_PATH
source ~/.bashrc