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

Stack overflow on one machine but not another

hentall_maccuish__ja
New Contributor II
717 Views

Hello,

I have an mpi project with heap arrays set to zero that fails with the error "forrtl: severe (170): Program Exception - stack overflow" on one Windows machine but not another. The two machines have very similar specs.  On the machine where the code is failing, if I increase the stack allocation, the code still fails but produces a different error further into the program (an access violation). On the other machine, the code seems to work fine. The program runs all the way through and produces sensible output. Any suggestions? Could there be some difference in configuration between the two machines that I'm overlooking that explains the difference?

Thanks,

Jamie

0 Kudos
1 Solution
hentall_maccuish__ja
New Contributor II
557 Views

Thanks for the suggestion. I probably did not provide enough information in the initial post. When it produced a stack overflow, it failed on the first line. When it produced an access violation it was various minutes into the code. Given that, it feels hard to explain the stack overflow with the access violation, but I guess not impossible. The access violation produced no traceback despite traceback being on (as I think it is often the case), so it is hard to be sure what was going on. Still, I tried initialising all variables by default, and it did not solve the issue. I know that is not definitive, but I didn't know what else to try.

 

Still, it is all a bit academic now as updating OneAPI fixed the issue. The program is now also producing the same results on both machines, which have slightly different oneAPI versions, but both of which are more recent than the version I had on the machine that was giving problems.

View solution in original post

0 Kudos
2 Replies
Steve_Lionel
Honored Contributor III
669 Views

My suspicion is that there is some uninitialized data being referenced that triggers this symptom, and the behavior depends on whatever memory contents were present at the time. The stack overflow error is leading you astray.

hentall_maccuish__ja
New Contributor II
558 Views

Thanks for the suggestion. I probably did not provide enough information in the initial post. When it produced a stack overflow, it failed on the first line. When it produced an access violation it was various minutes into the code. Given that, it feels hard to explain the stack overflow with the access violation, but I guess not impossible. The access violation produced no traceback despite traceback being on (as I think it is often the case), so it is hard to be sure what was going on. Still, I tried initialising all variables by default, and it did not solve the issue. I know that is not definitive, but I didn't know what else to try.

 

Still, it is all a bit academic now as updating OneAPI fixed the issue. The program is now also producing the same results on both machines, which have slightly different oneAPI versions, but both of which are more recent than the version I had on the machine that was giving problems.

0 Kudos
Reply