Try โ€‚โ€‰HackMD

Install Intel C/C++ Compiler (ICC) 2021.4.0

tags: ORAN, ICC

Reference: Issue in installing ICC


Version

  • For O-DU Emerald version, can use oneapi 2021.4.0
  • For O-DU F Version, use 2022.1.0

Background

  • Compile for CPUs, GPUs, and FPGAs with an LLVM technology-based compiler that enables custom accelerator tuning and supports OpenMP for GPU offload.
  • Used to compile O-DU software

OneAPI 2021.4.0

Install Intel oneAPI Base ToolKit

  1. Go to Intel Download Center

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

  2. Use command line to download installation script

[oran@localhost ~]$ wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18236/l_BaseKit_p_2021.4.0.3422.sh
  1. Execute downloaded script via
[oran@localhost ~]$ sudo sh <script-name>.sh -a --silent --eula accept

For more options, please refer to Installation Guide
4. Wait for a while, and the installation will complete

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

Install Intel oneAPI HPC ToolKit

  1. Go to Intel Download Center

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

  2. Use command line to download installation script

[oran@localhost ~]$ wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18211/l_HPCKit_p_2021.4.0.3347.sh
  1. Execute downloaded script via
[oran@localhost ~]$ sudo sh <script-name>.sh -a --silent --eula accept

For more options, please refer to Installation Guide
4. Wait for a while, and the installation will complete

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

Configure Environment Variable

  1. Open ~/.bashrc
  2. Append following environment variable
export INTEL_ONEAPI_ROOT=/opt/intel/oneapi export PATH=$PATH:$INTEL_ONEAPI_ROOT/compiler/2021.4.0/env:$INTEL_ONEAPI_ROOT/compiler/2021.4.0/linux/bin/intel64
  1. After edit is completed, it will be like
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

Some environment variables will be set in other sections.
Just focus on the variables we set above.

Create iccvar.sh

  • Because we need iccvars.sh in other section and the file in current version is called vars.sh, we copy vars.sh to iccvars.sh.
[oran@localhost ~]$ sudo cp /opt/intel/oneapi/compiler/2021.4.0/env/vars.sh /opt/intel/oneapi/compiler/2021.4.0/env/iccvars.sh

Verify installation

  1. Check icc
[oran@localhost ~]$ icc --version icc (ICC) 2021.4.0 20210910 Copyright (C) 1985-2021 Intel Corporation. All rights reserved.
  1. Check icpc
[oran@localhost ~]$ icpc --version icpc (ICC) 2021.4.0 20210910 Copyright (C) 1985-2021 Intel Corporation. All rights reserved.
  1. Check iccvars.sh
[oran@localhost ~]$ which iccvars.sh /opt/intel/oneapi/compiler/2021.4.0/env/iccvars.sh