Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26734 Discussions

Visual Studio debugger uses C, not Fortran, in locals window, with oneAPI

Steve_Lionel
Black Belt Retired Employee
1,658 Views

You'd think that I would not need help with something like this, but...

I have a new PC on which I installed VS2019 Community and the oneAPI HPC Toolkit. Everything works except, in the debugger, the Locals window uses C and not Fortran type descriptions and it doesn't understand some Fortran variables at all. I had this issue on my old PC, but an uninstall and reinstall fixed it. Not this time. I uninstalled both oneAPI and VS2019, deleted the VS folder, reinstalled both. Same behavior.

Any clues as to how to get the Fortran debug support working would be appreciated.

0 Kudos
1 Solution
Steve_Lionel
Black Belt Retired Employee
1,154 Views

"as a trial"? The oneAPI installs don't have trials - they are simply free. Nothing is going to run out.

What wasn't known when I entered this thread is that the Fortran debugger support for Visual Studio is contained in the "Intel Distribution for GDB" from the oneAPI Base Toolkit. So, if you install that, the debugging should work. I am told that a future update will move this to the HPC Toolkit.

 

View solution in original post

25 Replies
FortranFan
Honored Contributor II
1,430 Views

@Steve_Lionel ,

Sorry no direct insight, but I wonder whether input from various users might help you via the process of elimination?

For example, the debugger with Visual Studio Professional 2019 with the x64 platform configuration appears to recognize Fortran, see below ( x64 is all I will able to check for a few weeks with a test workstation with my employer that has both oneAPI and Visual Studio 2019)

vs.PNG

dbg.PNG

To All Readers,

Separately though the sorry situation with the "undefined pointer/array" remains - see above.  This is sad news for anyone hoping to modern Fortran features.  Note by modern Fortran, I mean Fortran 90 which is nearly 30 years old now - see this thread re: how it works with Digital Visual Fortran and Visual Studio Studio 6.0 circa 1999: 

Steve_Lionel
Black Belt Retired Employee
1,405 Views

I managed to fix it, but the solution I happened on is not likely to be useful to all. I uninstalled oneAPI, installed 19.1.3 (PSXE 2020 Update 4), then reinstalled oneAPI. Now the Fortran debugging works.

FortranFan
Honored Contributor II
1,364 Views

Re: "I uninstalled oneAPI, installed 19.1.3 (PSXE 2020 Update 4), then reinstalled oneAPI."

@Steve_Lionel wrote:
.. I uninstalled oneAPI, installed 19.1.3 (PSXE 2020 Update 4), then reinstalled oneAPI. ..

 

Intel Fortran team members,

Does a PSXE version, say v19.1.x, need to be installed in order to get debugger support toward Fortran with Intel oneAPI and a Visual Studio version, say Community or Professional?

Any clarification you can provide will be very useful.

Steve_Lionel
Black Belt Retired Employee
1,359 Views

I don't think that this is a requirement. Rather, the oneAPI installer somehow failed to "register" the Fortran debugger support with VS when I installed it cleanly. When I installed 19.1 first, the oneAPI installer alerted me that it would replace the existing integration.

The debug integration has always been a fragile part of the installation process. There used to be a simple series of steps one could take to manually register it, but I have no idea how to do it with newer VS.

Steve_Lionel
Black Belt Retired Employee
1,265 Views

Grumble - installed the HPC Toolkit on my laptop, and again I don't get Fortran in the VS2019 debugger locals window. VS2017 has the same issue. I have uninstalled and reinstalled, tried with and without the PSXE 2020 compiler, no help. Sigh...

Something is preventing the installer from properly adding the debugger support. If I look at the system where it works, there is a folder under C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\gm44gzoq.nqv\x86 with three DLLs - Fee.dll, ForIntrinsics.dll and ForOps_v16.dll. These files are NOT present on the system where it doesn't work (but other Fortran support DLLs are in a different folder.) 

