留学生代考 COMP5426 Distributed

COMP5426 Distributed
ility of Parallel Systems

Jacobi iteration is a numerical method used to Laplace partial differential equations, e.g., to

Copyright By PowCoder代写 加微信 powcoder

ermine the steady-state temperat
omain when the temperature of its boundaries is
The method approaches a solution iteratively; each iteration, the temperature of a point is computed to be the average of temperatures of
(four) neighbors, except that temperatures at the
boundary are not changed
This iterative method is often referred to as relaxation method as an initial guess at the solution is allowed to slowly relax towards the true solution, reducing the errors as it does so
ure on som

dimensiona
For each i
uij* = (u(i+1
Replace ol U*
To find the solution for a tw
l uj to some initial guess
ce equation
boundary conditions
nternal mesh point s
)j + u(i-1)j
If solution does not satisfy to repeat from step 2
ui(j+1) + ui(j-1))/4
on U with new esti

Heart of Sequential
Create a 2D gri Each grid point
solution at
u*(i,j) = (u(i-1,j)
icular (i,
u(i+1,j) +
represents value of s
) + u(i,j+1))

primitive t
Algorithm 1
Processors are organized as a 1D array
matrix elemen
Agglomerate tasks in
contiguous rows
(rowwise block
grid divided
processors

Values of bo
computed without access to values
Associate primitive
grid divided
processors

neighboring
same loop cells
Memory locations used to store redundant
Allocating ghost points as extra columns
simplifies
grid divided
processors

beginning of
boundary rows are send/recv between
grid divided
processors

Sequential
Θ(n2) each
ty Analysis
p) each iteration
Parallel communication co
receives of n elements)
complexity
Parallel computational complexity:
sends and two

plexity Analys
Efficiency: Θ(
overhead: Θ(
1/(1+p/n)) (Ts
soefficiency relation: (Ts ≥
/(1+p/n)) (Ts /Tp)
(pTp – Ts)

allel Algorith
Processors are organized
Associat element
Add rows and
four sides by each pr
of rectangular ocess
Agglomerate tasks into blocks that are as square as possible (checkerboard block
as a 2D arra
th each matr

processors

mplementatio
Using ghost points around 2-D requires extra copying steps
Ghost points for left and right
not in contig
uous memory
 An auxiliary buffer may be used when receiving these ghost point values and similarly, buffer
sending column of values to
neighboring process

plexity Analys
ach iteration
receives of n /√p e
arallel communication time: Θ(n /√p
sends and four
lements each)

plexity Analys
Efficiency: Θ(
soefficienc
overhead: Θ(
2/p+n/√p )
/(1+√p /n))
1/(1+√p /n))
relation:(Ts ≥ CTo) ≥ C√p

Performance analysis for
trix multipl

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com