Compilation
After installing the MPI package, you need to compile the HCCL Performance Tester.
- Configure the environment variables on which compilation depends.
- In the MPICH installation scenario:
export INSTALL_DIR=/usr/local/Ascend/ascend-toolkit/latest export PATH=/usr/local/mpich/bin:$PATH export LD_LIBRARY_PATH=/usr/local/mpich/lib:${INSTALL_DIR}/lib64:$LD_LIBRARY_PATH - In the Open MPI installation scenario:
export INSTALL_DIR=/usr/local/Ascend/ascend-toolkit/latest export PATH=/usr/local/openmpi/bin:$PATH export LD_LIBRARY_PATH=/usr/local/openmpi/lib:${INSTALL_DIR}/lib64:$LD_LIBRARY_PATH
INSTALL_DIR is the CANN directory, and /usr/local/Ascend is the default installation path of the root user. If a common user is used or the installation path is specified, replace it with an actual path.
/usr/local/mpich and /usr/local/openmpi are the MPI installation paths. Replace them with actual paths.
- In the MPICH installation scenario:
- Go to the directory where the source code of the HCCL Performance Tester is stored.
cd ${INSTALL_DIR}/tools/hccl_test - Compile the HCCL Performance Tester.
- In the MPICH installation scenario:
make MPI_HOME=/usr/local/mpich ASCEND_DIR=${INSTALL_DIR} - In the Open MPI installation scenario:
make MPI_HOME=/usr/local/openmpi ASCEND_DIR=${INSTALL_DIR}
MPI_HOME is the MPI installation path, and ASCEND_DIR is the CANN directory.
After the HCCL Performance Tester is successfully compiled, its executable files are generated in the ${INSTALL_DIR}/tools/hccl_test/bin directory.
For example, all_gather_test and all_reduce_test. Each executable file corresponds to a collective communication operator.
- In the MPICH installation scenario: