Вы находитесь на странице: 1из 2

Parallel Computing I

Homework 9 (Extra task): Gram-Schmidt process


Thorsten Grahs, Andres Rodriguez
14. Juli 2015
This will be your extra homework in the exercise parallel computing. Send your solution to
a.rodriguez-escobar@tu-braunschweig.de until July 29th 2015 23:55.
Prepare a pdf file for your written text and attach the source code of your program to the mail.

Gram-Schmidt orthonormalisation process1


For a given system {wi }iNn Rm of n linear independent vectors, the Gram-Schmidt process
computes an orthonormal system {vi }iNn , i.e. n pairwise orthonormal vectors, which describes
the same vector space:


(i, j Nn , i 6= j) : vi , v j = 0
span({wi }i=1,...,n ) = span({vi }i=1,...,n )
Thus, the algorithm could be described as:
v 1 = w1
v 2 = w2
v 3 = w3
..
.
vn = wn

hv1 ,w2 i
v
hv1 ,v1 i 1
hv1 ,w3 i
v
hv1 ,v1 i 1
n 1

i =1

hv2 ,w3 i
v
hv2 ,v2 i 2

hvi ,wn i
v
hvi ,vi i i

Orthonormalisation
is a special case of orthogonalisation in the sense, that for all vectors vi we demand


i) orthogonality: (i, j Nn , i 6= j) : vi , v j = 0 AND in addition
ii) normalisation: (i Nn ) : kvi k = hvi , vi i = 1
Thus, in the algorithm above, we can normalize the vector vi in each step, i.e. divide the vector
by its length:
1
1
v i : = k v i k 1 v i =
vi = p
vi
k vi k
h vi , vi i
1 https://en.wikipedia.org/wiki/Gram-Schmidt_process

Task Gram-Schmidt (20 Points)


i) Implement a serial version of the Gram-Schmidt process (Use random vectors). Measure
the averaged run-time for n = 103 and m = 104 .
ii) Derive a parallel MPI-version from your serial code.
Measure the averaged run-time for n = 103 and m = 104
on P = 2, 4, 6, 8, 16 processors.
Measure speed-up and efficiency and plot as a function of the number of processors.
Explain in words, what your program is doing!

Вам также может понравиться