Oneapi on ubuntu23010

The experience on my system

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 21.2
Release:	21.2
Codename:	victoria

has been the following.

Executing

$ wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
$ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
$ sudo apt update
$ sudo apt install intel-oneapi-compiler-fortran

and then

$ source /opt/intel/oneapi/setvars.sh

ifort --version and ifx --version work.

If, then, I try to add the C compilers package

$ sudo apt install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic

and then

$ source /opt/intel/oneapi/setvars.sh

icx --version and icc --version work but I lose access to the Fortran compilers (the mentioned ifort --version and ifx --version do not work any more)

After checking the guides on the Intel website (where I found myself many times running in circles through the hyper-links and getting lost in very deep digressions and special cases), I cooked the following solution to have all four compilers available. When you open a new terminal execute:

$ source /opt/intel/oneapi/setvars.sh
$ source /opt/intel/oneapi/compiler/2024.0/env/vars.sh intel64

Just to clarify, I have absolutely no clue why that works, for how long it will continue to work and how robust it is (I have so far experimented very little with combined Fortran and C compilation). It is just the solution I have reached after some lengthy, frustrating trial and error.

For the sake of completeness:

$ which ifort
/opt/intel/oneapi/compiler/2024.0/bin/ifort
$ which ifx
/opt/intel/oneapi/compiler/2024.0/bin/ifx
$ which icc
/opt/intel/oneapi/compiler/2023.2.2/linux/bin/intel64/icc
$ which icx
/opt/intel/oneapi/compiler/2023.2.2/linux/bin/icx

It would be nice if the Intel compilers (that are excellent products) would be far easier to access for the average user and for basic use-cases.