- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I'm finding that while stepping throughcode under Visual Studio 2005,
three-dimensional array initialization is extremely slow.
It takes on the order of a minute to initialize an array of about 32x32x32 and over an hour (or more, I've never waitedfor it to finish) fora 512x512x512 array. (The code is simply myArray = 0)
I'm calling a fortran routine from C++. If I step *over* the call to the fortran routine, it seems to run at a normal speed. But if I step *into* the function, all 3D array operations are painfully slow.
Has anyone else seen this behavior?
Thanks,
Jon
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm going to take a wild stab at it...
If you "step into" then it only does one array element; if you "step over" then it goes through all of them.
If you "step into" then it only does one array element; if you "step over" then it goes through all of them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting. If you turn off bounds checking, does it help? I know we made a change to the compiler a few months ago to help with situation such as this and am surprised that you're seeing it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
I did turn off bounds checking, and it didn't help... So I think it's actually some interaction with the debugger itself, because if Inever step into the fortran code, it runs full speed.(Is every element assignment in the array triggering some callbackin the debugger to update a [non-existent] gui???)
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, but stepping within the routine may step through many instructions. Please send an example to Intel Premier Support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For what it is worth:
When debugging, and encountering an array statement (e.g. array=0. or arrayA=arrayB), avoid stepping over the statement. Instead, right click on the line following the array statement, then choose Run To Cursor.
Jim Dempsey

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