- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Itry to use /Qdyncom to dynamic allocate array in common block in some of subroutines for example
subroutine a1
integer m=10
real, dimension (0:m)::a,b,c
common /abc/a,b,c
....
return
end
subroutine a2
real, dimension (0:m)::x,y,z
common /abc/x,y,z
....
return
end
ifor /Qdyncom "abc" -o try try.f
My question is: before the program back to main routine, how to deallocate array in common /abc/ to release the momory?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please use ALLOCATABLE arrays rather than the non-standard "dynamic common" feature. Dynamic common does not work the way you think it does and it's original purpose was to allow for user-written routines for dynamic allocation. There is no way to deallocate a dynamic common.
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