New argument IMOLD in mat_dist

newmatdist
sfilippone 1 year ago
parent bc6f14169e
commit 4aef3f2a80

@ -30,7 +30,7 @@
! !
! !
subroutine psb_cmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_cmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -81,7 +81,8 @@ subroutine psb_cmatdist(a_glob, a, ctxt, desc_a,&
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_c_base_sparse_mat), optional :: mold class(psb_c_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
@ -321,7 +322,7 @@ subroutine psb_cmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t0 = psb_wtime() t0 = psb_wtime()
call psb_cdasb(desc_a,info) call psb_cdasb(desc_a,info,mold=imold)
t1 = psb_wtime() t1 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -332,7 +333,7 @@ subroutine psb_cmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t2 = psb_wtime() t2 = psb_wtime()
call psb_spasb(a,desc_a,info,afmt=fmt,mold=mold) call psb_spasb(a,desc_a,info,afmt=fmt,mold=amold)
t3 = psb_wtime() t3 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -371,7 +372,7 @@ end subroutine psb_cmatdist
subroutine psb_lcmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_lcmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -422,7 +423,8 @@ subroutine psb_lcmatdist(a_glob, a, ctxt, desc_a,&
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_c_base_sparse_mat), optional :: mold class(psb_c_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
@ -660,7 +662,7 @@ subroutine psb_lcmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t0 = psb_wtime() t0 = psb_wtime()
call psb_cdasb(desc_a,info) call psb_cdasb(desc_a,info,mold=imold)
t1 = psb_wtime() t1 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -671,7 +673,7 @@ subroutine psb_lcmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t2 = psb_wtime() t2 = psb_wtime()
call psb_spasb(a,desc_a,info,afmt=fmt,mold=mold) call psb_spasb(a,desc_a,info,afmt=fmt,mold=amold)
t3 = psb_wtime() t3 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_

@ -32,11 +32,11 @@
module psb_c_mat_dist_mod module psb_c_mat_dist_mod
use psb_base_mod, only : psb_ipk_, psb_spk_, psb_desc_type, psb_parts, & use psb_base_mod, only : psb_ipk_, psb_spk_, psb_desc_type, psb_parts, &
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_vect_type, & & psb_cspmat_type, psb_c_base_sparse_mat, psb_c_vect_type, &
& psb_lcspmat_type, psb_ctxt_type & psb_lcspmat_type, psb_ctxt_type, psb_i_base_vect_type
interface psb_matdist interface psb_matdist
subroutine psb_cmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_cmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -87,13 +87,14 @@ module psb_c_mat_dist_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_c_base_sparse_mat), optional :: mold class(psb_c_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
end subroutine psb_cmatdist end subroutine psb_cmatdist
subroutine psb_lcmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_lcmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -144,7 +145,8 @@ module psb_c_mat_dist_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_c_base_sparse_mat), optional :: mold class(psb_c_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)

@ -30,7 +30,7 @@
! !
! !
subroutine psb_dmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_dmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -81,7 +81,8 @@ subroutine psb_dmatdist(a_glob, a, ctxt, desc_a,&
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_d_base_sparse_mat), optional :: mold class(psb_d_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
@ -321,7 +322,7 @@ subroutine psb_dmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t0 = psb_wtime() t0 = psb_wtime()
call psb_cdasb(desc_a,info) call psb_cdasb(desc_a,info,mold=imold)
t1 = psb_wtime() t1 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -332,7 +333,7 @@ subroutine psb_dmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t2 = psb_wtime() t2 = psb_wtime()
call psb_spasb(a,desc_a,info,afmt=fmt,mold=mold) call psb_spasb(a,desc_a,info,afmt=fmt,mold=amold)
t3 = psb_wtime() t3 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -371,7 +372,7 @@ end subroutine psb_dmatdist
subroutine psb_ldmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_ldmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -422,7 +423,8 @@ subroutine psb_ldmatdist(a_glob, a, ctxt, desc_a,&
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_d_base_sparse_mat), optional :: mold class(psb_d_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
@ -660,7 +662,7 @@ subroutine psb_ldmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t0 = psb_wtime() t0 = psb_wtime()
call psb_cdasb(desc_a,info) call psb_cdasb(desc_a,info,mold=imold)
t1 = psb_wtime() t1 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -671,7 +673,7 @@ subroutine psb_ldmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t2 = psb_wtime() t2 = psb_wtime()
call psb_spasb(a,desc_a,info,afmt=fmt,mold=mold) call psb_spasb(a,desc_a,info,afmt=fmt,mold=amold)
t3 = psb_wtime() t3 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_

@ -32,11 +32,11 @@
module psb_d_mat_dist_mod module psb_d_mat_dist_mod
use psb_base_mod, only : psb_ipk_, psb_dpk_, psb_desc_type, psb_parts, & use psb_base_mod, only : psb_ipk_, psb_dpk_, psb_desc_type, psb_parts, &
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_vect_type, & & psb_dspmat_type, psb_d_base_sparse_mat, psb_d_vect_type, &
& psb_ldspmat_type, psb_ctxt_type & psb_ldspmat_type, psb_ctxt_type, psb_i_base_vect_type
interface psb_matdist interface psb_matdist
subroutine psb_dmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_dmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -87,13 +87,14 @@ module psb_d_mat_dist_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_d_base_sparse_mat), optional :: mold class(psb_d_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
end subroutine psb_dmatdist end subroutine psb_dmatdist
subroutine psb_ldmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_ldmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -144,7 +145,8 @@ module psb_d_mat_dist_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_d_base_sparse_mat), optional :: mold class(psb_d_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)

@ -30,7 +30,7 @@
! !
! !
subroutine psb_smatdist(a_glob, a, ctxt, desc_a,& subroutine psb_smatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -81,7 +81,8 @@ subroutine psb_smatdist(a_glob, a, ctxt, desc_a,&
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_s_base_sparse_mat), optional :: mold class(psb_s_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
@ -321,7 +322,7 @@ subroutine psb_smatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t0 = psb_wtime() t0 = psb_wtime()
call psb_cdasb(desc_a,info) call psb_cdasb(desc_a,info,mold=imold)
t1 = psb_wtime() t1 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -332,7 +333,7 @@ subroutine psb_smatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t2 = psb_wtime() t2 = psb_wtime()
call psb_spasb(a,desc_a,info,afmt=fmt,mold=mold) call psb_spasb(a,desc_a,info,afmt=fmt,mold=amold)
t3 = psb_wtime() t3 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -371,7 +372,7 @@ end subroutine psb_smatdist
subroutine psb_lsmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_lsmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -422,7 +423,8 @@ subroutine psb_lsmatdist(a_glob, a, ctxt, desc_a,&
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_s_base_sparse_mat), optional :: mold class(psb_s_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
@ -660,7 +662,7 @@ subroutine psb_lsmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t0 = psb_wtime() t0 = psb_wtime()
call psb_cdasb(desc_a,info) call psb_cdasb(desc_a,info,mold=imold)
t1 = psb_wtime() t1 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -671,7 +673,7 @@ subroutine psb_lsmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t2 = psb_wtime() t2 = psb_wtime()
call psb_spasb(a,desc_a,info,afmt=fmt,mold=mold) call psb_spasb(a,desc_a,info,afmt=fmt,mold=amold)
t3 = psb_wtime() t3 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_

@ -32,11 +32,11 @@
module psb_s_mat_dist_mod module psb_s_mat_dist_mod
use psb_base_mod, only : psb_ipk_, psb_spk_, psb_desc_type, psb_parts, & use psb_base_mod, only : psb_ipk_, psb_spk_, psb_desc_type, psb_parts, &
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_vect_type, & & psb_sspmat_type, psb_s_base_sparse_mat, psb_s_vect_type, &
& psb_lsspmat_type, psb_ctxt_type & psb_lsspmat_type, psb_ctxt_type, psb_i_base_vect_type
interface psb_matdist interface psb_matdist
subroutine psb_smatdist(a_glob, a, ctxt, desc_a,& subroutine psb_smatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -87,13 +87,14 @@ module psb_s_mat_dist_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_s_base_sparse_mat), optional :: mold class(psb_s_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
end subroutine psb_smatdist end subroutine psb_smatdist
subroutine psb_lsmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_lsmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -144,7 +145,8 @@ module psb_s_mat_dist_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_s_base_sparse_mat), optional :: mold class(psb_s_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)

@ -30,7 +30,7 @@
! !
! !
subroutine psb_zmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_zmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -81,7 +81,8 @@ subroutine psb_zmatdist(a_glob, a, ctxt, desc_a,&
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_z_base_sparse_mat), optional :: mold class(psb_z_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
@ -321,7 +322,7 @@ subroutine psb_zmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t0 = psb_wtime() t0 = psb_wtime()
call psb_cdasb(desc_a,info) call psb_cdasb(desc_a,info,mold=imold)
t1 = psb_wtime() t1 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -332,7 +333,7 @@ subroutine psb_zmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t2 = psb_wtime() t2 = psb_wtime()
call psb_spasb(a,desc_a,info,afmt=fmt,mold=mold) call psb_spasb(a,desc_a,info,afmt=fmt,mold=amold)
t3 = psb_wtime() t3 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -371,7 +372,7 @@ end subroutine psb_zmatdist
subroutine psb_lzmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_lzmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -422,7 +423,8 @@ subroutine psb_lzmatdist(a_glob, a, ctxt, desc_a,&
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_z_base_sparse_mat), optional :: mold class(psb_z_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
@ -660,7 +662,7 @@ subroutine psb_lzmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t0 = psb_wtime() t0 = psb_wtime()
call psb_cdasb(desc_a,info) call psb_cdasb(desc_a,info,mold=imold)
t1 = psb_wtime() t1 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
@ -671,7 +673,7 @@ subroutine psb_lzmatdist(a_glob, a, ctxt, desc_a,&
call psb_barrier(ctxt) call psb_barrier(ctxt)
t2 = psb_wtime() t2 = psb_wtime()
call psb_spasb(a,desc_a,info,afmt=fmt,mold=mold) call psb_spasb(a,desc_a,info,afmt=fmt,mold=amold)
t3 = psb_wtime() t3 = psb_wtime()
if(info /= psb_success_)then if(info /= psb_success_)then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_

@ -32,11 +32,11 @@
module psb_z_mat_dist_mod module psb_z_mat_dist_mod
use psb_base_mod, only : psb_ipk_, psb_dpk_, psb_desc_type, psb_parts, & use psb_base_mod, only : psb_ipk_, psb_dpk_, psb_desc_type, psb_parts, &
& psb_zspmat_type, psb_z_base_sparse_mat, psb_z_vect_type, & & psb_zspmat_type, psb_z_base_sparse_mat, psb_z_vect_type, &
& psb_lzspmat_type, psb_ctxt_type & psb_lzspmat_type, psb_ctxt_type, psb_i_base_vect_type
interface psb_matdist interface psb_matdist
subroutine psb_zmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_zmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -87,13 +87,14 @@ module psb_z_mat_dist_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_z_base_sparse_mat), optional :: mold class(psb_z_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)
end subroutine psb_zmatdist end subroutine psb_zmatdist
subroutine psb_lzmatdist(a_glob, a, ctxt, desc_a,& subroutine psb_lzmatdist(a_glob, a, ctxt, desc_a,&
& info, parts, vg, vsz, inroot,fmt,mold) & info, parts, vg, vsz, inroot,fmt,amold,imold)
! !
! an utility subroutine to distribute a matrix among processors ! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using ! according to a user defined data distribution, using
@ -144,7 +145,8 @@ module psb_z_mat_dist_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional :: inroot integer(psb_ipk_), optional :: inroot
character(len=*), optional :: fmt character(len=*), optional :: fmt
class(psb_z_base_sparse_mat), optional :: mold class(psb_z_base_sparse_mat), optional :: amold
class(psb_i_base_vect_type), optional, intent(in) :: imold
procedure(psb_parts), optional :: parts procedure(psb_parts), optional :: parts
integer(psb_ipk_), optional :: vg(:) integer(psb_ipk_), optional :: vg(:)
integer(psb_ipk_), optional :: vsz(:) integer(psb_ipk_), optional :: vsz(:)

Loading…
Cancel
Save