base/serial/impl/psb_c_coo_impl.f90
 base/serial/impl/psb_c_csc_impl.f90
 base/serial/impl/psb_c_csr_impl.f90
 base/serial/impl/psb_d_coo_impl.f90
 base/serial/impl/psb_d_csc_impl.f90
 base/serial/impl/psb_d_csr_impl.f90
 base/serial/impl/psb_s_coo_impl.f90
 base/serial/impl/psb_s_csc_impl.f90
 base/serial/impl/psb_s_csr_impl.f90
 base/serial/impl/psb_z_coo_impl.f90
 base/serial/impl/psb_z_csc_impl.f90
 base/serial/impl/psb_z_csr_impl.f90

Fixes to print routines and computation of sizes for spspmm
psblas-3.4-maint
Salvatore Filippone 9 years ago
parent 5b2ca16124
commit d99c45ae3d

@ -415,12 +415,11 @@ subroutine psb_c_coo_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()

@ -2770,12 +2770,12 @@ subroutine psb_c_csc_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()
@ -2860,7 +2860,7 @@ subroutine psb_ccscspspmm(a,b,c,info)
nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb
! Estimate number of nonzeros on output. ! Estimate number of nonzeros on output.
! Turns out this is often a large overestimate. ! Turns out this is often a large overestimate.
call c%allocate(ma,nb,min(nzc,nze,nzeb)) call c%allocate(ma,nb,nzc)
call csc_spspmm(a,b,c,info) call csc_spspmm(a,b,c,info)

@ -2597,12 +2597,12 @@ subroutine psb_c_csr_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: irs,ics,i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: irs,ics,i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()
@ -3087,7 +3087,7 @@ subroutine psb_ccsrspspmm(a,b,c,info)
nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb
! Estimate number of nonzeros on output. ! Estimate number of nonzeros on output.
! Turns out this is often a large overestimate. ! Turns out this is often a large overestimate.
call c%allocate(ma,nb,min(nzc,nze,nzeb)) call c%allocate(ma,nb,nzc)
call csr_spspmm(a,b,c,info) call csr_spspmm(a,b,c,info)

@ -415,12 +415,11 @@ subroutine psb_d_coo_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' write(iout,'(a)') '%%MatrixMarket matrix coordinate real general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()

@ -2770,12 +2770,12 @@ subroutine psb_d_csc_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' write(iout,'(a)') '%%MatrixMarket matrix coordinate real general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()
@ -2860,7 +2860,7 @@ subroutine psb_dcscspspmm(a,b,c,info)
nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb
! Estimate number of nonzeros on output. ! Estimate number of nonzeros on output.
! Turns out this is often a large overestimate. ! Turns out this is often a large overestimate.
call c%allocate(ma,nb,min(nzc,nze,nzeb)) call c%allocate(ma,nb,nzc)
call csc_spspmm(a,b,c,info) call csc_spspmm(a,b,c,info)

@ -2597,12 +2597,12 @@ subroutine psb_d_csr_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: irs,ics,i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: irs,ics,i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' write(iout,'(a)') '%%MatrixMarket matrix coordinate real general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()
@ -3087,7 +3087,7 @@ subroutine psb_dcsrspspmm(a,b,c,info)
nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb
! Estimate number of nonzeros on output. ! Estimate number of nonzeros on output.
! Turns out this is often a large overestimate. ! Turns out this is often a large overestimate.
call c%allocate(ma,nb,min(nzc,nze,nzeb)) call c%allocate(ma,nb,nzc)
call csr_spspmm(a,b,c,info) call csr_spspmm(a,b,c,info)

@ -415,12 +415,11 @@ subroutine psb_s_coo_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' write(iout,'(a)') '%%MatrixMarket matrix coordinate real general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()

@ -2770,12 +2770,12 @@ subroutine psb_s_csc_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' write(iout,'(a)') '%%MatrixMarket matrix coordinate real general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()
@ -2860,7 +2860,7 @@ subroutine psb_scscspspmm(a,b,c,info)
nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb
! Estimate number of nonzeros on output. ! Estimate number of nonzeros on output.
! Turns out this is often a large overestimate. ! Turns out this is often a large overestimate.
call c%allocate(ma,nb,min(nzc,nze,nzeb)) call c%allocate(ma,nb,nzc)
call csc_spspmm(a,b,c,info) call csc_spspmm(a,b,c,info)

@ -2597,12 +2597,12 @@ subroutine psb_s_csr_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: irs,ics,i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: irs,ics,i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' write(iout,'(a)') '%%MatrixMarket matrix coordinate real general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()
@ -3087,7 +3087,7 @@ subroutine psb_scsrspspmm(a,b,c,info)
nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb
! Estimate number of nonzeros on output. ! Estimate number of nonzeros on output.
! Turns out this is often a large overestimate. ! Turns out this is often a large overestimate.
call c%allocate(ma,nb,min(nzc,nze,nzeb)) call c%allocate(ma,nb,nzc)
call csr_spspmm(a,b,c,info) call csr_spspmm(a,b,c,info)

@ -415,12 +415,11 @@ subroutine psb_z_coo_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()

@ -2770,12 +2770,12 @@ subroutine psb_z_csc_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()
@ -2860,7 +2860,7 @@ subroutine psb_zcscspspmm(a,b,c,info)
nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb
! Estimate number of nonzeros on output. ! Estimate number of nonzeros on output.
! Turns out this is often a large overestimate. ! Turns out this is often a large overestimate.
call c%allocate(ma,nb,min(nzc,nze,nzeb)) call c%allocate(ma,nb,nzc)
call csc_spspmm(a,b,c,info) call csc_spspmm(a,b,c,info)

@ -2597,12 +2597,12 @@ subroutine psb_z_csr_print(iout,a,iv,head,ivr,ivc)
character(len=80) :: frmtv character(len=80) :: frmtv
integer(psb_ipk_) :: irs,ics,i,j, nmx, ni, nr, nc, nz integer(psb_ipk_) :: irs,ics,i,j, nmx, ni, nr, nc, nz
if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general'
write(iout,'(a,a)') '% ',head if (present(head)) write(iout,'(a,a)') '% ',head
write(iout,'(a)') '%' write(iout,'(a)') '%'
write(iout,'(a,a)') '% COO' write(iout,'(a,a)') '% COO'
endif
if (a%is_dev()) call a%sync() if (a%is_dev()) call a%sync()
nr = a%get_nrows() nr = a%get_nrows()
@ -3087,7 +3087,7 @@ subroutine psb_zcsrspspmm(a,b,c,info)
nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb nzeb = (((nza+na-1)/na)*((nzb+nb-1)/nb))*nb
! Estimate number of nonzeros on output. ! Estimate number of nonzeros on output.
! Turns out this is often a large overestimate. ! Turns out this is often a large overestimate.
call c%allocate(ma,nb,min(nzc,nze,nzeb)) call c%allocate(ma,nb,nzc)
call csr_spspmm(a,b,c,info) call csr_spspmm(a,b,c,info)

Loading…
Cancel
Save