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

VS 2005 debug array bounds fails

john3
Beginner
569 Views
Have started to use IVF 10.0.026 with VS2005 (from microsoft, not intel support version) on an EMT64 platform. Am coming from a 32 bit platform with VS2003.

In debug mode, have encountered array bound errors (my fault) which the VS2005 debuger does not seem to catch. On error, program stops, but no VS2005 stack trace to see which array was bad.

Surly this is not correct behavior. Would have expected VS2005 to have caught the problem and let me know where in the program it stopped.

And just to make sure, I un-installed IVF and its VS support and then re-installed.

Is this normal ? Hope not.

Thanks. John
0 Kudos
12 Replies
Steven_L_Intel1
Employee
569 Views
What is often confusing is that the console window with the error message and traceback is behind the VS window, so you don't see anything useful until you bring that window to the front. When the error is signalled, you're up in the run-time library, so you can use the call stack window to set the context back to your code.

Let me know if this helps.
0 Kudos
john3
Beginner
569 Views
I have the Call Stack window fully visable. When the out of bounds error occurs, the first text box is Visual Studio announcing my code has triggered a break point. Clicking Break, next VS text box is a message saying 'No Source Code Available'.

Clicking OK dismisses the text box, and the Call Stack Window only shows the library routines (apparently) where the error occured. No stack strace back to my code.

Any suggestions. Thanks.
0 Kudos
Steven_L_Intel1
Employee
569 Views
Look for a separate window with the traceback. But the call stack pane should have an entry for your code, several levels down.
0 Kudos
Les_Neilson
Valued Contributor II
569 Views

I have noticed that whenwe hadarray bounds errors occuring in read or writing ofarray element(s) with out of bounds subscripts, that the call stack usually showed only the kernel or libif entries and the calling fortranentries were not listed. It got so we checked our I/O calls first, whenever this happened. The next thing to check was inconsistent data types (argument mismatch) which can sometimes mess up the call stack.

Les

0 Kudos
Steven_L_Intel1
Employee
569 Views
Also, make sure you're using a current compiler version. Some older versions had the libraries built in a way that the call stack was not usable. (10.0.026 should be ok for this.)
0 Kudos
john3
Beginner
569 Views
Have current 10.0.026 on VS2005 on a two dual core intel machine in Win 64 bit. Wasted most of yesterday un-installing / re-installing VS2005 and IVF 10.

Problem persists. On a quickie new soluton test, array out of bounds brings up the call stack and everything seems as it should.

But get to a real solution environment with libraries, several projects, and redirection of *.exe files and VS / IVF fails to find the call stack on arrary bounds. Call stack comes up, but has absolutely no information as where in the code the error occured. In fact, it has almost no information about the code. Completely defeats the idea of a de-bugger.

If I put a break point at where I purposely test array bounds, the call stack comes up with full information just before the error. Then let program run the statement with array bounds error, program stops, but VS 2005 / IVF becomes clueless as to call stack information.

Something is not correct. Any suggestions.

Thanks.

John
0 Kudos
Steven_L_Intel1
Employee
569 Views
I would recommend putting together a test case and submitting it to Intel Premier Support. I can't begin to guess what the problem might be with something that complex.
0 Kudos
jimdempseyatthecove
Honored Contributor III
569 Views

John,

Can you post the statement that causes the array out of bounds? (Include dimensions, typesand values, etc...)

It sounds like this is not an execution statement (where runtime bounds checking will detect out of bounds), but rather an I/O or call external function/subroutine with reference to array and info (subscript, record number, id, ...)for accessing the array, and that routine accessed memory in la la land.

Jim

0 Kudos
john3
Beginner
569 Views
Gave up trying to fix this as I needed to get on with my work. Will use old 32 bit VS 2003 for serious development.

That said, yesterday, still using IVF 10.0.026 and VS 2005, found that on an allocate error (for an array that already was allocated and for which I did not trap with error flag) that IVF failed to communicate to VS 2005 call stack information.

When break points are put into VS 2005, the call stack has all the relevant information, but when IVF errors out, call stack info appears lost.

John
0 Kudos
Steven_L_Intel1
Employee
569 Views
John,

Please report this to Intel Premier Support so that it can be investigated. Thanks.
0 Kudos
g_f_thomas
Beginner
569 Views

MADsblionel:
What is often confusing is that the console window with the error message and traceback is behind the VS window, so you don't see anything useful until you bring that window to the front....

Minor point, when the desktop gets cluttered the Switch between Windows icon sitting next to the Start button on the Vista taskbar stacks all the windows like a deck of cards so on clicking the one you want it comes to the fore.

Gerry

0 Kudos
Steven_L_Intel1
Employee
569 Views
Gerry,

That's a good point for those who have not disabled the "grouping" feature.
0 Kudos
Reply