- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using CVF. When I ran my program using the debugger it runs well. But when I ran it without the debugger, it stuck without giving any error message. Any help is appreciated.
Thank you.
Thank you.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Most probably you have an uninitialized variable somewhere; note that CVF zeroes static arrays, but not allocatables and automatic arrays. That may happen, for example:
If i1(3) happens to be very large, you get a huge (but finite) loop which could stuck the program; something similar can be done with DO WHILE, resulting in an infinite loop.
You can insert control writes, which will tell you where the program got stuck. You can also debug the release version - use Project settings/Fortran/General/Generate debug info. The stepping will go a bit weird but you'll be able to at least approximately figure out where it got stuck. (However, note that this can cause the problem to disappear according to Heisenberg's Principle :-))
Jugoslav
ALLOCATE(i1(n)) ... i1(1)=1 i1(2)=something !forgot to initialize i1(3) ... DO j=1,2 DO k=i1(j),i1(j+1)-1 ...
If i1(3) happens to be very large, you get a huge (but finite) loop which could stuck the program; something similar can be done with DO WHILE, resulting in an infinite loop.
You can insert control writes, which will tell you where the program got stuck. You can also debug the release version - use Project settings/Fortran/General/Generate debug info. The stepping will go a bit weird but you'll be able to at least approximately figure out where it got stuck. (However, note that this can cause the problem to disappear according to Heisenberg's Principle :-))
Jugoslav

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