- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
hi!
i am using a fortran-program which rewrites many files (in sum about 26000 files) into 1 file.
the input-files are opened one by one and closed after reading.
in ivf i have the issue, that the executable just stops without an error after opening/reading/closing about 16000 files. at the moment my workaround is to compile my code in compaq visual fortran. here i dont have any issues.
what can i do to compile the code in ivf?
thank you!
i am using a fortran-program which rewrites many files (in sum about 26000 files) into 1 file.
the input-files are opened one by one and closed after reading.
in ivf i have the issue, that the executable just stops without an error after opening/reading/closing about 16000 files. at the moment my workaround is to compile my code in compaq visual fortran. here i dont have any issues.
what can i do to compile the code in ivf?
thank you!
- Marcas:
- Intel® Fortran Compiler
Link copiado
- « Anterior
- Próximo »
45 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hello,
looking at your suggestions, i would prefer that there will be an automatic cleaning of the stack. I do not know during programing how many files will be opend during execution. Increasing the stack just for care (what i do currently) is not a good solution for me.
Frank
looking at your suggestions, i would prefer that there will be an automatic cleaning of the stack. I do not know during programing how many files will be opend during execution. Increasing the stack just for care (what i do currently) is not a good solution for me.
Frank
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
mecej4,
You can stay in FORTRAN and get the stack pointer
integer(C_PTR) :: StackLoc
...
StackLoc = LOC(StackLoc)
Place thatat start ofPROGRAM, then copy StackLoc to global InitialStackLock variable.
Then in subroutines, insert the above code. You can then check for stack consumed, but this will not tell you if you are getting close to stack overflow.
There is a C runtime library call that you can call from FORTRAN to obtain the remaining stack. Look in MSDN for the Windows version or in ??? for Linux.
On Windows single threaded there will be a fixed floor such as 0x10000 (verify this). For multi-threaded this will not be the case as each thread has a seperate stack and each stack has a lowest mapped location with guard page below that. On Linux (*ux) your stack grows till some other limiting value.
Jim
You can stay in FORTRAN and get the stack pointer
integer(C_PTR) :: StackLoc
...
StackLoc = LOC(StackLoc)
Place thatat start ofPROGRAM, then copy StackLoc to global InitialStackLock variable.
Then in subroutines, insert the above code. You can then check for stack consumed, but this will not tell you if you are getting close to stack overflow.
There is a C runtime library call that you can call from FORTRAN to obtain the remaining stack. Look in MSDN for the Windows version or in ??? for Linux.
On Windows single threaded there will be a fixed floor such as 0x10000 (verify this). For multi-threaded this will not be the case as each thread has a seperate stack and each stack has a lowest mapped location with guard page below that. On Linux (*ux) your stack grows till some other limiting value.
Jim
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Jim, thanks for the pointers.
"..but this will not tell you if you are getting close to stack overflow." I thought of reading the .EXE header to obtain the stack limit, but decided that doing so was not worthwhile for a one-off job.
"..but this will not tell you if you are getting close to stack overflow." I thought of reading the .EXE header to obtain the stack limit, but decided that doing so was not worthwhile for a one-off job.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
This issue was fixed in 12.0 Update 2.

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
- « Anterior
- Próximo »