Visual Studio 2022中的福特

发布于 2025-02-09 22:16:46 字数 299 浏览 2 评论 0 原文

我安装了Visual Studio 2022。然后,我安装了Intel Oneapi Base Toolkit,然后是HPC工具包。一切似乎都很好,我能够创建一个Fortran项目,但是我无法运行任何代码。当我编写代码时,运行底部被亮了(请参阅附件)。我读到我需要正确设置运行时库,但我认为我不知道该怎么做。例如,当我去项目>设置并向下滚动到IFX Intel或Ifortran Intel,我看到“库”,我可以更改它,但我不知道该将其更改为什么。

  • 我是新手,因此,如果您提供解决方案,请详细介绍。谢谢。 “在此处输入图像描述”>

I installed Visual Studio 2022. I then installed Intel OneAPI Base Toolkit followed by the HPC toolkit. Everything seems fine and I am able to create a Fortran project, but I am unable to run any code. When I write a code, the run bottom is greyed out (see attachment). I have read that I need to set up the Runtime library correctly but I don't think I know how to do that. For example, when I go to Project > Settings and scroll down to IFX Intel or IFortran Intel, I see "libraries" and I can change it but I don't know what to change it to.

  • I am a newbie, so if you provide a solution please be detailed. Thank you.enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

_蜘蛛 2025-02-16 22:16:46

现在解决了问题。事实证明,这是VS 2022 2.0版本和Intel Oneapi之间的兼容性问题。 VS的最新版本与Intel Oneapi Fortran不兼容。可以手动打开“使用旧的本机解决方案并构建服务”。请参阅此处:

https://devervendingercommunity.visalstudio.com/t/cant-cant-open-existing-fortran-fortran-projects-ca/10051432#t-n100552680

The problem is solved now. It turns out that it was a compatibility issue between VS 2022 2.0 version and Intel OneAPI. This lastest version of VS is incompatible with Intel OneAPI Fortran. There is a workaround to manually turn on the “Use the legacy native solution and build services". See details here:

https://developercommunity.visualstudio.com/t/Cant-open-existing-fortran-projects-Ca/10051432#T-N10052680

半世晨晓 2025-02-16 22:16:46

以下内容适用于通过英特尔并行工作室与英特尔编译器一起使用Intel编译器的最新安装。它可能适用于您的问题,即最新的vs 2022/intel oneapi:

在Visual Studio中转到 help/oniron oil Microsoft Visual Studio :列表中是否显示了英特尔编译器?

如果不是,则恢复在这里观点:

请确保在集成IDE步骤中选中Microsoft Visual Studio 2019

请务必以这种方式(由我公司的IT部门完成)

The following applies to a recent installation of Visual Studio 2019 with the Intel compiler via Intel Parallel Studio. It might apply for your problem with the more recent VS 2022 / Intel oneAPI, too:

In Visual Studio go to Help/About Microsoft Visual Studio: Is the Intel compiler shown in the list?

If not, a reinstallation as described here may help, paying attention to this point:

Be sure to check the box Microsoft Visual Studio 2019 in the Integrate IDE step

A reinstallation in this way (done by the IT department of my company) fixed a similar issue to yours for me.

飘过的浮云 2025-02-16 22:16:46

对于屏幕截图,只要您没有创建Fortran项目。您只是在自己查看源文件。

项目创建屏幕看起来像这样

“

,并且已加载的项目应在解决方案资源管理器(下面的顶级窗格)中具有文件。

“

值得一提的(就像其他人所说的那样),VS集成与VS2022 17.2.x.

可能的补救措施如下

  • 使用Visual Studio的先前版本。出于这个原因,我将与2017年保持在2017年,但VS2019也可以使用。甚至vs 2022 17.1.x工作。如果有此功能,请尝试检查是否可以编译Fortran。

  • 安装在英特尔论坛帖子中提到


  • 执行 USELEGACY 解决方案选项来自VS论坛帖子,但对我而言,这是由于某种原因而禁用 save> save-all 功能。

目前,我还不知道还有其他任何补救措施。

For the screenshot provided you do not have a Fortran project created. You are just looking at a source file on its own.

The project creation screen looks like this

scr1

and the loaded project should have files in the solution explorer (top-right pane below).

scr2

It is worth mentioning (like others have stated) that there is something broken in the VS integrations with VS2022 17.2.X.

Possible remediations are as follows

  • Use a prior version of visual studio. I keep VS 2017 around for this reason, but VS2019 would work also. Even VS 2022 17.1.X works. If you have this then try it out to check if you can compile Fortran.

  • Install the patch mentioned in the Intel Forum post

  • Do the UseLegacy workaround option from the VS forum post, but for me this disabled the Save-All functionality for some reason.

I am not aware of any other remediations at this point.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文