anchor.diff:  
   !$OMP PARALLEL DEFAULT(NONE) &
   !$OMP&PRIVATE(i,X1,X2,X3,YV1,YV2,YV3,jS,jE,j,in,threadNum,blockNum,blockIndex) &
  -!$OMP&SHARED(D,AL,AU,indexL,itemL,indexU,itemU,X,Y,startPos,endPos,numOfThread,&
  -!$OMP&       numOfBlockPerThread)
  +!$OMP&SHARED(D,AL,AU,indexL,itemL,indexU,itemU,X,Y,startPos,endPos,numOfThread)
         threadNum = 0
         !$ threadNum = omp_get_thread_num()
         do blockNum = 0 , numOfBlockPerThread - 1
  
positive.code:           endif
          enddo
          endPos(blockNum) = N
          ! for irregular data
          do i= blockNum+1, numOfBlock-1
            startPos(i) = N
            endPos(i) = N
          end do
          ! write(9000+hecMESH%my_rank,*) mod(blockNum, numOfThread), &
          !      startPos(blockNum), endPos(blockNum)
  
          ! calculate sector cache size
          sectorCacheSize1 = int((dble(NP) * 3 * kreal / (4096 * 128)) + 0.999)
  
negative.code:       real(kind=kreal), pointer :: AL(:), AU(:), D(:)
  
        ! added for turning >>>
        integer, parameter :: numOfBlockPerThread = 100
        logical, save :: isFirst = .true.
        integer, save :: numOfThread = 1
        integer, save, allocatable :: startPos(:), endPos(:)
        integer(kind=kint), save :: sectorCacheSize0, sectorCacheSize1
        integer(kind=kint) :: threadNum, blockNum, numOfBlock
        integer(kind=kint) :: numOfElement, elementCount, blockIndex
        real(kind=kreal) :: numOfElementPerBlock
        ! <<< added for turning
  
        IF (hecmw_mat_get_usejad(hecMAT).ne.0) THEN
  