anchor.diff:      ! Written by Fredrik Berntsson (frber@math.liu.se) March 2003
       ! Modified by Berkant Savas (besav@math.liu.se) April 2006
       !-----------------------------------------------------------------------
  -    integer, parameter                      :: n=1000, maxiter=1000, nr_threads=4
  +    integer, parameter                      :: n=1000, maxiter=1000, nr_threads=16
       double precision,parameter              :: tol=1.0E-3
       double precision,dimension(0:n+1,0:n+1) :: T
       double precision,dimension(n)           :: tmp
  
positive.code: 
          ! Calculate start and stop criteria
          do i=0,nr_threads-2
              start_it(i) = (i*quote)+1
              stop_it(i) = (i+1)*quote
              padding_before(0:n-1, i) = T(1:n, start_it(i)-1)
              padding_after(0:n-1, i) = T(1:n, stop_it(i)+1)
          end do
          start_it(nr_threads-1) = ((nr_threads-1)*quote)+1
          stop_it(nr_threads-1) = n
          padding_before(0:n-1, nr_threads-1) = T(1:n,start_it(nr_threads-1)-1)
          padding_after(0:n-1, nr_threads-1) = T(1:n,stop_it(nr_threads-1)+1)
  
          !$omp parallel private(j,tmp1,tmp,padding_before,padding_after) shared(T) reduction(max: error)
          my_id = OMP_GET_THREAD_NUM()
  
          do j=start_it(my_id),stop_it(my_id)-1
  
negative.code: 
      quote = n/nr_threads
  
      do i=0,nr_threads-2
          start_it(i) = (i*quote)+1
          stop_it(i) = (i+1)*quote
      end do
      start_it(nr_threads-1) = ((nr_threads-1)*quote)+1
      stop_it(nr_threads-1) = n
  
      call omp_set_num_threads(nr_threads)
  
      ! Solve the linear system of equations using the Jacobi method
  