oneAPI-samples icon indicating copy to clipboard operation
oneAPI-samples copied to clipboard

oneAPI CCL documentation bug-fix in sample example for cpu

Open tygoetsch opened this issue 2 years ago • 0 comments

Summary

Sample code for testing CCL has a typo. When setting --ccl-configuration=cpu on the first line of the code block, cpu is not a valid option:

source ${ONEAPI_ROOT}/setvars.sh --ccl-configuration=cpu

cd oneapi-toolkit/oneCCL/oneCCL_Getting_Started
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
make cpu_allreduce_test

Pulled from ccl's env/vars.sh script, it looks like cpu_icc is the correct choice for CPU-only:

case "$ccl_configuration" in
    cpu_gpu_dpcpp|cpu_icc)
        ;;
    *)
    echo "Warning: ccl-configuration=${ccl_configuration} is incorrect"
    echo "Warning: ccl-configuration will be set to ${DEFAULT_CONFIGURATION}"
    ccl_configuration="${DEFAULT_CONFIGURATION}"
        ;;
esac

URLs

https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneCCL/oneCCL_Getting_Started#on-a-linux-system

Additional details

Replace --ccl-configuration=cpu with --ccl-configuration=cpu_icc on the first line of the code block mentioned above.

tygoetsch avatar May 09 '23 19:05 tygoetsch