Escolar Documentos
Profissional Documentos
Cultura Documentos
Parallel Applications
Vijay Tatkar
Sr. Engineering Manager
Design Impediments:
Heat
Power
Slower Memory than chips
The Multicore
Revolution
Application
Easiest Hardest
AutoPar MT OpenMP MPI
libumem Atomic Solaris Posix Event
Operations Threads Threads Ports
Solaris
Easiest Hardest
Instruction-level MT OpenMP MPI
Parallelism
libumem Atomic Solaris Posix
Automatic Threads
Operations Solaris Threads
Event
Ports
Parallelization,
Automatic
Vectorization
Tuned MTUltraSPARC
librariesT1/T2 Intel/AMD
SPARC64 VI, x86/x64
UltraSPARC IV+
Easiest Hardest
AutoPar MT MPI
libumem Atomic Solaris Posix Event
Operations Solaris
ThreadsOpenMP
Threads Ports
● Parallel regions
● Work sharing
● Number of threads
● Thread ID
● Synchronization
● Dynamic thread
● Data scope attributes
● private
adjustment
● Nested parallelism
● firstprivate
● Timers
● lastprivate
● API for locking
● shared
● reduction
● Orphaning
Easiest Hardest
AutoPar OpenMP MPI
libumem Atomic Solaris Posix Event
Operations Solaris
Threads Threads Ports
MT
Process:
Instrument the code with -xinstrument=datarace
Detect runtime condition with collect -r all [or race, detection]
Use the Graphical Analyzer, tha, to identify conflicts and critical
regions
Easiest Hardest
AutoPar MT OpenMP
libumem Atomic Solaris Posix Event
Operations Solaris
Threads Threads Ports
MPI
Vijay Tatkar
Sr. Engineering Manager
%ptime noautopar
Finish multiplication of matrix of 1024
real 1.536
user 1.521
sys 0.018
%ptime autopar
Finish multiplication of matrix of 1024
real 1.542
user 1.520
sys 0.016
%setenv PARALLEL 2
%ptime autopar
ptime ./autopar
Finish multiplication of matrix of 1024
real 0.817
user 1.572
sys 0.016
Sun Tech Days 07- 08 /Sun Studio - # 42
OpenMP Demo
Parallelizing Primes
int is_prime(int v)
{ int i, bound = floor (sqrt((double)v)) + 1;
Binary
Bubblesort Insertion Heapsort Qiucksort
Sort
Straight Straight
Shakersort Insertion Selection
Sort Sort
Tuning area
64 64 8
KB MB
Reg L1 L2 Main Memory Virtual
Memory
UPC/GAS
Local Cluster
MPI Grid
Multi-
Process
● N1Grid
● MPI Appl
OpenMP
● OpenMP Appl
Multi- ● MT Appl
Tightly Coupled
Sun Tech Days 07- 08 /Sun Studio - # 55