Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

ifort is not recognized as an internal command... Windows 64-bit

Aditya_K_3
Beginner
2,129 Views

I know this seems to be a common issue from what I've seen on this forum, but I can't seem to get around it.

I've installed Microsoft Visual Studio 2015 on a Windows 10, 64-bit computer along with Intel Parallel Studio XE 2016.

I've been trying to compile some fortran code using the Intel Compiler, but I keep getting the same error saying that 'ifort' is not recognized as an internal or external command, operable program or batch file.'

When I looked at my program files folder, I've found 3 different ifort.exe files in different folders (intel64_mic, intel64_ia32,intel64,ia32) as well as compilervars.bat in the main bin folder. I am relatively new to all this, and I do not know how to set an argument in this file, when it asks me in the command line (I saw this solution on another thread here).

Please help me solve this problem.

Thank you,

Aditya Khuller

Arizona State University

 

0 Kudos
5 Replies
mecej4
Honored Contributor III
2,129 Views

After a successful installation of Parallel Studio, you will have shortcuts in the Start Menu for command windows suitable for 32-bit and 64-bit program development. Choose one of these. The "ifort" command should be operational in the command window that opens.

0 Kudos
Aditya_K_3
Beginner
2,129 Views

Thank you for your reply. Under my start menu, I have Intel Parallel Studio XE 2016, and there is only Compiler 16.0 Update 3 for IA-32 Visual Studio 2015 environment. When I try to compile my code I get the error described above.

My code basically looks like:

ifort abc.F  -I C:\Program Files\netcdf-ifort-3.6.1\netcdf3.6.1\include -L C:\Program Files\netcdf-ifort-3.6.1\netcdf3.6.1\lib -lnetcdf -o abc_mat

0 Kudos
Kevin_D_Intel
Employee
2,129 Views

You appear to be using the ifort compiler on Windows but specifying a Linux-style command-line. Are you certain you are working under an Intel initialized command-prompt window?

As mecej4 surmised, the error suggests 'ifort' was invoked in a non-Intel compiler initialized command-window. Even if you issued the 'ifort' command shown in the window opened by the IA-32 shortcut you mentioned it should not yield the error noted.

That you only have an IA-32 shortcut but note the Intel 64 compilers appear present is very interesting. I don't know whether something went wrong during the installation to cause that. Unclear if uninstalling and re-installing Parallel Studio XE 2016 would remedy this.

0 Kudos
Aditya_K_3
Beginner
2,129 Views

Thank you for your reply. I uninstalled and reinstalled the compiler, and ran my code in Visual Studio directly, and it seems to have built successfully. ifort is now being recognized as a command in the Intel command windows, and now there are two compilers available, for 32-bit and 64-bit, like mecej64 described.

0 Kudos
Kevin_D_Intel
Employee
2,129 Views

Glad to hear that.

0 Kudos
Reply