- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
hello,
i do need an array with the following description:
integer(2) :: iSort(50000000,4,11)
i get the error: catastrophic error: Variable ...iSort too large for NTCOFF. Bigger then 2GB. Use heap instead.
The system is an Win 7 Prof 64bit, the project in an win64-project
In the configuration i have changed:
- fortran/optimisation: heap arrays --> 0
- linker/system: heap reserve size --> 500000000
- alternativly linker/system: heap commit size --> 500000000
The error remains.
What have i done false? What have i missed?
Thanks in advance
Frank
- Marcas:
- Intel® Fortran Compiler
Link copiado
7 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
You could try making it an allocatable.
Les
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hello Les,
it works.
This means that i can adress an array larger then 2GB just by an allocatable array but not with an 'static' array. Is this correct? Even on an 64bit system?
Frank
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
That is correct.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Well it mostly works, as demonstrated in the example below:
integer(2), allocatable, dimension(:,:,:) :: iSort
INTEGER(4) :: I
!
ALLOCATE (iSort(50000000,4,11), stat=i)
WRITE (*,*) SIZE (ISORT), i
write (*,*) 'Expected SIZE = ', 50000000_8 * 4_8 * 11_8
write (*,*) 'GB = ', (50000000.0 * 4.0 * 11.0) * 2. / (2.**30)
END
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Use:
WRITE (*,*) SIZE (ISORT,KIND=8), i
instead.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Steve,
Thanks for the advice. It's good to see a solution is readily available. I should have adopted RTFM. I was expecting SIZE to behave in a similar way to LOC for 64-bit, automatically changing to kind=8.
John
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
SIZE is a standard intrinsic, so its behavior is specified by the standard. LOC is an extension, and we're free to make it do something different.

Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora