I installed oneapi in Ubuntu 23.10.
The installation ran without a problem.
Oneapi is in /opt/intel/
I sourced setvars.sh.
On I open a terminal setvars.sh iexecutes setting the environment variables.
Disaster strikes when I enter ifort --version which gives me ‘Command ‘ifort’ not found’
I think something went wrong with the installation.
On mpiifort --version I get:
/opt/intel/oneap/mpi/2021.10.0/bin/mpiifort: 1: eval: ifort: not found.
As far as I understand ifort didn’t get installed.
Yes I did to no avail.
Very strange. I tried sudo apt-get --reinstall install intel-basekit
but it states that alle files are up to date.
To really reinstall I suppose I have to purge first but I would like to avoid that.
apt-key add is deprecated in latest linux distro’s such as ubuntu 23.10 for security reasons. You have to add the key in /etc/apt/keyrings and edit the sources.list. But I did that and I could continue with installing.
I have a SSD of 1TB, so I have enough storage capacity.
Stranger and stranger.icc – version and icpc --versio gives me the versions.
ifort --version gives command not found. Apparently they don’t like fortran.
I have no idea whats going wrong.
I have just installed on Windows and the trick was to see that Intel have a “macro” for opening a command line window which is configured so that ifort and if are added to the path along with all the other environment variables required.
If does not work in a vanilla command prompt window.
So I wonder if they took the same approach in Linux? Do they supply a command that reconfigure a terminal so that all necessary may be discovered?
That is the role of the /opt/intel/oneapi/setvars.sh script. I had to configure my system so that the command source /opt/intel/oneapi/setvars.sh --force > /dev/null is executed each time I launch a terminal (it runs the script without sending its messages on screen).
> This is the top-level environment variable setup script for use with Intel
OneAPI toolkits. Most "tools" or "components" that are part of an Intel
oneAPI installation include an `env/vars.sh` script that configures the
environment variables needed for that specific tool to work. More details
are available via this script's "--help" argument.
Intel has a Fortran Developer Guide and Reference, and it’s been online for over 20 years. One of the first chapters is on using the compiler. Specifically, one can go here to see the details for setting environment for command lines for Windows or linux. And it also shows how to use it in Visual Studio.