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

tool for memory leak detection

zbarcelos
Beginner
2,148 Views
Hello,

I'm in charge of debugging a linux application (all libraries and main code compiled under linux with intel fortran 11.1, 64-bit). I'm sure I have some memory leaks ( some pointers that i didn't deallocate)

The point is that I didn't find the intel tool needed for this task (Identifying the function

I've been reading about the studio XE suite (which I have the license for, but I don't want to loose unneeded project time recompiling all libraries and the main code in a new environment, which I need to install).

Can somebody help me ? Is there a specific tool or the intel debugger can handle it ?

Thanks,
Fabio
0 Kudos
1 Solution
Steven_L_Intel1
Employee
2,148 Views
Memory leak detection is part of the Intel Inspector XE product in conjunction with the Composer 2011 XE (12.0) compiler. See its documentation for how to build and run the program under the memory checker. (I'm not, offhand, familiar with how one does this on Linux.) There is no support for this with the 11.1 compiler.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
2,149 Views
Memory leak detection is part of the Intel Inspector XE product in conjunction with the Composer 2011 XE (12.0) compiler. See its documentation for how to build and run the program under the memory checker. (I'm not, offhand, familiar with how one does this on Linux.) There is no support for this with the 11.1 compiler.
0 Kudos
Ron_Green
Moderator
2,148 Views
Yes, IF you can find the time to get Parallel Studio XE installed, and you can get your application to build successfully ( if it builds under 11.1, it should compile under 12.0 barring any new compiler bugs. The options in 11.1 will work with 12.0 ) you can use the Inspector XE tool.
Parallel Studio XE includes samples and tutorials on Inspector XE. Currently those are in C/C++ but the workflow is identical for Fortran. Here's the tutorial doc for Inspector XE for Linux:
Now IF you absolutely have to stay on 11.1, try valgrind. Many/most linux distros have it installed by default.
Build your code with symbols, -g
valgrind --leak-check=summary a.out
Valgrind will report a number of "false positives" in the Fortran IO routines, like for_formatted_write etc. You'll have to filter those out, they're bogus. Make sure to use the most recent version of valgrind you can get your hands on. Oh and don't get a false sense of security with valgrind. Like a lot of tools it's written for the gcc/g++ community, Fortran support is not it's forte.
ron
0 Kudos
Reply