anchor.diff:      b(ptr_stress+nfaults+i-1,1) = prestresses(i,2) ! ds
   enddo
   
  -if (verbosity.ge.4) then
  +if (verbosity.ge.2) then
       write(stderr,'(A)') 'Finished lsqr_load_stress()'
       write(stderr,*)
   endif
  
positive.code: if (.not.allocated(b)) then
      allocate(b(nrows,1))
  endif
  if (.not.allocated(x)) then
      allocate(x(ncols,1))
  endif
  A = 0.0d0
  b = 0.0d0
  x = 0.0d0
  
  ! Load model matrix, A, and constraint vector, b
  call lsqr_load_arrays(A,b,nrows,ncols,ptr_disp,ptr_stress,ptr_damp,ptr_smooth)
  
  ! Solve generalized least squares problem
  call lsqr_solve(x,A,b,nrows,ncols)
  
  if (.not.allocated(fault_slip)) then
      allocate(fault_slip(nfaults))
  endif
  fault_slip = x(:,1)
  
  if (verbosity.ge.1) then
      write(stderr,'("Finished lsqr_invert()")')
      write(stderr,*)
  endif
  
negative.code: ! Invert displacements and pre-stresses for fault slip using a linear least squares approach
  !----
  use command_line, only : verbosity
  use arrays, only : fault_slip
  use io, only : stderr
  implicit none
  ! Local variables
  double precision, dimension(:,:), allocatable :: A, b, x, Atmp
  integer :: nrows, ncols, ncols2, ptr_disp, ptr_stress, ptr_damp, ptr_smooth
  
  if (verbosity.ge.2) then
      write(stderr,'("Starting lsqr_invert()")')
  endif
  
  