- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a derived-type with an allocatable array component defined as:
module type_one type, public :: one_t integer, allocatable :: i(:) end type one_t public operator (+) interface operator (+) module procedure add end interface contains elemental function add(u,v) result(res) type(one_t), intent(in) :: u,v type(one_t) :: res res%i = u%i + v%i end function end module type_one
Compiling with -assume realloc_lhs and executing the addition operation as follows results in a memory leak:
program mem_leak_test use type_one implicit none type(one_t), allocatable :: a(:), b(:), c(:) integer :: i allocate(b(4), c(4)) do i = 1,4 allocate(b(i)%i(5)) allocate(c(i)%i(5)) b(i)%i = 1.0 c(i)%i = 2.0 end do a = b + c print*, a(1)%i end program mem_leak_test
This was first observed on OS X using ifort v15.0.3 confirmed on Linux ifort 15.0.2. Valgrind --tool=memcheck produces the following:
==3411== LEAK SUMMARY:
==3411== definitely lost: 60 bytes in 3 blocks
==3411== indirectly lost: 0 bytes in 0 blocks
==3411== possibly lost: 0 bytes in 0 blocks
==3411== still reachable: 1,136 bytes in 16 blocks
==3411== suppressed: 0 bytes in 0 blocks
This seems related to the following topic:
https://software.intel.com/pt-br/forums/topic/269437
Reproducer is attached.
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am still able to reproduce this issue in ifort 17.0.1 20161005
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, sorry, there's been no resolution to this issue yet. We'll keep the post updated when there is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am still able to reproduce this issue with ifort 19
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wukie, Nathan wrote:I am still able to reproduce this issue with ifort 19
I'll suggest you follow up at Intel OSC: https://supporttickets.intel.com/servicecenter?lang=en-US
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »