anchor.diff:      values(values_per) = insert_value
     END SUBROUTINE AppendToVector
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  -  SUBROUTINE GetPivot(AMat, start_index, pivot_vector, diag, index, value)
  +  SUBROUTINE GetPivot(AMat, start_index, pivot_vector, diag, index, &
  +       & local_pivots, num_local_pivots)
       !! Parameters
       TYPE(DistributedSparseMatrix_t), INTENT(IN) :: AMat
       INTEGER, DIMENSION(:), INTENT(INOUT) :: pivot_vector
       REAL(NTREAL), DIMENSION(:), INTENT(IN) :: diag
       INTEGER, INTENT(IN) :: start_index
       INTEGER, INTENT(OUT) :: index
  -    REAL(NTREAL), INTENT(OUT) :: value
  +    INTEGER, DIMENSION(:), INTENT(INOUT) :: local_pivots
  +    INTEGER, INTENT(OUT) :: num_local_pivots
       !! Local Variables
       REAL(NTREAL) :: temp_diag
       DOUBLE PRECISION, DIMENSION(2) :: max_diag
  
positive.code:     CALL MPI_Allreduce(MPI_IN_PLACE, max_diag, 1, MPI_2DOUBLE_PRECISION, &
           & MPI_MAXLOC, row_comm, grid_error)
  
      value = max_diag(1)
      index = INT(max_diag(2))
  
      swap = pivot_vector(index)
      pivot_vector(index) = pivot_vector(start_index)
      pivot_vector(start_index) = swap
    END SUBROUTINE GetPivot
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !> Construct the vector holding the accumulated diagonal values
  
negative.code:     !! For Pivoting
      INTEGER, DIMENSION(:), ALLOCATABLE :: pivot_vector
      REAL(NTREAL), DIMENSION(:), ALLOCATABLE :: diag
      INTEGER :: pi_j
      !! Local Variables
      TYPE(SparseMatrix_t) :: sparse_a
      TYPE(SparseMatrix_t) :: acol
  