Unfortunately, it's not likely to be as simple as copying the DLLs as the folder name is a random sequence (such as gm44gzoq.nqv)

FortranFan
Honored Contributor II
1,251 Views

@Steve_Lionel ,

If (and only if) you have time and think it'll be worth an attempt: you can repeat your earlier exercise and install PSXE (say v19.1, update 3) following VS Community install on this laptop and then try installing the oneAPI HPC toolkit.  

Steve_Lionel
Black Belt Retired Employee
1,244 Views

I did some digging into the oneAPI HPC installer. My conclusion is that it simply does not contain the Fortran debugger integration component. Opening the installer with 7-Zip and looking at the list of "packages" does not reveal any FEE/Debugger package, as earlier installs had:

Screenshot 2020-12-23 114006.png

That I have it on the system that works is because that system also has 19.1 installed and the oneAPI installer didn't replace the Fortran debugger support. I am doing some more experimentation.

Steve_Lionel
Black Belt Retired Employee
1,236 Views

Yup - that's the problem. The oneAPI installer just doesn't have the Fortran debugger support.

I did the following:

  1. Uninstalled oneAPI and 19.1
  2. Uninstalled VS2019 and VS2017
  3. Rebooted
  4. Deleted the VS2019 folder
  5. Installed VS2019
  6. Installed 19.1 Checked the version of FEE.dll, 20.0.2102.0
  7. Verified that Fortran debugging worked
  8. Installed oneAPI HPC toolkit
  9. FEE.dll was unchanged, date and version the same
  10. Fortran debugging worked

I am puzzled as to how this glaring omission eluded Intel Product Validation. It's possible that the beta lacked it too, but I can't tell now.

Ron, Devorah or Barbara - please get this fixed! Thanks.

Devorah_H_Intel
Moderator
1,228 Views

This issue was escalated to engineering. Case #INST-17719

Devorah_H_Intel
Moderator
1,331 Views

No,  I have oneAPI HPC and Base installed on the system that has no 19.1 compilers on it and never had.  I did see this issue described by Steve here when debugging Fortran project with arrays.  My fix was reinstalling HPC toolkit, repair didn't fix it. 

I will test this further and report to the IDE integration/FEE team. Thank you for reporting this issue.

jeffhamann
Beginner
1,047 Views

I'm running VS2017 and installed the oneAPI as a trial. 

VirtualBox_RFP-WIN10-VS2017-3.0_07_02_2021_09_37_40.png

I ran into a similar situation and found that by naming variables in my C code and making them global variables,  I could examine the values while stepping through the fortran source code. I couldn't examine fortran locals in the debugger watch window, but variables that were locals within a fortran subroutine/function remained "undefined." A variable that was a subroutine argument, that happened to be named the same as the C global variable, the value of the argument was zero - not the same as the first element of the globally defined array in the C source. The address of the variable is the same as the address in the C code (C debugger). While I know this doesn't solve the problem, it crated a temporary fix until I could post a message, which someone has already done here. 

My trial period ran out before I could get the debugger to work. Before I spend the money on the fortran tools, can someone tell me if this has been fixed? Has anyone tried to do this with the MingW64 tools? 

 

Steve_Lionel
Black Belt Retired Employee
1,155 Views

"as a trial"? The oneAPI installs don't have trials - they are simply free. Nothing is going to run out.

What wasn't known when I entered this thread is that the Fortran debugger support for Visual Studio is contained in the "Intel Distribution for GDB" from the oneAPI Base Toolkit. So, if you install that, the debugging should work. I am told that a future update will move this to the HPC Toolkit.

 

View solution in original post

JohnNichols
Valued Contributor II
1,017 Views

I thought if you accepted the defaults on oneapi base and hpc you got everything --

Steve_Lionel
Black Belt Retired Employee
981 Views

@JohnNichols yes, if you accept defaults you get everything. Not everyone wants multiple gigabytes of software they will never use.

