Attempting to download the Intel Fortran compiler: first I read that there is ifort an ifx : do these two mysterious words refer to different compilers? Then I bump against a message saying the compiler will not work if Visual Studio isn’t installed. (How godly would it be if decision trees were to be used!) However, I also read that the Intel compiler can be employed from the command line. (Now this really spins my head.) How do I obtain the Intel Fortran compiler that will be operable from the command line?
Hi @Patrick
You have to download the intel oneAPI base tool kit and then the HPC tool kit, both links are here Intel Fortran compiler in Fortran Wiki
during installation it will warn you if MVS is not installed, but you should be able to skip that and continue, should it force it, you can install MVS2022 community edition and you should be good to go… must likely the issue is that ifort needs the linker from MVS, but ifx can work independently…
After installing the HPC tool kit that will provide both ifort (the classic compiler) and ifx (the new compiler based on LLVM)
In order to use them from command line you have to set locally the environment variables:
call “C:\Program Files (x86)\Intel\oneAPI\compiler\2023.0.0\env\vars.bat” intel64
ifort
ifx
The first line sets everything, the other two just to prompt the information of the compiler version
From here on you should be able of compiling and running single files, for more complex projects you will need either CMake or fpm
@hkvzjal ,
Please take a look at this page authored by @greenrongreen at Intel.
A quick glance at your Fortran Wiki suggests either that the Fortran Wiki page is superfluous; or if at all, such a page should exist at Fortran Wiki, it should merely point to Intel’s site link(s) and not add anything further.
Your instructions to install the oneAPI Base toolkit appears unnecessary, for example, for most Fortranners.
C:\>call "C:\Program Files (x86)\Intel\oneAPI\compiler\2023.1.0\env\vars.bat" intel64
:: WARNING: Visual Studio was not found in the standard installation location:
"C:\Program Files\Microsoft Visual Studio\<Year>\<Edition>" or
"C:\Program Files (x86)\Microsoft Visual Studio\<Year>\<Edition>"
Set the VS2017INSTALLDIR or VS2019INSTALLDIR or VS2022INSTALLDIR
environment variable to point to your install location and try again.
Now what do I do?
I replied in your other thread.
For Intel Fortran to work at all, it is required that you have enough components of Visual C++/Studio installed that you can compile, link and run a C or C++ program, such as the classic C “Hello World” program. Even if you choose not to make use of the Visual Studio IDE, the presence of the VC Windows Desktop components is a hard requirement.
Then, bye bye Intel!
The same is going to be true for gfortran. One installs gfortran by installing gcc.
I am sticking to Gfortran. There were things I could have done via the intel compiler, but I will shelve that perspective.
You can also just download the standalone version/installer, if you want to avoid accidently installing unneeded tools.
HI had to un-install the compiler I had downloaded from Intel, bbecause I did not have the required VS on board.