base/modules/psb_base_mat_mod.f03
 base/modules/psb_d_base_mat_mod.f03
 base/modules/psb_d_mat_mod.f03
 base/serial/f03/psb_c_coo_impl.f03
 base/serial/f03/psb_c_csr_impl.f03
 base/serial/f03/psb_d_coo_impl.f03
 base/serial/f03/psb_d_csr_impl.f03
 base/serial/f03/psb_s_coo_impl.f03
 base/serial/f03/psb_s_csr_impl.f03
 base/serial/f03/psb_z_coo_impl.f03
 base/serial/f03/psb_z_csr_impl.f03

Fxed stupid bug in initalization of NZ in getrow & friends.
psblas3-type-indexed
Salvatore Filippone 15 years ago
parent fdd9158f1c
commit b74413cd69

@ -483,7 +483,10 @@ contains
a%unitd = b%unitd
a%upper = b%upper
a%sorted = b%sorted
a%aux = b%aux
if (allocated(b%aux)) then
allocate(a%aux(size(b%aux)))
a%aux(:) = b%aux(:)
end if
return
end subroutine base_cp_from
@ -507,7 +510,10 @@ contains
a%unitd = b%unitd
a%upper = .not.b%upper
a%sorted = .false.
a%aux = b%aux
if (allocated(b%aux)) then
allocate(a%aux(size(b%aux)))
a%aux(:) = b%aux(:)
end if
return

@ -762,11 +762,9 @@ contains
nb = a%get_ncols() ! Should this be jmax_ ??
endif
call b%allocate(mb,nb)
call a%csget(imin_,imax_,nzout,b%ia,b%ja,b%val,info,&
& jmin=jmin_, jmax=jmax_, append=.false., &
& nzin=nzin, rscale=rscale_, cscale=cscale_)
if (info /= 0) goto 9999
call b%set_nzeros(nzin+nzout)

@ -1332,7 +1332,6 @@ contains
Integer :: err_act
character(len=20) :: name='csclip'
logical, parameter :: debug=.false.
type(psb_d_coo_sparse_mat), allocatable :: acoo
info = 0
call psb_erractionsave(err_act)
@ -1341,9 +1340,8 @@ contains
call psb_errpush(info,name)
goto 9999
endif
allocate(acoo,stat=info)
if (info == 0) call a%a%csclip(b,info,&
write(0,*) 'b_csclip :',a%get_fmt()
call a%a%csclip(b,info,&
& imin,imax,jmin,jmax,rscale,cscale)
if (info /= 0) goto 9999

@ -1150,7 +1150,10 @@ subroutine c_coo_csgetptn_impl(imin,imax,a,nz,ia,ja,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append
@ -1422,7 +1425,10 @@ subroutine c_coo_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append

@ -1279,7 +1279,10 @@ subroutine c_csr_csgetptn_impl(imin,imax,a,nz,ia,ja,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append
@ -1452,7 +1455,10 @@ subroutine c_csr_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append

@ -950,7 +950,10 @@ subroutine d_coo_csgetptn_impl(imin,imax,a,nz,ia,ja,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append
@ -1222,7 +1225,10 @@ subroutine d_coo_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append

@ -809,7 +809,7 @@ subroutine d_csr_cssm_impl(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), allocatable :: tmp(:,:)
logical :: tra
Integer :: err_act
character(len=20) :: name='d_base_cssm'
character(len=20) :: name='d_csr_cssm'
logical, parameter :: debug=.false.
info = 0
@ -1087,7 +1087,10 @@ subroutine d_csr_csgetptn_impl(imin,imax,a,nz,ia,ja,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append
@ -1163,7 +1166,7 @@ contains
integer, optional :: iren(:)
integer :: nzin_, nza, idx,i,j,k, nzt, irw, lrw
integer :: debug_level, debug_unit
character(len=20) :: name='coo_getrow'
character(len=20) :: name='csr_getptn'
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
@ -1248,7 +1251,7 @@ subroutine d_csr_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
call psb_erractionsave(err_act)
info = 0
if (present(jmin)) then
jmin_ = jmin
else
@ -1260,7 +1263,10 @@ subroutine d_csr_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append

@ -948,7 +948,10 @@ subroutine s_coo_csgetptn_impl(imin,imax,a,nz,ia,ja,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
appens_=append
@ -1220,7 +1223,10 @@ subroutine s_coo_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
appens_=append

@ -1098,7 +1098,10 @@ subroutine s_csr_csgetptn_impl(imin,imax,a,nz,ia,ja,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
appens_=append
@ -1271,7 +1274,10 @@ subroutine s_csr_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
appens_=append

@ -1150,7 +1150,10 @@ subroutine z_coo_csgetptn_impl(imin,imax,a,nz,ia,ja,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append
@ -1422,7 +1425,10 @@ subroutine z_coo_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append

@ -1279,7 +1279,10 @@ subroutine z_csr_csgetptn_impl(imin,imax,a,nz,ia,ja,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append
@ -1452,7 +1455,10 @@ subroutine z_csr_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
jmax_ = a%get_ncols()
endif
if ((imax<imin).or.(jmax_<jmin_)) return
if ((imax<imin).or.(jmax_<jmin_)) then
nz = 0
return
end if
if (present(append)) then
append_=append

Loading…
Cancel
Save