NCCL examples from Official NVIDIA NCCL Developer Guide for faster benchmark and deployment.
Tested on Linux CentOS 7.4 with CUDA 9.1, OpenMPI 3.10.0, and NCCL 2.1.15.
mkdir build
cd build
cmake ..
make
If NCCL was not installed in standard location:
cmake -DNCCL_LIBRARY=/opt/nccl_2.1.15-1+cuda9.1_x86_64/lib/libnccl.so
-DNCCL_INCLUDE_DIR=/opt/nccl_2.1.15-1+cuda9.1_x86_64/include/ ..