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

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

Ani_mondal_2020
初学者
9,889 次查看
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 项奖励
1 解答
Steve_Lionel
名誉分销商 III
9,839 次查看

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

在原帖中查看解决方案

12 回复数
Steve_Lionel
名誉分销商 III
9,876 次查看

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 项奖励
Ani_mondal_2020
初学者
9,850 次查看

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 项奖励
Steve_Lionel
名誉分销商 III
9,840 次查看

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

Ani_mondal_2020
初学者
9,814 次查看

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

0 项奖励
yudtu
新手
9,684 次查看

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
名誉分销商 III
9,665 次查看

Please show a screenshot of the Locals window.

0 项奖励
yudtu
新手
9,650 次查看

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

0 项奖励
lpmorenoc
初学者
9,258 次查看

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

Rick_S
初学者
6,806 次查看

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 项奖励
Wen-TUD
新手
6,288 次查看

Hi Rick,

 

same trouble here. Have you solved the problem?

 

thanks.

Wen

0 项奖励
HYKim
初学者
7,929 次查看

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 项奖励
jimdempseyatthecove
名誉分销商 III
6,790 次查看

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 项奖励
回复