- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error message means that you tried to deallocate an allocatable variable that was not allocated. But the other lines indicate that the stack has been corrupted by your program and it can't find the proper traceback data. Possibly you wrote outside the bounds of an array. You could run the program under the memory analysis feature of Intel Inspector XE and it might show you the problem. You can get a free 30-day trial of Inspector XE if you don't already have it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're trying the Static Analysis tutorial, that requires a Parallel Studio XE or Fortran Studio XE license. The Memory Checker should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>> A = 0.D0 where A is a 40 by 40 matrix, the debugger goes into limbo for about 30 seconds
When check for array index out of bounds, unfortunately this is the case. It check 1600 times. With a little extra work, the compiler writers could fix this. When I come up to this when debugging with array bounds checking enabled, I place the mouse on the next line, Right-click and select Run to Cursor.
>>Why would this statement generate an Invalid Memory Access error? OPEN(UNIT=IOUT, FILE="DefFLBear.inp") IOUT has been assigned a value of 21 a few lines earlier
Can you fix the other "bunch of things". The message you receive on the OPEN may be a side effect of the other errors.
What is the file extension of the source code files you are compiling? If yourName.F (*.F) these are fixed format files (F77 and earlier). This file format has explicit requirements as to which columns the statements are to be positioned....
The TAB character is one position regardless of how your editor (VS) displays the code. I suggest, if possible, to change the file type to .F90. This is free form.
Jim Dempsey
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Without seeing the program, it's hard to say what this means. But I'd expect that something is corrupting memory - your symptoms hint at that and the odd Inspector results do also.
The F10 issue is that the debugger has to single-step instructions until it reaches the next statement. Your array assignment is a lot of instructions, so it takes a while (single stepping is slow).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>The F10 issue is that the debugger has to single-step instructions until it reaches the next statement. Your array assignment is a lot of instructions, so it takes a while (single stepping is slow).
Correct, but in the case of A=0.0 or A=B, the compiler generates the index range and should know that it is impossible to index out of range. Knowing this, it should then generate the code sequence without subscript testing. The subscript testing is the major cause of the slow down.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jimdempseyatthecove wrote:I'm not so sure about the last bit. The debug subsystem and debugger have a good old yarn for each instruction executed by the debugee that is associated with the statement being stepped over - I think because the debugger wants to know if execution has moved off that statement (execution doesn't necessarily progress to the next statement in the general case) as part of the definition of what a "step" in source code is. Array subscript tests increase the number of instructions, but the basic problem is that a lot of instructions are executed for that one statement - it's still slow if array subscript tests are off.
>>The F10 issue is that the debugger has to single-step instructions until it reaches the next statement. Your array assignment is a lot of instructions, so it takes a while (single stepping is slow).
Correct, but in the case of A=0.0 or A=B, the compiler generates the index range and should know that it is impossible to index out of range. Knowing this, it should then generate the code sequence without subscript testing. The subscript testing is the major cause of the slow down.
Jim Dempsey
When you run to the run line (rather than stepping) the debugger can just do the int 3 trick that you are familiar with (or something equivalent), then sit back and wait for the fireworks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a Fortran error 153, nothing to do with Win32 API errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim, I did a test and did not see any bounds checking code for a whole array assignment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One other thing to look at, which should be caught by uninitialized (undefined) variable runtime test, is if your code has a branch around initialialization (do once) code:
IF(DidThisIndicator) GOTO 100
DidThisIndicator = .true.
... ! do once code
100 continue
The problem being the older F70 code may have worked more by accident than by design. Some of the older compilers, including CVF would default to making scalars to SAVE when the procedure was not recursive. The newer versions (e.g. IVF), these are automatic (stack). Thus if the do once code contains pointer initialization (of local variables), the(se) pointer(s) would be valid for the first call, and depending on circumstances:
a) may accidentaly be correct
b) may be incorrect and point to valid virtual machine address (corrupting code/data or using junk/or invalid/unallocated pointer)
c) may be incorrect and point to invalid virtual machine address (Seg Fault)
The correction will require for variables (pointers, array descriptors, data) that are requred to be SAVE, for you to explicitly add SAVE to the attribute. And conversely not add SAVE to those variables not required to be SAVE, as this may mess you up later should you want to code multi-threaded (e.g. OpenMP).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Brian, you earlier asked about tutorials. Inspector XE provides several of these with the product - you should go through them. You can open the Inspector XE GUI separately (from the Start menu) and click Getting Started, or just open file:///C:/Program%20Files%20%28x86%29/Intel/Inspector%20XE%202013/documentation/en/tutorials/index.htm in a web browser.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page