IBM Power Systems 775 Manual page 125

For aix and linux hpc solution
Table of Contents

Advertisement

To set the number of threads for a program in the dynamic environment, you use the following
command:
export UPC_NTHREADS=N
In this command, N is the number of threads with which the program runs. The environment
variable UPC_NTHREADS is used to specify the number of threads that a UPC program runs
within the static and dynamic environments.
Important: If the number of threads for a program is specified at compile time, the program
is not allowed to attempt to run the compiled program with a different number of threads.
To set the number of nodes for a program in the static environment, you use the compiler
option -qupc=dnodes=M, where M is the number of nodes that the program runs on. To
compile the test.upc program to run with N threads on M nodes, enter the following
command:
xlupc -qupc=threads=N -qupc=dnodes=M test.upc
In this command, N >= M and N must be a multiple of M (that is, N % M = 0).
The executable program must run on the same number of nodes as specified by the
-qupc=dnodes option when the program is compiled. To run the executable program, you
must use the IBM Parallel Operating Environment (POE). For example, to run the executable
program a.out, enter the following command:
a.out -procs 3 -msg_api 'pgas' -hostfile hosts
In this command, the following executables are run:
-proc: Specifies the number of processes
-msg_api: Indicates to POE which message passing API is used by the parallel job
-hostfile: Specifies a host file that contains the names or the IP address of the hosts used
For example, to specify three nodes, you create the host file that lists the IP addresses of the
three nodes in the following cluster:
1.2.3.4
1.2.3.5
1.2.3.6
The following example demonstrates how to specify the number of threads in the dynamic
environment:
xlupc test.upc
export UPC_NTHREADS=8
a.out -procs 4 -msg_api 'pgas' -hostfile hosts
Runtime tuning
In this topic, we describe the environment variable that you use to tune the partitioned global
address space (PGAS) run time that is used by UPC.
Chapter 2. Application integration
111

Advertisement

Table of Contents
loading

Table of Contents