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

OpenMP code with 5 or more threads gives stack overflow

cygnetmama
Beginner
247 Views

Hi.

I recently parallelized a program of mine using OpenMP directives using Intel's fortran compiler.  The program appears to run fine if I use 1-4 threads, but with 5 or more threads it crashes at runtime, with a message such as the following:

The thread 0x1d94 has exited with code 0 (0x0). Unhandled exception at 0x00007FF79B3D8507 in Tvar19.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000008161A93000).

I am currently using the following compiler options:   /Od /Qopenmp /F:10000000 /Zi /traceback /check:noarg_temp_created .  Changing the number associated with the /F: option doesn't help.

When the program crashes, nothing is written to the command window from which I have run the program.  A window simply pops up and tells me the program has quit.  Then it asks if I want to debug using visual studio, in which case Visual Studio gives me the aforementioned error and a bunch of assembly code which is all Greek to me.

If anyone can help me get this program running with more than 4 threads, I would be most appreciative.

 

0 Kudos
3 Replies
andrew_4619
Honored Contributor II
247 Views

There have been several forum discussions I have read on similar topics.

Read this link that my help you:

https://software.intel.com/sites/default/files/m/f/e/7/f/7/20415-Stack_usage.pdf

 

0 Kudos
jimdempseyatthecove
Honored Contributor III
247 Views

Andrew,

That is a good article and has most of the issues covered. Is there something newer than 2006 to be found? I do not think the sections on the heap_arrays is current.

And page 11 is wrong (from my understanding).

Jim Dempsey

0 Kudos
TimP
Honored Contributor III
247 Views

That description of heap-arrays :size option implies a gfortran like functionality which was never implemented in a useful manner, nor did the docs ever admit it.

0 Kudos
Reply