mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 22:55:12 +00:00
Ensure proper allocation for work vectors in SOC1 and 2.
Cleanup references from aggrmat.
This commit is contained in:
@@ -88,7 +88,7 @@ subroutine mld_c_soc1_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
& ideg(:), idxs(:)
|
||||
integer(psb_lpk_), allocatable :: tmpaggr(:)
|
||||
complex(psb_spk_), allocatable :: val(:), diag(:)
|
||||
integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m, nz, ilg, ii, ip
|
||||
integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, nc, naggr,i,j,m, nz, ilg, ii, ip
|
||||
type(psb_c_csr_sparse_mat) :: acsr
|
||||
real(psb_spk_) :: cpling, tcl
|
||||
logical :: disjoint
|
||||
@@ -112,8 +112,9 @@ subroutine mld_c_soc1_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
ncol = desc_a%get_local_cols()
|
||||
|
||||
nr = a%get_nrows()
|
||||
nc = a%get_ncols()
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),&
|
||||
& icol(nr),val(nr),stat=info)
|
||||
& icol(nc),val(nc),stat=info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_alloc_request_
|
||||
call psb_errpush(info,name,i_err=(/2*nr,izero,izero,izero,izero/),&
|
||||
|
||||
@@ -113,7 +113,7 @@ subroutine mld_c_soc2_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
|
||||
nr = a%get_nrows()
|
||||
nc = a%get_ncols()
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),icol(nr),stat=info)
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),icol(nc),stat=info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_alloc_request_
|
||||
call psb_errpush(info,name,i_err=(/2*nr,izero,izero,izero,izero/),&
|
||||
|
||||
@@ -65,14 +65,7 @@
|
||||
! specified by the user through mld_cprecinit and mld_zprecset.
|
||||
! On output from this routine the entries of AC, op_prol, op_restr
|
||||
! are still in "global numbering" mode; this is fixed in the calling routine
|
||||
! mld_c_lev_aggrmat_asb.
|
||||
!
|
||||
! For more details see
|
||||
! M. Brezina and P. Vanek, A black-box iterative solver based on a
|
||||
! two-level Schwarz method, Computing, 63 (1999), 233-263.
|
||||
! P. D'Ambra, D. di Serafino and S. Filippone, On the development of
|
||||
! PSBLAS-based parallel two-level Schwarz preconditioners, Appl. Num. Math.
|
||||
! 57 (2007), 1181-1196.
|
||||
! aggregator%mat_asb.
|
||||
!
|
||||
!
|
||||
! Arguments:
|
||||
|
||||
@@ -88,7 +88,7 @@ subroutine mld_d_soc1_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
& ideg(:), idxs(:)
|
||||
integer(psb_lpk_), allocatable :: tmpaggr(:)
|
||||
real(psb_dpk_), allocatable :: val(:), diag(:)
|
||||
integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m, nz, ilg, ii, ip
|
||||
integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, nc, naggr,i,j,m, nz, ilg, ii, ip
|
||||
type(psb_d_csr_sparse_mat) :: acsr
|
||||
real(psb_dpk_) :: cpling, tcl
|
||||
logical :: disjoint
|
||||
@@ -112,8 +112,9 @@ subroutine mld_d_soc1_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
ncol = desc_a%get_local_cols()
|
||||
|
||||
nr = a%get_nrows()
|
||||
nc = a%get_ncols()
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),&
|
||||
& icol(nr),val(nr),stat=info)
|
||||
& icol(nc),val(nc),stat=info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_alloc_request_
|
||||
call psb_errpush(info,name,i_err=(/2*nr,izero,izero,izero,izero/),&
|
||||
|
||||
@@ -113,7 +113,7 @@ subroutine mld_d_soc2_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
|
||||
nr = a%get_nrows()
|
||||
nc = a%get_ncols()
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),icol(nr),stat=info)
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),icol(nc),stat=info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_alloc_request_
|
||||
call psb_errpush(info,name,i_err=(/2*nr,izero,izero,izero,izero/),&
|
||||
|
||||
@@ -65,14 +65,7 @@
|
||||
! specified by the user through mld_dprecinit and mld_zprecset.
|
||||
! On output from this routine the entries of AC, op_prol, op_restr
|
||||
! are still in "global numbering" mode; this is fixed in the calling routine
|
||||
! mld_d_lev_aggrmat_asb.
|
||||
!
|
||||
! For more details see
|
||||
! M. Brezina and P. Vanek, A black-box iterative solver based on a
|
||||
! two-level Schwarz method, Computing, 63 (1999), 233-263.
|
||||
! P. D'Ambra, D. di Serafino and S. Filippone, On the development of
|
||||
! PSBLAS-based parallel two-level Schwarz preconditioners, Appl. Num. Math.
|
||||
! 57 (2007), 1181-1196.
|
||||
! aggregator%mat_asb.
|
||||
!
|
||||
!
|
||||
! Arguments:
|
||||
|
||||
@@ -88,7 +88,7 @@ subroutine mld_s_soc1_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
& ideg(:), idxs(:)
|
||||
integer(psb_lpk_), allocatable :: tmpaggr(:)
|
||||
real(psb_spk_), allocatable :: val(:), diag(:)
|
||||
integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m, nz, ilg, ii, ip
|
||||
integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, nc, naggr,i,j,m, nz, ilg, ii, ip
|
||||
type(psb_s_csr_sparse_mat) :: acsr
|
||||
real(psb_spk_) :: cpling, tcl
|
||||
logical :: disjoint
|
||||
@@ -112,8 +112,9 @@ subroutine mld_s_soc1_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
ncol = desc_a%get_local_cols()
|
||||
|
||||
nr = a%get_nrows()
|
||||
nc = a%get_ncols()
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),&
|
||||
& icol(nr),val(nr),stat=info)
|
||||
& icol(nc),val(nc),stat=info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_alloc_request_
|
||||
call psb_errpush(info,name,i_err=(/2*nr,izero,izero,izero,izero/),&
|
||||
|
||||
@@ -113,7 +113,7 @@ subroutine mld_s_soc2_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
|
||||
nr = a%get_nrows()
|
||||
nc = a%get_ncols()
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),icol(nr),stat=info)
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),icol(nc),stat=info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_alloc_request_
|
||||
call psb_errpush(info,name,i_err=(/2*nr,izero,izero,izero,izero/),&
|
||||
|
||||
@@ -65,14 +65,7 @@
|
||||
! specified by the user through mld_sprecinit and mld_zprecset.
|
||||
! On output from this routine the entries of AC, op_prol, op_restr
|
||||
! are still in "global numbering" mode; this is fixed in the calling routine
|
||||
! mld_s_lev_aggrmat_asb.
|
||||
!
|
||||
! For more details see
|
||||
! M. Brezina and P. Vanek, A black-box iterative solver based on a
|
||||
! two-level Schwarz method, Computing, 63 (1999), 233-263.
|
||||
! P. D'Ambra, D. di Serafino and S. Filippone, On the development of
|
||||
! PSBLAS-based parallel two-level Schwarz preconditioners, Appl. Num. Math.
|
||||
! 57 (2007), 1181-1196.
|
||||
! aggregator%mat_asb.
|
||||
!
|
||||
!
|
||||
! Arguments:
|
||||
|
||||
@@ -88,7 +88,7 @@ subroutine mld_z_soc1_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
& ideg(:), idxs(:)
|
||||
integer(psb_lpk_), allocatable :: tmpaggr(:)
|
||||
complex(psb_dpk_), allocatable :: val(:), diag(:)
|
||||
integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m, nz, ilg, ii, ip
|
||||
integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, nc, naggr,i,j,m, nz, ilg, ii, ip
|
||||
type(psb_z_csr_sparse_mat) :: acsr
|
||||
real(psb_dpk_) :: cpling, tcl
|
||||
logical :: disjoint
|
||||
@@ -112,8 +112,9 @@ subroutine mld_z_soc1_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
ncol = desc_a%get_local_cols()
|
||||
|
||||
nr = a%get_nrows()
|
||||
nc = a%get_ncols()
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),&
|
||||
& icol(nr),val(nr),stat=info)
|
||||
& icol(nc),val(nc),stat=info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_alloc_request_
|
||||
call psb_errpush(info,name,i_err=(/2*nr,izero,izero,izero,izero/),&
|
||||
|
||||
@@ -113,7 +113,7 @@ subroutine mld_z_soc2_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info)
|
||||
|
||||
nr = a%get_nrows()
|
||||
nc = a%get_ncols()
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),icol(nr),stat=info)
|
||||
allocate(ilaggr(nr),neigh(nr),ideg(nr),idxs(nr),icol(nc),stat=info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_alloc_request_
|
||||
call psb_errpush(info,name,i_err=(/2*nr,izero,izero,izero,izero/),&
|
||||
|
||||
@@ -65,14 +65,7 @@
|
||||
! specified by the user through mld_zprecinit and mld_zprecset.
|
||||
! On output from this routine the entries of AC, op_prol, op_restr
|
||||
! are still in "global numbering" mode; this is fixed in the calling routine
|
||||
! mld_z_lev_aggrmat_asb.
|
||||
!
|
||||
! For more details see
|
||||
! M. Brezina and P. Vanek, A black-box iterative solver based on a
|
||||
! two-level Schwarz method, Computing, 63 (1999), 233-263.
|
||||
! P. D'Ambra, D. di Serafino and S. Filippone, On the development of
|
||||
! PSBLAS-based parallel two-level Schwarz preconditioners, Appl. Num. Math.
|
||||
! 57 (2007), 1181-1196.
|
||||
! aggregator%mat_asb.
|
||||
!
|
||||
!
|
||||
! Arguments:
|
||||
|
||||
@@ -60,7 +60,8 @@
|
||||
type(psb_d_coo_sparse_mat), target :: acoo
|
||||
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota, nglob, nglobrec, nzt, npr, npc
|
||||
integer(psb_ipk_) :: ifrst, ibcheck
|
||||
integer(psb_ipk_) :: ictxt, ictxt1, icomm, np, iam, me, i, err_act, debug_unit, debug_level
|
||||
integer(psb_ipk_) :: ictxt, ictxt1, icomm, np, iam, me, i, &
|
||||
& err_act, debug_unit, debug_level
|
||||
character(len=20) :: name='d_mumps_solver_bld', ch_err
|
||||
|
||||
#if defined(HAVE_MUMPS_) && !defined(LPK8)
|
||||
|
||||
Reference in New Issue
Block a user