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

compiling Fortran code in VS 2022

david47
Novice
1,323 Views

I just upgraded my computer (Windows 10 64-bit) to VS 2022 and the Fortran compiler in the OneAPI HPC Toolkit.  When I now compile my code, all compile and link errors are now written to a LOG file instead of displayed on the OUPUT window in the GUI.  I would like to see all errors in the Output window and not a LOG file as I have always had in previous versions of VS and Fortran.  I cannot find any info or options in VS 2022 to allow me to do this?  Does anyone know how this can be done?

 

Thank you so much for your help!

 

David

0 Kudos
1 Solution
Devorah_H_Intel
Moderator
938 Views

@david47  

  From the VS info:


@david47 wrote:

 

Intel® Fortran Compiler Package ID: w_oneAPI_2022.2.0.9540
Intel® Fortran Compiler – toolkit version: 2022.3.0,

 

Microsoft Visual Studio Professional 2022
Version 17.9.6


Older 2022 versions of the HPC toolkit and Intel Fortran compilers do not support the latest VS version, 17.9.6

Please refer to the article I have linked above - Intel® Compilers Compatibility with Microsoft Visual Studio* 

Please upgrade to HPC Toolkit version 2024.2 - which can be downloaded for FREE here 

View solution in original post

0 Kudos
10 Replies
Devorah_H_Intel
Moderator
1,302 Views

A couple of suggestions: 

  • In Visual Studio 2022, go to Tools> Options, then navigate to Projects and Solutions >  Build and Run
    Under the MSBuild project build output verbosity, select "Normal" or "Detailed" from the dropdown menu.
     
  • Click on the 'View' menu option. In the dropdown list, select 'Error List'.
    This will open the Error List pane, where you can see any errors, warnings, or messages that occurred during the build process.
0 Kudos
david47
Novice
1,290 Views

Hi Devorah_H_Intel!

 

Thank you so much for the suggestions but neither one worked   VS 2022 writes all compile and link errors to the Log file no matter what I do.  When I tried to view the 'Error List', the Output window changed but reverted back to the original output when I performed a "Build".  

 

Any other ideas?  Is this the new "normal" for VS compile and build output?  I hope not!

 

Thanks again for your help.

 

Sincerely,

David

 

0 Kudos
Devorah_H_Intel
Moderator
1,272 Views

I have tested it in Microsoft Visual Studio Community 2022 (64-bit) - 
Version 17.8.5 and oneAPI 2024.2 work fine with the error list and output.  


Not all Visual Studio versions are validated for use with our compilers. 

It could be an issue with the latest version.

Click Help>About Microsoft VS in VS, copy and paste the info here.

 

Try to repair VS and oneAPI installer first - let me know if you need help with these. 
Can you post what your Output looks like after the Build?

 

0 Kudos
david47
Novice
1,206 Views

Here is the about info.  Does this give you any hints?

 

Thanks so much again for your help!

Sincerely,

David

 

Microsoft Visual Studio Professional 2022
Version 17.9.6
VisualStudio.17.Release/17.9.6+34728.123
Microsoft .NET Framework
Version 4.8.09037

Installed Version: Professional

Visual C++ 2022 00483-10050-13493-AA447
Microsoft Visual C++ 2022

ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools

ASA Service Provider 1.0

ASP.NET and Web Tools 17.9.199.22661
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2012 17.9.199.22661
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 17.9.199.22661
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio 2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 17.9.199.22661
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio 2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
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.

Cookiecutter 17.0.24002.3
Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Dotfuscator Community Edition 6.5.3+7f0b0a9d18
PreEmptive Protection - Dotfuscator CE

GitHub Copilot 1.206.0.0 (v1.206.0.0@313c5c9d8)
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.

GitHub Copilot Agent 1.206.0

IncrediBuild Build Acceleration 1.6.0.7
IncrediBuild effectively reduces compilation and development times by up to 90%.

Intel Libraries for oneAPI Package ID: w_oneAPI_2022.2.0.9540
Intel Libraries for oneAPI – toolkit version: 2022.3.0, extension version 22.0.0.17, Package ID: w_oneAPI_2022.2.0.9540, Copyright © 2019-2022 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

Intel® C++ Compiler Package ID: w_oneAPI_2022.2.0.9540
Intel® C++ Compiler – toolkit version: 2022.3.0, extension version 22.0.17, Package ID: w_oneAPI_2022.2.0.9540, Copyright © 2002-2022 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_2022.2.0.9540
Intel® C++ Compiler Classic – toolkit version: 2022.3.0, extension version 19.2.10.17, Package ID: w_oneAPI_2022.2.0.9540, Copyright © 2002-2022 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

