From d6e9f36d52cc4214828c47dcb4609597e382b6c3 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 30 May 2018 12:49:17 +0100 Subject: [PATCH] LD interfaces for CSR/CSC now compile. --- base/modules/Makefile | 6 +- base/modules/serial/psb_c_csc_mat_mod.f90 | 70 +- base/modules/serial/psb_c_csr_mat_mod.f90 | 70 +- base/modules/serial/psb_d_csc_mat_mod.f90 | 70 +- base/modules/serial/psb_d_csr_mat_mod.f90 | 70 +- base/modules/serial/psb_l_base_vect_mod.f90 | 1828 ------------------- base/modules/serial/psb_ld_csc_mat_mod.f90 | 122 +- base/modules/serial/psb_ld_csr_mat_mod.f90 | 122 +- base/modules/serial/psb_s_csc_mat_mod.f90 | 70 +- base/modules/serial/psb_s_csr_mat_mod.f90 | 70 +- base/modules/serial/psb_z_csc_mat_mod.f90 | 70 +- base/modules/serial/psb_z_csr_mat_mod.f90 | 70 +- 12 files changed, 406 insertions(+), 2232 deletions(-) delete mode 100644 base/modules/serial/psb_l_base_vect_mod.f90 diff --git a/base/modules/Makefile b/base/modules/Makefile index 72278842..bba6ab1b 100644 --- a/base/modules/Makefile +++ b/base/modules/Makefile @@ -97,7 +97,7 @@ UTIL_MODS = auxil/psb_string_mod.o desc/psb_desc_const_mod.o desc/psb_indx_map_m serial/psb_d_base_mat_mod.o serial/psb_d_csr_mat_mod.o serial/psb_d_csc_mat_mod.o serial/psb_d_mat_mod.o \ serial/psb_c_base_mat_mod.o serial/psb_c_csr_mat_mod.o serial/psb_c_csc_mat_mod.o serial/psb_c_mat_mod.o \ serial/psb_z_base_mat_mod.o serial/psb_z_csr_mat_mod.o serial/psb_z_csc_mat_mod.o serial/psb_z_mat_mod.o \ - serial/psb_ld_base_mat_mod.o serial/psb_lbase_mat_mod.o + serial/psb_ld_base_mat_mod.o serial/psb_lbase_mat_mod.o serial/psb_ld_csc_mat_mod.o serial/psb_ld_csr_mat_mod.o @@ -195,6 +195,7 @@ auxil/psb_ip_reord_mod.o: auxil/psb_m_ip_reord_mod.o auxil/psb_e_ip_reord_mod.o auxil/psb_c_ip_reord_mod.o auxil/psb_z_ip_reord_mod.o serial/psb_ld_base_mat_mod.o: serial/psb_lbase_mat_mod.o +serial/psb_ld_csc_mat_mod.o serial/psb_ld_csr_mat_mod.o: serial/psb_ld_base_mat_mod.o serial/psb_base_mat_mod.o: auxil/psi_serial_mod.o serial/psb_s_base_mat_mod.o serial/psb_d_base_mat_mod.o serial/psb_c_base_mat_mod.o serial/psb_z_base_mat_mod.o: serial/psb_base_mat_mod.o @@ -214,7 +215,8 @@ serial/psb_z_mat_mod.o: serial/psb_z_base_mat_mod.o serial/psb_z_csr_mat_mod.o s serial/psb_s_csc_mat_mod.o serial/psb_s_csr_mat_mod.o: serial/psb_s_base_mat_mod.o serial/psb_d_csc_mat_mod.o serial/psb_d_csr_mat_mod.o: serial/psb_d_base_mat_mod.o serial/psb_c_csc_mat_mod.o serial/psb_c_csr_mat_mod.o: serial/psb_c_base_mat_mod.o -serial/psb_z_csc_mat_mod.o serial/psb_z_csr_mat_mod.o: serial/psb_z_base_mat_mod.o +serial/psb_z_csc_mat_mod.o serial/psb_z_csr_mat_mod.o: serial/psb_z_base_mat_mod.o + serial/psb_mat_mod.o: serial/psb_vect_mod.o serial/psb_s_mat_mod.o serial/psb_d_mat_mod.o serial/psb_c_mat_mod.o serial/psb_z_mat_mod.o serial/psb_serial_mod.o: serial/psb_s_serial_mod.o serial/psb_d_serial_mod.o serial/psb_c_serial_mod.o serial/psb_z_serial_mod.o serial/psb_i_vect_mod.o: serial/psb_i_base_vect_mod.o diff --git a/base/modules/serial/psb_c_csc_mat_mod.f90 b/base/modules/serial/psb_c_csc_mat_mod.f90 index 73d4733e..3dfa55b4 100644 --- a/base/modules/serial/psb_c_csc_mat_mod.f90 +++ b/base/modules/serial/psb_c_csc_mat_mod.f90 @@ -107,7 +107,7 @@ module psb_c_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_c_csc_reallocate_nz(nz,a) - import :: psb_ipk_, psb_c_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: nz class(psb_c_csc_sparse_mat), intent(inout) :: a end subroutine psb_c_csc_reallocate_nz @@ -117,7 +117,7 @@ module psb_c_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_c_csc_reinit(a,clear) - import :: psb_ipk_, psb_c_csc_sparse_mat + import class(psb_c_csc_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_c_csc_reinit @@ -127,7 +127,7 @@ module psb_c_csc_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_c_csc_trim(a) - import :: psb_ipk_, psb_c_csc_sparse_mat + import class(psb_c_csc_sparse_mat), intent(inout) :: a end subroutine psb_c_csc_trim end interface @@ -136,7 +136,7 @@ module psb_c_csc_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_c_csc_mold(a,b,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat, psb_epk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a class(psb_c_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -147,7 +147,7 @@ module psb_c_csc_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_c_csc_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_c_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: m,n class(psb_c_csc_sparse_mat), intent(inout) :: a integer(psb_ipk_), intent(in), optional :: nz @@ -159,7 +159,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_print interface subroutine psb_c_csc_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_c_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_c_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in), optional :: iv(:) @@ -172,7 +172,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_to_coo interface subroutine psb_c_cp_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_csc_sparse_mat + import class(psb_c_csc_sparse_mat), intent(in) :: a class(psb_c_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -183,7 +183,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo interface subroutine psb_c_cp_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_coo_sparse_mat + import class(psb_c_csc_sparse_mat), intent(inout) :: a class(psb_c_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -194,7 +194,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_to_fmt interface subroutine psb_c_cp_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat + import class(psb_c_csc_sparse_mat), intent(in) :: a class(psb_c_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -205,7 +205,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_from_fmt interface subroutine psb_c_cp_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat + import class(psb_c_csc_sparse_mat), intent(inout) :: a class(psb_c_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -216,7 +216,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_to_coo interface subroutine psb_c_mv_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_coo_sparse_mat + import class(psb_c_csc_sparse_mat), intent(inout) :: a class(psb_c_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -227,7 +227,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_from_coo interface subroutine psb_c_mv_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_coo_sparse_mat + import class(psb_c_csc_sparse_mat), intent(inout) :: a class(psb_c_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -238,7 +238,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_to_fmt interface subroutine psb_c_mv_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat + import class(psb_c_csc_sparse_mat), intent(inout) :: a class(psb_c_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -249,7 +249,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_from_fmt interface subroutine psb_c_mv_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat + import class(psb_c_csc_sparse_mat), intent(inout) :: a class(psb_c_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -260,7 +260,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_from interface subroutine psb_c_csc_cp_from(a,b) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(inout) :: a type(psb_c_csc_sparse_mat), intent(in) :: b end subroutine psb_c_csc_cp_from @@ -270,7 +270,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_from interface subroutine psb_c_csc_mv_from(a,b) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(inout) :: a type(psb_c_csc_sparse_mat), intent(inout) :: b end subroutine psb_c_csc_mv_from @@ -281,7 +281,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_csput_a interface subroutine psb_c_csc_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(inout) :: a complex(psb_spk_), intent(in) :: val(:) integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& @@ -296,7 +296,7 @@ module psb_c_csc_mat_mod interface subroutine psb_c_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -314,7 +314,7 @@ module psb_c_csc_mat_mod interface subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -333,7 +333,7 @@ module psb_c_csc_mat_mod interface subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_, psb_c_coo_sparse_mat + import class(psb_c_csc_sparse_mat), intent(in) :: a class(psb_c_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(in) :: imin,imax @@ -349,7 +349,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cssv interface subroutine psb_c_csc_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a complex(psb_spk_), intent(in) :: alpha, beta, x(:) complex(psb_spk_), intent(inout) :: y(:) @@ -361,7 +361,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cssm interface subroutine psb_c_csc_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a complex(psb_spk_), intent(in) :: alpha, beta, x(:,:) complex(psb_spk_), intent(inout) :: y(:,:) @@ -374,7 +374,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_csmv interface subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a complex(psb_spk_), intent(in) :: alpha, beta, x(:) complex(psb_spk_), intent(inout) :: y(:) @@ -387,7 +387,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_csmm interface subroutine psb_c_csc_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a complex(psb_spk_), intent(in) :: alpha, beta, x(:,:) complex(psb_spk_), intent(inout) :: y(:,:) @@ -401,7 +401,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_maxval interface function psb_c_csc_maxval(a) result(res) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a real(psb_spk_) :: res end function psb_c_csc_maxval @@ -411,7 +411,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_csnm1 interface function psb_c_csc_csnm1(a) result(res) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a real(psb_spk_) :: res end function psb_c_csc_csnm1 @@ -421,7 +421,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_rowsum interface subroutine psb_c_csc_rowsum(d,a) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a complex(psb_spk_), intent(out) :: d(:) end subroutine psb_c_csc_rowsum @@ -431,7 +431,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_arwsum interface subroutine psb_c_csc_arwsum(d,a) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_c_csc_arwsum @@ -441,7 +441,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_colsum interface subroutine psb_c_csc_colsum(d,a) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a complex(psb_spk_), intent(out) :: d(:) end subroutine psb_c_csc_colsum @@ -451,7 +451,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_aclsum interface subroutine psb_c_csc_aclsum(d,a) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_c_csc_aclsum @@ -461,7 +461,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_get_diag interface subroutine psb_c_csc_get_diag(a,d,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(in) :: a complex(psb_spk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -472,7 +472,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_scal interface subroutine psb_c_csc_scal(d,a,info,side) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(inout) :: a complex(psb_spk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -484,7 +484,7 @@ module psb_c_csc_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_scals interface subroutine psb_c_csc_scals(d,a,info) - import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ + import class(psb_c_csc_sparse_mat), intent(inout) :: a complex(psb_spk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -602,8 +602,8 @@ contains if (allocated(a%ia)) deallocate(a%ia) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_ipk_) + call a%set_ncols(0_psb_ipk_) return diff --git a/base/modules/serial/psb_c_csr_mat_mod.f90 b/base/modules/serial/psb_c_csr_mat_mod.f90 index ebb30582..da161b38 100644 --- a/base/modules/serial/psb_c_csr_mat_mod.f90 +++ b/base/modules/serial/psb_c_csr_mat_mod.f90 @@ -109,7 +109,7 @@ module psb_c_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_c_csr_reallocate_nz(nz,a) - import :: psb_ipk_, psb_c_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: nz class(psb_c_csr_sparse_mat), intent(inout) :: a end subroutine psb_c_csr_reallocate_nz @@ -119,7 +119,7 @@ module psb_c_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_c_csr_reinit(a,clear) - import :: psb_ipk_, psb_c_csr_sparse_mat + import class(psb_c_csr_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_c_csr_reinit @@ -129,7 +129,7 @@ module psb_c_csr_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_c_csr_trim(a) - import :: psb_ipk_, psb_c_csr_sparse_mat + import class(psb_c_csr_sparse_mat), intent(inout) :: a end subroutine psb_c_csr_trim end interface @@ -139,7 +139,7 @@ module psb_c_csr_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_c_csr_mold(a,b,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat, psb_epk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a class(psb_c_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -150,7 +150,7 @@ module psb_c_csr_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_c_csr_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_c_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: m,n class(psb_c_csr_sparse_mat), intent(inout) :: a integer(psb_ipk_), intent(in), optional :: nz @@ -162,7 +162,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_print interface subroutine psb_c_csr_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_c_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_c_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in), optional :: iv(:) @@ -175,7 +175,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_to_coo interface subroutine psb_c_cp_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_csr_sparse_mat + import class(psb_c_csr_sparse_mat), intent(in) :: a class(psb_c_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -186,7 +186,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo interface subroutine psb_c_cp_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_coo_sparse_mat + import class(psb_c_csr_sparse_mat), intent(inout) :: a class(psb_c_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -197,7 +197,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_to_fmt interface subroutine psb_c_cp_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat + import class(psb_c_csr_sparse_mat), intent(in) :: a class(psb_c_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -208,7 +208,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_from_fmt interface subroutine psb_c_cp_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat + import class(psb_c_csr_sparse_mat), intent(inout) :: a class(psb_c_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -219,7 +219,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_to_coo interface subroutine psb_c_mv_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_coo_sparse_mat + import class(psb_c_csr_sparse_mat), intent(inout) :: a class(psb_c_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -230,7 +230,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_from_coo interface subroutine psb_c_mv_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_coo_sparse_mat + import class(psb_c_csr_sparse_mat), intent(inout) :: a class(psb_c_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -241,7 +241,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_to_fmt interface subroutine psb_c_mv_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat + import class(psb_c_csr_sparse_mat), intent(inout) :: a class(psb_c_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -252,7 +252,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_from_fmt interface subroutine psb_c_mv_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat + import class(psb_c_csr_sparse_mat), intent(inout) :: a class(psb_c_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -263,7 +263,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cp_from interface subroutine psb_c_csr_cp_from(a,b) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(inout) :: a type(psb_c_csr_sparse_mat), intent(in) :: b end subroutine psb_c_csr_cp_from @@ -273,7 +273,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_mv_from interface subroutine psb_c_csr_mv_from(a,b) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(inout) :: a type(psb_c_csr_sparse_mat), intent(inout) :: b end subroutine psb_c_csr_mv_from @@ -284,7 +284,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_csput_a interface subroutine psb_c_csr_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(inout) :: a complex(psb_spk_), intent(in) :: val(:) integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& @@ -299,7 +299,7 @@ module psb_c_csr_mat_mod interface subroutine psb_c_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -317,7 +317,7 @@ module psb_c_csr_mat_mod interface subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -336,7 +336,7 @@ module psb_c_csr_mat_mod interface subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_, psb_c_coo_sparse_mat + import class(psb_c_csr_sparse_mat), intent(in) :: a class(psb_c_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(in) :: imin,imax @@ -352,7 +352,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cssv interface subroutine psb_c_csr_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a complex(psb_spk_), intent(in) :: alpha, beta, x(:) complex(psb_spk_), intent(inout) :: y(:) @@ -364,7 +364,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_cssm interface subroutine psb_c_csr_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a complex(psb_spk_), intent(in) :: alpha, beta, x(:,:) complex(psb_spk_), intent(inout) :: y(:,:) @@ -377,7 +377,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_csmv interface subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a complex(psb_spk_), intent(in) :: alpha, beta, x(:) complex(psb_spk_), intent(inout) :: y(:) @@ -390,7 +390,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_csmm interface subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a complex(psb_spk_), intent(in) :: alpha, beta, x(:,:) complex(psb_spk_), intent(inout) :: y(:,:) @@ -404,7 +404,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_maxval interface function psb_c_csr_maxval(a) result(res) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a real(psb_spk_) :: res end function psb_c_csr_maxval @@ -414,7 +414,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_csnmi interface function psb_c_csr_csnmi(a) result(res) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a real(psb_spk_) :: res end function psb_c_csr_csnmi @@ -424,7 +424,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_rowsum interface subroutine psb_c_csr_rowsum(d,a) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a complex(psb_spk_), intent(out) :: d(:) end subroutine psb_c_csr_rowsum @@ -434,7 +434,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_arwsum interface subroutine psb_c_csr_arwsum(d,a) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_c_csr_arwsum @@ -444,7 +444,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_colsum interface subroutine psb_c_csr_colsum(d,a) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a complex(psb_spk_), intent(out) :: d(:) end subroutine psb_c_csr_colsum @@ -454,7 +454,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_aclsum interface subroutine psb_c_csr_aclsum(d,a) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_c_csr_aclsum @@ -464,7 +464,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_get_diag interface subroutine psb_c_csr_get_diag(a,d,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(in) :: a complex(psb_spk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -475,7 +475,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_scal interface subroutine psb_c_csr_scal(d,a,info,side) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(inout) :: a complex(psb_spk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -487,7 +487,7 @@ module psb_c_csr_mat_mod !! \see psb_c_base_mat_mod::psb_c_base_scals interface subroutine psb_c_csr_scals(d,a,info) - import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ + import class(psb_c_csr_sparse_mat), intent(inout) :: a complex(psb_spk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -606,8 +606,8 @@ contains if (allocated(a%ja)) deallocate(a%ja) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_ipk_) + call a%set_ncols(0_psb_ipk_) return diff --git a/base/modules/serial/psb_d_csc_mat_mod.f90 b/base/modules/serial/psb_d_csc_mat_mod.f90 index f77ac0d1..52c51012 100644 --- a/base/modules/serial/psb_d_csc_mat_mod.f90 +++ b/base/modules/serial/psb_d_csc_mat_mod.f90 @@ -107,7 +107,7 @@ module psb_d_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_d_csc_reallocate_nz(nz,a) - import :: psb_ipk_, psb_d_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: nz class(psb_d_csc_sparse_mat), intent(inout) :: a end subroutine psb_d_csc_reallocate_nz @@ -117,7 +117,7 @@ module psb_d_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_d_csc_reinit(a,clear) - import :: psb_ipk_, psb_d_csc_sparse_mat + import class(psb_d_csc_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_d_csc_reinit @@ -127,7 +127,7 @@ module psb_d_csc_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_d_csc_trim(a) - import :: psb_ipk_, psb_d_csc_sparse_mat + import class(psb_d_csc_sparse_mat), intent(inout) :: a end subroutine psb_d_csc_trim end interface @@ -136,7 +136,7 @@ module psb_d_csc_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_d_csc_mold(a,b,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat, psb_epk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a class(psb_d_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -147,7 +147,7 @@ module psb_d_csc_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_d_csc_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_d_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: m,n class(psb_d_csc_sparse_mat), intent(inout) :: a integer(psb_ipk_), intent(in), optional :: nz @@ -159,7 +159,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_print interface subroutine psb_d_csc_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_d_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_d_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in), optional :: iv(:) @@ -172,7 +172,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_to_coo interface subroutine psb_d_cp_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_csc_sparse_mat + import class(psb_d_csc_sparse_mat), intent(in) :: a class(psb_d_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -183,7 +183,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo interface subroutine psb_d_cp_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_coo_sparse_mat + import class(psb_d_csc_sparse_mat), intent(inout) :: a class(psb_d_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -194,7 +194,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_to_fmt interface subroutine psb_d_cp_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat + import class(psb_d_csc_sparse_mat), intent(in) :: a class(psb_d_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -205,7 +205,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_from_fmt interface subroutine psb_d_cp_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat + import class(psb_d_csc_sparse_mat), intent(inout) :: a class(psb_d_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -216,7 +216,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_to_coo interface subroutine psb_d_mv_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_coo_sparse_mat + import class(psb_d_csc_sparse_mat), intent(inout) :: a class(psb_d_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -227,7 +227,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_from_coo interface subroutine psb_d_mv_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_coo_sparse_mat + import class(psb_d_csc_sparse_mat), intent(inout) :: a class(psb_d_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -238,7 +238,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_to_fmt interface subroutine psb_d_mv_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat + import class(psb_d_csc_sparse_mat), intent(inout) :: a class(psb_d_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -249,7 +249,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_from_fmt interface subroutine psb_d_mv_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat + import class(psb_d_csc_sparse_mat), intent(inout) :: a class(psb_d_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -260,7 +260,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_from interface subroutine psb_d_csc_cp_from(a,b) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(inout) :: a type(psb_d_csc_sparse_mat), intent(in) :: b end subroutine psb_d_csc_cp_from @@ -270,7 +270,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_from interface subroutine psb_d_csc_mv_from(a,b) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(inout) :: a type(psb_d_csc_sparse_mat), intent(inout) :: b end subroutine psb_d_csc_mv_from @@ -281,7 +281,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_csput_a interface subroutine psb_d_csc_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: val(:) integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& @@ -296,7 +296,7 @@ module psb_d_csc_mat_mod interface subroutine psb_d_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -314,7 +314,7 @@ module psb_d_csc_mat_mod interface subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -333,7 +333,7 @@ module psb_d_csc_mat_mod interface subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat + import class(psb_d_csc_sparse_mat), intent(in) :: a class(psb_d_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(in) :: imin,imax @@ -349,7 +349,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cssv interface subroutine psb_d_csc_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:) real(psb_dpk_), intent(inout) :: y(:) @@ -361,7 +361,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cssm interface subroutine psb_d_csc_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:,:) real(psb_dpk_), intent(inout) :: y(:,:) @@ -374,7 +374,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_csmv interface subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:) real(psb_dpk_), intent(inout) :: y(:) @@ -387,7 +387,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_csmm interface subroutine psb_d_csc_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:,:) real(psb_dpk_), intent(inout) :: y(:,:) @@ -401,7 +401,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_maxval interface function psb_d_csc_maxval(a) result(res) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_d_csc_maxval @@ -411,7 +411,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_csnm1 interface function psb_d_csc_csnm1(a) result(res) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_d_csc_csnm1 @@ -421,7 +421,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_rowsum interface subroutine psb_d_csc_rowsum(d,a) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_d_csc_rowsum @@ -431,7 +431,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_arwsum interface subroutine psb_d_csc_arwsum(d,a) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_d_csc_arwsum @@ -441,7 +441,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_colsum interface subroutine psb_d_csc_colsum(d,a) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_d_csc_colsum @@ -451,7 +451,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_aclsum interface subroutine psb_d_csc_aclsum(d,a) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_d_csc_aclsum @@ -461,7 +461,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_get_diag interface subroutine psb_d_csc_get_diag(a,d,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -472,7 +472,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_scal interface subroutine psb_d_csc_scal(d,a,info,side) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -484,7 +484,7 @@ module psb_d_csc_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_scals interface subroutine psb_d_csc_scals(d,a,info) - import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ + import class(psb_d_csc_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -602,8 +602,8 @@ contains if (allocated(a%ia)) deallocate(a%ia) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_ipk_) + call a%set_ncols(0_psb_ipk_) return diff --git a/base/modules/serial/psb_d_csr_mat_mod.f90 b/base/modules/serial/psb_d_csr_mat_mod.f90 index 2c400471..0e66c80b 100644 --- a/base/modules/serial/psb_d_csr_mat_mod.f90 +++ b/base/modules/serial/psb_d_csr_mat_mod.f90 @@ -109,7 +109,7 @@ module psb_d_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_d_csr_reallocate_nz(nz,a) - import :: psb_ipk_, psb_d_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: nz class(psb_d_csr_sparse_mat), intent(inout) :: a end subroutine psb_d_csr_reallocate_nz @@ -119,7 +119,7 @@ module psb_d_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_d_csr_reinit(a,clear) - import :: psb_ipk_, psb_d_csr_sparse_mat + import class(psb_d_csr_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_d_csr_reinit @@ -129,7 +129,7 @@ module psb_d_csr_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_d_csr_trim(a) - import :: psb_ipk_, psb_d_csr_sparse_mat + import class(psb_d_csr_sparse_mat), intent(inout) :: a end subroutine psb_d_csr_trim end interface @@ -139,7 +139,7 @@ module psb_d_csr_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_d_csr_mold(a,b,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat, psb_epk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a class(psb_d_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -150,7 +150,7 @@ module psb_d_csr_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_d_csr_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_d_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: m,n class(psb_d_csr_sparse_mat), intent(inout) :: a integer(psb_ipk_), intent(in), optional :: nz @@ -162,7 +162,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_print interface subroutine psb_d_csr_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_d_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_d_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in), optional :: iv(:) @@ -175,7 +175,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_to_coo interface subroutine psb_d_cp_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_csr_sparse_mat + import class(psb_d_csr_sparse_mat), intent(in) :: a class(psb_d_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -186,7 +186,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo interface subroutine psb_d_cp_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_coo_sparse_mat + import class(psb_d_csr_sparse_mat), intent(inout) :: a class(psb_d_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -197,7 +197,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_to_fmt interface subroutine psb_d_cp_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat + import class(psb_d_csr_sparse_mat), intent(in) :: a class(psb_d_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -208,7 +208,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_from_fmt interface subroutine psb_d_cp_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat + import class(psb_d_csr_sparse_mat), intent(inout) :: a class(psb_d_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -219,7 +219,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_to_coo interface subroutine psb_d_mv_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_coo_sparse_mat + import class(psb_d_csr_sparse_mat), intent(inout) :: a class(psb_d_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -230,7 +230,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_from_coo interface subroutine psb_d_mv_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_coo_sparse_mat + import class(psb_d_csr_sparse_mat), intent(inout) :: a class(psb_d_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -241,7 +241,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_to_fmt interface subroutine psb_d_mv_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat + import class(psb_d_csr_sparse_mat), intent(inout) :: a class(psb_d_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -252,7 +252,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_from_fmt interface subroutine psb_d_mv_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat + import class(psb_d_csr_sparse_mat), intent(inout) :: a class(psb_d_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -263,7 +263,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cp_from interface subroutine psb_d_csr_cp_from(a,b) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(inout) :: a type(psb_d_csr_sparse_mat), intent(in) :: b end subroutine psb_d_csr_cp_from @@ -273,7 +273,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_mv_from interface subroutine psb_d_csr_mv_from(a,b) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(inout) :: a type(psb_d_csr_sparse_mat), intent(inout) :: b end subroutine psb_d_csr_mv_from @@ -284,7 +284,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_csput_a interface subroutine psb_d_csr_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: val(:) integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& @@ -299,7 +299,7 @@ module psb_d_csr_mat_mod interface subroutine psb_d_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -317,7 +317,7 @@ module psb_d_csr_mat_mod interface subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -336,7 +336,7 @@ module psb_d_csr_mat_mod interface subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat + import class(psb_d_csr_sparse_mat), intent(in) :: a class(psb_d_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(in) :: imin,imax @@ -352,7 +352,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cssv interface subroutine psb_d_csr_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:) real(psb_dpk_), intent(inout) :: y(:) @@ -364,7 +364,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_cssm interface subroutine psb_d_csr_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:,:) real(psb_dpk_), intent(inout) :: y(:,:) @@ -377,7 +377,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_csmv interface subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:) real(psb_dpk_), intent(inout) :: y(:) @@ -390,7 +390,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_csmm interface subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:,:) real(psb_dpk_), intent(inout) :: y(:,:) @@ -404,7 +404,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_maxval interface function psb_d_csr_maxval(a) result(res) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_d_csr_maxval @@ -414,7 +414,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_csnmi interface function psb_d_csr_csnmi(a) result(res) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_d_csr_csnmi @@ -424,7 +424,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_rowsum interface subroutine psb_d_csr_rowsum(d,a) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_d_csr_rowsum @@ -434,7 +434,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_arwsum interface subroutine psb_d_csr_arwsum(d,a) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_d_csr_arwsum @@ -444,7 +444,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_colsum interface subroutine psb_d_csr_colsum(d,a) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_d_csr_colsum @@ -454,7 +454,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_aclsum interface subroutine psb_d_csr_aclsum(d,a) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_d_csr_aclsum @@ -464,7 +464,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_get_diag interface subroutine psb_d_csr_get_diag(a,d,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -475,7 +475,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_scal interface subroutine psb_d_csr_scal(d,a,info,side) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -487,7 +487,7 @@ module psb_d_csr_mat_mod !! \see psb_d_base_mat_mod::psb_d_base_scals interface subroutine psb_d_csr_scals(d,a,info) - import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ + import class(psb_d_csr_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -606,8 +606,8 @@ contains if (allocated(a%ja)) deallocate(a%ja) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_ipk_) + call a%set_ncols(0_psb_ipk_) return diff --git a/base/modules/serial/psb_l_base_vect_mod.f90 b/base/modules/serial/psb_l_base_vect_mod.f90 deleted file mode 100644 index 84450a17..00000000 --- a/base/modules/serial/psb_l_base_vect_mod.f90 +++ /dev/null @@ -1,1828 +0,0 @@ -! -! Parallel Sparse BLAS version 3.5 -! (C) Copyright 2006-2018 -! Salvatore Filippone -! Alfredo Buttari -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! -! -! package: psb_l_base_vect_mod -! -! This module contains the definition of the psb_l_base_vect type which -! is a container for dense vectors. -! This is encapsulated instead of being just a simple array to allow for -! more complicated situations, such as GPU programming, where the memory -! area we are interested in is not easily accessible from the host/Fortran -! side. It is also meant to be encapsulated in an outer type, to allow -! runtime switching as per the STATE design pattern, similar to the -! sparse matrix types. -! -! -module psb_l_base_vect_mod - - use psb_const_mod - use psb_error_mod - use psb_realloc_mod - use psb_i_base_vect_mod - - !> \namespace psb_base_mod \class psb_l_base_vect_type - !! The psb_l_base_vect_type - !! defines a middle level integer(psb_lpk_) encapsulated dense vector. - !! The encapsulation is needed, in place of a simple array, to allow - !! for complicated situations, such as GPU programming, where the memory - !! area we are interested in is not easily accessible from the host/Fortran - !! side. It is also meant to be encapsulated in an outer type, to allow - !! runtime switching as per the STATE design pattern, similar to the - !! sparse matrix types. - !! - type psb_l_base_vect_type - !> Values. - integer(psb_lpk_), allocatable :: v(:) - integer(psb_lpk_), allocatable :: combuf(:) - integer(psb_mpk_), allocatable :: comid(:,:) - contains - ! - ! Constructors/allocators - ! - procedure, pass(x) :: bld_x => l_base_bld_x - procedure, pass(x) :: bld_mn => l_base_bld_mn - procedure, pass(x) :: bld_en => l_base_bld_en - generic, public :: bld => bld_x, bld_mn, bld_en - procedure, pass(x) :: all => l_base_all - procedure, pass(x) :: mold => l_base_mold - ! - ! Insert/set. Assembly and free. - ! Assembly does almost nothing here, but is important - ! in derived classes. - ! - procedure, pass(x) :: ins_a => l_base_ins_a - procedure, pass(x) :: ins_v => l_base_ins_v - generic, public :: ins => ins_a, ins_v - procedure, pass(x) :: zero => l_base_zero - procedure, pass(x) :: asb_m => l_base_asb_m - procedure, pass(x) :: asb_e => l_base_asb_e - generic, public :: asb => asb_m, asb_e - procedure, pass(x) :: free => l_base_free - ! - ! Sync: centerpiece of handling of external storage. - ! Any derived class having extra storage upon sync - ! will guarantee that both fortran/host side and - ! external side contain the same data. The base - ! version is only a placeholder. - ! - procedure, pass(x) :: sync => l_base_sync - procedure, pass(x) :: is_host => l_base_is_host - procedure, pass(x) :: is_dev => l_base_is_dev - procedure, pass(x) :: is_sync => l_base_is_sync - procedure, pass(x) :: set_host => l_base_set_host - procedure, pass(x) :: set_dev => l_base_set_dev - procedure, pass(x) :: set_sync => l_base_set_sync - - ! - ! These are for handling gather/scatter in new - ! comm internals implementation. - ! - procedure, nopass :: use_buffer => l_base_use_buffer - procedure, pass(x) :: new_buffer => l_base_new_buffer - procedure, nopass :: device_wait => l_base_device_wait - procedure, pass(x) :: maybe_free_buffer => l_base_maybe_free_buffer - procedure, pass(x) :: free_buffer => l_base_free_buffer - procedure, pass(x) :: new_comid => l_base_new_comid - procedure, pass(x) :: free_comid => l_base_free_comid - - ! - ! Basic info - procedure, pass(x) :: get_nrows => l_base_get_nrows - procedure, pass(x) :: sizeof => l_base_sizeof - procedure, nopass :: get_fmt => l_base_get_fmt - ! - ! Set/get data from/to an external array; also - ! overload assignment. - ! - procedure, pass(x) :: get_vect => l_base_get_vect - procedure, pass(x) :: set_scal => l_base_set_scal - procedure, pass(x) :: set_vect => l_base_set_vect - generic, public :: set => set_vect, set_scal - ! - ! Gather/scatter. These are needed for MPI interfacing. - ! May have to be reworked. - ! - procedure, pass(x) :: gthab => l_base_gthab - procedure, pass(x) :: gthzv => l_base_gthzv - procedure, pass(x) :: gthzv_x => l_base_gthzv_x - procedure, pass(x) :: gthzbuf => l_base_gthzbuf - generic, public :: gth => gthab, gthzv, gthzv_x, gthzbuf - procedure, pass(y) :: sctb => l_base_sctb - procedure, pass(y) :: sctb_x => l_base_sctb_x - procedure, pass(y) :: sctb_buf => l_base_sctb_buf - generic, public :: sct => sctb, sctb_x, sctb_buf - - - - end type psb_l_base_vect_type - - public :: psb_l_base_vect - private :: constructor, size_const - interface psb_l_base_vect - module procedure constructor, size_const - end interface psb_l_base_vect - -contains - - ! - ! Constructors. - ! - - !> Function constructor: - !! \brief Constructor from an array - !! \param x(:) input array to be copied - !! - function constructor(x) result(this) - integer(psb_lpk_) :: x(:) - type(psb_l_base_vect_type) :: this - integer(psb_ipk_) :: info - - this%v = x - call this%asb(size(x,kind=psb_ipk_),info) - end function constructor - - - !> Function constructor: - !! \brief Constructor from size - !! \param n Size of vector to be built. - !! - function size_const(n) result(this) - integer(psb_ipk_), intent(in) :: n - type(psb_l_base_vect_type) :: this - integer(psb_ipk_) :: info - - call this%asb(n,info) - - end function size_const - - ! - ! Build from a sample - ! - - !> Function bld_x: - !! \memberof psb_l_base_vect_type - !! \brief Build method from an array - !! \param x(:) input array to be copied - !! - subroutine l_base_bld_x(x,this) - use psb_realloc_mod - integer(psb_lpk_), intent(in) :: this(:) - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_) :: info - - call psb_realloc(size(this),x%v,info) - if (info /= 0) then - call psb_errpush(psb_err_alloc_dealloc_,'base_vect_bld') - return - end if - x%v(:) = this(:) - - end subroutine l_base_bld_x - - ! - ! Create with size, but no initialization - ! - - !> Function bld_mn: - !! \memberof psb_l_base_vect_type - !! \brief Build method with size (uninitialized data) - !! \param n size to be allocated. - !! - subroutine l_base_bld_mn(x,n) - use psb_realloc_mod - integer(psb_mpk_), intent(in) :: n - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_) :: info - - call psb_realloc(n,x%v,info) - call x%asb(n,info) - - end subroutine l_base_bld_mn - - !> Function bld_en: - !! \memberof psb_l_base_vect_type - !! \brief Build method with size (uninitialized data) - !! \param n size to be allocated. - !! - subroutine l_base_bld_en(x,n) - use psb_realloc_mod - integer(psb_epk_), intent(in) :: n - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_) :: info - - call psb_realloc(n,x%v,info) - call x%asb(n,info) - - end subroutine l_base_bld_en - - !> Function base_all: - !! \memberof psb_l_base_vect_type - !! \brief Build method with size (uninitialized data) and - !! allocation return code. - !! \param n size to be allocated. - !! \param info return code - !! - subroutine l_base_all(n, x, info) - use psi_serial_mod - use psb_realloc_mod - implicit none - integer(psb_ipk_), intent(in) :: n - class(psb_l_base_vect_type), intent(out) :: x - integer(psb_ipk_), intent(out) :: info - - call psb_realloc(n,x%v,info) - - end subroutine l_base_all - - !> Function base_mold: - !! \memberof psb_l_base_vect_type - !! \brief Mold method: return a variable with the same dynamic type - !! \param y returned variable - !! \param info return code - !! - subroutine l_base_mold(x, y, info) - use psi_serial_mod - use psb_realloc_mod - implicit none - class(psb_l_base_vect_type), intent(in) :: x - class(psb_l_base_vect_type), intent(out), allocatable :: y - integer(psb_ipk_), intent(out) :: info - - allocate(psb_l_base_vect_type :: y, stat=info) - - end subroutine l_base_mold - - ! - ! Insert a bunch of values at specified positions. - ! - !> Function base_ins: - !! \memberof psb_l_base_vect_type - !! \brief Insert coefficients. - !! - !! - !! Given a list of N pairs - !! (IRL(i),VAL(i)) - !! record a new coefficient in X such that - !! X(IRL(1:N)) = VAL(1:N). - !! - !! - the update operation will perform either - !! X(IRL(1:n)) = VAL(1:N) - !! or - !! X(IRL(1:n)) = X(IRL(1:n))+VAL(1:N) - !! according to the value of DUPLICATE. - !! - !! - !! \param n number of pairs in input - !! \param irl(:) the input row indices - !! \param val(:) the input coefficients - !! \param dupl how to treat duplicate entries - !! \param info return code - !! - ! - subroutine l_base_ins_a(n,irl,val,dupl,x,info) - use psi_serial_mod - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n, dupl - integer(psb_ipk_), intent(in) :: irl(:) - integer(psb_lpk_), intent(in) :: val(:) - integer(psb_ipk_), intent(out) :: info - - integer(psb_ipk_) :: i, isz - - info = 0 - if (psb_errstatus_fatal()) return - - if (.not.allocated(x%v)) then - info = psb_err_invalid_vect_state_ - else if (n > min(size(irl),size(val))) then - info = psb_err_invalid_input_ - - else - isz = size(x%v) - select case(dupl) - case(psb_dupl_ovwrt_) - do i = 1, n - !loop over all val's rows - - ! row actual block row - if ((1 <= irl(i)).and.(irl(i) <= isz)) then - ! this row belongs to me - ! copy i-th row of block val in x - x%v(irl(i)) = val(i) - end if - enddo - - case(psb_dupl_add_) - - do i = 1, n - !loop over all val's rows - if ((1 <= irl(i)).and.(irl(i) <= isz)) then - ! this row belongs to me - ! copy i-th row of block val in x - x%v(irl(i)) = x%v(irl(i)) + val(i) - end if - enddo - - case default - info = 321 - ! !$ call psb_errpush(info,name) - ! !$ goto 9999 - end select - end if - call x%set_host() - if (info /= 0) then - call psb_errpush(info,'base_vect_ins') - return - end if - - end subroutine l_base_ins_a - - subroutine l_base_ins_v(n,irl,val,dupl,x,info) - use psi_serial_mod - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n, dupl - class(psb_i_base_vect_type), intent(inout) :: irl - class(psb_l_base_vect_type), intent(inout) :: val - integer(psb_ipk_), intent(out) :: info - - integer(psb_ipk_) :: i, isz - - info = 0 - if (psb_errstatus_fatal()) return - - if (irl%is_dev()) call irl%sync() - if (val%is_dev()) call val%sync() - if (x%is_dev()) call x%sync() - call x%ins(n,irl%v,val%v,dupl,info) - - if (info /= 0) then - call psb_errpush(info,'base_vect_ins') - return - end if - - end subroutine l_base_ins_v - - - ! - !> Function base_zero - !! \memberof psb_l_base_vect_type - !! \brief Zero out contents - !! - ! - subroutine l_base_zero(x) - use psi_serial_mod - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - - if (allocated(x%v)) x%v=lzero - call x%set_host() - end subroutine l_base_zero - - - ! - ! Assembly. - ! For derived classes: after this the vector - ! storage is supposed to be in sync. - ! - !> Function base_asb: - !! \memberof psb_l_base_vect_type - !! \brief Assemble vector: reallocate as necessary. - !! - !! \param n final size - !! \param info return code - !! - ! - - subroutine l_base_asb_m(n, x, info) - use psi_serial_mod - use psb_realloc_mod - implicit none - integer(psb_mpk_), intent(in) :: n - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - info = 0 - if (x%get_nrows() < n) & - & call psb_realloc(n,x%v,info) - if (info /= 0) & - & call psb_errpush(psb_err_alloc_dealloc_,'vect_asb') - call x%sync() - end subroutine l_base_asb_m - - ! - ! Assembly. - ! For derived classes: after this the vector - ! storage is supposed to be in sync. - ! - !> Function base_asb: - !! \memberof psb_l_base_vect_type - !! \brief Assemble vector: reallocate as necessary. - !! - !! \param n final size - !! \param info return code - !! - ! - - subroutine l_base_asb_e(n, x, info) - use psi_serial_mod - use psb_realloc_mod - implicit none - integer(psb_epk_), intent(in) :: n - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - info = 0 - if (x%get_nrows() < n) & - & call psb_realloc(n,x%v,info) - if (info /= 0) & - & call psb_errpush(psb_err_alloc_dealloc_,'vect_asb') - call x%sync() - end subroutine l_base_asb_e - - ! - !> Function base_free: - !! \memberof psb_l_base_vect_type - !! \brief Free vector - !! - !! \param info return code - !! - ! - subroutine l_base_free(x, info) - use psi_serial_mod - use psb_realloc_mod - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - info = 0 - if (allocated(x%v)) deallocate(x%v, stat=info) - if (info == 0) call x%free_buffer(info) - if (info == 0) call x%free_comid(info) - if (info /= 0) call & - & psb_errpush(psb_err_alloc_dealloc_,'vect_free') - - end subroutine l_base_free - - - - ! - !> Function base_free_buffer: - !! \memberof psb_l_base_vect_type - !! \brief Free aux buffer - !! - !! \param info return code - !! - ! - subroutine l_base_free_buffer(x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - if (allocated(x%combuf)) & - & deallocate(x%combuf,stat=info) - end subroutine l_base_free_buffer - - ! - !> Function base_maybe_free_buffer: - !! \memberof psb_l_base_vect_type - !! \brief Conditionally Free aux buffer. - !! In some derived classes, e.g. GPU, - !! does not really frees to avoid runtime - !! costs - !! - !! \param info return code - !! - ! - subroutine l_base_maybe_free_buffer(x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - info = 0 - if (psb_get_maybe_free_buffer())& - & call x%free_buffer(info) - - end subroutine l_base_maybe_free_buffer - - ! - !> Function base_free_comid: - !! \memberof psb_l_base_vect_type - !! \brief Free aux MPI communication id buffer - !! - !! \param info return code - !! - ! - subroutine l_base_free_comid(x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - if (allocated(x%comid)) & - & deallocate(x%comid,stat=info) - end subroutine l_base_free_comid - - - ! - ! The base version of SYNC & friends does nothing, it's just - ! a placeholder. - ! - ! - !> Function base_sync: - !! \memberof psb_l_base_vect_type - !! \brief Sync: base version is a no-op. - !! - ! - subroutine l_base_sync(x) - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - - end subroutine l_base_sync - - ! - !> Function base_set_host: - !! \memberof psb_l_base_vect_type - !! \brief Set_host: base version is a no-op. - !! - ! - subroutine l_base_set_host(x) - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - - end subroutine l_base_set_host - - ! - !> Function base_set_dev: - !! \memberof psb_l_base_vect_type - !! \brief Set_dev: base version is a no-op. - !! - ! - subroutine l_base_set_dev(x) - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - - end subroutine l_base_set_dev - - ! - !> Function base_set_sync: - !! \memberof psb_l_base_vect_type - !! \brief Set_sync: base version is a no-op. - !! - ! - subroutine l_base_set_sync(x) - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - - end subroutine l_base_set_sync - - ! - !> Function base_is_dev: - !! \memberof psb_l_base_vect_type - !! \brief Is vector on external device . - !! - ! - function l_base_is_dev(x) result(res) - implicit none - class(psb_l_base_vect_type), intent(in) :: x - logical :: res - - res = .false. - end function l_base_is_dev - - ! - !> Function base_is_host - !! \memberof psb_l_base_vect_type - !! \brief Is vector on standard memory . - !! - ! - function l_base_is_host(x) result(res) - implicit none - class(psb_l_base_vect_type), intent(in) :: x - logical :: res - - res = .true. - end function l_base_is_host - - ! - !> Function base_is_sync - !! \memberof psb_l_base_vect_type - !! \brief Is vector on sync . - !! - ! - function l_base_is_sync(x) result(res) - implicit none - class(psb_l_base_vect_type), intent(in) :: x - logical :: res - - res = .true. - end function l_base_is_sync - - - ! - ! Size info. - ! - ! - !> Function base_get_nrows - !! \memberof psb_l_base_vect_type - !! \brief Number of entries - !! - ! - function l_base_get_nrows(x) result(res) - implicit none - class(psb_l_base_vect_type), intent(in) :: x - integer(psb_ipk_) :: res - - res = 0 - if (allocated(x%v)) res = size(x%v) - - end function l_base_get_nrows - - ! - !> Function base_get_sizeof - !! \memberof psb_l_base_vect_type - !! \brief Size in bytes - !! - ! - function l_base_sizeof(x) result(res) - implicit none - class(psb_l_base_vect_type), intent(in) :: x - integer(psb_epk_) :: res - - ! Force 8-byte integers. - res = (1_psb_epk_ * psb_sizeof_lp) * x%get_nrows() - - end function l_base_sizeof - - ! - !> Function base_get_fmt - !! \memberof psb_l_base_vect_type - !! \brief Format - !! - ! - function l_base_get_fmt() result(res) - implicit none - character(len=5) :: res - res = 'BASE' - end function l_base_get_fmt - - - ! - ! - ! - !> Function base_get_vect - !! \memberof psb_l_base_vect_type - !! \brief Extract a copy of the contents - !! - ! - function l_base_get_vect(x) result(res) - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_lpk_), allocatable :: res(:) - integer(psb_ipk_) :: info - - if (.not.allocated(x%v)) return - if (.not.x%is_host()) call x%sync() - allocate(res(x%get_nrows()),stat=info) - if (info /= 0) then - call psb_errpush(psb_err_alloc_dealloc_,'base_get_vect') - return - end if - res(:) = x%v(:) - end function l_base_get_vect - - ! - ! Reset all values - ! - ! - !> Function base_set_scal - !! \memberof psb_l_base_vect_type - !! \brief Set all entries - !! \param val The value to set - !! - subroutine l_base_set_scal(x,val,first,last) - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_lpk_), intent(in) :: val - integer(psb_ipk_), optional :: first, last - - integer(psb_ipk_) :: info, first_, last_ - - first_=1 - last_=size(x%v) - if (present(first)) first_ = max(1,first) - if (present(last)) last_ = min(last,last_) - - if (x%is_dev()) call x%sync() - x%v(first_:last_) = val - call x%set_host() - - end subroutine l_base_set_scal - - - ! - !> Function base_set_vect - !! \memberof psb_l_base_vect_type - !! \brief Set all entries - !! \param val(:) The vector to be copied in - !! - subroutine l_base_set_vect(x,val,first,last) - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_lpk_), intent(in) :: val(:) - integer(psb_ipk_), optional :: first, last - - integer(psb_ipk_) :: info, first_, last_, nr - - first_=1 - last_=min(psb_size(x%v),size(val)) - if (present(first)) first_ = max(1,first) - if (present(last)) last_ = min(last,last_) - - if (allocated(x%v)) then - if (x%is_dev()) call x%sync() - x%v(first_:last_) = val(1:last_-first_+1) - else - x%v = val - end if - call x%set_host() - - end subroutine l_base_set_vect - - - - - ! - ! Gather: Y = beta * Y + alpha * X(IDX(:)) - ! - ! - !> Function base_gthab - !! \memberof psb_l_base_vect_type - !! \brief gather into an array - !! Y = beta * Y + alpha * X(IDX(:)) - !! \param n how many entries to consider - !! \param idx(:) indices - !! \param alpha - !! \param beta - subroutine l_base_gthab(n,idx,alpha,x,beta,y) - use psi_serial_mod - integer(psb_ipk_) :: n, idx(:) - integer(psb_lpk_) :: alpha, beta, y(:) - class(psb_l_base_vect_type) :: x - - if (x%is_dev()) call x%sync() - call psi_gth(n,idx,alpha,x%v,beta,y) - - end subroutine l_base_gthab - ! - ! shortcut alpha=1 beta=0 - ! - !> Function base_gthzv - !! \memberof psb_l_base_vect_type - !! \brief gather into an array special alpha=1 beta=0 - !! Y = X(IDX(:)) - !! \param n how many entries to consider - !! \param idx(:) indices - subroutine l_base_gthzv_x(i,n,idx,x,y) - use psi_serial_mod - integer(psb_ipk_) :: i,n - class(psb_i_base_vect_type) :: idx - integer(psb_lpk_) :: y(:) - class(psb_l_base_vect_type) :: x - - if (idx%is_dev()) call idx%sync() - call x%gth(n,idx%v(i:),y) - - end subroutine l_base_gthzv_x - - ! - ! New comm internals impl. - ! - subroutine l_base_gthzbuf(i,n,idx,x) - use psi_serial_mod - integer(psb_ipk_) :: i,n - class(psb_i_base_vect_type) :: idx - class(psb_l_base_vect_type) :: x - - if (.not.allocated(x%combuf)) then - call psb_errpush(psb_err_alloc_dealloc_,'gthzbuf') - return - end if - if (idx%is_dev()) call idx%sync() - if (x%is_dev()) call x%sync() - call x%gth(n,idx%v(i:),x%combuf(i:)) - - end subroutine l_base_gthzbuf - ! - !> Function base_device_wait: - !! \memberof psb_l_base_vect_type - !! \brief device_wait: base version is a no-op. - !! - ! - subroutine l_base_device_wait() - implicit none - - end subroutine l_base_device_wait - - function l_base_use_buffer() result(res) - logical :: res - - res = .true. - end function l_base_use_buffer - - subroutine l_base_new_buffer(n,x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n - integer(psb_ipk_), intent(out) :: info - - call psb_realloc(n,x%combuf,info) - end subroutine l_base_new_buffer - - subroutine l_base_new_comid(n,x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_vect_type), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n - integer(psb_ipk_), intent(out) :: info - - call psb_realloc(n,2_psb_ipk_,x%comid,info) - end subroutine l_base_new_comid - - - ! - ! shortcut alpha=1 beta=0 - ! - !> Function base_gthzv - !! \memberof psb_l_base_vect_type - !! \brief gather into an array special alpha=1 beta=0 - !! Y = X(IDX(:)) - !! \param n how many entries to consider - !! \param idx(:) indices - subroutine l_base_gthzv(n,idx,x,y) - use psi_serial_mod - integer(psb_ipk_) :: n, idx(:) - integer(psb_lpk_) :: y(:) - class(psb_l_base_vect_type) :: x - - if (x%is_dev()) call x%sync() - call psi_gth(n,idx,x%v,y) - - end subroutine l_base_gthzv - - ! - ! Scatter: - ! Y(IDX(:)) = beta*Y(IDX(:)) + X(:) - ! - ! - !> Function base_sctb - !! \memberof psb_l_base_vect_type - !! \brief scatter into a class(base_vect) - !! Y(IDX(:)) = beta * Y(IDX(:)) + X(:) - !! \param n how many entries to consider - !! \param idx(:) indices - !! \param beta - !! \param x(:) - subroutine l_base_sctb(n,idx,x,beta,y) - use psi_serial_mod - integer(psb_ipk_) :: n, idx(:) - integer(psb_lpk_) :: beta, x(:) - class(psb_l_base_vect_type) :: y - - if (y%is_dev()) call y%sync() - call psi_sct(n,idx,x,beta,y%v) - call y%set_host() - - end subroutine l_base_sctb - - subroutine l_base_sctb_x(i,n,idx,x,beta,y) - use psi_serial_mod - integer(psb_ipk_) :: i, n - class(psb_i_base_vect_type) :: idx - integer(psb_lpk_) :: beta, x(:) - class(psb_l_base_vect_type) :: y - - if (idx%is_dev()) call idx%sync() - call y%sct(n,idx%v(i:),x,beta) - call y%set_host() - - end subroutine l_base_sctb_x - - subroutine l_base_sctb_buf(i,n,idx,beta,y) - use psi_serial_mod - integer(psb_ipk_) :: i, n - class(psb_i_base_vect_type) :: idx - integer(psb_lpk_) :: beta - class(psb_l_base_vect_type) :: y - - - if (.not.allocated(y%combuf)) then - call psb_errpush(psb_err_alloc_dealloc_,'sctb_buf') - return - end if - if (y%is_dev()) call y%sync() - if (idx%is_dev()) call idx%sync() - call y%sct(n,idx%v(i:),y%combuf(i:),beta) - call y%set_host() - - end subroutine l_base_sctb_buf - -end module psb_l_base_vect_mod - - - - - -module psb_l_base_multivect_mod - - use psb_const_mod - use psb_error_mod - use psb_realloc_mod - use psb_l_base_vect_mod - - !> \namespace psb_base_mod \class psb_l_base_vect_type - !! The psb_l_base_vect_type - !! defines a middle level integer(psb_ipk_) encapsulated dense vector. - !! The encapsulation is needed, in place of a simple array, to allow - !! for complicated situations, such as GPU programming, where the memory - !! area we are interested in is not easily accessible from the host/Fortran - !! side. It is also meant to be encapsulated in an outer type, to allow - !! runtime switching as per the STATE design pattern, similar to the - !! sparse matrix types. - !! - private - public :: psb_l_base_multivect, psb_l_base_multivect_type - - type psb_l_base_multivect_type - !> Values. - integer(psb_lpk_), allocatable :: v(:,:) - integer(psb_lpk_), allocatable :: combuf(:) - integer(psb_mpk_), allocatable :: comid(:,:) - contains - ! - ! Constructors/allocators - ! - procedure, pass(x) :: bld_x => l_base_mlv_bld_x - procedure, pass(x) :: bld_n => l_base_mlv_bld_n - generic, public :: bld => bld_x, bld_n - procedure, pass(x) :: all => l_base_mlv_all - procedure, pass(x) :: mold => l_base_mlv_mold - ! - ! Insert/set. Assembly and free. - ! Assembly does almost nothing here, but is important - ! in derived classes. - ! - procedure, pass(x) :: ins => l_base_mlv_ins - procedure, pass(x) :: zero => l_base_mlv_zero - procedure, pass(x) :: asb => l_base_mlv_asb - procedure, pass(x) :: free => l_base_mlv_free - ! - ! Sync: centerpiece of handling of external storage. - ! Any derived class having extra storage upon sync - ! will guarantee that both fortran/host side and - ! external side contain the same data. The base - ! version is only a placeholder. - ! - procedure, pass(x) :: sync => l_base_mlv_sync - procedure, pass(x) :: is_host => l_base_mlv_is_host - procedure, pass(x) :: is_dev => l_base_mlv_is_dev - procedure, pass(x) :: is_sync => l_base_mlv_is_sync - procedure, pass(x) :: set_host => l_base_mlv_set_host - procedure, pass(x) :: set_dev => l_base_mlv_set_dev - procedure, pass(x) :: set_sync => l_base_mlv_set_sync - - ! - ! Basic info - procedure, pass(x) :: get_nrows => l_base_mlv_get_nrows - procedure, pass(x) :: get_ncols => l_base_mlv_get_ncols - procedure, pass(x) :: sizeof => l_base_mlv_sizeof - procedure, nopass :: get_fmt => l_base_mlv_get_fmt - ! - ! Set/get data from/to an external array; also - ! overload assignment. - ! - procedure, pass(x) :: get_vect => l_base_mlv_get_vect - procedure, pass(x) :: set_scal => l_base_mlv_set_scal - procedure, pass(x) :: set_vect => l_base_mlv_set_vect - generic, public :: set => set_vect, set_scal - - - ! - ! These are for handling gather/scatter in new - ! comm internals implementation. - ! - procedure, nopass :: use_buffer => l_base_mlv_use_buffer - procedure, pass(x) :: new_buffer => l_base_mlv_new_buffer - procedure, nopass :: device_wait => l_base_mlv_device_wait - procedure, pass(x) :: maybe_free_buffer => l_base_mlv_maybe_free_buffer - procedure, pass(x) :: free_buffer => l_base_mlv_free_buffer - procedure, pass(x) :: new_comid => l_base_mlv_new_comid - procedure, pass(x) :: free_comid => l_base_mlv_free_comid - - ! - ! Gather/scatter. These are needed for MPI interfacing. - ! May have to be reworked. - ! - procedure, pass(x) :: gthab => l_base_mlv_gthab - procedure, pass(x) :: gthzv => l_base_mlv_gthzv - procedure, pass(x) :: gthzm => l_base_mlv_gthzm - procedure, pass(x) :: gthzv_x => l_base_mlv_gthzv_x - procedure, pass(x) :: gthzbuf => l_base_mlv_gthzbuf - generic, public :: gth => gthab, gthzv, gthzm, gthzv_x, gthzbuf - procedure, pass(y) :: sctb => l_base_mlv_sctb - procedure, pass(y) :: sctbr2 => l_base_mlv_sctbr2 - procedure, pass(y) :: sctb_x => l_base_mlv_sctb_x - procedure, pass(y) :: sctb_buf => l_base_mlv_sctb_buf - generic, public :: sct => sctb, sctbr2, sctb_x, sctb_buf - end type psb_l_base_multivect_type - - interface psb_l_base_multivect - module procedure constructor, size_const - end interface psb_l_base_multivect - -contains - - ! - ! Constructors. - ! - - !> Function constructor: - !! \brief Constructor from an array - !! \param x(:) input array to be copied - !! - function constructor(x) result(this) - integer(psb_lpk_) :: x(:,:) - type(psb_l_base_multivect_type) :: this - integer(psb_ipk_) :: info - - this%v = x - call this%asb(size(x,dim=1,kind=psb_ipk_),size(x,dim=2,kind=psb_ipk_),info) - end function constructor - - - !> Function constructor: - !! \brief Constructor from size - !! \param n Size of vector to be built. - !! - function size_const(m,n) result(this) - integer(psb_ipk_), intent(in) :: m,n - type(psb_l_base_multivect_type) :: this - integer(psb_ipk_) :: info - - call this%asb(m,n,info) - - end function size_const - - ! - ! Build from a sample - ! - - !> Function bld_x: - !! \memberof psb_l_base_multivect_type - !! \brief Build method from an array - !! \param x(:) input array to be copied - !! - subroutine l_base_mlv_bld_x(x,this) - use psb_realloc_mod - integer(psb_lpk_), intent(in) :: this(:,:) - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_) :: info - - call psb_realloc(size(this,1),size(this,2),x%v,info) - if (info /= 0) then - call psb_errpush(psb_err_alloc_dealloc_,'base_mlv_vect_bld') - return - end if - x%v(:,:) = this(:,:) - - end subroutine l_base_mlv_bld_x - - ! - ! Create with size, but no initialization - ! - - !> Function bld_n: - !! \memberof psb_l_base_multivect_type - !! \brief Build method with size (uninitialized data) - !! \param n size to be allocated. - !! - subroutine l_base_mlv_bld_n(x,m,n) - use psb_realloc_mod - integer(psb_ipk_), intent(in) :: m,n - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_) :: info - - call psb_realloc(m,n,x%v,info) - call x%asb(m,n,info) - - end subroutine l_base_mlv_bld_n - - !> Function base_mlv_all: - !! \memberof psb_l_base_multivect_type - !! \brief Build method with size (uninitialized data) and - !! allocation return code. - !! \param n size to be allocated. - !! \param info return code - !! - subroutine l_base_mlv_all(m,n, x, info) - use psi_serial_mod - use psb_realloc_mod - implicit none - integer(psb_ipk_), intent(in) :: m,n - class(psb_l_base_multivect_type), intent(out) :: x - integer(psb_ipk_), intent(out) :: info - - call psb_realloc(m,n,x%v,info) - - end subroutine l_base_mlv_all - - !> Function base_mlv_mold: - !! \memberof psb_l_base_multivect_type - !! \brief Mold method: return a variable with the same dynamic type - !! \param y returned variable - !! \param info return code - !! - subroutine l_base_mlv_mold(x, y, info) - use psi_serial_mod - use psb_realloc_mod - implicit none - class(psb_l_base_multivect_type), intent(in) :: x - class(psb_l_base_multivect_type), intent(out), allocatable :: y - integer(psb_ipk_), intent(out) :: info - - allocate(psb_l_base_multivect_type :: y, stat=info) - - end subroutine l_base_mlv_mold - - ! - ! Insert a bunch of values at specified positions. - ! - !> Function base_mlv_ins: - !! \memberof psb_l_base_multivect_type - !! \brief Insert coefficients. - !! - !! - !! Given a list of N pairs - !! (IRL(i),VAL(i)) - !! record a new coefficient in X such that - !! X(IRL(1:N)) = VAL(1:N). - !! - !! - the update operation will perform either - !! X(IRL(1:n)) = VAL(1:N) - !! or - !! X(IRL(1:n)) = X(IRL(1:n))+VAL(1:N) - !! according to the value of DUPLICATE. - !! - !! - !! \param n number of pairs in input - !! \param irl(:) the input row indices - !! \param val(:) the input coefficients - !! \param dupl how to treat duplicate entries - !! \param info return code - !! - ! - subroutine l_base_mlv_ins(n,irl,val,dupl,x,info) - use psi_serial_mod - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n, dupl - integer(psb_ipk_), intent(in) :: irl(:) - integer(psb_lpk_), intent(in) :: val(:,:) - integer(psb_ipk_), intent(out) :: info - - integer(psb_ipk_) :: i, isz - - info = 0 - if (psb_errstatus_fatal()) return - - if (.not.allocated(x%v)) then - info = psb_err_invalid_vect_state_ - else if (n > min(size(irl),size(val))) then - info = psb_err_invalid_input_ - - else - isz = size(x%v,1) - select case(dupl) - case(psb_dupl_ovwrt_) - do i = 1, n - !loop over all val's rows - - ! row actual block row - if ((1 <= irl(i)).and.(irl(i) <= isz)) then - ! this row belongs to me - ! copy i-th row of block val in x - x%v(irl(i),:) = val(i,:) - end if - enddo - - case(psb_dupl_add_) - - do i = 1, n - !loop over all val's rows - if ((1 <= irl(i)).and.(irl(i) <= isz)) then - ! this row belongs to me - ! copy i-th row of block val in x - x%v(irl(i),:) = x%v(irl(i),:) + val(i,:) - end if - enddo - - case default - info = 321 - ! !$ call psb_errpush(info,name) - ! !$ goto 9999 - end select - end if - if (info /= 0) then - call psb_errpush(info,'base_mlv_vect_ins') - return - end if - - end subroutine l_base_mlv_ins - - ! - !> Function base_mlv_zero - !! \memberof psb_l_base_multivect_type - !! \brief Zero out contents - !! - ! - subroutine l_base_mlv_zero(x) - use psi_serial_mod - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - - if (allocated(x%v)) x%v=lzero - - end subroutine l_base_mlv_zero - - - ! - ! Assembly. - ! For derived classes: after this the vector - ! storage is supposed to be in sync. - ! - !> Function base_mlv_asb: - !! \memberof psb_l_base_multivect_type - !! \brief Assemble vector: reallocate as necessary. - !! - !! \param n final size - !! \param info return code - !! - ! - - subroutine l_base_mlv_asb(m,n, x, info) - use psi_serial_mod - use psb_realloc_mod - implicit none - integer(psb_ipk_), intent(in) :: m,n - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - if ((x%get_nrows() < m).or.(x%get_ncols() Function base_mlv_free: - !! \memberof psb_l_base_multivect_type - !! \brief Free vector - !! - !! \param info return code - !! - ! - subroutine l_base_mlv_free(x, info) - use psi_serial_mod - use psb_realloc_mod - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - info = 0 - if (allocated(x%v)) deallocate(x%v, stat=info) - if (info /= 0) call & - & psb_errpush(psb_err_alloc_dealloc_,'vect_free') - - end subroutine l_base_mlv_free - - - - ! - ! The base version of SYNC & friends does nothing, it's just - ! a placeholder. - ! - ! - !> Function base_mlv_sync: - !! \memberof psb_l_base_multivect_type - !! \brief Sync: base version is a no-op. - !! - ! - subroutine l_base_mlv_sync(x) - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - - end subroutine l_base_mlv_sync - - ! - !> Function base_mlv_set_host: - !! \memberof psb_l_base_multivect_type - !! \brief Set_host: base version is a no-op. - !! - ! - subroutine l_base_mlv_set_host(x) - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - - end subroutine l_base_mlv_set_host - - ! - !> Function base_mlv_set_dev: - !! \memberof psb_l_base_multivect_type - !! \brief Set_dev: base version is a no-op. - !! - ! - subroutine l_base_mlv_set_dev(x) - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - - end subroutine l_base_mlv_set_dev - - ! - !> Function base_mlv_set_sync: - !! \memberof psb_l_base_multivect_type - !! \brief Set_sync: base version is a no-op. - !! - ! - subroutine l_base_mlv_set_sync(x) - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - - end subroutine l_base_mlv_set_sync - - ! - !> Function base_mlv_is_dev: - !! \memberof psb_l_base_multivect_type - !! \brief Is vector on external device . - !! - ! - function l_base_mlv_is_dev(x) result(res) - implicit none - class(psb_l_base_multivect_type), intent(in) :: x - logical :: res - - res = .false. - end function l_base_mlv_is_dev - - ! - !> Function base_mlv_is_host - !! \memberof psb_l_base_multivect_type - !! \brief Is vector on standard memory . - !! - ! - function l_base_mlv_is_host(x) result(res) - implicit none - class(psb_l_base_multivect_type), intent(in) :: x - logical :: res - - res = .true. - end function l_base_mlv_is_host - - ! - !> Function base_mlv_is_sync - !! \memberof psb_l_base_multivect_type - !! \brief Is vector on sync . - !! - ! - function l_base_mlv_is_sync(x) result(res) - implicit none - class(psb_l_base_multivect_type), intent(in) :: x - logical :: res - - res = .true. - end function l_base_mlv_is_sync - - - ! - ! Size info. - ! - ! - !> Function base_mlv_get_nrows - !! \memberof psb_l_base_multivect_type - !! \brief Number of entries - !! - ! - function l_base_mlv_get_nrows(x) result(res) - implicit none - class(psb_l_base_multivect_type), intent(in) :: x - integer(psb_ipk_) :: res - - res = 0 - if (allocated(x%v)) res = size(x%v,1) - - end function l_base_mlv_get_nrows - - function l_base_mlv_get_ncols(x) result(res) - implicit none - class(psb_l_base_multivect_type), intent(in) :: x - integer(psb_ipk_) :: res - - res = 0 - if (allocated(x%v)) res = size(x%v,2) - - end function l_base_mlv_get_ncols - - ! - !> Function base_mlv_get_sizeof - !! \memberof psb_l_base_multivect_type - !! \brief Size in bytesa - !! - ! - function l_base_mlv_sizeof(x) result(res) - implicit none - class(psb_l_base_multivect_type), intent(in) :: x - integer(psb_epk_) :: res - - ! Force 8-byte integers. - res = (1_psb_epk_ * psb_sizeof_ip) * x%get_nrows() * x%get_ncols() - - end function l_base_mlv_sizeof - - ! - !> Function base_mlv_get_fmt - !! \memberof psb_l_base_multivect_type - !! \brief Format - !! - ! - function l_base_mlv_get_fmt() result(res) - implicit none - character(len=5) :: res - res = 'BASE' - end function l_base_mlv_get_fmt - - - ! - ! - ! - !> Function base_mlv_get_vect - !! \memberof psb_l_base_multivect_type - !! \brief Extract a copy of the contents - !! - ! - function l_base_mlv_get_vect(x) result(res) - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_lpk_), allocatable :: res(:,:) - integer(psb_ipk_) :: info,m,n - m = x%get_nrows() - n = x%get_ncols() - if (.not.allocated(x%v)) return - call x%sync() - allocate(res(m,n),stat=info) - if (info /= 0) then - call psb_errpush(psb_err_alloc_dealloc_,'base_mlv_get_vect') - return - end if - res(1:m,1:n) = x%v(1:m,1:n) - end function l_base_mlv_get_vect - - ! - ! Reset all values - ! - ! - !> Function base_mlv_set_scal - !! \memberof psb_l_base_multivect_type - !! \brief Set all entries - !! \param val The value to set - !! - subroutine l_base_mlv_set_scal(x,val) - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_lpk_), intent(in) :: val - - integer(psb_ipk_) :: info - x%v = val - - end subroutine l_base_mlv_set_scal - - ! - !> Function base_mlv_set_vect - !! \memberof psb_l_base_multivect_type - !! \brief Set all entries - !! \param val(:) The vector to be copied in - !! - subroutine l_base_mlv_set_vect(x,val) - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_lpk_), intent(in) :: val(:,:) - integer(psb_ipk_) :: nr - integer(psb_ipk_) :: info - - if (allocated(x%v)) then - nr = min(size(x%v,1),size(val,1)) - nc = min(size(x%v,2),size(val,2)) - - x%v(1:nr,1:nc) = val(1:nr,1:nc) - else - x%v = val - end if - - end subroutine l_base_mlv_set_vect - - - function l_base_mlv_use_buffer() result(res) - logical :: res - - res = .true. - end function l_base_mlv_use_buffer - - subroutine l_base_mlv_new_buffer(n,x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n - integer(psb_ipk_), intent(out) :: info - - integer(psb_ipk_) :: nc - nc = x%get_ncols() - call psb_realloc(n*nc,x%combuf,info) - end subroutine l_base_mlv_new_buffer - - subroutine l_base_mlv_new_comid(n,x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n - integer(psb_ipk_), intent(out) :: info - - call psb_realloc(n,2_psb_ipk_,x%comid,info) - end subroutine l_base_mlv_new_comid - - - subroutine l_base_mlv_maybe_free_buffer(x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - - info = 0 - if (psb_get_maybe_free_buffer())& - & call x%free_buffer(info) - - end subroutine l_base_mlv_maybe_free_buffer - - subroutine l_base_mlv_free_buffer(x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - if (allocated(x%combuf)) & - & deallocate(x%combuf,stat=info) - end subroutine l_base_mlv_free_buffer - - subroutine l_base_mlv_free_comid(x,info) - use psb_realloc_mod - implicit none - class(psb_l_base_multivect_type), intent(inout) :: x - integer(psb_ipk_), intent(out) :: info - - if (allocated(x%comid)) & - & deallocate(x%comid,stat=info) - end subroutine l_base_mlv_free_comid - - - ! - ! Gather: Y = beta * Y + alpha * X(IDX(:)) - ! - ! - !> Function base_mlv_gthab - !! \memberof psb_l_base_multivect_type - !! \brief gather into an array - !! Y = beta * Y + alpha * X(IDX(:)) - !! \param n how many entries to consider - !! \param idx(:) indices - !! \param alpha - !! \param beta - subroutine l_base_mlv_gthab(n,idx,alpha,x,beta,y) - use psi_serial_mod - integer(psb_ipk_) :: n, idx(:) - integer(psb_lpk_) :: alpha, beta, y(:) - class(psb_l_base_multivect_type) :: x - integer(psb_ipk_) :: nc - - if (x%is_dev()) call x%sync() - if (.not.allocated(x%v)) then - return - end if - nc = psb_size(x%v,2_psb_ipk_) - call psi_gth(n,nc,idx,alpha,x%v,beta,y) - - end subroutine l_base_mlv_gthab - ! - ! shortcut alpha=1 beta=0 - ! - !> Function base_mlv_gthzv - !! \memberof psb_l_base_multivect_type - !! \brief gather into an array special alpha=1 beta=0 - !! Y = X(IDX(:)) - !! \param n how many entries to consider - !! \param idx(:) indices - subroutine l_base_mlv_gthzv_x(i,n,idx,x,y) - use psi_serial_mod - integer(psb_ipk_) :: i,n - class(psb_i_base_vect_type) :: idx - integer(psb_lpk_) :: y(:) - class(psb_l_base_multivect_type) :: x - - if (x%is_dev()) call x%sync() - call x%gth(n,idx%v(i:),y) - - end subroutine l_base_mlv_gthzv_x - - ! - ! shortcut alpha=1 beta=0 - ! - !> Function base_mlv_gthzv - !! \memberof psb_l_base_multivect_type - !! \brief gather into an array special alpha=1 beta=0 - !! Y = X(IDX(:)) - !! \param n how many entries to consider - !! \param idx(:) indices - subroutine l_base_mlv_gthzv(n,idx,x,y) - use psi_serial_mod - integer(psb_ipk_) :: n, idx(:) - integer(psb_lpk_) :: y(:) - class(psb_l_base_multivect_type) :: x - integer(psb_ipk_) :: nc - - if (x%is_dev()) call x%sync() - if (.not.allocated(x%v)) then - return - end if - nc = psb_size(x%v,2_psb_ipk_) - - call psi_gth(n,nc,idx,x%v,y) - - end subroutine l_base_mlv_gthzv - ! - ! shortcut alpha=1 beta=0 - ! - !> Function base_mlv_gthzv - !! \memberof psb_l_base_multivect_type - !! \brief gather into an array special alpha=1 beta=0 - !! Y = X(IDX(:)) - !! \param n how many entries to consider - !! \param idx(:) indices - subroutine l_base_mlv_gthzm(n,idx,x,y) - use psi_serial_mod - integer(psb_ipk_) :: n, idx(:) - integer(psb_lpk_) :: y(:,:) - class(psb_l_base_multivect_type) :: x - integer(psb_ipk_) :: nc - - if (x%is_dev()) call x%sync() - if (.not.allocated(x%v)) then - return - end if - nc = psb_size(x%v,2_psb_ipk_) - - call psi_gth(n,nc,idx,x%v,y) - - end subroutine l_base_mlv_gthzm - - ! - ! New comm internals impl. - ! - subroutine l_base_mlv_gthzbuf(i,ixb,n,idx,x) - use psi_serial_mod - integer(psb_ipk_) :: i, ixb, n - class(psb_i_base_vect_type) :: idx - class(psb_l_base_multivect_type) :: x - integer(psb_ipk_) :: nc - - if (.not.allocated(x%combuf)) then - call psb_errpush(psb_err_alloc_dealloc_,'gthzbuf') - return - end if - if (idx%is_dev()) call idx%sync() - if (x%is_dev()) call x%sync() - nc = x%get_ncols() - call x%gth(n,idx%v(i:),x%combuf(ixb:)) - - end subroutine l_base_mlv_gthzbuf - - ! - ! Scatter: - ! Y(IDX(:),:) = beta*Y(IDX(:),:) + X(:) - ! - ! - !> Function base_mlv_sctb - !! \memberof psb_l_base_multivect_type - !! \brief scatter into a class(base_mlv_vect) - !! Y(IDX(:)) = beta * Y(IDX(:)) + X(:) - !! \param n how many entries to consider - !! \param idx(:) indices - !! \param beta - !! \param x(:) - subroutine l_base_mlv_sctb(n,idx,x,beta,y) - use psi_serial_mod - integer(psb_ipk_) :: n, idx(:) - integer(psb_lpk_) :: beta, x(:) - class(psb_l_base_multivect_type) :: y - integer(psb_ipk_) :: nc - - if (y%is_dev()) call y%sync() - nc = psb_size(y%v,2_psb_ipk_) - call psi_sct(n,nc,idx,x,beta,y%v) - call y%set_host() - - end subroutine l_base_mlv_sctb - - subroutine l_base_mlv_sctbr2(n,idx,x,beta,y) - use psi_serial_mod - integer(psb_ipk_) :: n, idx(:) - integer(psb_lpk_) :: beta, x(:,:) - class(psb_l_base_multivect_type) :: y - integer(psb_ipk_) :: nc - - if (y%is_dev()) call y%sync() - nc = y%get_ncols() - call psi_sct(n,nc,idx,x,beta,y%v) - call y%set_host() - - end subroutine l_base_mlv_sctbr2 - - subroutine l_base_mlv_sctb_x(i,n,idx,x,beta,y) - use psi_serial_mod - integer(psb_ipk_) :: i, n - class(psb_i_base_vect_type) :: idx - integer( psb_lpk_) :: beta, x(:) - class(psb_l_base_multivect_type) :: y - - call y%sct(n,idx%v(i:),x,beta) - - end subroutine l_base_mlv_sctb_x - - subroutine l_base_mlv_sctb_buf(i,iyb,n,idx,beta,y) - use psi_serial_mod - integer(psb_ipk_) :: i, iyb, n - class(psb_i_base_vect_type) :: idx - integer(psb_lpk_) :: beta - class(psb_l_base_multivect_type) :: y - integer(psb_ipk_) :: nc - - if (.not.allocated(y%combuf)) then - call psb_errpush(psb_err_alloc_dealloc_,'sctb_buf') - return - end if - if (y%is_dev()) call y%sync() - if (idx%is_dev()) call idx%sync() - nc = y%get_ncols() - call y%sct(n,idx%v(i:),y%combuf(iyb:),beta) - call y%set_host() - - end subroutine l_base_mlv_sctb_buf - - ! - !> Function base_device_wait: - !! \memberof psb_l_base_vect_type - !! \brief device_wait: base version is a no-op. - !! - ! - subroutine l_base_mlv_device_wait() - implicit none - - end subroutine l_base_mlv_device_wait - -end module psb_l_base_multivect_mod - diff --git a/base/modules/serial/psb_ld_csc_mat_mod.f90 b/base/modules/serial/psb_ld_csc_mat_mod.f90 index 80bfa0f3..4e1e7250 100644 --- a/base/modules/serial/psb_ld_csc_mat_mod.f90 +++ b/base/modules/serial/psb_ld_csc_mat_mod.f90 @@ -53,9 +53,9 @@ module psb_ld_csc_mat_mod type, extends(psb_ld_base_sparse_mat) :: psb_ld_csc_sparse_mat !> Pointers to beginning of cols in IA and VAL. - integer(psb_ipk_), allocatable :: icp(:) + integer(psb_lpk_), allocatable :: icp(:) !> Row indices. - integer(psb_ipk_), allocatable :: ia(:) + integer(psb_lpk_), allocatable :: ia(:) !> Coefficient values. real(psb_dpk_), allocatable :: val(:) @@ -107,8 +107,8 @@ module psb_ld_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_ld_csc_reallocate_nz(nz,a) - import :: psb_ipk_, psb_ld_csc_sparse_mat - integer(psb_ipk_), intent(in) :: nz + import + integer(psb_lpk_), intent(in) :: nz class(psb_ld_csc_sparse_mat), intent(inout) :: a end subroutine psb_ld_csc_reallocate_nz end interface @@ -117,7 +117,7 @@ module psb_ld_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_ld_csc_reinit(a,clear) - import :: psb_ipk_, psb_ld_csc_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_ld_csc_reinit @@ -127,7 +127,7 @@ module psb_ld_csc_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_ld_csc_trim(a) - import :: psb_ipk_, psb_ld_csc_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(inout) :: a end subroutine psb_ld_csc_trim end interface @@ -136,7 +136,7 @@ module psb_ld_csc_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_ld_csc_mold(a,b,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_ld_base_sparse_mat, psb_epk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a class(psb_ld_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -147,10 +147,10 @@ module psb_ld_csc_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_ld_csc_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_ld_csc_sparse_mat - integer(psb_ipk_), intent(in) :: m,n + import + integer(psb_lpk_), intent(in) :: m,n class(psb_ld_csc_sparse_mat), intent(inout) :: a - integer(psb_ipk_), intent(in), optional :: nz + integer(psb_lpk_), intent(in), optional :: nz end subroutine psb_ld_csc_allocate_mnnz end interface @@ -159,12 +159,12 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_print interface subroutine psb_ld_csc_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_ld_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_ld_csc_sparse_mat), intent(in) :: a - integer(psb_ipk_), intent(in), optional :: iv(:) + integer(psb_lpk_), intent(in), optional :: iv(:) character(len=*), optional :: head - integer(psb_ipk_), intent(in), optional :: ivr(:), ivc(:) + integer(psb_lpk_), intent(in), optional :: ivr(:), ivc(:) end subroutine psb_ld_csc_print end interface @@ -172,7 +172,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_to_coo interface subroutine psb_ld_cp_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_ld_coo_sparse_mat, psb_ld_csc_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(in) :: a class(psb_ld_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -183,7 +183,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_from_coo interface subroutine psb_ld_cp_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_ld_coo_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(inout) :: a class(psb_ld_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -194,7 +194,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_to_fmt interface subroutine psb_ld_cp_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_ld_base_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(in) :: a class(psb_ld_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -205,7 +205,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_from_fmt interface subroutine psb_ld_cp_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_ld_base_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(inout) :: a class(psb_ld_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -216,7 +216,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_to_coo interface subroutine psb_ld_mv_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_ld_coo_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(inout) :: a class(psb_ld_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -227,7 +227,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_from_coo interface subroutine psb_ld_mv_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_ld_coo_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(inout) :: a class(psb_ld_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -238,7 +238,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_to_fmt interface subroutine psb_ld_mv_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_ld_base_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(inout) :: a class(psb_ld_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -249,7 +249,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_from_fmt interface subroutine psb_ld_mv_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_ld_base_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(inout) :: a class(psb_ld_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -260,7 +260,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_from interface subroutine psb_ld_csc_cp_from(a,b) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(inout) :: a type(psb_ld_csc_sparse_mat), intent(in) :: b end subroutine psb_ld_csc_cp_from @@ -270,7 +270,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_from interface subroutine psb_ld_csc_mv_from(a,b) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(inout) :: a type(psb_ld_csc_sparse_mat), intent(inout) :: b end subroutine psb_ld_csc_mv_from @@ -281,13 +281,13 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_csput_a interface subroutine psb_ld_csc_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: val(:) - integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& + integer(psb_lpk_), intent(in) :: nz,ia(:), ja(:),& & imin,imax,jmin,jmax integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: gtl(:) + integer(psb_lpk_), intent(in), optional :: gtl(:) end subroutine psb_ld_csc_csput_a end interface @@ -296,15 +296,15 @@ module psb_ld_csc_mat_mod interface subroutine psb_ld_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a - integer(psb_ipk_), intent(in) :: imin,imax - integer(psb_ipk_), intent(out) :: nz - integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) + integer(psb_lpk_), intent(in) :: imin,imax + integer(psb_lpk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_),intent(out) :: info logical, intent(in), optional :: append - integer(psb_ipk_), intent(in), optional :: iren(:) - integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + integer(psb_lpk_), intent(in), optional :: iren(:) + integer(psb_lpk_), intent(in), optional :: jmin,jmax, nzin logical, intent(in), optional :: rscale,cscale end subroutine psb_ld_csc_csgetptn end interface @@ -314,16 +314,16 @@ module psb_ld_csc_mat_mod interface subroutine psb_ld_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a - integer(psb_ipk_), intent(in) :: imin,imax - integer(psb_ipk_), intent(out) :: nz - integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) + integer(psb_lpk_), intent(in) :: imin,imax + integer(psb_lpk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) real(psb_dpk_), allocatable, intent(inout) :: val(:) integer(psb_ipk_),intent(out) :: info logical, intent(in), optional :: append - integer(psb_ipk_), intent(in), optional :: iren(:) - integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + integer(psb_lpk_), intent(in), optional :: iren(:) + integer(psb_lpk_), intent(in), optional :: jmin,jmax, nzin logical, intent(in), optional :: rscale,cscale end subroutine psb_ld_csc_csgetrow end interface @@ -333,14 +333,14 @@ module psb_ld_csc_mat_mod interface subroutine psb_ld_csc_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_, psb_ld_coo_sparse_mat + import class(psb_ld_csc_sparse_mat), intent(in) :: a class(psb_ld_coo_sparse_mat), intent(inout) :: b - integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_lpk_), intent(in) :: imin,imax integer(psb_ipk_),intent(out) :: info logical, intent(in), optional :: append - integer(psb_ipk_), intent(in), optional :: iren(:) - integer(psb_ipk_), intent(in), optional :: jmin,jmax + integer(psb_lpk_), intent(in), optional :: iren(:) + integer(psb_lpk_), intent(in), optional :: jmin,jmax logical, intent(in), optional :: rscale,cscale end subroutine psb_ld_csc_csgetblk end interface @@ -349,7 +349,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cssv interface subroutine psb_ld_csc_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:) real(psb_dpk_), intent(inout) :: y(:) @@ -361,7 +361,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cssm interface subroutine psb_ld_csc_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:,:) real(psb_dpk_), intent(inout) :: y(:,:) @@ -374,7 +374,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_csmv interface subroutine psb_ld_csc_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:) real(psb_dpk_), intent(inout) :: y(:) @@ -387,7 +387,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_csmm interface subroutine psb_ld_csc_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:,:) real(psb_dpk_), intent(inout) :: y(:,:) @@ -401,7 +401,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_maxval interface function psb_ld_csc_maxval(a) result(res) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_ld_csc_maxval @@ -411,7 +411,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_csnm1 interface function psb_ld_csc_csnm1(a) result(res) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_ld_csc_csnm1 @@ -421,7 +421,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_rowsum interface subroutine psb_ld_csc_rowsum(d,a) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_ld_csc_rowsum @@ -431,7 +431,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_arwsum interface subroutine psb_ld_csc_arwsum(d,a) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_ld_csc_arwsum @@ -441,7 +441,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_colsum interface subroutine psb_ld_csc_colsum(d,a) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_ld_csc_colsum @@ -451,7 +451,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_aclsum interface subroutine psb_ld_csc_aclsum(d,a) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_ld_csc_aclsum @@ -461,7 +461,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_get_diag interface subroutine psb_ld_csc_get_diag(a,d,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -472,7 +472,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_scal interface subroutine psb_ld_csc_scal(d,a,info,side) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -484,7 +484,7 @@ module psb_ld_csc_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_scals interface subroutine psb_ld_csc_scals(d,a,info) - import :: psb_ipk_, psb_ld_csc_sparse_mat, psb_dpk_ + import class(psb_ld_csc_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -536,14 +536,14 @@ contains function ld_csc_get_nzeros(a) result(res) implicit none class(psb_ld_csc_sparse_mat), intent(in) :: a - integer(psb_ipk_) :: res + integer(psb_lpk_) :: res res = a%icp(a%get_ncols()+1)-1 end function ld_csc_get_nzeros function ld_csc_get_size(a) result(res) implicit none class(psb_ld_csc_sparse_mat), intent(in) :: a - integer(psb_ipk_) :: res + integer(psb_lpk_) :: res res = -1 @@ -567,8 +567,8 @@ contains implicit none class(psb_ld_csc_sparse_mat), intent(in) :: a - integer(psb_ipk_), intent(in) :: idx - integer(psb_ipk_) :: res + integer(psb_lpk_), intent(in) :: idx + integer(psb_lpk_) :: res res = 0 @@ -602,8 +602,8 @@ contains if (allocated(a%ia)) deallocate(a%ia) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_lpk_) + call a%set_ncols(0_psb_lpk_) return diff --git a/base/modules/serial/psb_ld_csr_mat_mod.f90 b/base/modules/serial/psb_ld_csr_mat_mod.f90 index 628ac0bd..8d9848bf 100644 --- a/base/modules/serial/psb_ld_csr_mat_mod.f90 +++ b/base/modules/serial/psb_ld_csr_mat_mod.f90 @@ -54,9 +54,9 @@ module psb_ld_csr_mat_mod type, extends(psb_ld_base_sparse_mat) :: psb_ld_csr_sparse_mat !> Pointers to beginning of rows in JA and VAL. - integer(psb_ipk_), allocatable :: irp(:) + integer(psb_lpk_), allocatable :: irp(:) !> Column indices. - integer(psb_ipk_), allocatable :: ja(:) + integer(psb_lpk_), allocatable :: ja(:) !> Coefficient values. real(psb_dpk_), allocatable :: val(:) @@ -109,8 +109,8 @@ module psb_ld_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_ld_csr_reallocate_nz(nz,a) - import :: psb_ipk_, psb_ld_csr_sparse_mat - integer(psb_ipk_), intent(in) :: nz + import + integer(psb_lpk_), intent(in) :: nz class(psb_ld_csr_sparse_mat), intent(inout) :: a end subroutine psb_ld_csr_reallocate_nz end interface @@ -119,7 +119,7 @@ module psb_ld_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_ld_csr_reinit(a,clear) - import :: psb_ipk_, psb_ld_csr_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_ld_csr_reinit @@ -129,7 +129,7 @@ module psb_ld_csr_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_ld_csr_trim(a) - import :: psb_ipk_, psb_ld_csr_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(inout) :: a end subroutine psb_ld_csr_trim end interface @@ -139,7 +139,7 @@ module psb_ld_csr_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_ld_csr_mold(a,b,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_ld_base_sparse_mat, psb_epk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a class(psb_ld_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -150,10 +150,10 @@ module psb_ld_csr_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_ld_csr_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_ld_csr_sparse_mat - integer(psb_ipk_), intent(in) :: m,n + import + integer(psb_lpk_), intent(in) :: m,n class(psb_ld_csr_sparse_mat), intent(inout) :: a - integer(psb_ipk_), intent(in), optional :: nz + integer(psb_lpk_), intent(in), optional :: nz end subroutine psb_ld_csr_allocate_mnnz end interface @@ -162,12 +162,12 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_print interface subroutine psb_ld_csr_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_ld_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_ld_csr_sparse_mat), intent(in) :: a - integer(psb_ipk_), intent(in), optional :: iv(:) + integer(psb_lpk_), intent(in), optional :: iv(:) character(len=*), optional :: head - integer(psb_ipk_), intent(in), optional :: ivr(:), ivc(:) + integer(psb_lpk_), intent(in), optional :: ivr(:), ivc(:) end subroutine psb_ld_csr_print end interface @@ -175,7 +175,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_to_coo interface subroutine psb_ld_cp_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_ld_coo_sparse_mat, psb_ld_csr_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(in) :: a class(psb_ld_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -186,7 +186,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_from_coo interface subroutine psb_ld_cp_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_ld_coo_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(inout) :: a class(psb_ld_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -197,7 +197,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_to_fmt interface subroutine psb_ld_cp_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_ld_base_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(in) :: a class(psb_ld_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -208,7 +208,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_from_fmt interface subroutine psb_ld_cp_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_ld_base_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(inout) :: a class(psb_ld_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -219,7 +219,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_to_coo interface subroutine psb_ld_mv_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_ld_coo_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(inout) :: a class(psb_ld_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -230,7 +230,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_from_coo interface subroutine psb_ld_mv_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_ld_coo_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(inout) :: a class(psb_ld_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -241,7 +241,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_to_fmt interface subroutine psb_ld_mv_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_ld_base_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(inout) :: a class(psb_ld_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -252,7 +252,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_from_fmt interface subroutine psb_ld_mv_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_ld_base_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(inout) :: a class(psb_ld_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -263,7 +263,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cp_from interface subroutine psb_ld_csr_cp_from(a,b) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(inout) :: a type(psb_ld_csr_sparse_mat), intent(in) :: b end subroutine psb_ld_csr_cp_from @@ -273,7 +273,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_mv_from interface subroutine psb_ld_csr_mv_from(a,b) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(inout) :: a type(psb_ld_csr_sparse_mat), intent(inout) :: b end subroutine psb_ld_csr_mv_from @@ -284,13 +284,13 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_csput_a interface subroutine psb_ld_csr_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: val(:) - integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& + integer(psb_lpk_), intent(in) :: nz,ia(:), ja(:),& & imin,imax,jmin,jmax integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: gtl(:) + integer(psb_lpk_), intent(in), optional :: gtl(:) end subroutine psb_ld_csr_csput_a end interface @@ -299,15 +299,15 @@ module psb_ld_csr_mat_mod interface subroutine psb_ld_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a - integer(psb_ipk_), intent(in) :: imin,imax - integer(psb_ipk_), intent(out) :: nz - integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) + integer(psb_lpk_), intent(in) :: imin,imax + integer(psb_lpk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_),intent(out) :: info logical, intent(in), optional :: append - integer(psb_ipk_), intent(in), optional :: iren(:) - integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + integer(psb_lpk_), intent(in), optional :: iren(:) + integer(psb_lpk_), intent(in), optional :: jmin,jmax, nzin logical, intent(in), optional :: rscale,cscale end subroutine psb_ld_csr_csgetptn end interface @@ -317,16 +317,16 @@ module psb_ld_csr_mat_mod interface subroutine psb_ld_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a - integer(psb_ipk_), intent(in) :: imin,imax - integer(psb_ipk_), intent(out) :: nz - integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) + integer(psb_lpk_), intent(in) :: imin,imax + integer(psb_lpk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) real(psb_dpk_), allocatable, intent(inout) :: val(:) integer(psb_ipk_),intent(out) :: info logical, intent(in), optional :: append - integer(psb_ipk_), intent(in), optional :: iren(:) - integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + integer(psb_lpk_), intent(in), optional :: iren(:) + integer(psb_lpk_), intent(in), optional :: jmin,jmax, nzin logical, intent(in), optional :: rscale,cscale end subroutine psb_ld_csr_csgetrow end interface @@ -336,14 +336,14 @@ module psb_ld_csr_mat_mod interface subroutine psb_ld_csr_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_, psb_ld_coo_sparse_mat + import class(psb_ld_csr_sparse_mat), intent(in) :: a class(psb_ld_coo_sparse_mat), intent(inout) :: b - integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_lpk_), intent(in) :: imin,imax integer(psb_ipk_),intent(out) :: info logical, intent(in), optional :: append - integer(psb_ipk_), intent(in), optional :: iren(:) - integer(psb_ipk_), intent(in), optional :: jmin,jmax + integer(psb_lpk_), intent(in), optional :: iren(:) + integer(psb_lpk_), intent(in), optional :: jmin,jmax logical, intent(in), optional :: rscale,cscale end subroutine psb_ld_csr_csgetblk end interface @@ -352,7 +352,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cssv interface subroutine psb_ld_csr_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:) real(psb_dpk_), intent(inout) :: y(:) @@ -364,7 +364,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_cssm interface subroutine psb_ld_csr_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:,:) real(psb_dpk_), intent(inout) :: y(:,:) @@ -377,7 +377,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_csmv interface subroutine psb_ld_csr_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:) real(psb_dpk_), intent(inout) :: y(:) @@ -390,7 +390,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_csmm interface subroutine psb_ld_csr_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(in) :: alpha, beta, x(:,:) real(psb_dpk_), intent(inout) :: y(:,:) @@ -404,7 +404,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_maxval interface function psb_ld_csr_maxval(a) result(res) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_ld_csr_maxval @@ -414,7 +414,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_csnmi interface function psb_ld_csr_csnmi(a) result(res) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_ld_csr_csnmi @@ -424,7 +424,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_rowsum interface subroutine psb_ld_csr_rowsum(d,a) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_ld_csr_rowsum @@ -434,7 +434,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_arwsum interface subroutine psb_ld_csr_arwsum(d,a) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_ld_csr_arwsum @@ -444,7 +444,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_colsum interface subroutine psb_ld_csr_colsum(d,a) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_ld_csr_colsum @@ -454,7 +454,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_aclsum interface subroutine psb_ld_csr_aclsum(d,a) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_ld_csr_aclsum @@ -464,7 +464,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_get_diag interface subroutine psb_ld_csr_get_diag(a,d,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -475,7 +475,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_scal interface subroutine psb_ld_csr_scal(d,a,info,side) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -487,7 +487,7 @@ module psb_ld_csr_mat_mod !! \see psb_ld_base_mat_mod::psb_ld_base_scals interface subroutine psb_ld_csr_scals(d,a,info) - import :: psb_ipk_, psb_ld_csr_sparse_mat, psb_dpk_ + import class(psb_ld_csr_sparse_mat), intent(inout) :: a real(psb_dpk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -541,14 +541,14 @@ contains function ld_csr_get_nzeros(a) result(res) implicit none class(psb_ld_csr_sparse_mat), intent(in) :: a - integer(psb_ipk_) :: res + integer(psb_lpk_) :: res res = a%irp(a%get_nrows()+1)-1 end function ld_csr_get_nzeros function ld_csr_get_size(a) result(res) implicit none class(psb_ld_csr_sparse_mat), intent(in) :: a - integer(psb_ipk_) :: res + integer(psb_lpk_) :: res res = -1 @@ -572,8 +572,8 @@ contains implicit none class(psb_ld_csr_sparse_mat), intent(in) :: a - integer(psb_ipk_), intent(in) :: idx - integer(psb_ipk_) :: res + integer(psb_lpk_), intent(in) :: idx + integer(psb_lpk_) :: res res = 0 @@ -606,8 +606,8 @@ contains if (allocated(a%ja)) deallocate(a%ja) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_lpk_) + call a%set_ncols(0_psb_lpk_) return diff --git a/base/modules/serial/psb_s_csc_mat_mod.f90 b/base/modules/serial/psb_s_csc_mat_mod.f90 index 5b347222..f94ac5bf 100644 --- a/base/modules/serial/psb_s_csc_mat_mod.f90 +++ b/base/modules/serial/psb_s_csc_mat_mod.f90 @@ -107,7 +107,7 @@ module psb_s_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_s_csc_reallocate_nz(nz,a) - import :: psb_ipk_, psb_s_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: nz class(psb_s_csc_sparse_mat), intent(inout) :: a end subroutine psb_s_csc_reallocate_nz @@ -117,7 +117,7 @@ module psb_s_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_s_csc_reinit(a,clear) - import :: psb_ipk_, psb_s_csc_sparse_mat + import class(psb_s_csc_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_s_csc_reinit @@ -127,7 +127,7 @@ module psb_s_csc_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_s_csc_trim(a) - import :: psb_ipk_, psb_s_csc_sparse_mat + import class(psb_s_csc_sparse_mat), intent(inout) :: a end subroutine psb_s_csc_trim end interface @@ -136,7 +136,7 @@ module psb_s_csc_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_s_csc_mold(a,b,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat, psb_epk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a class(psb_s_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -147,7 +147,7 @@ module psb_s_csc_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_s_csc_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_s_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: m,n class(psb_s_csc_sparse_mat), intent(inout) :: a integer(psb_ipk_), intent(in), optional :: nz @@ -159,7 +159,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_print interface subroutine psb_s_csc_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_s_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_s_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in), optional :: iv(:) @@ -172,7 +172,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_to_coo interface subroutine psb_s_cp_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_csc_sparse_mat + import class(psb_s_csc_sparse_mat), intent(in) :: a class(psb_s_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -183,7 +183,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo interface subroutine psb_s_cp_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_coo_sparse_mat + import class(psb_s_csc_sparse_mat), intent(inout) :: a class(psb_s_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -194,7 +194,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_to_fmt interface subroutine psb_s_cp_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat + import class(psb_s_csc_sparse_mat), intent(in) :: a class(psb_s_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -205,7 +205,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_from_fmt interface subroutine psb_s_cp_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat + import class(psb_s_csc_sparse_mat), intent(inout) :: a class(psb_s_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -216,7 +216,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_to_coo interface subroutine psb_s_mv_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_coo_sparse_mat + import class(psb_s_csc_sparse_mat), intent(inout) :: a class(psb_s_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -227,7 +227,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_from_coo interface subroutine psb_s_mv_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_coo_sparse_mat + import class(psb_s_csc_sparse_mat), intent(inout) :: a class(psb_s_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -238,7 +238,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_to_fmt interface subroutine psb_s_mv_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat + import class(psb_s_csc_sparse_mat), intent(inout) :: a class(psb_s_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -249,7 +249,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_from_fmt interface subroutine psb_s_mv_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat + import class(psb_s_csc_sparse_mat), intent(inout) :: a class(psb_s_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -260,7 +260,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_from interface subroutine psb_s_csc_cp_from(a,b) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(inout) :: a type(psb_s_csc_sparse_mat), intent(in) :: b end subroutine psb_s_csc_cp_from @@ -270,7 +270,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_from interface subroutine psb_s_csc_mv_from(a,b) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(inout) :: a type(psb_s_csc_sparse_mat), intent(inout) :: b end subroutine psb_s_csc_mv_from @@ -281,7 +281,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_csput_a interface subroutine psb_s_csc_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(inout) :: a real(psb_spk_), intent(in) :: val(:) integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& @@ -296,7 +296,7 @@ module psb_s_csc_mat_mod interface subroutine psb_s_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -314,7 +314,7 @@ module psb_s_csc_mat_mod interface subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -333,7 +333,7 @@ module psb_s_csc_mat_mod interface subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_, psb_s_coo_sparse_mat + import class(psb_s_csc_sparse_mat), intent(in) :: a class(psb_s_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(in) :: imin,imax @@ -349,7 +349,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cssv interface subroutine psb_s_csc_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(in) :: alpha, beta, x(:) real(psb_spk_), intent(inout) :: y(:) @@ -361,7 +361,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cssm interface subroutine psb_s_csc_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(in) :: alpha, beta, x(:,:) real(psb_spk_), intent(inout) :: y(:,:) @@ -374,7 +374,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_csmv interface subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(in) :: alpha, beta, x(:) real(psb_spk_), intent(inout) :: y(:) @@ -387,7 +387,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_csmm interface subroutine psb_s_csc_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(in) :: alpha, beta, x(:,:) real(psb_spk_), intent(inout) :: y(:,:) @@ -401,7 +401,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_maxval interface function psb_s_csc_maxval(a) result(res) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_) :: res end function psb_s_csc_maxval @@ -411,7 +411,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_csnm1 interface function psb_s_csc_csnm1(a) result(res) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_) :: res end function psb_s_csc_csnm1 @@ -421,7 +421,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_rowsum interface subroutine psb_s_csc_rowsum(d,a) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_s_csc_rowsum @@ -431,7 +431,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_arwsum interface subroutine psb_s_csc_arwsum(d,a) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_s_csc_arwsum @@ -441,7 +441,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_colsum interface subroutine psb_s_csc_colsum(d,a) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_s_csc_colsum @@ -451,7 +451,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_aclsum interface subroutine psb_s_csc_aclsum(d,a) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_s_csc_aclsum @@ -461,7 +461,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_get_diag interface subroutine psb_s_csc_get_diag(a,d,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -472,7 +472,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_scal interface subroutine psb_s_csc_scal(d,a,info,side) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(inout) :: a real(psb_spk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -484,7 +484,7 @@ module psb_s_csc_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_scals interface subroutine psb_s_csc_scals(d,a,info) - import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ + import class(psb_s_csc_sparse_mat), intent(inout) :: a real(psb_spk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -602,8 +602,8 @@ contains if (allocated(a%ia)) deallocate(a%ia) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_ipk_) + call a%set_ncols(0_psb_ipk_) return diff --git a/base/modules/serial/psb_s_csr_mat_mod.f90 b/base/modules/serial/psb_s_csr_mat_mod.f90 index a4b76f9c..c9c46de3 100644 --- a/base/modules/serial/psb_s_csr_mat_mod.f90 +++ b/base/modules/serial/psb_s_csr_mat_mod.f90 @@ -109,7 +109,7 @@ module psb_s_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_s_csr_reallocate_nz(nz,a) - import :: psb_ipk_, psb_s_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: nz class(psb_s_csr_sparse_mat), intent(inout) :: a end subroutine psb_s_csr_reallocate_nz @@ -119,7 +119,7 @@ module psb_s_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_s_csr_reinit(a,clear) - import :: psb_ipk_, psb_s_csr_sparse_mat + import class(psb_s_csr_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_s_csr_reinit @@ -129,7 +129,7 @@ module psb_s_csr_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_s_csr_trim(a) - import :: psb_ipk_, psb_s_csr_sparse_mat + import class(psb_s_csr_sparse_mat), intent(inout) :: a end subroutine psb_s_csr_trim end interface @@ -139,7 +139,7 @@ module psb_s_csr_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_s_csr_mold(a,b,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat, psb_epk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a class(psb_s_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -150,7 +150,7 @@ module psb_s_csr_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_s_csr_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_s_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: m,n class(psb_s_csr_sparse_mat), intent(inout) :: a integer(psb_ipk_), intent(in), optional :: nz @@ -162,7 +162,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_print interface subroutine psb_s_csr_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_s_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_s_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in), optional :: iv(:) @@ -175,7 +175,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_to_coo interface subroutine psb_s_cp_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_csr_sparse_mat + import class(psb_s_csr_sparse_mat), intent(in) :: a class(psb_s_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -186,7 +186,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo interface subroutine psb_s_cp_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_coo_sparse_mat + import class(psb_s_csr_sparse_mat), intent(inout) :: a class(psb_s_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -197,7 +197,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_to_fmt interface subroutine psb_s_cp_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat + import class(psb_s_csr_sparse_mat), intent(in) :: a class(psb_s_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -208,7 +208,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_from_fmt interface subroutine psb_s_cp_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat + import class(psb_s_csr_sparse_mat), intent(inout) :: a class(psb_s_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -219,7 +219,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_to_coo interface subroutine psb_s_mv_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_coo_sparse_mat + import class(psb_s_csr_sparse_mat), intent(inout) :: a class(psb_s_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -230,7 +230,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_from_coo interface subroutine psb_s_mv_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_coo_sparse_mat + import class(psb_s_csr_sparse_mat), intent(inout) :: a class(psb_s_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -241,7 +241,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_to_fmt interface subroutine psb_s_mv_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat + import class(psb_s_csr_sparse_mat), intent(inout) :: a class(psb_s_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -252,7 +252,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_from_fmt interface subroutine psb_s_mv_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat + import class(psb_s_csr_sparse_mat), intent(inout) :: a class(psb_s_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -263,7 +263,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cp_from interface subroutine psb_s_csr_cp_from(a,b) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(inout) :: a type(psb_s_csr_sparse_mat), intent(in) :: b end subroutine psb_s_csr_cp_from @@ -273,7 +273,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_mv_from interface subroutine psb_s_csr_mv_from(a,b) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(inout) :: a type(psb_s_csr_sparse_mat), intent(inout) :: b end subroutine psb_s_csr_mv_from @@ -284,7 +284,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_csput_a interface subroutine psb_s_csr_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(inout) :: a real(psb_spk_), intent(in) :: val(:) integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& @@ -299,7 +299,7 @@ module psb_s_csr_mat_mod interface subroutine psb_s_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -317,7 +317,7 @@ module psb_s_csr_mat_mod interface subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -336,7 +336,7 @@ module psb_s_csr_mat_mod interface subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_, psb_s_coo_sparse_mat + import class(psb_s_csr_sparse_mat), intent(in) :: a class(psb_s_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(in) :: imin,imax @@ -352,7 +352,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cssv interface subroutine psb_s_csr_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(in) :: alpha, beta, x(:) real(psb_spk_), intent(inout) :: y(:) @@ -364,7 +364,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_cssm interface subroutine psb_s_csr_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(in) :: alpha, beta, x(:,:) real(psb_spk_), intent(inout) :: y(:,:) @@ -377,7 +377,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_csmv interface subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(in) :: alpha, beta, x(:) real(psb_spk_), intent(inout) :: y(:) @@ -390,7 +390,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_csmm interface subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(in) :: alpha, beta, x(:,:) real(psb_spk_), intent(inout) :: y(:,:) @@ -404,7 +404,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_maxval interface function psb_s_csr_maxval(a) result(res) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_) :: res end function psb_s_csr_maxval @@ -414,7 +414,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_csnmi interface function psb_s_csr_csnmi(a) result(res) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_) :: res end function psb_s_csr_csnmi @@ -424,7 +424,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_rowsum interface subroutine psb_s_csr_rowsum(d,a) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_s_csr_rowsum @@ -434,7 +434,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_arwsum interface subroutine psb_s_csr_arwsum(d,a) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_s_csr_arwsum @@ -444,7 +444,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_colsum interface subroutine psb_s_csr_colsum(d,a) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_s_csr_colsum @@ -454,7 +454,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_aclsum interface subroutine psb_s_csr_aclsum(d,a) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) end subroutine psb_s_csr_aclsum @@ -464,7 +464,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_get_diag interface subroutine psb_s_csr_get_diag(a,d,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(in) :: a real(psb_spk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -475,7 +475,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_scal interface subroutine psb_s_csr_scal(d,a,info,side) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(inout) :: a real(psb_spk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -487,7 +487,7 @@ module psb_s_csr_mat_mod !! \see psb_s_base_mat_mod::psb_s_base_scals interface subroutine psb_s_csr_scals(d,a,info) - import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ + import class(psb_s_csr_sparse_mat), intent(inout) :: a real(psb_spk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -606,8 +606,8 @@ contains if (allocated(a%ja)) deallocate(a%ja) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_ipk_) + call a%set_ncols(0_psb_ipk_) return diff --git a/base/modules/serial/psb_z_csc_mat_mod.f90 b/base/modules/serial/psb_z_csc_mat_mod.f90 index 58949301..876553b7 100644 --- a/base/modules/serial/psb_z_csc_mat_mod.f90 +++ b/base/modules/serial/psb_z_csc_mat_mod.f90 @@ -107,7 +107,7 @@ module psb_z_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_z_csc_reallocate_nz(nz,a) - import :: psb_ipk_, psb_z_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: nz class(psb_z_csc_sparse_mat), intent(inout) :: a end subroutine psb_z_csc_reallocate_nz @@ -117,7 +117,7 @@ module psb_z_csc_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_z_csc_reinit(a,clear) - import :: psb_ipk_, psb_z_csc_sparse_mat + import class(psb_z_csc_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_z_csc_reinit @@ -127,7 +127,7 @@ module psb_z_csc_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_z_csc_trim(a) - import :: psb_ipk_, psb_z_csc_sparse_mat + import class(psb_z_csc_sparse_mat), intent(inout) :: a end subroutine psb_z_csc_trim end interface @@ -136,7 +136,7 @@ module psb_z_csc_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_z_csc_mold(a,b,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat, psb_epk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a class(psb_z_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -147,7 +147,7 @@ module psb_z_csc_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_z_csc_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_z_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: m,n class(psb_z_csc_sparse_mat), intent(inout) :: a integer(psb_ipk_), intent(in), optional :: nz @@ -159,7 +159,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_print interface subroutine psb_z_csc_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_z_csc_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_z_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in), optional :: iv(:) @@ -172,7 +172,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_to_coo interface subroutine psb_z_cp_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_csc_sparse_mat + import class(psb_z_csc_sparse_mat), intent(in) :: a class(psb_z_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -183,7 +183,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo interface subroutine psb_z_cp_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_coo_sparse_mat + import class(psb_z_csc_sparse_mat), intent(inout) :: a class(psb_z_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -194,7 +194,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_to_fmt interface subroutine psb_z_cp_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat + import class(psb_z_csc_sparse_mat), intent(in) :: a class(psb_z_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -205,7 +205,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_from_fmt interface subroutine psb_z_cp_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat + import class(psb_z_csc_sparse_mat), intent(inout) :: a class(psb_z_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -216,7 +216,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_to_coo interface subroutine psb_z_mv_csc_to_coo(a,b,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_coo_sparse_mat + import class(psb_z_csc_sparse_mat), intent(inout) :: a class(psb_z_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -227,7 +227,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_from_coo interface subroutine psb_z_mv_csc_from_coo(a,b,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_coo_sparse_mat + import class(psb_z_csc_sparse_mat), intent(inout) :: a class(psb_z_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -238,7 +238,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_to_fmt interface subroutine psb_z_mv_csc_to_fmt(a,b,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat + import class(psb_z_csc_sparse_mat), intent(inout) :: a class(psb_z_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -249,7 +249,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_from_fmt interface subroutine psb_z_mv_csc_from_fmt(a,b,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat + import class(psb_z_csc_sparse_mat), intent(inout) :: a class(psb_z_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -260,7 +260,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_from interface subroutine psb_z_csc_cp_from(a,b) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(inout) :: a type(psb_z_csc_sparse_mat), intent(in) :: b end subroutine psb_z_csc_cp_from @@ -270,7 +270,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_from interface subroutine psb_z_csc_mv_from(a,b) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(inout) :: a type(psb_z_csc_sparse_mat), intent(inout) :: b end subroutine psb_z_csc_mv_from @@ -281,7 +281,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_csput_a interface subroutine psb_z_csc_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(inout) :: a complex(psb_dpk_), intent(in) :: val(:) integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& @@ -296,7 +296,7 @@ module psb_z_csc_mat_mod interface subroutine psb_z_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -314,7 +314,7 @@ module psb_z_csc_mat_mod interface subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -333,7 +333,7 @@ module psb_z_csc_mat_mod interface subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat + import class(psb_z_csc_sparse_mat), intent(in) :: a class(psb_z_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(in) :: imin,imax @@ -349,7 +349,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cssv interface subroutine psb_z_csc_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(in) :: alpha, beta, x(:) complex(psb_dpk_), intent(inout) :: y(:) @@ -361,7 +361,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cssm interface subroutine psb_z_csc_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:) complex(psb_dpk_), intent(inout) :: y(:,:) @@ -374,7 +374,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_csmv interface subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(in) :: alpha, beta, x(:) complex(psb_dpk_), intent(inout) :: y(:) @@ -387,7 +387,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_csmm interface subroutine psb_z_csc_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:) complex(psb_dpk_), intent(inout) :: y(:,:) @@ -401,7 +401,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_maxval interface function psb_z_csc_maxval(a) result(res) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_z_csc_maxval @@ -411,7 +411,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_csnm1 interface function psb_z_csc_csnm1(a) result(res) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_z_csc_csnm1 @@ -421,7 +421,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_rowsum interface subroutine psb_z_csc_rowsum(d,a) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(out) :: d(:) end subroutine psb_z_csc_rowsum @@ -431,7 +431,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_arwsum interface subroutine psb_z_csc_arwsum(d,a) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_z_csc_arwsum @@ -441,7 +441,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_colsum interface subroutine psb_z_csc_colsum(d,a) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(out) :: d(:) end subroutine psb_z_csc_colsum @@ -451,7 +451,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_aclsum interface subroutine psb_z_csc_aclsum(d,a) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_z_csc_aclsum @@ -461,7 +461,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_get_diag interface subroutine psb_z_csc_get_diag(a,d,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -472,7 +472,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_scal interface subroutine psb_z_csc_scal(d,a,info,side) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(inout) :: a complex(psb_dpk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -484,7 +484,7 @@ module psb_z_csc_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_scals interface subroutine psb_z_csc_scals(d,a,info) - import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ + import class(psb_z_csc_sparse_mat), intent(inout) :: a complex(psb_dpk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -602,8 +602,8 @@ contains if (allocated(a%ia)) deallocate(a%ia) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_ipk_) + call a%set_ncols(0_psb_ipk_) return diff --git a/base/modules/serial/psb_z_csr_mat_mod.f90 b/base/modules/serial/psb_z_csr_mat_mod.f90 index f074e88f..d098e8c2 100644 --- a/base/modules/serial/psb_z_csr_mat_mod.f90 +++ b/base/modules/serial/psb_z_csr_mat_mod.f90 @@ -109,7 +109,7 @@ module psb_z_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reallocate_nz interface subroutine psb_z_csr_reallocate_nz(nz,a) - import :: psb_ipk_, psb_z_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: nz class(psb_z_csr_sparse_mat), intent(inout) :: a end subroutine psb_z_csr_reallocate_nz @@ -119,7 +119,7 @@ module psb_z_csr_mat_mod !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_z_csr_reinit(a,clear) - import :: psb_ipk_, psb_z_csr_sparse_mat + import class(psb_z_csr_sparse_mat), intent(inout) :: a logical, intent(in), optional :: clear end subroutine psb_z_csr_reinit @@ -129,7 +129,7 @@ module psb_z_csr_mat_mod !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_z_csr_trim(a) - import :: psb_ipk_, psb_z_csr_sparse_mat + import class(psb_z_csr_sparse_mat), intent(inout) :: a end subroutine psb_z_csr_trim end interface @@ -139,7 +139,7 @@ module psb_z_csr_mat_mod !| \see psb_base_mat_mod::psb_base_mold interface subroutine psb_z_csr_mold(a,b,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat, psb_epk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a class(psb_z_base_sparse_mat), intent(inout), allocatable :: b integer(psb_ipk_), intent(out) :: info @@ -150,7 +150,7 @@ module psb_z_csr_mat_mod !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_z_csr_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_z_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: m,n class(psb_z_csr_sparse_mat), intent(inout) :: a integer(psb_ipk_), intent(in), optional :: nz @@ -162,7 +162,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_print interface subroutine psb_z_csr_print(iout,a,iv,head,ivr,ivc) - import :: psb_ipk_, psb_z_csr_sparse_mat + import integer(psb_ipk_), intent(in) :: iout class(psb_z_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in), optional :: iv(:) @@ -175,7 +175,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_to_coo interface subroutine psb_z_cp_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_csr_sparse_mat + import class(psb_z_csr_sparse_mat), intent(in) :: a class(psb_z_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -186,7 +186,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo interface subroutine psb_z_cp_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_coo_sparse_mat + import class(psb_z_csr_sparse_mat), intent(inout) :: a class(psb_z_coo_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -197,7 +197,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_to_fmt interface subroutine psb_z_cp_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat + import class(psb_z_csr_sparse_mat), intent(in) :: a class(psb_z_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -208,7 +208,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_from_fmt interface subroutine psb_z_cp_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat + import class(psb_z_csr_sparse_mat), intent(inout) :: a class(psb_z_base_sparse_mat), intent(in) :: b integer(psb_ipk_), intent(out) :: info @@ -219,7 +219,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_to_coo interface subroutine psb_z_mv_csr_to_coo(a,b,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_coo_sparse_mat + import class(psb_z_csr_sparse_mat), intent(inout) :: a class(psb_z_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -230,7 +230,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_from_coo interface subroutine psb_z_mv_csr_from_coo(a,b,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_coo_sparse_mat + import class(psb_z_csr_sparse_mat), intent(inout) :: a class(psb_z_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -241,7 +241,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_to_fmt interface subroutine psb_z_mv_csr_to_fmt(a,b,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat + import class(psb_z_csr_sparse_mat), intent(inout) :: a class(psb_z_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -252,7 +252,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_from_fmt interface subroutine psb_z_mv_csr_from_fmt(a,b,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat + import class(psb_z_csr_sparse_mat), intent(inout) :: a class(psb_z_base_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(out) :: info @@ -263,7 +263,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cp_from interface subroutine psb_z_csr_cp_from(a,b) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(inout) :: a type(psb_z_csr_sparse_mat), intent(in) :: b end subroutine psb_z_csr_cp_from @@ -273,7 +273,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_mv_from interface subroutine psb_z_csr_mv_from(a,b) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(inout) :: a type(psb_z_csr_sparse_mat), intent(inout) :: b end subroutine psb_z_csr_mv_from @@ -284,7 +284,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_csput_a interface subroutine psb_z_csr_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(inout) :: a complex(psb_dpk_), intent(in) :: val(:) integer(psb_ipk_), intent(in) :: nz,ia(:), ja(:),& @@ -299,7 +299,7 @@ module psb_z_csr_mat_mod interface subroutine psb_z_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -317,7 +317,7 @@ module psb_z_csr_mat_mod interface subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(out) :: nz @@ -336,7 +336,7 @@ module psb_z_csr_mat_mod interface subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat + import class(psb_z_csr_sparse_mat), intent(in) :: a class(psb_z_coo_sparse_mat), intent(inout) :: b integer(psb_ipk_), intent(in) :: imin,imax @@ -352,7 +352,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cssv interface subroutine psb_z_csr_cssv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(in) :: alpha, beta, x(:) complex(psb_dpk_), intent(inout) :: y(:) @@ -364,7 +364,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_cssm interface subroutine psb_z_csr_cssm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:) complex(psb_dpk_), intent(inout) :: y(:,:) @@ -377,7 +377,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_csmv interface subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(in) :: alpha, beta, x(:) complex(psb_dpk_), intent(inout) :: y(:) @@ -390,7 +390,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_csmm interface subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:) complex(psb_dpk_), intent(inout) :: y(:,:) @@ -404,7 +404,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_maxval interface function psb_z_csr_maxval(a) result(res) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_z_csr_maxval @@ -414,7 +414,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_csnmi interface function psb_z_csr_csnmi(a) result(res) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a real(psb_dpk_) :: res end function psb_z_csr_csnmi @@ -424,7 +424,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_rowsum interface subroutine psb_z_csr_rowsum(d,a) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(out) :: d(:) end subroutine psb_z_csr_rowsum @@ -434,7 +434,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_arwsum interface subroutine psb_z_csr_arwsum(d,a) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_z_csr_arwsum @@ -444,7 +444,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_colsum interface subroutine psb_z_csr_colsum(d,a) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(out) :: d(:) end subroutine psb_z_csr_colsum @@ -454,7 +454,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_aclsum interface subroutine psb_z_csr_aclsum(d,a) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a real(psb_dpk_), intent(out) :: d(:) end subroutine psb_z_csr_aclsum @@ -464,7 +464,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_get_diag interface subroutine psb_z_csr_get_diag(a,d,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(in) :: a complex(psb_dpk_), intent(out) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -475,7 +475,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_scal interface subroutine psb_z_csr_scal(d,a,info,side) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(inout) :: a complex(psb_dpk_), intent(in) :: d(:) integer(psb_ipk_), intent(out) :: info @@ -487,7 +487,7 @@ module psb_z_csr_mat_mod !! \see psb_z_base_mat_mod::psb_z_base_scals interface subroutine psb_z_csr_scals(d,a,info) - import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ + import class(psb_z_csr_sparse_mat), intent(inout) :: a complex(psb_dpk_), intent(in) :: d integer(psb_ipk_), intent(out) :: info @@ -606,8 +606,8 @@ contains if (allocated(a%ja)) deallocate(a%ja) if (allocated(a%val)) deallocate(a%val) call a%set_null() - call a%set_nrows(izero) - call a%set_ncols(izero) + call a%set_nrows(0_psb_ipk_) + call a%set_ncols(0_psb_ipk_) return