Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Static Verification

Julie
Beginner
959 Views
Hi,
I'm trying to detect some errors in my program for memory leaks. When I compile my code with the default debug mode, it's ok. I have used static verification options and I obtained: 'error #12171, dereference of NULL pointer"H"...'. What does this error mean? The variable "H" has the following atribute: "REAL(KIND=8), ALLOCATABLE, TARGET"...
Moreover, using static verification options is the solution to detect memory leaks ?
Thanks.
0 Kudos
4 Replies
Steven_L_Intel1
Employee
959 Views
It could be an incorrect message. Unfortunately, the static verifier, while it can be useful at times, also has a tendency to "cry wolf" a lot. The way I use it is to take a quick look at the error and if I can't easily see the problem myself, move on to the next.

I think that in your case that SV is not seeing the allocation of H.

Some people have successfully used valgrind to detect memory leaks in Fortran code.
0 Kudos
rase
New Contributor I
959 Views
I try to solve a similar problem of memory leaks. What is valgrind? Do you have a reference, or URL? Thanks.
0 Kudos
jirina
New Contributor I
959 Views
Quoting - rase
I try to solve a similar problem of memory leaks. What is valgrind? Do you have a reference, or URL? Thanks.
Valgrind is a set of tools to detect memory management problems, to do profiling etc., but it is available only in Linux: http://valgrind.org/
There are similar products available for Windows, but usually not for free:
- Rational Purify Plus (http://www.ibm.com/developerworks/downloads/r/rpp/?S_TACT=105AGX28&S_CMP=TRIALS)
- Memory Validator (http://www.softwareverify.com/cpp/memory/index.html)
0 Kudos
Julie
Beginner
959 Views
Quoting - jirina
Valgrind is a set of tools to detect memory management problems, to do profiling etc., but it is available only in Linux: http://valgrind.org/
There are similar products available for Windows, but usually not for free:
- Rational Purify Plus (http://www.ibm.com/developerworks/downloads/r/rpp/?S_TACT=105AGX28&S_CMP=TRIALS)
- Memory Validator (http://www.softwareverify.com/cpp/memory/index.html)

I'm working on a Windows platform so I can't use Valgrind.
Thanks for the reference of Memory Validator! I have downloaded the evaluation version and it seems to be perfect to solve my problems of memory leaks!
0 Kudos
Reply