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?