





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Sel Top-Computer Science; Subject: (Computer Science); University: University of Houston; Term: Spring 2006;
Typology: Study notes
1 / 29
This page cannot be seen from the preview
Don't miss anything!






















COSC 4397 – Parallel ComputationEdgar Gabriel
2
COSC 4397 – Parallel ComputationEdgar Gabriel
-^
Task parallelism:– Implemented by Task queues– Task distribution vs. work stealing
-^
Divide and Conquer for recursive problems– Split problem into sub-problems until a lower limit in the problem
size has been reached
Organize by data
decomposition
Organize by tasks^ Task Parallelism Divide and Conquer
Geometric decomposition Recursive data
Organize by flow of
data Pipeline Event-basedcoordination
4
COSC 4397 – Parallel ComputationEdgar Gabriel
Worker Process 1
Worker Process 2
5
COSC 4397 – Parallel ComputationEdgar Gabriel
split
split Base solve
Merge
split Base solve
Merge
Merge
7
COSC 4397 – Parallel ComputationEdgar Gabriel
-^
-^
h
x f h x f x
f^
h
lim ) (^
0
→
h
x f h x f x
f^
2
ξ f h x f h x f h x
f^
f h
h
x
hf
h x f
x f^
x
y
h x^ n
x^ nh
) ( xf
) (^ xn ′ f
8
COSC 4397 – Parallel ComputationEdgar Gabriel
-^
-^
) (
! 3
) ( 2 ) ( ) ( )
(^
1
3
2
ξ f h x f h x
fh
x f
h x f^
′′′
′′
′
=
) (
! 3
) ( 2 ) ( ) ( )
(^
2
3
2
ξ f h x f h x
fh
x f
h x f^
′′′
−
′′
′
−
=
−
[...] 12 )]
(
)
( [ (^12) ) (
(^2) h
h x f h x f h x
f^
−
−
−
= ′^
x
y
h x^ n
h
) ( xf
) (^ xn ′ f
h x^ n
−
h
(5:1) (5:2)
10
-^
-^
st
-^
nd
h
x f h x f x
f^
h x f h x f h x
f^
2
h x f x f h x f h x
f^
11
Differential equations: equations containing the derivative of afunction as a variable– An ordinary differential equation (ODE) only contains
functions of one independent variable
multiple independent variables and their partial derivatives
The
order
of a differential equation is that of the highest
derivative that it contains
-^
The goal is to find a function
y(t)
whose derivatives fulfill the
given differential equations, e.g.
) 1 (
) (^
−
n
n^
y y y y t f t y
13
COSC 4397 – Parallel ComputationEdgar Gabriel
-^
-^
-^
-^
ih a
xi
) 1
(
−^ +
=^
n
a b
h
y^0
1
1
1
1
2
−
−
+^
i
i
i
i
i^
y y h y x f y y y h
+^1 n y
(x:1)
1
1 0
n^
x x
x x
14
COSC 4397 – Parallel ComputationEdgar Gabriel
-^
-^
-^
1
4
y
2 2
x
dy dx
dx
y d
y
5 4 3 2 1 0
x x x x x x
0
0
x y
y^
5
5
x y
y
x
16
COSC 4397 – Parallel ComputationEdgar Gabriel
1
2
1
0
x
y
y
y^
2
1
y y : 1 = i
2
1
y
y^
i^
3
2
1
y
y
y^
i^
4
3
2
y y y : 4 =
i^
4
3
y
y
y^1 y^2 y^3 y^4
or
i
A
y^
b
17
COSC 4397 – Parallel ComputationEdgar Gabriel
1
ˆ^0
−
i T
i^
r r
0
0
Ay
b
r^
Given
A,b
and an initial guess
y
0
Given
such that ˆ^ r
0 0
r r^
T
1 0
0
0
0
p
v^ for i = 1,2,…
1
1
−
−
=
i
i i
α ω
ρ ρ
β
1 1
1
1
− −
−
−^
i i
i
i
i^
v
p
r
p
i
i^
Ap
v^
i i Tv ρ ˆ r 0
α
=
i
i^
v
r
s
−^1 As
t^
t t
s Tt T
i^
= ω
s
p
y
y^
i
i
i
i
−^1
t
s
r^
i
i
Scalar product
Matrix-vectormultiplication
19
COSC 4397 – Parallel ComputationEdgar Gabriel
2
1
x
x^
1 2 3 4
1 2 3 4
rhsrhsrhs rhs
x x x x
3
2
1
x
x
x^
3
4
3
2
rhs
x
x
x^
4
4
3
rhs
x
x^
1 rhs =
2 rhs =
Process 0Process 1
Process 0 needs
x
3
Process 1 needs
x
4
20
-^
-^
-^
1 Process zero x
2 x^
3 x
Process one
4 x
3 x^
2 x )
1 1
1
1
− −
−
−^
i i
i
i
i^
v
p
r
p
i
i^
Ap
v^
… …