Software Archive
Read-only legacy content
17061 Discussions

In Debug mode Watch doesn't display proper values

Amalia_B_
Beginner
4,586 Views

I believe I've seen other posts with this problem, but this is aggravating as it makes the Debugger somewhat useless while tracing through a program.  While in Debug mode and stepping through execution lines, all local variables, whether I specify them in the Watch window, or mouse over them in the code, the debugger doesn't display the proper values.  I believe internally, variables are being correctly computed as the program wouldn't work otherwise, but the variables [when viewing at a breakpoint] are extremely large or extremely small, as if uninitialized.

My compiler options:

/nologo /debug:full /Od /Qdiag-enable:sc-include /debug-parameters:all /warn:declarations /warn:unused /warn:ignore_loc /warn:uncalled /warn:nousage /warn:interfaces /Qcomplex_limited_range /Qfp-stack-check /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc100.pdb" /traceback /check:pointer /check:bounds /check:uninit /check:format /check:output_conversion /check:arg_temp_created /check:stack /libs:qwin /dbglibs /c

Is this a known bug?

Amalia

0 Kudos
26 Replies
DavidWhite
Valued Contributor II
977 Views
Bernth, I have tried the Excel call and all appears OK with v13.0 Update 1. Today I downloaded and install the full Studio Update 1 package, while last week I had simply updated the Compiler part. I don't know whether that makes any difference. Otherwise, I can only guess that I did not rebuild my DLL properly when I tested it last week. My apologies. Regards, David
0 Kudos
gianni_c_
Beginner
977 Views

Hi,

This nasty problem strikes again with parallel_studio_xe_2013_update2.

It has disappeared with update1...

Two phenomenom:

> debugger reporting weird values

> and program bugging!

Config:

Visual Studio 2012 + Parallel studio 2013 update 2

Target: Intel C++ Compiler XE 12.1 (v100)

The programs works ok if compiled in debug mode, itr works ok too if compiled in Release using Microsoft Visual Studio.

HELP REQUESTED!

>Thanks

0 Kudos
Hans_P_Intel
Employee
977 Views

Gianni,

Thank you for the heads-up. Please open a Premier issue with more specific information (alternatively, you can reply with a private message, and attach your code). A reproducer would be very helpful for us, and I would be glad to take your case.

Thank you!

0 Kudos
gianni_c_
Beginner
977 Views

Hi Hans -

Please find attached a small test solution that illustrates the issue.

You'll see that although it works properly if compiled in debug mode, its behaviour is completely crazy

in release mode !

gianni

0 Kudos
Georg_Z_Intel
Employee
977 Views
Hello Gianni, the problem you reported is neither a compiler nor debugger issue. The result is intended. Rationale: You used IVDEP pragma which makes the compiler ignore assumed dependencies. This usually has benefits in cases were those assumed dependencies never hold during runtime. The compiler can apply more aggressive optimizations. In your case, however, assumed dependencies hold, which are accesses to array "hist". There can be multiple loop iterations writing to the same element of that array. With the IVDEP pragma you had indicated the compiler that multiple accesses can not happen, which is wrong. If you use this pragma (also applies to SIMD pragma) you have to always verify your code. You apparently did so and proved not to use that pragma for your algorithm. Best regards, Georg Zitzlsberger
0 Kudos
gianni_c_
Beginner
977 Views

Many thanks Georg,

Indeed the Ivdep pragma was definitively wrong!

cheers

gianni

0 Kudos
Reply