Community
cancel
Showing results for 
Search instead for 
Did you mean: 
siyuliben
Beginner
246 Views

The Fortran compiler (ifort.exe) cannot be found.

Jump to solution

Hi,

I installed Visual Studio 2019 (with the desktop C++ workload selected) and installed intel oneAPI HPC Toolkit (the newest version with Fortran compiler selected) to Visual Studio 2019.

Then I created a new project that prints 'Hello World'.

But the following error came out after I build the project.

Build started...
1>------ Build started: Project: Console1, Configuration: Debug x64 ------
1>The Fortran compiler (ifort.exe) cannot be found.
1>
1>Build log written to "file://H:\Console1\x64\Debug\BuildLog.htm"
1>Console1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Can anyone help me with this problem? Thank you very much.

0 Kudos

Accepted Solutions
Alina_S_Intel
Employee
90 Views

Yes,oneAPI HPC Toolkit requires oneAPI Base Toolkit: https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-hpc-toolkit-system-requir...


Upgrades sometimes lead to integration issues. So, I would recommend uninstalling the previous version and after that install a new one.


If your issue is resolved, please mark the post containing the solution to help others. 


View solution in original post

13 Replies
Alina_S_Intel
Employee
218 Views

Have you installed Base ToolKit before installing HPC Toolkit?

How did you create a project? New - Project - Fortran - Main program code or Empty project?


siyuliben
Beginner
199 Views

I didn't install Base Toolkit. Do I need to install Base ToolKit before HPC Toolkit?

 

I clicked 'File-New-Project-Fortran-Main program code'.

I also did the 'Empty project' for my own scripts too.

Steve_Lionel
Black Belt Retired Employee
195 Views

In Visual Studio (the full interface, not the start page), click Help > About, then Copy Info. Paste the result into a reply here.

You can also try an uninstall and reinstall of the oneAPI Toolkits. Installing the Base or not would not have an effect on the ability to find ifort.exe.

 
siyuliben
Beginner
186 Views

Microsoft Visual Studio Community 2019
Version 16.8.4
VisualStudio.16.Release/16.8.4+30907.101
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Community

Visual C++ 2019 00435-60000-00000-AA934
Microsoft Visual C++ 2019

ASP.NET and Web Tools 2019 16.8.557.25636
ASP.NET and Web Tools 2019

C# Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Intel Libraries for oneAPI Package ID: w_oneAPI_2021.1.1.99
Intel Libraries for oneAPI – toolkit version: 2021.1.1, extension version 21.1.0.16, Package ID: w_oneAPI_2021.1.1.99, Copyright © 2019-2020 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

Intel® C++ Compiler Package ID: w_oneAPI_2021.1.1.99
Intel® C++ Compiler – toolkit version: 2021.1.1, extension version 21.0.16, Package ID: w_oneAPI_2021.1.1.99, Copyright © 2002-2020 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

Intel® C++ Compiler Classic Package ID: w_oneAPI_2021.1.1.99
Intel® C++ Compiler Classic – toolkit version: 2021.1.1, extension version 19.2.5.16, Package ID: w_oneAPI_2021.1.1.99, Copyright © 2002-2020 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

Intel® Fortran Compiler Package ID: w_oneAPI_2021.1.1.99
Intel® Fortran Compiler – toolkit version: 2021.1.1, extension version 19.2.0061.16, Package ID: w_oneAPI_2021.1.1.99, Copyright © 2002-2020 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

Intel® Inspector 2021.1 604894
Intel® Inspector 2021.1, (build 604894), Copyright © 2009-2020 Intel Corporation. All rights reserved.

Intel® oneAPI DPC++ Compiler Package ID: w_oneAPI_2021.1.1.99
Intel® oneAPI DPC++ Compiler – toolkit version: 2021.1.1, extension version 21.1.0.16, Package ID: w_oneAPI_2021.1.1.99, Copyright © 2019-2020 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

Intel® oneAPI Menu & Samples 1.0.387
Intel® oneAPI Visual Studio Menu & Samples Extension

IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

NuGet Package Manager 5.8.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

Visual Basic Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake

siyuliben
Beginner
173 Views

Hi Steve,

I did reinstall the oneAPI Toolkits several times (also VS 2019 too). 

The problem still exists. 

Steve_Lionel
Black Belt Retired Employee
162 Views

Ok - that all looks reasonable. The first thing I note is that you're one update back from current, which is 2021.1.2. I'd suggest downloading and installing the latest update - though when I try to do so, the web site puts me into a loop of "registering" for Intel Developer Zone, even though I am already registered. (It didn't do this previously.)

If that doesn't help (or you can't complete the step), look in C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\windows\bin\intel64_ia32 (or 2021.1.2 if you installed the update) and see if ifort.exe is there. There is also an "intel64" last folder for targeting x64.) If it is, next step.

In VS2019, select Tools > Options > Intel Compilers and Libraries > IFORT Intel Fortran Classic > Compilers. With the Win32 tab highlighted, click Reset... Now click on the x64 tab and click Reset... there.

See if this helps.

 
siyuliben
Beginner
157 Views

Hi Steve,

Both interl64 and interl64_ia32 folder have ifort.exe. And I reset both Compilers in the Tools, but it is still not working. Please let me know if anything else can help with this problem. 

Thank you very much.

Best Regards

Siyu

Steve_Lionel
Black Belt Retired Employee
151 Views

Let's try some diagnostics.

From the Windows Start menu, select Intel oneAPI 2021 > Intel oneAPI command prompt for IA32 for Visual Studio. When the window opens, type: 

ifort

Copy the entire window contents and paste into a reply here.

 
siyuliben
Beginner
145 Views

I cannot find Intel oneAPI 2021 in the Start menu. Is the command prompt ok?

 

command prompt gave me

 'ifort' is not recognized as an internal or external command,
operable program or batch file.

siyuliben
Beginner
135 Views

Hi Steve,

After I reinstalled HPC again. I found the command prompt.

Please read the entire window:

:: initializing oneAPI environment...
initializing Visual Studio command-line environment...
Visual Studio version 16.8.4 environment configured.
Visual Studio environment initialized for: 'x86'
: compiler -- latest
: dev-utilities -- latest
: inspector -- latest
: itac -- latest
: mpi -- latest
: tbb -- latest
:: oneAPI environment initialized ::

C:\Program Files (x86)\Intel\oneAPI>ifort

Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on IA-32, Version 2021.1 Build 20201112_000000
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.

ifort: command line error: no files specified; for help type "ifort /help"

Steve_Lionel
Black Belt Retired Employee
115 Views

That's as it should be from the command line. Now what does VS do?

siyuliben
Beginner
100 Views

Hi Steve,

 

VS works fine now. At least for the Main program code. I am not sure why.

Thank you very much for your help.

Alina_S_Intel
Employee
91 Views

Yes,oneAPI HPC Toolkit requires oneAPI Base Toolkit: https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-hpc-toolkit-system-requir...


Upgrades sometimes lead to integration issues. So, I would recommend uninstalling the previous version and after that install a new one.


If your issue is resolved, please mark the post containing the solution to help others. 


View solution in original post