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

[bug] severe memory leak with -heap-arrays -assume realloc_lhs

Kacper_Kowalik
Beginner
1,506 Views

Hi,

following code:

program ala
implicit none
integer, parameter :: n = 100
real, dimension(n) :: vl
integer :: i
call random_number(vl)

do i =1, 100
call vanleer(vl)
enddo

contains
subroutine vanleer(a)
implicit none
real, dimension(:), intent(in) :: a
real, dimension(size(a,1)) :: c
end subroutine vanleer
end program ala

causes sever memory leak when compiled with -heap-arrays -assume realloc_lhs. Please see attached file for additional details (including valgrind run)

Best regards,
Kacper Kowalik

0 Kudos
3 Replies
Heinz_B_Intel
Employee
1,506 Views
Kacper yes - we recently got aware of the memory leak caused by -heap-arrays. It is a new issue for IFORT 13.0 and is independent of -assume realloc_lhs but more general. We escalated this to engineering already: Case number is DPD200235943. We hope to get it fixed for update 1 of 13.0 compiler. I will keep you updated on any news. As a workaround I only can recommend to not use -heap-array for now and to consider an increasing the stack size ( see : http://software.intel.com/en-us/articles/intel-fortran-compiler-increased-stack-usage-of-80-or-higher-compilers-causes-segmentation-fault/ ) Heinz
0 Kudos
Kacper_Kowalik
Beginner
1,506 Views
HeinzB (Intel) wrote:

Kacper

yes - we recently got aware of the memory leak caused by -heap-arrays. It is a new issue for IFORT 13.0 and is independent of -assume realloc_lhs but more general. We escalated this to engineering already: Case number is DPD200235943. We hope to get it fixed for update 1 of 13.0 compiler. I will keep you updated on any news. As a workaround I only can recommend to not use -heap-array for now and to consider an increasing the stack size ( see : http://software.intel.com/en-us/articles/intel-fortran-compiler-increase... )

Heinz

This is fixed in Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.1.117 Build 20121010 Thanks!
0 Kudos
Heinz_B_Intel
Employee
1,506 Views
Kacper yes, right. Fixed by the new update. I will mark the thread accordingly. Heinz
0 Kudos
Reply