diff --git a/base/modules/tools/psb_c_tools_mod.f90 b/base/modules/tools/psb_c_tools_mod.f90 index 7257f592..3512c71f 100644 --- a/base/modules/tools/psb_c_tools_mod.f90 +++ b/base/modules/tools/psb_c_tools_mod.f90 @@ -260,6 +260,28 @@ Module psb_c_tools_mod logical, intent(in), optional :: rebuild logical, intent(in), optional :: local end subroutine psb_cspins + subroutine psb_cspins_csr_lirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + import + implicit none + type(psb_desc_type), intent(inout) :: desc_a + type(psb_cspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr + integer(psb_lpk_), intent(in) :: irw,irp(:),ja(:) + complex(psb_spk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + end subroutine psb_cspins_csr_lirp + subroutine psb_cspins_csr_iirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + import + implicit none + type(psb_desc_type), intent(inout) :: desc_a + type(psb_cspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr,irp(:) + integer(psb_lpk_), intent(in) :: irw,ja(:) + complex(psb_spk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + end subroutine psb_cspins_csr_iirp subroutine psb_cspins_v(nz,ia,ja,val,a,desc_a,info,rebuild,local) use psb_i_vect_mod, only : psb_i_vect_type import diff --git a/base/modules/tools/psb_d_tools_mod.f90 b/base/modules/tools/psb_d_tools_mod.f90 index 624a7e07..831559c5 100644 --- a/base/modules/tools/psb_d_tools_mod.f90 +++ b/base/modules/tools/psb_d_tools_mod.f90 @@ -260,6 +260,28 @@ Module psb_d_tools_mod logical, intent(in), optional :: rebuild logical, intent(in), optional :: local end subroutine psb_dspins + subroutine psb_dspins_csr_lirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + import + implicit none + type(psb_desc_type), intent(inout) :: desc_a + type(psb_dspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr + integer(psb_lpk_), intent(in) :: irw,irp(:),ja(:) + real(psb_dpk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + end subroutine psb_dspins_csr_lirp + subroutine psb_dspins_csr_iirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + import + implicit none + type(psb_desc_type), intent(inout) :: desc_a + type(psb_dspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr,irp(:) + integer(psb_lpk_), intent(in) :: irw,ja(:) + real(psb_dpk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + end subroutine psb_dspins_csr_iirp subroutine psb_dspins_v(nz,ia,ja,val,a,desc_a,info,rebuild,local) use psb_i_vect_mod, only : psb_i_vect_type import diff --git a/base/modules/tools/psb_s_tools_mod.f90 b/base/modules/tools/psb_s_tools_mod.f90 index aaed4bb1..27b3df4d 100644 --- a/base/modules/tools/psb_s_tools_mod.f90 +++ b/base/modules/tools/psb_s_tools_mod.f90 @@ -260,6 +260,28 @@ Module psb_s_tools_mod logical, intent(in), optional :: rebuild logical, intent(in), optional :: local end subroutine psb_sspins + subroutine psb_sspins_csr_lirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + import + implicit none + type(psb_desc_type), intent(inout) :: desc_a + type(psb_sspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr + integer(psb_lpk_), intent(in) :: irw,irp(:),ja(:) + real(psb_spk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + end subroutine psb_sspins_csr_lirp + subroutine psb_sspins_csr_iirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + import + implicit none + type(psb_desc_type), intent(inout) :: desc_a + type(psb_sspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr,irp(:) + integer(psb_lpk_), intent(in) :: irw,ja(:) + real(psb_spk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + end subroutine psb_sspins_csr_iirp subroutine psb_sspins_v(nz,ia,ja,val,a,desc_a,info,rebuild,local) use psb_i_vect_mod, only : psb_i_vect_type import diff --git a/base/modules/tools/psb_z_tools_mod.f90 b/base/modules/tools/psb_z_tools_mod.f90 index e4648d9f..900fe06a 100644 --- a/base/modules/tools/psb_z_tools_mod.f90 +++ b/base/modules/tools/psb_z_tools_mod.f90 @@ -260,6 +260,28 @@ Module psb_z_tools_mod logical, intent(in), optional :: rebuild logical, intent(in), optional :: local end subroutine psb_zspins + subroutine psb_zspins_csr_lirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + import + implicit none + type(psb_desc_type), intent(inout) :: desc_a + type(psb_zspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr + integer(psb_lpk_), intent(in) :: irw,irp(:),ja(:) + complex(psb_dpk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + end subroutine psb_zspins_csr_lirp + subroutine psb_zspins_csr_iirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + import + implicit none + type(psb_desc_type), intent(inout) :: desc_a + type(psb_zspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr,irp(:) + integer(psb_lpk_), intent(in) :: irw,ja(:) + complex(psb_dpk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + end subroutine psb_zspins_csr_iirp subroutine psb_zspins_v(nz,ia,ja,val,a,desc_a,info,rebuild,local) use psb_i_vect_mod, only : psb_i_vect_type import diff --git a/base/tools/psb_cspins.f90 b/base/tools/psb_cspins.f90 index 2855bc1e..914b088e 100644 --- a/base/tools/psb_cspins.f90 +++ b/base/tools/psb_cspins.f90 @@ -191,6 +191,199 @@ subroutine psb_cspins(nz,ia,ja,val,a,desc_a,info,rebuild,local) end subroutine psb_cspins +subroutine psb_cspins_csr_lirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + use psb_base_mod, psb_protect_name => psb_cspins_csr_lirp + use psi_mod + implicit none + + !....parameters... + type(psb_desc_type), intent(inout) :: desc_a + type(psb_cspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr + integer(psb_lpk_), intent(in) :: irw,irp(:),ja(:) + complex(psb_spk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + !locals..... + + integer(psb_ipk_) :: nrow, err_act, ncol, spstate, nz, i, j + integer(psb_lpk_) :: ir + integer(psb_ipk_) :: ictxt,np,me + logical, parameter :: debug=.false. + integer(psb_ipk_), parameter :: relocsz=200 + logical :: rebuild_, local_ + integer(psb_lpk_), allocatable :: ia(:) + character(len=20) :: name + + info = psb_success_ + name = 'psb_cspins_csr' + call psb_erractionsave(err_act) + + ictxt = desc_a%get_context() + call psb_info(ictxt, me, np) + + if (nr < 0) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(irp) < nr+1) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + nz = irp(nr+1) - 1 + + if (size(ja) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(val) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if ((nr == 0).or.(nz == 0)) return + + if (present(rebuild)) then + rebuild_ = rebuild + else + rebuild_ = .false. + endif + + if (present(local)) then + local_ = local + else + local_ = .false. + endif + + allocate(ia(nz),stat=info) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='allocate',i_err=(/info/)) + goto 9999 + end if + + do i = 1, nr + ir = i-1+irw + do j=irp(i),irp(i+1)-1 + ia(j) = ir + end do + end do + + call psb_spins(nz,ia,ja,val,a,desc_a,info,rebuild,local) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='spins_coo',i_err=(/info/)) + goto 9999 + end if + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(ictxt,err_act) + + return + +end subroutine psb_cspins_csr_lirp + +subroutine psb_cspins_csr_iirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + use psb_base_mod, psb_protect_name => psb_cspins_csr_iirp + use psi_mod + implicit none + + !....parameters... + type(psb_desc_type), intent(inout) :: desc_a + type(psb_cspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr,irp(:) + integer(psb_lpk_), intent(in) :: irw,ja(:) + complex(psb_spk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + !locals..... + + integer(psb_ipk_) :: nrow, err_act, ncol, spstate, nz, i, j + integer(psb_lpk_) :: ir + integer(psb_ipk_) :: ictxt,np,me + logical, parameter :: debug=.false. + integer(psb_ipk_), parameter :: relocsz=200 + logical :: rebuild_, local_ + integer(psb_lpk_), allocatable :: ia(:) + character(len=20) :: name + + info = psb_success_ + name = 'psb_cspins_csr' + call psb_erractionsave(err_act) + + ictxt = desc_a%get_context() + call psb_info(ictxt, me, np) + + if (nr < 0) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(irp) < nr+1) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + nz = irp(nr+1) - 1 + + if (size(ja) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(val) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if ((nr == 0).or.(nz == 0)) return + + if (present(rebuild)) then + rebuild_ = rebuild + else + rebuild_ = .false. + endif + + if (present(local)) then + local_ = local + else + local_ = .false. + endif + + allocate(ia(nz),stat=info) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='allocate',i_err=(/info/)) + goto 9999 + end if + + do i = 1, nr + ir = i-1+irw + do j=irp(i),irp(i+1)-1 + ia(j) = ir + end do + end do + + call psb_spins(nz,ia,ja,val,a,desc_a,info,rebuild,local) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='spins_coo',i_err=(/info/)) + goto 9999 + end if + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(ictxt,err_act) + + return + +end subroutine psb_cspins_csr_iirp subroutine psb_cspins_2desc(nz,ia,ja,val,a,desc_ar,desc_ac,info) use psb_base_mod, psb_protect_name => psb_cspins_2desc diff --git a/base/tools/psb_dspins.f90 b/base/tools/psb_dspins.f90 index 00d6a6af..6069a5cd 100644 --- a/base/tools/psb_dspins.f90 +++ b/base/tools/psb_dspins.f90 @@ -191,6 +191,199 @@ subroutine psb_dspins(nz,ia,ja,val,a,desc_a,info,rebuild,local) end subroutine psb_dspins +subroutine psb_dspins_csr_lirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + use psb_base_mod, psb_protect_name => psb_dspins_csr_lirp + use psi_mod + implicit none + + !....parameters... + type(psb_desc_type), intent(inout) :: desc_a + type(psb_dspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr + integer(psb_lpk_), intent(in) :: irw,irp(:),ja(:) + real(psb_dpk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + !locals..... + + integer(psb_ipk_) :: nrow, err_act, ncol, spstate, nz, i, j + integer(psb_lpk_) :: ir + integer(psb_ipk_) :: ictxt,np,me + logical, parameter :: debug=.false. + integer(psb_ipk_), parameter :: relocsz=200 + logical :: rebuild_, local_ + integer(psb_lpk_), allocatable :: ia(:) + character(len=20) :: name + + info = psb_success_ + name = 'psb_dspins_csr' + call psb_erractionsave(err_act) + + ictxt = desc_a%get_context() + call psb_info(ictxt, me, np) + + if (nr < 0) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(irp) < nr+1) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + nz = irp(nr+1) - 1 + + if (size(ja) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(val) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if ((nr == 0).or.(nz == 0)) return + + if (present(rebuild)) then + rebuild_ = rebuild + else + rebuild_ = .false. + endif + + if (present(local)) then + local_ = local + else + local_ = .false. + endif + + allocate(ia(nz),stat=info) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='allocate',i_err=(/info/)) + goto 9999 + end if + + do i = 1, nr + ir = i-1+irw + do j=irp(i),irp(i+1)-1 + ia(j) = ir + end do + end do + + call psb_spins(nz,ia,ja,val,a,desc_a,info,rebuild,local) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='spins_coo',i_err=(/info/)) + goto 9999 + end if + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(ictxt,err_act) + + return + +end subroutine psb_dspins_csr_lirp + +subroutine psb_dspins_csr_iirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + use psb_base_mod, psb_protect_name => psb_dspins_csr_iirp + use psi_mod + implicit none + + !....parameters... + type(psb_desc_type), intent(inout) :: desc_a + type(psb_dspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr,irp(:) + integer(psb_lpk_), intent(in) :: irw,ja(:) + real(psb_dpk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + !locals..... + + integer(psb_ipk_) :: nrow, err_act, ncol, spstate, nz, i, j + integer(psb_lpk_) :: ir + integer(psb_ipk_) :: ictxt,np,me + logical, parameter :: debug=.false. + integer(psb_ipk_), parameter :: relocsz=200 + logical :: rebuild_, local_ + integer(psb_lpk_), allocatable :: ia(:) + character(len=20) :: name + + info = psb_success_ + name = 'psb_dspins_csr' + call psb_erractionsave(err_act) + + ictxt = desc_a%get_context() + call psb_info(ictxt, me, np) + + if (nr < 0) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(irp) < nr+1) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + nz = irp(nr+1) - 1 + + if (size(ja) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(val) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if ((nr == 0).or.(nz == 0)) return + + if (present(rebuild)) then + rebuild_ = rebuild + else + rebuild_ = .false. + endif + + if (present(local)) then + local_ = local + else + local_ = .false. + endif + + allocate(ia(nz),stat=info) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='allocate',i_err=(/info/)) + goto 9999 + end if + + do i = 1, nr + ir = i-1+irw + do j=irp(i),irp(i+1)-1 + ia(j) = ir + end do + end do + + call psb_spins(nz,ia,ja,val,a,desc_a,info,rebuild,local) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='spins_coo',i_err=(/info/)) + goto 9999 + end if + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(ictxt,err_act) + + return + +end subroutine psb_dspins_csr_iirp subroutine psb_dspins_2desc(nz,ia,ja,val,a,desc_ar,desc_ac,info) use psb_base_mod, psb_protect_name => psb_dspins_2desc diff --git a/base/tools/psb_sspins.f90 b/base/tools/psb_sspins.f90 index eaab4601..653b75ed 100644 --- a/base/tools/psb_sspins.f90 +++ b/base/tools/psb_sspins.f90 @@ -191,6 +191,199 @@ subroutine psb_sspins(nz,ia,ja,val,a,desc_a,info,rebuild,local) end subroutine psb_sspins +subroutine psb_sspins_csr_lirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + use psb_base_mod, psb_protect_name => psb_sspins_csr_lirp + use psi_mod + implicit none + + !....parameters... + type(psb_desc_type), intent(inout) :: desc_a + type(psb_sspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr + integer(psb_lpk_), intent(in) :: irw,irp(:),ja(:) + real(psb_spk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + !locals..... + + integer(psb_ipk_) :: nrow, err_act, ncol, spstate, nz, i, j + integer(psb_lpk_) :: ir + integer(psb_ipk_) :: ictxt,np,me + logical, parameter :: debug=.false. + integer(psb_ipk_), parameter :: relocsz=200 + logical :: rebuild_, local_ + integer(psb_lpk_), allocatable :: ia(:) + character(len=20) :: name + + info = psb_success_ + name = 'psb_sspins_csr' + call psb_erractionsave(err_act) + + ictxt = desc_a%get_context() + call psb_info(ictxt, me, np) + + if (nr < 0) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(irp) < nr+1) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + nz = irp(nr+1) - 1 + + if (size(ja) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(val) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if ((nr == 0).or.(nz == 0)) return + + if (present(rebuild)) then + rebuild_ = rebuild + else + rebuild_ = .false. + endif + + if (present(local)) then + local_ = local + else + local_ = .false. + endif + + allocate(ia(nz),stat=info) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='allocate',i_err=(/info/)) + goto 9999 + end if + + do i = 1, nr + ir = i-1+irw + do j=irp(i),irp(i+1)-1 + ia(j) = ir + end do + end do + + call psb_spins(nz,ia,ja,val,a,desc_a,info,rebuild,local) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='spins_coo',i_err=(/info/)) + goto 9999 + end if + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(ictxt,err_act) + + return + +end subroutine psb_sspins_csr_lirp + +subroutine psb_sspins_csr_iirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + use psb_base_mod, psb_protect_name => psb_sspins_csr_iirp + use psi_mod + implicit none + + !....parameters... + type(psb_desc_type), intent(inout) :: desc_a + type(psb_sspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr,irp(:) + integer(psb_lpk_), intent(in) :: irw,ja(:) + real(psb_spk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + !locals..... + + integer(psb_ipk_) :: nrow, err_act, ncol, spstate, nz, i, j + integer(psb_lpk_) :: ir + integer(psb_ipk_) :: ictxt,np,me + logical, parameter :: debug=.false. + integer(psb_ipk_), parameter :: relocsz=200 + logical :: rebuild_, local_ + integer(psb_lpk_), allocatable :: ia(:) + character(len=20) :: name + + info = psb_success_ + name = 'psb_sspins_csr' + call psb_erractionsave(err_act) + + ictxt = desc_a%get_context() + call psb_info(ictxt, me, np) + + if (nr < 0) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(irp) < nr+1) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + nz = irp(nr+1) - 1 + + if (size(ja) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(val) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if ((nr == 0).or.(nz == 0)) return + + if (present(rebuild)) then + rebuild_ = rebuild + else + rebuild_ = .false. + endif + + if (present(local)) then + local_ = local + else + local_ = .false. + endif + + allocate(ia(nz),stat=info) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='allocate',i_err=(/info/)) + goto 9999 + end if + + do i = 1, nr + ir = i-1+irw + do j=irp(i),irp(i+1)-1 + ia(j) = ir + end do + end do + + call psb_spins(nz,ia,ja,val,a,desc_a,info,rebuild,local) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='spins_coo',i_err=(/info/)) + goto 9999 + end if + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(ictxt,err_act) + + return + +end subroutine psb_sspins_csr_iirp subroutine psb_sspins_2desc(nz,ia,ja,val,a,desc_ar,desc_ac,info) use psb_base_mod, psb_protect_name => psb_sspins_2desc diff --git a/base/tools/psb_zspins.f90 b/base/tools/psb_zspins.f90 index 84fa87a1..09233ecf 100644 --- a/base/tools/psb_zspins.f90 +++ b/base/tools/psb_zspins.f90 @@ -191,6 +191,199 @@ subroutine psb_zspins(nz,ia,ja,val,a,desc_a,info,rebuild,local) end subroutine psb_zspins +subroutine psb_zspins_csr_lirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + use psb_base_mod, psb_protect_name => psb_zspins_csr_lirp + use psi_mod + implicit none + + !....parameters... + type(psb_desc_type), intent(inout) :: desc_a + type(psb_zspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr + integer(psb_lpk_), intent(in) :: irw,irp(:),ja(:) + complex(psb_dpk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + !locals..... + + integer(psb_ipk_) :: nrow, err_act, ncol, spstate, nz, i, j + integer(psb_lpk_) :: ir + integer(psb_ipk_) :: ictxt,np,me + logical, parameter :: debug=.false. + integer(psb_ipk_), parameter :: relocsz=200 + logical :: rebuild_, local_ + integer(psb_lpk_), allocatable :: ia(:) + character(len=20) :: name + + info = psb_success_ + name = 'psb_zspins_csr' + call psb_erractionsave(err_act) + + ictxt = desc_a%get_context() + call psb_info(ictxt, me, np) + + if (nr < 0) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(irp) < nr+1) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + nz = irp(nr+1) - 1 + + if (size(ja) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(val) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if ((nr == 0).or.(nz == 0)) return + + if (present(rebuild)) then + rebuild_ = rebuild + else + rebuild_ = .false. + endif + + if (present(local)) then + local_ = local + else + local_ = .false. + endif + + allocate(ia(nz),stat=info) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='allocate',i_err=(/info/)) + goto 9999 + end if + + do i = 1, nr + ir = i-1+irw + do j=irp(i),irp(i+1)-1 + ia(j) = ir + end do + end do + + call psb_spins(nz,ia,ja,val,a,desc_a,info,rebuild,local) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='spins_coo',i_err=(/info/)) + goto 9999 + end if + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(ictxt,err_act) + + return + +end subroutine psb_zspins_csr_lirp + +subroutine psb_zspins_csr_iirp(nr,irw,irp,ja,val,a,desc_a,info,rebuild,local) + use psb_base_mod, psb_protect_name => psb_zspins_csr_iirp + use psi_mod + implicit none + + !....parameters... + type(psb_desc_type), intent(inout) :: desc_a + type(psb_zspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: nr,irp(:) + integer(psb_lpk_), intent(in) :: irw,ja(:) + complex(psb_dpk_), intent(in) :: val(:) + integer(psb_ipk_), intent(out) :: info + logical, intent(in), optional :: rebuild, local + !locals..... + + integer(psb_ipk_) :: nrow, err_act, ncol, spstate, nz, i, j + integer(psb_lpk_) :: ir + integer(psb_ipk_) :: ictxt,np,me + logical, parameter :: debug=.false. + integer(psb_ipk_), parameter :: relocsz=200 + logical :: rebuild_, local_ + integer(psb_lpk_), allocatable :: ia(:) + character(len=20) :: name + + info = psb_success_ + name = 'psb_zspins_csr' + call psb_erractionsave(err_act) + + ictxt = desc_a%get_context() + call psb_info(ictxt, me, np) + + if (nr < 0) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(irp) < nr+1) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + nz = irp(nr+1) - 1 + + if (size(ja) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if (size(val) < nz) then + info = 1111 + call psb_errpush(info,name) + goto 9999 + end if + if ((nr == 0).or.(nz == 0)) return + + if (present(rebuild)) then + rebuild_ = rebuild + else + rebuild_ = .false. + endif + + if (present(local)) then + local_ = local + else + local_ = .false. + endif + + allocate(ia(nz),stat=info) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='allocate',i_err=(/info/)) + goto 9999 + end if + + do i = 1, nr + ir = i-1+irw + do j=irp(i),irp(i+1)-1 + ia(j) = ir + end do + end do + + call psb_spins(nz,ia,ja,val,a,desc_a,info,rebuild,local) + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_ai_,name,& + & a_err='spins_coo',i_err=(/info/)) + goto 9999 + end if + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(ictxt,err_act) + + return + +end subroutine psb_zspins_csr_iirp subroutine psb_zspins_2desc(nz,ia,ja,val,a,desc_ar,desc_ac,info) use psb_base_mod, psb_protect_name => psb_zspins_2desc diff --git a/docs/html/footnode.html b/docs/html/footnode.html index 57ffc743..9b6f0db5 100644 --- a/docs/html/footnode.html +++ b/docs/html/footnode.html @@ -137,7 +137,7 @@ sample scatter/gather routines. . -
. diff --git a/docs/html/img108.png b/docs/html/img108.png deleted file mode 100644 index 660cca8c..00000000 Binary files a/docs/html/img108.png and /dev/null differ diff --git a/docs/html/img109.png b/docs/html/img109.png index 1aaed1e9..660cca8c 100644 Binary files a/docs/html/img109.png and b/docs/html/img109.png differ diff --git a/docs/html/img110.png b/docs/html/img110.png index 583cb484..1aaed1e9 100644 Binary files a/docs/html/img110.png and b/docs/html/img110.png differ diff --git a/docs/html/img111.png b/docs/html/img111.png index ea78705b..583cb484 100644 Binary files a/docs/html/img111.png and b/docs/html/img111.png differ diff --git a/docs/html/img112.png b/docs/html/img112.png deleted file mode 100644 index 74f211e1..00000000 Binary files a/docs/html/img112.png and /dev/null differ diff --git a/docs/html/img113.png b/docs/html/img113.png deleted file mode 100644 index 5e9904d5..00000000 Binary files a/docs/html/img113.png and /dev/null differ diff --git a/docs/html/img114.png b/docs/html/img114.png deleted file mode 100644 index fdfd3db7..00000000 Binary files a/docs/html/img114.png and /dev/null differ diff --git a/docs/html/img115.png b/docs/html/img115.png deleted file mode 100644 index 76e4d307..00000000 Binary files a/docs/html/img115.png and /dev/null differ diff --git a/docs/html/img116.png b/docs/html/img116.png index 4c559110..ea78705b 100644 Binary files a/docs/html/img116.png and b/docs/html/img116.png differ diff --git a/docs/html/img117.png b/docs/html/img117.png index 8e8e8c7b..74f211e1 100644 Binary files a/docs/html/img117.png and b/docs/html/img117.png differ diff --git a/docs/html/img118.png b/docs/html/img118.png index 56826b8b..5e9904d5 100644 Binary files a/docs/html/img118.png and b/docs/html/img118.png differ diff --git a/docs/html/img119.png b/docs/html/img119.png index e205726f..fdfd3db7 100644 Binary files a/docs/html/img119.png and b/docs/html/img119.png differ diff --git a/docs/html/img120.png b/docs/html/img120.png index 0df61bc1..76e4d307 100644 Binary files a/docs/html/img120.png and b/docs/html/img120.png differ diff --git a/docs/html/img121.png b/docs/html/img121.png index dabbe84d..4c559110 100644 Binary files a/docs/html/img121.png and b/docs/html/img121.png differ diff --git a/docs/html/img122.png b/docs/html/img122.png index 8164fce6..8e8e8c7b 100644 Binary files a/docs/html/img122.png and b/docs/html/img122.png differ diff --git a/docs/html/img123.png b/docs/html/img123.png index 8ae7e6e5..56826b8b 100644 Binary files a/docs/html/img123.png and b/docs/html/img123.png differ diff --git a/docs/html/img124.png b/docs/html/img124.png index 03e5d035..e205726f 100644 Binary files a/docs/html/img124.png and b/docs/html/img124.png differ diff --git a/docs/html/img125.png b/docs/html/img125.png index 84c60af3..0df61bc1 100644 Binary files a/docs/html/img125.png and b/docs/html/img125.png differ diff --git a/docs/html/img126.png b/docs/html/img126.png index 8aa2fd47..dabbe84d 100644 Binary files a/docs/html/img126.png and b/docs/html/img126.png differ diff --git a/docs/html/img127.png b/docs/html/img127.png index 8c725ced..8164fce6 100644 Binary files a/docs/html/img127.png and b/docs/html/img127.png differ diff --git a/docs/html/img128.png b/docs/html/img128.png index 31abeeb7..8ae7e6e5 100644 Binary files a/docs/html/img128.png and b/docs/html/img128.png differ diff --git a/docs/html/img129.png b/docs/html/img129.png index 8fbf5a93..03e5d035 100644 Binary files a/docs/html/img129.png and b/docs/html/img129.png differ diff --git a/docs/html/img130.png b/docs/html/img130.png index ae2386e3..84c60af3 100644 Binary files a/docs/html/img130.png and b/docs/html/img130.png differ diff --git a/docs/html/img131.png b/docs/html/img131.png index af2771c5..8aa2fd47 100644 Binary files a/docs/html/img131.png and b/docs/html/img131.png differ diff --git a/docs/html/img132.png b/docs/html/img132.png index c6cc0692..8c725ced 100644 Binary files a/docs/html/img132.png and b/docs/html/img132.png differ diff --git a/docs/html/img133.png b/docs/html/img133.png index 28bf892d..31abeeb7 100644 Binary files a/docs/html/img133.png and b/docs/html/img133.png differ diff --git a/docs/html/img134.png b/docs/html/img134.png index 69fa8cc7..8fbf5a93 100644 Binary files a/docs/html/img134.png and b/docs/html/img134.png differ diff --git a/docs/html/img135.png b/docs/html/img135.png index 0d2507d5..ae2386e3 100644 Binary files a/docs/html/img135.png and b/docs/html/img135.png differ diff --git a/docs/html/img136.png b/docs/html/img136.png index f659c90c..af2771c5 100644 Binary files a/docs/html/img136.png and b/docs/html/img136.png differ diff --git a/docs/html/img137.png b/docs/html/img137.png index eb9a94fb..c6cc0692 100644 Binary files a/docs/html/img137.png and b/docs/html/img137.png differ diff --git a/docs/html/img138.png b/docs/html/img138.png index 3df4bd77..28bf892d 100644 Binary files a/docs/html/img138.png and b/docs/html/img138.png differ diff --git a/docs/html/img139.png b/docs/html/img139.png index 6eaa0e93..69fa8cc7 100644 Binary files a/docs/html/img139.png and b/docs/html/img139.png differ diff --git a/docs/html/img140.png b/docs/html/img140.png index d3d1573f..0d2507d5 100644 Binary files a/docs/html/img140.png and b/docs/html/img140.png differ diff --git a/docs/html/img141.png b/docs/html/img141.png index 7ecedb71..f659c90c 100644 Binary files a/docs/html/img141.png and b/docs/html/img141.png differ diff --git a/docs/html/img142.png b/docs/html/img142.png index abb3da9f..eb9a94fb 100644 Binary files a/docs/html/img142.png and b/docs/html/img142.png differ diff --git a/docs/html/img143.png b/docs/html/img143.png index 151cb99d..3df4bd77 100644 Binary files a/docs/html/img143.png and b/docs/html/img143.png differ diff --git a/docs/html/img144.png b/docs/html/img144.png index 18cdc957..6eaa0e93 100644 Binary files a/docs/html/img144.png and b/docs/html/img144.png differ diff --git a/docs/html/img145.png b/docs/html/img145.png index a83c2523..d3d1573f 100644 Binary files a/docs/html/img145.png and b/docs/html/img145.png differ diff --git a/docs/html/img146.png b/docs/html/img146.png index 1c151bf2..7ecedb71 100644 Binary files a/docs/html/img146.png and b/docs/html/img146.png differ diff --git a/docs/html/img147.png b/docs/html/img147.png index e69de29b..abb3da9f 100644 Binary files a/docs/html/img147.png and b/docs/html/img147.png differ diff --git a/docs/html/img148.png b/docs/html/img148.png index 2c8c4c59..151cb99d 100644 Binary files a/docs/html/img148.png and b/docs/html/img148.png differ diff --git a/docs/html/img149.png b/docs/html/img149.png index e69de29b..18cdc957 100644 Binary files a/docs/html/img149.png and b/docs/html/img149.png differ diff --git a/docs/html/img150.png b/docs/html/img150.png index 1b52ccb2..a83c2523 100644 Binary files a/docs/html/img150.png and b/docs/html/img150.png differ diff --git a/docs/html/img151.png b/docs/html/img151.png index 4ebd6836..1c151bf2 100644 Binary files a/docs/html/img151.png and b/docs/html/img151.png differ diff --git a/docs/html/img152.png b/docs/html/img152.png index f241006d..e69de29b 100644 Binary files a/docs/html/img152.png and b/docs/html/img152.png differ diff --git a/docs/html/img153.png b/docs/html/img153.png index 55f17c1a..2c8c4c59 100644 Binary files a/docs/html/img153.png and b/docs/html/img153.png differ diff --git a/docs/html/img154.png b/docs/html/img154.png index 4aecd5d2..e69de29b 100644 Binary files a/docs/html/img154.png and b/docs/html/img154.png differ diff --git a/docs/html/img155.png b/docs/html/img155.png index bf808fd4..1b52ccb2 100644 Binary files a/docs/html/img155.png and b/docs/html/img155.png differ diff --git a/docs/html/img156.png b/docs/html/img156.png index 3b42a110..4ebd6836 100644 Binary files a/docs/html/img156.png and b/docs/html/img156.png differ diff --git a/docs/html/img157.png b/docs/html/img157.png index 28c31822..f241006d 100644 Binary files a/docs/html/img157.png and b/docs/html/img157.png differ diff --git a/docs/html/img158.png b/docs/html/img158.png index 24fb58dc..55f17c1a 100644 Binary files a/docs/html/img158.png and b/docs/html/img158.png differ diff --git a/docs/html/img159.png b/docs/html/img159.png index 73fe83b6..4aecd5d2 100644 Binary files a/docs/html/img159.png and b/docs/html/img159.png differ diff --git a/docs/html/img160.png b/docs/html/img160.png index 4258bbd4..bf808fd4 100644 Binary files a/docs/html/img160.png and b/docs/html/img160.png differ diff --git a/docs/html/img161.png b/docs/html/img161.png index e3a508d5..3b42a110 100644 Binary files a/docs/html/img161.png and b/docs/html/img161.png differ diff --git a/docs/html/img162.png b/docs/html/img162.png index 0c441a44..28c31822 100644 Binary files a/docs/html/img162.png and b/docs/html/img162.png differ diff --git a/docs/html/img163.png b/docs/html/img163.png index 2d35de54..24fb58dc 100644 Binary files a/docs/html/img163.png and b/docs/html/img163.png differ diff --git a/docs/html/img164.png b/docs/html/img164.png index 86ab1590..73fe83b6 100644 Binary files a/docs/html/img164.png and b/docs/html/img164.png differ diff --git a/docs/html/img165.png b/docs/html/img165.png index deb37281..4258bbd4 100644 Binary files a/docs/html/img165.png and b/docs/html/img165.png differ diff --git a/docs/html/img166.png b/docs/html/img166.png index cbcd1726..e3a508d5 100644 Binary files a/docs/html/img166.png and b/docs/html/img166.png differ diff --git a/docs/html/img167.png b/docs/html/img167.png index 881b68af..0c441a44 100644 Binary files a/docs/html/img167.png and b/docs/html/img167.png differ diff --git a/docs/html/img168.png b/docs/html/img168.png index e803c834..2d35de54 100644 Binary files a/docs/html/img168.png and b/docs/html/img168.png differ diff --git a/docs/html/img169.png b/docs/html/img169.png index 62a4ace0..86ab1590 100644 Binary files a/docs/html/img169.png and b/docs/html/img169.png differ diff --git a/docs/html/img170.png b/docs/html/img170.png index 7fdc87ea..deb37281 100644 Binary files a/docs/html/img170.png and b/docs/html/img170.png differ diff --git a/docs/html/img171.png b/docs/html/img171.png index 432e9540..cbcd1726 100644 Binary files a/docs/html/img171.png and b/docs/html/img171.png differ diff --git a/docs/html/img172.png b/docs/html/img172.png index c8ef97d9..881b68af 100644 Binary files a/docs/html/img172.png and b/docs/html/img172.png differ diff --git a/docs/html/img173.png b/docs/html/img173.png index d50fc6ea..e803c834 100644 Binary files a/docs/html/img173.png and b/docs/html/img173.png differ diff --git a/docs/html/img174.png b/docs/html/img174.png index 4a8ca50b..62a4ace0 100644 Binary files a/docs/html/img174.png and b/docs/html/img174.png differ diff --git a/docs/html/index.html b/docs/html/index.html index 90ac5de2..e3200a83 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -251,7 +251,7 @@ of a dense vector
psb_init
a number of
processes less than the total available in the parallel execution
environment, the remaining processes will have on return ;
the only call involving icontxt
that any such process may
execute is to psb_exit
.
diff --git a/docs/html/node102.html b/docs/html/node102.html
index 7b43e508..ef55917c 100644
--- a/docs/html/node102.html
+++ b/docs/html/node102.html
@@ -101,7 +101,7 @@ Specified as: a logical variable, default value: true.
psb_info
has returned with ; indeed, it it is the only
routine that may be called with argument icontxt
in this
situation.
diff --git a/docs/html/node104.html b/docs/html/node104.html
index eb954317..2c8cd368 100644
--- a/docs/html/node104.html
+++ b/docs/html/node104.html
@@ -60,7 +60,7 @@ call psb_get_rank(rank, icontxt, id)
This subroutine returns the MPI rank of the PSBLAS process
-
psb_spasb
... by process 0 (i.e. the root process).
-
@@ -272,25 +272,25 @@ Intent: in.
Default: .
Specified as: an integer variable .
-The translation was initiated on 2019-02-05
+The translation was initiated on 2019-05-28