Reputation: 480
I am trying to install the ifort compiler on Ubuntu20. I downloaded the installation file from the site: intel
This is a file with the extension .sh, which I made executable:
Downloads$ chmod +x l_fortran-compiler_p_2021.1.2.62_offline.sh
Downloads$ ./l_fortran-compiler_p_2021.1.2.62_offline.sh
This opened the software installer:
However, I cannot use the ifort compiler. Example:
ifort -o name name.for
It gives the following message:
Command 'ifort' not found, did you mean:
command 'fort' from deb fort-validator (1.2.0-1)
command 'isort' from deb isort (4.3.4+ds1-2)
Try: sudo apt install <deb name>
I need to install the intel ifort compiler because the executable is faster if I compile with the -fast option.
Upvotes: 2
Views: 20151
Reputation: 11
there is also a file named modulefiles-setup.sh with setvars.sh file ,in the same folder(/intel/oneapi/) . you need to activate both files with command(source file.sh) to see ifort and icc commands. use this commands:
source intel/oneapi/setvars.sh
source intel/oneapi/modulefiles-setup.sh
source .bashrc
Upvotes: 0
Reputation: 1
You have to "activate" the intel compilers with:
source /opt//oneapi/setvars.sh
Upvotes: 0
Reputation: 60008
The documentation says how to set the environment:
For root or sudo installations:
. /opt/intel/oneapi/setvars.sh
For normal user installations:
. ~/intel/oneapi/setvars.sh
You can put these into your bash profile or bashrc.
Upvotes: 5