|
|
|
@ -66,7 +66,7 @@ subroutine psi_i_crea_index(desc_a,index_in,index_out,nxch,nsnd,nrcv,info)
|
|
|
|
|
! ....local scalars...
|
|
|
|
|
integer(psb_ipk_) :: ictxt, me, np, mode, err_act, dl_lda, ldl
|
|
|
|
|
! ...parameters...
|
|
|
|
|
integer(psb_ipk_), allocatable :: dep_list(:,:), length_dl(:), loc_dl(:)
|
|
|
|
|
integer(psb_ipk_), allocatable :: dep_list(:,:), length_dl(:), loc_dl(:), c_dep_list(:), dl_ptr(:)
|
|
|
|
|
integer(psb_ipk_) :: dlmax, dlavg
|
|
|
|
|
integer(psb_ipk_),parameter :: root=psb_root_,no_comm=-1
|
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
@ -154,35 +154,56 @@ subroutine psi_i_crea_index(desc_a,index_in,index_out,nxch,nsnd,nrcv,info)
|
|
|
|
|
!!$ & ' avg:',dlavg, choose_sorting(dlmax,dlavg,np)
|
|
|
|
|
|
|
|
|
|
if (choose_sorting(dlmax,dlavg,np)) then
|
|
|
|
|
if (.true.) then
|
|
|
|
|
call psi_bld_glb_dep_list(ictxt,&
|
|
|
|
|
& loc_dl,length_dl,dep_list,dl_lda,info)
|
|
|
|
|
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_from_subroutine_,name,a_err='extrct_dl')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
if (debug_level >= psb_debug_inner_) &
|
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': from extract_dep_list',&
|
|
|
|
|
& me,length_dl(0),index_in(1), ':',dep_list(:length_dl(me),me)
|
|
|
|
|
! ...now process root contains dependence list of all processes...
|
|
|
|
|
if (debug_level >= psb_debug_inner_) &
|
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': root sorting dep list'
|
|
|
|
|
if (do_timings) call psb_toc(idx_phase1)
|
|
|
|
|
if (do_timings) call psb_tic(idx_phase2)
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! The dependency list has been symmetrized inside xtract_loc_dl
|
|
|
|
|
!
|
|
|
|
|
!!$ call psi_dl_check(dep_list,dl_lda,np,length_dl)
|
|
|
|
|
|
|
|
|
|
! ....now i can sort dependency lists.
|
|
|
|
|
call psi_sort_dl(dep_list,length_dl,np,info)
|
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_from_subroutine_,name,a_err='psi_sort_dl')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
if (do_timings) call psb_toc(idx_phase2)
|
|
|
|
|
ldl = length_dl(me)
|
|
|
|
|
loc_dl = dep_list(1:ldl,me)
|
|
|
|
|
else
|
|
|
|
|
if (do_timings) call psb_toc(idx_phase1)
|
|
|
|
|
if (do_timings) call psb_tic(idx_phase2)
|
|
|
|
|
call psi_bld_glb_dep_list(ictxt,&
|
|
|
|
|
& loc_dl,length_dl,c_dep_list,dl_ptr,info)
|
|
|
|
|
|
|
|
|
|
!!$ call psi_dl_check(dep_list,dl_lda,np,length_dl)
|
|
|
|
|
!!$
|
|
|
|
|
!!$ ! ....now i can sort dependency lists.
|
|
|
|
|
call psi_sort_dl(dl_ptr,c_dep_list,length_dl,np,info)
|
|
|
|
|
!!$ if(info /= psb_success_) then
|
|
|
|
|
!!$ call psb_errpush(psb_err_from_subroutine_,name,a_err='psi_sort_dl')
|
|
|
|
|
!!$ goto 9999
|
|
|
|
|
!!$ end if
|
|
|
|
|
if (do_timings) call psb_toc(idx_phase2)
|
|
|
|
|
|
|
|
|
|
call psi_bld_glb_dep_list(ictxt,&
|
|
|
|
|
& loc_dl,length_dl,dep_list,dl_lda,info)
|
|
|
|
|
|
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_from_subroutine_,name,a_err='extrct_dl')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
if (debug_level >= psb_debug_inner_) &
|
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': from extract_dep_list',&
|
|
|
|
|
& me,length_dl(0),index_in(1), ':',dep_list(:length_dl(me),me)
|
|
|
|
|
! ...now process root contains dependence list of all processes...
|
|
|
|
|
if (debug_level >= psb_debug_inner_) &
|
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': root sorting dep list'
|
|
|
|
|
if (do_timings) call psb_toc(idx_phase1)
|
|
|
|
|
if (do_timings) call psb_tic(idx_phase2)
|
|
|
|
|
|
|
|
|
|
call psi_dl_check(dep_list,dl_lda,np,length_dl)
|
|
|
|
|
|
|
|
|
|
! ....now i can sort dependency lists.
|
|
|
|
|
call psi_sort_dl(dep_list,length_dl,np,info)
|
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
|
call psb_errpush(psb_err_from_subroutine_,name,a_err='psi_sort_dl')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
if (do_timings) call psb_toc(idx_phase2)
|
|
|
|
|
ldl = length_dl(me)
|
|
|
|
|
loc_dl = dep_list(1:ldl,me)
|
|
|
|
|
else
|
|
|
|
|
! Do nothing
|
|
|
|
|
ldl = length_dl(me)
|
|
|
|
|