diff --git a/base/modules/psb_base_mat_mod.f03 b/base/modules/psb_base_mat_mod.f03 index 2af96e56..77db65e9 100644 --- a/base/modules/psb_base_mat_mod.f03 +++ b/base/modules/psb_base_mat_mod.f03 @@ -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 diff --git a/base/modules/psb_d_base_mat_mod.f03 b/base/modules/psb_d_base_mat_mod.f03 index 7c1fefe0..de3190d5 100644 --- a/base/modules/psb_d_base_mat_mod.f03 +++ b/base/modules/psb_d_base_mat_mod.f03 @@ -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) diff --git a/base/modules/psb_d_mat_mod.f03 b/base/modules/psb_d_mat_mod.f03 index c50b94ef..d58f0a57 100644 --- a/base/modules/psb_d_mat_mod.f03 +++ b/base/modules/psb_d_mat_mod.f03 @@ -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 diff --git a/base/serial/f03/psb_c_coo_impl.f03 b/base/serial/f03/psb_c_coo_impl.f03 index 51204b29..726d6381 100644 --- a/base/serial/f03/psb_c_coo_impl.f03 +++ b/base/serial/f03/psb_c_coo_impl.f03 @@ -1150,7 +1150,10 @@ subroutine c_coo_csgetptn_impl(imin,imax,a,nz,ia,ja,info,& jmax_ = a%get_ncols() endif - if ((imax