|
|
|
@ -77,8 +77,13 @@ module psb_metispart_mod
|
|
|
|
|
integer(psb_lpk_), intent(in) :: n, nparts
|
|
|
|
|
integer(psb_lpk_), intent(in) :: ja(:), irp(:)
|
|
|
|
|
integer(psb_lpk_), allocatable, intent(inout) :: vect(:)
|
|
|
|
|
#if defined(METIS_REAL_32)
|
|
|
|
|
real(psb_spk_),optional, intent(in) :: weights(:)
|
|
|
|
|
|
|
|
|
|
#elif defined(METIS_REAL_64)
|
|
|
|
|
real(psb_dpk_),optional, intent(in) :: weights(:)
|
|
|
|
|
#else
|
|
|
|
|
choke on me;
|
|
|
|
|
#endif
|
|
|
|
|
end subroutine psi_l_build_mtpart
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
@ -181,8 +186,13 @@ contains
|
|
|
|
|
type(psb_ld_csr_sparse_mat), intent(in) :: a
|
|
|
|
|
integer(psb_lpk_) :: nparts
|
|
|
|
|
real(psb_dpk_), optional :: weights(:)
|
|
|
|
|
#if defined(METIS_REAL_32)
|
|
|
|
|
real(psb_spk_), allocatable :: wgh_(:)
|
|
|
|
|
|
|
|
|
|
#elif defined(METIS_REAL_64)
|
|
|
|
|
real(psb_dpk_), allocatable :: wgh_(:)
|
|
|
|
|
#else
|
|
|
|
|
choke on me;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (present(weights)) then
|
|
|
|
|
if (size(weights)==nparts) then
|
|
|
|
@ -220,8 +230,13 @@ contains
|
|
|
|
|
type(psb_lz_csr_sparse_mat), intent(in) :: a
|
|
|
|
|
integer(psb_lpk_) :: nparts
|
|
|
|
|
real(psb_dpk_), optional :: weights(:)
|
|
|
|
|
#if defined(METIS_REAL_32)
|
|
|
|
|
real(psb_spk_), allocatable :: wgh_(:)
|
|
|
|
|
|
|
|
|
|
#elif defined(METIS_REAL_64)
|
|
|
|
|
real(psb_dpk_), allocatable :: wgh_(:)
|
|
|
|
|
#else
|
|
|
|
|
choke on me;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (present(weights)) then
|
|
|
|
|
if (size(weights)==nparts) then
|
|
|
|
@ -276,9 +291,25 @@ contains
|
|
|
|
|
type(psb_lc_csr_sparse_mat), intent(in) :: a
|
|
|
|
|
integer(psb_lpk_) :: nparts
|
|
|
|
|
real(psb_spk_), optional :: weights(:)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psi_build_mtpart(a%get_nrows(),a%ja,a%irp,nparts,graph_vect,weights)
|
|
|
|
|
#if defined(METIS_REAL_32)
|
|
|
|
|
real(psb_spk_), allocatable :: wgh_(:)
|
|
|
|
|
#elif defined(METIS_REAL_64)
|
|
|
|
|
real(psb_dpk_), allocatable :: wgh_(:)
|
|
|
|
|
#else
|
|
|
|
|
choke on me;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (present(weights)) then
|
|
|
|
|
if (size(weights)==nparts) then
|
|
|
|
|
wgh_ = weights
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
if (allocated(wgh_)) then
|
|
|
|
|
call psi_build_mtpart(a%get_nrows(),a%ja,a%irp,nparts,graph_vect,wgh_)
|
|
|
|
|
else
|
|
|
|
|
call psi_build_mtpart(a%get_nrows(),a%ja,a%irp,nparts,graph_vect)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end subroutine lc_csr_build_mtpart
|
|
|
|
|
|
|
|
|
@ -288,10 +319,26 @@ contains
|
|
|
|
|
type(psb_ls_csr_sparse_mat), intent(in) :: a
|
|
|
|
|
integer(psb_lpk_) :: nparts
|
|
|
|
|
real(psb_spk_), optional :: weights(:)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psi_build_mtpart(a%get_nrows(),a%ja,a%irp,nparts,graph_vect,weights)
|
|
|
|
|
#if defined(METIS_REAL_32)
|
|
|
|
|
real(psb_spk_), allocatable :: wgh_(:)
|
|
|
|
|
#elif defined(METIS_REAL_64)
|
|
|
|
|
real(psb_dpk_), allocatable :: wgh_(:)
|
|
|
|
|
#else
|
|
|
|
|
choke on me;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (present(weights)) then
|
|
|
|
|
if (size(weights)==nparts) then
|
|
|
|
|
wgh_ = weights
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
if (allocated(wgh_)) then
|
|
|
|
|
call psi_build_mtpart(a%get_nrows(),a%ja,a%irp,nparts,graph_vect,wgh_)
|
|
|
|
|
else
|
|
|
|
|
call psi_build_mtpart(a%get_nrows(),a%ja,a%irp,nparts,graph_vect)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end subroutine ls_csr_build_mtpart
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|