Changelog
 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

Fix sum of rows/cols for unit triangular matrices.
psblas3-final
Salvatore Filippone 12 years ago
parent 1903489113
commit a922c70f3d

@ -1,5 +1,6 @@
Changelog. A lot less detailed than usual, at least for past Changelog. A lot less detailed than usual, at least for past
history. history.
2013/04/20: Fix add-by-one for unit triangular matrices.
2013/03/31: Implement CLONE method for vectors, maps and preconditioners. 2013/03/31: Implement CLONE method for vectors, maps and preconditioners.
Make base_prec abstract. Make base_prec abstract.

@ -1788,6 +1788,12 @@ subroutine psb_c_coo_rowsum(d,a)
d(i) = d(i) + a%val(j) d(i) = d(i) + a%val(j)
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + cone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1836,6 +1842,12 @@ subroutine psb_c_coo_arwsum(d,a)
d(i) = d(i) + abs(a%val(j)) d(i) = d(i) + abs(a%val(j))
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1884,6 +1896,12 @@ subroutine psb_c_coo_colsum(d,a)
d(k) = d(k) + a%val(j) d(k) = d(k) + a%val(j)
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + cone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1932,6 +1950,12 @@ subroutine psb_c_coo_aclsum(d,a)
d(k) = d(k) + abs(a%val(j)) d(k) = d(k) + abs(a%val(j))
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1193,6 +1193,12 @@ subroutine psb_c_csc_colsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_ncols()
d(i) = d(i) + cone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1242,6 +1248,12 @@ subroutine psb_c_csc_aclsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_ncols()
d(i) = d(i) + sone
end do
end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1292,6 +1304,12 @@ subroutine psb_c_csc_rowsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_nrows()
d(i) = d(i) + cone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1335,7 +1353,6 @@ subroutine psb_c_csc_arwsum(d,a)
end if end if
d = szero d = szero
do i=1, m do i=1, m
do j=a%icp(i),a%icp(i+1)-1 do j=a%icp(i),a%icp(i+1)-1
k = a%ia(j) k = a%ia(j)
@ -1343,6 +1360,12 @@ subroutine psb_c_csc_arwsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_nrows()
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1398,6 +1398,12 @@ subroutine psb_c_csr_rowsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + cone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1447,6 +1453,12 @@ subroutine psb_c_csr_arwsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + sone
end do
end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1497,6 +1509,12 @@ subroutine psb_c_csr_colsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + cone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1548,6 +1566,12 @@ subroutine psb_c_csr_aclsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1788,6 +1788,12 @@ subroutine psb_d_coo_rowsum(d,a)
d(i) = d(i) + a%val(j) d(i) = d(i) + a%val(j)
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1836,6 +1842,12 @@ subroutine psb_d_coo_arwsum(d,a)
d(i) = d(i) + abs(a%val(j)) d(i) = d(i) + abs(a%val(j))
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1884,6 +1896,12 @@ subroutine psb_d_coo_colsum(d,a)
d(k) = d(k) + a%val(j) d(k) = d(k) + a%val(j)
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1932,6 +1950,12 @@ subroutine psb_d_coo_aclsum(d,a)
d(k) = d(k) + abs(a%val(j)) d(k) = d(k) + abs(a%val(j))
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1193,6 +1193,12 @@ subroutine psb_d_csc_colsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_ncols()
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1242,6 +1248,12 @@ subroutine psb_d_csc_aclsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_ncols()
d(i) = d(i) + done
end do
end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1292,6 +1304,12 @@ subroutine psb_d_csc_rowsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_nrows()
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1335,7 +1353,6 @@ subroutine psb_d_csc_arwsum(d,a)
end if end if
d = dzero d = dzero
do i=1, m do i=1, m
do j=a%icp(i),a%icp(i+1)-1 do j=a%icp(i),a%icp(i+1)-1
k = a%ia(j) k = a%ia(j)
@ -1343,6 +1360,12 @@ subroutine psb_d_csc_arwsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_nrows()
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1398,6 +1398,12 @@ subroutine psb_d_csr_rowsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1447,6 +1453,12 @@ subroutine psb_d_csr_arwsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + done
end do
end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1497,6 +1509,12 @@ subroutine psb_d_csr_colsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1548,6 +1566,12 @@ subroutine psb_d_csr_aclsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1788,6 +1788,12 @@ subroutine psb_s_coo_rowsum(d,a)
d(i) = d(i) + a%val(j) d(i) = d(i) + a%val(j)
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1836,6 +1842,12 @@ subroutine psb_s_coo_arwsum(d,a)
d(i) = d(i) + abs(a%val(j)) d(i) = d(i) + abs(a%val(j))
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1884,6 +1896,12 @@ subroutine psb_s_coo_colsum(d,a)
d(k) = d(k) + a%val(j) d(k) = d(k) + a%val(j)
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1932,6 +1950,12 @@ subroutine psb_s_coo_aclsum(d,a)
d(k) = d(k) + abs(a%val(j)) d(k) = d(k) + abs(a%val(j))
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1193,6 +1193,12 @@ subroutine psb_s_csc_colsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_ncols()
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1242,6 +1248,12 @@ subroutine psb_s_csc_aclsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_ncols()
d(i) = d(i) + sone
end do
end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1292,6 +1304,12 @@ subroutine psb_s_csc_rowsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_nrows()
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1335,7 +1353,6 @@ subroutine psb_s_csc_arwsum(d,a)
end if end if
d = szero d = szero
do i=1, m do i=1, m
do j=a%icp(i),a%icp(i+1)-1 do j=a%icp(i),a%icp(i+1)-1
k = a%ia(j) k = a%ia(j)
@ -1343,6 +1360,12 @@ subroutine psb_s_csc_arwsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_nrows()
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1398,6 +1398,12 @@ subroutine psb_s_csr_rowsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1447,6 +1453,12 @@ subroutine psb_s_csr_arwsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + sone
end do
end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1497,6 +1509,12 @@ subroutine psb_s_csr_colsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1548,6 +1566,12 @@ subroutine psb_s_csr_aclsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + sone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1788,6 +1788,12 @@ subroutine psb_z_coo_rowsum(d,a)
d(i) = d(i) + a%val(j) d(i) = d(i) + a%val(j)
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + zone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1836,6 +1842,12 @@ subroutine psb_z_coo_arwsum(d,a)
d(i) = d(i) + abs(a%val(j)) d(i) = d(i) + abs(a%val(j))
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1884,6 +1896,12 @@ subroutine psb_z_coo_colsum(d,a)
d(k) = d(k) + a%val(j) d(k) = d(k) + a%val(j)
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + zone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1932,6 +1950,12 @@ subroutine psb_z_coo_aclsum(d,a)
d(k) = d(k) + abs(a%val(j)) d(k) = d(k) + abs(a%val(j))
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1193,6 +1193,12 @@ subroutine psb_z_csc_colsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_ncols()
d(i) = d(i) + zone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1242,6 +1248,12 @@ subroutine psb_z_csc_aclsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_ncols()
d(i) = d(i) + done
end do
end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1292,6 +1304,12 @@ subroutine psb_z_csc_rowsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_nrows()
d(i) = d(i) + zone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1335,7 +1353,6 @@ subroutine psb_z_csc_arwsum(d,a)
end if end if
d = dzero d = dzero
do i=1, m do i=1, m
do j=a%icp(i),a%icp(i+1)-1 do j=a%icp(i),a%icp(i+1)-1
k = a%ia(j) k = a%ia(j)
@ -1343,6 +1360,12 @@ subroutine psb_z_csc_arwsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, a%get_nrows()
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -1398,6 +1398,12 @@ subroutine psb_z_csr_rowsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + zone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1447,6 +1453,12 @@ subroutine psb_z_csr_arwsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, m
d(i) = d(i) + done
end do
end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1497,6 +1509,12 @@ subroutine psb_z_csr_colsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + zone
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -1548,6 +1566,12 @@ subroutine psb_z_csr_aclsum(d,a)
end do end do
end do end do
if (a%is_triangle().and.a%is_unit()) then
do i=1, n
d(i) = d(i) + done
end do
end if
return return
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

Loading…
Cancel
Save