114
IBM Power Systems 775 for AIX and Linux HPC Solution
On the Linux operating system, information about CPU identifiers is found in
/proc/cpuinfo
or
/sys/devices/system/cpu/ online
.
A CPU identifier is an integer value between 0 and (x - 1), in which x is the return value of the
function sysconf(_SC_NPROCESSORS_ONLN). This function returns the number of
processors available, and it is declared in the header file
unistd.h
.
To get the CPU identifier that is bound to the current thread, use xlupc_thread_affinity().
When this function is called, it returns the CPU identifier for the current thread. If the current
thread is not bound to any processor, this function returns -1. The function
xlupc_thread_affinity() is declared in
upc.h
unless XLUPC_NO_EXT is defined before
upc.h
is included.
The runtime_option_name is not case-sensitive. For example, XLPGASOPTS=nostackcheck
is equivalent to XLPGASOPTS=NoStacKcheck.
Options of the XLPGASOPTS environment variable also are specified on the command line
with the prefix
–xlpgas
. For example, XLPGASOPTS=stacksize=30mb is equivalent to ./a.out
–xlpgasstacksize=30mb.
For an option specified in the environment variable, you add white spaces before or after the
colons (:) or equal signs (=) to improve readability. However, you must enclose the entire
option string in quotation marks (“ ”) if XLPGASOPTS contains any embedded white spaces.
For example, specifying options in any of the following ways has the same effect:
XLPGASOPTS=stacksize=1 mb:nostackcheck ./a.out
XLPGASOPTS=” stacksize = 1 mb: nostackcheck “./a.out
./a.out -xlpgasstacksize=1 mb -xlpgasnostackcheck
You separate numbers by the underscore sign to improve readability. For example,
XLPGASOPTS=stacksize=10000000 is equivalent to LPGASOPTS=stacksize=10_000_000.
Options are processed in order. Options that are specified in the XLPGASOPTS environment
variable are processed before the variables specified on the command line. If you specify an
option multiple times or specify conflicting options, the last option takes precedence. For
example:
xlupc -qupc=threads=4 -qupc=stackcheck helloworld.upc
XLPGASOPTS=nostackcheck
./a.out -procs 4 -msg_api ’pgas’ -hostfile hosts –xlpgasstackcheck=80%
In this example, XLPGASOPTS=nostackcheck instructs the compiler not to check for stack
overflow, but –xlpgasstackcheck=80% specified on the command line takes precedence. You
must specify -qupc=stackcheck to instrument the executable file. Otherwise,
–xlpgasstackcheck=80% has no effect.
If you specify an unsupported option in the environment variable or on the command line with
the
–xlpgas
prefix, the program issues a warning message and ignores the option.
If you specify an option in an incorrect format, the runtime issues a warning message and
uses the default value for the option.
Summary of Contents for Power Systems 775
Page 2: ......
Page 170: ...156 IBM Power Systems 775 for AIX and Linux HPC Solution...
Page 256: ...242 IBM Power Systems 775 for AIX and Linux HPC Solution...
Page 278: ...264 IBM Power Systems 775 for AIX and Linux HPC Solution...
Page 326: ...312 IBM Power Systems 775 for AIX and Linux HPC Solution...
Page 357: ......