- Official Guide
- VMagnin's post
- NOTE: Make sure to do
sudo apt update
after adding intel's repositories to apt. - VMagnin's post regarding sourcing
/opt/intel/oneapi/setvars.sh
- Another useful source
My route:
curl -Lo- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg
sudo tee /etc/apt/sources.list.d/oneAPI.list <<< "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main"
sudo apt update
sudo apt install intel-oneapi-compiler-fortran
- Optional:
sudo apt install intel-oneapi-mkl
- In
~/.bashrc
:source /opt/intel/oneapi/setvars.sh > /dev/null
Thank you very much, specially for important note number 6 "In ~/.bashrc: source /opt/intel/oneapi/setvars.sh > /dev/null"
The only thing is that your MPI folder does not contain "mpif90" nor "mpiifort" and If you can add them, it will be complete.
I did these steps:
1- I downloaded Intel Fortran compiler and Intel MPI library from Intel site and Installed them.
2- In ~/.bashrc: export I_MPI_F90=ifort, in order that mpif90 uses Ifort not Gfortran.
3- In ~/.bashrc: source .../setvars.sh > /dev/null, in order to define necessary paths and variables. Instead of ... users should write the path of setvars.sh.
( Without doing step 3 and defining only Ifort and MPI path in .bashrc, I was getting this error: "mod_mpi_shared.F90(29): error #5102: Cannot open include file 'mpif.h' INCLUDE 'mpif.h")