An Introduction to Parallel Programming with (介绍并行编程与).pdf
文本预览下载声明
An Introduction to
Parallel Programming
with OpenMP
by
Alina Kiessling
N I V E
U R
S
E I
H T
T Y
O H
F G
E R
D I N B U
A Pedagogical Seminar
April 2009
ii
Contents
1 Parallel Programming with OpenMP 1
1.1 What is Parallel Computing? . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Why would you make your codes parallel? . . . . . . . . . . . . . . . 2
1.3 Shared and Distributed Memory . . . . . . . . . . . . . . . . . . . . . 6
1.4 OpenMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Who would use OpenMP? . . . . . . . . . . . . . . . . . . . . . . . . 9
1.6 Availability of OpenMP at the ROE . . . . . . . . . . . . . . . . . . 9
2 How do you make your existing codes parallel? 11
2.1 How do I compile my code to run OpenMP? . . . . . . . . . . . . . . 11
2.2 How do I decide if a loop is parallel or not? . . . . . . . . . . . . . . . 16
2.3 What are Private and Shared variables? . . . . . . . . . . . . . . . . 17
2.4 How can I do Summations?
显示全部