# Install Intel C/C++ Compiler (ICX) 2022.1.0 ###### tags: `ORAN`, `ICC` --- :::success [TOC] ::: Reference: [Issue in installing ICC](https://stackoverflow.com/questions/69769768/issue-in-installing-icc-from-intel-oneapi-basetoolkit-issue-with-license-file#answer-69878966) --- ## Version :::info - For O-DU Emerald version, can use oneapi 2021.4.0 - For O-DU F Version, use 2022.1.0 ::: --- ## Background :::info - 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 2022.1.0 :::info - Needed to use ICX instead of ICC - ICX is Intel nextgen compiler based on C/LLVM technology plus Intel proprietary optimizations and code generation ::: ### 1. Download and Install oneAPI ```shell= ## Download the oneAPI installer $ wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18673/l_BaseKit_p_2022.2.0.262_offline.sh ## Install oneAPI $ sudo sh ./l_BaseKit_p_2022.2.0.262_offline.sh ## Follow the GUI to finish the installation ``` ### 2. Setup ICX(oneAPI) environment variable :::info - Edit bashrc to add oneAPI installation files to PATH - PATH is used in Linux to tell where to search for executable files ::: ```shell= $ vim ~/.bashrc ## Append the commands below into .bashrc file $ source /opt/intel/oneapi/setvars.sh $ export PATH=$PATH:/opt/intel/oneapi/compiler/2022.1.0/linux/bin ``` > You should restart a session or open a new terminal after you set up the .bashrc file >[color=#e85f85] :::info **What is the functionality of ".bashrc" file?** - OS will run the command which is written into `.bashrc` file whenever you open a new terminal. ::: ### 3. Check the version of ICX ```shell= $ icx --version ``` :::success **Result:** ![](https://i.imgur.com/16En045.png) :::