IBM Power Systems 775 Manual page 123

For aix and linux hpc solution
Table of Contents

Advertisement

Synchronization primitives
UPC makes no implicit assumptions about the interaction between threads. Therefore, it is
the responsibility of the user to control thread interaction explicitly with the following
synchronization primitives: barriers, locks, and fences.
Memory consistency
UPC supports two memory consistency models: strict and relaxed. Strict shared data
accesses are implicitly synchronized, relaxed shared memory accesses are not implicitly
synchronized. By default, every shared data access follows the relaxed memory
consistency model.
The IBM XL UPC compiler is a conforming implementation of the latest UPC language
specification (version 1.2), supporting IBM Power Systems that run the Linux operating
system.
In addition to extensive syntactic and semantic checks, the XL UPC compiler incorporates the
following advanced optimizations that are developed and tailored to reduce the
communication cost of UPC programs:
Shared-object access privatization
Shared-object access coalescing
All upc_forall loop optimizations
Remote shared-object updates
UPC parallel loop optimizations
Important: IBM XL UPC is a prototype and targets POWER7 and Power7 775 hardware
that run RHEL6.
Concepts of data affinity
Data affinity refers to the logical association between a portion of shared data and a thread.
Each partition of shared memory space has affinity to a particular thread. A well-written UPC
program attempts to minimize communication between threads. An effective strategy for
reducing unnecessary communication is to choose a data layout that maximizes accesses to
shared data by the thread with affinity to the data.
Concepts of shared and private data
UPC has two types of data: shared data and private data. Shared data is declared with the
shared type qualifier, and is allocated in the shared memory space. Private data is declared
without the shared type qualifier. One instance of the private data is allocated in the private
memory space of each thread. Private data is accessed only by the thread to which it has
affinity.
Example 2-7 shows the data layout for different declarations. The following code declares
three identifiers of different types.
Example 2-7 Data layout
int a; // private scalar variable
shared int b; // shared scalar variable
shared int c[10]; // shared array
Assuming four threads, these data objects are allocated, as shown in Figure 2-3 on page 110.
Chapter 2. Application integration
109

Advertisement

Table of Contents
loading

Table of Contents