Skip to content

Commit

Permalink
Merge pull request #5937 from keisukefukuda/bp-5656-improve-chainermn…
Browse files Browse the repository at this point in the history
…-install-guide

[backport] Improve installation guide of ChainerMN
  • Loading branch information
kmaehashi committed Jan 16, 2019
2 parents fcd9a0b + 832ad17 commit 273aea5
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions docs/source/chainermn/installation/guide.rst
Expand Up @@ -13,6 +13,7 @@ CUDA-Aware MPI, NVIDIA NCCL, and a few Python packages including CuPy and MPI4py

In Chainer v5, ChainerMN became a part of Chainer package.
Installing Chainer (``pip install chainer``) automatically makes ChainerMN available.
Note that you still need to separately install requirements described below to actually run code using ChainerMN.

Before upgrading from Chainer v4 to v5 or later, make sure to remove existing ``chainermn`` package (``pip uninstall chainermn``).

Expand Down Expand Up @@ -65,7 +66,6 @@ only exception is when you run ChainerMN on CPU-only environments. See
.. note::

We reccomend NCCL 2 but NCCL 1 can be used.
When you use CUDA 7.0 and 7.5, please install NCCL 1 because NCCL 2 is not supported with CUDA 7.0 and 7.5.
However, for NCCL 1, ``PureNcclCommunicator`` is not supported in ChainerMN.
If you use NCCL 1, please properly configure environment variables to expose NCCL both when you install and use ChainerMN.
Typical configurations should look like the following::
Expand All @@ -84,28 +84,27 @@ only exception is when you run ChainerMN on CPU-only environments. See
MPI4py
~~~~~~

ChainerMN depends on a few Python packages, which are
automatically installed when you install ChainerMN.
You can install MPI4py by::

However, among them, we need to be a little careful about MPI4py.
It links to MPI at installation time, so please be sure
to properly configure environment variables
so that MPI is available at installation time.
In particular, if you have multiple MPI implementations in your environment,
please expose the implementation that you want to use
both when you install and use ChainerMN.
$ pip install mpi4py

Please make be sure to properly configure environment variables so that MPI is available at installation time, because MPI4py links to MPI library at installation time.
In particular, if you have multiple MPI implementations installed in your environment, please expose the implementation that you want to use both when you install and use ChainerMN.

.. _cupy-install:

CuPy
~~~~

Chainer and ChainerMN rely on CuPy to use GPUs.
Chainer and ChainerMN rely on CuPy to use GPUs.
Please refer to `CuPy Installation Guide <https://docs-cupy.chainer.org/en/stable/install.html>`__ for the detailed steps to install CuPy.
CuPy requires NCCL to be enabled.
See :ref:`check-nccl`, if you want to check whether NCCL is enabled in CuPy.

Chainer and ChainerMN can be installed without CuPy, in which case the corresponding features are not available.
In most cases it is recommended to install CuPy using wheel distribution (precompiled binary) rather than source distribution.
If you are installing from source, NCCL library must be installed before installing CuPy to enable NCCL feature in CuPy.
Refer to :ref:`nccl-install` for the installation steps of NCCL library.
See :ref:`check-nccl`, if you want to check whether NCCL is enabled in your CuPy.

Chainer and ChainerMN can be installed without CuPy, in which case the corresponding features are not available.
See :ref:`non-gpu-env` for more details.


Expand All @@ -115,14 +114,14 @@ Tested Environments
We tested ChainerMN on all the following environments.

* OS

* Ubuntu 14.04 LTS 64bit
* Ubuntu 16.04 LTS 64bit

* Python 2.7.13 3.5.1 3.6.1
* Python 2.7.13, 3.5.1, 3.6.1
* MPI

* openmpi 1.10.7 2.1.2
* openmpi 2.1.2

* MPI4py 3.0.0
* NCCL 2.2.13
Expand Down

0 comments on commit 273aea5

Please sign in to comment.