OMP_STACKSIZE

The OMP_STACKSIZE environment variable specifies the size of the stack for threads created by the OpenMP run time. The syntax is as follows:

Read syntax diagramSkip visual syntax diagram
>>-OMP_STACKSIZE=--+-size--+-----------------------------------><
                   +-sizeB-+   
                   +-sizeK-+   
                   +-sizeM-+   
                   '-sizeG-'   

size
is a positive integer that specifies the size of the stack for threads that are created by the OpenMP run time.
"B", "K", "M", "G"
are letters that specify whether the given size is in Bytes, Kilobytes, Megabytes, or Gigabytes.

If only size is specified and none of "B", "K", "M", "G" is specified, size is in Kilobytes by default. This environment variable does not control the size of the stack for the initial thread.

The value assigned to the OMP_STACKSIZE environment variable is case insensitive and might have leading and trailing white space. The following examples show how you can set the OMP_STACKSIZE environment variable.

export OMP_STACKSIZE="10M"
export OMP_STACKSIZE=" 10 M "

If the value of OMP_STACKSIZE is not set, the initial value is set to the default value. (up to the limit that is imposed by system resources).

If the compiler cannot deliver the stack size specified by the environment variable, or if OMP_STACKSIZE does not conform to the valid format, the compiler sets the environment variable to the default value.

The OMP_STACKSIZE environment variable takes precedence over the stack suboption of the XLSMPOPTS environment variable.



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us