anchor.diff:      enddo
       !$omp end do
       !$omp end parallel
  +    t1 = hecmw_wtime()
  +    if (TIMER >= 3) write(0, '(A,f10.4)') "###### multiply_mat_mat (2) : ",t1-t0
  +    t0 = hecmw_wtime()
       call sort_and_uniq_rows(Cmat)
  +    t1 = hecmw_wtime()
  +    if (TIMER >= 3) write(0, '(A,f10.4)') "###### multiply_mat_mat (3) : ",t1-t0
     end subroutine multiply_mat_mat
   
     subroutine blk_matmul_add(ndof, A, B, AB)
  
positive.code:     integer(kind=kint), pointer :: sort_item(:), new_index(:), new_item(:)
      real(kind=kreal), pointer :: new_A(:)
      logical :: sorted
      nr = BTmat%nr
      ! check if already sorted
      sorted = .true.
  
negative.code:     nnz = Cmat%index(nr)
      Cmat%nnz = nnz
      !write(0,*) 'nnz',nnz
      t1 = hecmw_wtime()
      if (TIMER >= 3) write(0, '(A,f10.4)') "###### multiply_mat_mat (1) : ",t1-t0
      t0 = hecmw_wtime()
      allocate(Cmat%item(nnz))
      allocate(Cmat%A(ndof2 * nnz))
      Cmat%A(:) = 0.0d0
  