Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29251 Обсуждение

Using Watch..and how to search help and this forum?

chris-sn
Начинающий
877Просмотр.
Two related questions...

1. I have a large FORTRAN program with many subroutines, somewhere along the line a common block variable is getting overwritten. Is there some way I can set up a watch so that I can step over and through chunks of code looking for the place that the overwrite happens?

2. I spent a frustrating time trying to find something in the online Help, or on this website, that I could search to find out if this question had already been answered. All I could find was a general search for the whole of the Intel site. Am I going blind...what am I missing ???

Thx

Chris
0 баллов
1 Решение
Les_Neilson
Ценный участник II
877Просмотр.
1. Insert a break point at the start of your program.
1.1 start debugging your program. When it stops at your breakpoint then get the address of the variable you want to watch. (e.g. in a watch window type LOC(commonVariable) +right click and select Hexadecimal display, which will give you the address of the variable)
1.2 select Debug->New Breakpoint->New Data Breakpoint and enter the address of the variable yu are "watching". (leave the language as C )
This will cause the program to break whenever the value of the variable changes.


Just above the list of threads there is a dark grey bar with :
"Threads in forum ..." [] Subscribe to the forum "SEARCH FORUM" ......

Les

Просмотреть решение в исходном сообщении

3 Ответы
chris-sn
Начинающий
877Просмотр.
Ah, some progress by downloading the chm file from here:
C:\Program Files\Intel\Compiler\11.1\060\Documentation\en_US\compiler_f\compiler_documentation_f.htm

I now have a searchable resource that tells me how to use Watch on a module variable as opposed to a COMMON variable.

Close, but no cigar
Les_Neilson
Ценный участник II
878Просмотр.
1. Insert a break point at the start of your program.
1.1 start debugging your program. When it stops at your breakpoint then get the address of the variable you want to watch. (e.g. in a watch window type LOC(commonVariable) +right click and select Hexadecimal display, which will give you the address of the variable)
1.2 select Debug->New Breakpoint->New Data Breakpoint and enter the address of the variable yu are "watching". (leave the language as C )
This will cause the program to break whenever the value of the variable changes.


Just above the list of threads there is a dark grey bar with :
"Threads in forum ..." [] Subscribe to the forum "SEARCH FORUM" ......

Les
chris-sn
Начинающий
877Просмотр.
Les, that's excellent thank you. Actually I guess the same technique works inpretty much any situation or language where you are watching a static memorylocation, so double thanks!

Thanks also forpointing out the search facility, yes it was me going blind then (or, as my wife would put it, "man looking").

Ответить