diff --git a/base/serial/impl/psb_c_csr_impl.f90 b/base/serial/impl/psb_c_csr_impl.f90 index 60742158..1a5a5275 100644 --- a/base/serial/impl/psb_c_csr_impl.f90 +++ b/base/serial/impl/psb_c_csr_impl.f90 @@ -3264,7 +3264,7 @@ subroutine psb_ccsrspspmm(a,b,c,info) class(psb_c_csr_sparse_mat), intent(in) :: a,b type(psb_c_csr_sparse_mat), intent(out) :: c integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_) :: nze, ma,na,mb,nb, nzc, nza, nzb,nzeb + integer(psb_ipk_) :: ma,na,mb,nb, nzc, nza, nzb character(len=20) :: name integer(psb_ipk_) :: err_act name='psb_csrspspmm' @@ -3287,13 +3287,10 @@ subroutine psb_ccsrspspmm(a,b,c,info) goto 9999 endif + ! Estimate number of nonzeros on output. nza = a%get_nzeros() nzb = b%get_nzeros() nzc = 2*(nza+nzb) - nze = ma*(((nza+ma-1)/ma)*((nzb+mb-1)/mb) ) - nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb - ! Estimate number of nonzeros on output. - ! Turns out this is often a large overestimate. call c%allocate(ma,nb,nzc) call csr_spspmm(a,b,c,info) @@ -5393,7 +5390,7 @@ subroutine psb_lccsrspspmm(a,b,c,info) class(psb_lc_csr_sparse_mat), intent(in) :: a,b type(psb_lc_csr_sparse_mat), intent(out) :: c integer(psb_ipk_), intent(out) :: info - integer(psb_lpk_) :: nze, ma,na,mb,nb, nzc, nza, nzb,nzeb + integer(psb_lpk_) :: ma,na,mb,nb, nzc, nza, nzb character(len=20) :: name integer(psb_ipk_) :: err_act name='psb_csrspspmm' @@ -5419,10 +5416,6 @@ subroutine psb_lccsrspspmm(a,b,c,info) nza = a%get_nzeros() nzb = b%get_nzeros() nzc = 2*(nza+nzb) - nze = ma*(((nza+ma-1)/ma)*((nzb+mb-1)/mb) ) - nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb - ! Estimate number of nonzeros on output. - ! Turns out this is often a large overestimate. call c%allocate(ma,nb,nzc) call csr_spspmm(a,b,c,info) diff --git a/base/serial/impl/psb_d_csr_impl.f90 b/base/serial/impl/psb_d_csr_impl.f90 index 97cc78b6..d49f0d23 100644 --- a/base/serial/impl/psb_d_csr_impl.f90 +++ b/base/serial/impl/psb_d_csr_impl.f90 @@ -3264,7 +3264,7 @@ subroutine psb_dcsrspspmm(a,b,c,info) class(psb_d_csr_sparse_mat), intent(in) :: a,b type(psb_d_csr_sparse_mat), intent(out) :: c integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_) :: nze, ma,na,mb,nb, nzc, nza, nzb,nzeb + integer(psb_ipk_) :: ma,na,mb,nb, nzc, nza, nzb character(len=20) :: name integer(psb_ipk_) :: err_act name='psb_csrspspmm' @@ -3287,13 +3287,10 @@ subroutine psb_dcsrspspmm(a,b,c,info) goto 9999 endif + ! Estimate number of nonzeros on output. nza = a%get_nzeros() nzb = b%get_nzeros() nzc = 2*(nza+nzb) - nze = ma*(((nza+ma-1)/ma)*((nzb+mb-1)/mb) ) - nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb - ! Estimate number of nonzeros on output. - ! Turns out this is often a large overestimate. call c%allocate(ma,nb,nzc) call csr_spspmm(a,b,c,info) @@ -5393,7 +5390,7 @@ subroutine psb_ldcsrspspmm(a,b,c,info) class(psb_ld_csr_sparse_mat), intent(in) :: a,b type(psb_ld_csr_sparse_mat), intent(out) :: c integer(psb_ipk_), intent(out) :: info - integer(psb_lpk_) :: nze, ma,na,mb,nb, nzc, nza, nzb,nzeb + integer(psb_lpk_) :: ma,na,mb,nb, nzc, nza, nzb character(len=20) :: name integer(psb_ipk_) :: err_act name='psb_csrspspmm' @@ -5419,10 +5416,6 @@ subroutine psb_ldcsrspspmm(a,b,c,info) nza = a%get_nzeros() nzb = b%get_nzeros() nzc = 2*(nza+nzb) - nze = ma*(((nza+ma-1)/ma)*((nzb+mb-1)/mb) ) - nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb - ! Estimate number of nonzeros on output. - ! Turns out this is often a large overestimate. call c%allocate(ma,nb,nzc) call csr_spspmm(a,b,c,info) diff --git a/base/serial/impl/psb_s_csr_impl.f90 b/base/serial/impl/psb_s_csr_impl.f90 index 7e4a64a2..6f02e1bc 100644 --- a/base/serial/impl/psb_s_csr_impl.f90 +++ b/base/serial/impl/psb_s_csr_impl.f90 @@ -3264,7 +3264,7 @@ subroutine psb_scsrspspmm(a,b,c,info) class(psb_s_csr_sparse_mat), intent(in) :: a,b type(psb_s_csr_sparse_mat), intent(out) :: c integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_) :: nze, ma,na,mb,nb, nzc, nza, nzb,nzeb + integer(psb_ipk_) :: ma,na,mb,nb, nzc, nza, nzb character(len=20) :: name integer(psb_ipk_) :: err_act name='psb_csrspspmm' @@ -3287,13 +3287,10 @@ subroutine psb_scsrspspmm(a,b,c,info) goto 9999 endif + ! Estimate number of nonzeros on output. nza = a%get_nzeros() nzb = b%get_nzeros() nzc = 2*(nza+nzb) - nze = ma*(((nza+ma-1)/ma)*((nzb+mb-1)/mb) ) - nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb - ! Estimate number of nonzeros on output. - ! Turns out this is often a large overestimate. call c%allocate(ma,nb,nzc) call csr_spspmm(a,b,c,info) @@ -5393,7 +5390,7 @@ subroutine psb_lscsrspspmm(a,b,c,info) class(psb_ls_csr_sparse_mat), intent(in) :: a,b type(psb_ls_csr_sparse_mat), intent(out) :: c integer(psb_ipk_), intent(out) :: info - integer(psb_lpk_) :: nze, ma,na,mb,nb, nzc, nza, nzb,nzeb + integer(psb_lpk_) :: ma,na,mb,nb, nzc, nza, nzb character(len=20) :: name integer(psb_ipk_) :: err_act name='psb_csrspspmm' @@ -5419,10 +5416,6 @@ subroutine psb_lscsrspspmm(a,b,c,info) nza = a%get_nzeros() nzb = b%get_nzeros() nzc = 2*(nza+nzb) - nze = ma*(((nza+ma-1)/ma)*((nzb+mb-1)/mb) ) - nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb - ! Estimate number of nonzeros on output. - ! Turns out this is often a large overestimate. call c%allocate(ma,nb,nzc) call csr_spspmm(a,b,c,info) diff --git a/base/serial/impl/psb_z_csr_impl.f90 b/base/serial/impl/psb_z_csr_impl.f90 index 038a1f47..55c143ef 100644 --- a/base/serial/impl/psb_z_csr_impl.f90 +++ b/base/serial/impl/psb_z_csr_impl.f90 @@ -3264,7 +3264,7 @@ subroutine psb_zcsrspspmm(a,b,c,info) class(psb_z_csr_sparse_mat), intent(in) :: a,b type(psb_z_csr_sparse_mat), intent(out) :: c integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_) :: nze, ma,na,mb,nb, nzc, nza, nzb,nzeb + integer(psb_ipk_) :: ma,na,mb,nb, nzc, nza, nzb character(len=20) :: name integer(psb_ipk_) :: err_act name='psb_csrspspmm' @@ -3287,13 +3287,10 @@ subroutine psb_zcsrspspmm(a,b,c,info) goto 9999 endif + ! Estimate number of nonzeros on output. nza = a%get_nzeros() nzb = b%get_nzeros() nzc = 2*(nza+nzb) - nze = ma*(((nza+ma-1)/ma)*((nzb+mb-1)/mb) ) - nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb - ! Estimate number of nonzeros on output. - ! Turns out this is often a large overestimate. call c%allocate(ma,nb,nzc) call csr_spspmm(a,b,c,info) @@ -5393,7 +5390,7 @@ subroutine psb_lzcsrspspmm(a,b,c,info) class(psb_lz_csr_sparse_mat), intent(in) :: a,b type(psb_lz_csr_sparse_mat), intent(out) :: c integer(psb_ipk_), intent(out) :: info - integer(psb_lpk_) :: nze, ma,na,mb,nb, nzc, nza, nzb,nzeb + integer(psb_lpk_) :: ma,na,mb,nb, nzc, nza, nzb character(len=20) :: name integer(psb_ipk_) :: err_act name='psb_csrspspmm' @@ -5419,10 +5416,6 @@ subroutine psb_lzcsrspspmm(a,b,c,info) nza = a%get_nzeros() nzb = b%get_nzeros() nzc = 2*(nza+nzb) - nze = ma*(((nza+ma-1)/ma)*((nzb+mb-1)/mb) ) - nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb - ! Estimate number of nonzeros on output. - ! Turns out this is often a large overestimate. call c%allocate(ma,nb,nzc) call csr_spspmm(a,b,c,info)