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

Why isn't recommended value of KMP_STACKSIZE not the default??

Greynolds__Alan
Beginner
516 Views

On a recent thread I was pointed to KMP_STACKSIZE as my problem. I found I had to set it to 12MB to get my auto-parallelized fused loop not to crash. If you look at the documentation, it says the default is 2MB for ia32 (4MB ia64) but then goes on to say the 16MB is recommended! Doesn't that seem weird?

Also, is there a way to "compile in" this setting without having to make sure my end-users set this environment variable. My application code started out as standard Fortran-95 and a standalone binary (I support more than the Wintel platform). Over time I have had to pepper my codeand installation with IVF specific stuff. No other compiler makes me do this.

Al Greynolds www.ruda.com

0 Kudos
1 Reply
TimP
Honored Contributor III
516 Views

I interpret the meaning of that recommendation as "if default isn't sufficient, try 16MB." Looks like it worked for you, but, like you, I wonder why no reviewer saw the strangeness. More and more docs are written by non-English speakers.

There are still people running 32-bit systems where you aren't allowed more than 2MB per thread stack (no one consulted Intel on that), and 4MB is enough for apps which work there to be moved to 64-bit. 16MB may have been more than sufficient for any case the writer ever heard of.

The same documentation describes the function call version of kmpstacksize().

0 Kudos
Reply