implicitly calcuating residual in fortran, removing diag array from opencl