Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Unhandled exception

carneiro__fernando
1,171 Views

I am trying to run a fortran program. The program starts OK, some functions are called without a problem... but then there is a particular function it tries to call and gives the following message:

"Unhandled exception at 0x00007FF6743518A8 in HybridMixed.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000009B09C13000)."

I don't see a reason for this message. My arrays are simple and they seem to be right. What could it be? (I tried both 32 and 64bit, same error)

The complete output is this:

'HybridMixed.exe' (Win32): Loaded 'C:\Users\f\Programa\VS_fortran\HybridMixed\HybridMixed\x64\Debug\HybridMixed.exe'. Symbols loaded.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libifcoremdd.dll'. Module was built without symbols.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\imagehlp.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libifportmd.dll'. Module was built without symbols.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libmmdd.dll'. Symbols loaded.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\mkl\mkl_sequential.dll'. Module was built without symbols.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\mkl\mkl_core.dll'. Module was built without symbols.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libmmd.dll'. Symbols loaded.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
Exception thrown at 0x00007FF6743518A8 in HybridMixed.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000009B09C13000).
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\dbghelp.dll'. Cannot find or open the PDB file.
Unhandled exception at 0x00007FF6743518A8 in HybridMixed.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000009B09C13000).

0 Kudos
5 Replies
jimdempseyatthecove
Honored Contributor III
1,171 Views

>>Exception thrown at 0x00007FF6743518A8 in HybridMixed.exe: 0xC00000FD: Stack overflow

You either have a reasonable stack size too small....
... or an unreasonable amount of stack size being requested.

The second case can be the result of using a statement the constructs a stack based array temporary or a function/subroutine call that passes a dis-contiguous array slice as an argument that requires a contiguous argument (and thus creates the temporary). The second case with very large arrays. You can eliminate the second case with the option to use heap arrays, or for statements, replace an implicit loop with an explicit loop.

Jim Dempsey

0 Kudos
carneiro__fernando
1,171 Views

This problem happens when I call the following function:
F_matrix_global(nelems,ncolFg,ncolSv,Svdeg,E,nu,nodex_local,nodey_local,nodez_local,bench)

nelems,ncolFg,ncolSv,Svdeg and bench are int
E and nu are arrays of 10 elements (E is all "ones" e nu is all "0.3"s)
nodex_local,nodey_local,nodez_local are 10x20 arrays (which values are 1, 0.5, 0, -1.0, -0.5)
I don't know how any of this could be causing an problem
(btw if I run it 32bit, it chkstk.asm. If I run 64, it says chkstk.asm not found)

"You can eliminate the second case with the option to use heap arrays, or for statements, replace an implicit loop with an explicit loop."

Could you breakdown what those things are and how to do them? I am not an experienced programer, I am actually an engineer having to program...

Is there a chance this could be just something unimportant that I could bypass with some configuration/settings? Because I really don't see a reason for this

0 Kudos
Steve_Lionel
Honored Contributor III
1,171 Views

Best option: /heap-arrays (in VS, Fortran > Optimize > Heap Arrays > 0)

Alternative: At the end of the ifort command that links the executable: /link /stack:100000000

(In VS, Linker > System > Stack Reserve Size > 100000000)

 

0 Kudos
carneiro__fernando
1,171 Views

Thank you Steve. Doing the "alternative" has solved that problem, the funtion has been performed normally.

My program is large and in the end of it, the same message happens again, this time it might be for other reasons.

This problem happens when I call the following function:
Global_system(BcinvAc,Ks,ncolFg,ncolBg,ncolAg)

ncolFg,ncolBg,ncolAg are int, BcinvAc is 8670x1920, Ks is 1920x1920
and inside the function there is an array called
Global is 10590x10590 (indeed a huge one hundred million elements, but it is needed)
it seems to crash after allocating "Global"...

'HybridMixed.exe' (Win32): Loaded 'C:\Users\ferna\Documents\Mestrado\Programa\VS_fortran\HybridMixed\HybridMixed\x64\Debug\HybridMixed.exe'. Symbols loaded.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libifcoremdd.dll'. Module was built without symbols.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\imagehlp.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libmmdd.dll'. Symbols loaded.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\mkl\mkl_core.dll'. Module was built without symbols.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\mkl\mkl_sequential.dll'. Module was built without symbols.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libmmd.dll'. Symbols loaded.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libifportmd.dll'. Module was built without symbols.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libmmd.dll'. Symbols loaded.
'HybridMixed.exe' (Win32): Unloaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\redist\intel64_win\compiler\libmmd.dll'
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file.
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
The thread 0x2ebc has exited with code 0 (0x0).
The thread 0x6d0 has exited with code 0 (0x0).
The thread 0x3794 has exited with code 0 (0x0).
Exception thrown at 0x00007FF78D2A1A88 in HybridMixed.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000000778803000).
'HybridMixed.exe' (Win32): Loaded 'C:\Windows\System32\dbghelp.dll'. Cannot find or open the PDB file.
Unhandled exception at 0x00007FF78D2A1A88 in HybridMixed.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000000778803000).

0 Kudos
Steve_Lionel
Honored Contributor III
1,171 Views

Please repeat with Heap Arrays enabled.

0 Kudos
Reply