The OMP_STACKSIZE environment variable controls the size of the stack for threads created by the OpenMP implementation, by setting the value of the stacksize-var ICV. The environment variable does not control the size of the stack for an initial thread.
The value of this environment variable takes the form:
size | sizeB | sizeK | sizeM | sizeG
If only size is specified and none of B, K, M, or G is specified, then size is assumed to be in Kilobytes.
The behavior of the program is implementation defined if OMP_STACKSIZE does not conform to the above format, or if the implementation cannot provide a stack with the requested size.
setenv OMP_STACKSIZE 2000500B
setenv OMP_STACKSIZE "3000 k "
setenv OMP_STACKSIZE 10M
setenv OMP_STACKSIZE " 10 M "
setenv OMP_STACKSIZE "20 m "
setenv OMP_STACKSIZE " 1G"
setenv OMP_STACKSIZE 20000