|
1 |
| -############################ |
2 |
| -Install, Build and Unit test |
3 |
| -############################ |
| 1 | +.. _install_faq: |
4 | 2 |
|
5 |
| -TBD |
| 3 | +############################### |
| 4 | +Compile, Install, and Unit Test |
| 5 | +############################### |
| 6 | + |
| 7 | +.. contents:: |
| 8 | + |
| 9 | +1. Insufficient CUDA driver version |
| 10 | +---------------------------------------------------------------- |
| 11 | + |
| 12 | +Many users usually face issues like `Cuda Error: CUDA driver version is insufficient for CUDA runtime version` when running the PaddlePaddle GPU Docker image. The cause is that you may not map the local CUDA driver to a container directory. |
| 13 | +You can solve the issue by running the following commands: |
| 14 | + |
| 15 | +.. code-block:: bash |
| 16 | +
|
| 17 | + $ export CUDA_SO="$(\ls usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}')" |
| 18 | + $ export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}') |
| 19 | + $ docker run ${CUDA_SO} ${DEVICES} -it paddlepaddle/paddle:latest-gpu |
| 20 | +
|
| 21 | +For more infomation about Docker's installation and usage, please refer to `PaddlePaddle Docker documentation <http://www.paddlepaddle.org/docs/0.11.0/documentation/zh/getstarted/build_and_install/docker_install_en.html>`_ . |
| 22 | + |
| 23 | + |
| 24 | +2. Version mismatch between PythonLibs and PythonInterpreter |
| 25 | +---------------------------------------------------------------- |
| 26 | + |
| 27 | +It is a common bug when CMake looks up Python. If you install multiple versions of Python, Cmake may find the version mismatch between PythonLibs and PythonInterpreter . You are forced to specify a Python version, as follows. |
| 28 | + |
| 29 | + .. code-block:: bash |
| 30 | +
|
| 31 | + cmake .. -DPYTHON_EXECUTABLE=<exc_path> -DPYTHON_LIBRARY=<lib_path> -DPYTHON_INCLUDE_DIR=<inc_path> |
| 32 | +
|
| 33 | +You should specify ``<exc_path>``, ``<lib_path>``, ``<inc_path>`` to your local paths. |
| 34 | + |
| 35 | +3. PaddlePaddle version is 0.0.0 |
| 36 | +------------------------------------------------ |
| 37 | +This issue would happen when you run the code `paddle version` or `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 | +You should pull all remote branches to your local machine with the command :code:`git fetch upstream` and then run :code:`cmake` |
| 45 | + |
| 46 | +4. paddlepaddle\*.whl is not a supported wheel on this platform. |
| 47 | +------------------------------------------------------------------------ |
| 48 | + |
| 49 | +The primary cause for this issue is that it can not find the correct PaddlePaddle installation package that matches your current system.The latest PaddlePaddle Python installation package supports Linux x86_64 and MacOS 10.12 os including Python2.7 and Pip 9.0.1. |
| 50 | + |
| 51 | +You can upgrade Pip with the following command\: |
| 52 | + |
| 53 | +.. code-block:: bash |
| 54 | +
|
| 55 | + pip install --upgrade pip |
| 56 | +
|
| 57 | +If it does not work for you, you can run the command :code:`python -c "import pip; print(pip.pep425tags.get_supported())"` to get the suffix of Python package which your system may support and then compare it with the suffix of your installation. |
| 58 | + |
| 59 | +If the system supports :code:`linux_x86_64` and the installation package is :code:`manylinux1_x86_64`, you should upgrade pip to the latest |
| 60 | + |
| 61 | +if the system supports :code:`manylinux_x86_64` and the local installation package is :code:`linux1_x86_64`, you can rename the whl package to :code:`manylinux1_x86_64` and then try again. |
| 62 | + |
| 63 | + |
| 64 | +5. ImportError: No module named v2 |
| 65 | +---------------------------------- |
| 66 | +Please uninstall Paddle V1 if you have installed it before. |
| 67 | + |
| 68 | +.. code-block:: bash |
| 69 | +
|
| 70 | + pip uninstall py_paddle paddle |
| 71 | +
|
| 72 | +Then install Python for PaddlePaddle , enter the build directory and run the following commands |
| 73 | + |
| 74 | +pip install python/dist/paddle*.whl && pip install ../paddle/dist/py_paddle*.whl |
| 75 | + |
| 76 | +6. Illegal instruction |
| 77 | +----------------------- |
| 78 | +This issue may be caused by the wrong usage of PaddlePaddle binary version which uses avx SIMD instructions to increase the performance of cpu. Please choose the correct version. |
| 79 | + |
| 80 | +7. Python unittest fails |
| 81 | +-------------------------------- |
| 82 | + |
| 83 | +If the following python unittest testcases fail: |
| 84 | + |
| 85 | +.. code-block:: bash |
| 86 | +
|
| 87 | + 24 - test_PyDataProvider (Failed) |
| 88 | + 26 - test_RecurrentGradientMachine (Failed) |
| 89 | + 27 - test_NetworkCompare (Failed) |
| 90 | + 28 - test_PyDataProvider2 (Failed) |
| 91 | + 32 - test_Prediction (Failed) |
| 92 | + 33 - test_Compare (Failed) |
| 93 | + 34 - test_Trainer (Failed) |
| 94 | + 35 - test_TrainerOnePass (Failed) |
| 95 | + 36 - test_CompareTwoNets (Failed) |
| 96 | + 37 - test_CompareTwoOpts (Failed) |
| 97 | + 38 - test_CompareSparse (Failed) |
| 98 | + 39 - test_recurrent_machine_generation (Failed) |
| 99 | + 40 - test_PyDataProviderWrapper (Failed) |
| 100 | + 41 - test_config_parser (Failed) |
| 101 | + 42 - test_swig_api (Failed) |
| 102 | + 43 - layers_test (Failed) |
| 103 | +
|
| 104 | +Please check the PaddlePaddle unittest logs which may suggest the following: |
| 105 | + |
| 106 | +.. code-block:: bash |
| 107 | +
|
| 108 | + paddle package is already in your PYTHONPATH. But unittest need a clean environment. |
| 109 | + Please uninstall paddle package before start unittest. Try to 'pip uninstall paddle'. |
| 110 | +
|
| 111 | +The solution is: |
| 112 | + |
| 113 | +* Remove old PaddlePaddle to make a clean environment for the unit tests. If PaddlePaddle package is already in Python's site-packages, unit tests would refer Python package in site-packages instead of Python package in the :code:`/python` directory of the source directory. Setting :code:`PYTHONPATH` to :code:`/python` is also useless because Python's search path would give the priority to the installed Python package. |
| 114 | + |
| 115 | + |
| 116 | +8. Failed to download the MKLML library |
| 117 | +---------------------------------------------- |
| 118 | + |
| 119 | +.. code-block:: bash |
| 120 | +
|
| 121 | + make[2]: *** [third_party/mklml/src/extern_mklml-stamp/extern_mklml-download] error 4 |
| 122 | + make[1]: *** [CMakeFiles/extern_mklml.dir/all] error 2 |
| 123 | + make[1]: *** waiting for the unfinished jobs.... |
| 124 | +
|
| 125 | +Cause: The network speed or SSL link causes the MKLML library to download unsuccessfully. |
| 126 | + |
| 127 | +The solution is: manually download and install, the specific steps are as follows. |
| 128 | + |
| 129 | +.. code-block:: bash |
| 130 | +
|
| 131 | + // 1. enter the directory |
| 132 | + cd build/third_party/mklml/src/extern_mklml |
| 133 | +
|
| 134 | + // 2. check the size of the package, normally 75M, if less than 75M, the download fails |
| 135 | + du -sh mklml_lnx_2018.0.1.20171007.tgz |
| 136 | +
|
| 137 | + // 3. manually download and unzip and make the download success tag: |
| 138 | + wget --no-check-certificate https://github.com/01org/mkl-dnn/releases/download/v0.11/mklml_lnx_2018.0.1.20171007.tgz -c -O mklml_lnx_2018.0.1.20171007.tgz |
| 139 | + tar zxf mklml_lnx_2018.0.1.20171007.tgz |
| 140 | + touch ../extern_mklml-stamp/extern_mklml-download |
| 141 | +
|
| 142 | + // 4. then compile |
| 143 | + |
0 commit comments