On Sat, 2009-10-10 at 19:36 -0700, ben blackwell
<[log in to unmask]> wrote:
> I am a novice at using F90 memory allocation. I am debugging a code
> and I suspect I may have a memory leak issue. I am running the Absoft
> F90 compiler and fx2 (v1.31) debugger. When I examine variables within
> the debugger, the values appear to be wrong but when I print those
> same variables they appear ok. On other codes that do not have memory
> allocation plus a few that do, the fx2 debugger works like a champ.
> Have any of you experienced debugger related issues when you have
> memory allocation?
The Fujitsu compiler (at least their 32-bit Linux compiler) emits tables
the Fujitsu debugger doesn't understand, especially in the case of
pointers and assumed-shape dummy arguments. Fortunately, totalview
understands the Fujitsu compiler debugger tables -- but totalview isn't
free, or even inexpensive.
If you really think you have a memory leak, consider using a compiler
that has memory leak detection (which Fujitsu claims to have in its
debugger, but it doesn't seem to work), or a tool that intercepts the
low-level allocators (malloc and free), such as mpatrol or valgrind. If
the Fortran runtime puts its own allocator atop those, fetching large
chunks from malloc and then subdividing them, mpatrol and valgrind won't
be much help. Otherwise, they are very useful.
--
Van Snyder | What fraction of Americans believe
[log in to unmask] | Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.
|