Issues with Intel Fortran in Visual Studio

Thank you very much for listing the 5 issues.
Issue 1 sometimes happens, restart VS solve the problem. I think it is perhaps related with Windows, after windows 10 1909 I sometimes have this issue.
Issue 2 is always a problem. Yes the IDE will begin to slow down after several hours or so. I usually need to restart VS.
Issue 3 is OK, not a big problem for me, but yes I understand it bothers some people.
Issue 4 I agree. I usually try my best to enable those intelliSense stuff, like below. But it is just not that intelligent.

Issue 5 rarely happens. But always ctrl + s and save project is necessary.
Overall I agree with you. But I can still live with VS + intel Fortran LOL.
But I do wish Microsoft and Intel people can make big improvements and make VS + intel Fortran better.

1 Like

Thanks for pointing out the IntelliSense settings, somehow I never noticed those!
It’s still not what I would imagine (for example, I love to use ctrl+click to navigate to function definitions, which this doesn’t have), but a huge improvement over the default settings.
I don’t understand why Intel sets almost everything to false as default.

1 Like

Interesting! I have never had 1, 2 or 5 and use VS exclusively continuously but on Windows 7.

@mkonecny , here I think you’re referring to Visual Studio’s infamous unspecified error, “The operation could not be completed.

This is systemic in Visual Studio due to which the cyberspace is full of complaints and issue threads but for which the root cause(s) are unclear and where many a remedy is posted but no definitive cure is in sight.

Now, Intel software team’s integration of their Fortran compiler system with Visual Studio may be further exacerbating the problems for Intel Fortran users but it is a case where a very complex IDE solution with complicated dependencies are also at play:

You are welcome. I guess Intel disabled many settings , perhaps because those settings may influence the IDE performance a little bit.

There are some other settings makes VS looks kind of cool.

My VS+intel Fortran typically looks like below,

Overall, not too bad. But definitely does not have the intellisense you mentioned, which is not great:(
But the issue 1, the slow down issue really bothers me the most LOL.

You can also add some flags such as /QxHost from the project properties like below,

If you need MPI, you need to add MPI library to the linker, like below,

You could also run/configure some Intel Advisor, Vtune stuff from the buttons,

Sometimes these tools may of some helper.

As to debugger, I am not good at it. I just kill bugs by writing out corresponding results here and there. LOL.

I wish Intel Fortran guys could upload some more video tutorials as to how to make the best use of VS+intel OneAPI.

I strongly recommend you try out the debugger. It saves me a huge amount of time and is honestly the only reason why I’m stuck with Visual Studio.

It’s easy to use. Just setup your command arguments in the project configuration under Debugger, if needed. Put breakpoints in your code wherever you want to stop. You can then inspect your local variables and step through your code.

One weird thing that happens with Fortran is that often when you have a matrix operation on a line (I think it usually happens with matmul()) and you want to Step Over that line, it takes an incredible amount of time for no apparent reason. Sometimes it’s minutes.
In this case, just go to the following line, and do Run To Cursor (Ctrl+F10), which works instantly.

…btw, I had to restart Studio about 20 times during 4 hours today…


I agree that Intel’s Visual Studio integrations are just terrible. The “IntelliSense” stuff is entirely useless and makes the whole application unstable. You basically have to disable all that. Intel has never seemed to care enough to fix this (it’s been years and years like this). I don’t use VS as an editor anymore, I also use VSCode. With a few of the open source plugins, VSCode is a vastly better Fortran editor than the Intel Visual Studio integrations. I keep VS open to hit “Compile”, or when I need to use the debugger, but otherwise do all editing in VSCode. I too wish they would provide a debugger that works with VSCode.


@mkonecny, it would be nice if we can implement and document how to use a debugger with Fortran in VSCode, since it is open source and runs on Windows, macOS and Linux. I haven’t had time to investigate whether it is even possible to set up.

1 Like

I guess this is going to be different on different platforms - vscode can either use Visual Studio Windows debugger (vsdbg) or GDB or LLDB as the underlying debugger (depending on the type option in launch.json).
Vsdbg is going to understand .pdb symbol files generated by ifort on Windows and gdb is going to understand whatever gcc/gfortran generates, but not vice-versa.

I tested the vsdbg option today and found out that Fortran binaries can indeed be debugged on Windows.
Everything seems to work except you can’t see the contents of arrays, because the debugger doesn’t know the data type.
Scalars and user-defined types are visible just fine. (I was surprised by the user-defined types.)

When working with ifort on Linux, one can use the gdb-based debugger that Intel supplies.
It worked seamlessly, as far as I can remember (I used it a year ago).

I can write some sort of a how-to for these two cases, but the Windows case is very spartan and practically unusable without the arrays.
But if it would lead to someone (maybe it doesn’t even have to be Intel) writing an extension that makes the arrays viewable, I’m all for it.


Is there a Fortran debugger that understands arrays? I would say that’s absolutely essential for Fortran…

1 Like

On Linux, the gdb-based one from Intel does.


I have had decent luck with gdb (including the one that comes with the Intel compiler) on Linux. I have not had good luck with debuggers on other platforms. I suspect that has to do with the proprietary nature of Mac and Windows, but that’s just a hunch.


Man, that is crazy, have you tried load to the discrete GPU like below,

and set things like using hard acceleration or something?

VS on windows 10 for me does seems to need to be restarted every once in a while, but 20 times in 4 hours seems too bad :sweat_smile: It seems intel team just do not care about the VS integration thing :rofl:

The main reason for the restarts is the “The operation could not be completed” error, so the above doesn’t really solve my case…

The original fortran language server project seems to be inactive, but there’s a recent fork where many issues have been resolved: GitHub - gnikit/fortls: fortls - Fortran Language Server for the Language Server Protocol


@mkonecny , I suggest you start a thread with your specific issue with "The operation could not be completed” error at the Intel Fortran forum: Intel® Fortran Compiler - Intel Communities. And if you or your org have support subscription with Intel, submit a support request at their support center: Online Service Center

Also, without mentioning Intel Fortran integration at first, I suggest you start threads looking for feedback and assistance on how to avoid this Visual Studio problem at MSDN Social site as well as StackOverflow.

Separately consider planning an update to Visual Studio 2022 if you are able to - it holds promise as a 64-bit application with improvements in performance on Windows OS. I have been trying it off and on for over a week now to help another team I work with and VS2022 seems to perform better thus far: no "The operation could not be completed” errors yet. But I admit with mixed-language projects (C, C++ with Fortran or C#, Visual Basic with Fortran) I will soon face this error - my hope is only for a reduced frequency of this error.

Nice, didn’t know about that one :+1: !

I’ve already spent hours trying to solve this.

I guess I could write to the Intel forum, but as there are other things I dislike about Visual Studio, my primary goal is to get them to support vscode debugging, so I’ll be doing that first…

Good to hear about improvements in VS2022. I can’t do it whenever I like because the whole team has to do it, but I guess we’ll be switching soon (this year).

I see.
I found sometimes it may be related with Windows SDK version.

The latest version of SDK may help.

I wrote a plea to Intel asking to create a vscode debugger extension. See this post for details: