next up previous
Next: HOMEWORK Up: No Title Previous: Why Supercomputers?

Shared and Distributed Architectures and the Jacobi Iteration

We will illustrate many of the ideas in this course by calling on basic matrix-by-vector multiplication, the real workhorse of scientific computing. We begin by illustrating this multiplication in the context of an iterative method to solve a basic equation in linear algebra. Consider the vector tex2html_wrap_inline104 , and the NXN matrix tex2html_wrap_inline106 . Given a fixed right-hand-side vector tex2html_wrap_inline108 , solve the equation

displaymath110

One approach to doing this is the so-called Jacobi iteration method. Begin with an initial guess at the solution, lets call it tex2html_wrap_inline112 . Break A up into three pieces, A=D+L+U, where D is the diagonal, and U and L are, respectively, the upper- and lower-triangular parts of A. Successive iterations tex2html_wrap_inline116 , etc are computed by the iteration

displaymath118

Think about the calculations involved in obtaining the right-hand-side. There is multiplication by a matrix (at least almost all of a matrix), addition of a vector, and division. If A is "full", then the L+U multiplication requires tex2html_wrap_inline120 operations, and experience shows this method - even on modern architectures - is not cost-effective. However if A is sparse, then the matrix multiplication by L+U involves only O(N) multiplies, and on distributed memory machines, Jacobi iteration can be a useful tool. We will flesh out these ideas during the course of the semester.

For now, as we begin by talking about computer architectures, i want you to start coding this simple solver. It will be used, modified, generalized several times. So write modularly and well.