util/psb_mat_dist_impl.f90
 util/psb_mat_dist_mod.f90

Added MOLD argument to mat_dist.
psblas3-type-indexed
Salvatore Filippone 14 years ago
parent 6c25b560ad
commit c0d6e515e5

@ -30,7 +30,7 @@
!!$
!!$
subroutine smatdist(a_glob, a, ictxt, desc_a,&
& b_glob, b, info, parts, v, inroot,fmt)
& b_glob, b, info, parts, v, inroot,fmt,mold)
!
! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using
@ -101,6 +101,7 @@ subroutine smatdist(a_glob, a, ictxt, desc_a,&
integer, intent(out) :: info
integer, optional :: inroot
character(len=5), optional :: fmt
class(psb_s_base_sparse_mat), optional :: mold
integer :: v(:)
interface
@ -120,7 +121,6 @@ subroutine smatdist(a_glob, a, ictxt, desc_a,&
& k_count, root, liwork, nrow, ncol, nnzero, nrhs,&
& i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5)
integer, allocatable :: iwork(:)
character :: afmt*5
integer, allocatable :: irow(:),icol(:)
real(psb_spk_), allocatable :: val(:)
integer, parameter :: nb=30
@ -408,12 +408,6 @@ subroutine smatdist(a_glob, a, ictxt, desc_a,&
endif
end do
if (present(fmt)) then
afmt=fmt
else
afmt = 'CSR'
endif
call psb_barrier(ictxt)
t0 = psb_wtime()
call psb_cdasb(desc_a,info)
@ -427,7 +421,7 @@ subroutine smatdist(a_glob, a, ictxt, desc_a,&
call psb_barrier(ictxt)
t2 = psb_wtime()
call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt)
call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=fmt,mold=mold)
t3 = psb_wtime()
if(info /= psb_success_)then
info=psb_err_from_subroutine_
@ -475,7 +469,7 @@ end subroutine smatdist
subroutine dmatdist(a_glob, a, ictxt, desc_a,&
& b_glob, b, info, parts, v, inroot,fmt)
& b_glob, b, info, parts, v, inroot,fmt,mold)
!
! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using
@ -546,6 +540,7 @@ subroutine dmatdist(a_glob, a, ictxt, desc_a,&
integer, intent(out) :: info
integer, optional :: inroot
character(len=5), optional :: fmt
class(psb_d_base_sparse_mat), optional :: mold
integer :: v(:)
interface
@ -565,7 +560,6 @@ subroutine dmatdist(a_glob, a, ictxt, desc_a,&
& k_count, root, liwork, nrow, ncol, nnzero, nrhs,&
& i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5)
integer, allocatable :: iwork(:)
character :: afmt*5
integer, allocatable :: irow(:),icol(:)
real(psb_dpk_), allocatable :: val(:)
integer, parameter :: nb=30
@ -854,11 +848,6 @@ subroutine dmatdist(a_glob, a, ictxt, desc_a,&
endif
end do
if (present(fmt)) then
afmt=fmt
else
afmt = 'CSR'
endif
call psb_barrier(ictxt)
t0 = psb_wtime()
@ -873,7 +862,7 @@ subroutine dmatdist(a_glob, a, ictxt, desc_a,&
call psb_barrier(ictxt)
t2 = psb_wtime()
call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt)
call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=fmt,mold=mold)
t3 = psb_wtime()
if(info /= psb_success_)then
info=psb_err_from_subroutine_
@ -921,7 +910,7 @@ end subroutine dmatdist
subroutine cmatdist(a_glob, a, ictxt, desc_a,&
& b_glob, b, info, parts, v, inroot,fmt)
& b_glob, b, info, parts, v, inroot,fmt,mold)
!
! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using
@ -992,6 +981,7 @@ subroutine cmatdist(a_glob, a, ictxt, desc_a,&
integer, intent(out) :: info
integer, optional :: inroot
character(len=5), optional :: fmt
class(psb_c_base_sparse_mat), optional :: mold
integer :: v(:)
interface
@ -1011,7 +1001,6 @@ subroutine cmatdist(a_glob, a, ictxt, desc_a,&
& k_count, root, liwork, nrow, ncol, nnzero, nrhs,&
& i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5)
integer, allocatable :: iwork(:)
character :: afmt*5
integer, allocatable :: irow(:),icol(:)
complex(psb_spk_), allocatable :: val(:)
integer, parameter :: nb=30
@ -1299,12 +1288,6 @@ subroutine cmatdist(a_glob, a, ictxt, desc_a,&
endif
end do
if (present(fmt)) then
afmt=fmt
else
afmt = 'CSR'
endif
call psb_barrier(ictxt)
t0 = psb_wtime()
call psb_cdasb(desc_a,info)
@ -1318,7 +1301,7 @@ subroutine cmatdist(a_glob, a, ictxt, desc_a,&
call psb_barrier(ictxt)
t2 = psb_wtime()
call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt)
call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=fmt,mold=mold)
t3 = psb_wtime()
if(info /= psb_success_)then
info=psb_err_from_subroutine_
@ -1366,7 +1349,7 @@ end subroutine cmatdist
subroutine zmatdist(a_glob, a, ictxt, desc_a,&
& b_glob, b, info, parts, v, inroot,fmt)
& b_glob, b, info, parts, v, inroot,fmt,mold)
!
! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using
@ -1437,6 +1420,7 @@ subroutine zmatdist(a_glob, a, ictxt, desc_a,&
integer, intent(out) :: info
integer, optional :: inroot
character(len=5), optional :: fmt
class(psb_z_base_sparse_mat), optional :: mold
integer :: v(:)
interface
@ -1456,7 +1440,6 @@ subroutine zmatdist(a_glob, a, ictxt, desc_a,&
& k_count, root, liwork, nrow, ncol, nnzero, nrhs,&
& i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5)
integer, allocatable :: iwork(:)
character :: afmt*5
integer, allocatable :: irow(:),icol(:)
complex(psb_dpk_), allocatable :: val(:)
integer, parameter :: nb=30
@ -1744,12 +1727,6 @@ subroutine zmatdist(a_glob, a, ictxt, desc_a,&
endif
end do
if (present(fmt)) then
afmt=fmt
else
afmt = 'CSR'
endif
call psb_barrier(ictxt)
t0 = psb_wtime()
call psb_cdasb(desc_a,info)
@ -1763,7 +1740,7 @@ subroutine zmatdist(a_glob, a, ictxt, desc_a,&
call psb_barrier(ictxt)
t2 = psb_wtime()
call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt)
call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=fmt,mold=mold)
t3 = psb_wtime()
if(info /= psb_success_)then
info=psb_err_from_subroutine_

@ -33,7 +33,7 @@ module psb_mat_dist_mod
interface psb_matdist
subroutine smatdist(a_glob, a, ictxt, desc_a,&
& b_glob, b, info, parts, v, inroot,fmt)
& b_glob, b, info, parts, v, inroot,fmt,mold)
!
! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using
@ -90,7 +90,8 @@ module psb_mat_dist_mod
! on entry: specifies processor holding a_glob. default: 0
! on exit : unchanged.
!
use psb_sparse_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_
use psb_sparse_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_,&
& psb_s_base_sparse_mat
implicit none
! parameters
@ -103,6 +104,7 @@ module psb_mat_dist_mod
integer, intent(out) :: info
integer, optional :: inroot
character(len=*), optional :: fmt
class(psb_s_base_sparse_mat), optional :: mold
integer :: v(:)
interface
@ -117,7 +119,7 @@ module psb_mat_dist_mod
end subroutine smatdist
subroutine dmatdist(a_glob, a, ictxt, desc_a,&
& b_glob, b, info, parts, v, inroot,fmt)
& b_glob, b, info, parts, v, inroot,fmt,mold)
!
! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using
@ -174,7 +176,8 @@ module psb_mat_dist_mod
! on entry: specifies processor holding a_glob. default: 0
! on exit : unchanged.
!
use psb_sparse_mod, only : psb_dspmat_type, psb_dpk_, psb_desc_type
use psb_sparse_mod, only : psb_dspmat_type, psb_dpk_, psb_desc_type,&
& psb_d_base_sparse_mat
implicit none
! parameters
@ -187,6 +190,7 @@ module psb_mat_dist_mod
integer, intent(out) :: info
integer, optional :: inroot
character(len=*), optional :: fmt
class(psb_d_base_sparse_mat), optional :: mold
integer :: v(:)
interface
@ -202,7 +206,7 @@ module psb_mat_dist_mod
end subroutine dmatdist
subroutine cmatdist(a_glob, a, ictxt, desc_a,&
& b_glob, b, info, parts, v, inroot,fmt)
& b_glob, b, info, parts, v, inroot,fmt,mold)
!
! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using
@ -259,7 +263,8 @@ module psb_mat_dist_mod
! on entry: specifies processor holding a_glob. default: 0
! on exit : unchanged.
!
use psb_sparse_mod, only : psb_cspmat_type, psb_spk_, psb_desc_type
use psb_sparse_mod, only : psb_cspmat_type, psb_spk_, psb_desc_type,&
& psb_c_base_sparse_mat
implicit none
! parameters
@ -272,6 +277,7 @@ module psb_mat_dist_mod
integer, intent(out) :: info
integer, optional :: inroot
character(len=*), optional :: fmt
class(psb_c_base_sparse_mat), optional :: mold
integer :: v(:)
interface
@ -287,7 +293,7 @@ module psb_mat_dist_mod
end subroutine cmatdist
subroutine zmatdist(a_glob, a, ictxt, desc_a,&
& b_glob, b, info, parts, v, inroot,fmt)
& b_glob, b, info, parts, v, inroot,fmt,mold)
!
! an utility subroutine to distribute a matrix among processors
! according to a user defined data distribution, using
@ -344,7 +350,8 @@ module psb_mat_dist_mod
! on entry: specifies processor holding a_glob. default: 0
! on exit : unchanged.
!
use psb_sparse_mod, only : psb_zspmat_type, psb_dpk_, psb_desc_type
use psb_sparse_mod, only : psb_zspmat_type, psb_dpk_, psb_desc_type,&
& psb_z_base_sparse_mat
implicit none
! parameters
@ -357,6 +364,7 @@ module psb_mat_dist_mod
integer, intent(out) :: info
integer, optional :: inroot
character(len=*), optional :: fmt
class(psb_z_base_sparse_mat), optional :: mold
integer :: v(:)
interface

Loading…
Cancel
Save