Install oneCCL from Source#

Install and configure the oneAPI Collective Communications Library (oneCCL) (oneCCL) on your system. oneCCL supports different installation scenarios using command line interface (CLI).

System Requirements#

Ensure your system meets the hardware and software requirements before starting with installing oneCCL. See oneAPI Collective Communications Library (oneCCL) System Requirements to learn about hardware and software requirements for oneCCL.

Installation using CLI#

To install oneCCL using command line interface (CLI), follow these steps:

  1. Clone the OneCCL git repository:

    git clone https://github.com/oneapi-src/oneCCL.git
    
  2. Navigate to the oneCCL folder:

    cd oneCCL
    
  3. Create a new folder:

    mkdir build
    
  4. Go to the folder created:

    cd build
    
  5. Launch CMake:

    cmake ..
    
  6. Install the product:

    make -j install
    

If you need a clean build, create a new build directory and invoke cmake within the directory.

Custom Installation#

You can customize CLI-based installation (for example, you can specify the directory, compiler, and build type):

  • To specify the installation directory, modify the cmake command:

    cmake .. -DCMAKE_INSTALL_PREFIX=</path/to/installation/directory>
    

    If no -DCMAKE_INSTALL_PREFIX is specified, oneCCL is installed into the _install subdirectory of the current build directory (the default installation path will be oneCCL/build/_install).

  • To specify the compiler, modify the cmake command:

    cmake .. -DCMAKE_C_COMPILER=<c_compiler> -DCMAKE_CXX_COMPILER=<cxx_compiler>
    
  • To enable SYCL devices communication support, specify SYCL compiler (only Intel® oneAPI DPC++/C++ Compiler is supported):

    cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCOMPUTE_BACKEND=dpcpp
    
  • To specify the build type, modify the cmake command:

    cmake .. -DCMAKE_BUILD_TYPE=[Debug|Release]
    
  • To enable make verbose output to see all parameters used by make during compilation and linkage, modify the make command as follows:

    make -j VERBOSE=1 install
    

Learn More#