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

memory leak

tiho
Beginner
586 Views

I have a memory leak in my executable that I am unable to pinpoint. The computation is wildly complex with many iterative subroutine calls, many derived types and heavy pointer usage. I have checked the computation as much as I can and it appears that all array and pointer allocations are done properly. Regardless, for no reason, the amount of the memory the executable is using keeps increasing with the number of iterations to eventually reach a state where all the memory in the computer in taken by the executable. - at that point the exe continues to compute and the used memory goes up and down. This is on Windows 7 and I have tried Intel Fortran 12 and 14. Both have the same behavior. Additional somewhat bizarre behavior is  the memory leak occurs  only during the first iteration of a loop within which there are complex calls. That loop is repeated many times.

Are there any compiler options that can help?

0 Kudos
2 Replies
Steven_L_Intel1
Employee
586 Views

This is what Intel Inspector XE is made for. It can check for and locate memory leaks, and also has a memory growth analysis. You can get a free 30-day trial.

0 Kudos
tiho
Beginner
586 Views

Fantastic. Much appreciated Steve!!!!!

0 Kudos
Reply