Issue with MKL and Intel Fortran Compiler

Hello everyone! I’ve installed Intel Fortran Compiler (offline installation) and after it i’ve installed Math Kernel Library also by offline installation. The problem is that now i cannot use ifort or ifx command in Intel oneAPI command prompt for Visual Studio 2022. I try to repair both of this installation but it still doesn’t work.

On top of screenshot i attach installed products. On bottom picture i attach my issue. Translation is: ifort command doesn’t exist.

I think may be problem in mkl and intel fortran versions? I cd in the oneAP/mkl folder and find there ifort and ifx .exe, but i get access for them only in their folder, not in the prompt environment. If i uninstall MKL, the ifort and ifx start to wortk in prompt.

Can anybody help me please?

2 Likes

You might have to add the path to the Intel oneAPI installation directory (with ifort.exe inside) manually to the PATH environment variable of Windows. How-To: Add Tool Locations to the PATH Environment Variable.

3 Likes

I agree that it start work if i add it to path, but i dont uderstand why i cannot use it inside intel oneAPI prompt that dinamically load all evironment variables

1 Like

oneAPI comes with a script to set these variables, e.g. source /opt/intel/oneapi/setvars.sh

1 Like

Check your environment variables. Mine is below

However, I found VS2022 does not work perfectly with Intel OneAPI now. It will always show an error message when I open a solution. But some people say VS2022’s IDE may perform better than VS2017/2019.
I use VS2017. I feel VS2019 is not as stable as 2017.

VS 2017 is no longer supported. If you have the wrong version of VS ie 2022 above 17.1.6 you will not be able to run Intel Fortran and if you are using a Windows 11 and VS 2022 you may not be able to run IFX.

A better place to ask these questions is the Intel Fortran Forum there is a long discussion on this exact problem.

VS2017 is supported by OneAPI 2022.1,

Anyway, I would wait at least for a while before using VS2022 and Intel OneAPI together. Usually it takes some time for the lastest Intel OneAPI and VS to work perfectly together.

Microsoft has a note on their website the VS 2017 is no longer supported. You can get it but why bother.

Here is the note:
How long is Visual Studio 2017 supported?

Visual Studio 2017: mainstream support ends April 12, 2022, and the product will transition to extended support until April 2027 . During extended support we’ll provide fixes only for security issues. We recommend users move to the 15.9 supported baseline to remain under support.Feb 10, 2022