Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* [Q] DEC Alpha / F90 stack problem ...
@ 1998-06-04  4:00 dEdmundson
  1998-06-05  4:00 ` Steve Lionel
  0 siblings, 1 reply; 2+ messages in thread
From: dEdmundson @ 1998-06-04  4:00 UTC (permalink / raw)





We have a number of "OSF1 V4.0 878 alpha" workstations.  The following
simple Fortran90 code works on various other platforms but gives a
segmentation fault on our DEC boxes.  It may be that the large temporary
arrays created by the subroutine are being allocated on the stack
rather than the heap.  If so, can this behaviour be changed or
otherwise remedied?

----test.f90------

program test
  use foomod
  real, allocatable :: d(:,:)
  allocate( d(600,500) )
  d=3.14
  call foo( d )
  deallocate( d )
end program test

----foomod.f90----

module foomod
contains
  subroutine foo( d )
    real :: d(:,:)
    real :: tmp(size(d,1),size(d,2))
    tmp = cshift( cshift(d,1,dim=2) ,1,dim=1)  ! segmentation fault
  end subroutine foo
end module foomod

-----------------

compiled with 'f90 foomod.f90 test.f90'


Thanks for any help you can offer.

Darran.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-06-05  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-06-04  4:00 [Q] DEC Alpha / F90 stack problem dEdmundson
1998-06-05  4:00 ` Steve Lionel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox