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
history.
2013/04/20: Fix add-by-one for unit triangular matrices.
2013/03/31: Implement CLONE method for vectors, maps and preconditioners.
Make base_prec abstract.

@ -1788,6 +1788,12 @@ subroutine psb_c_coo_rowsum(d,a)
d(i) = d(i) + a%val(j)
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
call psb_erractionrestore(err_act)
return
@ -1836,6 +1842,12 @@ subroutine psb_c_coo_arwsum(d,a)
d(i) = d(i) + abs(a%val(j))
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
call psb_erractionrestore(err_act)
return
@ -1883,6 +1895,12 @@ subroutine psb_c_coo_colsum(d,a)
k = a%ja(j)
d(k) = d(k) + a%val(j)
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
call psb_erractionrestore(err_act)
@ -1931,6 +1949,12 @@ subroutine psb_c_coo_aclsum(d,a)
k = a%ja(j)
d(k) = d(k) + abs(a%val(j))
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
call psb_erractionrestore(err_act)

@ -1192,6 +1192,12 @@ subroutine psb_c_csc_colsum(d,a)
d(i) = d(i) + (a%val(j))
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
call psb_erractionrestore(err_act)
@ -1241,6 +1247,12 @@ subroutine psb_c_csc_aclsum(d,a)
d(i) = d(i) + abs(a%val(j))
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)
return
@ -1292,6 +1304,12 @@ subroutine psb_c_csc_rowsum(d,a)
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
call psb_erractionrestore(err_act)
return
@ -1335,7 +1353,6 @@ subroutine psb_c_csc_arwsum(d,a)
end if
d = szero
do i=1, m
do j=a%icp(i),a%icp(i+1)-1
k = a%ia(j)
@ -1343,6 +1360,12 @@ subroutine psb_c_csc_arwsum(d,a)
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
call psb_erractionrestore(err_act)
return

@ -1397,6 +1397,12 @@ subroutine psb_c_csr_rowsum(d,a)
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
call psb_erractionrestore(err_act)
@ -1446,6 +1452,12 @@ subroutine psb_c_csr_arwsum(d,a)
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
call psb_erractionrestore(err_act)
return
@ -1496,6 +1508,12 @@ subroutine psb_c_csr_colsum(d,a)
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
call psb_erractionrestore(err_act)
@ -1547,6 +1565,12 @@ subroutine psb_c_csr_aclsum(d,a)
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
call psb_erractionrestore(err_act)

@ -1788,6 +1788,12 @@ subroutine psb_d_coo_rowsum(d,a)
d(i) = d(i) + a%val(j)
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
call psb_erractionrestore(err_act)
return
@ -1836,6 +1842,12 @@ subroutine psb_d_coo_arwsum(d,a)
d(i) = d(i) + abs(a%val(j))
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
call psb_erractionrestore(err_act)
return
@ -1883,6 +1895,12 @@ subroutine psb_d_coo_colsum(d,a)
k = a%ja(j)
d(k) = d(k) + a%val(j)
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
call psb_erractionrestore(err_act)
@ -1931,6 +1949,12 @@ subroutine psb_d_coo_aclsum(d,a)
k = a%ja(j)
d(k) = d(k) + abs(a%val(j))
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
call psb_erractionrestore(err_act)

@ -1192,6 +1192,12 @@ subroutine psb_d_csc_colsum(d,a)
d(i) = d(i) + (a%val(j))
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
call psb_erractionrestore(err_act)
@ -1241,6 +1247,12 @@ subroutine psb_d_csc_aclsum(d,a)
d(i) = d(i) + abs(a%val(j))
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)
return
@ -1292,6 +1304,12 @@ subroutine psb_d_csc_rowsum(d,a)
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
call psb_erractionrestore(err_act)
return
@ -1335,7 +1353,6 @@ subroutine psb_d_csc_arwsum(d,a)
end if
d = dzero
do i=1, m
do j=a%icp(i),a%icp(i+1)-1
k = a%ia(j)
@ -1343,6 +1360,12 @@ subroutine psb_d_csc_arwsum(d,a)
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
call psb_erractionrestore(err_act)
return

@ -1397,6 +1397,12 @@ subroutine psb_d_csr_rowsum(d,a)
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
call psb_erractionrestore(err_act)
@ -1446,6 +1452,12 @@ subroutine psb_d_csr_arwsum(d,a)
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
call psb_erractionrestore(err_act)
return
@ -1496,6 +1508,12 @@ subroutine psb_d_csr_colsum(d,a)
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
call psb_erractionrestore(err_act)
@ -1547,6 +1565,12 @@ subroutine psb_d_csr_aclsum(d,a)
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
call psb_erractionrestore(err_act)

@ -1788,6 +1788,12 @@ subroutine psb_s_coo_rowsum(d,a)
d(i) = d(i) + a%val(j)
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
call psb_erractionrestore(err_act)
return
@ -1836,6 +1842,12 @@ subroutine psb_s_coo_arwsum(d,a)
d(i) = d(i) + abs(a%val(j))
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
call psb_erractionrestore(err_act)
return
@ -1883,6 +1895,12 @@ subroutine psb_s_coo_colsum(d,a)
k = a%ja(j)
d(k) = d(k) + a%val(j)
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
call psb_erractionrestore(err_act)
@ -1931,6 +1949,12 @@ subroutine psb_s_coo_aclsum(d,a)
k = a%ja(j)
d(k) = d(k) + abs(a%val(j))
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
call psb_erractionrestore(err_act)

@ -1192,6 +1192,12 @@ subroutine psb_s_csc_colsum(d,a)
d(i) = d(i) + (a%val(j))
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
call psb_erractionrestore(err_act)
@ -1241,6 +1247,12 @@ subroutine psb_s_csc_aclsum(d,a)
d(i) = d(i) + abs(a%val(j))
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)
return
@ -1292,6 +1304,12 @@ subroutine psb_s_csc_rowsum(d,a)
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
call psb_erractionrestore(err_act)
return
@ -1335,7 +1353,6 @@ subroutine psb_s_csc_arwsum(d,a)
end if
d = szero
do i=1, m
do j=a%icp(i),a%icp(i+1)-1
k = a%ia(j)
@ -1343,6 +1360,12 @@ subroutine psb_s_csc_arwsum(d,a)
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
call psb_erractionrestore(err_act)
return

@ -1397,6 +1397,12 @@ subroutine psb_s_csr_rowsum(d,a)
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
call psb_erractionrestore(err_act)
@ -1446,6 +1452,12 @@ subroutine psb_s_csr_arwsum(d,a)
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
call psb_erractionrestore(err_act)
return
@ -1496,6 +1508,12 @@ subroutine psb_s_csr_colsum(d,a)
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
call psb_erractionrestore(err_act)
@ -1547,6 +1565,12 @@ subroutine psb_s_csr_aclsum(d,a)
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
call psb_erractionrestore(err_act)

@ -1788,6 +1788,12 @@ subroutine psb_z_coo_rowsum(d,a)
d(i) = d(i) + a%val(j)
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
call psb_erractionrestore(err_act)
return
@ -1836,6 +1842,12 @@ subroutine psb_z_coo_arwsum(d,a)
d(i) = d(i) + abs(a%val(j))
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
call psb_erractionrestore(err_act)
return
@ -1883,6 +1895,12 @@ subroutine psb_z_coo_colsum(d,a)
k = a%ja(j)
d(k) = d(k) + a%val(j)
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
call psb_erractionrestore(err_act)
@ -1931,6 +1949,12 @@ subroutine psb_z_coo_aclsum(d,a)
k = a%ja(j)
d(k) = d(k) + abs(a%val(j))
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
call psb_erractionrestore(err_act)

@ -1192,6 +1192,12 @@ subroutine psb_z_csc_colsum(d,a)
d(i) = d(i) + (a%val(j))
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
call psb_erractionrestore(err_act)
@ -1241,6 +1247,12 @@ subroutine psb_z_csc_aclsum(d,a)
d(i) = d(i) + abs(a%val(j))
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)
return
@ -1292,6 +1304,12 @@ subroutine psb_z_csc_rowsum(d,a)
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
call psb_erractionrestore(err_act)
return
@ -1335,7 +1353,6 @@ subroutine psb_z_csc_arwsum(d,a)
end if
d = dzero
do i=1, m
do j=a%icp(i),a%icp(i+1)-1
k = a%ia(j)
@ -1343,6 +1360,12 @@ subroutine psb_z_csc_arwsum(d,a)
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
call psb_erractionrestore(err_act)
return

@ -1397,6 +1397,12 @@ subroutine psb_z_csr_rowsum(d,a)
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
call psb_erractionrestore(err_act)
@ -1446,6 +1452,12 @@ subroutine psb_z_csr_arwsum(d,a)
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
call psb_erractionrestore(err_act)
return
@ -1496,6 +1508,12 @@ subroutine psb_z_csr_colsum(d,a)
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
call psb_erractionrestore(err_act)
@ -1547,6 +1565,12 @@ subroutine psb_z_csr_aclsum(d,a)
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
call psb_erractionrestore(err_act)

Loading…
Cancel
Save