init_rms: L-2 norm of the residual at the start of iterations
p=r # assign initial residual to the conjugate vector
for k = 1:max_iter