Software Archive
Read-only legacy content
17060 Discussions

stacksize

Jen_B_
Beginner
592 Views

how to set mic_stacksize to unlimited or max possible? thanks!

0 Kudos
2 Replies
TimP
Honored Contributor III
592 Views

For offload, thread stack size (default 2MB) is set by MIC_STACKSIZE:

https://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-17EE519D-7D60-4294-B87F-87E5F51EFF2C.htm

For processes running in a shell on the MIC (e.g. MPI), you must set primary stacksize in that shell e.g.

ulimit -s unlimited

as well as possibly adjusting thread stack size (default 4MB) by OMP_STACKSIZE or KMP_STACKSIZE (which over-rides OMP_STACKSIZE).  Raising thread stack size is almost certain to require unlimited primary stack (and may still limit the number of threads which can be used effectively).  For example, I used 30 threads in each of 6 MPI ranks with OMP_STACKSIZE=9m.

Clearly, you must not set MIC_STACKSIZE or OMP_STACKSIZE to a ridiculous value.  Nothing stops you from tying the coprocessor in knots by attempting a total of 200GB stack.

When I last heard (well over a year ago), there was no expert consensus on changing anything in the scheme, although there were opinions that something should be done (such as making ulimit -s unlimited the default).  Note that the newest information I could find by browser search is that old.

 

 

0 Kudos
Jen_B_
Beginner
592 Views

Thanks!

0 Kudos
Reply