Fix METISPART for Intel 17.

scr-persistent-collective
Salvatore Filippone 6 years ago
parent e828a2a45a
commit c465f255c2

@ -154,96 +154,60 @@ contains
type(psb_dspmat_type), intent(in) :: a type(psb_dspmat_type), intent(in) :: a
integer(psb_ipk_) :: nparts integer(psb_ipk_) :: nparts
real(psb_dpk_), optional :: weights(:) real(psb_dpk_), optional :: weights(:)
real(psb_spk_), allocatable :: wgh_(:)
select type (aa=>a%a) select type (aa=>a%a)
type is (psb_d_csr_sparse_mat) type is (psb_d_csr_sparse_mat)
if (present(weights)) then call d_csr_build_mtpart(aa,nparts,weights)
if (size(weights)==nparts) then
wgh_ = weights
end if
end if
if (allocated(wgh_)) then
call build_mtpart(aa%get_nrows(),aa%get_fmt(),aa%ja,aa%irp,nparts,wgh_)
else
call build_mtpart(aa%get_nrows(),aa%get_fmt(),aa%ja,aa%irp,nparts)
end if
class default class default
write(psb_err_unit,*) 'Sorry, right now we only take CSR input!' write(psb_err_unit,*) 'Sorry, right now we only take CSR input!'
end select end select
end subroutine d_mat_build_mtpart end subroutine d_mat_build_mtpart
subroutine d_csr_build_mtpart(a,nparts,weights)
subroutine z_mat_build_mtpart(a,nparts,weights)
use psb_base_mod use psb_base_mod
implicit none implicit none
type(psb_zspmat_type), intent(in) :: a type(psb_d_csr_sparse_mat), intent(in) :: a
integer(psb_ipk_) :: nparts integer(psb_ipk_) :: nparts
real(psb_dpk_), optional :: weights(:) real(psb_dpk_), optional :: weights(:)
real(psb_spk_), allocatable :: wgh_(:) real(psb_spk_), allocatable :: wgh_(:)
select type (aa=>a%a)
type is (psb_z_csr_sparse_mat)
if (present(weights)) then if (present(weights)) then
if (size(weights)==nparts) then if (size(weights)==nparts) then
wgh_ = weights wgh_ = weights
end if end if
end if end if
if (allocated(wgh_)) then if (allocated(wgh_)) then
call build_mtpart(aa%get_nrows(),aa%get_fmt(),aa%ja,aa%irp,nparts,wgh_) call build_mtpart(a%get_nrows(),a%get_fmt(),a%ja,a%irp,nparts,wgh_)
else else
call build_mtpart(aa%get_nrows(),aa%get_fmt(),aa%ja,aa%irp,nparts) call build_mtpart(a%get_nrows(),a%get_fmt(),a%ja,a%irp,nparts)
end if end if
class default
write(psb_err_unit,*) 'Sorry, right now we only take CSR input!'
end select
end subroutine z_mat_build_mtpart
subroutine s_mat_build_mtpart(a,nparts,weights)
use psb_base_mod
implicit none
type(psb_sspmat_type), intent(in) :: a
integer(psb_ipk_) :: nparts
real(psb_spk_), optional :: weights(:)
select type (aa=>a%a)
type is (psb_s_csr_sparse_mat)
call build_mtpart(aa%get_nrows(),aa%get_fmt(),aa%ja,aa%irp,nparts,weights)
class default
write(psb_err_unit,*) 'Sorry, right now we only take CSR input!'
end select
end subroutine s_mat_build_mtpart
end subroutine d_csr_build_mtpart
subroutine c_mat_build_mtpart(a,nparts,weights) subroutine z_mat_build_mtpart(a,nparts,weights)
use psb_base_mod use psb_base_mod
implicit none implicit none
type(psb_cspmat_type), intent(in) :: a type(psb_zspmat_type), intent(in) :: a
integer(psb_ipk_) :: nparts integer(psb_ipk_) :: nparts
real(psb_spk_), optional :: weights(:) real(psb_dpk_), optional :: weights(:)
select type (aa=>a%a) select type (aa=>a%a)
type is (psb_c_csr_sparse_mat) type is (psb_z_csr_sparse_mat)
call build_mtpart(aa%get_nrows(),aa%get_fmt(),aa%ja,aa%irp,nparts,weights) call z_csr_build_mtpart(aa,nparts,weights)
class default class default
write(psb_err_unit,*) 'Sorry, right now we only take CSR input!' write(psb_err_unit,*) 'Sorry, right now we only take CSR input!'
end select end select
end subroutine c_mat_build_mtpart end subroutine z_mat_build_mtpart
subroutine d_csr_build_mtpart(a,nparts,weights) subroutine z_csr_build_mtpart(a,nparts,weights)
use psb_base_mod use psb_base_mod
implicit none implicit none
type(psb_d_csr_sparse_mat), intent(in) :: a type(psb_z_csr_sparse_mat), intent(in) :: a
integer(psb_ipk_) :: nparts integer(psb_ipk_) :: nparts
real(psb_dpk_), optional :: weights(:) real(psb_dpk_), optional :: weights(:)
real(psb_spk_), allocatable :: wgh_(:) real(psb_spk_), allocatable :: wgh_(:)
@ -260,43 +224,41 @@ contains
call build_mtpart(a%get_nrows(),a%get_fmt(),a%ja,a%irp,nparts) call build_mtpart(a%get_nrows(),a%get_fmt(),a%ja,a%irp,nparts)
end if end if
end subroutine d_csr_build_mtpart end subroutine z_csr_build_mtpart
subroutine z_csr_build_mtpart(a,nparts,weights) subroutine s_mat_build_mtpart(a,nparts,weights)
use psb_base_mod use psb_base_mod
implicit none implicit none
type(psb_z_csr_sparse_mat), intent(in) :: a type(psb_sspmat_type), intent(in) :: a
integer(psb_ipk_) :: nparts integer(psb_ipk_) :: nparts
real(psb_dpk_), optional :: weights(:) real(psb_spk_), optional :: weights(:)
real(psb_spk_), allocatable :: wgh_(:)
if (present(weights)) then select type (aa=>a%a)
if (size(weights)==nparts) then type is (psb_s_csr_sparse_mat)
wgh_ = weights call s_csr_build_mtpart(aa,nparts,weights)
end if class default
end if write(psb_err_unit,*) 'Sorry, right now we only take CSR input!'
if (allocated(wgh_)) then end select
call build_mtpart(a%get_nrows(),a%get_fmt(),a%ja,a%irp,nparts,wgh_)
else
call build_mtpart(a%get_nrows(),a%get_fmt(),a%ja,a%irp,nparts)
end if
end subroutine z_csr_build_mtpart
end subroutine s_mat_build_mtpart
subroutine s_csr_build_mtpart(a,nparts,weights) subroutine c_mat_build_mtpart(a,nparts,weights)
use psb_base_mod use psb_base_mod
implicit none implicit none
type(psb_s_csr_sparse_mat), intent(in) :: a type(psb_cspmat_type), intent(in) :: a
integer(psb_ipk_) :: nparts integer(psb_ipk_) :: nparts
real(psb_spk_), optional :: weights(:) real(psb_spk_), optional :: weights(:)
call build_mtpart(a%get_nrows(),a%get_fmt(),a%ja,a%irp,nparts,weights) select type (aa=>a%a)
type is (psb_c_csr_sparse_mat)
end subroutine s_csr_build_mtpart call c_csr_build_mtpart(aa,nparts,weights)
class default
write(psb_err_unit,*) 'Sorry, right now we only take CSR input!'
end select
end subroutine c_mat_build_mtpart
subroutine c_csr_build_mtpart(a,nparts,weights) subroutine c_csr_build_mtpart(a,nparts,weights)
use psb_base_mod use psb_base_mod
@ -310,7 +272,17 @@ contains
end subroutine c_csr_build_mtpart end subroutine c_csr_build_mtpart
subroutine s_csr_build_mtpart(a,nparts,weights)
use psb_base_mod
implicit none
type(psb_s_csr_sparse_mat), intent(in) :: a
integer(psb_ipk_) :: nparts
real(psb_spk_), optional :: weights(:)
call build_mtpart(a%get_nrows(),a%get_fmt(),a%ja,a%irp,nparts,weights)
end subroutine s_csr_build_mtpart
subroutine build_mtpart(n,fida,ja,irp,nparts,weights) subroutine build_mtpart(n,fida,ja,irp,nparts,weights)
use psb_base_mod use psb_base_mod

Loading…
Cancel
Save