From 319d2831b75f8caf054ace8905f29b5aa866745e Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 18 Sep 2019 16:31:20 +0100 Subject: [PATCH] New methods for LX%set_nrows with IPK/LPK --- ..._base_mat_mod.f90 => psb_base_mat_mod.F90} | 40 +++++++++-- base/modules/serial/psb_c_mat_mod.F90 | 36 ++++++++-- base/modules/serial/psb_d_mat_mod.F90 | 36 ++++++++-- base/modules/serial/psb_s_mat_mod.F90 | 36 ++++++++-- base/modules/serial/psb_z_mat_mod.F90 | 36 ++++++++-- base/serial/impl/psb_c_mat_impl.F90 | 69 +++++++++++++++++-- base/serial/impl/psb_d_mat_impl.F90 | 69 +++++++++++++++++-- base/serial/impl/psb_s_mat_impl.F90 | 69 +++++++++++++++++-- base/serial/impl/psb_z_mat_impl.F90 | 69 +++++++++++++++++-- 9 files changed, 405 insertions(+), 55 deletions(-) rename base/modules/serial/{psb_base_mat_mod.f90 => psb_base_mat_mod.F90} (97%) diff --git a/base/modules/serial/psb_base_mat_mod.f90 b/base/modules/serial/psb_base_mat_mod.F90 similarity index 97% rename from base/modules/serial/psb_base_mat_mod.f90 rename to base/modules/serial/psb_base_mat_mod.F90 index d66bafa2..8ebc7dc2 100644 --- a/base/modules/serial/psb_base_mat_mod.f90 +++ b/base/modules/serial/psb_base_mat_mod.F90 @@ -549,8 +549,17 @@ module psb_base_mat_mod ! Setters ! ! == = ================================= - procedure, pass(a) :: set_nrows => psb_lbase_set_nrows - procedure, pass(a) :: set_ncols => psb_lbase_set_ncols + procedure, pass(a) :: set_lnrows => psb_lbase_set_lnrows + procedure, pass(a) :: set_lncols => psb_lbase_set_lncols +#if defined(IPK4) && defined(LPK8) + procedure, pass(a) :: set_inrows => psb_lbase_set_inrows + procedure, pass(a) :: set_incols => psb_lbase_set_incols + generic, public :: set_nrows => set_lnrows, set_inrows + generic, public :: set_ncols => set_lncols, set_incols +#else + generic, public :: set_nrows => set_lnrows + generic, public :: set_ncols => set_lncols +#endif procedure, pass(a) :: set_dupl => psb_lbase_set_dupl procedure, pass(a) :: set_state => psb_lbase_set_state procedure, pass(a) :: set_null => psb_lbase_set_null @@ -1389,20 +1398,37 @@ contains res = a%n end function psb_lbase_get_ncols - subroutine psb_lbase_set_nrows(m,a) + subroutine psb_lbase_set_lnrows(m,a) implicit none class(psb_lbase_sparse_mat), intent(inout) :: a integer(psb_lpk_), intent(in) :: m a%m = m - end subroutine psb_lbase_set_nrows + end subroutine psb_lbase_set_lnrows - subroutine psb_lbase_set_ncols(n,a) + subroutine psb_lbase_set_lncols(n,a) implicit none class(psb_lbase_sparse_mat), intent(inout) :: a integer(psb_lpk_), intent(in) :: n a%n = n - end subroutine psb_lbase_set_ncols - + end subroutine psb_lbase_set_lncols + +#if defined(IPK4) && defined(LPK8) + subroutine psb_lbase_set_inrows(m,a) + implicit none + class(psb_lbase_sparse_mat), intent(inout) :: a + integer(psb_ipk_), intent(in) :: m + ! This cannot overflow, since ipk_ <= lpk_ + a%m = m + end subroutine psb_lbase_set_inrows + + subroutine psb_lbase_set_incols(n,a) + implicit none + class(psb_lbase_sparse_mat), intent(inout) :: a + integer(psb_ipk_), intent(in) :: n + ! This cannot overflow, since ipk_ <= lpk_ + a%n = n + end subroutine psb_lbase_set_incols +#endif subroutine psb_lbase_set_state(n,a) implicit none diff --git a/base/modules/serial/psb_c_mat_mod.F90 b/base/modules/serial/psb_c_mat_mod.F90 index 44144bfe..2e2c6a91 100644 --- a/base/modules/serial/psb_c_mat_mod.F90 +++ b/base/modules/serial/psb_c_mat_mod.F90 @@ -293,8 +293,18 @@ module psb_c_mat_mod procedure, pass(a) :: sizeof => psb_lc_sizeof ! Setters - procedure, pass(a) :: set_nrows => psb_lc_set_nrows - procedure, pass(a) :: set_ncols => psb_lc_set_ncols + procedure, pass(a) :: set_lnrows => psb_lc_set_lnrows + procedure, pass(a) :: set_lncols => psb_lc_set_lncols +#if defined(IPK4) && defined(LPK8) + procedure, pass(a) :: set_inrows => psb_lc_set_inrows + procedure, pass(a) :: set_incols => psb_lc_set_incols + generic, public :: set_nrows => set_inrows, set_lnrows + generic, public :: set_ncols => set_incols, set_lncols +#else + generic, public :: set_nrows => set_lnrows + generic, public :: set_ncols => set_lncols +#endif + procedure, pass(a) :: set_dupl => psb_lc_set_dupl procedure, pass(a) :: set_null => psb_lc_set_null procedure, pass(a) :: set_bld => psb_lc_set_bld @@ -1163,19 +1173,33 @@ module psb_c_mat_mod interface - subroutine psb_lc_set_nrows(m,a) + subroutine psb_lc_set_lnrows(m,a) import :: psb_ipk_, psb_lpk_, psb_lcspmat_type class(psb_lcspmat_type), intent(inout) :: a integer(psb_lpk_), intent(in) :: m - end subroutine psb_lc_set_nrows + end subroutine psb_lc_set_lnrows +#if defined(IPK4) && defined(LPK8) + subroutine psb_lc_set_inrows(m,a) + import :: psb_ipk_, psb_lpk_, psb_lcspmat_type + class(psb_lcspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: m + end subroutine psb_lc_set_inrows +#endif end interface interface - subroutine psb_lc_set_ncols(n,a) + subroutine psb_lc_set_lncols(n,a) import :: psb_ipk_, psb_lpk_, psb_lcspmat_type class(psb_lcspmat_type), intent(inout) :: a integer(psb_lpk_), intent(in) :: n - end subroutine psb_lc_set_ncols + end subroutine psb_lc_set_lncols +#if defined(IPK4) && defined(LPK8) + subroutine psb_lc_set_incols(n,a) + import :: psb_ipk_, psb_lpk_, psb_lcspmat_type + class(psb_lcspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: n + end subroutine psb_lc_set_incols +#endif end interface interface diff --git a/base/modules/serial/psb_d_mat_mod.F90 b/base/modules/serial/psb_d_mat_mod.F90 index 7e89165f..c889c2a3 100644 --- a/base/modules/serial/psb_d_mat_mod.F90 +++ b/base/modules/serial/psb_d_mat_mod.F90 @@ -293,8 +293,18 @@ module psb_d_mat_mod procedure, pass(a) :: sizeof => psb_ld_sizeof ! Setters - procedure, pass(a) :: set_nrows => psb_ld_set_nrows - procedure, pass(a) :: set_ncols => psb_ld_set_ncols + procedure, pass(a) :: set_lnrows => psb_ld_set_lnrows + procedure, pass(a) :: set_lncols => psb_ld_set_lncols +#if defined(IPK4) && defined(LPK8) + procedure, pass(a) :: set_inrows => psb_ld_set_inrows + procedure, pass(a) :: set_incols => psb_ld_set_incols + generic, public :: set_nrows => set_inrows, set_lnrows + generic, public :: set_ncols => set_incols, set_lncols +#else + generic, public :: set_nrows => set_lnrows + generic, public :: set_ncols => set_lncols +#endif + procedure, pass(a) :: set_dupl => psb_ld_set_dupl procedure, pass(a) :: set_null => psb_ld_set_null procedure, pass(a) :: set_bld => psb_ld_set_bld @@ -1163,19 +1173,33 @@ module psb_d_mat_mod interface - subroutine psb_ld_set_nrows(m,a) + subroutine psb_ld_set_lnrows(m,a) import :: psb_ipk_, psb_lpk_, psb_ldspmat_type class(psb_ldspmat_type), intent(inout) :: a integer(psb_lpk_), intent(in) :: m - end subroutine psb_ld_set_nrows + end subroutine psb_ld_set_lnrows +#if defined(IPK4) && defined(LPK8) + subroutine psb_ld_set_inrows(m,a) + import :: psb_ipk_, psb_lpk_, psb_ldspmat_type + class(psb_ldspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: m + end subroutine psb_ld_set_inrows +#endif end interface interface - subroutine psb_ld_set_ncols(n,a) + subroutine psb_ld_set_lncols(n,a) import :: psb_ipk_, psb_lpk_, psb_ldspmat_type class(psb_ldspmat_type), intent(inout) :: a integer(psb_lpk_), intent(in) :: n - end subroutine psb_ld_set_ncols + end subroutine psb_ld_set_lncols +#if defined(IPK4) && defined(LPK8) + subroutine psb_ld_set_incols(n,a) + import :: psb_ipk_, psb_lpk_, psb_ldspmat_type + class(psb_ldspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: n + end subroutine psb_ld_set_incols +#endif end interface interface diff --git a/base/modules/serial/psb_s_mat_mod.F90 b/base/modules/serial/psb_s_mat_mod.F90 index 248cc586..96e39e9d 100644 --- a/base/modules/serial/psb_s_mat_mod.F90 +++ b/base/modules/serial/psb_s_mat_mod.F90 @@ -293,8 +293,18 @@ module psb_s_mat_mod procedure, pass(a) :: sizeof => psb_ls_sizeof ! Setters - procedure, pass(a) :: set_nrows => psb_ls_set_nrows - procedure, pass(a) :: set_ncols => psb_ls_set_ncols + procedure, pass(a) :: set_lnrows => psb_ls_set_lnrows + procedure, pass(a) :: set_lncols => psb_ls_set_lncols +#if defined(IPK4) && defined(LPK8) + procedure, pass(a) :: set_inrows => psb_ls_set_inrows + procedure, pass(a) :: set_incols => psb_ls_set_incols + generic, public :: set_nrows => set_inrows, set_lnrows + generic, public :: set_ncols => set_incols, set_lncols +#else + generic, public :: set_nrows => set_lnrows + generic, public :: set_ncols => set_lncols +#endif + procedure, pass(a) :: set_dupl => psb_ls_set_dupl procedure, pass(a) :: set_null => psb_ls_set_null procedure, pass(a) :: set_bld => psb_ls_set_bld @@ -1163,19 +1173,33 @@ module psb_s_mat_mod interface - subroutine psb_ls_set_nrows(m,a) + subroutine psb_ls_set_lnrows(m,a) import :: psb_ipk_, psb_lpk_, psb_lsspmat_type class(psb_lsspmat_type), intent(inout) :: a integer(psb_lpk_), intent(in) :: m - end subroutine psb_ls_set_nrows + end subroutine psb_ls_set_lnrows +#if defined(IPK4) && defined(LPK8) + subroutine psb_ls_set_inrows(m,a) + import :: psb_ipk_, psb_lpk_, psb_lsspmat_type + class(psb_lsspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: m + end subroutine psb_ls_set_inrows +#endif end interface interface - subroutine psb_ls_set_ncols(n,a) + subroutine psb_ls_set_lncols(n,a) import :: psb_ipk_, psb_lpk_, psb_lsspmat_type class(psb_lsspmat_type), intent(inout) :: a integer(psb_lpk_), intent(in) :: n - end subroutine psb_ls_set_ncols + end subroutine psb_ls_set_lncols +#if defined(IPK4) && defined(LPK8) + subroutine psb_ls_set_incols(n,a) + import :: psb_ipk_, psb_lpk_, psb_lsspmat_type + class(psb_lsspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: n + end subroutine psb_ls_set_incols +#endif end interface interface diff --git a/base/modules/serial/psb_z_mat_mod.F90 b/base/modules/serial/psb_z_mat_mod.F90 index 6ed2cf57..56d26761 100644 --- a/base/modules/serial/psb_z_mat_mod.F90 +++ b/base/modules/serial/psb_z_mat_mod.F90 @@ -293,8 +293,18 @@ module psb_z_mat_mod procedure, pass(a) :: sizeof => psb_lz_sizeof ! Setters - procedure, pass(a) :: set_nrows => psb_lz_set_nrows - procedure, pass(a) :: set_ncols => psb_lz_set_ncols + procedure, pass(a) :: set_lnrows => psb_lz_set_lnrows + procedure, pass(a) :: set_lncols => psb_lz_set_lncols +#if defined(IPK4) && defined(LPK8) + procedure, pass(a) :: set_inrows => psb_lz_set_inrows + procedure, pass(a) :: set_incols => psb_lz_set_incols + generic, public :: set_nrows => set_inrows, set_lnrows + generic, public :: set_ncols => set_incols, set_lncols +#else + generic, public :: set_nrows => set_lnrows + generic, public :: set_ncols => set_lncols +#endif + procedure, pass(a) :: set_dupl => psb_lz_set_dupl procedure, pass(a) :: set_null => psb_lz_set_null procedure, pass(a) :: set_bld => psb_lz_set_bld @@ -1163,19 +1173,33 @@ module psb_z_mat_mod interface - subroutine psb_lz_set_nrows(m,a) + subroutine psb_lz_set_lnrows(m,a) import :: psb_ipk_, psb_lpk_, psb_lzspmat_type class(psb_lzspmat_type), intent(inout) :: a integer(psb_lpk_), intent(in) :: m - end subroutine psb_lz_set_nrows + end subroutine psb_lz_set_lnrows +#if defined(IPK4) && defined(LPK8) + subroutine psb_lz_set_inrows(m,a) + import :: psb_ipk_, psb_lpk_, psb_lzspmat_type + class(psb_lzspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: m + end subroutine psb_lz_set_inrows +#endif end interface interface - subroutine psb_lz_set_ncols(n,a) + subroutine psb_lz_set_lncols(n,a) import :: psb_ipk_, psb_lpk_, psb_lzspmat_type class(psb_lzspmat_type), intent(inout) :: a integer(psb_lpk_), intent(in) :: n - end subroutine psb_lz_set_ncols + end subroutine psb_lz_set_lncols +#if defined(IPK4) && defined(LPK8) + subroutine psb_lz_set_incols(n,a) + import :: psb_ipk_, psb_lpk_, psb_lzspmat_type + class(psb_lzspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: n + end subroutine psb_lz_set_incols +#endif end interface interface diff --git a/base/serial/impl/psb_c_mat_impl.F90 b/base/serial/impl/psb_c_mat_impl.F90 index 5965f368..c2f1e67c 100644 --- a/base/serial/impl/psb_c_mat_impl.F90 +++ b/base/serial/impl/psb_c_mat_impl.F90 @@ -2603,8 +2603,8 @@ end subroutine psb_c_cp_to_l ! -subroutine psb_lc_set_nrows(m,a) - use psb_c_mat_mod, psb_protect_name => psb_lc_set_nrows +subroutine psb_lc_set_lnrows(m,a) + use psb_c_mat_mod, psb_protect_name => psb_lc_set_lnrows use psb_error_mod implicit none class(psb_lcspmat_type), intent(inout) :: a @@ -2629,11 +2629,40 @@ subroutine psb_lc_set_nrows(m,a) return -end subroutine psb_lc_set_nrows +end subroutine psb_lc_set_lnrows +#if defined(IPK4) && defined(LPK8) +subroutine psb_lc_set_inrows(m,a) + use psb_c_mat_mod, psb_protect_name => psb_lc_set_inrows + use psb_error_mod + implicit none + class(psb_lcspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: m + integer(psb_ipk_) :: err_act, info + character(len=20) :: name='set_nrows' + logical, parameter :: debug=.false. + + call psb_erractionsave(err_act) + if (.not.allocated(a%a)) then + info = psb_err_invalid_mat_state_ + call psb_errpush(info,name) + goto 9999 + endif + + call a%a%set_nrows(m) + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(err_act) + + return + +end subroutine psb_lc_set_inrows +#endif -subroutine psb_lc_set_ncols(n,a) - use psb_c_mat_mod, psb_protect_name => psb_lc_set_ncols +subroutine psb_lc_set_lncols(n,a) + use psb_c_mat_mod, psb_protect_name => psb_lc_set_lncols use psb_error_mod implicit none class(psb_lcspmat_type), intent(inout) :: a @@ -2657,9 +2686,37 @@ subroutine psb_lc_set_ncols(n,a) return -end subroutine psb_lc_set_ncols +end subroutine psb_lc_set_lncols +#if defined(IPK4) && defined(LPK8) +subroutine psb_lc_set_incols(n,a) + use psb_c_mat_mod, psb_protect_name => psb_lc_set_incols + use psb_error_mod + implicit none + class(psb_lcspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: n + integer(psb_ipk_) :: err_act, info + character(len=20) :: name='get_nzeros' + logical, parameter :: debug=.false. + + call psb_erractionsave(err_act) + if (.not.allocated(a%a)) then + info = psb_err_invalid_mat_state_ + call psb_errpush(info,name) + goto 9999 + endif + + call a%a%set_ncols(n) + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(err_act) + + return +end subroutine psb_lc_set_incols +#endif ! ! Valid values for DUPL: diff --git a/base/serial/impl/psb_d_mat_impl.F90 b/base/serial/impl/psb_d_mat_impl.F90 index abb70cd3..0ad1edc6 100644 --- a/base/serial/impl/psb_d_mat_impl.F90 +++ b/base/serial/impl/psb_d_mat_impl.F90 @@ -2603,8 +2603,8 @@ end subroutine psb_d_cp_to_l ! -subroutine psb_ld_set_nrows(m,a) - use psb_d_mat_mod, psb_protect_name => psb_ld_set_nrows +subroutine psb_ld_set_lnrows(m,a) + use psb_d_mat_mod, psb_protect_name => psb_ld_set_lnrows use psb_error_mod implicit none class(psb_ldspmat_type), intent(inout) :: a @@ -2629,11 +2629,40 @@ subroutine psb_ld_set_nrows(m,a) return -end subroutine psb_ld_set_nrows +end subroutine psb_ld_set_lnrows +#if defined(IPK4) && defined(LPK8) +subroutine psb_ld_set_inrows(m,a) + use psb_d_mat_mod, psb_protect_name => psb_ld_set_inrows + use psb_error_mod + implicit none + class(psb_ldspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: m + integer(psb_ipk_) :: err_act, info + character(len=20) :: name='set_nrows' + logical, parameter :: debug=.false. + + call psb_erractionsave(err_act) + if (.not.allocated(a%a)) then + info = psb_err_invalid_mat_state_ + call psb_errpush(info,name) + goto 9999 + endif + + call a%a%set_nrows(m) + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(err_act) + + return + +end subroutine psb_ld_set_inrows +#endif -subroutine psb_ld_set_ncols(n,a) - use psb_d_mat_mod, psb_protect_name => psb_ld_set_ncols +subroutine psb_ld_set_lncols(n,a) + use psb_d_mat_mod, psb_protect_name => psb_ld_set_lncols use psb_error_mod implicit none class(psb_ldspmat_type), intent(inout) :: a @@ -2657,9 +2686,37 @@ subroutine psb_ld_set_ncols(n,a) return -end subroutine psb_ld_set_ncols +end subroutine psb_ld_set_lncols +#if defined(IPK4) && defined(LPK8) +subroutine psb_ld_set_incols(n,a) + use psb_d_mat_mod, psb_protect_name => psb_ld_set_incols + use psb_error_mod + implicit none + class(psb_ldspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: n + integer(psb_ipk_) :: err_act, info + character(len=20) :: name='get_nzeros' + logical, parameter :: debug=.false. + + call psb_erractionsave(err_act) + if (.not.allocated(a%a)) then + info = psb_err_invalid_mat_state_ + call psb_errpush(info,name) + goto 9999 + endif + + call a%a%set_ncols(n) + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(err_act) + + return +end subroutine psb_ld_set_incols +#endif ! ! Valid values for DUPL: diff --git a/base/serial/impl/psb_s_mat_impl.F90 b/base/serial/impl/psb_s_mat_impl.F90 index 53292d01..ee8bc40d 100644 --- a/base/serial/impl/psb_s_mat_impl.F90 +++ b/base/serial/impl/psb_s_mat_impl.F90 @@ -2603,8 +2603,8 @@ end subroutine psb_s_cp_to_l ! -subroutine psb_ls_set_nrows(m,a) - use psb_s_mat_mod, psb_protect_name => psb_ls_set_nrows +subroutine psb_ls_set_lnrows(m,a) + use psb_s_mat_mod, psb_protect_name => psb_ls_set_lnrows use psb_error_mod implicit none class(psb_lsspmat_type), intent(inout) :: a @@ -2629,11 +2629,40 @@ subroutine psb_ls_set_nrows(m,a) return -end subroutine psb_ls_set_nrows +end subroutine psb_ls_set_lnrows +#if defined(IPK4) && defined(LPK8) +subroutine psb_ls_set_inrows(m,a) + use psb_s_mat_mod, psb_protect_name => psb_ls_set_inrows + use psb_error_mod + implicit none + class(psb_lsspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: m + integer(psb_ipk_) :: err_act, info + character(len=20) :: name='set_nrows' + logical, parameter :: debug=.false. + + call psb_erractionsave(err_act) + if (.not.allocated(a%a)) then + info = psb_err_invalid_mat_state_ + call psb_errpush(info,name) + goto 9999 + endif + + call a%a%set_nrows(m) + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(err_act) + + return + +end subroutine psb_ls_set_inrows +#endif -subroutine psb_ls_set_ncols(n,a) - use psb_s_mat_mod, psb_protect_name => psb_ls_set_ncols +subroutine psb_ls_set_lncols(n,a) + use psb_s_mat_mod, psb_protect_name => psb_ls_set_lncols use psb_error_mod implicit none class(psb_lsspmat_type), intent(inout) :: a @@ -2657,9 +2686,37 @@ subroutine psb_ls_set_ncols(n,a) return -end subroutine psb_ls_set_ncols +end subroutine psb_ls_set_lncols +#if defined(IPK4) && defined(LPK8) +subroutine psb_ls_set_incols(n,a) + use psb_s_mat_mod, psb_protect_name => psb_ls_set_incols + use psb_error_mod + implicit none + class(psb_lsspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: n + integer(psb_ipk_) :: err_act, info + character(len=20) :: name='get_nzeros' + logical, parameter :: debug=.false. + + call psb_erractionsave(err_act) + if (.not.allocated(a%a)) then + info = psb_err_invalid_mat_state_ + call psb_errpush(info,name) + goto 9999 + endif + + call a%a%set_ncols(n) + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(err_act) + + return +end subroutine psb_ls_set_incols +#endif ! ! Valid values for DUPL: diff --git a/base/serial/impl/psb_z_mat_impl.F90 b/base/serial/impl/psb_z_mat_impl.F90 index f2af20f5..10e69e3e 100644 --- a/base/serial/impl/psb_z_mat_impl.F90 +++ b/base/serial/impl/psb_z_mat_impl.F90 @@ -2603,8 +2603,8 @@ end subroutine psb_z_cp_to_l ! -subroutine psb_lz_set_nrows(m,a) - use psb_z_mat_mod, psb_protect_name => psb_lz_set_nrows +subroutine psb_lz_set_lnrows(m,a) + use psb_z_mat_mod, psb_protect_name => psb_lz_set_lnrows use psb_error_mod implicit none class(psb_lzspmat_type), intent(inout) :: a @@ -2629,11 +2629,40 @@ subroutine psb_lz_set_nrows(m,a) return -end subroutine psb_lz_set_nrows +end subroutine psb_lz_set_lnrows +#if defined(IPK4) && defined(LPK8) +subroutine psb_lz_set_inrows(m,a) + use psb_z_mat_mod, psb_protect_name => psb_lz_set_inrows + use psb_error_mod + implicit none + class(psb_lzspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: m + integer(psb_ipk_) :: err_act, info + character(len=20) :: name='set_nrows' + logical, parameter :: debug=.false. + + call psb_erractionsave(err_act) + if (.not.allocated(a%a)) then + info = psb_err_invalid_mat_state_ + call psb_errpush(info,name) + goto 9999 + endif + + call a%a%set_nrows(m) + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(err_act) + + return + +end subroutine psb_lz_set_inrows +#endif -subroutine psb_lz_set_ncols(n,a) - use psb_z_mat_mod, psb_protect_name => psb_lz_set_ncols +subroutine psb_lz_set_lncols(n,a) + use psb_z_mat_mod, psb_protect_name => psb_lz_set_lncols use psb_error_mod implicit none class(psb_lzspmat_type), intent(inout) :: a @@ -2657,9 +2686,37 @@ subroutine psb_lz_set_ncols(n,a) return -end subroutine psb_lz_set_ncols +end subroutine psb_lz_set_lncols +#if defined(IPK4) && defined(LPK8) +subroutine psb_lz_set_incols(n,a) + use psb_z_mat_mod, psb_protect_name => psb_lz_set_incols + use psb_error_mod + implicit none + class(psb_lzspmat_type), intent(inout) :: a + integer(psb_ipk_), intent(in) :: n + integer(psb_ipk_) :: err_act, info + character(len=20) :: name='get_nzeros' + logical, parameter :: debug=.false. + + call psb_erractionsave(err_act) + if (.not.allocated(a%a)) then + info = psb_err_invalid_mat_state_ + call psb_errpush(info,name) + goto 9999 + endif + + call a%a%set_ncols(n) + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(err_act) + + return +end subroutine psb_lz_set_incols +#endif ! ! Valid values for DUPL: