- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey guys... I am stuck on this problem for days. My code is crashing but I can't understand the reason why.
I realized that the compiled program crashes when it is deallocating the variables, but I don't know how to fix it.
Windows has triggered a breakpoint in Console1.exe.
This may be due to a corruption of the heap, which indicates a bug in Console1.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while Console1.exe has focus.
The output window may have more diagnostic information.
Bellow there is a sample of the code:
Subroutine PoissonCode()
Use Mesh
Implicit none
Real(8), Allocatable :: u(:,:),v(:,:),p(:,:)
Character(50) :: Nome
Allocate(u(0:Imax,0:jmax),v(0:Imax,0:jmax),p(0:Imax,0:jmax),fx(0:Imax,0:jmax),fy(0:Imax,0:jmax))
Allocate(xd(0:Imax),yd(0:Jmax))........Code Here...............
Deallocate(u,v,p,fx,fy)
Deallocate(xd,yd)End Subroutine PoissonCode
I put the complete code here for further investigation. I also tried to run the code with different versions of GFortran in Windows 7 x64 and Windows XP x86 with no success.
Thank you in advance
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Dropbox link doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry...
Actually I already solved this issue. The problem was that in my code, I was trying to modify, by mistake, an invalid array position.
Thank you
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page