mecej4
Black Belt
1,006 Views

Steve_Lionel wrote, "as a trial?"

There are multiple Intel web pages that one can reach after searching for information about OneAPI. This one, for example, does not make it clear that the product can be obtained and used without paying a fee.

Yes, the page title does say "support", but people may not always read a title after reaching it by clicking on a link. A reader with an assumption that there will be a fee to pay can easily find confirmation of the incorrect assumption by reading about the fee structure, etc.

 

jeffhamann
Beginner
968 Views

Indeed. I misspoke.

After considerable searching, I found that the oneAPI Base Toolkit was free and it installed without issue. 

The FORTRAN compiler, which is what I need, required the installation of the HPC Toolkit, which required several attempts to install - kept hanging, I would unselect all but the minimum required items for the FORTRAN compiler - I don't recall if the debugger required an additional selection - I managed to get some basic functionality in Visual Studio. I believe it is the HPC Toolkit trial which has timed out. When I attempt to build a FORTRAN library, the resulting message is: 

1>Error: The operation could not be completed
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I managed to get a library to build before I saw this message, so I tried to step through FORTRAN source code and got stuck in the debugger issue. 

I will check to see if I have the "Intel Distribution for GDB" installed - I'm mostly off-line and will check this next time I'm on-line. 

Also, Steve, you are the MAN! You have been answering questions about Compaq/Digital/Intel FORTRAN for as long as I can recall (since 1998 methinks) and I very much appreciate your efforts and contributions. Thank you!

 

Steve_Lionel
Black Belt Retired Employee
949 Views

You'd want to show us the buildlog.htm from the Debug or Release folder to see what the failure was.

I've been answering Fortran questions for a lot longer than to 1998!

jeffhamann
Beginner
937 Views

Would love to but... 

The file type (.htm) is not supported. Valid file types are: 7z, ai, bmp, bz2, c, cdr, cpp, css, csv, cxx, dib, dmp, doc, docx, eml, eps, f, f90, for, gif, gz, gzip, h, i, ico, icproj, img, jfif, jpe, jpeg, jpg, log, mdb, mdl, mov, mp4, odp, ods, odt, pdf, pjpeg, png, pps, ppsx, ppt, pptx, psd, qar, rar, rtf, rtx, sel, sig, sln, tar, tbz2, tgz, tif, tiff, txt, txz, v, vcproj, vcxproj, vfproj, vhd, vtt, wks, xcf, xls, xlsx, xml, xz, zip, 3g2, dmg, mp3, msi, mts, m2ts, ogg, srt, tar.gz, tar.gz.sig, tar.xz, p4.

and simply renaming the file BuildLog.htm.txt or BuildLog.txt doesn't work either.  The output window contains:  

1>------ Build started: Project: ORGRUN, Configuration: Debug x64 ------
1>Compiling with Intel® Fortran Compiler Classic 2021.1.2 [Intel(R) 64]...
1>EXECUTE2.FOR
1>Creating library...
1>
1>Build log written to "file://C:\Users\Jeff\Documents\Visual%20Studio%202017\seus\ORGRUN\x64\Debug\BuildLog.htm"
1>ORGRUN - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 4 up-to-date, 0 skipped ==========

which is great. 

I can't figure out why "The operation could not be completed" isn't being displayed and the project is successfully building after I installed the "Intel Distribution for GDB" component this morning. The project would successfully build without a problem until about a month after I installed the oneAPI and HPC Toolkit. I'm hoping that being connected to the Internet isn't a factor... 

Thank you!

mecej4
Black Belt
733 Views

Any files of a type that the forum software will not let you attach can be put into a zip or tarred-compressed *.tgz or *.tar.gz file, and that zip/tgz file can then be attached to your reply.

Steve_Lionel
Black Belt Retired Employee
727 Views

The output you quoted showed that nothing needed to be built. Try a Rebuild of the Solution.

Reply