Problem with array allocation - SGI
This is a discussion on Problem with array allocation - SGI ; I've got this message when trying to compile a Fortran code with -n32
option :
f90 -n32 -mips4 -O3 app.f90 -lscs_mp -lfastm
real(8),dimension(NTEQMX,NTEQMX) :: A
^
f90-1435 f90: ERROR CAV3D, File = cav3dSM.f90, Line = 126, Column = 43
The ...
-
Problem with array allocation
I've got this message when trying to compile a Fortran code with -n32
option :
f90 -n32 -mips4 -O3 app.f90 -lscs_mp -lfastm
real(8),dimension(NTEQMX,NTEQMX) :: A
^
f90-1435 f90: ERROR CAV3D, File = cav3dSM.f90, Line = 126, Column = 43
The storage size needed for "A" exceeds 268,435,455 bytes, the
maximum storage size available.
NTEQMX value is about 18000.
This problem does not occur when compiling with -64 option, instead.
Any help would be apreciated.
-
Re: Problem with array allocation
In article <7a6b04cc.0403020318.7b4c5ad@posting.google.com>,
gobbi wrote:
>I've got this message when trying to compile a Fortran code with -n32
>option :
>
>f90 -n32 -mips4 -O3 app.f90 -lscs_mp -lfastm
>
> real(8),dimension(NTEQMX,NTEQMX) :: A
> ^
>f90-1435 f90: ERROR CAV3D, File = cav3dSM.f90, Line = 126, Column = 43
> The storage size needed for "A" exceeds 268,435,455 bytes, the
>maximum storage size available.
>
>NTEQMX value is about 18000.
>
>This problem does not occur when compiling with -64 option, instead.
>
>Any help would be apreciated.
Try
limit stacksize unlimited
then recompile.
At one time there was a 32bit field used to hold the size-in-bits
of variables in compiling Fortran
(which is a rather 'limiting' approach) but
I think we changed that.
da-17: !f
f90 -n32 t.f90
"t.f90": Warning: Stack frame size (2592000032) larger than system limit (536870912)
ld32: FATAL 10 : Unable to open output file ./a.out: Permission denied
da-18: cat t.f90
parameter ( NTEQMX= 18000)
real(8),dimension(NTEQMX,NTEQMX) :: A
A(1,1) = 1
end
da-19: limit
cputime unlimited
filesize unlimited
datasize 2097152 kbytes
stacksize 524288 kbytes
coredumpsize unlimited
memoryuse 368556 kbytes
descriptors 200
vmemoryuse 2097152 kbytes
threads 1024
I ftn90_fe 01/23/2004 Fortran 90 Front-end, 7.4.1m
Try looking at the output of 'limit' in your environment.
Hope this helps.
David B. Anderson davea at sgi dot com http://reality.sgiweb.org/davea
[The pointers are pure
My stack is clean as can be
Why the overflow? -- Tobias Kreidl]
-
Re: Problem with array allocation
When you compile it using '-n32', you only get a maximum of 2^31 byte
(2GB) address space. But your array A need 2592000000 Bytes
(18000*18000*8), larger than 2GB. Option '-64' will give you a much
larger address space (2^40 B), thus no problems. However, you might
need to adjust stacksize when you run the compiled program as
suggested by the previous post.
Sean
gobbi@ufpr.br (gobbi) wrote in message news:<7a6b04cc.0403020318.7b4c5ad@posting.google.com>...
> I've got this message when trying to compile a Fortran code with -n32
> option :
>
> f90 -n32 -mips4 -O3 app.f90 -lscs_mp -lfastm
>
> real(8),dimension(NTEQMX,NTEQMX) :: A
> ^
> f90-1435 f90: ERROR CAV3D, File = cav3dSM.f90, Line = 126, Column = 43
> The storage size needed for "A" exceeds 268,435,455 bytes, the
> maximum storage size available.
>
> NTEQMX value is about 18000.
>
> This problem does not occur when compiling with -64 option, instead.
>
> Any help would be apreciated.