- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I installed gentoo with 2.6.12-r10 kernel and lastest 9.0.021 fortran on i865 2.8GHz Nortwood core with 4GB RAM.I tested allocating memory with gcc and i reached 3057MB. So I want to do with ifort too, but i got error
forrtl: severe (174): SIGSEGV, segmentation fault occurred, when program allocated array in subroutine. Is there some limits in allocating memory or where I made mistake?
mem.def:
integer*8 n,nnn,i
integer err
parameter (n=500)
parameter (nnn=n*n*n)
mem.f:
program mem
include 'mem.def'
real*8, allocatable :: p(:)
allocate(p(nnn),stat=err)
do i=1,nnn
p(i)=i
enddo
write(*,*)'stat=',err
read(*,*)i
call one
deallocate(p)
end
subroutine one
include 'mem.def'
real*8, allocatable :: k(:), l(:)
allocate(k(nnn),l(nnn),stat=err)
write(*,*)'started'
do i=1,nnn
k(i)=i
l(i)=i+1
enddo
write(*,*)'stat=',err
read(*,*)i
deallocate(k,l)
return
end
Link Copied

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page