Re: allocating arrays, trouble



On Nov 26, 9:21 am, "Förster vom Silberwald" <chain_l...@xxxxxxxxxxx>
wrote:
==
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


sorry it should read:

==
program unhappy

integer :: buff1=100,buff2=500

...

contains

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

integer, intent(in) :: 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,....)

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



Relevant Pages

  • Re: allocating arrays, trouble
    ... real*8, dimension:: ger ... will give me a segmentation fault after executing a.out. ...
    (comp.lang.fortran)
  • 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)