From a615f387b8885404a23e9493e96e7e6ecd9f9886 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 21 Jul 2006 13:58:33 +0000 Subject: [PATCH] Trim L and U factors size after computing them. --- src/prec/psb_dilu_bld.f90 | 13 ++++++++++++- src/prec/psb_zilu_bld.f90 | 11 +++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/prec/psb_dilu_bld.f90 b/src/prec/psb_dilu_bld.f90 index a623e636..4c8fa041 100644 --- a/src/prec/psb_dilu_bld.f90 +++ b/src/prec/psb_dilu_bld.f90 @@ -78,7 +78,7 @@ subroutine psb_dilu_bld(a,desc_a,p,upd,info) external mpi_wtime logical, parameter :: debugprt=.false., debug=.false., aggr_dump=.false. integer nztota, nztotb, nztmp, nzl, nnr, ir, err_act,& - & n_row, nrow_a,n_col, nhalo, ind, iind + & n_row, nrow_a,n_col, nhalo, ind, iind, i1,i2,ia integer :: ictxt,np,me character(len=20) :: name, ch_err @@ -354,6 +354,17 @@ subroutine psb_dilu_bld(a,desc_a,p,upd,info) goto 9999 end if + if (psb_sp_getifld(psb_upd_,p%av(u_pr_),info) /= psb_upd_perm_) then + call psb_sp_trimsize(p%av(u_pr_),i1,i2,ia,info) + if (info == 0) call psb_sp_reall(p%av(u_pr_),i1,i2,ia,info) + endif + + if (psb_sp_getifld(psb_upd_,p%av(l_pr_),info) /= psb_upd_perm_) then + call psb_sp_trimsize(p%av(l_pr_),i1,i2,ia,info) + if (info == 0) call psb_sp_reall(p%av(l_pr_),i1,i2,ia,info) + endif + + if (debug) write(0,*) me,'End of ilu_bld' call psb_erractionrestore(err_act) diff --git a/src/prec/psb_zilu_bld.f90 b/src/prec/psb_zilu_bld.f90 index 3c9aaa1c..ced53e24 100644 --- a/src/prec/psb_zilu_bld.f90 +++ b/src/prec/psb_zilu_bld.f90 @@ -354,6 +354,17 @@ subroutine psb_zilu_bld(a,desc_a,p,upd,info) goto 9999 end if + if (psb_sp_getifld(psb_upd_,p%av(u_pr_),info) /= psb_upd_perm_) then + call psb_sp_trimsize(p%av(u_pr_),i1,i2,ia,info) + if (info == 0) call psb_sp_reall(p%av(u_pr_),i1,i2,ia,info) + endif + + if (psb_sp_getifld(psb_upd_,p%av(l_pr_),info) /= psb_upd_perm_) then + call psb_sp_trimsize(p%av(l_pr_),i1,i2,ia,info) + if (info == 0) call psb_sp_reall(p%av(l_pr_),i1,i2,ia,info) + endif + + if (debug) write(0,*) me,'End of ilu_bld' call psb_erractionrestore(err_act)