The goal of your second computational experiment will be to measure the CPU time to perform a standard calculation and compare this with the predicted work of the algorithm. You are asked to use the CPU time as your measure of work and the known operation count of Gaussian Elimination to discover how the mathematical operation count is reflected in an actual computation.
Examine the codes and identify where you think significant computation is taking place. You'll want to insert a dtime call immediately before and after each such place and collect the statistics for your summarizing report.
work_lu(2N) ----------- ~= 8 work_lu(N)increase in the work "eventually".
What increase would you expect to see for the "solve"?
You are also using good mathematical software which estimates a quantity called the "condition number" of the matrix, A,
1 K(A) = ------- rcond"rcond" is the "reciprocal conditon number" estimated by sgeco.
The inequality from linear algebra that relates the residual to the error
||ae || ||r|| ----------- <= K(A) ------ ||x_true|| ||b||where || r || indicates the norm of the vector r. Similarly for the vectors b, ae = absolute error = x_computed - x_true. Of course, we do not know x_true in this problem. This shows that a small residual, r, does not always indicate a correct answer and your computational experiment will let you precisely quantify this statement.