Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Question on setting stack size KMP_SET_STACKSIZE_S

$
0
0

Hi All,

I would like to set the stack size at runtime for my parallel project. The stack size (e.g., 100000000) was previously set through property/linker/system/stack reserve size and stack commit size, and it works fine.

But when I set the stack size at runtime, it can not work and throw out "stack overflow". The codes are as follows:

stack_size = "estimate stack size" (e.g., 100000000)

call KMP_SET_STACKSIZE_S(stack_size)

write(idbg, *) "set stack size to: ", stack_size

stack_size_check = KMP_GET_STACKSIZE_S()

write(idbg, *) "check stack size:", stack_size_check

The result shows that  the stack size has been set to 100000000, but still cause stack overflow problem.

What's wrong with the above codes?

Thanks and regards,

Daniel


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>