Intel® DPC++ Compatibility Tool Package ID: w_oneAPI_2022.2.0.9537
Intel® DPC++ Compatibility Tool – toolkit version: 2022.3.0, extension version 2022.2.0.17, Package ID: w_oneAPI_2022.2.0.9537, Copyright © 2019-2022 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

Intel® Fortran Compiler Package ID: w_oneAPI_2022.2.0.9540
Intel® Fortran Compiler – toolkit version: 2022.3.0, extension version 22.0.0068.17, Package ID: w_oneAPI_2022.2.0.9540, Copyright © 2002-2022 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

Intel® oneAPI DPC++ Compiler Package ID: w_oneAPI_2022.2.0.9540
Intel® oneAPI DPC++ Compiler – toolkit version: 2022.3.0, extension version 22.0.0.17, Package ID: w_oneAPI_2022.2.0.9540, Copyright © 2019-2022 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.

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

Linux Core Dump Debugging 1.0.9.34714
Enables debugging of Linux core dumps.

Microsoft Azure Hive Query Language Service 2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service 2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio 2.9
Support for Azure Cloud Services projects

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

Node.js Tools 1.5.50908.1 Commit Hash:c294679b821c4b8f7f9c6db3827b7655db80fc28
Adds support for developing and debugging Node.js apps in Visual Studio

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

Office Developer Tools for Visual Studio 17.6.34328.02
Microsoft Office Developer Tools for Visual Studio

Python - Django support 17.0.24002.3
Provides templates and integration for the Django web framework.

Python - Profiling support 17.0.24002.3
Profiling support for Python projects.

Python - VC Project Support 17.0.23055.1
Provides support for launching C++ projects with Python debugging enabled.

Python with Pylance 17.0.24002.3
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Razor (ASP.NET Core) 17.9.2.2412004+684740676513b3b208d5bd5b7f8786dab8d287b7
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools 17.9.56.1
Microsoft SQL Server Data Tools

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.

ToolWindowHostedEditor 1.0
Hosting json editor into a tool window

TypeScript Tools 17.0.30103.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Linux Development 1.0.9.34714
Visual C++ for Linux Development

Visual F# Tools 17.9.0-beta.23614.3+a521e1cd420beb56c15faf6836184fadd2b7937a
Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,113 Views

As a work around (once only), In MS VS (after build), open the build log, Grab the tab, and drag it into the tab area where the output is located. Leave this file/tab open. Then on subsiquent builds, this window will be updated.

You will lose the click on error/goto error.

 

Your issue is likely a case of too new of MS VS installed. I see you have 2022 17.9.6

My installation is 2022 17.8.2, and I have no problems.

 

Jim Dempsey

0 Kudos
david47
Novice
1,028 Views

Hi Jim and Devorah_H_Intel,

 

In addition to now having the compile and link errors to written to the output window, my executables will not run unless I put the "sycl6.dll" file in the Release/Debug directories.  Could this be part of the larger problem?  It appears that I am using the classic Fortran compiler.  Could all of these issues be avoided if I use the new HPC compiler (I believe it is ifx as opposed to ifort?)?  If so, how do I run with the new compiler?

 

Thank you both for your help.

 

Sincerely,

 

David

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,002 Views

The ifx compiler supports the OpenMP offload directives to GPU. These require sycl....dll. ifort does not.

This said, when compiling .without. OpenMP offload directives, the library (and associated .dll) should not be required (IMHO).

 

Jim Dempsey

0 Kudos
Devorah_H_Intel
Moderator
939 Views

@david47  

  From the VS info:


@david47 wrote:

 

Intel® Fortran Compiler Package ID: w_oneAPI_2022.2.0.9540
Intel® Fortran Compiler – toolkit version: 2022.3.0,

 

Microsoft Visual Studio Professional 2022
Version 17.9.6


Older 2022 versions of the HPC toolkit and Intel Fortran compilers do not support the latest VS version, 17.9.6

Please refer to the article I have linked above - Intel® Compilers Compatibility with Microsoft Visual Studio* 

Please upgrade to HPC Toolkit version 2024.2 - which can be downloaded for FREE here 

0 Kudos
david47
Novice
851 Views

Hi Devorah_H_Intel and Jim,

 

Thank you both again for your help.  As for the 'sycl.dll' issue, I am not compiling with OpenMP and I am using the ifort compiler.  This is very puzzling except that but perhaps there is an issue based on your reply Devorah_H?  I am going to have out IT people install the latest OneAPI HPC and Base toolkits  Hopefully that should resolve all of my problems?

 

Thanks again!

 

Sincerely,

David

jimdempseyatthecove
Honored Contributor III
768 Views

If sycl.dll is called for and you are compiling ifort then I suspect you are linking in a library (or module) compiled with ifx requiring sycl

.OR. some other 3rd party library requiring sycl.dll.

 

Jim Dempsey

Reply