allocating arrays, trouble



==
program unhappy

integer :: buff1=100,bugg2=500

....

contains

subroutine i_want_my_bigloo_compiler_back(buff1,buff2,....)

real*8, dimension(buff1,buff1,buff2) :: ger
real*8, dimension(buff1,buff2) :: ger2
.....
end subroutine i_want_my_bigloo_compiler_back
==

will give me a segmentation fault after executing a.out.

However:

==
integer :: buff1=100,buff2=500


contains

subroutine i_want_my_bigloo_compiler_back(buff1,buff2,....)

real*8, dimension(100,100,5000) :: ger
real*8, dimension(buff1,buff2) :: ger2
.....
==

works.

ifort -convert big_endian unhappy.f90

Thanks
.



Relevant Pages

  • Re: allocating arrays, trouble
    ... real*8, dimension:: ger ... will give me a segmentation fault after executing a.out. ...
    (comp.lang.fortran)
  • Re: allocating arrays, trouble
    ... real*8, dimension:: ger ... will give me a segmentation fault after executing a.out. ...
    (comp.lang.fortran)
  • Re: allocating arrays, trouble
    ... Funny you should call it bugg2. ... real*8, dimension:: ger ... will give me a segmentation fault after executing a.out. ...
    (comp.lang.fortran)