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

Problem in watching value in debug mode of fortran code in Visual studio 2019

Ani_mondal_2020
Beginner
5,781 Views
I am running my fortran code on Intel visual studio 2019 using Intel fortran compiler. I want to watch the value of any variable inside the code, lets say, value of the variable gap within the file named PD_ph_f_cera_fort.f90, after applying a breakpoint at gap. But I am failing to watch the value and it is showing the erroridentifier "gap" is undefined inside the watch window below. Can you please guide me finding why am I facing the issue and how can I watch the value after applying breakpoint in debugging mode? 
I am attaching three things with this mail for your convenience:
  • file structure.pdf
  • snapshot of the microsoft visual studio screen before pressing start button.jpeg
  • snapshot of the microsoft visual studio screen after pressing start button with debug mode.jpeg
 
Waiting for your valuable reply as early as possible.
Please ask me if you have any queries.
 
Thanks in advance
Anirban
0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
5,731 Views

Why are you installing the beta? The oneAPI HPC toolkit (with Fortran) is released.

View solution in original post

12 Replies
Steve_Lionel
Honored Contributor III
5,768 Views

That the variable name shows as lowercase tells me that the Fortran debug integration isn't being used. Try an uninstall and reinstall of the Intel compiler.

0 Kudos
Ani_mondal_2020
Beginner
5,742 Views

After re-installing Intel Fortran compiler(Intel Fortran Compiler(Beta) for Windows), the same problem exists. I have installed the following files apart from Microsoft visual studio 2019 to run and debug my Fortran code from the site (https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html#fortran 

  1. Intel Fortran Compiler(Beta) for Windows
  2. Intel Open Volume Kernel Library for Windows
  3. Intel openAPI Math Kernel Library for Windows
  4. Intel oneAPI Data Analytics Library for Windows
  5. Intel Inspector for Windows

I have downloaded all files from installer 'Local'.

Can you please tell me that all the files mentioned above are required to install or not to watch the value in debugging mode? And also guide me if any other files are needed to be installed from any other source to solve my purpose.

0 Kudos
Steve_Lionel
Honored Contributor III
5,732 Views

Why are you installing the beta? The oneAPI HPC toolkit (with Fortran) is released.

Ani_mondal_2020
Beginner
5,706 Views

After installing oneAPI HPC Toolkit with openAPI Base Toolkit, my problem has resolved. Thanks!

0 Kudos
yudtu
Beginner
5,576 Views

I have the same problem. I can not get the debug watch information.

I have installed the toolkit

yudtu_0-1612470390792.png

My visual studio version is 2019 version 16.8.4.

See the below. I create a simple program, but I cannot watch the information.

yudtu_1-1612470629754.png

 

 

Steve_Lionel
Honored Contributor III
5,557 Views

Please show a screenshot of the Locals window.

0 Kudos
yudtu
Beginner
5,542 Views

the problem is solved for now after I unstall and reinstall everything, VS, base and Hpc. 

0 Kudos
lpmorenoc
Beginner
5,150 Views

I have the same problem after I installed oneAPI. Does it really the only solution to install again everything?

0 Kudos
Rick_S
Beginner
2,698 Views

I have the same issue with recently installed (upgraded from 2019) MVSC 2022, Intel Fortran compiler 2023. I also installed the Intel oneAPI HPC Toolkit with openAPI Base Toolkit. When I scroll over variables during debugging I used to see the values in MVSC 2019, now nothing is shown. Screenshot of Locals below:

Rick_S_0-1682355987359.png

 

 

0 Kudos
Wen-TUD
Novice
2,180 Views

Hi Rick,

 

same trouble here. Have you solved the problem?

 

thanks.

Wen

0 Kudos
HYKim
Beginner
3,821 Views

It was helpful to set the compiler optimization option as Disable.

    : Solution explorer -> Fortran project -> Properties -> Fortran -> Optimization

With options like /O3, breaking points worked, but values of variables were not available for watch.

 

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,682 Views

Is your call stack in the focus of the procedure with those variables?

IOW, if your procedure with those variables, called a library procedure, and that errored .AND. EPS1 and EPS2 were global variables, then you might see what you have shown.

Jim Dempsey

0 Kudos
Reply