Skip to content

Commit a703a24

Browse files
authored
Merge pull request #4420 from luotao1/faq
refine the catalog of FAQ
2 parents 6f9a9a9 + 5dc6339 commit a703a24

File tree

9 files changed

+619
-589
lines changed

9 files changed

+619
-589
lines changed
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
###################
2+
编译安装与单元测试
3+
###################
4+
5+
.. contents::
6+
7+
1. 运行Docker GPU镜像出现 "CUDA driver version is insufficient"
8+
----------------------------------------------------------------
9+
10+
用户在使用PaddlePaddle GPU的Docker镜像的时候,常常出现 `Cuda Error: CUDA driver version is insufficient for CUDA runtime version`, 原因在于没有把机器上CUDA相关的驱动和库映射到容器内部。
11+
具体的解决方法是:
12+
13+
.. code-block:: bash
14+
15+
$ export CUDA_SO="$(\ls usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}')"
16+
$ export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}')
17+
$ docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddlepaddle:latest-gpu
18+
19+
更多关于Docker的安装与使用, 请参考 `PaddlePaddle Docker 文档 <http://www.paddlepaddle.org/doc_cn/build_and_install/install/docker_install.html>`_ 。
20+
21+
22+
2. CMake源码编译, 找到的PythonLibs和PythonInterp版本不一致
23+
----------------------------------------------------------------
24+
25+
这是目前CMake寻找Python的逻辑存在缺陷,如果系统安装了多个Python版本,CMake找到的Python库和Python解释器版本可能有不一致现象,导致编译PaddlePaddle失败。正确的解决方法是,
26+
用户强制指定特定的Python版本,具体操作如下:
27+
28+
.. code-block:: bash
29+
30+
cmake .. -DPYTHON_EXECUTABLE=<exc_path> -DPYTHON_LIBRARY=<lib_path> -DPYTHON_INCLUDE_DIR=<inc_path>
31+
32+
用户需要指定本机上Python的路径:``<exc_path>``, ``<lib_path>``, ``<inc_path>``
33+
34+
3. CMake源码编译,Paddle版本号为0.0.0
35+
--------------------------------------
36+
37+
如果运行 :code:`paddle version`, 出现 :code:`PaddlePaddle 0.0.0`;或者运行 :code:`cmake ..`,出现
38+
39+
.. code-block:: bash
40+
41+
CMake Warning at cmake/version.cmake:20 (message):
42+
Cannot add paddle version from git tag
43+
44+
那么用户需要拉取所有的远程分支到本机,命令为 :code:`git fetch upstream`,然后重新cmake即可。
45+
46+
4. paddlepaddle\*.whl is not a supported wheel on this platform.
47+
------------------------------------------------------------------------
48+
49+
出现这个问题的主要原因是,没有找到和当前系统匹配的paddlepaddle安装包。最新的paddlepaddle python安装包支持Linux x86_64和MacOS 10.12操作系统,并安装了python 2.7和pip 9.0.1。
50+
51+
更新 :code:`pip` 包的方法是\:
52+
53+
.. code-block:: bash
54+
55+
pip install --upgrade pip
56+
57+
如果还不行,可以执行 :code:`python -c "import pip; print(pip.pep425tags.get_supported())"` 获取当前系统支持的python包的后缀,
58+
并对比是否和正在安装的后缀一致。
59+
60+
如果系统支持的是 :code:`linux_x86_64` 而安装包是 :code:`manylinux1_x86_64` ,需要升级pip版本到最新;
61+
如果系统支持 :code:`manylinux1_x86_64` 而安装包(本地)是 :code:`linux_x86_64` ,可以重命名这个whl包为 :code:`manylinux1_x86_64` 再安装。
62+
63+
5. 编译安装后执行 import paddle.v2 as paddle 报ImportError: No module named v2
64+
------------------------------------------------------------------------------------------
65+
先查看一下是否曾经安装过paddle v1版本,有的话需要先卸载:
66+
67+
pip uninstall py_paddle paddle
68+
69+
然后安装paddle的python环境, 在build目录下执行
70+
71+
pip install python/dist/paddle*.whl && pip install ../paddle/dist/py_paddle*.whl
72+
73+
6. 遇到“非法指令”或者是“illegal instruction”
74+
--------------------------------------------
75+
76+
PaddlePaddle使用avx SIMD指令提高cpu执行效率,因此错误的使用二进制发行版可能会导致这种错误,请选择正确的版本。
77+
78+
7. python相关的单元测试都过不了
79+
--------------------------------
80+
81+
如果出现以下python相关的单元测试都过不了的情况:
82+
83+
.. code-block:: bash
84+
85+
24 - test_PyDataProvider (Failed)
86+
26 - test_RecurrentGradientMachine (Failed)
87+
27 - test_NetworkCompare (Failed)
88+
28 - test_PyDataProvider2 (Failed)
89+
32 - test_Prediction (Failed)
90+
33 - test_Compare (Failed)
91+
34 - test_Trainer (Failed)
92+
35 - test_TrainerOnePass (Failed)
93+
36 - test_CompareTwoNets (Failed)
94+
37 - test_CompareTwoOpts (Failed)
95+
38 - test_CompareSparse (Failed)
96+
39 - test_recurrent_machine_generation (Failed)
97+
40 - test_PyDataProviderWrapper (Failed)
98+
41 - test_config_parser (Failed)
99+
42 - test_swig_api (Failed)
100+
43 - layers_test (Failed)
101+
102+
并且查询PaddlePaddle单元测试的日志,提示:
103+
104+
.. code-block:: bash
105+
106+
paddle package is already in your PYTHONPATH. But unittest need a clean environment.
107+
Please uninstall paddle package before start unittest. Try to 'pip uninstall paddle'.
108+
109+
解决办法是:
110+
111+
* 卸载PaddlePaddle包 :code:`pip uninstall paddle`, 清理掉老旧的PaddlePaddle安装包,使得单元测试有一个干净的环境。如果PaddlePaddle包已经在python的site-packages里面,单元测试会引用site-packages里面的python包,而不是源码目录里 :code:`/python` 目录下的python包。同时,即便设置 :code:`PYTHONPATH` 到 :code:`/python` 也没用,因为python的搜索路径是优先已经安装的python包。

doc/faq/cluster/index_cn.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
###############
2+
集群训练与预测
3+
###############
4+
5+
.. contents::
6+
7+
1. 集群多节点训练,日志中保存均为网络通信类错误
8+
------------------------------------------------
9+
10+
集群多节点训练,日志报错为网络通信类错误,比如 :code:`Connection reset by peer` 等。
11+
此类报错通常是由于某一个节点的错误导致这个节点的训练进程退出,从而引发其他节点无法连接导致,可以参考下面的步骤排查:
12+
13+
* 从 :code:`train.log` , :code:`server.log` 找到最早报错的地方,查看是否是其他错误引发的报错(比如FPE,内存不足,磁盘空间不足等)。
14+
15+
* 如果发现最早的报错就是网络通信的问题,很有可能是非独占方式执行导致的端口冲突,可以联系OP,看当前MPI集群是否支持resource=full参数提交,如果支持增加此参数提交,并更换job 端口。
16+
17+
* 如果当前MPI集群并不支持任务独占模式,可以联系OP是否可以更换集群或升级当前集群。

0 commit comments

Comments
 (0)