|
|
|
@ -244,36 +244,38 @@ subroutine psb_cd_inloc(v, ctxt, desc, info, globalcheck,idx,usehash)
|
|
|
|
|
call psb_errpush(info,name,l_err=l_err)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
! Sort, eliminate duplicates, then
|
|
|
|
|
! scramble back into original position.
|
|
|
|
|
ix(1) = -1
|
|
|
|
|
if (present(idx)) then
|
|
|
|
|
if (size(idx) >= loc_row) then
|
|
|
|
|
if (check_) then
|
|
|
|
|
! Sort, eliminate duplicates, then
|
|
|
|
|
! scramble back into original position.
|
|
|
|
|
ix(1) = -1
|
|
|
|
|
if (present(idx)) then
|
|
|
|
|
if (size(idx) >= loc_row) then
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1, loc_row
|
|
|
|
|
ix(i) = idx(i)
|
|
|
|
|
end do
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
if (ix(1) == -1) then
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1, loc_row
|
|
|
|
|
ix(i) = idx(i)
|
|
|
|
|
ix(i) = i
|
|
|
|
|
end do
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
if (ix(1) == -1) then
|
|
|
|
|
do i=1, loc_row
|
|
|
|
|
ix(i) = i
|
|
|
|
|
call psb_msort(vl,ix,flag=psb_sort_keep_idx_)
|
|
|
|
|
nlu = min(1,loc_row)
|
|
|
|
|
do i=2,loc_row
|
|
|
|
|
if (vl(i) /= vl(nlu)) then
|
|
|
|
|
nlu = nlu + 1
|
|
|
|
|
vl(nlu) = vl(i)
|
|
|
|
|
ix(nlu) = ix(i)
|
|
|
|
|
end if
|
|
|
|
|
end do
|
|
|
|
|
end if
|
|
|
|
|
call psb_msort(vl,ix,flag=psb_sort_keep_idx_)
|
|
|
|
|
nlu = min(1,loc_row)
|
|
|
|
|
do i=2,loc_row
|
|
|
|
|
if (vl(i) /= vl(nlu)) then
|
|
|
|
|
nlu = nlu + 1
|
|
|
|
|
vl(nlu) = vl(i)
|
|
|
|
|
ix(nlu) = ix(i)
|
|
|
|
|
end if
|
|
|
|
|
end do
|
|
|
|
|
call psb_msort(ix(1:nlu),vl(1:nlu),flag=psb_sort_keep_idx_)
|
|
|
|
|
|
|
|
|
|
if (debug_size) &
|
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': After sort ',nlu
|
|
|
|
|
call psb_msort(ix(1:nlu),vl(1:nlu),flag=psb_sort_keep_idx_)
|
|
|
|
|
|
|
|
|
|
if (debug_size) &
|
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': After sort ',nlu
|
|
|
|
|
end if
|
|
|
|
|
call psb_nullify_desc(desc)
|
|
|
|
|
if (do_timings) then
|
|
|
|
|
call psb_barrier(ctxt)
|
|
|
|
|