Adjust strategy for stopping on aggregation ratio

merge-maint-par
sfilippone 2 months ago
parent 693eab66cb
commit 01cc7ada88

@ -366,15 +366,11 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info,cpymat)
if (i>2) then if (i>2) then
if (sizeratio < mnaggratio) then if (sizeratio < mnaggratio) then
if (sizeratio > 1) then
newsz = i
else
! !
! We are not gaining ! We are not gaining
! !
newsz = i-1 newsz = i-1
end if end if
end if
if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then
newsz=i-1 newsz=i-1

@ -366,15 +366,11 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info,cpymat)
if (i>2) then if (i>2) then
if (sizeratio < mnaggratio) then if (sizeratio < mnaggratio) then
if (sizeratio > 1) then
newsz = i
else
! !
! We are not gaining ! We are not gaining
! !
newsz = i-1 newsz = i-1
end if end if
end if
if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then
newsz=i-1 newsz=i-1
@ -434,7 +430,6 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info,cpymat)
& ilaggr,nlaggr,op_prol,info) & ilaggr,nlaggr,op_prol,info)
if (do_timings) call psb_toc(idx_matasb) if (do_timings) call psb_toc(idx_matasb)
end if end if
if (info /= psb_success_) then if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Mat asb fail @ level ',i write(ch_err,'(a,i7)') 'Mat asb fail @ level ',i
call psb_errpush(psb_err_internal_error_,name,& call psb_errpush(psb_err_internal_error_,name,&

@ -366,15 +366,11 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info,cpymat)
if (i>2) then if (i>2) then
if (sizeratio < mnaggratio) then if (sizeratio < mnaggratio) then
if (sizeratio > 1) then
newsz = i
else
! !
! We are not gaining ! We are not gaining
! !
newsz = i-1 newsz = i-1
end if end if
end if
if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then
newsz=i-1 newsz=i-1

@ -366,15 +366,11 @@ subroutine amg_z_hierarchy_bld(a,desc_a,prec,info,cpymat)
if (i>2) then if (i>2) then
if (sizeratio < mnaggratio) then if (sizeratio < mnaggratio) then
if (sizeratio > 1) then
newsz = i
else
! !
! We are not gaining ! We are not gaining
! !
newsz = i-1 newsz = i-1
end if end if
end if
if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then
newsz=i-1 newsz=i-1

Loading…
Cancel
Save