Skip to content

Instantly share code, notes, and snippets.

@SomajitDey
Last active February 26, 2025 10:02
Show Gist options
  • Save SomajitDey/aeb6eb4c8083185e06800e1ece4be1bd to your computer and use it in GitHub Desktop.
Save SomajitDey/aeb6eb4c8083185e06800e1ece4be1bd to your computer and use it in GitHub Desktop.
Install INTEL Fortran compiler ifort for free on Ubuntu(WSL2). Also install MKL. OpenMP and OpenMPI runtime for coarray support.

My route:

  1. 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
  2. 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"
  3. sudo apt update
  4. sudo apt install intel-oneapi-compiler-fortran
  5. Optional: sudo apt install intel-oneapi-mkl
  6. In ~/.bashrc: source /opt/intel/oneapi/setvars.sh > /dev/null
@Raghavenp
Copy link

Unpacking using "dearmor" in Step 1 is taking too long....is it normal?

@Azadparvar
Copy link

Hello,
when I wrote the first command, I faced that no valid OpenPGP data found.
I could not fix it. Can you guide me?

@Lars255
Copy link

Lars255 commented Jan 23, 2025

Since ifort is deprecated, is this still possible? I tried to do this but the ifort command does not exist...

@SomajitDey
Copy link
Author

Thanks for your comments and sincere apologies for the delayed response.

@Raghavenp

Unpacking using "dearmor" in Step 1 is taking too long....is it normal?

Nope. I timed that step (i.e. curl piped to gpg). Here are my results:

real    0m1.049s
user    0m0.072s
sys     0m0.018s

@Azadparvar

Hello, when I wrote the first command, I faced that no valid OpenPGP data found. I could not fix it. Can you guide me?

Most probably, your curl failed. I suggest you use the option -f with curl.

@Lars255

Since ifort is deprecated, is this still possible? I tried to do this but the ifort command does not exist...

The installation described in this gist does automatically install the replacement for ifort, viz. ifx. So, simply use ifx command instead of ifort after the installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment