Download C User's Guide

Transcript
SUNW_MP_WARN
Set this environment variable to TRUE to print warning messages from OpenMP and
other parallelization runtime-systems.
% setenv SUNW_MP_WARN TRUE
If you registered a function by using sunw_mp_register_warn() to handle
warning messages, then SUNW_MP_WARN prints no warning messages, even if you set
it to TRUE. If you did not register a function and set SUNW_MP_WARN to TRUE,
SUNW_MP_WARN prints the warning messages to stderr. If you do not register a
function and you do not set SUNW_MP_WARN, no warning messages are issued. For
more information on sunw_mp_register_warn() see Section 3.2.1, “Handling
OpenMP Runtime Warnings” on page 3-2.
STACKSIZE
The executing program maintains a main memory stack for the master thread and
distinct stacks for each slave thread. Stacks are temporary memory address spaces
used to hold arguments and automatic variables over subprogram invocations.
The default size of the main stack is about eight megabytes. Use the limit
command to display the current main stack size as well as set it.
% limit
cputime unlimited
filesize unlimited
datasize 2097148 kbytes
stacksize 8192 kbytes <- current main stack size
coredumpsize 0 kbytes
descriptors 256
memorysize unlimited
% limit stacksize 65536 <- set main stack to 64Mb
Each slave thread of a multithreaded program has its own thread stack. This stack
mimics the main stack of the master thread but is unique to the thread. The thread’s
private arrays and variables (local to the thread) are allocated on the thread stack.
All slave threads have the same stack size, which is four megabytes for 32-bit
applications and eight megabytes for 64-bit applications by default. The size is set
with the STACKSIZE environment variable:
% setenv STACKSIZE 16483 <- Set thread stack size to 16 Mb
3-4
C User’s Guide • November 2005