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

allocate source bug , memory corruption

pat97269
Beginner
735 Views

Hi,I report a bug on allocate with the source statement. When doing multiple allocate./deallocate in a loop, it ends with segfault on the spread intrisic function. The solution is actually to separate the allocate and the assignement, which point the source statement. ifort v12.1Pat
[fortran]program test implicit none double precision,dimension(:,:),allocatable :: bestmatrix,rand_mat,popul double precision,dimension(:),allocatable :: bestmem integer :: i,np=500,j logical,dimension(:),allocatable :: mask integer,dimension(:),allocatable :: indd allocate(bestmem(np),bestmatrix(np,100),rand_mat(np,100),popul(np,100)) allocate(mask(np)) call random_number(bestmem) call random_number(popul) call random_number(rand_mat) do i=1,10000000 call random_number(bestmem) mask=bestmem

0 Kudos
3 Replies
Anonymous66
Valued Contributor I
735 Views

Hello Pat,

Thank you for reporting this problem. I have escalated it to development. The issue number is DPD200178024. I will post any updates I receive on this issue to this thread.

Annalee

0 Kudos
Anonymous66
Valued Contributor I
735 Views

Afix for this issue has been found. We are currently planning to include it in the next major release.

Regards,
Annalee

0 Kudos
Anonymous66
Valued Contributor I
735 Views
This is issue has been fixed in Intel® Fortran Composer XE for Linux* 2013 which is now available at the Intel® Registration Center. Regards, Annalee Intel Developer Support * Other names and brands may be claimed as the property of others.
0 Kudos
Reply