mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-07 15:15:07 +00:00
Compare commits
48
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbed340405 | ||
|
|
e02df3725e | ||
|
|
ac42d7b1dd | ||
|
|
697f325df6 | ||
|
|
58d00b16c6 | ||
|
|
425743939c | ||
|
|
7e48a0a742 | ||
|
|
4f9254ebb0 | ||
|
|
90657b706f | ||
|
|
23a39a6c54 | ||
|
|
873f190961 | ||
|
|
87cdd76f8d | ||
|
|
45fabb5214 | ||
|
|
a9182021bb | ||
|
|
a8f4009cb1 | ||
|
|
794080e386 | ||
|
|
818f7a78a0 | ||
|
|
939d7c9a89 | ||
|
|
92f7cde375 | ||
|
|
af178daa84 | ||
|
|
49777a379b | ||
|
|
5768238f66 | ||
|
|
4c4b2b282e | ||
|
|
9d11a99ed4 | ||
|
|
9bc8b540b3 | ||
|
|
af75364c54 | ||
|
|
1270498170 | ||
|
|
51a9d16975 | ||
|
|
a04f7b4cf0 | ||
|
|
b387308455 | ||
|
|
aba9b29717 | ||
|
|
94ca610bff | ||
|
|
0332920a63 | ||
|
|
5909e541b0 | ||
|
|
39a9c4e4ed | ||
|
|
41b4373494 | ||
|
|
e3d14dfb9e | ||
|
|
a3a1dc52c5 | ||
|
|
12fc3ddc3d | ||
|
|
b060787911 | ||
|
|
e1e1da18c6 | ||
|
|
f65e1ddaa1 | ||
|
|
636600f1c7 | ||
|
|
09c72e8eed | ||
|
|
257bf46e3b | ||
|
|
c23c4e2729 | ||
|
|
27fafcd579 | ||
|
|
75d09c6349 |
@@ -81,10 +81,10 @@ module amg_base_prec_type
|
||||
!
|
||||
! Version numbers
|
||||
!
|
||||
character(len=*), parameter :: amg_version_string_ = "1.0.0"
|
||||
character(len=*), parameter :: amg_version_string_ = "1.0.1"
|
||||
integer(psb_ipk_), parameter :: amg_version_major_ = 1
|
||||
integer(psb_ipk_), parameter :: amg_version_minor_ = 0
|
||||
integer(psb_ipk_), parameter :: amg_patchlevel_ = 0
|
||||
integer(psb_ipk_), parameter :: amg_patchlevel_ = 1
|
||||
|
||||
type amg_ml_parms
|
||||
integer(psb_ipk_) :: sweeps_pre, sweeps_post
|
||||
|
||||
+32
-335
@@ -68,7 +68,7 @@
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
module dmatchboxp_mod
|
||||
module amg_d_matchboxp_mod
|
||||
|
||||
use iso_c_binding
|
||||
use psb_base_cbind_mod
|
||||
@@ -94,34 +94,25 @@ module dmatchboxp_mod
|
||||
end subroutine dMatchBoxPC
|
||||
end interface MatchBoxPC
|
||||
|
||||
interface i_aggr_assign
|
||||
module procedure i_daggr_assign
|
||||
end interface i_aggr_assign
|
||||
interface amg_i_aggr_assign
|
||||
module procedure amg_i_d_aggr_assign
|
||||
end interface amg_i_aggr_assign
|
||||
|
||||
interface build_matching
|
||||
module procedure dbuild_matching
|
||||
end interface build_matching
|
||||
interface amg_par_build_matching
|
||||
module procedure amg_d_par_build_matching
|
||||
end interface amg_par_build_matching
|
||||
|
||||
interface build_ahat
|
||||
module procedure dbuild_ahat
|
||||
end interface build_ahat
|
||||
interface amg_par_build_ahat
|
||||
module procedure amg_d_par_build_ahat
|
||||
end interface amg_par_build_ahat
|
||||
|
||||
interface psb_gtranspose
|
||||
module procedure psb_dgtranspose
|
||||
end interface psb_gtranspose
|
||||
interface amg_PMatchBox
|
||||
module procedure amg_d_PMatchBox
|
||||
end interface amg_PMatchBox
|
||||
|
||||
interface psb_htranspose
|
||||
module procedure psb_dhtranspose
|
||||
end interface psb_htranspose
|
||||
|
||||
interface PMatchBox
|
||||
module procedure dPMatchBox
|
||||
end interface PMatchBox
|
||||
|
||||
logical, parameter, private :: print_statistics=.false.
|
||||
contains
|
||||
|
||||
subroutine dmatchboxp_build_prol(w,a,desc_a,ilaggr,nlaggr,prol,info,&
|
||||
subroutine amg_d_matchboxp_build_prol(w,a,desc_a,ilaggr,nlaggr,prol,info,&
|
||||
& symmetrize,reproducible,display_inp, display_out, print_out)
|
||||
use psb_base_mod
|
||||
use psb_util_mod
|
||||
@@ -214,7 +205,7 @@ contains
|
||||
end if
|
||||
if (do_timings) call psb_toc(idx_phase1)
|
||||
if (do_timings) call psb_tic(idx_bldmtc)
|
||||
call build_matching(w,a,desc_a,mate,info,display_inp=display_inp,symmetrize=symmetrize)
|
||||
call amg_par_build_matching(w,a,desc_a,mate,info,display_inp=display_inp,symmetrize=symmetrize)
|
||||
if (do_timings) call psb_toc(idx_bldmtc)
|
||||
if (debug) write(0,*) iam,' buildprol from buildmatching:',&
|
||||
& info
|
||||
@@ -312,7 +303,7 @@ contains
|
||||
! Should be a symmetric function.
|
||||
!
|
||||
call desc_a%indxmap%qry_halo_owner(idx,iown,info)
|
||||
ip = i_aggr_assign(iam, iown, kg, idxg, wk, widx, nrmagg)
|
||||
ip = amg_i_aggr_assign(iam, iown, kg, idxg, wk, widx, nrmagg)
|
||||
if (iam == ip) then
|
||||
nlaggr(iam) = nlaggr(iam) + 1
|
||||
ilaggr(k) = nlaggr(iam)
|
||||
@@ -422,13 +413,11 @@ contains
|
||||
nlpairs = v(3)
|
||||
|
||||
end block
|
||||
if (print_statistics) then
|
||||
if (iam == 0) then
|
||||
write(0,*) 'Matching statistics: Unmatched nodes ',&
|
||||
& nunmatched,' Singletons:',nlsingl,' Pairs:',nlpairs
|
||||
end if
|
||||
if (iam == 0) then
|
||||
write(0,*) 'Matching statistics: Unmatched nodes ',&
|
||||
& nunmatched,' Singletons:',nlsingl,' Pairs:',nlpairs
|
||||
end if
|
||||
|
||||
|
||||
if (display_out_) then
|
||||
block
|
||||
integer(psb_ipk_) :: idx
|
||||
@@ -516,9 +505,9 @@ contains
|
||||
write(0,*) iam,' : error from Matching: ',info
|
||||
end if
|
||||
|
||||
end subroutine dmatchboxp_build_prol
|
||||
end subroutine amg_d_matchboxp_build_prol
|
||||
|
||||
function i_daggr_assign(iam, iown, kg, idxg, wk, widx, nrmagg) &
|
||||
function amg_i_d_aggr_assign(iam, iown, kg, idxg, wk, widx, nrmagg) &
|
||||
& result(iproc)
|
||||
!
|
||||
! How to break ties? This
|
||||
@@ -560,10 +549,10 @@ contains
|
||||
iproc = iown
|
||||
end if
|
||||
end if
|
||||
end function i_daggr_assign
|
||||
end function amg_i_d_aggr_assign
|
||||
|
||||
|
||||
subroutine dbuild_matching(w,a,desc_a,mate,info,display_inp, symmetrize)
|
||||
subroutine amg_d_par_build_matching(w,a,desc_a,mate,info,display_inp, symmetrize)
|
||||
use psb_base_mod
|
||||
use psb_util_mod
|
||||
use iso_c_binding
|
||||
@@ -612,7 +601,7 @@ contains
|
||||
if (iam == 0) write(0,*)' Into build_ahat:'
|
||||
end if
|
||||
if (do_timings) call psb_tic(idx_bldahat)
|
||||
call build_ahat(w,a,ahatnd,desc_a,info,symmetrize=symmetrize)
|
||||
call amg_par_build_ahat(w,a,ahatnd,desc_a,info,symmetrize=symmetrize)
|
||||
if (do_timings) call psb_toc(idx_bldahat)
|
||||
if (info /= 0) then
|
||||
write(0,*) 'Error from build_ahat ', info
|
||||
@@ -703,7 +692,7 @@ contains
|
||||
!
|
||||
if (debug) write(0,*) iam,' buildmatching into PMatchBox:'
|
||||
if (do_timings) call psb_tic(idx_cmboxp)
|
||||
call PMatchBox(nr,nz,vlptr,vlind,ewght,&
|
||||
call amg_PMatchBox(nr,nz,vlptr,vlind,ewght,&
|
||||
& vnl, mate, iam, np,ictxt,&
|
||||
& msgis,msgas,msgprc,ph0t,ph1t,ph2t,ph1crd,ph2crd,info,display_inp)
|
||||
if (do_timings) call psb_toc(idx_cmboxp)
|
||||
@@ -767,9 +756,9 @@ contains
|
||||
val(1:n) = tmp(1:n)
|
||||
end subroutine fix_order
|
||||
|
||||
end subroutine dbuild_matching
|
||||
end subroutine amg_d_par_build_matching
|
||||
|
||||
subroutine dbuild_ahat(w,a,ahat,desc_a,info,symmetrize)
|
||||
subroutine amg_d_par_build_ahat(w,a,ahat,desc_a,info,symmetrize)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
real(psb_dpk_), intent(in) :: w(:)
|
||||
@@ -1005,301 +994,9 @@ contains
|
||||
end block
|
||||
end if
|
||||
|
||||
end subroutine dbuild_ahat
|
||||
end subroutine amg_d_par_build_ahat
|
||||
|
||||
subroutine psb_dgtranspose(ain,aout,desc_a,info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
type(psb_ldspmat_type), intent(in) :: ain
|
||||
type(psb_ldspmat_type), intent(out) :: aout
|
||||
type(psb_desc_type) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
!
|
||||
! BEWARE: This routine works under the assumption
|
||||
! that the same DESC_A works for both A and A^T, which
|
||||
! essentially means that A has a symmetric pattern.
|
||||
!
|
||||
type(psb_ldspmat_type) :: atmp, ahalo, aglb
|
||||
type(psb_ld_coo_sparse_mat) :: tmpcoo
|
||||
type(psb_ld_csr_sparse_mat) :: tmpcsr
|
||||
type(psb_ctxt_type) :: ictxt
|
||||
integer(psb_ipk_) :: me, np
|
||||
integer(psb_lpk_) :: i, j, k, nrow, ncol
|
||||
integer(psb_lpk_), allocatable :: ilv(:)
|
||||
character(len=80) :: aname
|
||||
logical, parameter :: debug=.false., dump=.false., debug_sync=.false.
|
||||
|
||||
ictxt = desc_a%get_context()
|
||||
call psb_info(ictxt,me,np)
|
||||
|
||||
nrow = desc_a%get_local_rows()
|
||||
ncol = desc_a%get_local_cols()
|
||||
if (debug_sync) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'Start gtranspose '
|
||||
end if
|
||||
call ain%cscnv(tmpcsr,info)
|
||||
|
||||
if (debug) then
|
||||
ilv = [(i,i=1,ncol)]
|
||||
call desc_a%l2gip(ilv,info,owned=.false.)
|
||||
write(aname,'(a,i3.3,a)') 'atmp-preh-',me,'.mtx'
|
||||
call ain%print(fname=aname,head='atmp before haloTest ',iv=ilv)
|
||||
end if
|
||||
if (dump) then
|
||||
call ain%cscnv(atmp,info)
|
||||
call psb_gather(aglb,atmp,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'aglob-prehalo.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
!call psb_loc_to_glob(tmpcsr%ja,desc_a,info)
|
||||
call atmp%mv_from(tmpcsr)
|
||||
|
||||
if (debug) then
|
||||
write(aname,'(a,i3.3,a)') 'tmpcsr-',me,'.mtx'
|
||||
call atmp%print(fname=aname,head='tmpcsr ',iv=ilv)
|
||||
!call psb_set_debug_level(9999)
|
||||
end if
|
||||
|
||||
! FIXME THIS NEEDS REWORKING
|
||||
if (debug) write(0,*) me,' Gtranspose into sphalo :',atmp%get_nrows(),atmp%get_ncols()
|
||||
call psb_sphalo(atmp,desc_a,ahalo,info,rowscale=.true.)
|
||||
if (debug) write(0,*) me,' Gtranspose from sphalo :',ahalo%get_nrows(),ahalo%get_ncols()
|
||||
if (info == psb_success_) call psb_rwextd(ncol,atmp,info,b=ahalo)
|
||||
|
||||
if (debug) then
|
||||
write(aname,'(a,i3.3,a)') 'ahalo-',me,'.mtx'
|
||||
call ahalo%print(fname=aname,head='ahalo after haloTest ',iv=ilv)
|
||||
write(aname,'(a,i3.3,a)') 'atmp-h-',me,'.mtx'
|
||||
call atmp%print(fname=aname,head='atmp after haloTest ',iv=ilv)
|
||||
end if
|
||||
|
||||
if (info == psb_success_) call ahalo%free()
|
||||
|
||||
call atmp%cp_to(tmpcoo)
|
||||
call tmpcoo%transp()
|
||||
!call psb_glob_to_loc(tmpcoo%ia,desc_a,info,iact='I')
|
||||
if (debug) write(0,*) 'Before cleanup:',tmpcoo%get_nzeros()
|
||||
|
||||
j = 0
|
||||
do k=1, tmpcoo%get_nzeros()
|
||||
if ((tmpcoo%ia(k) > 0).and.(tmpcoo%ja(k)>0)) then
|
||||
j = j+1
|
||||
tmpcoo%ia(j) = tmpcoo%ia(k)
|
||||
tmpcoo%ja(j) = tmpcoo%ja(k)
|
||||
tmpcoo%val(j) = tmpcoo%val(k)
|
||||
end if
|
||||
end do
|
||||
call tmpcoo%set_nzeros(j)
|
||||
|
||||
if (debug) write(0,*) 'After cleanup:',tmpcoo%get_nzeros()
|
||||
|
||||
call ahalo%mv_from(tmpcoo)
|
||||
if (dump) then
|
||||
call psb_gather(aglb,ahalo,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'atran-preclip.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
|
||||
call ahalo%csclip(aout,info,imax=nrow)
|
||||
|
||||
if (debug) write(0,*) 'After clip:',aout%get_nzeros()
|
||||
|
||||
if (debug_sync) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'End gtranspose '
|
||||
end if
|
||||
!call aout%cscnv(info,type='csr')
|
||||
|
||||
if (dump) then
|
||||
write(aname,'(a,i3.3,a)') 'atran-',me,'.mtx'
|
||||
call aout%print(fname=aname,head='atrans ',iv=ilv)
|
||||
call psb_gather(aglb,aout,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'atran.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
end subroutine psb_dgtranspose
|
||||
|
||||
subroutine psb_dhtranspose(ain,aout,desc_a,info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
type(psb_ldspmat_type), intent(in) :: ain
|
||||
type(psb_ldspmat_type), intent(out) :: aout
|
||||
type(psb_desc_type) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
!
|
||||
! BEWARE: This routine works under the assumption
|
||||
! that the same DESC_A works for both A and A^T, which
|
||||
! essentially means that A has a symmetric pattern.
|
||||
!
|
||||
type(psb_ldspmat_type) :: atmp, ahalo, aglb
|
||||
type(psb_ld_coo_sparse_mat) :: tmpcoo, tmpc1, tmpc2, tmpch
|
||||
type(psb_ld_csr_sparse_mat) :: tmpcsr
|
||||
integer(psb_ipk_) :: nz1, nz2, nzh, nz
|
||||
type(psb_ctxt_type) :: ictxt
|
||||
integer(psb_ipk_) :: me, np
|
||||
integer(psb_lpk_) :: i, j, k, nrow, ncol, nlz
|
||||
integer(psb_lpk_), allocatable :: ilv(:)
|
||||
character(len=80) :: aname
|
||||
logical, parameter :: debug=.false., dump=.false., debug_sync=.false.
|
||||
|
||||
ictxt = desc_a%get_context()
|
||||
call psb_info(ictxt,me,np)
|
||||
|
||||
nrow = desc_a%get_local_rows()
|
||||
ncol = desc_a%get_local_cols()
|
||||
if (debug_sync) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'Start htranspose '
|
||||
end if
|
||||
call ain%cscnv(tmpcsr,info)
|
||||
|
||||
if (debug) then
|
||||
ilv = [(i,i=1,ncol)]
|
||||
call desc_a%l2gip(ilv,info,owned=.false.)
|
||||
write(aname,'(a,i3.3,a)') 'atmp-preh-',me,'.mtx'
|
||||
call ain%print(fname=aname,head='atmp before haloTest ',iv=ilv)
|
||||
end if
|
||||
if (dump) then
|
||||
call ain%cscnv(atmp,info)
|
||||
call psb_gather(aglb,atmp,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'aglob-prehalo.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
!call psb_loc_to_glob(tmpcsr%ja,desc_a,info)
|
||||
call atmp%mv_from(tmpcsr)
|
||||
|
||||
if (debug) then
|
||||
write(aname,'(a,i3.3,a)') 'tmpcsr-',me,'.mtx'
|
||||
call atmp%print(fname=aname,head='tmpcsr ',iv=ilv)
|
||||
!call psb_set_debug_level(9999)
|
||||
end if
|
||||
|
||||
! FIXME THIS NEEDS REWORKING
|
||||
if (debug) write(0,*) me,' Htranspose into sphalo :',atmp%get_nrows(),atmp%get_ncols()
|
||||
if (.true.) then
|
||||
call psb_sphalo(atmp,desc_a,ahalo,info, outfmt='coo ')
|
||||
call atmp%mv_to(tmpc1)
|
||||
call ahalo%mv_to(tmpch)
|
||||
nz1 = tmpc1%get_nzeros()
|
||||
call psb_loc_to_glob(tmpc1%ia(1:nz1),desc_a,info,iact='I')
|
||||
call psb_loc_to_glob(tmpc1%ja(1:nz1),desc_a,info,iact='I')
|
||||
nzh = tmpch%get_nzeros()
|
||||
call psb_loc_to_glob(tmpch%ia(1:nzh),desc_a,info,iact='I')
|
||||
call psb_loc_to_glob(tmpch%ja(1:nzh),desc_a,info,iact='I')
|
||||
nlz = nz1+nzh
|
||||
call tmpcoo%allocate(ncol,ncol,nlz)
|
||||
tmpcoo%ia(1:nz1) = tmpc1%ia(1:nz1)
|
||||
tmpcoo%ja(1:nz1) = tmpc1%ja(1:nz1)
|
||||
tmpcoo%val(1:nz1) = tmpc1%val(1:nz1)
|
||||
tmpcoo%ia(nz1+1:nz1+nzh) = tmpch%ia(1:nzh)
|
||||
tmpcoo%ja(nz1+1:nz1+nzh) = tmpch%ja(1:nzh)
|
||||
tmpcoo%val(nz1+1:nz1+nzh) = tmpch%val(1:nzh)
|
||||
call tmpcoo%set_nzeros(nlz)
|
||||
call tmpcoo%transp()
|
||||
nz = tmpcoo%get_nzeros()
|
||||
call psb_glob_to_loc(tmpcoo%ia(1:nz),desc_a,info,iact='I')
|
||||
call psb_glob_to_loc(tmpcoo%ja(1:nz),desc_a,info,iact='I')
|
||||
if (.true.) then
|
||||
call tmpcoo%clean_negidx(info)
|
||||
else
|
||||
j = 0
|
||||
do k=1, tmpcoo%get_nzeros()
|
||||
if ((tmpcoo%ia(k) > 0).and.(tmpcoo%ja(k)>0)) then
|
||||
j = j+1
|
||||
tmpcoo%ia(j) = tmpcoo%ia(k)
|
||||
tmpcoo%ja(j) = tmpcoo%ja(k)
|
||||
tmpcoo%val(j) = tmpcoo%val(k)
|
||||
end if
|
||||
end do
|
||||
call tmpcoo%set_nzeros(j)
|
||||
end if
|
||||
call ahalo%mv_from(tmpcoo)
|
||||
call ahalo%csclip(aout,info,imax=nrow)
|
||||
|
||||
else
|
||||
call psb_sphalo(atmp,desc_a,ahalo,info, rowscale=.true.)
|
||||
if (debug) write(0,*) me,' Htranspose from sphalo :',ahalo%get_nrows(),ahalo%get_ncols()
|
||||
if (info == psb_success_) call psb_rwextd(ncol,atmp,info,b=ahalo)
|
||||
|
||||
if (debug) then
|
||||
write(aname,'(a,i3.3,a)') 'ahalo-',me,'.mtx'
|
||||
call ahalo%print(fname=aname,head='ahalo after haloTest ',iv=ilv)
|
||||
write(aname,'(a,i3.3,a)') 'atmp-h-',me,'.mtx'
|
||||
call atmp%print(fname=aname,head='atmp after haloTest ',iv=ilv)
|
||||
end if
|
||||
|
||||
if (info == psb_success_) call ahalo%free()
|
||||
|
||||
call atmp%cp_to(tmpcoo)
|
||||
call tmpcoo%transp()
|
||||
if (debug) write(0,*) 'Before cleanup:',tmpcoo%get_nzeros()
|
||||
if (.true.) then
|
||||
call tmpcoo%clean_negidx(info)
|
||||
else
|
||||
|
||||
j = 0
|
||||
do k=1, tmpcoo%get_nzeros()
|
||||
if ((tmpcoo%ia(k) > 0).and.(tmpcoo%ja(k)>0)) then
|
||||
j = j+1
|
||||
tmpcoo%ia(j) = tmpcoo%ia(k)
|
||||
tmpcoo%ja(j) = tmpcoo%ja(k)
|
||||
tmpcoo%val(j) = tmpcoo%val(k)
|
||||
end if
|
||||
end do
|
||||
call tmpcoo%set_nzeros(j)
|
||||
end if
|
||||
|
||||
if (debug) write(0,*) 'After cleanup:',tmpcoo%get_nzeros()
|
||||
|
||||
call ahalo%mv_from(tmpcoo)
|
||||
if (dump) then
|
||||
call psb_gather(aglb,ahalo,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'atran-preclip.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
|
||||
call ahalo%csclip(aout,info,imax=nrow)
|
||||
end if
|
||||
|
||||
if (debug) write(0,*) 'After clip:',aout%get_nzeros()
|
||||
|
||||
if (debug_sync) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'End htranspose '
|
||||
end if
|
||||
!call aout%cscnv(info,type='csr')
|
||||
|
||||
if (dump) then
|
||||
write(aname,'(a,i3.3,a)') 'atran-',me,'.mtx'
|
||||
call aout%print(fname=aname,head='atrans ',iv=ilv)
|
||||
call psb_gather(aglb,aout,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'atran.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
end subroutine psb_dhtranspose
|
||||
|
||||
subroutine dPMatchBox(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
subroutine amg_d_PMatchBox(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate, myrank, numprocs, ictxt,&
|
||||
& msgindsent,msgactualsent,msgpercent,&
|
||||
& ph0_time, ph1_time, ph2_time, ph1_card, ph2_card,info,display_inp)
|
||||
@@ -1434,6 +1131,6 @@ contains
|
||||
end if
|
||||
where(mate>=0) mate = mate + 1
|
||||
|
||||
end subroutine dPMatchBox
|
||||
end subroutine amg_d_PMatchBox
|
||||
|
||||
end module dmatchboxp_mod
|
||||
end module amg_d_matchboxp_mod
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
module amg_d_parmatch_aggregator_mod
|
||||
use amg_d_base_aggregator_mod
|
||||
use dmatchboxp_mod
|
||||
use amg_d_matchboxp_mod
|
||||
#if defined(SERIAL_MPI)
|
||||
type, extends(amg_d_base_aggregator_type) :: amg_d_parmatch_aggregator_type
|
||||
end type amg_d_parmatch_aggregator_type
|
||||
@@ -132,8 +132,6 @@ module amg_d_parmatch_aggregator_mod
|
||||
type(psb_dspmat_type), allocatable :: prol, restr
|
||||
type(psb_dspmat_type), allocatable :: ac, base_a, rwa
|
||||
type(psb_desc_type), allocatable :: desc_ac, desc_ax, base_desc, rwdesc
|
||||
integer(psb_ipk_) :: max_csize
|
||||
integer(psb_ipk_) :: max_nlevels
|
||||
logical :: reproducible_matching = .false.
|
||||
logical :: need_symmetrize = .false.
|
||||
logical :: unsmoothed_hierarchy = .true.
|
||||
@@ -143,18 +141,18 @@ module amg_d_parmatch_aggregator_mod
|
||||
procedure, pass(ag) :: mat_asb => amg_d_parmatch_aggregator_mat_asb
|
||||
procedure, pass(ag) :: inner_mat_asb => amg_d_parmatch_aggregator_inner_mat_asb
|
||||
procedure, pass(ag) :: bld_map => amg_d_parmatch_aggregator_bld_map
|
||||
procedure, pass(ag) :: csetc => d_parmatch_aggr_csetc
|
||||
procedure, pass(ag) :: cseti => d_parmatch_aggr_cseti
|
||||
procedure, pass(ag) :: default => d_parmatch_aggr_set_default
|
||||
procedure, pass(ag) :: sizeof => d_parmatch_aggregator_sizeof
|
||||
procedure, pass(ag) :: update_next => d_parmatch_aggregator_update_next
|
||||
procedure, pass(ag) :: bld_wnxt => d_parmatch_bld_wnxt
|
||||
procedure, pass(ag) :: bld_default_w => d_bld_default_w
|
||||
procedure, pass(ag) :: set_c_default_w => d_set_prm_c_default_w
|
||||
procedure, pass(ag) :: descr => d_parmatch_aggregator_descr
|
||||
procedure, pass(ag) :: clone => d_parmatch_aggregator_clone
|
||||
procedure, pass(ag) :: free => d_parmatch_aggregator_free
|
||||
procedure, nopass :: fmt => d_parmatch_aggregator_fmt
|
||||
procedure, pass(ag) :: csetc => amg_d_parmatch_aggr_csetc
|
||||
procedure, pass(ag) :: cseti => amg_d_parmatch_aggr_cseti
|
||||
procedure, pass(ag) :: default => amg_d_parmatch_aggr_set_default
|
||||
procedure, pass(ag) :: sizeof => amg_d_parmatch_aggregator_sizeof
|
||||
procedure, pass(ag) :: update_next => amg_d_parmatch_aggregator_update_next
|
||||
procedure, pass(ag) :: bld_wnxt => amg_d_parmatch_bld_wnxt
|
||||
procedure, pass(ag) :: bld_default_w => amg_d_bld_default_w
|
||||
procedure, pass(ag) :: set_c_default_w => amg_d_set_prm_c_default_w
|
||||
procedure, pass(ag) :: descr => amg_d_parmatch_aggregator_descr
|
||||
procedure, pass(ag) :: clone => amg_d_parmatch_aggregator_clone
|
||||
procedure, pass(ag) :: free => amg_d_parmatch_aggregator_free
|
||||
procedure, nopass :: fmt => amg_d_parmatch_aggregator_fmt
|
||||
procedure, nopass :: xt_desc => amg_d_parmatch_aggregator_xt_desc
|
||||
end type amg_d_parmatch_aggregator_type
|
||||
|
||||
@@ -320,7 +318,7 @@ module amg_d_parmatch_aggregator_mod
|
||||
|
||||
contains
|
||||
|
||||
subroutine d_bld_default_w(ag,nr)
|
||||
subroutine amg_d_bld_default_w(ag,nr)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -330,9 +328,9 @@ contains
|
||||
if (info /= psb_success_) return
|
||||
ag%w = done
|
||||
!call ag%set_c_default_w()
|
||||
end subroutine d_bld_default_w
|
||||
end subroutine amg_d_bld_default_w
|
||||
|
||||
subroutine d_set_prm_c_default_w(ag)
|
||||
subroutine amg_d_set_prm_c_default_w(ag)
|
||||
use psb_realloc_mod
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
@@ -342,9 +340,9 @@ contains
|
||||
!write(0,*) 'prm_c_deafult_w '
|
||||
call psb_safe_ab_cpy(ag%w,ag%w_nxt,info)
|
||||
|
||||
end subroutine d_set_prm_c_default_w
|
||||
end subroutine amg_d_set_prm_c_default_w
|
||||
|
||||
subroutine d_parmatch_bld_wnxt(ag,ilaggr,valaggr,nx)
|
||||
subroutine amg_d_parmatch_bld_wnxt(ag,ilaggr,valaggr,nx)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -358,14 +356,14 @@ contains
|
||||
!write(0,*) 'Executing bld_wnxt ',nx
|
||||
call psb_realloc(nx,ag%w_nxt,info)
|
||||
|
||||
end subroutine d_parmatch_bld_wnxt
|
||||
end subroutine amg_d_parmatch_bld_wnxt
|
||||
|
||||
function d_parmatch_aggregator_fmt() result(val)
|
||||
function amg_d_parmatch_aggregator_fmt() result(val)
|
||||
implicit none
|
||||
character(len=32) :: val
|
||||
|
||||
val = "Parallel Matching aggregation"
|
||||
end function d_parmatch_aggregator_fmt
|
||||
end function amg_d_parmatch_aggregator_fmt
|
||||
|
||||
function amg_d_parmatch_aggregator_xt_desc() result(val)
|
||||
implicit none
|
||||
@@ -374,7 +372,7 @@ contains
|
||||
val = .true.
|
||||
end function amg_d_parmatch_aggregator_xt_desc
|
||||
|
||||
function d_parmatch_aggregator_sizeof(ag) result(val)
|
||||
function amg_d_parmatch_aggregator_sizeof(ag) result(val)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), intent(in) :: ag
|
||||
@@ -390,9 +388,9 @@ contains
|
||||
if (allocated(ag%base_desc)) val = val + ag%base_desc%sizeof()
|
||||
if (allocated(ag%desc_ax)) val = val + ag%desc_ax%sizeof()
|
||||
|
||||
end function d_parmatch_aggregator_sizeof
|
||||
end function amg_d_parmatch_aggregator_sizeof
|
||||
|
||||
subroutine d_parmatch_aggregator_descr(ag,parms,iout,info)
|
||||
subroutine amg_d_parmatch_aggregator_descr(ag,parms,iout,info)
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), intent(in) :: ag
|
||||
type(amg_dml_parms), intent(in) :: parms
|
||||
@@ -406,7 +404,7 @@ contains
|
||||
call parms%mldescr(iout,info)
|
||||
|
||||
return
|
||||
end subroutine d_parmatch_aggregator_descr
|
||||
end subroutine amg_d_parmatch_aggregator_descr
|
||||
|
||||
function is_legal_malg(alg) result(val)
|
||||
logical :: val
|
||||
@@ -437,7 +435,7 @@ contains
|
||||
end function is_legal_nlevels
|
||||
|
||||
|
||||
subroutine d_parmatch_aggregator_update_next(ag,agnext,info)
|
||||
subroutine amg_d_parmatch_aggregator_update_next(ag,agnext,info)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -452,10 +450,10 @@ contains
|
||||
& agnext%matching_alg = ag%matching_alg
|
||||
if (.not.is_legal_nsweeps(agnext%n_sweeps))&
|
||||
& agnext%n_sweeps = ag%n_sweeps
|
||||
if (.not.is_legal_csize(agnext%max_csize))&
|
||||
& agnext%max_csize = ag%max_csize
|
||||
if (.not.is_legal_nlevels(agnext%max_nlevels))&
|
||||
& agnext%max_nlevels = ag%max_nlevels
|
||||
!!$ if (.not.is_legal_csize(agnext%max_csize))&
|
||||
!!$ & agnext%max_csize = ag%max_csize
|
||||
!!$ if (.not.is_legal_nlevels(agnext%max_nlevels))&
|
||||
!!$ & agnext%max_nlevels = ag%max_nlevels
|
||||
! Is this going to generate shallow copies/memory leaks/double frees?
|
||||
! To be investigated further.
|
||||
call psb_safe_ab_cpy(ag%w_nxt,agnext%w,info)
|
||||
@@ -470,9 +468,9 @@ contains
|
||||
! What should we do here?
|
||||
end select
|
||||
info = 0
|
||||
end subroutine d_parmatch_aggregator_update_next
|
||||
end subroutine amg_d_parmatch_aggregator_update_next
|
||||
|
||||
subroutine d_parmatch_aggr_csetc(ag,what,val,info,idx)
|
||||
subroutine amg_d_parmatch_aggr_csetc(ag,what,val,info,idx)
|
||||
|
||||
Implicit None
|
||||
|
||||
@@ -514,9 +512,9 @@ contains
|
||||
! Do nothing
|
||||
end select
|
||||
return
|
||||
end subroutine d_parmatch_aggr_csetc
|
||||
end subroutine amg_d_parmatch_aggr_csetc
|
||||
|
||||
subroutine d_parmatch_aggr_cseti(ag,what,val,info,idx)
|
||||
subroutine amg_d_parmatch_aggr_cseti(ag,what,val,info,idx)
|
||||
|
||||
Implicit None
|
||||
|
||||
@@ -540,10 +538,6 @@ contains
|
||||
case('AGGR_SIZE')
|
||||
ag%orig_aggr_size = val
|
||||
ag%n_sweeps=max(1,ceiling(log(val*1.0)/log(2.0)))
|
||||
case('PRMC_MAX_CSIZE')
|
||||
ag%max_csize=val
|
||||
case('PRMC_MAX_NLEVELS')
|
||||
ag%max_nlevels=val
|
||||
case('PRMC_W_SIZE')
|
||||
call ag%bld_default_w(val)
|
||||
case('PRMC_REPRODUCIBLE_MATCHING')
|
||||
@@ -556,9 +550,9 @@ contains
|
||||
! Do nothing
|
||||
end select
|
||||
return
|
||||
end subroutine d_parmatch_aggr_cseti
|
||||
end subroutine amg_d_parmatch_aggr_cseti
|
||||
|
||||
subroutine d_parmatch_aggr_set_default(ag)
|
||||
subroutine amg_d_parmatch_aggr_set_default(ag)
|
||||
|
||||
Implicit None
|
||||
|
||||
@@ -569,8 +563,8 @@ contains
|
||||
ag%matching_alg = 0
|
||||
ag%n_sweeps = 1
|
||||
ag%jacobi_sweeps = 0
|
||||
ag%max_nlevels = 36
|
||||
ag%max_csize = -1
|
||||
!!$ ag%max_nlevels = 36
|
||||
!!$ ag%max_csize = -1
|
||||
!
|
||||
! Apparently BootCMatch works better
|
||||
! by keeping all entries
|
||||
@@ -579,9 +573,9 @@ contains
|
||||
|
||||
return
|
||||
|
||||
end subroutine d_parmatch_aggr_set_default
|
||||
end subroutine amg_d_parmatch_aggr_set_default
|
||||
|
||||
subroutine d_parmatch_aggregator_free(ag,info)
|
||||
subroutine amg_d_parmatch_aggregator_free(ag,info)
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), intent(inout) :: ag
|
||||
@@ -618,9 +612,9 @@ contains
|
||||
call ag%rwdesc%free(info); deallocate(ag%rwdesc,stat=info)
|
||||
end if
|
||||
|
||||
end subroutine d_parmatch_aggregator_free
|
||||
end subroutine amg_d_parmatch_aggregator_free
|
||||
|
||||
subroutine d_parmatch_aggregator_clone(ag,agnext,info)
|
||||
subroutine amg_d_parmatch_aggregator_clone(ag,agnext,info)
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), intent(inout) :: ag
|
||||
class(amg_d_base_aggregator_type), allocatable, intent(inout) :: agnext
|
||||
@@ -640,7 +634,7 @@ contains
|
||||
! Should never ever get here
|
||||
info = -1
|
||||
end select
|
||||
end subroutine d_parmatch_aggregator_clone
|
||||
end subroutine amg_d_parmatch_aggregator_clone
|
||||
|
||||
subroutine amg_d_parmatch_aggregator_bld_map(ag,desc_a,desc_ac,ilaggr,nlaggr,&
|
||||
& op_restr,op_prol,map,info)
|
||||
|
||||
@@ -52,7 +52,7 @@ module amg_d_sludist_solver
|
||||
use iso_c_binding
|
||||
use amg_d_base_solver_mod
|
||||
|
||||
#if defined(LPK8)
|
||||
#if (!defined(HAVE_SLUDIST_)) || defined(IPK8)
|
||||
|
||||
type, extends(amg_d_base_solver_type) :: amg_d_sludist_solver_type
|
||||
|
||||
@@ -270,11 +270,13 @@ contains
|
||||
! Local variables
|
||||
type(psb_dspmat_type) :: atmp
|
||||
type(psb_d_csr_sparse_mat) :: acsr
|
||||
integer :: n_row,n_col, nrow_a, nztota, nglob, nzt, npr, npc
|
||||
integer :: ifrst, ibcheck
|
||||
integer(psb_lpk_), allocatable :: gia(:), gja(:)
|
||||
type(psb_ctxt_type) :: ctxt
|
||||
integer :: np,me,i, err_act, debug_unit, debug_level
|
||||
character(len=20) :: name='d_sludist_solver_bld', ch_err
|
||||
integer(psb_lpk_) :: lfrst
|
||||
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota, nglob, nzt, npr, npc
|
||||
integer(psb_ipk_) :: ifrst, ibcheck
|
||||
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
|
||||
character(len=20) :: name='d_sludist_solver_bld', ch_err
|
||||
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -293,19 +295,37 @@ contains
|
||||
n_col = desc_a%get_local_cols()
|
||||
nglob = desc_a%get_global_rows()
|
||||
|
||||
call a%cscnv(atmp,info,type='coo')
|
||||
!
|
||||
! Strategy here is as follows: because a call to SLUDIST
|
||||
! as a gobal solver is mostly done at the coarsest level,
|
||||
! even if we start from a problem requiring 8 bytes, chances
|
||||
! are that the global size will be suitable for 4 bytes
|
||||
! anyway, so we hope for the best, and throw an error
|
||||
! if something goes wrong.
|
||||
!
|
||||
if (nglob > huge(1_psb_ipk_)) then
|
||||
write(0,*) me,' ',trim(name),': Error: overflow of local indices '
|
||||
info=psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call a%cscnv(atmp,info,type='csr')
|
||||
! This in case we are dealing with AS
|
||||
call psb_rwextd(n_row,atmp,info,b=b)
|
||||
call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_)
|
||||
call atmp%mv_to(acsr)
|
||||
nrow_a = acsr%get_nrows()
|
||||
nztota = acsr%get_nzeros()
|
||||
call psb_loc_to_glob(ione,lfrst,desc_a,info)
|
||||
|
||||
! Fix the entries to call C-base SuperLU
|
||||
call psb_loc_to_glob(1,ifrst,desc_a,info)
|
||||
call psb_loc_to_glob(nrow_a,ibcheck,desc_a,info)
|
||||
call psb_loc_to_glob(acsr%ja(1:nztota),desc_a,info,iact='I')
|
||||
call psb_realloc(nztota,gja,info)
|
||||
call psb_loc_to_glob(acsr%ja(1:nztota),gja(1:nztota), desc_a, info, iact='I')
|
||||
acsr%ja(1:nztota) = gja(1:nztota)
|
||||
acsr%ja(:) = acsr%ja(:) - 1
|
||||
acsr%irp(:) = acsr%irp(:) - 1
|
||||
ifrst = ifrst - 1
|
||||
ifrst = lfrst - 1
|
||||
|
||||
info = amg_dsludist_fact(nglob,nrow_a,nztota,ifrst,&
|
||||
& acsr%val,acsr%irp,acsr%ja,sv%lufactors,&
|
||||
& npr,npc)
|
||||
@@ -318,7 +338,6 @@ contains
|
||||
end if
|
||||
|
||||
call acsr%free()
|
||||
call atmp%free()
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),' end'
|
||||
|
||||
+32
-335
@@ -68,7 +68,7 @@
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
module smatchboxp_mod
|
||||
module amg_s_matchboxp_mod
|
||||
|
||||
use iso_c_binding
|
||||
use psb_base_cbind_mod
|
||||
@@ -94,34 +94,25 @@ module smatchboxp_mod
|
||||
end subroutine sMatchBoxPC
|
||||
end interface MatchBoxPC
|
||||
|
||||
interface i_aggr_assign
|
||||
module procedure i_saggr_assign
|
||||
end interface i_aggr_assign
|
||||
interface amg_i_aggr_assign
|
||||
module procedure amg_i_s_aggr_assign
|
||||
end interface amg_i_aggr_assign
|
||||
|
||||
interface build_matching
|
||||
module procedure sbuild_matching
|
||||
end interface build_matching
|
||||
interface amg_par_build_matching
|
||||
module procedure amg_s_par_build_matching
|
||||
end interface amg_par_build_matching
|
||||
|
||||
interface build_ahat
|
||||
module procedure sbuild_ahat
|
||||
end interface build_ahat
|
||||
interface amg_par_build_ahat
|
||||
module procedure amg_s_par_build_ahat
|
||||
end interface amg_par_build_ahat
|
||||
|
||||
interface psb_gtranspose
|
||||
module procedure psb_sgtranspose
|
||||
end interface psb_gtranspose
|
||||
interface amg_PMatchBox
|
||||
module procedure amg_s_PMatchBox
|
||||
end interface amg_PMatchBox
|
||||
|
||||
interface psb_htranspose
|
||||
module procedure psb_shtranspose
|
||||
end interface psb_htranspose
|
||||
|
||||
interface PMatchBox
|
||||
module procedure sPMatchBox
|
||||
end interface PMatchBox
|
||||
|
||||
logical, parameter, private :: print_statistics=.false.
|
||||
contains
|
||||
|
||||
subroutine smatchboxp_build_prol(w,a,desc_a,ilaggr,nlaggr,prol,info,&
|
||||
subroutine amg_s_matchboxp_build_prol(w,a,desc_a,ilaggr,nlaggr,prol,info,&
|
||||
& symmetrize,reproducible,display_inp, display_out, print_out)
|
||||
use psb_base_mod
|
||||
use psb_util_mod
|
||||
@@ -214,7 +205,7 @@ contains
|
||||
end if
|
||||
if (do_timings) call psb_toc(idx_phase1)
|
||||
if (do_timings) call psb_tic(idx_bldmtc)
|
||||
call build_matching(w,a,desc_a,mate,info,display_inp=display_inp,symmetrize=symmetrize)
|
||||
call amg_par_build_matching(w,a,desc_a,mate,info,display_inp=display_inp,symmetrize=symmetrize)
|
||||
if (do_timings) call psb_toc(idx_bldmtc)
|
||||
if (debug) write(0,*) iam,' buildprol from buildmatching:',&
|
||||
& info
|
||||
@@ -312,7 +303,7 @@ contains
|
||||
! Should be a symmetric function.
|
||||
!
|
||||
call desc_a%indxmap%qry_halo_owner(idx,iown,info)
|
||||
ip = i_aggr_assign(iam, iown, kg, idxg, wk, widx, nrmagg)
|
||||
ip = amg_i_aggr_assign(iam, iown, kg, idxg, wk, widx, nrmagg)
|
||||
if (iam == ip) then
|
||||
nlaggr(iam) = nlaggr(iam) + 1
|
||||
ilaggr(k) = nlaggr(iam)
|
||||
@@ -422,13 +413,11 @@ contains
|
||||
nlpairs = v(3)
|
||||
|
||||
end block
|
||||
if (print_statistics) then
|
||||
if (iam == 0) then
|
||||
write(0,*) 'Matching statistics: Unmatched nodes ',&
|
||||
& nunmatched,' Singletons:',nlsingl,' Pairs:',nlpairs
|
||||
end if
|
||||
if (iam == 0) then
|
||||
write(0,*) 'Matching statistics: Unmatched nodes ',&
|
||||
& nunmatched,' Singletons:',nlsingl,' Pairs:',nlpairs
|
||||
end if
|
||||
|
||||
|
||||
if (display_out_) then
|
||||
block
|
||||
integer(psb_ipk_) :: idx
|
||||
@@ -516,9 +505,9 @@ contains
|
||||
write(0,*) iam,' : error from Matching: ',info
|
||||
end if
|
||||
|
||||
end subroutine smatchboxp_build_prol
|
||||
end subroutine amg_s_matchboxp_build_prol
|
||||
|
||||
function i_saggr_assign(iam, iown, kg, idxg, wk, widx, nrmagg) &
|
||||
function amg_i_s_aggr_assign(iam, iown, kg, idxg, wk, widx, nrmagg) &
|
||||
& result(iproc)
|
||||
!
|
||||
! How to break ties? This
|
||||
@@ -560,10 +549,10 @@ contains
|
||||
iproc = iown
|
||||
end if
|
||||
end if
|
||||
end function i_saggr_assign
|
||||
end function amg_i_s_aggr_assign
|
||||
|
||||
|
||||
subroutine sbuild_matching(w,a,desc_a,mate,info,display_inp, symmetrize)
|
||||
subroutine amg_s_par_build_matching(w,a,desc_a,mate,info,display_inp, symmetrize)
|
||||
use psb_base_mod
|
||||
use psb_util_mod
|
||||
use iso_c_binding
|
||||
@@ -612,7 +601,7 @@ contains
|
||||
if (iam == 0) write(0,*)' Into build_ahat:'
|
||||
end if
|
||||
if (do_timings) call psb_tic(idx_bldahat)
|
||||
call build_ahat(w,a,ahatnd,desc_a,info,symmetrize=symmetrize)
|
||||
call amg_par_build_ahat(w,a,ahatnd,desc_a,info,symmetrize=symmetrize)
|
||||
if (do_timings) call psb_toc(idx_bldahat)
|
||||
if (info /= 0) then
|
||||
write(0,*) 'Error from build_ahat ', info
|
||||
@@ -703,7 +692,7 @@ contains
|
||||
!
|
||||
if (debug) write(0,*) iam,' buildmatching into PMatchBox:'
|
||||
if (do_timings) call psb_tic(idx_cmboxp)
|
||||
call PMatchBox(nr,nz,vlptr,vlind,ewght,&
|
||||
call amg_PMatchBox(nr,nz,vlptr,vlind,ewght,&
|
||||
& vnl, mate, iam, np,ictxt,&
|
||||
& msgis,msgas,msgprc,ph0t,ph1t,ph2t,ph1crd,ph2crd,info,display_inp)
|
||||
if (do_timings) call psb_toc(idx_cmboxp)
|
||||
@@ -767,9 +756,9 @@ contains
|
||||
val(1:n) = tmp(1:n)
|
||||
end subroutine fix_order
|
||||
|
||||
end subroutine sbuild_matching
|
||||
end subroutine amg_s_par_build_matching
|
||||
|
||||
subroutine sbuild_ahat(w,a,ahat,desc_a,info,symmetrize)
|
||||
subroutine amg_s_par_build_ahat(w,a,ahat,desc_a,info,symmetrize)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
real(psb_spk_), intent(in) :: w(:)
|
||||
@@ -1005,301 +994,9 @@ contains
|
||||
end block
|
||||
end if
|
||||
|
||||
end subroutine sbuild_ahat
|
||||
end subroutine amg_s_par_build_ahat
|
||||
|
||||
subroutine psb_sgtranspose(ain,aout,desc_a,info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
type(psb_lsspmat_type), intent(in) :: ain
|
||||
type(psb_lsspmat_type), intent(out) :: aout
|
||||
type(psb_desc_type) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
!
|
||||
! BEWARE: This routine works under the assumption
|
||||
! that the same DESC_A works for both A and A^T, which
|
||||
! essentially means that A has a symmetric pattern.
|
||||
!
|
||||
type(psb_lsspmat_type) :: atmp, ahalo, aglb
|
||||
type(psb_ls_coo_sparse_mat) :: tmpcoo
|
||||
type(psb_ls_csr_sparse_mat) :: tmpcsr
|
||||
type(psb_ctxt_type) :: ictxt
|
||||
integer(psb_ipk_) :: me, np
|
||||
integer(psb_lpk_) :: i, j, k, nrow, ncol
|
||||
integer(psb_lpk_), allocatable :: ilv(:)
|
||||
character(len=80) :: aname
|
||||
logical, parameter :: debug=.false., dump=.false., debug_sync=.false.
|
||||
|
||||
ictxt = desc_a%get_context()
|
||||
call psb_info(ictxt,me,np)
|
||||
|
||||
nrow = desc_a%get_local_rows()
|
||||
ncol = desc_a%get_local_cols()
|
||||
if (debug_sync) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'Start gtranspose '
|
||||
end if
|
||||
call ain%cscnv(tmpcsr,info)
|
||||
|
||||
if (debug) then
|
||||
ilv = [(i,i=1,ncol)]
|
||||
call desc_a%l2gip(ilv,info,owned=.false.)
|
||||
write(aname,'(a,i3.3,a)') 'atmp-preh-',me,'.mtx'
|
||||
call ain%print(fname=aname,head='atmp before haloTest ',iv=ilv)
|
||||
end if
|
||||
if (dump) then
|
||||
call ain%cscnv(atmp,info)
|
||||
call psb_gather(aglb,atmp,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'aglob-prehalo.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
!call psb_loc_to_glob(tmpcsr%ja,desc_a,info)
|
||||
call atmp%mv_from(tmpcsr)
|
||||
|
||||
if (debug) then
|
||||
write(aname,'(a,i3.3,a)') 'tmpcsr-',me,'.mtx'
|
||||
call atmp%print(fname=aname,head='tmpcsr ',iv=ilv)
|
||||
!call psb_set_debug_level(9999)
|
||||
end if
|
||||
|
||||
! FIXME THIS NEEDS REWORKING
|
||||
if (debug) write(0,*) me,' Gtranspose into sphalo :',atmp%get_nrows(),atmp%get_ncols()
|
||||
call psb_sphalo(atmp,desc_a,ahalo,info,rowscale=.true.)
|
||||
if (debug) write(0,*) me,' Gtranspose from sphalo :',ahalo%get_nrows(),ahalo%get_ncols()
|
||||
if (info == psb_success_) call psb_rwextd(ncol,atmp,info,b=ahalo)
|
||||
|
||||
if (debug) then
|
||||
write(aname,'(a,i3.3,a)') 'ahalo-',me,'.mtx'
|
||||
call ahalo%print(fname=aname,head='ahalo after haloTest ',iv=ilv)
|
||||
write(aname,'(a,i3.3,a)') 'atmp-h-',me,'.mtx'
|
||||
call atmp%print(fname=aname,head='atmp after haloTest ',iv=ilv)
|
||||
end if
|
||||
|
||||
if (info == psb_success_) call ahalo%free()
|
||||
|
||||
call atmp%cp_to(tmpcoo)
|
||||
call tmpcoo%transp()
|
||||
!call psb_glob_to_loc(tmpcoo%ia,desc_a,info,iact='I')
|
||||
if (debug) write(0,*) 'Before cleanup:',tmpcoo%get_nzeros()
|
||||
|
||||
j = 0
|
||||
do k=1, tmpcoo%get_nzeros()
|
||||
if ((tmpcoo%ia(k) > 0).and.(tmpcoo%ja(k)>0)) then
|
||||
j = j+1
|
||||
tmpcoo%ia(j) = tmpcoo%ia(k)
|
||||
tmpcoo%ja(j) = tmpcoo%ja(k)
|
||||
tmpcoo%val(j) = tmpcoo%val(k)
|
||||
end if
|
||||
end do
|
||||
call tmpcoo%set_nzeros(j)
|
||||
|
||||
if (debug) write(0,*) 'After cleanup:',tmpcoo%get_nzeros()
|
||||
|
||||
call ahalo%mv_from(tmpcoo)
|
||||
if (dump) then
|
||||
call psb_gather(aglb,ahalo,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'atran-preclip.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
|
||||
call ahalo%csclip(aout,info,imax=nrow)
|
||||
|
||||
if (debug) write(0,*) 'After clip:',aout%get_nzeros()
|
||||
|
||||
if (debug_sync) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'End gtranspose '
|
||||
end if
|
||||
!call aout%cscnv(info,type='csr')
|
||||
|
||||
if (dump) then
|
||||
write(aname,'(a,i3.3,a)') 'atran-',me,'.mtx'
|
||||
call aout%print(fname=aname,head='atrans ',iv=ilv)
|
||||
call psb_gather(aglb,aout,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'atran.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
end subroutine psb_sgtranspose
|
||||
|
||||
subroutine psb_shtranspose(ain,aout,desc_a,info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
type(psb_lsspmat_type), intent(in) :: ain
|
||||
type(psb_lsspmat_type), intent(out) :: aout
|
||||
type(psb_desc_type) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
!
|
||||
! BEWARE: This routine works under the assumption
|
||||
! that the same DESC_A works for both A and A^T, which
|
||||
! essentially means that A has a symmetric pattern.
|
||||
!
|
||||
type(psb_lsspmat_type) :: atmp, ahalo, aglb
|
||||
type(psb_ls_coo_sparse_mat) :: tmpcoo, tmpc1, tmpc2, tmpch
|
||||
type(psb_ls_csr_sparse_mat) :: tmpcsr
|
||||
integer(psb_ipk_) :: nz1, nz2, nzh, nz
|
||||
type(psb_ctxt_type) :: ictxt
|
||||
integer(psb_ipk_) :: me, np
|
||||
integer(psb_lpk_) :: i, j, k, nrow, ncol, nlz
|
||||
integer(psb_lpk_), allocatable :: ilv(:)
|
||||
character(len=80) :: aname
|
||||
logical, parameter :: debug=.false., dump=.false., debug_sync=.false.
|
||||
|
||||
ictxt = desc_a%get_context()
|
||||
call psb_info(ictxt,me,np)
|
||||
|
||||
nrow = desc_a%get_local_rows()
|
||||
ncol = desc_a%get_local_cols()
|
||||
if (debug_sync) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'Start htranspose '
|
||||
end if
|
||||
call ain%cscnv(tmpcsr,info)
|
||||
|
||||
if (debug) then
|
||||
ilv = [(i,i=1,ncol)]
|
||||
call desc_a%l2gip(ilv,info,owned=.false.)
|
||||
write(aname,'(a,i3.3,a)') 'atmp-preh-',me,'.mtx'
|
||||
call ain%print(fname=aname,head='atmp before haloTest ',iv=ilv)
|
||||
end if
|
||||
if (dump) then
|
||||
call ain%cscnv(atmp,info)
|
||||
call psb_gather(aglb,atmp,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'aglob-prehalo.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
!call psb_loc_to_glob(tmpcsr%ja,desc_a,info)
|
||||
call atmp%mv_from(tmpcsr)
|
||||
|
||||
if (debug) then
|
||||
write(aname,'(a,i3.3,a)') 'tmpcsr-',me,'.mtx'
|
||||
call atmp%print(fname=aname,head='tmpcsr ',iv=ilv)
|
||||
!call psb_set_debug_level(9999)
|
||||
end if
|
||||
|
||||
! FIXME THIS NEEDS REWORKING
|
||||
if (debug) write(0,*) me,' Htranspose into sphalo :',atmp%get_nrows(),atmp%get_ncols()
|
||||
if (.true.) then
|
||||
call psb_sphalo(atmp,desc_a,ahalo,info, outfmt='coo ')
|
||||
call atmp%mv_to(tmpc1)
|
||||
call ahalo%mv_to(tmpch)
|
||||
nz1 = tmpc1%get_nzeros()
|
||||
call psb_loc_to_glob(tmpc1%ia(1:nz1),desc_a,info,iact='I')
|
||||
call psb_loc_to_glob(tmpc1%ja(1:nz1),desc_a,info,iact='I')
|
||||
nzh = tmpch%get_nzeros()
|
||||
call psb_loc_to_glob(tmpch%ia(1:nzh),desc_a,info,iact='I')
|
||||
call psb_loc_to_glob(tmpch%ja(1:nzh),desc_a,info,iact='I')
|
||||
nlz = nz1+nzh
|
||||
call tmpcoo%allocate(ncol,ncol,nlz)
|
||||
tmpcoo%ia(1:nz1) = tmpc1%ia(1:nz1)
|
||||
tmpcoo%ja(1:nz1) = tmpc1%ja(1:nz1)
|
||||
tmpcoo%val(1:nz1) = tmpc1%val(1:nz1)
|
||||
tmpcoo%ia(nz1+1:nz1+nzh) = tmpch%ia(1:nzh)
|
||||
tmpcoo%ja(nz1+1:nz1+nzh) = tmpch%ja(1:nzh)
|
||||
tmpcoo%val(nz1+1:nz1+nzh) = tmpch%val(1:nzh)
|
||||
call tmpcoo%set_nzeros(nlz)
|
||||
call tmpcoo%transp()
|
||||
nz = tmpcoo%get_nzeros()
|
||||
call psb_glob_to_loc(tmpcoo%ia(1:nz),desc_a,info,iact='I')
|
||||
call psb_glob_to_loc(tmpcoo%ja(1:nz),desc_a,info,iact='I')
|
||||
if (.true.) then
|
||||
call tmpcoo%clean_negidx(info)
|
||||
else
|
||||
j = 0
|
||||
do k=1, tmpcoo%get_nzeros()
|
||||
if ((tmpcoo%ia(k) > 0).and.(tmpcoo%ja(k)>0)) then
|
||||
j = j+1
|
||||
tmpcoo%ia(j) = tmpcoo%ia(k)
|
||||
tmpcoo%ja(j) = tmpcoo%ja(k)
|
||||
tmpcoo%val(j) = tmpcoo%val(k)
|
||||
end if
|
||||
end do
|
||||
call tmpcoo%set_nzeros(j)
|
||||
end if
|
||||
call ahalo%mv_from(tmpcoo)
|
||||
call ahalo%csclip(aout,info,imax=nrow)
|
||||
|
||||
else
|
||||
call psb_sphalo(atmp,desc_a,ahalo,info, rowscale=.true.)
|
||||
if (debug) write(0,*) me,' Htranspose from sphalo :',ahalo%get_nrows(),ahalo%get_ncols()
|
||||
if (info == psb_success_) call psb_rwextd(ncol,atmp,info,b=ahalo)
|
||||
|
||||
if (debug) then
|
||||
write(aname,'(a,i3.3,a)') 'ahalo-',me,'.mtx'
|
||||
call ahalo%print(fname=aname,head='ahalo after haloTest ',iv=ilv)
|
||||
write(aname,'(a,i3.3,a)') 'atmp-h-',me,'.mtx'
|
||||
call atmp%print(fname=aname,head='atmp after haloTest ',iv=ilv)
|
||||
end if
|
||||
|
||||
if (info == psb_success_) call ahalo%free()
|
||||
|
||||
call atmp%cp_to(tmpcoo)
|
||||
call tmpcoo%transp()
|
||||
if (debug) write(0,*) 'Before cleanup:',tmpcoo%get_nzeros()
|
||||
if (.true.) then
|
||||
call tmpcoo%clean_negidx(info)
|
||||
else
|
||||
|
||||
j = 0
|
||||
do k=1, tmpcoo%get_nzeros()
|
||||
if ((tmpcoo%ia(k) > 0).and.(tmpcoo%ja(k)>0)) then
|
||||
j = j+1
|
||||
tmpcoo%ia(j) = tmpcoo%ia(k)
|
||||
tmpcoo%ja(j) = tmpcoo%ja(k)
|
||||
tmpcoo%val(j) = tmpcoo%val(k)
|
||||
end if
|
||||
end do
|
||||
call tmpcoo%set_nzeros(j)
|
||||
end if
|
||||
|
||||
if (debug) write(0,*) 'After cleanup:',tmpcoo%get_nzeros()
|
||||
|
||||
call ahalo%mv_from(tmpcoo)
|
||||
if (dump) then
|
||||
call psb_gather(aglb,ahalo,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'atran-preclip.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
|
||||
call ahalo%csclip(aout,info,imax=nrow)
|
||||
end if
|
||||
|
||||
if (debug) write(0,*) 'After clip:',aout%get_nzeros()
|
||||
|
||||
if (debug_sync) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'End htranspose '
|
||||
end if
|
||||
!call aout%cscnv(info,type='csr')
|
||||
|
||||
if (dump) then
|
||||
write(aname,'(a,i3.3,a)') 'atran-',me,'.mtx'
|
||||
call aout%print(fname=aname,head='atrans ',iv=ilv)
|
||||
call psb_gather(aglb,aout,desc_a,info)
|
||||
if (me==psb_root_) then
|
||||
write(aname,'(a,i3.3,a)') 'atran.mtx'
|
||||
call aglb%print(fname=aname,head='Test ')
|
||||
end if
|
||||
end if
|
||||
|
||||
end subroutine psb_shtranspose
|
||||
|
||||
subroutine sPMatchBox(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
subroutine amg_s_PMatchBox(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate, myrank, numprocs, ictxt,&
|
||||
& msgindsent,msgactualsent,msgpercent,&
|
||||
& ph0_time, ph1_time, ph2_time, ph1_card, ph2_card,info,display_inp)
|
||||
@@ -1434,6 +1131,6 @@ contains
|
||||
end if
|
||||
where(mate>=0) mate = mate + 1
|
||||
|
||||
end subroutine sPMatchBox
|
||||
end subroutine amg_s_PMatchBox
|
||||
|
||||
end module smatchboxp_mod
|
||||
end module amg_s_matchboxp_mod
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
module amg_s_parmatch_aggregator_mod
|
||||
use amg_s_base_aggregator_mod
|
||||
use smatchboxp_mod
|
||||
use amg_s_matchboxp_mod
|
||||
#if defined(SERIAL_MPI)
|
||||
type, extends(amg_s_base_aggregator_type) :: amg_s_parmatch_aggregator_type
|
||||
end type amg_s_parmatch_aggregator_type
|
||||
@@ -132,8 +132,6 @@ module amg_s_parmatch_aggregator_mod
|
||||
type(psb_sspmat_type), allocatable :: prol, restr
|
||||
type(psb_sspmat_type), allocatable :: ac, base_a, rwa
|
||||
type(psb_desc_type), allocatable :: desc_ac, desc_ax, base_desc, rwdesc
|
||||
integer(psb_ipk_) :: max_csize
|
||||
integer(psb_ipk_) :: max_nlevels
|
||||
logical :: reproducible_matching = .false.
|
||||
logical :: need_symmetrize = .false.
|
||||
logical :: unsmoothed_hierarchy = .true.
|
||||
@@ -143,18 +141,18 @@ module amg_s_parmatch_aggregator_mod
|
||||
procedure, pass(ag) :: mat_asb => amg_s_parmatch_aggregator_mat_asb
|
||||
procedure, pass(ag) :: inner_mat_asb => amg_s_parmatch_aggregator_inner_mat_asb
|
||||
procedure, pass(ag) :: bld_map => amg_s_parmatch_aggregator_bld_map
|
||||
procedure, pass(ag) :: csetc => s_parmatch_aggr_csetc
|
||||
procedure, pass(ag) :: cseti => s_parmatch_aggr_cseti
|
||||
procedure, pass(ag) :: default => s_parmatch_aggr_set_default
|
||||
procedure, pass(ag) :: sizeof => s_parmatch_aggregator_sizeof
|
||||
procedure, pass(ag) :: update_next => s_parmatch_aggregator_update_next
|
||||
procedure, pass(ag) :: bld_wnxt => s_parmatch_bld_wnxt
|
||||
procedure, pass(ag) :: bld_default_w => s_bld_default_w
|
||||
procedure, pass(ag) :: set_c_default_w => s_set_prm_c_default_w
|
||||
procedure, pass(ag) :: descr => s_parmatch_aggregator_descr
|
||||
procedure, pass(ag) :: clone => s_parmatch_aggregator_clone
|
||||
procedure, pass(ag) :: free => s_parmatch_aggregator_free
|
||||
procedure, nopass :: fmt => s_parmatch_aggregator_fmt
|
||||
procedure, pass(ag) :: csetc => amg_s_parmatch_aggr_csetc
|
||||
procedure, pass(ag) :: cseti => amg_s_parmatch_aggr_cseti
|
||||
procedure, pass(ag) :: default => amg_s_parmatch_aggr_set_default
|
||||
procedure, pass(ag) :: sizeof => amg_s_parmatch_aggregator_sizeof
|
||||
procedure, pass(ag) :: update_next => amg_s_parmatch_aggregator_update_next
|
||||
procedure, pass(ag) :: bld_wnxt => amg_s_parmatch_bld_wnxt
|
||||
procedure, pass(ag) :: bld_default_w => amg_s_bld_default_w
|
||||
procedure, pass(ag) :: set_c_default_w => amg_s_set_prm_c_default_w
|
||||
procedure, pass(ag) :: descr => amg_s_parmatch_aggregator_descr
|
||||
procedure, pass(ag) :: clone => amg_s_parmatch_aggregator_clone
|
||||
procedure, pass(ag) :: free => amg_s_parmatch_aggregator_free
|
||||
procedure, nopass :: fmt => amg_s_parmatch_aggregator_fmt
|
||||
procedure, nopass :: xt_desc => amg_s_parmatch_aggregator_xt_desc
|
||||
end type amg_s_parmatch_aggregator_type
|
||||
|
||||
@@ -320,7 +318,7 @@ module amg_s_parmatch_aggregator_mod
|
||||
|
||||
contains
|
||||
|
||||
subroutine s_bld_default_w(ag,nr)
|
||||
subroutine amg_s_bld_default_w(ag,nr)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -330,9 +328,9 @@ contains
|
||||
if (info /= psb_success_) return
|
||||
ag%w = done
|
||||
!call ag%set_c_default_w()
|
||||
end subroutine s_bld_default_w
|
||||
end subroutine amg_s_bld_default_w
|
||||
|
||||
subroutine s_set_prm_c_default_w(ag)
|
||||
subroutine amg_s_set_prm_c_default_w(ag)
|
||||
use psb_realloc_mod
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
@@ -342,9 +340,9 @@ contains
|
||||
!write(0,*) 'prm_c_deafult_w '
|
||||
call psb_safe_ab_cpy(ag%w,ag%w_nxt,info)
|
||||
|
||||
end subroutine s_set_prm_c_default_w
|
||||
end subroutine amg_s_set_prm_c_default_w
|
||||
|
||||
subroutine s_parmatch_bld_wnxt(ag,ilaggr,valaggr,nx)
|
||||
subroutine amg_s_parmatch_bld_wnxt(ag,ilaggr,valaggr,nx)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -358,14 +356,14 @@ contains
|
||||
!write(0,*) 'Executing bld_wnxt ',nx
|
||||
call psb_realloc(nx,ag%w_nxt,info)
|
||||
|
||||
end subroutine s_parmatch_bld_wnxt
|
||||
end subroutine amg_s_parmatch_bld_wnxt
|
||||
|
||||
function s_parmatch_aggregator_fmt() result(val)
|
||||
function amg_s_parmatch_aggregator_fmt() result(val)
|
||||
implicit none
|
||||
character(len=32) :: val
|
||||
|
||||
val = "Parallel Matching aggregation"
|
||||
end function s_parmatch_aggregator_fmt
|
||||
end function amg_s_parmatch_aggregator_fmt
|
||||
|
||||
function amg_s_parmatch_aggregator_xt_desc() result(val)
|
||||
implicit none
|
||||
@@ -374,7 +372,7 @@ contains
|
||||
val = .true.
|
||||
end function amg_s_parmatch_aggregator_xt_desc
|
||||
|
||||
function s_parmatch_aggregator_sizeof(ag) result(val)
|
||||
function amg_s_parmatch_aggregator_sizeof(ag) result(val)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), intent(in) :: ag
|
||||
@@ -390,9 +388,9 @@ contains
|
||||
if (allocated(ag%base_desc)) val = val + ag%base_desc%sizeof()
|
||||
if (allocated(ag%desc_ax)) val = val + ag%desc_ax%sizeof()
|
||||
|
||||
end function s_parmatch_aggregator_sizeof
|
||||
end function amg_s_parmatch_aggregator_sizeof
|
||||
|
||||
subroutine s_parmatch_aggregator_descr(ag,parms,iout,info)
|
||||
subroutine amg_s_parmatch_aggregator_descr(ag,parms,iout,info)
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), intent(in) :: ag
|
||||
type(amg_sml_parms), intent(in) :: parms
|
||||
@@ -406,7 +404,7 @@ contains
|
||||
call parms%mldescr(iout,info)
|
||||
|
||||
return
|
||||
end subroutine s_parmatch_aggregator_descr
|
||||
end subroutine amg_s_parmatch_aggregator_descr
|
||||
|
||||
function is_legal_malg(alg) result(val)
|
||||
logical :: val
|
||||
@@ -437,7 +435,7 @@ contains
|
||||
end function is_legal_nlevels
|
||||
|
||||
|
||||
subroutine s_parmatch_aggregator_update_next(ag,agnext,info)
|
||||
subroutine amg_s_parmatch_aggregator_update_next(ag,agnext,info)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -452,10 +450,10 @@ contains
|
||||
& agnext%matching_alg = ag%matching_alg
|
||||
if (.not.is_legal_nsweeps(agnext%n_sweeps))&
|
||||
& agnext%n_sweeps = ag%n_sweeps
|
||||
if (.not.is_legal_csize(agnext%max_csize))&
|
||||
& agnext%max_csize = ag%max_csize
|
||||
if (.not.is_legal_nlevels(agnext%max_nlevels))&
|
||||
& agnext%max_nlevels = ag%max_nlevels
|
||||
!!$ if (.not.is_legal_csize(agnext%max_csize))&
|
||||
!!$ & agnext%max_csize = ag%max_csize
|
||||
!!$ if (.not.is_legal_nlevels(agnext%max_nlevels))&
|
||||
!!$ & agnext%max_nlevels = ag%max_nlevels
|
||||
! Is this going to generate shallow copies/memory leaks/double frees?
|
||||
! To be investigated further.
|
||||
call psb_safe_ab_cpy(ag%w_nxt,agnext%w,info)
|
||||
@@ -470,9 +468,9 @@ contains
|
||||
! What should we do here?
|
||||
end select
|
||||
info = 0
|
||||
end subroutine s_parmatch_aggregator_update_next
|
||||
end subroutine amg_s_parmatch_aggregator_update_next
|
||||
|
||||
subroutine s_parmatch_aggr_csetc(ag,what,val,info,idx)
|
||||
subroutine amg_s_parmatch_aggr_csetc(ag,what,val,info,idx)
|
||||
|
||||
Implicit None
|
||||
|
||||
@@ -514,9 +512,9 @@ contains
|
||||
! Do nothing
|
||||
end select
|
||||
return
|
||||
end subroutine s_parmatch_aggr_csetc
|
||||
end subroutine amg_s_parmatch_aggr_csetc
|
||||
|
||||
subroutine s_parmatch_aggr_cseti(ag,what,val,info,idx)
|
||||
subroutine amg_s_parmatch_aggr_cseti(ag,what,val,info,idx)
|
||||
|
||||
Implicit None
|
||||
|
||||
@@ -540,10 +538,6 @@ contains
|
||||
case('AGGR_SIZE')
|
||||
ag%orig_aggr_size = val
|
||||
ag%n_sweeps=max(1,ceiling(log(val*1.0)/log(2.0)))
|
||||
case('PRMC_MAX_CSIZE')
|
||||
ag%max_csize=val
|
||||
case('PRMC_MAX_NLEVELS')
|
||||
ag%max_nlevels=val
|
||||
case('PRMC_W_SIZE')
|
||||
call ag%bld_default_w(val)
|
||||
case('PRMC_REPRODUCIBLE_MATCHING')
|
||||
@@ -556,9 +550,9 @@ contains
|
||||
! Do nothing
|
||||
end select
|
||||
return
|
||||
end subroutine s_parmatch_aggr_cseti
|
||||
end subroutine amg_s_parmatch_aggr_cseti
|
||||
|
||||
subroutine s_parmatch_aggr_set_default(ag)
|
||||
subroutine amg_s_parmatch_aggr_set_default(ag)
|
||||
|
||||
Implicit None
|
||||
|
||||
@@ -569,8 +563,8 @@ contains
|
||||
ag%matching_alg = 0
|
||||
ag%n_sweeps = 1
|
||||
ag%jacobi_sweeps = 0
|
||||
ag%max_nlevels = 36
|
||||
ag%max_csize = -1
|
||||
!!$ ag%max_nlevels = 36
|
||||
!!$ ag%max_csize = -1
|
||||
!
|
||||
! Apparently BootCMatch works better
|
||||
! by keeping all entries
|
||||
@@ -579,9 +573,9 @@ contains
|
||||
|
||||
return
|
||||
|
||||
end subroutine s_parmatch_aggr_set_default
|
||||
end subroutine amg_s_parmatch_aggr_set_default
|
||||
|
||||
subroutine s_parmatch_aggregator_free(ag,info)
|
||||
subroutine amg_s_parmatch_aggregator_free(ag,info)
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), intent(inout) :: ag
|
||||
@@ -618,9 +612,9 @@ contains
|
||||
call ag%rwdesc%free(info); deallocate(ag%rwdesc,stat=info)
|
||||
end if
|
||||
|
||||
end subroutine s_parmatch_aggregator_free
|
||||
end subroutine amg_s_parmatch_aggregator_free
|
||||
|
||||
subroutine s_parmatch_aggregator_clone(ag,agnext,info)
|
||||
subroutine amg_s_parmatch_aggregator_clone(ag,agnext,info)
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), intent(inout) :: ag
|
||||
class(amg_s_base_aggregator_type), allocatable, intent(inout) :: agnext
|
||||
@@ -640,7 +634,7 @@ contains
|
||||
! Should never ever get here
|
||||
info = -1
|
||||
end select
|
||||
end subroutine s_parmatch_aggregator_clone
|
||||
end subroutine amg_s_parmatch_aggregator_clone
|
||||
|
||||
subroutine amg_s_parmatch_aggregator_bld_map(ag,desc_a,desc_ac,ilaggr,nlaggr,&
|
||||
& op_restr,op_prol,map,info)
|
||||
|
||||
@@ -52,7 +52,7 @@ module amg_z_sludist_solver
|
||||
use iso_c_binding
|
||||
use amg_z_base_solver_mod
|
||||
|
||||
#if defined(LPK8)
|
||||
#if (!defined(HAVE_SLUDIST_)) || defined(IPK8)
|
||||
|
||||
type, extends(amg_z_base_solver_type) :: amg_z_sludist_solver_type
|
||||
|
||||
@@ -270,11 +270,13 @@ contains
|
||||
! Local variables
|
||||
type(psb_zspmat_type) :: atmp
|
||||
type(psb_z_csr_sparse_mat) :: acsr
|
||||
integer :: n_row,n_col, nrow_a, nztota, nglob, nzt, npr, npc
|
||||
integer :: ifrst, ibcheck
|
||||
integer(psb_lpk_), allocatable :: gia(:), gja(:)
|
||||
type(psb_ctxt_type) :: ctxt
|
||||
integer :: np,me,i, err_act, debug_unit, debug_level
|
||||
character(len=20) :: name='z_sludist_solver_bld', ch_err
|
||||
integer(psb_lpk_) :: lfrst
|
||||
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota, nglob, nzt, npr, npc
|
||||
integer(psb_ipk_) :: ifrst, ibcheck
|
||||
integer(psb_ipk_) :: np,me,i, err_act, debug_unit, debug_level
|
||||
character(len=20) :: name='z_sludist_solver_bld', ch_err
|
||||
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -293,19 +295,36 @@ contains
|
||||
n_col = desc_a%get_local_cols()
|
||||
nglob = desc_a%get_global_rows()
|
||||
|
||||
call a%cscnv(atmp,info,type='coo')
|
||||
!
|
||||
! Strategy here is as follows: because a call to SLUDIST
|
||||
! as a gobal solver is mostly done at the coarsest level,
|
||||
! even if we start from a problem requiring 8 bytes, chances
|
||||
! are that the global size will be suitable for 4 bytes
|
||||
! anyway, so we hope for the best, and throw an error
|
||||
! if something goes wrong.
|
||||
!
|
||||
if (nglob > huge(1_psb_ipk_)) then
|
||||
write(0,*) me,' ',trim(name),': Error: overflow of local indices '
|
||||
info=psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call a%cscnv(atmp,info,type='csr')
|
||||
! This in case we are dealing with AS
|
||||
call psb_rwextd(n_row,atmp,info,b=b)
|
||||
call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_)
|
||||
call atmp%mv_to(acsr)
|
||||
nrow_a = acsr%get_nrows()
|
||||
nztota = acsr%get_nzeros()
|
||||
call psb_loc_to_glob(ione,lfrst,desc_a,info)
|
||||
|
||||
! Fix the entries to call C-base SuperLU
|
||||
call psb_loc_to_glob(1,ifrst,desc_a,info)
|
||||
call psb_loc_to_glob(nrow_a,ibcheck,desc_a,info)
|
||||
call psb_loc_to_glob(acsr%ja(1:nztota),desc_a,info,iact='I')
|
||||
call psb_realloc(nztota,gja,info)
|
||||
call psb_loc_to_glob(acsr%ja(1:nztota),gja(1:nztota), desc_a, info, iact='I')
|
||||
acsr%ja(1:nztota) = gja(1:nztota)
|
||||
acsr%ja(:) = acsr%ja(:) - 1
|
||||
acsr%irp(:) = acsr%irp(:) - 1
|
||||
ifrst = ifrst - 1
|
||||
ifrst = lfrst - 1
|
||||
info = amg_zsludist_fact(nglob,nrow_a,nztota,ifrst,&
|
||||
& acsr%val,acsr%irp,acsr%ja,sv%lufactors,&
|
||||
& npr,npc)
|
||||
@@ -318,7 +337,6 @@ contains
|
||||
end if
|
||||
|
||||
call acsr%free()
|
||||
call atmp%free()
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),' end'
|
||||
|
||||
@@ -48,7 +48,7 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
use amg_base_prec_type
|
||||
use amg_d_inner_mod
|
||||
#if defined(SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_aggregator_build_tprol
|
||||
#endif
|
||||
@@ -68,7 +68,8 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
real(psb_dpk_), allocatable :: tmpw(:), tmpwnxt(:)
|
||||
integer(psb_lpk_), allocatable :: ixaggr(:), nxaggr(:), tlaggr(:), ivr(:)
|
||||
type(psb_dspmat_type) :: a_tmp
|
||||
integer(c_int) :: match_algorithm, n_sweeps, max_csize, max_nlevels
|
||||
integer(psb_ipk_) :: match_algorithm, n_sweeps
|
||||
integer(psb_lpk_) :: target_csize
|
||||
character(len=40) :: name, ch_err
|
||||
character(len=80) :: fname, prefix_
|
||||
type(psb_ctxt_type) :: ictxt
|
||||
@@ -128,27 +129,22 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
write(debug_unit, *) 'Warning: AGGR_SIZE reset to value ',2**n_sweeps
|
||||
end if
|
||||
end if
|
||||
if (ag%max_csize > 0) then
|
||||
max_csize = ag%max_csize
|
||||
if (ag_data%target_coarse_size > 0) then
|
||||
target_csize = ag_data%target_coarse_size
|
||||
else
|
||||
max_csize = ag_data%min_coarse_size
|
||||
end if
|
||||
if (ag%max_nlevels > 0) then
|
||||
max_nlevels = ag%max_nlevels
|
||||
else
|
||||
max_nlevels = ag_data%max_levs
|
||||
target_csize = ag_data%min_coarse_size
|
||||
end if
|
||||
if (.true.) then
|
||||
block
|
||||
integer(psb_ipk_) :: ipv(2)
|
||||
ipv(1) = max_csize
|
||||
ipv(1) = target_csize
|
||||
ipv(2) = n_sweeps
|
||||
call psb_bcast(ictxt,ipv)
|
||||
max_csize = ipv(1)
|
||||
target_csize = ipv(1)
|
||||
n_sweeps = ipv(2)
|
||||
end block
|
||||
else
|
||||
call psb_bcast(ictxt,max_csize)
|
||||
call psb_bcast(ictxt,target_csize)
|
||||
call psb_bcast(ictxt,n_sweeps)
|
||||
end if
|
||||
if (n_sweeps /= ag%n_sweeps) then
|
||||
@@ -156,7 +152,7 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
end if
|
||||
!!$ if (me==0) write(0,*) 'Matching sweeps: ',n_sweeps
|
||||
n_sweeps = max(1,n_sweeps)
|
||||
if (debug) write(0,*) me,' Copies, with n_sweeps: ',n_sweeps,max_csize
|
||||
if (debug) write(0,*) me,' Copies, with n_sweeps: ',n_sweeps,target_csize
|
||||
if (ag%unsmoothed_hierarchy.and.allocated(ag%base_a)) then
|
||||
call ag%base_a%cp_to(acsr)
|
||||
if (ag%do_clean_zeros) call acsr%clean_zeros(info)
|
||||
@@ -242,7 +238,7 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
|
||||
if (debug) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'N_sweeps ',n_sweeps,nr,desc_acv(0)%is_ok(),max_csize
|
||||
if (me == 0) write(0,*) 'N_sweeps ',n_sweeps,nr,desc_acv(0)%is_ok(),target_csize
|
||||
end if
|
||||
|
||||
!
|
||||
@@ -264,7 +260,7 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
!
|
||||
if (debug) write(0,*) me,' Into matchbox_build_prol ',info
|
||||
if (do_timings) call psb_tic(idx_mboxp)
|
||||
call dmatchboxp_build_prol(tmpw,acv(i-1),desc_acv(i-1),ixaggr,nxaggr,tmp_prol,info,&
|
||||
call amg_d_matchboxp_build_prol(tmpw,acv(i-1),desc_acv(i-1),ixaggr,nxaggr,tmp_prol,info,&
|
||||
& symmetrize=ag%need_symmetrize,reproducible=ag%reproducible_matching)
|
||||
if (do_timings) call psb_toc(idx_mboxp)
|
||||
if (debug) write(0,*) me,' Out from matchbox_build_prol ',info
|
||||
@@ -300,11 +296,11 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
|
||||
if (debug) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me==0) write(0,*) me,trim(name),' Done mat_asb:',i,sum(nxaggr),max_csize,info
|
||||
if (me==0) write(0,*) me,trim(name),' Done mat_asb:',i,sum(nxaggr),target_csize,info
|
||||
csz = sum(nxaggr)
|
||||
call psb_bcast(ictxt,csz)
|
||||
if (csz /= sum(nxaggr)) write(0,*) me,trim(name),' Mismatch matasb',&
|
||||
& csz,sum(nxaggr),max_csize
|
||||
& csz,sum(nxaggr),target_csize
|
||||
end if
|
||||
if (psb_errstatus_fatal()) write(0,*)me,trim(name),'Error fatal on entry to tmpwnxt 2'
|
||||
|
||||
@@ -342,10 +338,10 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
call move_alloc(tmpwnxt,tmpw)
|
||||
if (debug) then
|
||||
if (csz /= sum(nlaggr)) write(0,*) me,trim(name),' Mismatch 2 matasb',&
|
||||
& csz,sum(nlaggr),max_csize, info
|
||||
& csz,sum(nlaggr),target_csize, info
|
||||
end if
|
||||
call acv(i-1)%free()
|
||||
if ((sum(nlaggr) <= max_csize).or.(any(nlaggr==0))) then
|
||||
if ((sum(nlaggr) <= target_csize).or.(any(nlaggr==0))) then
|
||||
x_sweeps = i
|
||||
exit sweeps_loop
|
||||
end if
|
||||
|
||||
@@ -48,7 +48,7 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
use amg_base_prec_type
|
||||
use amg_s_inner_mod
|
||||
#if defined(SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_aggregator_build_tprol
|
||||
#endif
|
||||
@@ -68,7 +68,8 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
real(psb_spk_), allocatable :: tmpw(:), tmpwnxt(:)
|
||||
integer(psb_lpk_), allocatable :: ixaggr(:), nxaggr(:), tlaggr(:), ivr(:)
|
||||
type(psb_sspmat_type) :: a_tmp
|
||||
integer(c_int) :: match_algorithm, n_sweeps, max_csize, max_nlevels
|
||||
integer(psb_ipk_) :: match_algorithm, n_sweeps
|
||||
integer(psb_lpk_) :: target_csize
|
||||
character(len=40) :: name, ch_err
|
||||
character(len=80) :: fname, prefix_
|
||||
type(psb_ctxt_type) :: ictxt
|
||||
@@ -128,27 +129,22 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
write(debug_unit, *) 'Warning: AGGR_SIZE reset to value ',2**n_sweeps
|
||||
end if
|
||||
end if
|
||||
if (ag%max_csize > 0) then
|
||||
max_csize = ag%max_csize
|
||||
if (ag_data%target_coarse_size > 0) then
|
||||
target_csize = ag_data%target_coarse_size
|
||||
else
|
||||
max_csize = ag_data%min_coarse_size
|
||||
end if
|
||||
if (ag%max_nlevels > 0) then
|
||||
max_nlevels = ag%max_nlevels
|
||||
else
|
||||
max_nlevels = ag_data%max_levs
|
||||
target_csize = ag_data%min_coarse_size
|
||||
end if
|
||||
if (.true.) then
|
||||
block
|
||||
integer(psb_ipk_) :: ipv(2)
|
||||
ipv(1) = max_csize
|
||||
ipv(1) = target_csize
|
||||
ipv(2) = n_sweeps
|
||||
call psb_bcast(ictxt,ipv)
|
||||
max_csize = ipv(1)
|
||||
target_csize = ipv(1)
|
||||
n_sweeps = ipv(2)
|
||||
end block
|
||||
else
|
||||
call psb_bcast(ictxt,max_csize)
|
||||
call psb_bcast(ictxt,target_csize)
|
||||
call psb_bcast(ictxt,n_sweeps)
|
||||
end if
|
||||
if (n_sweeps /= ag%n_sweeps) then
|
||||
@@ -156,7 +152,7 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
end if
|
||||
!!$ if (me==0) write(0,*) 'Matching sweeps: ',n_sweeps
|
||||
n_sweeps = max(1,n_sweeps)
|
||||
if (debug) write(0,*) me,' Copies, with n_sweeps: ',n_sweeps,max_csize
|
||||
if (debug) write(0,*) me,' Copies, with n_sweeps: ',n_sweeps,target_csize
|
||||
if (ag%unsmoothed_hierarchy.and.allocated(ag%base_a)) then
|
||||
call ag%base_a%cp_to(acsr)
|
||||
if (ag%do_clean_zeros) call acsr%clean_zeros(info)
|
||||
@@ -242,7 +238,7 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
|
||||
if (debug) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*) 'N_sweeps ',n_sweeps,nr,desc_acv(0)%is_ok(),max_csize
|
||||
if (me == 0) write(0,*) 'N_sweeps ',n_sweeps,nr,desc_acv(0)%is_ok(),target_csize
|
||||
end if
|
||||
|
||||
!
|
||||
@@ -264,7 +260,7 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
!
|
||||
if (debug) write(0,*) me,' Into matchbox_build_prol ',info
|
||||
if (do_timings) call psb_tic(idx_mboxp)
|
||||
call smatchboxp_build_prol(tmpw,acv(i-1),desc_acv(i-1),ixaggr,nxaggr,tmp_prol,info,&
|
||||
call amg_s_matchboxp_build_prol(tmpw,acv(i-1),desc_acv(i-1),ixaggr,nxaggr,tmp_prol,info,&
|
||||
& symmetrize=ag%need_symmetrize,reproducible=ag%reproducible_matching)
|
||||
if (do_timings) call psb_toc(idx_mboxp)
|
||||
if (debug) write(0,*) me,' Out from matchbox_build_prol ',info
|
||||
@@ -300,11 +296,11 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
|
||||
if (debug) then
|
||||
call psb_barrier(ictxt)
|
||||
if (me==0) write(0,*) me,trim(name),' Done mat_asb:',i,sum(nxaggr),max_csize,info
|
||||
if (me==0) write(0,*) me,trim(name),' Done mat_asb:',i,sum(nxaggr),target_csize,info
|
||||
csz = sum(nxaggr)
|
||||
call psb_bcast(ictxt,csz)
|
||||
if (csz /= sum(nxaggr)) write(0,*) me,trim(name),' Mismatch matasb',&
|
||||
& csz,sum(nxaggr),max_csize
|
||||
& csz,sum(nxaggr),target_csize
|
||||
end if
|
||||
if (psb_errstatus_fatal()) write(0,*)me,trim(name),'Error fatal on entry to tmpwnxt 2'
|
||||
|
||||
@@ -342,10 +338,10 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
call move_alloc(tmpwnxt,tmpw)
|
||||
if (debug) then
|
||||
if (csz /= sum(nlaggr)) write(0,*) me,trim(name),' Mismatch 2 matasb',&
|
||||
& csz,sum(nlaggr),max_csize, info
|
||||
& csz,sum(nlaggr),target_csize, info
|
||||
end if
|
||||
call acv(i-1)%free()
|
||||
if ((sum(nlaggr) <= max_csize).or.(any(nlaggr==0))) then
|
||||
if ((sum(nlaggr) <= target_csize).or.(any(nlaggr==0))) then
|
||||
x_sweeps = i
|
||||
exit sweeps_loop
|
||||
end if
|
||||
|
||||
@@ -571,7 +571,6 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
|
||||
type(amg_c_krm_solver_type) :: krm_slv
|
||||
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
|
||||
call p%precv(nlev_)%set(krm_slv,info)
|
||||
call p%precv(nlev_)%default()
|
||||
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
|
||||
end block
|
||||
end select
|
||||
@@ -729,7 +728,6 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
|
||||
type(amg_c_krm_solver_type) :: krm_slv
|
||||
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
|
||||
call p%precv(nlev_)%set(krm_slv,info)
|
||||
call p%precv(nlev_)%default()
|
||||
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
|
||||
end block
|
||||
end select
|
||||
|
||||
@@ -599,7 +599,6 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
|
||||
type(amg_d_krm_solver_type) :: krm_slv
|
||||
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
|
||||
call p%precv(nlev_)%set(krm_slv,info)
|
||||
call p%precv(nlev_)%default()
|
||||
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
|
||||
end block
|
||||
end select
|
||||
@@ -773,7 +772,6 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
|
||||
type(amg_d_krm_solver_type) :: krm_slv
|
||||
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
|
||||
call p%precv(nlev_)%set(krm_slv,info)
|
||||
call p%precv(nlev_)%default()
|
||||
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
|
||||
end block
|
||||
end select
|
||||
|
||||
@@ -94,7 +94,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#define HANDLE_SIZE 8
|
||||
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
typedef struct {
|
||||
SuperMatrix *A;
|
||||
dLUstruct_t *LUstruct;
|
||||
@@ -135,7 +135,7 @@ int amg_dsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
SuperMatrix *A;
|
||||
NRformat_loc *Astore;
|
||||
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
dScalePermstruct_t *ScalePermstruct;
|
||||
dLUstruct_t *LUstruct;
|
||||
dSOLVEstruct_t SOLVEstruct;
|
||||
@@ -148,9 +148,9 @@ int amg_dsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
int i, panel_size, permc_spec, relax, info;
|
||||
trans_t trans;
|
||||
double drop_tol = 0.0, b[1], berr[1];
|
||||
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
|
||||
#if (SLUD_VERSION_>=50)
|
||||
superlu_dist_options_t options;
|
||||
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
|
||||
#elif (SLUD_VERSION_>=30)
|
||||
superlu_options_t options;
|
||||
#else
|
||||
choke_on_me;
|
||||
@@ -174,7 +174,7 @@ int amg_dsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
SLU_NR_loc, SLU_D, SLU_GE);
|
||||
|
||||
/* Initialize ScalePermstruct and LUstruct. */
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
ScalePermstruct = (dScalePermstruct_t *) SUPERLU_MALLOC(sizeof(dScalePermstruct_t));
|
||||
LUstruct = (dLUstruct_t *) SUPERLU_MALLOC(sizeof(dLUstruct_t));
|
||||
dScalePermstructInit(n,n, ScalePermstruct);
|
||||
@@ -183,11 +183,11 @@ int amg_dsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t));
|
||||
ScalePermstructInit(n,n, ScalePermstruct);
|
||||
#endif
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
dLUstructInit(n, LUstruct);
|
||||
#elif defined(SLUD_VERSION_4) || defined(SLUD_VERSION_5) || defined(SLUD_VERSION_6)
|
||||
#elif (SLUD_VERSION_>=40)
|
||||
LUstructInit(n, LUstruct);
|
||||
#elif defined(SLUD_VERSION_3)
|
||||
#elif (SLUD_VERSION_>=30)
|
||||
LUstructInit(n,n, LUstruct);
|
||||
#else
|
||||
choke_on_me;
|
||||
@@ -245,7 +245,7 @@ int amg_dsludist_solve(int itrans, int n, int nrhs,
|
||||
*/
|
||||
#ifdef Have_SLUDist_
|
||||
SuperMatrix *A;
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
dScalePermstruct_t *ScalePermstruct;
|
||||
dLUstruct_t *LUstruct;
|
||||
dSOLVEstruct_t SOLVEstruct;
|
||||
@@ -259,9 +259,9 @@ int amg_dsludist_solve(int itrans, int n, int nrhs,
|
||||
trans_t trans;
|
||||
double drop_tol = 0.0;
|
||||
double *berr;
|
||||
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_6) ||defined(SLUD_VERSION_5)
|
||||
#if (SLUD_VERSION_>=50)
|
||||
superlu_dist_options_t options;
|
||||
#elif defined(SLUD_VERSION_4)|| defined(SLUD_VERSION_3)
|
||||
#elif (SLUD_VERSION_>=30)
|
||||
superlu_options_t options;
|
||||
#else
|
||||
choke_on_me;
|
||||
@@ -331,7 +331,7 @@ int amg_dsludist_free(void *f_factors)
|
||||
*/
|
||||
#ifdef Have_SLUDist_
|
||||
SuperMatrix *A;
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
dScalePermstruct_t *ScalePermstruct;
|
||||
dLUstruct_t *LUstruct;
|
||||
dSOLVEstruct_t SOLVEstruct;
|
||||
@@ -345,9 +345,9 @@ int amg_dsludist_free(void *f_factors)
|
||||
trans_t trans;
|
||||
double drop_tol = 0.0;
|
||||
double *berr;
|
||||
#if defined(SLUD_VERSION_63)||defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
|
||||
#if (SLUD_VERSION_>=50)
|
||||
superlu_dist_options_t options;
|
||||
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
|
||||
#elif (SLUD_VERSION_>=30)
|
||||
superlu_options_t options;
|
||||
#else
|
||||
choke_on_me;
|
||||
@@ -368,7 +368,7 @@ int amg_dsludist_free(void *f_factors)
|
||||
// we either have a leak or a segfault here.
|
||||
// To be investigated further.
|
||||
//Destroy_CompRowLoc_Matrix_dist(A);
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
dScalePermstructFree(ScalePermstruct);
|
||||
dLUstructFree(LUstruct);
|
||||
#else
|
||||
|
||||
@@ -571,7 +571,6 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
|
||||
type(amg_s_krm_solver_type) :: krm_slv
|
||||
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
|
||||
call p%precv(nlev_)%set(krm_slv,info)
|
||||
call p%precv(nlev_)%default()
|
||||
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
|
||||
end block
|
||||
end select
|
||||
@@ -729,7 +728,6 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
|
||||
type(amg_s_krm_solver_type) :: krm_slv
|
||||
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
|
||||
call p%precv(nlev_)%set(krm_slv,info)
|
||||
call p%precv(nlev_)%default()
|
||||
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
|
||||
end block
|
||||
end select
|
||||
|
||||
@@ -599,7 +599,6 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
|
||||
type(amg_z_krm_solver_type) :: krm_slv
|
||||
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
|
||||
call p%precv(nlev_)%set(krm_slv,info)
|
||||
call p%precv(nlev_)%default()
|
||||
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
|
||||
end block
|
||||
end select
|
||||
@@ -773,7 +772,6 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
|
||||
type(amg_z_krm_solver_type) :: krm_slv
|
||||
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
|
||||
call p%precv(nlev_)%set(krm_slv,info)
|
||||
call p%precv(nlev_)%default()
|
||||
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
|
||||
end block
|
||||
end select
|
||||
|
||||
@@ -94,7 +94,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#define HANDLE_SIZE 8
|
||||
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
typedef struct {
|
||||
SuperMatrix *A;
|
||||
zLUstruct_t *LUstruct;
|
||||
@@ -142,7 +142,7 @@ int amg_zsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
SuperMatrix *A;
|
||||
NRformat_loc *Astore;
|
||||
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
zScalePermstruct_t *ScalePermstruct;
|
||||
zLUstruct_t *LUstruct;
|
||||
zSOLVEstruct_t SOLVEstruct;
|
||||
@@ -155,9 +155,9 @@ int amg_zsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
int i, panel_size, permc_spec, relax, info;
|
||||
trans_t trans;
|
||||
double drop_tol = 0.0,berr[1];
|
||||
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
|
||||
#if (SLUD_VERSION_>=50)
|
||||
superlu_dist_options_t options;
|
||||
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
|
||||
#elif (SLUD_VERSION_>=30)
|
||||
superlu_options_t options;
|
||||
#else
|
||||
choke_on_me;
|
||||
@@ -181,7 +181,7 @@ int amg_zsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
SLU_NR_loc, SLU_Z, SLU_GE);
|
||||
|
||||
/* Initialize ScalePermstruct and LUstruct. */
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
ScalePermstruct = (zScalePermstruct_t *) SUPERLU_MALLOC(sizeof(zScalePermstruct_t));
|
||||
LUstruct = (zLUstruct_t *) SUPERLU_MALLOC(sizeof(zLUstruct_t));
|
||||
zScalePermstructInit(n,n, ScalePermstruct);
|
||||
@@ -190,11 +190,11 @@ int amg_zsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t));
|
||||
ScalePermstructInit(n,n, ScalePermstruct);
|
||||
#endif
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
zLUstructInit(n, LUstruct);
|
||||
#elif defined(SLUD_VERSION_4) || defined(SLUD_VERSION_5) || defined(SLUD_VERSION_6)
|
||||
#elif (SLUD_VERSION_>=40)
|
||||
LUstructInit(n, LUstruct);
|
||||
#elif defined(SLUD_VERSION_3)
|
||||
#elif (SLUD_VERSION_>=30)
|
||||
LUstructInit(n,n, LUstruct);
|
||||
#else
|
||||
choke_on_me;
|
||||
@@ -257,7 +257,7 @@ int amg_zsludist_solve(int itrans, int n, int nrhs,
|
||||
*/
|
||||
#ifdef Have_SLUDist_
|
||||
SuperMatrix *A;
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
zScalePermstruct_t *ScalePermstruct;
|
||||
zLUstruct_t *LUstruct;
|
||||
zSOLVEstruct_t SOLVEstruct;
|
||||
@@ -271,9 +271,9 @@ int amg_zsludist_solve(int itrans, int n, int nrhs,
|
||||
trans_t trans;
|
||||
double drop_tol = 0.0;
|
||||
double *berr;
|
||||
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_6) ||defined(SLUD_VERSION_5)
|
||||
#if (SLUD_VERSION_>=50)
|
||||
superlu_dist_options_t options;
|
||||
#elif defined(SLUD_VERSION_4)|| defined(SLUD_VERSION_3)
|
||||
#elif (SLUD_VERSION_>=30)
|
||||
superlu_options_t options;
|
||||
#else
|
||||
choke_on_me;
|
||||
@@ -343,7 +343,7 @@ int amg_zsludist_free(void *f_factors)
|
||||
*/
|
||||
#ifdef Have_SLUDist_
|
||||
SuperMatrix *A;
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
zScalePermstruct_t *ScalePermstruct;
|
||||
zLUstruct_t *LUstruct;
|
||||
zSOLVEstruct_t SOLVEstruct;
|
||||
@@ -357,9 +357,9 @@ int amg_zsludist_free(void *f_factors)
|
||||
trans_t trans;
|
||||
double drop_tol = 0.0;
|
||||
double *berr;
|
||||
#if defined(SLUD_VERSION_63)||defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
|
||||
#if (SLUD_VERSION_>=50)
|
||||
superlu_dist_options_t options;
|
||||
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
|
||||
#elif (SLUD_VERSION_>=30)
|
||||
superlu_options_t options;
|
||||
#else
|
||||
choke_on_me;
|
||||
@@ -380,7 +380,7 @@ int amg_zsludist_free(void *f_factors)
|
||||
// we either have a leak or a segfault here.
|
||||
// To be investigated further.
|
||||
//Destroy_CompRowLoc_Matrix_dist(A);
|
||||
#if defined(SLUD_VERSION_63)
|
||||
#if (SLUD_VERSION_>=63)
|
||||
zScalePermstructFree(ScalePermstruct);
|
||||
zLUstructFree(LUstruct);
|
||||
#else
|
||||
|
||||
@@ -83,6 +83,8 @@ subroutine amg_c_base_onelev_descr(lv,il,nl,ilmin,info,iout,verbosity)
|
||||
write(iout_,*)
|
||||
if (il == ilmin) then
|
||||
call lv%parms%mlcycledsc(iout_,info)
|
||||
end if
|
||||
if (((ilmin==1).and.(il==2)).or.((ilmin>1).and.(il==ilmin))) then
|
||||
if (allocated(lv%aggr)) then
|
||||
call lv%aggr%descr(lv%parms,iout_,info)
|
||||
else
|
||||
|
||||
@@ -101,7 +101,13 @@ subroutine amg_c_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
|
||||
if (global_num_) then
|
||||
if (level >= 2) then
|
||||
if (level == 1) then
|
||||
if (ac_) then
|
||||
ivr = lv%base_desc%get_global_indices(owned=.false.)
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%base_a%print(fname,head=head,iv=ivr)
|
||||
end if
|
||||
else if (level >= 2) then
|
||||
if (ac_) then
|
||||
ivr = lv%desc_ac%get_global_indices(owned=.false.)
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
@@ -126,7 +132,12 @@ subroutine amg_c_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
end if
|
||||
else
|
||||
if (level >= 2) then
|
||||
if (level == 1) then
|
||||
if (ac_) then
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%base_a%print(fname,head=head)
|
||||
end if
|
||||
else if (level >= 2) then
|
||||
if (ac_) then
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%ac%print(fname,head=head)
|
||||
@@ -146,16 +157,7 @@ subroutine amg_c_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
end if
|
||||
|
||||
if (level >= 2) then
|
||||
if (allocated(lv%sm)) then
|
||||
call lv%sm%dump(lv%desc_ac,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
|
||||
end if
|
||||
if (allocated(lv%sm2a)) then
|
||||
call lv%sm2a%dump(lv%desc_ac,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm2a",global_num=global_num)
|
||||
end if
|
||||
else
|
||||
if (level >= 1) then
|
||||
if (allocated(lv%sm)) then
|
||||
call lv%sm%dump(lv%base_desc,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
|
||||
|
||||
@@ -83,6 +83,8 @@ subroutine amg_d_base_onelev_descr(lv,il,nl,ilmin,info,iout,verbosity)
|
||||
write(iout_,*)
|
||||
if (il == ilmin) then
|
||||
call lv%parms%mlcycledsc(iout_,info)
|
||||
end if
|
||||
if (((ilmin==1).and.(il==2)).or.((ilmin>1).and.(il==ilmin))) then
|
||||
if (allocated(lv%aggr)) then
|
||||
call lv%aggr%descr(lv%parms,iout_,info)
|
||||
else
|
||||
|
||||
@@ -101,7 +101,13 @@ subroutine amg_d_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
|
||||
if (global_num_) then
|
||||
if (level >= 2) then
|
||||
if (level == 1) then
|
||||
if (ac_) then
|
||||
ivr = lv%base_desc%get_global_indices(owned=.false.)
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%base_a%print(fname,head=head,iv=ivr)
|
||||
end if
|
||||
else if (level >= 2) then
|
||||
if (ac_) then
|
||||
ivr = lv%desc_ac%get_global_indices(owned=.false.)
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
@@ -126,7 +132,12 @@ subroutine amg_d_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
end if
|
||||
else
|
||||
if (level >= 2) then
|
||||
if (level == 1) then
|
||||
if (ac_) then
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%base_a%print(fname,head=head)
|
||||
end if
|
||||
else if (level >= 2) then
|
||||
if (ac_) then
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%ac%print(fname,head=head)
|
||||
@@ -146,16 +157,7 @@ subroutine amg_d_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
end if
|
||||
|
||||
if (level >= 2) then
|
||||
if (allocated(lv%sm)) then
|
||||
call lv%sm%dump(lv%desc_ac,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
|
||||
end if
|
||||
if (allocated(lv%sm2a)) then
|
||||
call lv%sm2a%dump(lv%desc_ac,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm2a",global_num=global_num)
|
||||
end if
|
||||
else
|
||||
if (level >= 1) then
|
||||
if (allocated(lv%sm)) then
|
||||
call lv%sm%dump(lv%base_desc,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
|
||||
|
||||
@@ -83,6 +83,8 @@ subroutine amg_s_base_onelev_descr(lv,il,nl,ilmin,info,iout,verbosity)
|
||||
write(iout_,*)
|
||||
if (il == ilmin) then
|
||||
call lv%parms%mlcycledsc(iout_,info)
|
||||
end if
|
||||
if (((ilmin==1).and.(il==2)).or.((ilmin>1).and.(il==ilmin))) then
|
||||
if (allocated(lv%aggr)) then
|
||||
call lv%aggr%descr(lv%parms,iout_,info)
|
||||
else
|
||||
|
||||
@@ -101,7 +101,13 @@ subroutine amg_s_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
|
||||
if (global_num_) then
|
||||
if (level >= 2) then
|
||||
if (level == 1) then
|
||||
if (ac_) then
|
||||
ivr = lv%base_desc%get_global_indices(owned=.false.)
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%base_a%print(fname,head=head,iv=ivr)
|
||||
end if
|
||||
else if (level >= 2) then
|
||||
if (ac_) then
|
||||
ivr = lv%desc_ac%get_global_indices(owned=.false.)
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
@@ -126,7 +132,12 @@ subroutine amg_s_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
end if
|
||||
else
|
||||
if (level >= 2) then
|
||||
if (level == 1) then
|
||||
if (ac_) then
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%base_a%print(fname,head=head)
|
||||
end if
|
||||
else if (level >= 2) then
|
||||
if (ac_) then
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%ac%print(fname,head=head)
|
||||
@@ -146,16 +157,7 @@ subroutine amg_s_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
end if
|
||||
|
||||
if (level >= 2) then
|
||||
if (allocated(lv%sm)) then
|
||||
call lv%sm%dump(lv%desc_ac,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
|
||||
end if
|
||||
if (allocated(lv%sm2a)) then
|
||||
call lv%sm2a%dump(lv%desc_ac,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm2a",global_num=global_num)
|
||||
end if
|
||||
else
|
||||
if (level >= 1) then
|
||||
if (allocated(lv%sm)) then
|
||||
call lv%sm%dump(lv%base_desc,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
|
||||
|
||||
@@ -83,6 +83,8 @@ subroutine amg_z_base_onelev_descr(lv,il,nl,ilmin,info,iout,verbosity)
|
||||
write(iout_,*)
|
||||
if (il == ilmin) then
|
||||
call lv%parms%mlcycledsc(iout_,info)
|
||||
end if
|
||||
if (((ilmin==1).and.(il==2)).or.((ilmin>1).and.(il==ilmin))) then
|
||||
if (allocated(lv%aggr)) then
|
||||
call lv%aggr%descr(lv%parms,iout_,info)
|
||||
else
|
||||
|
||||
@@ -101,7 +101,13 @@ subroutine amg_z_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
|
||||
if (global_num_) then
|
||||
if (level >= 2) then
|
||||
if (level == 1) then
|
||||
if (ac_) then
|
||||
ivr = lv%base_desc%get_global_indices(owned=.false.)
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%base_a%print(fname,head=head,iv=ivr)
|
||||
end if
|
||||
else if (level >= 2) then
|
||||
if (ac_) then
|
||||
ivr = lv%desc_ac%get_global_indices(owned=.false.)
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
@@ -126,7 +132,12 @@ subroutine amg_z_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
end if
|
||||
else
|
||||
if (level >= 2) then
|
||||
if (level == 1) then
|
||||
if (ac_) then
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%base_a%print(fname,head=head)
|
||||
end if
|
||||
else if (level >= 2) then
|
||||
if (ac_) then
|
||||
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_ac.mtx'
|
||||
call lv%ac%print(fname,head=head)
|
||||
@@ -146,16 +157,7 @@ subroutine amg_z_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
|
||||
end if
|
||||
end if
|
||||
|
||||
if (level >= 2) then
|
||||
if (allocated(lv%sm)) then
|
||||
call lv%sm%dump(lv%desc_ac,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
|
||||
end if
|
||||
if (allocated(lv%sm2a)) then
|
||||
call lv%sm2a%dump(lv%desc_ac,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm2a",global_num=global_num)
|
||||
end if
|
||||
else
|
||||
if (level >= 1) then
|
||||
if (allocated(lv%sm)) then
|
||||
call lv%sm%dump(lv%base_desc,level,info,smoother=smoother, &
|
||||
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
|
||||
|
||||
+3
-1
@@ -852,6 +852,7 @@ if test "x$pac_sludist_header_ok" == "xyes" ; then
|
||||
dnl Maybe lib?
|
||||
SLUDIST_LIBS="$amg4psblas_cv_superludist -L$amg4psblas_cv_superludistdir/lib";
|
||||
LIBS="$SLUDIST_LIBS -lm $save_LIBS";
|
||||
AC_MSG_CHECKING([for superlu_malloc_dist in $SLUDIST_LIBS])
|
||||
AC_TRY_LINK_FUNC(superlu_malloc_dist,
|
||||
[amg4psblas_cv_have_superludist=yes;pac_sludist_lib_ok=yes;],
|
||||
[amg4psblas_cv_have_superludist=no;pac_sludist_lib_ok=no;
|
||||
@@ -861,12 +862,13 @@ if test "x$pac_sludist_header_ok" == "xyes" ; then
|
||||
dnl Maybe lib64?
|
||||
SLUDIST_LIBS="$amg4psblas_cv_superludist -L$amg4psblas_cv_superludistdir/lib64";
|
||||
LIBS="$SLUDIST_LIBS -lm $save_LIBS";
|
||||
AC_MSG_CHECKING([for superlu_malloc_dist in $SLUDIST_LIBS])
|
||||
AC_TRY_LINK_FUNC(superlu_malloc_dist,
|
||||
[amg4psblas_cv_have_superludist=yes;pac_sludist_lib_ok=yes;],
|
||||
[amg4psblas_cv_have_superludist=no;pac_sludist_lib_ok=no;
|
||||
SLUDIST_LIBS="";SLUDIST_INCLUDES=""])
|
||||
fi
|
||||
AC_MSG_RESULT($pac_sludist_lib_ok)
|
||||
AC_MSG_RESULT([$pac_sludist_lib_ok $SLUDIST_LIBS])
|
||||
fi
|
||||
|
||||
if test "x$pac_sludist_lib_ok" == "xyes" ; then
|
||||
|
||||
+97
-8
@@ -133,6 +133,9 @@ FCFLAGS="$save_FCFLAGS";
|
||||
save_CFLAGS="$CFLAGS";
|
||||
AC_PROG_CC([cc xlc pgcc icc gcc ])
|
||||
CFLAGS="$save_CFLAGS";
|
||||
save_CXXFLAGS="$CXXFLAGS";
|
||||
AC_PROG_CXX([CC xlc++ icpc g++])
|
||||
CXXFLAGS="$save_CXXFLAGS";
|
||||
dnl AC_PROG_CXX
|
||||
|
||||
dnl AC_PROG_F90 doesn't exist, at the time of writing this !
|
||||
@@ -158,6 +161,16 @@ if eval "$FC -qversion 2>&1 | grep XL 2>/dev/null" ; then
|
||||
# since (as far as it is known to us) -WF, is not used in earlier versions.
|
||||
# More problems could be undocumented yet.
|
||||
fi
|
||||
|
||||
if test "X$CC" == "X" ; then
|
||||
AC_MSG_ERROR([Problem : No C compiler specified nor found!])
|
||||
fi
|
||||
AC_PROG_CC_STDC()
|
||||
if test "x$ac_cv_prog_cc_stdc" == "xno" ; then
|
||||
AC_MSG_ERROR([Problem : Need a C99 compiler ! ])
|
||||
else
|
||||
C99OPT="$ac_cv_prog_cc_stdc";
|
||||
fi
|
||||
###############################################################################
|
||||
# Suitable MPI compilers detection
|
||||
###############################################################################
|
||||
@@ -171,6 +184,7 @@ if test x"$pac_cv_serial_mpi" == x"yes" ; then
|
||||
FAKEMPI="fakempi.o";
|
||||
MPIFC="$FC";
|
||||
MPICC="$CC";
|
||||
MPICXX="$CXX";
|
||||
CXXDEFINES="-DSERIAL_MPI $CXXDEFINES";
|
||||
|
||||
else
|
||||
@@ -190,9 +204,17 @@ if test "X$MPIFC" = "X" ; then
|
||||
fi
|
||||
|
||||
ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for Fortran]])])
|
||||
AC_LANG([C++])
|
||||
if test "X$MPICXX" = "X" ; then
|
||||
# This is our MPICC compiler preference: it will override ACX_MPI's first try.
|
||||
AC_CHECK_PROGS([MPICXX],[mpxlc++ mpiicpc mpicxx])
|
||||
fi
|
||||
ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for C++]])])
|
||||
AC_LANG([Fortran])
|
||||
|
||||
FC="$MPIFC" ;
|
||||
CC="$MPICC";
|
||||
CXX="$MPICXX";
|
||||
fi
|
||||
|
||||
AC_LANG([C])
|
||||
@@ -217,10 +239,12 @@ fi
|
||||
|
||||
dnl NOTE : no spaces before the comma, and no brackets before the second argument!
|
||||
PAC_ARG_WITH_FLAGS(ccopt,CCOPT)
|
||||
PAC_ARG_WITH_FLAGS(cxxopt,CXXOPT)
|
||||
PAC_ARG_WITH_FLAGS(fcopt,FCOPT)
|
||||
PAC_ARG_WITH_LIBS
|
||||
PAC_ARG_WITH_FLAGS(clibs,CLIBS)
|
||||
PAC_ARG_WITH_FLAGS(flibs,FLIBS)
|
||||
PAC_ARG_WITH_FLAGS(cxxlibs,CXXLIBS)
|
||||
|
||||
dnl candidates for removal:
|
||||
PAC_ARG_WITH_FLAGS(library-path,LIBRARYPATH)
|
||||
@@ -230,6 +254,20 @@ PAC_ARG_WITH_FLAGS(module-path,MODULE_PATH)
|
||||
# we just gave the user the chance to append values to these variables
|
||||
PAC_ARG_WITH_EXTRA_LIBS
|
||||
|
||||
# Check if we need extra libs (e.g. for OpenMPI)
|
||||
AC_MSG_CHECKING([Extra mpicxx libs?])
|
||||
xtrlibs=`mpicxx --showme:link 2>/dev/null`;
|
||||
if (( $? == 0 ))
|
||||
then
|
||||
EXTRA_LIBS="$EXTRA_LIBS $xtrlibs";
|
||||
AC_MSG_RESULT([$xtrlibs])
|
||||
else
|
||||
AC_MSG_RESULT([none])
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Sanity checks, although redundant (useful when debugging this configure.ac)!
|
||||
###############################################################################
|
||||
@@ -395,6 +433,36 @@ if test "X$CCOPT" == "X" ; then
|
||||
fi
|
||||
fi
|
||||
#CFLAGS="${CCOPT}"
|
||||
if test "X$CXXOPT" == "X" ; then
|
||||
CXXOPT="$CXXFLAGS";
|
||||
fi
|
||||
if test "X$CXXOPT" == "X" ; then
|
||||
if test "X$psblas_cv_fc" == "Xgcc" ; then
|
||||
# note that no space should be placed around the equality symbol in assignements
|
||||
# Note : 'native' is valid _only_ on GCC/x86 (32/64 bits)
|
||||
CXXOPT="-g -O3 $CXXOPT"
|
||||
|
||||
elif test "X$psblas_cv_fc" == X"xlf" ; then
|
||||
# XL compiler : consider using -qarch=auto
|
||||
CXXOPT="-O3 -qarch=auto $CXXOPT"
|
||||
elif test "X$psblas_cv_fc" == X"ifc" ; then
|
||||
# other compilers ..
|
||||
CXXOPT="-O3 $CXXOPT"
|
||||
elif test "X$psblas_cv_fc" == X"pg" ; then
|
||||
# other compilers ..
|
||||
CXXCOPT="-fast $CXXOPT"
|
||||
# NOTE : PG & Sun use -fast instead -O3
|
||||
elif test "X$psblas_cv_fc" == X"sun" ; then
|
||||
# other compilers ..
|
||||
CXXOPT="-fast $CXXOPT"
|
||||
elif test "X$psblas_cv_fc" == X"cray" ; then
|
||||
CXXOPT="-O3 $CXXOPT"
|
||||
MPICXX="CC"
|
||||
else
|
||||
CXXOPT="-g -O3 $CXXOPT"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Honor FCFLAGS if they were specified explicitly, but --with-fcopt take precedence
|
||||
if test "X$FCOPT" == "X" ; then
|
||||
@@ -443,7 +511,8 @@ fi
|
||||
##############################################################################
|
||||
FC=${FC}
|
||||
CC=${CC}
|
||||
MPCC=${MPICC}
|
||||
CXX=${CXX}
|
||||
CCOPT="$CCOPT $C99OPT"
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -478,6 +547,30 @@ fi
|
||||
if test "X$FLINK" == "X" ; then
|
||||
FLINK=${MPF90}
|
||||
fi
|
||||
# Custom test : do we have a module or include for MPI Fortran interface?
|
||||
if test x"$pac_cv_serial_mpi" == x"yes" ; then
|
||||
FDEFINES="$psblas_cv_define_prepend-DSERIAL_MPI $psblas_cv_define_prepend-DMPI_MOD $FDEFINES";
|
||||
else
|
||||
PAC_FORTRAN_CHECK_HAVE_MPI_MOD_F08()
|
||||
if test x"$pac_cv_mpi_f08" == x"yes" ; then
|
||||
dnl FDEFINES="$psblas_cv_define_prepend-DMPI_MOD_F08 $FDEFINES";
|
||||
FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES";
|
||||
else
|
||||
PAC_FORTRAN_CHECK_HAVE_MPI_MOD(
|
||||
[FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES"],
|
||||
[FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES"])
|
||||
fi
|
||||
fi
|
||||
|
||||
FLINK="$MPIFC"
|
||||
PAC_ARG_OPENMP()
|
||||
if test x"$pac_cv_openmp" == x"yes" ; then
|
||||
FDEFINES="$psblas_cv_define_prepend-DOPENMP $FDEFINES";
|
||||
CDEFINES="-DOPENMP $CDEFINES";
|
||||
FCOPT="$FCOPT $pac_cv_openmp_fcopt";
|
||||
CCOPT="$CCOPT $pac_cv_openmp_ccopt";
|
||||
FLINK="$FLINK $pac_cv_openmp_fcopt";
|
||||
fi
|
||||
|
||||
PAC_FORTRAN_HAVE_PSBLAS([AC_MSG_RESULT([yes.])],
|
||||
[AC_MSG_ERROR([no. Could not find working version of PSBLAS.])])
|
||||
@@ -693,14 +786,10 @@ fi
|
||||
PAC_CHECK_SUPERLUDIST()
|
||||
|
||||
if test "x$amg4psblas_cv_have_superludist" == "xyes" ; then
|
||||
pac_sludist_version="$amg4psblas_cv_superludist_major";
|
||||
if (($amg4psblas_cv_superludist_major==6)); then
|
||||
if (($amg4psblas_cv_superludist_minor>=3)); then
|
||||
pac_sludist_version="63";
|
||||
fi
|
||||
fi
|
||||
pac_sludist_version="$amg4psblas_cv_superludist_major$amg4psblas_cv_superludist_minor";
|
||||
AC_MSG_NOTICE([Configuring with SuperLU_DIST version flag $pac_sludist_version])
|
||||
SLUDIST_FLAGS=""
|
||||
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_$pac_sludist_version $SLUDIST_INCLUDES"
|
||||
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_="$pac_sludist_version" $SLUDIST_INCLUDES"
|
||||
FDEFINES="$amg_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
|
||||
else
|
||||
SLUDIST_FLAGS=""
|
||||
|
||||
+64
-11
@@ -753,6 +753,7 @@ infodir
|
||||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
@@ -877,6 +878,7 @@ datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
@@ -1129,6 +1131,15 @@ do
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||
| --run | --ru | --r)
|
||||
ac_prev=runstatedir ;;
|
||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
| --run=* | --ru=* | --r=*)
|
||||
runstatedir=$ac_optarg ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
@@ -1266,7 +1277,7 @@ fi
|
||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir
|
||||
libdir localedir mandir runstatedir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
@@ -1419,6 +1430,7 @@ Fine tuning of the installation directories:
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
@@ -8087,6 +8099,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran ISO_C_BINDING module" >&5
|
||||
$as_echo_n "checking support for Fortran ISO_C_BINDING module... " >&6; }
|
||||
ac_ext=${ac_fc_srcext-f}
|
||||
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
|
||||
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
|
||||
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
ac_fc=${MPIFC-$FC};
|
||||
cat > conftest.$ac_ext <<_ACEOF
|
||||
|
||||
program conftest
|
||||
use iso_c_binding
|
||||
end program conftest
|
||||
_ACEOF
|
||||
if ac_fn_fc_try_compile "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
:
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
as_fn_error $? "Sorry, cannot build PSBLAS without support for ISO_C_BINDING.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." "$LINENO" 5
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for ISO_FORTRAN_ENV" >&5
|
||||
$as_echo_n "checking support for ISO_FORTRAN_ENV... " >&6; }
|
||||
ac_ext=${ac_fc_srcext-f}
|
||||
@@ -10706,6 +10756,8 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||
if test "x$pac_sludist_lib_ok" == "xno" ; then
|
||||
SLUDIST_LIBS="$amg4psblas_cv_superludist -L$amg4psblas_cv_superludistdir/lib";
|
||||
LIBS="$SLUDIST_LIBS -lm $save_LIBS";
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for superlu_malloc_dist in $SLUDIST_LIBS" >&5
|
||||
$as_echo_n "checking for superlu_malloc_dist in $SLUDIST_LIBS... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -10736,6 +10788,8 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||
if test "x$pac_sludist_lib_ok" == "xno" ; then
|
||||
SLUDIST_LIBS="$amg4psblas_cv_superludist -L$amg4psblas_cv_superludistdir/lib64";
|
||||
LIBS="$SLUDIST_LIBS -lm $save_LIBS";
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for superlu_malloc_dist in $SLUDIST_LIBS" >&5
|
||||
$as_echo_n "checking for superlu_malloc_dist in $SLUDIST_LIBS... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -10763,8 +10817,8 @@ fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_sludist_lib_ok" >&5
|
||||
$as_echo "$pac_sludist_lib_ok" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_sludist_lib_ok $SLUDIST_LIBS" >&5
|
||||
$as_echo "$pac_sludist_lib_ok $SLUDIST_LIBS" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$pac_sludist_lib_ok" == "xyes" ; then
|
||||
@@ -10906,14 +10960,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
if test "x$amg4psblas_cv_have_superludist" == "xyes" ; then
|
||||
pac_sludist_version="$amg4psblas_cv_superludist_major";
|
||||
if (($amg4psblas_cv_superludist_major==6)); then
|
||||
if (($amg4psblas_cv_superludist_minor>=3)); then
|
||||
pac_sludist_version="63";
|
||||
fi
|
||||
fi
|
||||
pac_sludist_version="$amg4psblas_cv_superludist_major$amg4psblas_cv_superludist_minor";
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring with SuperLU_DIST version flag $pac_sludist_version" >&5
|
||||
$as_echo "$as_me: Configuring with SuperLU_DIST version flag $pac_sludist_version" >&6;}
|
||||
SLUDIST_FLAGS=""
|
||||
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_$pac_sludist_version $SLUDIST_INCLUDES"
|
||||
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_="$pac_sludist_version" $SLUDIST_INCLUDES"
|
||||
FDEFINES="$amg_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
|
||||
else
|
||||
SLUDIST_FLAGS=""
|
||||
@@ -12275,7 +12326,9 @@ $as_echo X/"$am_mf" |
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "Something went wrong bootstrapping makefile fragments
|
||||
for automatic dependency tracking. Try re-running configure with the
|
||||
for automatic dependency tracking. If GNU make was not used, consider
|
||||
re-running the configure script with MAKE=\"gmake\" (or whatever is
|
||||
necessary). You can also try re-running configure with the
|
||||
'--disable-dependency-tracking' option to at least be able to build
|
||||
the package (albeit without support for automatic dependency tracking).
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
|
||||
+9
-7
@@ -673,6 +673,12 @@ PAC_FORTRAN_TEST_VOLATILE(
|
||||
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for VOLATILE])]
|
||||
)
|
||||
|
||||
PAC_FORTRAN_TEST_ISO_C_BIND(
|
||||
[],
|
||||
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for ISO_C_BINDING.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8.])]
|
||||
)
|
||||
|
||||
PAC_FORTRAN_TEST_ISO_FORTRAN_ENV(
|
||||
[],
|
||||
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for ISO_FORTRAN_ENV])]
|
||||
@@ -856,14 +862,10 @@ fi
|
||||
PAC_CHECK_SUPERLUDIST()
|
||||
|
||||
if test "x$amg4psblas_cv_have_superludist" == "xyes" ; then
|
||||
pac_sludist_version="$amg4psblas_cv_superludist_major";
|
||||
if (($amg4psblas_cv_superludist_major==6)); then
|
||||
if (($amg4psblas_cv_superludist_minor>=3)); then
|
||||
pac_sludist_version="63";
|
||||
fi
|
||||
fi
|
||||
pac_sludist_version="$amg4psblas_cv_superludist_major$amg4psblas_cv_superludist_minor";
|
||||
AC_MSG_NOTICE([Configuring with SuperLU_DIST version flag $pac_sludist_version])
|
||||
SLUDIST_FLAGS=""
|
||||
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_$pac_sludist_version $SLUDIST_INCLUDES"
|
||||
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_="$pac_sludist_version" $SLUDIST_INCLUDES"
|
||||
FDEFINES="$amg_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
|
||||
else
|
||||
SLUDIST_FLAGS=""
|
||||
|
||||
Binary file not shown.
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
+24
-25
@@ -13,33 +13,35 @@
|
||||
.cmbx-12{font-size:109%; font-weight: bold;}
|
||||
.cmbx-12{ font-weight: bold;}
|
||||
.cmbx-12{ font-weight: bold;}
|
||||
.cmtt-12{font-size:109%;font-family: monospace;}
|
||||
.cmtt-12{font-family: monospace;}
|
||||
.cmtt-12{font-family: monospace;}
|
||||
.cmtt-12{font-size:109%;font-family: monospace,monospace;}
|
||||
.cmtt-12{font-family: monospace,monospace;}
|
||||
.cmtt-12{font-family: monospace,monospace;}
|
||||
.cmcsc-10x-x-120{font-size:109%;}
|
||||
.cmr-8{font-size:72%;}
|
||||
.cmmi-12{font-size:109%;font-style: italic;}
|
||||
.cmmi-8{font-size:72%;font-style: italic;}
|
||||
.cmsy-10x-x-120{font-size:109%;}
|
||||
.cmsy-8{font-size:72%;}
|
||||
.tctt-1200{font-size:109%;font-family: monospace,monospace;}
|
||||
.cmmi-10x-x-109{font-style: italic;}
|
||||
.cmsy-10x-x-109{}
|
||||
.cmtt-10x-x-109{font-family: monospace;}
|
||||
.cmtt-10x-x-109{font-family: monospace;}
|
||||
.cmtt-10x-x-109{font-family: monospace;}
|
||||
.cmtt-10x-x-109{font-family: monospace,monospace;}
|
||||
.cmtt-10x-x-109{font-family: monospace,monospace;}
|
||||
.cmtt-10x-x-109{font-family: monospace,monospace;}
|
||||
.cmcsc-10x-x-109{}
|
||||
.cmtt-10{font-size:90%;font-family: monospace;}
|
||||
.cmtt-10{font-family: monospace;}
|
||||
.cmtt-10{font-family: monospace;}
|
||||
.cmtt-10{font-size:90%;font-family: monospace,monospace;}
|
||||
.cmtt-10{font-family: monospace,monospace;}
|
||||
.cmtt-10{font-family: monospace,monospace;}
|
||||
.cmbx-10x-x-109{ font-weight: bold;}
|
||||
.cmbx-10x-x-109{ font-weight: bold;}
|
||||
.cmbx-10x-x-109{ font-weight: bold;}
|
||||
.cmcsc-10{font-size:90%;}
|
||||
.small-caps{font-variant: small-caps; }
|
||||
p.noindent { text-indent: 0em }
|
||||
td p.noindent { text-indent: 0em; margin-top:0em; }
|
||||
p.nopar { text-indent: 0em; }
|
||||
p.indent{ text-indent: 1.5em }
|
||||
p{margin-top:0;margin-bottom:0}
|
||||
p.indent{text-indent:0;}
|
||||
p + p{margin-top:1em;}
|
||||
p + div, p + pre {margin-top:1em;}
|
||||
div + p, pre + p {margin-top:1em;}
|
||||
@media print {div.crosslinks {visibility:hidden;}}
|
||||
a img { border-top: 0; border-left: 0; border-right: 0; }
|
||||
center { margin-top:1em; margin-bottom:1em; }
|
||||
@@ -62,7 +64,7 @@ div.obeylines-v p { margin-top:0; margin-bottom:0; }
|
||||
td.displaylines {text-align:center; white-space:nowrap;}
|
||||
.centerline {text-align:center;}
|
||||
.rightline {text-align:right;}
|
||||
div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; }
|
||||
pre.verbatim {font-family: monospace,monospace; text-align:left; clear:both; }
|
||||
.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }
|
||||
div.fbox {display:table}
|
||||
div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }
|
||||
@@ -95,18 +97,16 @@ td.td01{ padding-left:0pt; padding-right:5pt; }
|
||||
td.td10{ padding-left:5pt; padding-right:0pt; }
|
||||
td.td11{ padding-left:5pt; padding-right:5pt; }
|
||||
table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; }
|
||||
.hline hr, .cline hr{ height : 1px; margin:0px; }
|
||||
.hline hr, .cline hr{ height : 0px; margin:0px; }
|
||||
.hline td, .cline td{ padding: 0; }
|
||||
.hline hr, .cline hr{border:none;border-top:1px solid black;}
|
||||
.tabbing-right {text-align:right;}
|
||||
span.TEX {letter-spacing: -0.125em; }
|
||||
span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;}
|
||||
a span.TEX span.E {text-decoration: none; }
|
||||
span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;}
|
||||
span.LATEX span.TEX{ position:relative; left: -0.4em; }
|
||||
div.float, div.figure {margin-left: auto; margin-right: auto;}
|
||||
div.float img {text-align:center;}
|
||||
div.figure img {text-align:center;}
|
||||
.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;}
|
||||
.marginpar p{margin-top:0.4em; margin-bottom:0.4em;}
|
||||
.marginpar,.reversemarginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;}
|
||||
.marginpar p,.reversemarginpar p{margin-top:0.4em; margin-bottom:0.4em;}
|
||||
.reversemarginpar{float:left;}
|
||||
table.equation {width:100%;}
|
||||
.equation td{text-align:center; }
|
||||
td.equation { margin-top:1em; margin-bottom:1em; }
|
||||
@@ -150,10 +150,9 @@ div.abstract {width:100%;}
|
||||
.shadowbox { padding-left:3pt; padding-right:3pt; border:solid thin; border-right:solid thick; border-bottom:solid thick; }
|
||||
.doublebox { padding-left:3pt; padding-right:3pt; border-style:double; border:solid thick; }
|
||||
.rotatebox{display: inline-block;}
|
||||
.figure img.graphics {margin-left:10%;}
|
||||
.lstlisting .label{margin-right:0.5em; }
|
||||
div.lstlisting{font-family: monospace; white-space: nowrap; margin-top:0.5em; margin-bottom:0.5em; }
|
||||
div.lstinputlisting{ font-family: monospace; white-space: nowrap; }
|
||||
div.lstlisting{font-family: monospace,monospace; white-space: nowrap; margin-top:0.5em; margin-bottom:0.5em; }
|
||||
div.lstinputlisting{ font-family: monospace,monospace; white-space: nowrap; }
|
||||
.lstinputlisting .label{margin-right:0.5em;}
|
||||
#TBL-1 colgroup{border-left: 1px solid black;border-right:1px solid black;}
|
||||
#TBL-1{border-collapse:collapse;}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 905 B After Width: | Height: | Size: 892 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Abstract</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Contents</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Contributors</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
+18
-19
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Citing AMG4PSBLAS</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
@@ -32,24 +32,23 @@ class="cmr-12">When use the library, please cite the following:</span>
|
||||
|
||||
|
||||
|
||||
<div class="verbatim" id="verbatim-1">
|
||||
<pre class="verbatim" id="verbatim-1">
|
||||
@article{DDF2021,
|
||||
 <br />       author = {D’Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
|
||||
 <br />       title = {{{AMG Preconditioners for Linear Solvers towards Extreme Scale}},
|
||||
 <br />       journal = {arXiv e-preprints},
|
||||
 <br />       eprint = {2006.16147v3},
|
||||
 <br />       archivePrefix = {arXiv},
|
||||
 <br />       year={2021}
|
||||
 <br />     }
|
||||
 <br />
|
||||
 <br />@Misc{psctoolkit-web-page,
|
||||
 <br />       author = {D’Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
|
||||
 <br />       title =  {{PSCToolkit} {W}eb page},
|
||||
 <br />       url =    {https://psctoolkit.github.io/},
|
||||
 <br />       howpublished = {\url{https://psctoolkit.github.io/}},
|
||||
 <br />       year = {2021}
|
||||
 <br />     }
|
||||
</div>
|
||||
       author = {D’Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
|
||||
       title = {{{AMG Preconditioners for Linear Solvers towards Extreme Scale}},
|
||||
       journal = {arXiv e-preprints},
|
||||
       eprint = {2006.16147v3},
|
||||
       archivePrefix = {arXiv},
|
||||
       year={2021}
|
||||
     }
|
||||
@Misc{psctoolkit-web-page,
|
||||
       author = {D’Ambra, Pasqua and Durastante, Fabio and Filippone, Salvatore},
|
||||
       title =  {{PSCToolkit} {W}eb page},
|
||||
       url =    {https://psctoolkit.github.io/},
|
||||
       howpublished = {\url{https://psctoolkit.github.io/}},
|
||||
       year = {2021}
|
||||
     }
|
||||
</pre>
|
||||
<!--l. 70--><p class="nopar" >
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>References</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>General Overview</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Code Distribution</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Configuring and Building AMG4PSBLAS</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
+18
-18
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Getting Started</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
@@ -243,7 +243,7 @@ class="cmcsc-10x-x-109"><span
|
||||
class="small-caps">t</span><span
|
||||
class="small-caps">y</span><span
|
||||
class="small-caps">p</span><span
|
||||
class="small-caps">e</span> </span></td><td style="white-space:wrap; text-align:left;" id="TBL-1-1-2"
|
||||
class="small-caps">e</span> </span></td><td style="white-space:normal; text-align:left;" id="TBL-1-1-2"
|
||||
class="td11"><!--l. 68--><p class="noindent" ><span
|
||||
class="cmcsc-10x-x-109"><span
|
||||
class="small-caps">s</span><span
|
||||
@@ -251,7 +251,7 @@ class="small-caps">t</span><span
|
||||
class="small-caps">r</span><span
|
||||
class="small-caps">i</span><span
|
||||
class="small-caps">n</span><span
|
||||
class="small-caps">g</span></span> </td><td style="white-space:wrap; text-align:left;" id="TBL-1-1-3"
|
||||
class="small-caps">g</span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-1-3"
|
||||
class="td11"><!--l. 68--><p class="noindent" ><span
|
||||
class="cmcsc-10x-x-109"><span
|
||||
class="small-caps">d</span><span
|
||||
@@ -277,17 +277,17 @@ class="small-caps">e</span><span
|
||||
class="small-caps">r</span></span> </td></tr><tr
|
||||
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-1-2-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-2-1"
|
||||
class="td11">No preconditioner </td><td style="white-space:wrap; text-align:left;" id="TBL-1-2-2"
|
||||
class="td11">No preconditioner </td><td style="white-space:normal; text-align:left;" id="TBL-1-2-2"
|
||||
class="td11"><!--l. 69--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">NONE</span><span
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-1-2-3"
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-2-3"
|
||||
class="td11"><!--l. 69--><p class="noindent" >Considered to use the PSBLAS Krylov
|
||||
solvers with no preconditioner. </td>
|
||||
</tr><tr
|
||||
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-1-3-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-3-1"
|
||||
class="td11">Diagonal </td><td style="white-space:wrap; text-align:left;" id="TBL-1-3-2"
|
||||
class="td11">Diagonal </td><td style="white-space:normal; text-align:left;" id="TBL-1-3-2"
|
||||
class="td11"><!--l. 71--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">DIAG</span><span
|
||||
@@ -301,7 +301,7 @@ class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">L1</span><span
|
||||
class="cmtt-10x-x-109">-</span><span
|
||||
class="cmtt-10x-x-109">JACOBI</span><span
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-1-3-3"
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-3-3"
|
||||
class="td11"><!--l. 71--><p class="noindent" >Diagonal preconditioner. For any zero
|
||||
diagonal entry of the matrix to be
|
||||
preconditioned, the corresponding entry
|
||||
@@ -309,7 +309,7 @@ of the preconditioner is set to 1. </td>
|
||||
</tr><tr
|
||||
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-1-4-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-4-1"
|
||||
class="td11">Gauss-Seidel </td><td style="white-space:wrap; text-align:left;" id="TBL-1-4-2"
|
||||
class="td11">Gauss-Seidel </td><td style="white-space:normal; text-align:left;" id="TBL-1-4-2"
|
||||
class="td11"><!--l. 74--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">GS</span><span
|
||||
@@ -319,14 +319,14 @@ class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">L1</span><span
|
||||
class="cmtt-10x-x-109">-</span><span
|
||||
class="cmtt-10x-x-109">GS</span><span
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-1-4-3"
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-4-3"
|
||||
class="td11"><!--l. 74--><p class="noindent" >Hybrid Gauss-Seidel (forward), that is,
|
||||
global block Jacobi with Gauss-Seidel as
|
||||
local solver. </td>
|
||||
</tr><tr
|
||||
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-1-5-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-5-1"
|
||||
class="td11">Symmetrized Gauss-Seidel</td><td style="white-space:wrap; text-align:left;" id="TBL-1-5-2"
|
||||
class="td11">Symmetrized Gauss-Seidel</td><td style="white-space:normal; text-align:left;" id="TBL-1-5-2"
|
||||
class="td11"><!--l. 77--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">FBGS</span><span
|
||||
@@ -336,14 +336,14 @@ class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">L1</span><span
|
||||
class="cmtt-10x-x-109">-</span><span
|
||||
class="cmtt-10x-x-109">FBGS</span><span
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-1-5-3"
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-5-3"
|
||||
class="td11"><!--l. 77--><p class="noindent" >Symmetrized hybrid Gauss-Seidel, that
|
||||
is, forward Gauss-Seidel followed by
|
||||
backward Gauss-Seidel. </td>
|
||||
</tr><tr
|
||||
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-1-6-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-6-1"
|
||||
class="td11">Block Jacobi </td><td style="white-space:wrap; text-align:left;" id="TBL-1-6-2"
|
||||
class="td11">Block Jacobi </td><td style="white-space:normal; text-align:left;" id="TBL-1-6-2"
|
||||
class="td11"><!--l. 80--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">BJAC</span><span
|
||||
@@ -353,27 +353,27 @@ class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">L1</span><span
|
||||
class="cmtt-10x-x-109">-</span><span
|
||||
class="cmtt-10x-x-109">BJAC</span><span
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-1-6-3"
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-6-3"
|
||||
class="td11"><!--l. 80--><p class="noindent" >Block-Jacobi with ILU(0) on the local
|
||||
blocks. </td>
|
||||
</tr><tr
|
||||
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-1-7-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-7-1"
|
||||
class="td11">Additive Schwarz </td><td style="white-space:wrap; text-align:left;" id="TBL-1-7-2"
|
||||
class="td11">Additive Schwarz </td><td style="white-space:normal; text-align:left;" id="TBL-1-7-2"
|
||||
class="td11"><!--l. 81--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">AS</span><span
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-1-7-3"
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-7-3"
|
||||
class="td11"><!--l. 81--><p class="noindent" >Additive Schwarz (AS), with overlap 1
|
||||
and ILU(0) on the local blocks. </td>
|
||||
</tr><tr
|
||||
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-1-8-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-8-1"
|
||||
class="td11">Multilevel </td><td style="white-space:wrap; text-align:left;" id="TBL-1-8-2"
|
||||
class="td11">Multilevel </td><td style="white-space:normal; text-align:left;" id="TBL-1-8-2"
|
||||
class="td11"><!--l. 83--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-10x-x-109">’</span><span
|
||||
class="cmtt-10x-x-109">ML</span><span
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-1-8-3"
|
||||
class="cmtt-10x-x-109">’</span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-8-3"
|
||||
class="td11"><!--l. 83--><p class="noindent" >V-cycle with one hybrid
|
||||
forward Gauss-Seidel (GS) sweep as
|
||||
pre-smoother and one hybrid backward
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
+26
-28
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Adding new smoother and solver objects to AMG4PSBLAS</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
@@ -170,33 +170,33 @@ cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-22-1g"><col
|
||||
id="TBL-22-1"><col
|
||||
id="TBL-22-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-22-1-"><td style="white-space:wrap; text-align:left;" id="TBL-22-1-1"
|
||||
style="vertical-align:baseline;" id="TBL-22-1-"><td style="white-space:normal; text-align:left;" id="TBL-22-1-1"
|
||||
class="td11"><!--l. 58--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">smoother</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-22-1-2"
|
||||
class="cmtt-12">smoother</span> </td><td style="white-space:normal; text-align:left;" id="TBL-22-1-2"
|
||||
class="td11"><!--l. 58--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">amg_x_base_smoother_type</span><span
|
||||
class="cmtt-12">)</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-22-2-"><td style="white-space:wrap; text-align:left;" id="TBL-22-2-1"
|
||||
class="td11"><!--l. 59--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-22-2-2"
|
||||
style="vertical-align:baseline;" id="TBL-22-2-"><td style="white-space:normal; text-align:left;" id="TBL-22-2-1"
|
||||
class="td11"><!--l. 59--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-22-2-2"
|
||||
class="td11"><!--l. 59--><p class="noindent" ><span
|
||||
class="cmr-12">The user-defined new smoother to be employed in the</span>
|
||||
<span
|
||||
class="cmr-12">preconditioner.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-22-3-"><td style="white-space:wrap; text-align:left;" id="TBL-22-3-1"
|
||||
style="vertical-align:baseline;" id="TBL-22-3-"><td style="white-space:normal; text-align:left;" id="TBL-22-3-1"
|
||||
class="td11"><!--l. 61--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">solver</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-22-3-2"
|
||||
class="cmtt-12">solver</span> </td><td style="white-space:normal; text-align:left;" id="TBL-22-3-2"
|
||||
class="td11"><!--l. 61--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">amg_x_base_solver_type</span><span
|
||||
class="cmtt-12">)</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-22-4-"><td style="white-space:wrap; text-align:left;" id="TBL-22-4-1"
|
||||
class="td11"><!--l. 62--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-22-4-2"
|
||||
style="vertical-align:baseline;" id="TBL-22-4-"><td style="white-space:normal; text-align:left;" id="TBL-22-4-1"
|
||||
class="td11"><!--l. 62--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-22-4-2"
|
||||
class="td11"><!--l. 62--><p class="noindent" ><span
|
||||
class="cmr-12">The user-defined new solver to be employed in the preconditioner.</span></td></tr></table></div></div>
|
||||
<!--l. 66--><p class="noindent" ><span
|
||||
@@ -215,24 +215,22 @@ class="cmr-12">pass it as follows:</span>
|
||||
|
||||
|
||||
|
||||
<div class="verbatim" id="verbatim-13">
|
||||
 <br />  ! sparse matrix and preconditioner
|
||||
 <br />  type(psb_dspmat_type) :: a
|
||||
 <br />  type(amg_dprec_type)  :: prec
|
||||
 <br />  type(amg_d_tlu_solver_type) :: tlusv
|
||||
 <br />
|
||||
 <br />......
|
||||
 <br />  !
|
||||
 <br />  !  prepare the preconditioner: an ML with defaults, but with TLU solver at
|
||||
 <br />  !  intermediate levels. All other parameters are at default values.
|
||||
 <br />  !
|
||||
 <br />  call prec%init(’ML’,       info)
|
||||
 <br />  call prec%hierarchy_build(a,desc_a,info)
|
||||
 <br />  nlv = prec%get_nlevs()
|
||||
 <br />  call prec%set(tlusv,   info,ilev=1,ilmax=max(1,nlv-1))
|
||||
 <br />  call prec%smoothers_build(a,desc_a,info)
|
||||
 <br />
|
||||
</div>
|
||||
<pre class="verbatim" id="verbatim-13">
|
||||
  ! sparse matrix and preconditioner
|
||||
  type(psb_dspmat_type) :: a
|
||||
  type(amg_dprec_type)  :: prec
|
||||
  type(amg_d_tlu_solver_type) :: tlusv
|
||||
......
|
||||
  !
|
||||
  !  prepare the preconditioner: an ML with defaults, but with TLU solver at
|
||||
  !  intermediate levels. All other parameters are at default values.
|
||||
  !
|
||||
  call prec%init(’ML’,       info)
|
||||
  call prec%hierarchy_build(a,desc_a,info)
|
||||
  nlv = prec%get_nlevs()
|
||||
  call prec%set(tlusv,   info,ilev=1,ilmax=max(1,nlv-1))
|
||||
  call prec%smoothers_build(a,desc_a,info)
|
||||
</pre>
|
||||
<!--l. 107--><p class="nopar" >
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Error Handling</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
+105
-117
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>License</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
@@ -36,42 +36,37 @@ class="cmr-12">AMG4PSBLAS is freely distributable under the following copyright
|
||||
|
||||
|
||||
|
||||
<div class="verbatim" id="verbatim-14">
|
||||
 <br />                           AMG4PSBLAS  version 1.0
|
||||
 <br />              Algebraic MultiGrid Preconditioners Package
|
||||
 <br />             based on PSBLAS (Parallel Sparse BLAS version 3.7)
|
||||
 <br />
|
||||
 <br />  (C) Copyright 2021
|
||||
 <br />
|
||||
 <br />  Pasqua D’Ambra         IAC-CNR, IT
|
||||
 <br />  Fabio Durastante       University of Pisa and IAC-CNR, IT
|
||||
 <br />  Salvatore Filippone    University of Rome Tor-Vergata and IAC-CNR, IT
|
||||
 <br />
|
||||
 <br />  Redistribution and use in source and binary forms, with or without
|
||||
 <br />  modification, are permitted provided that the following conditions
|
||||
 <br />  are met:
|
||||
 <br />    1. Redistributions of source code must retain the above copyright
|
||||
 <br />       notice, this list of conditions and the following disclaimer.
|
||||
 <br />    2. Redistributions in binary form must reproduce the above copyright
|
||||
 <br />       notice, this list of conditions, and the following disclaimer in the
|
||||
 <br />       documentation and/or other materials provided with the distribution.
|
||||
 <br />    3. The name of the MLD2P4 group or the names of its contributors may
|
||||
 <br />       not be used to endorse or promote products derived from this
|
||||
 <br />       software without specific written permission.
|
||||
 <br />
|
||||
 <br />  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
 <br />  ‘‘AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
 <br />  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
 <br />  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
 <br />  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
 <br />  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
 <br />  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
 <br />  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
 <br />  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
 <br />  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
 <br />  POSSIBILITY OF SUCH DAMAGE.
|
||||
 <br />
|
||||
</div>
|
||||
<pre class="verbatim" id="verbatim-14">
|
||||
                           AMG4PSBLAS  version 1.0
|
||||
              Algebraic MultiGrid Preconditioners Package
|
||||
             based on PSBLAS (Parallel Sparse BLAS version 3.7)
|
||||
  (C) Copyright 2021
|
||||
  Pasqua D’Ambra         IAC-CNR, IT
|
||||
  Fabio Durastante       University of Pisa and IAC-CNR, IT
|
||||
  Salvatore Filippone    University of Rome Tor-Vergata and IAC-CNR, IT
|
||||
  Redistribution and use in source and binary forms, with or without
|
||||
  modification, are permitted provided that the following conditions
|
||||
  are met:
|
||||
    1. Redistributions of source code must retain the above copyright
|
||||
       notice, this list of conditions and the following disclaimer.
|
||||
    2. Redistributions in binary form must reproduce the above copyright
|
||||
       notice, this list of conditions, and the following disclaimer in the
|
||||
       documentation and/or other materials provided with the distribution.
|
||||
    3. The name of the MLD2P4 group or the names of its contributors may
|
||||
       not be used to endorse or promote products derived from this
|
||||
       software without specific written permission.
|
||||
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
  ‘‘AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
  POSSIBILITY OF SUCH DAMAGE.
|
||||
</pre>
|
||||
<!--l. 44--><p class="nopar" >
|
||||
|
||||
|
||||
@@ -83,44 +78,37 @@ class="cmr-12">abide by its terms:</span>
|
||||
|
||||
|
||||
|
||||
<div class="verbatim" id="verbatim-15">
|
||||
 <br />
|
||||
 <br />                           MLD2P4  version 2.2
|
||||
 <br />  MultiLevel Domain Decomposition Parallel Preconditioners Package
|
||||
 <br />             based on PSBLAS (Parallel Sparse BLAS version 3.5)
|
||||
 <br />
|
||||
 <br />  (C) Copyright 2008-2018
|
||||
 <br />
|
||||
 <br />      Salvatore Filippone
|
||||
 <br />      Pasqua D’Ambra
|
||||
 <br />      Daniela di Serafino
|
||||
 <br />
|
||||
 <br />
|
||||
 <br />  Redistribution and use in source and binary forms, with or without
|
||||
 <br />  modification, are permitted provided that the following conditions
|
||||
 <br />  are met:
|
||||
 <br />    1. Redistributions of source code must retain the above copyright
|
||||
 <br />       notice, this list of conditions and the following disclaimer.
|
||||
 <br />    2. Redistributions in binary form must reproduce the above copyright
|
||||
 <br />       notice, this list of conditions, and the following disclaimer in the
|
||||
 <br />       documentation and/or other materials provided with the distribution.
|
||||
 <br />    3. The name of the MLD2P4 group or the names of its contributors may
|
||||
 <br />       not be used to endorse or promote products derived from this
|
||||
 <br />       software without specific written permission.
|
||||
 <br />
|
||||
 <br />  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
 <br />  ‘‘AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
 <br />  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
 <br />  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
 <br />  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
 <br />  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
 <br />  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
 <br />  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
 <br />  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
 <br />  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
 <br />  POSSIBILITY OF SUCH DAMAGE.
|
||||
 <br />
|
||||
</div>
|
||||
<pre class="verbatim" id="verbatim-15">
|
||||
                           MLD2P4  version 2.2
|
||||
  MultiLevel Domain Decomposition Parallel Preconditioners Package
|
||||
             based on PSBLAS (Parallel Sparse BLAS version 3.5)
|
||||
  (C) Copyright 2008-2018
|
||||
      Salvatore Filippone
|
||||
      Pasqua D’Ambra
|
||||
      Daniela di Serafino
|
||||
  Redistribution and use in source and binary forms, with or without
|
||||
  modification, are permitted provided that the following conditions
|
||||
  are met:
|
||||
    1. Redistributions of source code must retain the above copyright
|
||||
       notice, this list of conditions and the following disclaimer.
|
||||
    2. Redistributions in binary form must reproduce the above copyright
|
||||
       notice, this list of conditions, and the following disclaimer in the
|
||||
       documentation and/or other materials provided with the distribution.
|
||||
    3. The name of the MLD2P4 group or the names of its contributors may
|
||||
       not be used to endorse or promote products derived from this
|
||||
       software without specific written permission.
|
||||
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
  ‘‘AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
  POSSIBILITY OF SUCH DAMAGE.
|
||||
</pre>
|
||||
<!--l. 87--><p class="nopar" > <span
|
||||
class="cmr-12">AMG4PSBLAS is distributed together with (a small part of) the graph-matching</span>
|
||||
|
||||
@@ -139,48 +127,48 @@ class="cmr-12">here.</span>
|
||||
|
||||
|
||||
|
||||
<div class="verbatim" id="verbatim-16">
|
||||
<pre class="verbatim" id="verbatim-16">
|
||||
// ***********************************************************************
|
||||
 <br />//
|
||||
 <br />//        MatchboxP: A C++ library for approximate weighted matching
|
||||
 <br />//               Mahantesh Halappanavar (hala@pnnl.gov)
|
||||
 <br />//               Pacific Northwest National Laboratory
|
||||
 <br />//
|
||||
 <br />// ***********************************************************************
|
||||
 <br />//
|
||||
 <br />//       Copyright (2021) Battelle Memorial Institute
|
||||
 <br />//                      All rights reserved.
|
||||
 <br />//
|
||||
 <br />// Redistribution and use in source and binary forms, with or without
|
||||
 <br />// modification, are permitted provided that the following conditions
|
||||
 <br />// are met:
|
||||
 <br />//
|
||||
 <br />// 1. Redistributions of source code must retain the above copyright
|
||||
 <br />// notice, this list of conditions and the following disclaimer.
|
||||
 <br />//
|
||||
 <br />// 2. Redistributions in binary form must reproduce the above copyright
|
||||
 <br />// notice, this list of conditions and the following disclaimer in the
|
||||
 <br />// documentation and/or other materials provided with the distribution.
|
||||
 <br />//
|
||||
 <br />// 3. Neither the name of the copyright holder nor the names of its
|
||||
 <br />// contributors may be used to endorse or promote products derived from
|
||||
 <br />// this software without specific prior written permission.
|
||||
 <br />//
|
||||
 <br />// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
 <br />// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
 <br />// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
 <br />// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
 <br />// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
 <br />// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
 <br />// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
 <br />// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
 <br />// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
 <br />// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
 <br />// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
 <br />// POSSIBILITY OF SUCH DAMAGE.
|
||||
 <br />//
|
||||
 <br />// ************************************************************************
|
||||
</div>
|
||||
//
|
||||
//        MatchboxP: A C++ library for approximate weighted matching
|
||||
//               Mahantesh Halappanavar (hala@pnnl.gov)
|
||||
//               Pacific Northwest National Laboratory
|
||||
//
|
||||
// ***********************************************************************
|
||||
//
|
||||
//       Copyright (2021) Battelle Memorial Institute
|
||||
//                      All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ************************************************************************
|
||||
</pre>
|
||||
<!--l. 135--><p class="nopar" >
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Contributor Covenant Code of Conduct</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Prerequisites</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
+31
-31
@@ -3,14 +3,14 @@
|
||||
<html >
|
||||
<head><title>Method hierarchy_build</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
</head><body
|
||||
>
|
||||
<!--l. 678--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 685--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu11.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -34,8 +34,8 @@ class="cmr-12">Method hierarchy</span><span
|
||||
class="cmr-12">_build</span></h4>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 680--><p class="noindent" >
|
||||
<!--l. 681--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 687--><p class="noindent" >
|
||||
<!--l. 688--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -49,7 +49,7 @@ class="cmtt-12">,</span><span
|
||||
class="cmtt-12">info</span><span
|
||||
class="cmtt-12">)</span><br />
|
||||
</div>
|
||||
<!--l. 684--><p class="noindent" ><span
|
||||
<!--l. 691--><p class="noindent" ><span
|
||||
class="cmr-12">This method builds the hierarchy of matrices and restriction/prolongation operators for</span>
|
||||
<span
|
||||
class="cmr-12">the multilevel preconditioner </span><span class="lstinline"></span><span
|
||||
@@ -61,17 +61,17 @@ class="cmtt-12">init</span> <span
|
||||
class="cmr-12">and </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">set</span><span
|
||||
class="cmr-12">.</span>
|
||||
<!--l. 689--><p class="noindent" ><span
|
||||
<!--l. 696--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-11" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-11-1g"><col
|
||||
id="TBL-11-1"><col
|
||||
id="TBL-11-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-11-1-"><td style="white-space:wrap; text-align:left;" id="TBL-11-1-1"
|
||||
class="td11"><!--l. 692--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">a</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-11-1-2"
|
||||
class="td11"><!--l. 692--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-11-1-"><td style="white-space:normal; text-align:left;" id="TBL-11-1-1"
|
||||
class="td11"><!--l. 699--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">a</span> </td><td style="white-space:normal; text-align:left;" id="TBL-11-1-2"
|
||||
class="td11"><!--l. 699--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">type</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_</span><span
|
||||
@@ -85,9 +85,9 @@ class="cmtt-12">in</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-11-2-"><td style="white-space:wrap; text-align:left;" id="TBL-11-2-1"
|
||||
class="td11"><!--l. 693--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-11-2-2"
|
||||
class="td11"><!--l. 693--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-11-2-"><td style="white-space:normal; text-align:left;" id="TBL-11-2-1"
|
||||
class="td11"><!--l. 700--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-11-2-2"
|
||||
class="td11"><!--l. 700--><p class="noindent" ><span
|
||||
class="cmr-12">The sparse matrix structure containing the local part of the matrix</span>
|
||||
<span
|
||||
class="cmr-12">to be preconditioned. Note that </span><span
|
||||
@@ -106,10 +106,10 @@ class="cmr-12">20</span></a><span
|
||||
class="cmr-12">]</span></span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-11-3-"><td style="white-space:wrap; text-align:left;" id="TBL-11-3-1"
|
||||
class="td11"><!--l. 698--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">desc_a</span></td><td style="white-space:wrap; text-align:left;" id="TBL-11-3-2"
|
||||
class="td11"><!--l. 698--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-11-3-"><td style="white-space:normal; text-align:left;" id="TBL-11-3-1"
|
||||
class="td11"><!--l. 705--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">desc_a</span></td><td style="white-space:normal; text-align:left;" id="TBL-11-3-2"
|
||||
class="td11"><!--l. 705--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">type</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_desc_type</span><span
|
||||
@@ -121,9 +121,9 @@ class="cmtt-12">in</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-11-4-"><td style="white-space:wrap; text-align:left;" id="TBL-11-4-1"
|
||||
class="td11"><!--l. 699--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-11-4-2"
|
||||
class="td11"><!--l. 699--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-11-4-"><td style="white-space:normal; text-align:left;" id="TBL-11-4-1"
|
||||
class="td11"><!--l. 706--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-11-4-2"
|
||||
class="td11"><!--l. 706--><p class="noindent" ><span
|
||||
class="cmr-12">The communication descriptor of </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">a</span><span
|
||||
class="cmr-12">. See the PSBLAS User’s Guide</span>
|
||||
@@ -135,10 +135,10 @@ class="cmr-12">20</span></a><span
|
||||
class="cmr-12">]</span></span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-11-5-"><td style="white-space:wrap; text-align:left;" id="TBL-11-5-1"
|
||||
class="td11"><!--l. 701--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-11-5-2"
|
||||
class="td11"><!--l. 701--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-11-5-"><td style="white-space:normal; text-align:left;" id="TBL-11-5-1"
|
||||
class="td11"><!--l. 708--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-11-5-2"
|
||||
class="td11"><!--l. 708--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -148,16 +148,16 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-11-6-"><td style="white-space:wrap; text-align:left;" id="TBL-11-6-1"
|
||||
class="td11"><!--l. 702--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-11-6-2"
|
||||
class="td11"><!--l. 702--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-11-6-"><td style="white-space:normal; text-align:left;" id="TBL-11-6-1"
|
||||
class="td11"><!--l. 709--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-11-6-2"
|
||||
class="td11"><!--l. 709--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-11-7-"><td style="white-space:wrap; text-align:left;" id="TBL-11-7-1"
|
||||
style="vertical-align:baseline;" id="TBL-11-7-"><td style="white-space:normal; text-align:left;" id="TBL-11-7-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
|
||||
<!--l. 708--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 715--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu11.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -182,6 +182,6 @@ class="cmr-12">] [</span><a
|
||||
href="userhtmlse5.html#userhtmlsu10.html" ><span
|
||||
class="cmr-12">up</span></a><span
|
||||
class="cmr-12">] </span></p></div>
|
||||
<!--l. 708--><p class="indent" > <a
|
||||
<!--l. 715--><p class="indent" > <a
|
||||
id="tailuserhtmlsu10.html"></a>
|
||||
</body></html>
|
||||
|
||||
+52
-52
@@ -3,14 +3,14 @@
|
||||
<html >
|
||||
<head><title>Method smoothers_build</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
</head><body
|
||||
>
|
||||
<!--l. 708--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 715--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu12.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -34,8 +34,8 @@ class="cmr-12">Method smoothers</span><span
|
||||
class="cmr-12">_build</span></h4>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 711--><p class="noindent" >
|
||||
<!--l. 712--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 718--><p class="noindent" >
|
||||
<!--l. 719--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -57,7 +57,7 @@ class="cmtt-12">,</span><span
|
||||
class="cmtt-12">imold</span><span
|
||||
class="cmtt-12">])</span><br />
|
||||
</div>
|
||||
<!--l. 715--><p class="noindent" ><span
|
||||
<!--l. 722--><p class="noindent" ><span
|
||||
class="cmr-12">This method builds the smoothers and the coarsest-level solvers for the multilevel</span>
|
||||
<span
|
||||
class="cmr-12">preconditioner </span><span class="lstinline"></span><span
|
||||
@@ -75,17 +75,17 @@ class="cmr-12"> </span><a
|
||||
href="userhtmlsu10.html#x20-190005.3"><span
|
||||
class="cmr-12">5.3</span><!--tex4ht:ref: sec:hier_bld --></a><span
|
||||
class="cmr-12">).</span>
|
||||
<!--l. 722--><p class="noindent" ><span
|
||||
<!--l. 729--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-12" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-12-1g"><col
|
||||
id="TBL-12-1"><col
|
||||
id="TBL-12-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-1-"><td style="white-space:wrap; text-align:left;" id="TBL-12-1-1"
|
||||
class="td11"><!--l. 725--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">a</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-12-1-2"
|
||||
class="td11"><!--l. 725--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-12-1-"><td style="white-space:normal; text-align:left;" id="TBL-12-1-1"
|
||||
class="td11"><!--l. 732--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">a</span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-1-2"
|
||||
class="td11"><!--l. 732--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">type</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_</span><span
|
||||
@@ -99,9 +99,9 @@ class="cmtt-12">in</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-2-"><td style="white-space:wrap; text-align:left;" id="TBL-12-2-1"
|
||||
class="td11"><!--l. 726--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-12-2-2"
|
||||
class="td11"><!--l. 726--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-12-2-"><td style="white-space:normal; text-align:left;" id="TBL-12-2-1"
|
||||
class="td11"><!--l. 733--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-2-2"
|
||||
class="td11"><!--l. 733--><p class="noindent" ><span
|
||||
class="cmr-12">The sparse matrix structure containing the local part of the matrix</span>
|
||||
<span
|
||||
class="cmr-12">to be preconditioned. Note that </span><span
|
||||
@@ -120,10 +120,10 @@ class="cmr-12">20</span></a><span
|
||||
class="cmr-12">]</span></span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-3-"><td style="white-space:wrap; text-align:left;" id="TBL-12-3-1"
|
||||
class="td11"><!--l. 730--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">desc_a</span></td><td style="white-space:wrap; text-align:left;" id="TBL-12-3-2"
|
||||
class="td11"><!--l. 730--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-12-3-"><td style="white-space:normal; text-align:left;" id="TBL-12-3-1"
|
||||
class="td11"><!--l. 737--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">desc_a</span></td><td style="white-space:normal; text-align:left;" id="TBL-12-3-2"
|
||||
class="td11"><!--l. 737--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">type</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_desc_type</span><span
|
||||
@@ -135,9 +135,9 @@ class="cmtt-12">in</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-4-"><td style="white-space:wrap; text-align:left;" id="TBL-12-4-1"
|
||||
class="td11"><!--l. 731--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-12-4-2"
|
||||
class="td11"><!--l. 731--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-12-4-"><td style="white-space:normal; text-align:left;" id="TBL-12-4-1"
|
||||
class="td11"><!--l. 738--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-4-2"
|
||||
class="td11"><!--l. 738--><p class="noindent" ><span
|
||||
class="cmr-12">The communication descriptor of </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">a</span><span
|
||||
class="cmr-12">. See the PSBLAS User’s Guide</span>
|
||||
@@ -149,10 +149,10 @@ class="cmr-12">20</span></a><span
|
||||
class="cmr-12">]</span></span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-5-"><td style="white-space:wrap; text-align:left;" id="TBL-12-5-1"
|
||||
class="td11"><!--l. 733--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-12-5-2"
|
||||
class="td11"><!--l. 733--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-12-5-"><td style="white-space:normal; text-align:left;" id="TBL-12-5-1"
|
||||
class="td11"><!--l. 740--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-5-2"
|
||||
class="td11"><!--l. 740--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -162,19 +162,19 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-6-"><td style="white-space:wrap; text-align:left;" id="TBL-12-6-1"
|
||||
class="td11"><!--l. 734--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-12-6-2"
|
||||
class="td11"><!--l. 734--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-12-6-"><td style="white-space:normal; text-align:left;" id="TBL-12-6-1"
|
||||
class="td11"><!--l. 741--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-6-2"
|
||||
class="td11"><!--l. 741--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-7-"><td style="white-space:wrap; text-align:left;" id="TBL-12-7-1"
|
||||
class="td11"><!--l. 735--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">amold</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-12-7-2"
|
||||
class="td11"><!--l. 735--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-12-7-"><td style="white-space:normal; text-align:left;" id="TBL-12-7-1"
|
||||
class="td11"><!--l. 742--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">amold</span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-7-2"
|
||||
class="td11"><!--l. 742--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_</span><span
|
||||
@@ -190,9 +190,9 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-8-"><td style="white-space:wrap; text-align:left;" id="TBL-12-8-1"
|
||||
class="td11"><!--l. 736--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-12-8-2"
|
||||
class="td11"><!--l. 736--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-12-8-"><td style="white-space:normal; text-align:left;" id="TBL-12-8-1"
|
||||
class="td11"><!--l. 743--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-8-2"
|
||||
class="td11"><!--l. 743--><p class="noindent" ><span
|
||||
class="cmr-12">The desired dynamic type for internal matrix components; this</span>
|
||||
<span
|
||||
class="cmr-12">allows e.g. running on GPUs; it needs not be the same on all</span>
|
||||
@@ -204,10 +204,10 @@ class="cmr-12">20</span></a><span
|
||||
class="cmr-12">]</span></span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-9-"><td style="white-space:wrap; text-align:left;" id="TBL-12-9-1"
|
||||
class="td11"><!--l. 740--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">vmold</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-12-9-2"
|
||||
class="td11"><!--l. 740--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-12-9-"><td style="white-space:normal; text-align:left;" id="TBL-12-9-1"
|
||||
class="td11"><!--l. 747--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">vmold</span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-9-2"
|
||||
class="td11"><!--l. 747--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_</span><span
|
||||
@@ -223,17 +223,17 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-10-"><td style="white-space:wrap; text-align:left;" id="TBL-12-10-1"
|
||||
class="td11"><!--l. 741--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-12-10-2"
|
||||
class="td11"><!--l. 741--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-12-10-"><td style="white-space:normal; text-align:left;" id="TBL-12-10-1"
|
||||
class="td11"><!--l. 748--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-10-2"
|
||||
class="td11"><!--l. 748--><p class="noindent" ><span
|
||||
class="cmr-12">The desired dynamic type for internal vector components; this</span>
|
||||
<span
|
||||
class="cmr-12">allows e.g. running on GPUs.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-11-"><td style="white-space:wrap; text-align:left;" id="TBL-12-11-1"
|
||||
class="td11"><!--l. 743--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">imold</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-12-11-2"
|
||||
class="td11"><!--l. 743--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-12-11-"><td style="white-space:normal; text-align:left;" id="TBL-12-11-1"
|
||||
class="td11"><!--l. 750--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">imold</span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-11-2"
|
||||
class="td11"><!--l. 750--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_i_base_vect_type</span><span
|
||||
@@ -247,14 +247,14 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-12-"><td style="white-space:wrap; text-align:left;" id="TBL-12-12-1"
|
||||
class="td11"><!--l. 744--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-12-12-2"
|
||||
class="td11"><!--l. 744--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-12-12-"><td style="white-space:normal; text-align:left;" id="TBL-12-12-1"
|
||||
class="td11"><!--l. 751--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-12-2"
|
||||
class="td11"><!--l. 751--><p class="noindent" ><span
|
||||
class="cmr-12">The desired dynamic type for internal integer vector components;</span>
|
||||
<span
|
||||
class="cmr-12">this allows e.g. running on GPUs.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-12-13-"><td style="white-space:wrap; text-align:left;" id="TBL-12-13-1"
|
||||
style="vertical-align:baseline;" id="TBL-12-13-"><td style="white-space:normal; text-align:left;" id="TBL-12-13-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
|
||||
<!--l. 750--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 757--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu12.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -279,6 +279,6 @@ class="cmr-12">] [</span><a
|
||||
href="userhtmlse5.html#userhtmlsu11.html" ><span
|
||||
class="cmr-12">up</span></a><span
|
||||
class="cmr-12">] </span></p></div>
|
||||
<!--l. 750--><p class="indent" > <a
|
||||
<!--l. 757--><p class="indent" > <a
|
||||
id="tailuserhtmlsu11.html"></a>
|
||||
</body></html>
|
||||
|
||||
+53
-53
@@ -3,14 +3,14 @@
|
||||
<html >
|
||||
<head><title>Method build</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
</head><body
|
||||
>
|
||||
<!--l. 750--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 757--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu13.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -33,8 +33,8 @@ class="cmr-12">5.5 </span></span> <a
|
||||
class="cmr-12">Method build</span></h4>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 752--><p class="noindent" >
|
||||
<!--l. 753--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 759--><p class="noindent" >
|
||||
<!--l. 760--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -54,7 +54,7 @@ class="cmtt-12">,</span><span
|
||||
class="cmtt-12">imold</span><span
|
||||
class="cmtt-12">])</span><br />
|
||||
</div>
|
||||
<!--l. 756--><p class="noindent" ><span
|
||||
<!--l. 763--><p class="noindent" ><span
|
||||
class="cmr-12">This method builds the preconditioner </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">p</span> <span
|
||||
class="cmr-12">according to the requirements made by the</span>
|
||||
@@ -83,17 +83,17 @@ class="cmtt-12">smoothers_build</span><span
|
||||
class="cmr-12">, whose nomenclature would however be somewhat unnatural when</span>
|
||||
<span
|
||||
class="cmr-12">dealing with simple one-level preconditioners.</span>
|
||||
<!--l. 766--><p class="noindent" ><span
|
||||
<!--l. 773--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-13" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-13-1g"><col
|
||||
id="TBL-13-1"><col
|
||||
id="TBL-13-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-1-"><td style="white-space:wrap; text-align:left;" id="TBL-13-1-1"
|
||||
class="td11"><!--l. 769--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">a</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-13-1-2"
|
||||
class="td11"><!--l. 769--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-13-1-"><td style="white-space:normal; text-align:left;" id="TBL-13-1-1"
|
||||
class="td11"><!--l. 776--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">a</span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-1-2"
|
||||
class="td11"><!--l. 776--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">type</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_</span><span
|
||||
@@ -107,9 +107,9 @@ class="cmtt-12">in</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-2-"><td style="white-space:wrap; text-align:left;" id="TBL-13-2-1"
|
||||
class="td11"><!--l. 770--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-13-2-2"
|
||||
class="td11"><!--l. 770--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-13-2-"><td style="white-space:normal; text-align:left;" id="TBL-13-2-1"
|
||||
class="td11"><!--l. 777--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-2-2"
|
||||
class="td11"><!--l. 777--><p class="noindent" ><span
|
||||
class="cmr-12">The sparse matrix structure containing the local part of the matrix</span>
|
||||
<span
|
||||
class="cmr-12">to be preconditioned. Note that </span><span
|
||||
@@ -128,10 +128,10 @@ class="cmr-12">20</span></a><span
|
||||
class="cmr-12">]</span></span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-3-"><td style="white-space:wrap; text-align:left;" id="TBL-13-3-1"
|
||||
class="td11"><!--l. 774--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">desc_a</span></td><td style="white-space:wrap; text-align:left;" id="TBL-13-3-2"
|
||||
class="td11"><!--l. 774--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-13-3-"><td style="white-space:normal; text-align:left;" id="TBL-13-3-1"
|
||||
class="td11"><!--l. 781--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">desc_a</span></td><td style="white-space:normal; text-align:left;" id="TBL-13-3-2"
|
||||
class="td11"><!--l. 781--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">type</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_desc_type</span><span
|
||||
@@ -143,9 +143,9 @@ class="cmtt-12">in</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-4-"><td style="white-space:wrap; text-align:left;" id="TBL-13-4-1"
|
||||
class="td11"><!--l. 775--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-13-4-2"
|
||||
class="td11"><!--l. 775--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-13-4-"><td style="white-space:normal; text-align:left;" id="TBL-13-4-1"
|
||||
class="td11"><!--l. 782--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-4-2"
|
||||
class="td11"><!--l. 782--><p class="noindent" ><span
|
||||
class="cmr-12">The communication descriptor of </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">a</span><span
|
||||
class="cmr-12">. See the PSBLAS User’s Guide</span>
|
||||
@@ -157,10 +157,10 @@ class="cmr-12">20</span></a><span
|
||||
class="cmr-12">]</span></span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-5-"><td style="white-space:wrap; text-align:left;" id="TBL-13-5-1"
|
||||
class="td11"><!--l. 777--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-13-5-2"
|
||||
class="td11"><!--l. 777--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-13-5-"><td style="white-space:normal; text-align:left;" id="TBL-13-5-1"
|
||||
class="td11"><!--l. 784--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-5-2"
|
||||
class="td11"><!--l. 784--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -170,19 +170,19 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-6-"><td style="white-space:wrap; text-align:left;" id="TBL-13-6-1"
|
||||
class="td11"><!--l. 778--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-13-6-2"
|
||||
class="td11"><!--l. 778--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-13-6-"><td style="white-space:normal; text-align:left;" id="TBL-13-6-1"
|
||||
class="td11"><!--l. 785--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-6-2"
|
||||
class="td11"><!--l. 785--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-7-"><td style="white-space:wrap; text-align:left;" id="TBL-13-7-1"
|
||||
class="td11"><!--l. 779--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">amold</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-13-7-2"
|
||||
class="td11"><!--l. 779--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-13-7-"><td style="white-space:normal; text-align:left;" id="TBL-13-7-1"
|
||||
class="td11"><!--l. 786--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">amold</span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-7-2"
|
||||
class="td11"><!--l. 786--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_</span><span
|
||||
@@ -198,9 +198,9 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-8-"><td style="white-space:wrap; text-align:left;" id="TBL-13-8-1"
|
||||
class="td11"><!--l. 780--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-13-8-2"
|
||||
class="td11"><!--l. 780--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-13-8-"><td style="white-space:normal; text-align:left;" id="TBL-13-8-1"
|
||||
class="td11"><!--l. 787--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-8-2"
|
||||
class="td11"><!--l. 787--><p class="noindent" ><span
|
||||
class="cmr-12">The desired dynamic type for internal matrix components; this</span>
|
||||
<span
|
||||
class="cmr-12">allows e.g. running on GPUs; it needs not be the same on all</span>
|
||||
@@ -212,10 +212,10 @@ class="cmr-12">20</span></a><span
|
||||
class="cmr-12">]</span></span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-9-"><td style="white-space:wrap; text-align:left;" id="TBL-13-9-1"
|
||||
class="td11"><!--l. 784--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">vmold</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-13-9-2"
|
||||
class="td11"><!--l. 784--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-13-9-"><td style="white-space:normal; text-align:left;" id="TBL-13-9-1"
|
||||
class="td11"><!--l. 791--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">vmold</span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-9-2"
|
||||
class="td11"><!--l. 791--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_</span><span
|
||||
@@ -231,17 +231,17 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-10-"><td style="white-space:wrap; text-align:left;" id="TBL-13-10-1"
|
||||
class="td11"><!--l. 785--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-13-10-2"
|
||||
class="td11"><!--l. 785--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-13-10-"><td style="white-space:normal; text-align:left;" id="TBL-13-10-1"
|
||||
class="td11"><!--l. 792--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-10-2"
|
||||
class="td11"><!--l. 792--><p class="noindent" ><span
|
||||
class="cmr-12">The desired dynamic type for internal vector components; this</span>
|
||||
<span
|
||||
class="cmr-12">allows e.g. running on GPUs.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-11-"><td style="white-space:wrap; text-align:left;" id="TBL-13-11-1"
|
||||
class="td11"><!--l. 787--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">imold</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-13-11-2"
|
||||
class="td11"><!--l. 787--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-13-11-"><td style="white-space:normal; text-align:left;" id="TBL-13-11-1"
|
||||
class="td11"><!--l. 794--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">imold</span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-11-2"
|
||||
class="td11"><!--l. 794--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_i_base_vect_type</span><span
|
||||
@@ -255,16 +255,16 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-12-"><td style="white-space:wrap; text-align:left;" id="TBL-13-12-1"
|
||||
class="td11"><!--l. 788--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-13-12-2"
|
||||
class="td11"><!--l. 788--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-13-12-"><td style="white-space:normal; text-align:left;" id="TBL-13-12-1"
|
||||
class="td11"><!--l. 795--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-12-2"
|
||||
class="td11"><!--l. 795--><p class="noindent" ><span
|
||||
class="cmr-12">The desired dynamic type for internal integer vector components;</span>
|
||||
<span
|
||||
class="cmr-12">this allows e.g. running on GPUs.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-13-13-"><td style="white-space:wrap; text-align:left;" id="TBL-13-13-1"
|
||||
style="vertical-align:baseline;" id="TBL-13-13-"><td style="white-space:normal; text-align:left;" id="TBL-13-13-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
<!--l. 793--><p class="noindent" ><span
|
||||
<!--l. 800--><p class="noindent" ><span
|
||||
class="cmr-12">The method can be used to build multilevel preconditioners too.</span>
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ class="cmr-12">The method can be used to build multilevel preconditioners too.</
|
||||
|
||||
|
||||
|
||||
<!--l. 798--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 805--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu13.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -289,6 +289,6 @@ class="cmr-12">] [</span><a
|
||||
href="userhtmlse5.html#userhtmlsu12.html" ><span
|
||||
class="cmr-12">up</span></a><span
|
||||
class="cmr-12">] </span></p></div>
|
||||
<!--l. 798--><p class="indent" > <a
|
||||
<!--l. 805--><p class="indent" > <a
|
||||
id="tailuserhtmlsu12.html"></a>
|
||||
</body></html>
|
||||
|
||||
+52
-52
@@ -3,14 +3,14 @@
|
||||
<html >
|
||||
<head><title>Method apply</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
</head><body
|
||||
>
|
||||
<!--l. 798--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 805--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu14.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -33,8 +33,8 @@ class="cmr-12">5.6 </span></span> <a
|
||||
class="cmr-12">Method apply</span></h4>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 800--><p class="noindent" >
|
||||
<!--l. 801--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 807--><p class="noindent" >
|
||||
<!--l. 808--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -55,7 +55,7 @@ class="cmtt-12">,</span><span
|
||||
class="cmtt-12">work</span><span
|
||||
class="cmtt-12">])</span><br />
|
||||
</div>
|
||||
<!--l. 804--><p class="noindent" ><span
|
||||
<!--l. 811--><p class="noindent" ><span
|
||||
class="cmr-12">This method computes </span><span
|
||||
class="cmmi-12">y </span><span
|
||||
class="cmr-12">= </span><span
|
||||
@@ -89,26 +89,26 @@ class="cmtt-12">psb_krylov</span> <span
|
||||
class="cmr-12">and hence it is</span>
|
||||
<span
|
||||
class="cmr-12">completely transparent to the user.</span>
|
||||
<!--l. 813--><p class="noindent" ><span
|
||||
<!--l. 820--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-14" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-14-1g"><col
|
||||
id="TBL-14-1"><col
|
||||
id="TBL-14-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-1-"><td style="white-space:wrap; text-align:left;" id="TBL-14-1-1"
|
||||
class="td11"><!--l. 816--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">x</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-14-1-2"
|
||||
class="td11"><!--l. 816--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-14-1-"><td style="white-space:normal; text-align:left;" id="TBL-14-1-1"
|
||||
class="td11"><!--l. 823--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">x</span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-1-2"
|
||||
class="td11"><!--l. 823--><p class="noindent" ><span
|
||||
class="cmti-12">type</span><span class="lstinline"></span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">kind_parameter</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">, dimension(:), intent(in)—.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-2-"><td style="white-space:wrap; text-align:left;" id="TBL-14-2-1"
|
||||
class="td11"><!--l. 817--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-14-2-2"
|
||||
class="td11"><!--l. 817--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-14-2-"><td style="white-space:normal; text-align:left;" id="TBL-14-2-1"
|
||||
class="td11"><!--l. 824--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-2-2"
|
||||
class="td11"><!--l. 824--><p class="noindent" ><span
|
||||
class="cmr-12">The local part of the vector </span><span
|
||||
class="cmmi-12">x</span><span
|
||||
class="cmr-12">. Note that </span><span
|
||||
@@ -125,19 +125,19 @@ class="cmr-12">, single/double</span>
|
||||
<span
|
||||
class="cmr-12">precision version of AMG4PSBLAS under use.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-3-"><td style="white-space:wrap; text-align:left;" id="TBL-14-3-1"
|
||||
class="td11"><!--l. 820--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">y</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-14-3-2"
|
||||
class="td11"><!--l. 820--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-14-3-"><td style="white-space:normal; text-align:left;" id="TBL-14-3-1"
|
||||
class="td11"><!--l. 827--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">y</span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-3-2"
|
||||
class="td11"><!--l. 827--><p class="noindent" ><span
|
||||
class="cmti-12">type</span><span class="lstinline"></span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">kind_parameter</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">, dimension(:), intent(out)—.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-4-"><td style="white-space:wrap; text-align:left;" id="TBL-14-4-1"
|
||||
class="td11"><!--l. 821--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-14-4-2"
|
||||
class="td11"><!--l. 821--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-14-4-"><td style="white-space:normal; text-align:left;" id="TBL-14-4-1"
|
||||
class="td11"><!--l. 828--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-4-2"
|
||||
class="td11"><!--l. 828--><p class="noindent" ><span
|
||||
class="cmr-12">The local part of the vector </span><span
|
||||
class="cmmi-12">y</span><span
|
||||
class="cmr-12">. Note that </span><span
|
||||
@@ -154,10 +154,10 @@ class="cmr-12">, single/double</span>
|
||||
<span
|
||||
class="cmr-12">precision version of AMG4PSBLAS under use.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-5-"><td style="white-space:wrap; text-align:left;" id="TBL-14-5-1"
|
||||
class="td11"><!--l. 824--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">desc_a</span></td><td style="white-space:wrap; text-align:left;" id="TBL-14-5-2"
|
||||
class="td11"><!--l. 824--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-14-5-"><td style="white-space:normal; text-align:left;" id="TBL-14-5-1"
|
||||
class="td11"><!--l. 831--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">desc_a</span></td><td style="white-space:normal; text-align:left;" id="TBL-14-5-2"
|
||||
class="td11"><!--l. 831--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">type</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_desc_type</span><span
|
||||
@@ -169,17 +169,17 @@ class="cmtt-12">in</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-6-"><td style="white-space:wrap; text-align:left;" id="TBL-14-6-1"
|
||||
class="td11"><!--l. 825--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-14-6-2"
|
||||
class="td11"><!--l. 825--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-14-6-"><td style="white-space:normal; text-align:left;" id="TBL-14-6-1"
|
||||
class="td11"><!--l. 832--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-6-2"
|
||||
class="td11"><!--l. 832--><p class="noindent" ><span
|
||||
class="cmr-12">The communication descriptor associated to the matrix to be</span>
|
||||
<span
|
||||
class="cmr-12">preconditioned.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-7-"><td style="white-space:wrap; text-align:left;" id="TBL-14-7-1"
|
||||
class="td11"><!--l. 827--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-14-7-2"
|
||||
class="td11"><!--l. 827--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-14-7-"><td style="white-space:normal; text-align:left;" id="TBL-14-7-1"
|
||||
class="td11"><!--l. 834--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-7-2"
|
||||
class="td11"><!--l. 834--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -189,19 +189,19 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-8-"><td style="white-space:wrap; text-align:left;" id="TBL-14-8-1"
|
||||
class="td11"><!--l. 828--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-14-8-2"
|
||||
class="td11"><!--l. 828--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-14-8-"><td style="white-space:normal; text-align:left;" id="TBL-14-8-1"
|
||||
class="td11"><!--l. 835--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-8-2"
|
||||
class="td11"><!--l. 835--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-9-"><td style="white-space:wrap; text-align:left;" id="TBL-14-9-1"
|
||||
class="td11"><!--l. 829--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">trans</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-14-9-2"
|
||||
class="td11"><!--l. 829--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-14-9-"><td style="white-space:normal; text-align:left;" id="TBL-14-9-1"
|
||||
class="td11"><!--l. 836--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">trans</span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-9-2"
|
||||
class="td11"><!--l. 836--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">character</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">len</span><span
|
||||
@@ -215,9 +215,9 @@ class="cmtt-12">(</span><span
|
||||
class="cmtt-12">in</span><span
|
||||
class="cmtt-12">).</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-10-"><td style="white-space:wrap; text-align:left;" id="TBL-14-10-1"
|
||||
class="td11"><!--l. 830--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-14-10-2"
|
||||
class="td11"><!--l. 830--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-14-10-"><td style="white-space:normal; text-align:left;" id="TBL-14-10-1"
|
||||
class="td11"><!--l. 837--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-10-2"
|
||||
class="td11"><!--l. 837--><p class="noindent" ><span
|
||||
class="cmr-12">If </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">trans</span> <span
|
||||
class="cmr-12">= </span><span class="lstinline"></span><span
|
||||
@@ -290,19 +290,19 @@ class="cmsy-8">-</span><span
|
||||
class="cmr-8">1</span></sup><span
|
||||
class="cmr-12">).</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-11-"><td style="white-space:wrap; text-align:left;" id="TBL-14-11-1"
|
||||
class="td11"><!--l. 834--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">work</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-14-11-2"
|
||||
class="td11"><!--l. 834--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-14-11-"><td style="white-space:normal; text-align:left;" id="TBL-14-11-1"
|
||||
class="td11"><!--l. 841--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">work</span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-11-2"
|
||||
class="td11"><!--l. 841--><p class="noindent" ><span
|
||||
class="cmti-12">type</span><span class="lstinline"></span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">kind_parameter</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">, dimension(:), optional, target—.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-12-"><td style="white-space:wrap; text-align:left;" id="TBL-14-12-1"
|
||||
class="td11"><!--l. 835--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-14-12-2"
|
||||
class="td11"><!--l. 835--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-14-12-"><td style="white-space:normal; text-align:left;" id="TBL-14-12-1"
|
||||
class="td11"><!--l. 842--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-12-2"
|
||||
class="td11"><!--l. 842--><p class="noindent" ><span
|
||||
class="cmr-12">Workspace. Its size should be at least </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">4</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -328,7 +328,7 @@ class="cmr-12">,</span>
|
||||
<span
|
||||
class="cmr-12">single/double precision version of AMG4PSBLAS under use.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-14-13-"><td style="white-space:wrap; text-align:left;" id="TBL-14-13-1"
|
||||
style="vertical-align:baseline;" id="TBL-14-13-"><td style="white-space:normal; text-align:left;" id="TBL-14-13-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@ class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
|
||||
<!--l. 844--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 851--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu14.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -356,6 +356,6 @@ class="cmr-12">] [</span><a
|
||||
href="userhtmlse5.html#userhtmlsu13.html" ><span
|
||||
class="cmr-12">up</span></a><span
|
||||
class="cmr-12">] </span></p></div>
|
||||
<!--l. 844--><p class="indent" > <a
|
||||
<!--l. 851--><p class="indent" > <a
|
||||
id="tailuserhtmlsu13.html"></a>
|
||||
</body></html>
|
||||
|
||||
+17
-17
@@ -3,14 +3,14 @@
|
||||
<html >
|
||||
<head><title>Method free</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
</head><body
|
||||
>
|
||||
<!--l. 844--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 851--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu15.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -33,8 +33,8 @@ class="cmr-12">5.7 </span></span> <a
|
||||
class="cmr-12">Method free</span></h4>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 846--><p class="noindent" >
|
||||
<!--l. 847--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 853--><p class="noindent" >
|
||||
<!--l. 854--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -46,21 +46,21 @@ class="cmtt-12">,</span><span
|
||||
class="cmtt-12">info</span><span
|
||||
class="cmtt-12">)</span><br />
|
||||
</div>
|
||||
<!--l. 850--><p class="noindent" ><span
|
||||
<!--l. 857--><p class="noindent" ><span
|
||||
class="cmr-12">This method deallocates the preconditioner data structure </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">p</span><span
|
||||
class="cmr-12">.</span>
|
||||
<!--l. 853--><p class="noindent" ><span
|
||||
<!--l. 860--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-15" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-15-1g"><col
|
||||
id="TBL-15-1"><col
|
||||
id="TBL-15-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-15-1-"><td style="white-space:wrap; text-align:left;" id="TBL-15-1-1"
|
||||
class="td11"><!--l. 856--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-15-1-2"
|
||||
class="td11"><!--l. 856--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-15-1-"><td style="white-space:normal; text-align:left;" id="TBL-15-1-1"
|
||||
class="td11"><!--l. 863--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-15-1-2"
|
||||
class="td11"><!--l. 863--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -70,9 +70,9 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-15-2-"><td style="white-space:wrap; text-align:left;" id="TBL-15-2-1"
|
||||
class="td11"><!--l. 857--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-15-2-2"
|
||||
class="td11"><!--l. 857--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-15-2-"><td style="white-space:normal; text-align:left;" id="TBL-15-2-1"
|
||||
class="td11"><!--l. 864--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-15-2-2"
|
||||
class="td11"><!--l. 864--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
@@ -81,7 +81,7 @@ class="cmr-12">for</span>
|
||||
<span
|
||||
class="cmr-12">details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-15-3-"><td style="white-space:wrap; text-align:left;" id="TBL-15-3-1"
|
||||
style="vertical-align:baseline;" id="TBL-15-3-"><td style="white-space:normal; text-align:left;" id="TBL-15-3-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
|
||||
<!--l. 863--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 870--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu15.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -106,6 +106,6 @@ class="cmr-12">] [</span><a
|
||||
href="userhtmlse5.html#userhtmlsu14.html" ><span
|
||||
class="cmr-12">up</span></a><span
|
||||
class="cmr-12">] </span></p></div>
|
||||
<!--l. 863--><p class="indent" > <a
|
||||
<!--l. 870--><p class="indent" > <a
|
||||
id="tailuserhtmlsu14.html"></a>
|
||||
</body></html>
|
||||
|
||||
+38
-38
@@ -3,14 +3,14 @@
|
||||
<html >
|
||||
<head><title>Method descr</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
</head><body
|
||||
>
|
||||
<!--l. 863--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 870--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu16.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -33,8 +33,8 @@ class="cmr-12">5.8 </span></span> <a
|
||||
class="cmr-12">Method descr</span></h4>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 865--><p class="noindent" >
|
||||
<!--l. 866--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 872--><p class="noindent" >
|
||||
<!--l. 873--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -54,7 +54,7 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">verbosity</span><span
|
||||
class="cmtt-12">])</span><br />
|
||||
</div>
|
||||
<!--l. 869--><p class="noindent" ><span
|
||||
<!--l. 876--><p class="noindent" ><span
|
||||
class="cmr-12">This method prints a description of the preconditioner </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">p</span> <span
|
||||
class="cmr-12">to the standard output or to a</span>
|
||||
@@ -68,17 +68,17 @@ class="cmtt-12">build</span><span
|
||||
class="cmr-12">, have</span>
|
||||
<span
|
||||
class="cmr-12">been called.</span>
|
||||
<!--l. 874--><p class="noindent" ><span
|
||||
<!--l. 881--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-16" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-16-1g"><col
|
||||
id="TBL-16-1"><col
|
||||
id="TBL-16-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-16-1-"><td style="white-space:wrap; text-align:left;" id="TBL-16-1-1"
|
||||
class="td11"><!--l. 877--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-16-1-2"
|
||||
class="td11"><!--l. 877--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-16-1-"><td style="white-space:normal; text-align:left;" id="TBL-16-1-1"
|
||||
class="td11"><!--l. 884--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-16-1-2"
|
||||
class="td11"><!--l. 884--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -88,19 +88,19 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-16-2-"><td style="white-space:wrap; text-align:left;" id="TBL-16-2-1"
|
||||
class="td11"><!--l. 878--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-16-2-2"
|
||||
class="td11"><!--l. 878--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-16-2-"><td style="white-space:normal; text-align:left;" id="TBL-16-2-1"
|
||||
class="td11"><!--l. 885--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-16-2-2"
|
||||
class="td11"><!--l. 885--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span></td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-16-3-"><td style="white-space:wrap; text-align:left;" id="TBL-16-3-1"
|
||||
class="td11"><!--l. 879--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">iout</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-16-3-2"
|
||||
class="td11"><!--l. 879--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-16-3-"><td style="white-space:normal; text-align:left;" id="TBL-16-3-1"
|
||||
class="td11"><!--l. 886--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">iout</span> </td><td style="white-space:normal; text-align:left;" id="TBL-16-3-2"
|
||||
class="td11"><!--l. 886--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -112,17 +112,17 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-16-4-"><td style="white-space:wrap; text-align:left;" id="TBL-16-4-1"
|
||||
class="td11"><!--l. 880--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-16-4-2"
|
||||
class="td11"><!--l. 880--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-16-4-"><td style="white-space:normal; text-align:left;" id="TBL-16-4-1"
|
||||
class="td11"><!--l. 887--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-16-4-2"
|
||||
class="td11"><!--l. 887--><p class="noindent" ><span
|
||||
class="cmr-12">The id of the file where the preconditioner description will be</span>
|
||||
<span
|
||||
class="cmr-12">printed; the default is the standard output.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-16-5-"><td style="white-space:wrap; text-align:left;" id="TBL-16-5-1"
|
||||
class="td11"><!--l. 882--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">root</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-16-5-2"
|
||||
class="td11"><!--l. 882--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-16-5-"><td style="white-space:normal; text-align:left;" id="TBL-16-5-1"
|
||||
class="td11"><!--l. 889--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">root</span> </td><td style="white-space:normal; text-align:left;" id="TBL-16-5-2"
|
||||
class="td11"><!--l. 889--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -134,19 +134,19 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-16-6-"><td style="white-space:wrap; text-align:left;" id="TBL-16-6-1"
|
||||
class="td11"><!--l. 883--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-16-6-2"
|
||||
class="td11"><!--l. 883--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-16-6-"><td style="white-space:normal; text-align:left;" id="TBL-16-6-1"
|
||||
class="td11"><!--l. 890--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-16-6-2"
|
||||
class="td11"><!--l. 890--><p class="noindent" ><span
|
||||
class="cmr-12">The id of the process where the preconditioner description</span>
|
||||
<span
|
||||
class="cmr-12">will be printed; the default is </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">psb_root_</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-16-7-"><td style="white-space:wrap; text-align:left;" id="TBL-16-7-1"
|
||||
class="td11"><!--l. 885--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">verbosity</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-16-7-2"
|
||||
class="td11"><!--l. 885--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-16-7-"><td style="white-space:normal; text-align:left;" id="TBL-16-7-1"
|
||||
class="td11"><!--l. 892--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">verbosity</span> </td><td style="white-space:normal; text-align:left;" id="TBL-16-7-2"
|
||||
class="td11"><!--l. 892--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -158,9 +158,9 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-16-8-"><td style="white-space:wrap; text-align:left;" id="TBL-16-8-1"
|
||||
class="td11"><!--l. 886--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-16-8-2"
|
||||
class="td11"><!--l. 886--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-16-8-"><td style="white-space:normal; text-align:left;" id="TBL-16-8-1"
|
||||
class="td11"><!--l. 893--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-16-8-2"
|
||||
class="td11"><!--l. 893--><p class="noindent" ><span
|
||||
class="cmr-12">The verbosity level of the description. Default value is 0. For</span>
|
||||
<span
|
||||
class="cmr-12">values higher than 0, it prints out further information, e.g., for</span>
|
||||
@@ -169,12 +169,12 @@ class="cmr-12">a distributed multilevel preconditioner the size of the coarse</s
|
||||
<span
|
||||
class="cmr-12">matrices on every process.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-16-9-"><td style="white-space:wrap; text-align:left;" id="TBL-16-9-1"
|
||||
style="vertical-align:baseline;" id="TBL-16-9-"><td style="white-space:normal; text-align:left;" id="TBL-16-9-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
|
||||
<!--l. 893--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 900--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu16.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -191,6 +191,6 @@ class="cmr-12">] [</span><a
|
||||
href="userhtmlse5.html#userhtmlsu15.html" ><span
|
||||
class="cmr-12">up</span></a><span
|
||||
class="cmr-12">] </span></p></div>
|
||||
<!--l. 893--><p class="indent" > <a
|
||||
<!--l. 900--><p class="indent" > <a
|
||||
id="tailuserhtmlsu15.html"></a>
|
||||
</body></html>
|
||||
|
||||
+88
-88
@@ -3,14 +3,14 @@
|
||||
<html >
|
||||
<head><title>Auxiliary Methods</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
</head><body
|
||||
>
|
||||
<!--l. 893--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 900--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu15.html" ><span
|
||||
class="cmr-12">prev</span></a><span
|
||||
@@ -28,19 +28,19 @@ class="cmr-12">] </span></p></div>
|
||||
class="cmr-12">5.9 </span></span> <a
|
||||
id="x26-250005.9"></a><span
|
||||
class="cmr-12">Auxiliary Methods</span></h4>
|
||||
<!--l. 894--><p class="noindent" ><span
|
||||
<!--l. 901--><p class="noindent" ><span
|
||||
class="cmr-12">Various functionalities are implemented as additional methods of the preconditioner</span>
|
||||
<span
|
||||
class="cmr-12">object.</span>
|
||||
<!--l. 897--><p class="noindent" >
|
||||
<!--l. 904--><p class="noindent" >
|
||||
<h5 class="subsubsectionHead"><span class="titlemark"><span
|
||||
class="cmr-12">5.9.1 </span></span> <a
|
||||
id="x26-260005.9.1"></a><span
|
||||
class="cmr-12">Method: dump</span></h5>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 899--><p class="noindent" >
|
||||
<!--l. 900--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 906--><p class="noindent" >
|
||||
<!--l. 907--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -68,19 +68,19 @@ class="cmtt-12">,</span><span
|
||||
class="cmtt-12">global_num</span><span
|
||||
class="cmtt-12">])</span><br />
|
||||
</div>
|
||||
<!--l. 903--><p class="noindent" ><span
|
||||
<!--l. 910--><p class="noindent" ><span
|
||||
class="cmr-12">Dump on file.</span>
|
||||
<!--l. 906--><p class="noindent" ><span
|
||||
<!--l. 913--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-17" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-17-1g"><col
|
||||
id="TBL-17-1"><col
|
||||
id="TBL-17-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-17-1-"><td style="white-space:wrap; text-align:left;" id="TBL-17-1-1"
|
||||
class="td11"><!--l. 909--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-17-1-2"
|
||||
class="td11"><!--l. 909--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-17-1-"><td style="white-space:normal; text-align:left;" id="TBL-17-1-1"
|
||||
class="td11"><!--l. 916--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-17-1-2"
|
||||
class="td11"><!--l. 916--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -90,19 +90,19 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-17-2-"><td style="white-space:wrap; text-align:left;" id="TBL-17-2-1"
|
||||
class="td11"><!--l. 910--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-17-2-2"
|
||||
class="td11"><!--l. 910--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-17-2-"><td style="white-space:normal; text-align:left;" id="TBL-17-2-1"
|
||||
class="td11"><!--l. 917--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-17-2-2"
|
||||
class="td11"><!--l. 917--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-17-3-"><td style="white-space:wrap; text-align:left;" id="TBL-17-3-1"
|
||||
class="td11"><!--l. 911--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">amold</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-17-3-2"
|
||||
class="td11"><!--l. 911--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-17-3-"><td style="white-space:normal; text-align:left;" id="TBL-17-3-1"
|
||||
class="td11"><!--l. 918--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">amold</span> </td><td style="white-space:normal; text-align:left;" id="TBL-17-3-2"
|
||||
class="td11"><!--l. 918--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_</span><span
|
||||
@@ -118,9 +118,9 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-17-4-"><td style="white-space:wrap; text-align:left;" id="TBL-17-4-1"
|
||||
class="td11"><!--l. 912--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-17-4-2"
|
||||
class="td11"><!--l. 912--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-17-4-"><td style="white-space:normal; text-align:left;" id="TBL-17-4-1"
|
||||
class="td11"><!--l. 919--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-17-4-2"
|
||||
class="td11"><!--l. 919--><p class="noindent" ><span
|
||||
class="cmr-12">The desired dynamic type for internal matrix components; this</span>
|
||||
<span
|
||||
class="cmr-12">allows e.g. running on GPUs; it needs not be the same on all</span>
|
||||
@@ -132,17 +132,17 @@ class="cmr-12">20</span></a><span
|
||||
class="cmr-12">]</span></span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-17-5-"><td style="white-space:wrap; text-align:left;" id="TBL-17-5-1"
|
||||
style="vertical-align:baseline;" id="TBL-17-5-"><td style="white-space:normal; text-align:left;" id="TBL-17-5-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
<!--l. 919--><p class="noindent" >
|
||||
<!--l. 926--><p class="noindent" >
|
||||
<h5 class="subsubsectionHead"><span class="titlemark"><span
|
||||
class="cmr-12">5.9.2 </span></span> <a
|
||||
id="x26-270005.9.2"></a><span
|
||||
class="cmr-12">Method: clone</span></h5>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 921--><p class="noindent" >
|
||||
<!--l. 922--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 928--><p class="noindent" >
|
||||
<!--l. 929--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -157,19 +157,19 @@ class="cmtt-12">)</span><br />
|
||||
|
||||
|
||||
|
||||
<!--l. 925--><p class="noindent" ><span
|
||||
<!--l. 932--><p class="noindent" ><span
|
||||
class="cmr-12">Create a (deep) copy of the preconditioner object.</span>
|
||||
<!--l. 928--><p class="noindent" ><span
|
||||
<!--l. 935--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-18" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-18-1g"><col
|
||||
id="TBL-18-1"><col
|
||||
id="TBL-18-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-18-1-"><td style="white-space:wrap; text-align:left;" id="TBL-18-1-1"
|
||||
class="td11"><!--l. 931--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">pout</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-18-1-2"
|
||||
class="td11"><!--l. 931--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-18-1-"><td style="white-space:normal; text-align:left;" id="TBL-18-1-1"
|
||||
class="td11"><!--l. 938--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">pout</span> </td><td style="white-space:normal; text-align:left;" id="TBL-18-1-2"
|
||||
class="td11"><!--l. 938--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">type</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">amg_</span><span
|
||||
@@ -183,9 +183,9 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-18-2-"><td style="white-space:wrap; text-align:left;" id="TBL-18-2-1"
|
||||
class="td11"><!--l. 932--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-18-2-2"
|
||||
class="td11"><!--l. 932--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-18-2-"><td style="white-space:normal; text-align:left;" id="TBL-18-2-1"
|
||||
class="td11"><!--l. 939--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-18-2-2"
|
||||
class="td11"><!--l. 939--><p class="noindent" ><span
|
||||
class="cmr-12">The copy of the preconditioner data structure. Note that </span><span
|
||||
class="cmti-12">x </span><span
|
||||
class="cmr-12">must</span>
|
||||
@@ -198,10 +198,10 @@ class="cmr-12">, single/double precision</span>
|
||||
<span
|
||||
class="cmr-12">version of AMG4PSBLAS under use.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-18-3-"><td style="white-space:wrap; text-align:left;" id="TBL-18-3-1"
|
||||
class="td11"><!--l. 935--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-18-3-2"
|
||||
class="td11"><!--l. 935--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-18-3-"><td style="white-space:normal; text-align:left;" id="TBL-18-3-1"
|
||||
class="td11"><!--l. 942--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-18-3-2"
|
||||
class="td11"><!--l. 942--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -211,26 +211,26 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-18-4-"><td style="white-space:wrap; text-align:left;" id="TBL-18-4-1"
|
||||
class="td11"><!--l. 936--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-18-4-2"
|
||||
class="td11"><!--l. 936--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-18-4-"><td style="white-space:normal; text-align:left;" id="TBL-18-4-1"
|
||||
class="td11"><!--l. 943--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-18-4-2"
|
||||
class="td11"><!--l. 943--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-18-5-"><td style="white-space:wrap; text-align:left;" id="TBL-18-5-1"
|
||||
style="vertical-align:baseline;" id="TBL-18-5-"><td style="white-space:normal; text-align:left;" id="TBL-18-5-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
<!--l. 941--><p class="noindent" >
|
||||
<!--l. 948--><p class="noindent" >
|
||||
<h5 class="subsubsectionHead"><span class="titlemark"><span
|
||||
class="cmr-12">5.9.3 </span></span> <a
|
||||
id="x26-280005.9.3"></a><span
|
||||
class="cmr-12">Method: sizeof</span></h5>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 943--><p class="noindent" >
|
||||
<!--l. 944--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 950--><p class="noindent" >
|
||||
<!--l. 951--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">sz</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">=</span><span
|
||||
@@ -247,19 +247,19 @@ cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-19-1g"><col
|
||||
id="TBL-19-1"><col
|
||||
id="TBL-19-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-19-1-"><td style="white-space:wrap; text-align:left;" id="TBL-19-1-1"
|
||||
class="td11"><!--l. 948--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">global</span> </td> <td style="white-space:wrap; text-align:left;" id="TBL-19-1-2"
|
||||
class="td11"><!--l. 948--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-19-1-"><td style="white-space:normal; text-align:left;" id="TBL-19-1-1"
|
||||
class="td11"><!--l. 955--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">global</span> </td> <td style="white-space:normal; text-align:left;" id="TBL-19-1-2"
|
||||
class="td11"><!--l. 955--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">logical</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-19-2-"><td style="white-space:wrap; text-align:left;" id="TBL-19-2-1"
|
||||
class="td11"><!--l. 949--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-19-2-2"
|
||||
class="td11"><!--l. 949--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-19-2-"><td style="white-space:normal; text-align:left;" id="TBL-19-2-1"
|
||||
class="td11"><!--l. 956--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-19-2-2"
|
||||
class="td11"><!--l. 956--><p class="noindent" ><span
|
||||
class="cmr-12">Whether the global or local preconditioner memory occupation is</span>
|
||||
<span
|
||||
class="cmr-12">desired. Default: </span><span class="lstinline"></span><span
|
||||
@@ -268,11 +268,11 @@ class="cmtt-12">false</span><span
|
||||
class="cmtt-12">.</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-19-3-"><td style="white-space:wrap; text-align:left;" id="TBL-19-3-1"
|
||||
style="vertical-align:baseline;" id="TBL-19-3-"><td style="white-space:normal; text-align:left;" id="TBL-19-3-1"
|
||||
class="td11"> </td> </tr></table>
|
||||
</div> <span
|
||||
class="cmr-12">Return memory footprint in bytes.</span>
|
||||
<!--l. 956--><p class="noindent" >
|
||||
<!--l. 963--><p class="noindent" >
|
||||
<h5 class="subsubsectionHead"><span class="titlemark"><span
|
||||
class="cmr-12">5.9.4 </span></span> <a
|
||||
id="x26-290005.9.4"></a><span
|
||||
@@ -280,8 +280,8 @@ class="cmr-12">Method: allocate</span><span
|
||||
class="cmr-12">_wrk</span></h5>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 958--><p class="noindent" >
|
||||
<!--l. 959--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 965--><p class="noindent" >
|
||||
<!--l. 966--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -294,7 +294,7 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">vmold</span><span
|
||||
class="cmtt-12">])</span><br />
|
||||
</div>
|
||||
<!--l. 962--><p class="noindent" ><span
|
||||
<!--l. 969--><p class="noindent" ><span
|
||||
class="cmr-12">Allocate internal work vectors. Each application of the preconditioner uses a number of</span>
|
||||
<span
|
||||
class="cmr-12">work vectors which are allocated internally as necessary; therefore allocation and</span>
|
||||
@@ -326,17 +326,17 @@ class="cmr-12">argument to the </span><span class="lstinline"></span><span
|
||||
class="cmtt-12">apply</span>
|
||||
<span
|
||||
class="cmr-12">method.</span>
|
||||
<!--l. 978--><p class="noindent" ><span
|
||||
<!--l. 985--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-20" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-20-1g"><col
|
||||
id="TBL-20-1"><col
|
||||
id="TBL-20-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-20-1-"><td style="white-space:wrap; text-align:left;" id="TBL-20-1-1"
|
||||
class="td11"><!--l. 981--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-20-1-2"
|
||||
class="td11"><!--l. 981--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-20-1-"><td style="white-space:normal; text-align:left;" id="TBL-20-1-1"
|
||||
class="td11"><!--l. 988--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-20-1-2"
|
||||
class="td11"><!--l. 988--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -346,19 +346,19 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-20-2-"><td style="white-space:wrap; text-align:left;" id="TBL-20-2-1"
|
||||
class="td11"><!--l. 982--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-20-2-2"
|
||||
class="td11"><!--l. 982--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-20-2-"><td style="white-space:normal; text-align:left;" id="TBL-20-2-1"
|
||||
class="td11"><!--l. 989--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-20-2-2"
|
||||
class="td11"><!--l. 989--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-20-3-"><td style="white-space:wrap; text-align:left;" id="TBL-20-3-1"
|
||||
class="td11"><!--l. 983--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">vmold</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-20-3-2"
|
||||
class="td11"><!--l. 983--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-20-3-"><td style="white-space:normal; text-align:left;" id="TBL-20-3-1"
|
||||
class="td11"><!--l. 990--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">vmold</span> </td><td style="white-space:normal; text-align:left;" id="TBL-20-3-2"
|
||||
class="td11"><!--l. 990--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">class</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
class="cmtt-12">psb_</span><span
|
||||
@@ -374,16 +374,16 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">optional</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-20-4-"><td style="white-space:wrap; text-align:left;" id="TBL-20-4-1"
|
||||
class="td11"><!--l. 984--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-20-4-2"
|
||||
class="td11"><!--l. 984--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-20-4-"><td style="white-space:normal; text-align:left;" id="TBL-20-4-1"
|
||||
class="td11"><!--l. 991--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-20-4-2"
|
||||
class="td11"><!--l. 991--><p class="noindent" ><span
|
||||
class="cmr-12">The desired dynamic type for internal vector components; this</span>
|
||||
<span
|
||||
class="cmr-12">allows e.g. running on GPUs.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-20-5-"><td style="white-space:wrap; text-align:left;" id="TBL-20-5-1"
|
||||
style="vertical-align:baseline;" id="TBL-20-5-"><td style="white-space:normal; text-align:left;" id="TBL-20-5-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
<!--l. 990--><p class="noindent" >
|
||||
<!--l. 997--><p class="noindent" >
|
||||
<h5 class="subsubsectionHead"><span class="titlemark"><span
|
||||
class="cmr-12">5.9.5 </span></span> <a
|
||||
id="x26-300005.9.5"></a><span
|
||||
@@ -391,8 +391,8 @@ class="cmr-12">Method: free</span><span
|
||||
class="cmr-12">_wrk</span></h5>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 992--><p class="noindent" >
|
||||
<!--l. 993--><p class="noindent" ><span class="lstinline"></span><span
|
||||
<!--l. 999--><p class="noindent" >
|
||||
<!--l. 1000--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">call</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
class="cmtt-12">p</span><span
|
||||
@@ -402,19 +402,19 @@ class="cmtt-12">(</span><span
|
||||
class="cmtt-12">info</span><span
|
||||
class="cmtt-12">)</span><br />
|
||||
</div>
|
||||
<!--l. 996--><p class="noindent" ><span
|
||||
<!--l. 1003--><p class="noindent" ><span
|
||||
class="cmr-12">Deallocate internal work vectors.</span>
|
||||
<!--l. 999--><p class="noindent" ><span
|
||||
<!--l. 1006--><p class="noindent" ><span
|
||||
class="cmbx-12">Arguments</span>
|
||||
<div class="tabular"> <table id="TBL-21" class="tabular"
|
||||
cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-21-1g"><col
|
||||
id="TBL-21-1"><col
|
||||
id="TBL-21-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-21-1-"><td style="white-space:wrap; text-align:left;" id="TBL-21-1-1"
|
||||
class="td11"><!--l. 1002--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-21-1-2"
|
||||
class="td11"><!--l. 1002--><p class="noindent" ><span class="lstinline"></span><span
|
||||
style="vertical-align:baseline;" id="TBL-21-1-"><td style="white-space:normal; text-align:left;" id="TBL-21-1-1"
|
||||
class="td11"><!--l. 1009--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-21-1-2"
|
||||
class="td11"><!--l. 1009--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
class="cmtt-12"> </span><span
|
||||
@@ -424,16 +424,16 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-21-2-"><td style="white-space:wrap; text-align:left;" id="TBL-21-2-1"
|
||||
class="td11"><!--l. 1003--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-21-2-2"
|
||||
class="td11"><!--l. 1003--><p class="noindent" ><span
|
||||
style="vertical-align:baseline;" id="TBL-21-2-"><td style="white-space:normal; text-align:left;" id="TBL-21-2-1"
|
||||
class="td11"><!--l. 1010--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-21-2-2"
|
||||
class="td11"><!--l. 1010--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-21-3-"><td style="white-space:wrap; text-align:left;" id="TBL-21-3-1"
|
||||
style="vertical-align:baseline;" id="TBL-21-3-"><td style="white-space:normal; text-align:left;" id="TBL-21-3-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Optional third party libraries</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
+13
-12
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Configuration options</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
@@ -42,9 +42,9 @@ class="cmr-12">As a minimal example consider the following:</span>
|
||||
|
||||
|
||||
|
||||
<div class="verbatim" id="verbatim-2">
|
||||
<pre class="verbatim" id="verbatim-2">
|
||||
./configure --with-psblas=PSB-INSTALL-DIR
|
||||
</div>
|
||||
</pre>
|
||||
<!--l. 130--><p class="nopar" > <span
|
||||
class="cmr-12">which assumes that the various MPI compilers and support libraries are available in</span>
|
||||
<span
|
||||
@@ -685,7 +685,8 @@ class="cmtt-12"> </span><span
|
||||
class="cmtt-12">‘--</span><span
|
||||
class="cmtt-12">prefix</span><span
|
||||
class="cmtt-12">=</span><span
|
||||
class="cmtt-12">$HOME</span><span
|
||||
class="tctt-1200">$</span><span
|
||||
class="cmtt-12">HOME</span><span
|
||||
class="cmtt-12">’.</span><span
|
||||
class="cmtt-12"> </span><br /><span class="label"><a
|
||||
id="x11-10032r31"></a></span><span
|
||||
@@ -4246,10 +4247,10 @@ class="cmr-12">might be configured with:</span>
|
||||
|
||||
|
||||
|
||||
<div class="verbatim" id="verbatim-3">
|
||||
<pre class="verbatim" id="verbatim-3">
|
||||
./configure --with-psblas=/opt/psblas-3.7/ \
|
||||
 <br />--with-umfpackincdir=/usr/include/suitesparse/
|
||||
</div>
|
||||
--with-umfpackincdir=/usr/include/suitesparse/
|
||||
</pre>
|
||||
<!--l. 155--><p class="nopar" > <span
|
||||
class="cmr-12">Once the configure script has completed execution, it will have generated the file</span>
|
||||
<span class="obeylines-h"><span class="verb"><span
|
||||
@@ -4284,17 +4285,17 @@ class="cmr-12">To build the library the user will now enter</span>
|
||||
|
||||
|
||||
|
||||
<div class="verbatim" id="verbatim-4">
|
||||
<pre class="verbatim" id="verbatim-4">
|
||||
make
|
||||
</div>
|
||||
</pre>
|
||||
<!--l. 178--><p class="nopar" > <span
|
||||
class="cmr-12">followed (optionally) by</span>
|
||||
|
||||
|
||||
|
||||
<div class="verbatim" id="verbatim-5">
|
||||
<pre class="verbatim" id="verbatim-5">
|
||||
make install
|
||||
</div>
|
||||
</pre>
|
||||
<!--l. 188--><p class="nopar" >
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Bug reporting</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Example and test programs</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
|
||||
+99
-98
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Examples</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
@@ -133,59 +133,58 @@ class="cmr-12">.</span>
|
||||
|
||||
|
||||
|
||||
<div class="minipage"><div class="verbatim" id="verbatim-6">
|
||||
<div class="minipage"><pre class="verbatim" id="verbatim-6">
|
||||
  use psb_base_mod
|
||||
 <br />  use amg_prec_mod
|
||||
 <br />  use psb_krylov_mod
|
||||
 <br />... ...
|
||||
 <br />!
|
||||
 <br />! sparse matrix
|
||||
 <br />  type(psb_dspmat_type) :: A
|
||||
 <br />! sparse matrix descriptor
|
||||
 <br />  type(psb_desc_type)   :: desc_A
|
||||
 <br />! preconditioner
|
||||
 <br />  type(amg_dprec_type)  :: P
|
||||
 <br />! right-hand side and solution vectors
|
||||
 <br />  type(psb_d_vect_type) :: b, x
|
||||
 <br />... ...
|
||||
 <br />!
|
||||
 <br />! initialize the parallel environment
|
||||
 <br />  call psb_init(ctxt)
|
||||
 <br />  call psb_info(ctxt,iam,np)
|
||||
 <br />... ...
|
||||
 <br />!
|
||||
 <br />! read and assemble the spd matrix A and the right-hand side b
|
||||
 <br />! using PSBLAS routines for sparse matrix / vector management
|
||||
 <br />... ...
|
||||
 <br />!
|
||||
 <br />! initialize the default multilevel preconditioner, i.e. V-cycle
|
||||
 <br />! with basic smoothed aggregation, 1 hybrid forward/backward
|
||||
 <br />! GS sweep as pre/post-smoother and UMFPACK as coarsest-level
|
||||
 <br />! solver
|
||||
 <br />  call P%init(’ML’,info)
|
||||
 <br />!
|
||||
 <br />! build the preconditioner
|
||||
 <br />  call P%hierarchy_build(A,desc_A,info)
|
||||
 <br />  call P%smoothers_build(A,desc_A,info)
|
||||
 <br />
|
||||
 <br />!
|
||||
 <br />! set the solver parameters and the initial guess
|
||||
 <br />  ... ...
|
||||
 <br />!
|
||||
 <br />! solve Ax=b with preconditioned CG
|
||||
 <br />  call psb_krylov(’CG’,A,P,b,x,tol,desc_A,info)
|
||||
 <br />  ... ...
|
||||
 <br />!
|
||||
 <br />! deallocate the preconditioner
|
||||
 <br />  call P%free(info)
|
||||
 <br />!
|
||||
 <br />! deallocate other data structures
|
||||
 <br />  ... ...
|
||||
 <br />!
|
||||
 <br />! exit the parallel environment
|
||||
 <br />  call psb_exit(ctxt)
|
||||
 <br />  stop
|
||||
</div>
|
||||
  use amg_prec_mod
|
||||
  use psb_krylov_mod
|
||||
... ...
|
||||
!
|
||||
! sparse matrix
|
||||
  type(psb_dspmat_type) :: A
|
||||
! sparse matrix descriptor
|
||||
  type(psb_desc_type)   :: desc_A
|
||||
! preconditioner
|
||||
  type(amg_dprec_type)  :: P
|
||||
! right-hand side and solution vectors
|
||||
  type(psb_d_vect_type) :: b, x
|
||||
... ...
|
||||
!
|
||||
! initialize the parallel environment
|
||||
  call psb_init(ctxt)
|
||||
  call psb_info(ctxt,iam,np)
|
||||
... ...
|
||||
!
|
||||
! read and assemble the spd matrix A and the right-hand side b
|
||||
! using PSBLAS routines for sparse matrix / vector management
|
||||
... ...
|
||||
!
|
||||
! initialize the default multilevel preconditioner, i.e. V-cycle
|
||||
! with basic smoothed aggregation, 1 hybrid forward/backward
|
||||
! GS sweep as pre/post-smoother and UMFPACK as coarsest-level
|
||||
! solver
|
||||
  call P%init(ctxt,’ML’,info)
|
||||
!
|
||||
! build the preconditioner
|
||||
  call P%hierarchy_build(A,desc_A,info)
|
||||
  call P%smoothers_build(A,desc_A,info)
|
||||
!
|
||||
! set the solver parameters and the initial guess
|
||||
  ... ...
|
||||
!
|
||||
! solve Ax=b with preconditioned FCG
|
||||
  call psb_krylov(’FCG’,A,P,b,x,tol,desc_A,info)
|
||||
  ... ...
|
||||
!
|
||||
! deallocate the preconditioner
|
||||
  call P%free(info)
|
||||
!
|
||||
! deallocate other data structures
|
||||
  ... ...
|
||||
!
|
||||
! exit the parallel environment
|
||||
  call psb_exit(ctxt)
|
||||
  stop
|
||||
</pre>
|
||||
<!--l. 255--><p class="nopar" >
|
||||
|
||||
|
||||
@@ -294,19 +293,19 @@ class="cmr-12">.</span>
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 318--><p class="noindent" >
|
||||
<div class="minipage"><div class="verbatim" id="verbatim-7">
|
||||
<div class="minipage"><pre class="verbatim" id="verbatim-7">
|
||||
... ...
|
||||
 <br />! build a V-cycle preconditioner with 1 block-Jacobi sweep (with
|
||||
 <br />! ILU(0) on the blocks) as pre- and post-smoother, and 8  block-Jacobi
|
||||
 <br />! sweeps (with ILU(0) on the blocks) as coarsest-level solver
|
||||
 <br />  call P%init(’ML’,info)
|
||||
 <br />  call P%set(’SMOOTHER_TYPE’,’BJAC’,info)
|
||||
 <br />  call P%set(’COARSE_SOLVE’,’BJAC’,info)
|
||||
 <br />  call P%set(’COARSE_SWEEPS’,8,info)
|
||||
 <br />  call P%hierarchy_build(A,desc_A,info)
|
||||
 <br />  call P%smoothers_build(A,desc_A,info)
|
||||
 <br />... ...
|
||||
</div>
|
||||
! build a V-cycle preconditioner with 1 block-Jacobi sweep (with
|
||||
! ILU(0) on the blocks) as pre- and post-smoother, and 8  block-Jacobi
|
||||
! sweeps (with ILU(0) on the blocks) as coarsest-level solver
|
||||
  call P%init(ctxt,’ML’,info)
|
||||
  call P%set(’SMOOTHER_TYPE’,’BJAC’,info)
|
||||
  call P%set(’COARSE_SOLVE’,’BJAC’,info)
|
||||
  call P%set(’COARSE_SWEEPS’,8,info)
|
||||
  call P%hierarchy_build(A,desc_A,info)
|
||||
  call P%smoothers_build(A,desc_A,info)
|
||||
... ...
|
||||
</pre>
|
||||
<!--l. 333--><p class="nopar" ></div></div>
|
||||
<br /><div class="caption"
|
||||
><span class="id">Listing 2: </span><span
|
||||
@@ -326,25 +325,27 @@ class="content">setup of a multilevel preconditioner based on the default decoup
|
||||
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 360--><p class="noindent" >
|
||||
<div class="minipage"><div class="verbatim" id="verbatim-8">
|
||||
<!--l. 362--><p class="noindent" >
|
||||
<div class="minipage"><pre class="verbatim" id="verbatim-8">
|
||||
... ...
|
||||
 <br />! build a W-cycle preconditioner with 2 hybrid Gauss-Seidel sweeps
|
||||
 <br />! as pre- and post-smoother, a distributed coarsest
|
||||
 <br />! matrix, and MUMPS as coarsest-level solver
|
||||
 <br />  call P%init(’ML’,info)
|
||||
 <br />  call P%set(’PAR_AGGR_ALG’,’COUPLED’,info)
|
||||
 <br />call P%set(’AGGR_TYPE’,’MATCHBOXP’,info)
|
||||
 <br />call P%set(’AGGR_SIZE’,8,info)
|
||||
 <br />  call P%set(’ML_CYCLE’,’WCYCLE’,info)
|
||||
 <br />  call P%set(’SMOOTHER_TYPE’,’FBGS’,info)
|
||||
 <br />  call P%set(’SMOOTHER_SWEEPS’,2,info)
|
||||
 <br />  call P%set(’COARSE_SOLVE’,’KRM’,info)
|
||||
 <br />  call P%hierarchy_build(A,desc_A,info)
|
||||
 <br />  call P%smoothers_build(A,desc_A,info)
|
||||
 <br />... ...
|
||||
</div>
|
||||
<!--l. 379--><p class="nopar" ></div></div>
|
||||
! build a W-cycle preconditioner with 2 hybrid Gauss-Seidel sweeps
|
||||
! as pre- and post-smoother, a distributed coarsest
|
||||
! matrix, and MUMPS as coarsest-level solver
|
||||
  call P%init(ctxt,’ML’,info)
|
||||
  call P%set(’PAR_AGGR_ALG’,’COUPLED’,info)
|
||||
  call P%set(’AGGR_TYPE’,’MATCHBOXP’,info)
|
||||
  call P%set(’AGGR_SIZE’,8,info)
|
||||
  call P%set(’ML_CYCLE’,’WCYCLE’,info)
|
||||
  call P%set(’SMOOTHER_TYPE’,’FBGS’,info)
|
||||
  call P%set(’SMOOTHER_SWEEPS’,2,info)
|
||||
  call P%set(’COARSE_SOLVE’,’KRM’,info)
|
||||
  call P%set(’COARSE_MAT’,’DIST’,info)
|
||||
  call P%set(’KRM_METHOD’,’FCG’,info)
|
||||
  call P%hierarchy_build(A,desc_A,info)
|
||||
  call P%smoothers_build(A,desc_A,info)
|
||||
... ...
|
||||
</pre>
|
||||
<!--l. 383--><p class="nopar" ></div></div>
|
||||
<br /> <div class="caption"
|
||||
><span class="id">Listing 3: </span><span
|
||||
class="content">setup of a multilevel preconditioner based on the coupled coarsening using
|
||||
@@ -356,7 +357,7 @@ weighted matching</span></div><!--tex4ht:label?: x15-14003r3 -->
|
||||
|
||||
|
||||
|
||||
<!--l. 386--><p class="indent" > <a
|
||||
<!--l. 390--><p class="indent" > <a
|
||||
id="x15-14004r4"></a><hr class="float"><div class="float"
|
||||
>
|
||||
|
||||
@@ -364,18 +365,18 @@ weighted matching</span></div><!--tex4ht:label?: x15-14003r3 -->
|
||||
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 398--><p class="noindent" >
|
||||
<div class="minipage"><div class="verbatim" id="verbatim-9">
|
||||
<!--l. 402--><p class="noindent" >
|
||||
<div class="minipage"><pre class="verbatim" id="verbatim-9">
|
||||
... ...
|
||||
 <br />! set RAS with overlap 2 and ILU(0) on the local blocks
|
||||
 <br />  call P%init(’AS’,info)
|
||||
 <br />  call P%set(’SUB_OVR’,2,info)
|
||||
 <br />  call P%bld(A,desc_A,info)
|
||||
 <br />... ...
|
||||
 <br />! solve Ax=b with preconditioned BiCGSTAB
|
||||
 <br />  call psb_krylov(’BICGSTAB’,A,P,b,x,tol,desc_A,info)
|
||||
</div>
|
||||
<!--l. 410--><p class="nopar" ></div></div>
|
||||
! set RAS with overlap 2 and ILU(0) on the local blocks
|
||||
  call P%init(ctxt,’AS’,info)
|
||||
  call P%set(’SUB_OVR’,2,info)
|
||||
  call P%bld(A,desc_A,info)
|
||||
... ...
|
||||
! solve Ax=b with preconditioned BiCGSTAB
|
||||
  call psb_krylov(’BICGSTAB’,A,P,b,x,tol,desc_A,info)
|
||||
</pre>
|
||||
<!--l. 414--><p class="nopar" ></div></div>
|
||||
<br /> <div class="caption"
|
||||
><span class="id">Listing 4: </span><span
|
||||
class="content">setup of a one-level Schwarz preconditioner.</span></div><!--tex4ht:label?: x15-14004r4 -->
|
||||
@@ -386,7 +387,7 @@ class="content">setup of a one-level Schwarz preconditioner.</span></div><!--tex
|
||||
|
||||
|
||||
|
||||
<!--l. 420--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 424--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu7.html" ><span
|
||||
class="cmr-12">next</span></a><span
|
||||
@@ -397,6 +398,6 @@ class="cmr-12">] [</span><a
|
||||
href="userhtmlse4.html#userhtmlsu6.html" ><span
|
||||
class="cmr-12">up</span></a><span
|
||||
class="cmr-12">] </span></p></div>
|
||||
<!--l. 420--><p class="indent" > <a
|
||||
<!--l. 424--><p class="indent" > <a
|
||||
id="tailuserhtmlsu6.html"></a>
|
||||
</body></html>
|
||||
|
||||
+69
-74
@@ -3,14 +3,14 @@
|
||||
<html >
|
||||
<head><title>GPU example</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
</head><body
|
||||
>
|
||||
<!--l. 420--><div class="crosslinks"><p class="noindent"><span
|
||||
<!--l. 424--><div class="crosslinks"><p class="noindent"><span
|
||||
class="cmr-12">[</span><a
|
||||
href="userhtmlsu6.html" ><span
|
||||
class="cmr-12">prev</span></a><span
|
||||
@@ -28,7 +28,7 @@ class="cmr-12">] </span></p></div>
|
||||
class="cmr-12">4.2 </span></span> <a
|
||||
id="x16-150004.2"></a><span
|
||||
class="cmr-12">GPU example</span></h4>
|
||||
<!--l. 422--><p class="noindent" ><span
|
||||
<!--l. 426--><p class="noindent" ><span
|
||||
class="cmr-12">The code discussed here shows how to set up a program exploiting the combined GPU</span>
|
||||
<span
|
||||
class="cmr-12">capabilities of PSBLAS and AMG4PSBLAS. The code example is available in the</span>
|
||||
@@ -36,14 +36,14 @@ class="cmr-12">capabilities of PSBLAS and AMG4PSBLAS. The code example is availa
|
||||
class="cmr-12">source distribution directory </span><span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-12">amg4psblas/examples/gpu</span></span></span><span
|
||||
class="cmr-12">.</span>
|
||||
<!--l. 427--><p class="indent" > <span
|
||||
<!--l. 431--><p class="indent" > <span
|
||||
class="cmr-12">First of all, we need to include the appropriate modules and declare some auxiliary</span>
|
||||
<span
|
||||
class="cmr-12">variables:</span>
|
||||
|
||||
|
||||
|
||||
<!--l. 429--><p class="indent" > <a
|
||||
<!--l. 433--><p class="indent" > <a
|
||||
id="x16-15001r5"></a><hr class="float"><div class="float"
|
||||
>
|
||||
|
||||
@@ -51,26 +51,25 @@ class="cmr-12">variables:</span>
|
||||
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 448--><p class="noindent" >
|
||||
<div class="minipage"><div class="verbatim" id="verbatim-10">
|
||||
<!--l. 452--><p class="noindent" >
|
||||
<div class="minipage"><pre class="verbatim" id="verbatim-10">
|
||||
program amg_dexample_gpu
|
||||
 <br />  use psb_base_mod
|
||||
 <br />  use amg_prec_mod
|
||||
 <br />  use psb_krylov_mod
|
||||
 <br />  use psb_util_mod
|
||||
 <br />  use psb_gpu_mod
|
||||
 <br />  use data_input
|
||||
 <br />  use amg_d_pde_mod
|
||||
 <br />  implicit none
|
||||
 <br />  .......
|
||||
 <br />  ! GPU variables
|
||||
 <br />  type(psb_d_hlg_sparse_mat) :: agmold
|
||||
 <br />  type(psb_d_vect_gpu)       :: vgmold
|
||||
 <br />  type(psb_i_vect_gpu)       :: igmold
|
||||
 <br />
|
||||
 <br /> 
|
||||
</div>
|
||||
<!--l. 467--><p class="nopar" ></div></div>
|
||||
  use psb_base_mod
|
||||
  use amg_prec_mod
|
||||
  use psb_krylov_mod
|
||||
  use psb_util_mod
|
||||
  use psb_gpu_mod
|
||||
  use data_input
|
||||
  use amg_d_pde_mod
|
||||
  implicit none
|
||||
  .......
|
||||
  ! GPU variables
|
||||
  type(psb_d_hlg_sparse_mat) :: agmold
|
||||
  type(psb_d_vect_gpu)       :: vgmold
|
||||
  type(psb_i_vect_gpu)       :: igmold
|
||||
 
|
||||
</pre>
|
||||
<!--l. 471--><p class="nopar" ></div></div>
|
||||
<br /> <div class="caption"
|
||||
><span class="id">Listing 5: </span><span
|
||||
class="content">setup of a GPU-enabled test program part one.</span></div><!--tex4ht:label?: x16-15001r5 -->
|
||||
@@ -78,7 +77,7 @@ class="content">setup of a GPU-enabled test program part one.</span></div><!--te
|
||||
|
||||
|
||||
</div><hr class="endfloat" />
|
||||
<!--l. 474--><p class="indent" > <span
|
||||
<!--l. 478--><p class="indent" > <span
|
||||
class="cmr-12">In this particular example we are choosing to employ a </span><span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-12">HLG</span></span></span> <span
|
||||
class="cmr-12">data structure for</span>
|
||||
@@ -86,7 +85,7 @@ class="cmr-12">data structure for</span>
|
||||
class="cmr-12">sparse matrices on GPUs; for more information please refer to the PSBLAS-EXT users’</span>
|
||||
<span
|
||||
class="cmr-12">guide.</span>
|
||||
<!--l. 478--><p class="indent" > <span
|
||||
<!--l. 482--><p class="indent" > <span
|
||||
class="cmr-12">We then have to initialize the GPU environment, and pass the appropriate MOLD</span>
|
||||
<span
|
||||
class="cmr-12">variables to the build methods (see also the PSBLAS and PSBLAS-EXT users’</span>
|
||||
@@ -95,7 +94,7 @@ class="cmr-12">guides).</span>
|
||||
|
||||
|
||||
|
||||
<!--l. 481--><p class="indent" > <a
|
||||
<!--l. 485--><p class="indent" > <a
|
||||
id="x16-15002r6"></a><hr class="float"><div class="float"
|
||||
>
|
||||
|
||||
@@ -103,22 +102,21 @@ class="cmr-12">guides).</span>
|
||||
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 497--><p class="noindent" >
|
||||
<div class="minipage"><div class="verbatim" id="verbatim-11">
|
||||
<!--l. 501--><p class="noindent" >
|
||||
<div class="minipage"><pre class="verbatim" id="verbatim-11">
|
||||
  call psb_init(ctxt)
|
||||
 <br />  call psb_info(ctxt,iam,np)
|
||||
 <br />  !
|
||||
 <br />  ! BEWARE: if you have NGPUS  per node, the default is to
|
||||
 <br />  ! attach to mod(IAM,NGPUS)
|
||||
 <br />  !
|
||||
 <br />  call psb_gpu_init(ictxt)
|
||||
 <br />  ......
|
||||
 <br />  t1 = psb_wtime()
|
||||
 <br />  call prec%smoothers_build(a,desc_a,info, amold=agmold, vmold=vgmold, imold=igmold)
|
||||
 <br />
|
||||
 <br /> 
|
||||
</div>
|
||||
<!--l. 512--><p class="nopar" ></div></div>
|
||||
  call psb_info(ctxt,iam,np)
|
||||
  !
|
||||
  ! BEWARE: if you have NGPUS  per node, the default is to
|
||||
  ! attach to mod(IAM,NGPUS)
|
||||
  !
|
||||
  call psb_gpu_init(ictxt)
|
||||
  ......
|
||||
  t1 = psb_wtime()
|
||||
  call prec%smoothers_build(a,desc_a,info, amold=agmold, vmold=vgmold, imold=igmold)
|
||||
 
|
||||
</pre>
|
||||
<!--l. 516--><p class="nopar" ></div></div>
|
||||
<br /> <div class="caption"
|
||||
><span class="id">Listing 6: </span><span
|
||||
class="content">setup of a GPU-enabled test program part two.</span></div><!--tex4ht:label?: x16-15002r6 -->
|
||||
@@ -126,7 +124,7 @@ class="content">setup of a GPU-enabled test program part two.</span></div><!--te
|
||||
|
||||
|
||||
</div><hr class="endfloat" />
|
||||
<!--l. 519--><p class="indent" > <span
|
||||
<!--l. 523--><p class="indent" > <span
|
||||
class="cmr-12">Finally, we convert the input matrix, the descriptor and the vectors to use a</span>
|
||||
<span
|
||||
class="cmr-12">GPU-enabled internal storage format. We then preallocate the preconditioner</span>
|
||||
@@ -137,7 +135,7 @@ class="cmr-12">GPU environment</span>
|
||||
|
||||
|
||||
|
||||
<!--l. 523--><p class="indent" > <a
|
||||
<!--l. 527--><p class="indent" > <a
|
||||
id="x16-15003r7"></a><hr class="float"><div class="float"
|
||||
>
|
||||
|
||||
@@ -145,34 +143,31 @@ class="cmr-12">GPU environment</span>
|
||||
|
||||
<div class="center"
|
||||
>
|
||||
<!--l. 553--><p class="noindent" >
|
||||
<div class="minipage"><div class="verbatim" id="verbatim-12">
|
||||
<!--l. 557--><p class="noindent" >
|
||||
<div class="minipage"><pre class="verbatim" id="verbatim-12">
|
||||
  call desc_a%cnv(mold=igmold)
|
||||
 <br />  call a%cscnv(info,mold=agmold)
|
||||
 <br />  call psb_geasb(x,desc_a,info,mold=vgmold)
|
||||
 <br />  call psb_geasb(b,desc_a,info,mold=vgmold)
|
||||
 <br />
|
||||
 <br />  !
|
||||
 <br />  ! iterative method parameters
|
||||
 <br />  !
|
||||
 <br />  call psb_barrier(ctxt)
|
||||
 <br />  call prec%allocate_wrk(info)
|
||||
 <br />  t1 = psb_wtime()
|
||||
 <br />  call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,&
|
||||
 <br />       & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,&
|
||||
 <br />       & istop=s_choice%istopc,irst=s_choice%irst)
|
||||
 <br />  call prec%deallocate_wrk(info)
|
||||
 <br />  call psb_barrier(ctxt)
|
||||
 <br />  tslv = psb_wtime() - t1
|
||||
 <br />
|
||||
 <br />  ......
|
||||
 <br />  call psb_gpu_exit()
|
||||
 <br />  call psb_exit(ctxt)
|
||||
 <br />  stop
|
||||
 <br />
|
||||
 <br /> 
|
||||
</div>
|
||||
<!--l. 580--><p class="nopar" ></div></div>
|
||||
  call a%cscnv(info,mold=agmold)
|
||||
  call psb_geasb(x,desc_a,info,mold=vgmold)
|
||||
  call psb_geasb(b,desc_a,info,mold=vgmold)
|
||||
  !
|
||||
  ! iterative method parameters
|
||||
  !
|
||||
  call psb_barrier(ctxt)
|
||||
  call prec%allocate_wrk(info)
|
||||
  t1 = psb_wtime()
|
||||
  call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,&
|
||||
       & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,&
|
||||
       & istop=s_choice%istopc,irst=s_choice%irst)
|
||||
  call prec%deallocate_wrk(info)
|
||||
  call psb_barrier(ctxt)
|
||||
  tslv = psb_wtime() - t1
|
||||
  ......
|
||||
  call psb_gpu_exit()
|
||||
  call psb_exit(ctxt)
|
||||
  stop
|
||||
 
|
||||
</pre>
|
||||
<!--l. 584--><p class="nopar" ></div></div>
|
||||
<br /> <div class="caption"
|
||||
><span class="id">Listing 7: </span><span
|
||||
class="content">setup of a GPU-enabled test program part three.</span></div><!--tex4ht:label?: x16-15003r7 -->
|
||||
@@ -180,7 +175,7 @@ class="content">setup of a GPU-enabled test program part three.</span></div><!--
|
||||
|
||||
|
||||
</div><hr class="endfloat" />
|
||||
<!--l. 588--><p class="indent" > <span
|
||||
<!--l. 592--><p class="indent" > <span
|
||||
class="cmr-12">It is very important to employ smoothers and coarsest solvers that are suited to the</span>
|
||||
<span
|
||||
class="cmr-12">GPU, i.e. methods that do NOT employ triangular system solve kernels. Methods that</span>
|
||||
@@ -203,7 +198,7 @@ class="cmtt-12">INVT</span></span></span>
|
||||
<li class="itemize"><span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-12">AINV</span></span></span></li></ul>
|
||||
</li></ul>
|
||||
<!--l. 600--><p class="noindent" ><span
|
||||
<!--l. 604--><p class="noindent" ><span
|
||||
class="cmr-12">and their </span><span
|
||||
class="cmmi-12">ℓ</span><sub><span
|
||||
class="cmr-8">1</span></sub> <span
|
||||
|
||||
+17
-17
@@ -3,8 +3,8 @@
|
||||
<html >
|
||||
<head><title>Method init</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
||||
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
||||
<!-- html,3 -->
|
||||
<meta name="src" content="userhtml.tex">
|
||||
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
||||
@@ -54,9 +54,9 @@ cellspacing="0" cellpadding="0"
|
||||
><colgroup id="TBL-2-1g"><col
|
||||
id="TBL-2-1"><col
|
||||
id="TBL-2-2"></colgroup><tr
|
||||
style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:wrap; text-align:left;" id="TBL-2-1-1"
|
||||
style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:normal; text-align:left;" id="TBL-2-1-1"
|
||||
class="td11"><!--l. 56--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">contxt</span> </td> <td style="white-space:wrap; text-align:left;" id="TBL-2-1-2"
|
||||
class="cmtt-12">contxt</span> </td> <td style="white-space:normal; text-align:left;" id="TBL-2-1-2"
|
||||
class="td11"><!--l. 56--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">type</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
@@ -69,13 +69,13 @@ class="cmtt-12">in</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:wrap; text-align:left;" id="TBL-2-2-1"
|
||||
class="td11"><!--l. 57--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-2-2-2"
|
||||
style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:normal; text-align:left;" id="TBL-2-2-1"
|
||||
class="td11"><!--l. 57--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-2-2"
|
||||
class="td11"><!--l. 57--><p class="noindent" ><span
|
||||
class="cmr-12">The communication context.</span> </td></tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:wrap; text-align:left;" id="TBL-2-3-1"
|
||||
style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:normal; text-align:left;" id="TBL-2-3-1"
|
||||
class="td11"><!--l. 58--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">ptype</span> </td> <td style="white-space:wrap; text-align:left;" id="TBL-2-3-2"
|
||||
class="cmtt-12">ptype</span> </td> <td style="white-space:normal; text-align:left;" id="TBL-2-3-2"
|
||||
class="td11"><!--l. 58--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">character</span><span
|
||||
class="cmtt-12">(</span><span
|
||||
@@ -88,8 +88,8 @@ class="cmtt-12">in</span><span
|
||||
class="cmtt-12">)</span> <span
|
||||
class="cmr-12">.</span></td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:wrap; text-align:left;" id="TBL-2-4-1"
|
||||
class="td11"><!--l. 59--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-2-4-2"
|
||||
style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:normal; text-align:left;" id="TBL-2-4-1"
|
||||
class="td11"><!--l. 59--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-4-2"
|
||||
class="td11"><!--l. 59--><p class="noindent" ><span
|
||||
class="cmr-12">The type of preconditioner. Its values are specified in Table</span><span
|
||||
class="cmr-12"> </span><a
|
||||
@@ -97,14 +97,14 @@ href="userhtmlse4.html#x14-13015r1"><span
|
||||
class="cmr-12">1</span><!--tex4ht:ref: tab:precinit --></a><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:wrap; text-align:left;" id="TBL-2-5-1"
|
||||
class="td11"><!--l. 61--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-2-5-2"
|
||||
style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:normal; text-align:left;" id="TBL-2-5-1"
|
||||
class="td11"><!--l. 61--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-5-2"
|
||||
class="td11"><!--l. 61--><p class="noindent" ><span
|
||||
class="cmr-12">Note that strings are case insensitive.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:wrap; text-align:left;" id="TBL-2-6-1"
|
||||
style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:normal; text-align:left;" id="TBL-2-6-1"
|
||||
class="td11"><!--l. 62--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">info</span> </td><td style="white-space:wrap; text-align:left;" id="TBL-2-6-2"
|
||||
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-2-6-2"
|
||||
class="td11"><!--l. 62--><p class="noindent" ><span class="lstinline"></span><span
|
||||
class="cmtt-12">integer</span><span
|
||||
class="cmtt-12">,</span><span
|
||||
@@ -115,8 +115,8 @@ class="cmtt-12">out</span><span
|
||||
class="cmtt-12">)</span><span
|
||||
class="cmr-12">.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-2-7-"><td style="white-space:wrap; text-align:left;" id="TBL-2-7-1"
|
||||
class="td11"><!--l. 63--><p class="noindent" > </td><td style="white-space:wrap; text-align:left;" id="TBL-2-7-2"
|
||||
style="vertical-align:baseline;" id="TBL-2-7-"><td style="white-space:normal; text-align:left;" id="TBL-2-7-1"
|
||||
class="td11"><!--l. 63--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-7-2"
|
||||
class="td11"><!--l. 63--><p class="noindent" ><span
|
||||
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
||||
class="cmr-12"> </span><a
|
||||
@@ -124,7 +124,7 @@ href="userhtmlse7.html#x28-320007"><span
|
||||
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
||||
class="cmr-12">for details.</span> </td>
|
||||
</tr><tr
|
||||
style="vertical-align:baseline;" id="TBL-2-8-"><td style="white-space:wrap; text-align:left;" id="TBL-2-8-1"
|
||||
style="vertical-align:baseline;" id="TBL-2-8-"><td style="white-space:normal; text-align:left;" id="TBL-2-8-1"
|
||||
class="td11"> </td> </tr></table></div>
|
||||
|
||||
|
||||
|
||||
+613
-609
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -211,12 +211,12 @@ ps: $(PS)
|
||||
|
||||
.PHONY: clean clean-tmp preview print gzip gunzip tar ci
|
||||
|
||||
clean:
|
||||
clean: clean-tmp
|
||||
rm -f $(PDF) $(PS)
|
||||
cd tmp ; rm -r -f *
|
||||
|
||||
|
||||
clean-tmp:
|
||||
cd tmp ; rm -r -f *
|
||||
(test -d tmp && cd tmp && rm -r -f *)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
+18
-14
@@ -174,7 +174,7 @@ the corresponding codes are available in \verb|samples/simple/file|\-\verb|read|
|
||||
! with basic smoothed aggregation, 1 hybrid forward/backward
|
||||
! GS sweep as pre/post-smoother and UMFPACK as coarsest-level
|
||||
! solver
|
||||
call P%init('ML',info)
|
||||
call P%init(ctxt,'ML',info)
|
||||
!
|
||||
! build the preconditioner
|
||||
call P%hierarchy_build(A,desc_A,info)
|
||||
@@ -184,8 +184,8 @@ the corresponding codes are available in \verb|samples/simple/file|\-\verb|read|
|
||||
! set the solver parameters and the initial guess
|
||||
... ...
|
||||
!
|
||||
! solve Ax=b with preconditioned CG
|
||||
call psb_krylov('CG',A,P,b,x,tol,desc_A,info)
|
||||
! solve Ax=b with preconditioned FCG
|
||||
call psb_krylov('FCG',A,P,b,x,tol,desc_A,info)
|
||||
... ...
|
||||
!
|
||||
! deallocate the preconditioner
|
||||
@@ -229,7 +229,7 @@ stop
|
||||
! with basic smoothed aggregation, 1 hybrid forward/backward
|
||||
! GS sweep as pre/post-smoother and UMFPACK as coarsest-level
|
||||
! solver
|
||||
call P%init('ML',info)
|
||||
call P%init(ctxt,'ML',info)
|
||||
!
|
||||
! build the preconditioner
|
||||
call P%hierarchy_build(A,desc_A,info)
|
||||
@@ -239,8 +239,8 @@ stop
|
||||
! set the solver parameters and the initial guess
|
||||
... ...
|
||||
!
|
||||
! solve Ax=b with preconditioned CG
|
||||
call psb_krylov('CG',A,P,b,x,tol,desc_A,info)
|
||||
! solve Ax=b with preconditioned FCG
|
||||
call psb_krylov('FCG',A,P,b,x,tol,desc_A,info)
|
||||
... ...
|
||||
!
|
||||
! deallocate the preconditioner
|
||||
@@ -307,7 +307,7 @@ boundary conditions are also available in the directory \verb|samples/simple/pde
|
||||
! build a V-cycle preconditioner with 1 block-Jacobi sweep (with
|
||||
! ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
|
||||
! sweeps (with ILU(0) on the blocks) as coarsest-level solver
|
||||
call P%init('ML',info)
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('SMOOTHER_TYPE','BJAC',info)
|
||||
call P%set('COARSE_SOLVE','BJAC',info)
|
||||
call P%set('COARSE_SWEEPS',8,info)
|
||||
@@ -323,7 +323,7 @@ call P%smoothers_build(A,desc_A,info)
|
||||
! build a V-cycle preconditioner with 1 block-Jacobi sweep (with
|
||||
! ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
|
||||
! sweeps (with ILU(0) on the blocks) as coarsest-level solver
|
||||
call P%init('ML',info)
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('SMOOTHER_TYPE','BJAC',info)
|
||||
call P%set('COARSE_SOLVE','BJAC',info)
|
||||
call P%set('COARSE_SWEEPS',8,info)
|
||||
@@ -345,7 +345,7 @@ call P%smoothers_build(A,desc_A,info)
|
||||
!2 hybrid Gauss-Seidel sweeps as pre- and post-smoother,
|
||||
!and parallel flexible Conjugate Gradient coupled with the block-Jacobi
|
||||
!preconditioner having ILU(0) on the blocks as coarsest solver.
|
||||
call P%init('ML',info)
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('PAR_AGGR_ALG','COUPLED',info)
|
||||
call P%set('AGGR_TYPE','MATCHBOXP',info)
|
||||
call P%set('AGGR_SIZE',8,info)
|
||||
@@ -353,6 +353,8 @@ call P%set('ML_CYCLE','WCYCLE',info)
|
||||
call P%set('SMOOTHER_TYPE','FBGS',info)
|
||||
call P%set('SMOOTHER_SWEEPS',2,info)
|
||||
call P%set('COARSE_SOLVE','KRM',info)
|
||||
call P%set('COARSE_MAT','DIST',info)
|
||||
call P%set('KRM_METHOD','FCG',info)
|
||||
call P%hierarchy_build(A,desc_A,info)
|
||||
call P%smoothers_build(A,desc_A,info)
|
||||
\end{minted}
|
||||
@@ -365,14 +367,16 @@ call P%smoothers_build(A,desc_A,info)
|
||||
! build a W-cycle preconditioner with 2 hybrid Gauss-Seidel sweeps
|
||||
! as pre- and post-smoother, a distributed coarsest
|
||||
! matrix, and MUMPS as coarsest-level solver
|
||||
call P%init('ML',info)
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('PAR_AGGR_ALG','COUPLED',info)
|
||||
call P%set('AGGR_TYPE','MATCHBOXP',info)
|
||||
call P%set('AGGR_SIZE',8,info)
|
||||
call P%set('AGGR_TYPE','MATCHBOXP',info)
|
||||
call P%set('AGGR_SIZE',8,info)
|
||||
call P%set('ML_CYCLE','WCYCLE',info)
|
||||
call P%set('SMOOTHER_TYPE','FBGS',info)
|
||||
call P%set('SMOOTHER_SWEEPS',2,info)
|
||||
call P%set('COARSE_SOLVE','KRM',info)
|
||||
call P%set('COARSE_MAT','DIST',info)
|
||||
call P%set('KRM_METHOD','FCG',info)
|
||||
call P%hierarchy_build(A,desc_A,info)
|
||||
call P%smoothers_build(A,desc_A,info)
|
||||
... ...
|
||||
@@ -387,7 +391,7 @@ call P%set('AGGR_SIZE',8,info)
|
||||
\ifpdf
|
||||
\begin{minted}[breaklines=true,bgcolor=bg,fontsize=\small]{fortran}
|
||||
! build a one-level RAS with overlap 2 and ILU(0) on the local blocks.
|
||||
call P%init('AS',info)
|
||||
call P%init(ctxt,'AS',info)
|
||||
call P%set('SUB_OVR',2,info)
|
||||
call P%build(A,desc_A,info)
|
||||
... ...
|
||||
@@ -401,7 +405,7 @@ call P%build(A,desc_A,info)
|
||||
\begin{verbatim}
|
||||
... ...
|
||||
! set RAS with overlap 2 and ILU(0) on the local blocks
|
||||
call P%init('AS',info)
|
||||
call P%init(ctxt,'AS',info)
|
||||
call P%set('SUB_OVR',2,info)
|
||||
call P%bld(A,desc_A,info)
|
||||
... ...
|
||||
|
||||
@@ -176,9 +176,10 @@ Similar considerations apply to the point-Jacobi, Gauss-Seidel and block-Jacobi
|
||||
coarsest-level solvers, and shortcuts are available
|
||||
in this case too (see Table~\ref{tab:p_coarse_1}). \\
|
||||
|
||||
\textbf{Remark 3.} Many of the coarsest-level solvers cannot be used
|
||||
with both replicated and distributed coarsest-matrix layouts;
|
||||
therefore, setting the solver after the layout may change the layout.
|
||||
\textbf{Remark 3.} Many of the coarsest-level solvers apply to a
|
||||
specific coarsest-matrix layout;
|
||||
therefore, setting the solver after the layout may change the layout
|
||||
to either distributed or replicated.
|
||||
Similarly, setting the layout after the solver may change the solver.
|
||||
|
||||
More precisely, UMFPACK and SuperLU require the coarsest-level
|
||||
@@ -399,8 +400,14 @@ the parameter \texttt{ilev}.} \\
|
||||
\fortinline|'COARSE_SOLVE'| & \fortinline|character(len=*)|
|
||||
& \fortinline|'MUMPS'| \par \fortinline|'UMF'| \par
|
||||
\fortinline|'SLU'| \par \fortinline|'SLUDIST'| \par
|
||||
\fortinline|'JACOBI'| \par \fortinline|'GS'| \par \fortinline|'BJAC'| \par \fortinline|'KRM'|
|
||||
\fortinline|'L1-JACOBI'| \par \fortinline|'L1-BJAC'| \par \fortinline|'L1-FBGS'|
|
||||
\fortinline|'ILU'| \par
|
||||
\fortinline|'JACOBI'| \par
|
||||
\fortinline|'GS'| \par
|
||||
\fortinline|'BJAC'| \par
|
||||
\fortinline|'KRM'| \par
|
||||
\fortinline|'L1-JACOBI'| \par
|
||||
\fortinline|'L1-BJAC'| \par
|
||||
\fortinline|'L1-FBGS'|
|
||||
& See~Note.
|
||||
& Solver used at the coarsest level: sequential
|
||||
LU from MUMPS, UMFPACK, or SuperLU
|
||||
|
||||
@@ -676,8 +676,9 @@ contains
|
||||
call read_data(prec%aggr_prol,inp_unit) ! aggregation type
|
||||
call read_data(prec%par_aggr_alg,inp_unit) ! parallel aggregation alg
|
||||
call read_data(prec%aggr_ord,inp_unit) ! ordering for aggregation
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%mncrratio,inp_unit) ! minimum aggregation ratio
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
call read_data(prec%thrvsz,inp_unit) ! size of aggr thresh vector
|
||||
if (prec%thrvsz > 0) then
|
||||
call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
@@ -685,7 +686,6 @@ contains
|
||||
else
|
||||
read(inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,inp_unit) ! coarsest-lev subsolver
|
||||
|
||||
@@ -676,8 +676,9 @@ contains
|
||||
call read_data(prec%aggr_prol,inp_unit) ! aggregation type
|
||||
call read_data(prec%par_aggr_alg,inp_unit) ! parallel aggregation alg
|
||||
call read_data(prec%aggr_ord,inp_unit) ! ordering for aggregation
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%mncrratio,inp_unit) ! minimum aggregation ratio
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
call read_data(prec%thrvsz,inp_unit) ! size of aggr thresh vector
|
||||
if (prec%thrvsz > 0) then
|
||||
call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
@@ -685,7 +686,6 @@ contains
|
||||
else
|
||||
read(inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,inp_unit) ! coarsest-lev subsolver
|
||||
|
||||
@@ -676,8 +676,9 @@ contains
|
||||
call read_data(prec%aggr_prol,inp_unit) ! aggregation type
|
||||
call read_data(prec%par_aggr_alg,inp_unit) ! parallel aggregation alg
|
||||
call read_data(prec%aggr_ord,inp_unit) ! ordering for aggregation
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%mncrratio,inp_unit) ! minimum aggregation ratio
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
call read_data(prec%thrvsz,inp_unit) ! size of aggr thresh vector
|
||||
if (prec%thrvsz > 0) then
|
||||
call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
@@ -685,7 +686,6 @@ contains
|
||||
else
|
||||
read(inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,inp_unit) ! coarsest-lev subsolver
|
||||
|
||||
@@ -676,8 +676,9 @@ contains
|
||||
call read_data(prec%aggr_prol,inp_unit) ! aggregation type
|
||||
call read_data(prec%par_aggr_alg,inp_unit) ! parallel aggregation alg
|
||||
call read_data(prec%aggr_ord,inp_unit) ! ordering for aggregation
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%mncrratio,inp_unit) ! minimum aggregation ratio
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
call read_data(prec%thrvsz,inp_unit) ! size of aggr thresh vector
|
||||
if (prec%thrvsz > 0) then
|
||||
call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
@@ -685,7 +686,6 @@ contains
|
||||
else
|
||||
read(inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,inp_unit) ! coarsest-lev subsolver
|
||||
|
||||
@@ -41,11 +41,11 @@ VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MUL
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
-2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
%%%%%%%%%%% Coarse level solver %%%%%%%%%%%%%%%%
|
||||
SLU ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC
|
||||
SLU ! Coarsest-level subsolver for BJAC: ILU ILUT MILU UMF MUMPS SLU
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
%%%%%%%%%%% General arguments % Lines starting with % are ignored.
|
||||
mld_mat.mtx ! Other matrices from: http://math.nist.gov/MatrixMarket/ or
|
||||
mld_rhs.mtx ! rhs ! http://www.cise.ufl.edu/research/sparse/matrices/index.html
|
||||
amg_mat.mtx ! Other matrices from: http://math.nist.gov/MatrixMarket/ or
|
||||
amg_rhs.mtx ! rhs ! http://www.cise.ufl.edu/research/sparse/matrices/index.html
|
||||
NONE ! Initial guess
|
||||
mld_sol.mtx ! Reference solution
|
||||
amg_sol.mtx ! Reference solution
|
||||
MM ! File format: MatrixMarket or Harwell-Boeing
|
||||
CSR ! Storage format: CSR COO JAD
|
||||
GRAPH ! PART (partition method): BLOCK GRAPH
|
||||
@@ -41,11 +41,11 @@ VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MUL
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
-2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
%%%%%%%%%%% Coarse level solver %%%%%%%%%%%%%%%%
|
||||
UMF ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC
|
||||
UMF ! Coarsest-level subsolver for BJAC: ILU ILUT MILU UMF MUMPS SLU
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
%%%%%%%%%%% General arguments % Lines starting with % are ignored.
|
||||
mld_mat.mtx ! Other matrices from: http://math.nist.gov/MatrixMarket/ or
|
||||
mld_rhs.mtx ! rhs ! http://www.cise.ufl.edu/research/sparse/matrices/index.html
|
||||
amg_mat.mtx ! Other matrices from: http://math.nist.gov/MatrixMarket/ or
|
||||
amg_rhs.mtx ! rhs ! http://www.cise.ufl.edu/research/sparse/matrices/index.html
|
||||
NONE ! Initial guess
|
||||
mld_sol.mtx ! Reference solution
|
||||
amg_sol.mtx ! Reference solution
|
||||
MM ! File format: MatrixMarket or Harwell-Boeing
|
||||
CSR ! Storage format: CSR COO JAD
|
||||
GRAPH ! PART (partition method): BLOCK GRAPH
|
||||
@@ -41,11 +41,11 @@ VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MUL
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
-2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
%%%%%%%%%%% Coarse level solver %%%%%%%%%%%%%%%%
|
||||
SLU ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC
|
||||
SLU ! Coarsest-level subsolver for BJAC: ILU ILUT MILU UMF MUMPS SLU
|
||||
|
||||
@@ -41,11 +41,11 @@ VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MUL
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
-2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
%%%%%%%%%%% Coarse level solver %%%%%%%%%%%%%%%%
|
||||
UMF ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC
|
||||
UMF ! Coarsest-level subsolver for BJAC: ILU ILUT MILU UMF MUMPS SLU
|
||||
|
||||
@@ -44,7 +44,7 @@ check: all
|
||||
|
||||
clean:
|
||||
/bin/rm -f data_input.o *.o *$(.mod)\
|
||||
$(EXEDIR)/mld_d_pde3d $(EXEDIR)/mld_s_pde3d $(EXEDIR)/mld_d_pde2d $(EXEDIR)/mld_s_pde2d
|
||||
$(EXEDIR)/amg_d_pde3d $(EXEDIR)/amg_s_pde3d $(EXEDIR)/amg_d_pde2d $(EXEDIR)/amg_s_pde2d
|
||||
|
||||
verycleanlib:
|
||||
(cd ../..; make veryclean)
|
||||
|
||||
@@ -119,7 +119,7 @@ program amg_d_pde2d
|
||||
character(len=10) :: ptype ! preconditioner type
|
||||
|
||||
integer(psb_ipk_) :: outer_sweeps ! number of outer sweeps: sweeps for 1-level,
|
||||
! AMG cycles for ML
|
||||
! AMG cycles for ML
|
||||
! general AMG data
|
||||
character(len=16) :: mlcycle ! AMG cycle type
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
@@ -174,6 +174,17 @@ program amg_d_pde2d
|
||||
real(psb_dpk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
|
||||
! Dump data
|
||||
logical :: dump = .false.
|
||||
integer(psb_ipk_) :: dlmin ! Minimum level to dump
|
||||
integer(psb_ipk_) :: dlmax ! Maximum level to dump
|
||||
logical :: dump_ac = .false.
|
||||
logical :: dump_rp = .false.
|
||||
logical :: dump_tprol = .false.
|
||||
logical :: dump_smoother = .false.
|
||||
logical :: dump_solver = .false.
|
||||
logical :: dump_global_num = .false.
|
||||
|
||||
end type precdata
|
||||
type(precdata) :: p_choice
|
||||
|
||||
@@ -338,12 +349,12 @@ program amg_d_pde2d
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
select case(trim(psb_toupper(p_choice%solve2)))
|
||||
case('INVK')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
case('INVT')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
case('AINV')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('ainv_alg', p_choice%variant, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
call prec%set('ainv_alg', p_choice%variant2, info)
|
||||
case default
|
||||
call prec%set('sub_solve', p_choice%solve2, info, pos='post')
|
||||
end select
|
||||
@@ -392,6 +403,12 @@ program amg_d_pde2d
|
||||
write(psb_out_unit,'(" ")')
|
||||
end if
|
||||
|
||||
if (p_choice%dump) then
|
||||
call prec%dump(info,istart=p_choice%dlmin,iend=p_choice%dlmax,&
|
||||
& ac=p_choice%dump_ac,rp=p_choice%dump_rp,tprol=p_choice%dump_tprol,&
|
||||
& smoother=p_choice%dump_smoother, solver=p_choice%dump_solver, &
|
||||
& global_num=p_choice%dump_global_num)
|
||||
end if
|
||||
!
|
||||
! iterative method parameters
|
||||
!
|
||||
@@ -530,6 +547,7 @@ contains
|
||||
! preconditioner type
|
||||
call read_data(prec%descr,inp_unit) ! verbose description of the prec
|
||||
call read_data(prec%ptype,inp_unit) ! preconditioner type
|
||||
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
@@ -563,8 +581,9 @@ contains
|
||||
call read_data(prec%aggr_type,inp_unit) ! type of aggregation
|
||||
call read_data(prec%aggr_size,inp_unit) ! Requested size of the aggregates for MATCHBOXP
|
||||
call read_data(prec%aggr_ord,inp_unit) ! ordering for aggregation
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%mncrratio,inp_unit) ! minimum aggregation ratio
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
call read_data(prec%thrvsz,inp_unit) ! size of aggr thresh vector
|
||||
if (prec%thrvsz > 0) then
|
||||
call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
@@ -572,7 +591,6 @@ contains
|
||||
else
|
||||
read(inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,inp_unit) ! coarsest-lev subsolver
|
||||
@@ -580,6 +598,17 @@ contains
|
||||
call read_data(prec%cfill,inp_unit) ! fill-in for incompl LU
|
||||
call read_data(prec%cthres,inp_unit) ! Threshold for ILUT
|
||||
call read_data(prec%cjswp,inp_unit) ! sweeps for GS/JAC subsolver
|
||||
! dump
|
||||
call read_data(prec%dump,inp_unit) ! Dump on file?
|
||||
call read_data(prec%dlmin,inp_unit) ! Minimum level to dump
|
||||
call read_data(prec%dlmax,inp_unit) ! Maximum level to dump
|
||||
call read_data(prec%dump_ac,inp_unit)
|
||||
call read_data(prec%dump_rp,inp_unit)
|
||||
call read_data(prec%dump_tprol,inp_unit)
|
||||
call read_data(prec%dump_smoother,inp_unit)
|
||||
call read_data(prec%dump_solver,inp_unit)
|
||||
call read_data(prec%dump_global_num,inp_unit)
|
||||
|
||||
if (inp_unit /= psb_inp_unit) then
|
||||
close(inp_unit)
|
||||
end if
|
||||
@@ -626,6 +655,7 @@ contains
|
||||
call psb_bcast(ctxt,prec%mlcycle)
|
||||
call psb_bcast(ctxt,prec%outer_sweeps)
|
||||
call psb_bcast(ctxt,prec%maxlevs)
|
||||
call psb_bcast(ctxt,prec%csizepp)
|
||||
|
||||
call psb_bcast(ctxt,prec%aggr_prol)
|
||||
call psb_bcast(ctxt,prec%par_aggr_alg)
|
||||
@@ -641,13 +671,23 @@ contains
|
||||
end if
|
||||
call psb_bcast(ctxt,prec%athres)
|
||||
|
||||
call psb_bcast(ctxt,prec%csizepp)
|
||||
call psb_bcast(ctxt,prec%cmat)
|
||||
call psb_bcast(ctxt,prec%csolve)
|
||||
call psb_bcast(ctxt,prec%csbsolve)
|
||||
call psb_bcast(ctxt,prec%cfill)
|
||||
call psb_bcast(ctxt,prec%cthres)
|
||||
call psb_bcast(ctxt,prec%cjswp)
|
||||
! dump
|
||||
call psb_bcast(ctxt,prec%dump)
|
||||
call psb_bcast(ctxt,prec%dlmin)
|
||||
call psb_bcast(ctxt,prec%dlmax)
|
||||
|
||||
call psb_bcast(ctxt,prec%dump_ac)
|
||||
call psb_bcast(ctxt,prec%dump_rp)
|
||||
call psb_bcast(ctxt,prec%dump_tprol)
|
||||
call psb_bcast(ctxt,prec%dump_smoother)
|
||||
call psb_bcast(ctxt,prec%dump_solver)
|
||||
call psb_bcast(ctxt,prec%dump_global_num)
|
||||
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
@@ -120,7 +120,7 @@ program amg_d_pde3d
|
||||
character(len=10) :: ptype ! preconditioner type
|
||||
|
||||
integer(psb_ipk_) :: outer_sweeps ! number of outer sweeps: sweeps for 1-level,
|
||||
! AMG cycles for ML
|
||||
! AMG cycles for ML
|
||||
! general AMG data
|
||||
character(len=16) :: mlcycle ! AMG cycle type
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
@@ -175,6 +175,17 @@ program amg_d_pde3d
|
||||
real(psb_dpk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
|
||||
! Dump data
|
||||
logical :: dump = .false.
|
||||
integer(psb_ipk_) :: dlmin ! Minimum level to dump
|
||||
integer(psb_ipk_) :: dlmax ! Maximum level to dump
|
||||
logical :: dump_ac = .false.
|
||||
logical :: dump_rp = .false.
|
||||
logical :: dump_tprol = .false.
|
||||
logical :: dump_smoother = .false.
|
||||
logical :: dump_solver = .false.
|
||||
logical :: dump_global_num = .false.
|
||||
|
||||
end type precdata
|
||||
type(precdata) :: p_choice
|
||||
|
||||
@@ -342,12 +353,12 @@ program amg_d_pde3d
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
select case(trim(psb_toupper(p_choice%solve2)))
|
||||
case('INVK')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
case('INVT')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
case('AINV')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('ainv_alg', p_choice%variant, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
call prec%set('ainv_alg', p_choice%variant2, info)
|
||||
case default
|
||||
call prec%set('sub_solve', p_choice%solve2, info, pos='post')
|
||||
end select
|
||||
@@ -388,7 +399,7 @@ program amg_d_pde3d
|
||||
|
||||
call psb_amx(ctxt, thier)
|
||||
call psb_amx(ctxt, tprec)
|
||||
|
||||
|
||||
if(iam == psb_root_) then
|
||||
write(psb_out_unit,'(" ")')
|
||||
write(psb_out_unit,'("Preconditioner: ",a)') trim(p_choice%descr)
|
||||
@@ -396,6 +407,12 @@ program amg_d_pde3d
|
||||
write(psb_out_unit,'(" ")')
|
||||
end if
|
||||
|
||||
if (p_choice%dump) then
|
||||
call prec%dump(info,istart=p_choice%dlmin,iend=p_choice%dlmax,&
|
||||
& ac=p_choice%dump_ac,rp=p_choice%dump_rp,tprol=p_choice%dump_tprol,&
|
||||
& smoother=p_choice%dump_smoother, solver=p_choice%dump_solver, &
|
||||
& global_num=p_choice%dump_global_num)
|
||||
end if
|
||||
!
|
||||
! iterative method parameters
|
||||
!
|
||||
@@ -534,6 +551,7 @@ contains
|
||||
! preconditioner type
|
||||
call read_data(prec%descr,inp_unit) ! verbose description of the prec
|
||||
call read_data(prec%ptype,inp_unit) ! preconditioner type
|
||||
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
@@ -567,8 +585,9 @@ contains
|
||||
call read_data(prec%aggr_type,inp_unit) ! type of aggregation
|
||||
call read_data(prec%aggr_size,inp_unit) ! Requested size of the aggregates for MATCHBOXP
|
||||
call read_data(prec%aggr_ord,inp_unit) ! ordering for aggregation
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%mncrratio,inp_unit) ! minimum aggregation ratio
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
call read_data(prec%thrvsz,inp_unit) ! size of aggr thresh vector
|
||||
if (prec%thrvsz > 0) then
|
||||
call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
@@ -576,7 +595,6 @@ contains
|
||||
else
|
||||
read(inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,inp_unit) ! coarsest-lev subsolver
|
||||
@@ -584,6 +602,17 @@ contains
|
||||
call read_data(prec%cfill,inp_unit) ! fill-in for incompl LU
|
||||
call read_data(prec%cthres,inp_unit) ! Threshold for ILUT
|
||||
call read_data(prec%cjswp,inp_unit) ! sweeps for GS/JAC subsolver
|
||||
! dump
|
||||
call read_data(prec%dump,inp_unit) ! Dump on file?
|
||||
call read_data(prec%dlmin,inp_unit) ! Minimum level to dump
|
||||
call read_data(prec%dlmax,inp_unit) ! Maximum level to dump
|
||||
call read_data(prec%dump_ac,inp_unit)
|
||||
call read_data(prec%dump_rp,inp_unit)
|
||||
call read_data(prec%dump_tprol,inp_unit)
|
||||
call read_data(prec%dump_smoother,inp_unit)
|
||||
call read_data(prec%dump_solver,inp_unit)
|
||||
call read_data(prec%dump_global_num,inp_unit)
|
||||
|
||||
if (inp_unit /= psb_inp_unit) then
|
||||
close(inp_unit)
|
||||
end if
|
||||
@@ -630,6 +659,7 @@ contains
|
||||
call psb_bcast(ctxt,prec%mlcycle)
|
||||
call psb_bcast(ctxt,prec%outer_sweeps)
|
||||
call psb_bcast(ctxt,prec%maxlevs)
|
||||
call psb_bcast(ctxt,prec%csizepp)
|
||||
|
||||
call psb_bcast(ctxt,prec%aggr_prol)
|
||||
call psb_bcast(ctxt,prec%par_aggr_alg)
|
||||
@@ -645,15 +675,26 @@ contains
|
||||
end if
|
||||
call psb_bcast(ctxt,prec%athres)
|
||||
|
||||
call psb_bcast(ctxt,prec%csizepp)
|
||||
call psb_bcast(ctxt,prec%cmat)
|
||||
call psb_bcast(ctxt,prec%csolve)
|
||||
call psb_bcast(ctxt,prec%csbsolve)
|
||||
call psb_bcast(ctxt,prec%cfill)
|
||||
call psb_bcast(ctxt,prec%cthres)
|
||||
call psb_bcast(ctxt,prec%cjswp)
|
||||
! dump
|
||||
call psb_bcast(ctxt,prec%dump)
|
||||
call psb_bcast(ctxt,prec%dlmin)
|
||||
call psb_bcast(ctxt,prec%dlmax)
|
||||
|
||||
call psb_bcast(ctxt,prec%dump_ac)
|
||||
call psb_bcast(ctxt,prec%dump_rp)
|
||||
call psb_bcast(ctxt,prec%dump_tprol)
|
||||
call psb_bcast(ctxt,prec%dump_smoother)
|
||||
call psb_bcast(ctxt,prec%dump_solver)
|
||||
call psb_bcast(ctxt,prec%dump_global_num)
|
||||
|
||||
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
end program amg_d_pde3d
|
||||
|
||||
@@ -119,7 +119,7 @@ program amg_s_pde2d
|
||||
character(len=10) :: ptype ! preconditioner type
|
||||
|
||||
integer(psb_ipk_) :: outer_sweeps ! number of outer sweeps: sweeps for 1-level,
|
||||
! AMG cycles for ML
|
||||
! AMG cycles for ML
|
||||
! general AMG data
|
||||
character(len=16) :: mlcycle ! AMG cycle type
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
@@ -174,6 +174,17 @@ program amg_s_pde2d
|
||||
real(psb_spk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
|
||||
! Dump data
|
||||
logical :: dump = .false.
|
||||
integer(psb_ipk_) :: dlmin ! Minimum level to dump
|
||||
integer(psb_ipk_) :: dlmax ! Maximum level to dump
|
||||
logical :: dump_ac = .false.
|
||||
logical :: dump_rp = .false.
|
||||
logical :: dump_tprol = .false.
|
||||
logical :: dump_smoother = .false.
|
||||
logical :: dump_solver = .false.
|
||||
logical :: dump_global_num = .false.
|
||||
|
||||
end type precdata
|
||||
type(precdata) :: p_choice
|
||||
|
||||
@@ -338,12 +349,12 @@ program amg_s_pde2d
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
select case(trim(psb_toupper(p_choice%solve2)))
|
||||
case('INVK')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
case('INVT')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
case('AINV')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('ainv_alg', p_choice%variant, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
call prec%set('ainv_alg', p_choice%variant2, info)
|
||||
case default
|
||||
call prec%set('sub_solve', p_choice%solve2, info, pos='post')
|
||||
end select
|
||||
@@ -392,6 +403,12 @@ program amg_s_pde2d
|
||||
write(psb_out_unit,'(" ")')
|
||||
end if
|
||||
|
||||
if (p_choice%dump) then
|
||||
call prec%dump(info,istart=p_choice%dlmin,iend=p_choice%dlmax,&
|
||||
& ac=p_choice%dump_ac,rp=p_choice%dump_rp,tprol=p_choice%dump_tprol,&
|
||||
& smoother=p_choice%dump_smoother, solver=p_choice%dump_solver, &
|
||||
& global_num=p_choice%dump_global_num)
|
||||
end if
|
||||
!
|
||||
! iterative method parameters
|
||||
!
|
||||
@@ -530,6 +547,7 @@ contains
|
||||
! preconditioner type
|
||||
call read_data(prec%descr,inp_unit) ! verbose description of the prec
|
||||
call read_data(prec%ptype,inp_unit) ! preconditioner type
|
||||
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
@@ -563,8 +581,9 @@ contains
|
||||
call read_data(prec%aggr_type,inp_unit) ! type of aggregation
|
||||
call read_data(prec%aggr_size,inp_unit) ! Requested size of the aggregates for MATCHBOXP
|
||||
call read_data(prec%aggr_ord,inp_unit) ! ordering for aggregation
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%mncrratio,inp_unit) ! minimum aggregation ratio
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
call read_data(prec%thrvsz,inp_unit) ! size of aggr thresh vector
|
||||
if (prec%thrvsz > 0) then
|
||||
call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
@@ -572,7 +591,6 @@ contains
|
||||
else
|
||||
read(inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,inp_unit) ! coarsest-lev subsolver
|
||||
@@ -580,6 +598,17 @@ contains
|
||||
call read_data(prec%cfill,inp_unit) ! fill-in for incompl LU
|
||||
call read_data(prec%cthres,inp_unit) ! Threshold for ILUT
|
||||
call read_data(prec%cjswp,inp_unit) ! sweeps for GS/JAC subsolver
|
||||
! dump
|
||||
call read_data(prec%dump,inp_unit) ! Dump on file?
|
||||
call read_data(prec%dlmin,inp_unit) ! Minimum level to dump
|
||||
call read_data(prec%dlmax,inp_unit) ! Maximum level to dump
|
||||
call read_data(prec%dump_ac,inp_unit)
|
||||
call read_data(prec%dump_rp,inp_unit)
|
||||
call read_data(prec%dump_tprol,inp_unit)
|
||||
call read_data(prec%dump_smoother,inp_unit)
|
||||
call read_data(prec%dump_solver,inp_unit)
|
||||
call read_data(prec%dump_global_num,inp_unit)
|
||||
|
||||
if (inp_unit /= psb_inp_unit) then
|
||||
close(inp_unit)
|
||||
end if
|
||||
@@ -626,6 +655,7 @@ contains
|
||||
call psb_bcast(ctxt,prec%mlcycle)
|
||||
call psb_bcast(ctxt,prec%outer_sweeps)
|
||||
call psb_bcast(ctxt,prec%maxlevs)
|
||||
call psb_bcast(ctxt,prec%csizepp)
|
||||
|
||||
call psb_bcast(ctxt,prec%aggr_prol)
|
||||
call psb_bcast(ctxt,prec%par_aggr_alg)
|
||||
@@ -641,13 +671,23 @@ contains
|
||||
end if
|
||||
call psb_bcast(ctxt,prec%athres)
|
||||
|
||||
call psb_bcast(ctxt,prec%csizepp)
|
||||
call psb_bcast(ctxt,prec%cmat)
|
||||
call psb_bcast(ctxt,prec%csolve)
|
||||
call psb_bcast(ctxt,prec%csbsolve)
|
||||
call psb_bcast(ctxt,prec%cfill)
|
||||
call psb_bcast(ctxt,prec%cthres)
|
||||
call psb_bcast(ctxt,prec%cjswp)
|
||||
! dump
|
||||
call psb_bcast(ctxt,prec%dump)
|
||||
call psb_bcast(ctxt,prec%dlmin)
|
||||
call psb_bcast(ctxt,prec%dlmax)
|
||||
|
||||
call psb_bcast(ctxt,prec%dump_ac)
|
||||
call psb_bcast(ctxt,prec%dump_rp)
|
||||
call psb_bcast(ctxt,prec%dump_tprol)
|
||||
call psb_bcast(ctxt,prec%dump_smoother)
|
||||
call psb_bcast(ctxt,prec%dump_solver)
|
||||
call psb_bcast(ctxt,prec%dump_global_num)
|
||||
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
@@ -120,7 +120,7 @@ program amg_s_pde3d
|
||||
character(len=10) :: ptype ! preconditioner type
|
||||
|
||||
integer(psb_ipk_) :: outer_sweeps ! number of outer sweeps: sweeps for 1-level,
|
||||
! AMG cycles for ML
|
||||
! AMG cycles for ML
|
||||
! general AMG data
|
||||
character(len=16) :: mlcycle ! AMG cycle type
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
@@ -175,6 +175,17 @@ program amg_s_pde3d
|
||||
real(psb_spk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
|
||||
! Dump data
|
||||
logical :: dump = .false.
|
||||
integer(psb_ipk_) :: dlmin ! Minimum level to dump
|
||||
integer(psb_ipk_) :: dlmax ! Maximum level to dump
|
||||
logical :: dump_ac = .false.
|
||||
logical :: dump_rp = .false.
|
||||
logical :: dump_tprol = .false.
|
||||
logical :: dump_smoother = .false.
|
||||
logical :: dump_solver = .false.
|
||||
logical :: dump_global_num = .false.
|
||||
|
||||
end type precdata
|
||||
type(precdata) :: p_choice
|
||||
|
||||
@@ -342,12 +353,12 @@ program amg_s_pde3d
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
select case(trim(psb_toupper(p_choice%solve2)))
|
||||
case('INVK')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
case('INVT')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
case('AINV')
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('ainv_alg', p_choice%variant, info)
|
||||
call prec%set('sub_solve', p_choice%solve2, info)
|
||||
call prec%set('ainv_alg', p_choice%variant2, info)
|
||||
case default
|
||||
call prec%set('sub_solve', p_choice%solve2, info, pos='post')
|
||||
end select
|
||||
@@ -388,7 +399,7 @@ program amg_s_pde3d
|
||||
|
||||
call psb_amx(ctxt, thier)
|
||||
call psb_amx(ctxt, tprec)
|
||||
|
||||
|
||||
if(iam == psb_root_) then
|
||||
write(psb_out_unit,'(" ")')
|
||||
write(psb_out_unit,'("Preconditioner: ",a)') trim(p_choice%descr)
|
||||
@@ -396,6 +407,12 @@ program amg_s_pde3d
|
||||
write(psb_out_unit,'(" ")')
|
||||
end if
|
||||
|
||||
if (p_choice%dump) then
|
||||
call prec%dump(info,istart=p_choice%dlmin,iend=p_choice%dlmax,&
|
||||
& ac=p_choice%dump_ac,rp=p_choice%dump_rp,tprol=p_choice%dump_tprol,&
|
||||
& smoother=p_choice%dump_smoother, solver=p_choice%dump_solver, &
|
||||
& global_num=p_choice%dump_global_num)
|
||||
end if
|
||||
!
|
||||
! iterative method parameters
|
||||
!
|
||||
@@ -534,6 +551,7 @@ contains
|
||||
! preconditioner type
|
||||
call read_data(prec%descr,inp_unit) ! verbose description of the prec
|
||||
call read_data(prec%ptype,inp_unit) ! preconditioner type
|
||||
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
@@ -567,8 +585,9 @@ contains
|
||||
call read_data(prec%aggr_type,inp_unit) ! type of aggregation
|
||||
call read_data(prec%aggr_size,inp_unit) ! Requested size of the aggregates for MATCHBOXP
|
||||
call read_data(prec%aggr_ord,inp_unit) ! ordering for aggregation
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%mncrratio,inp_unit) ! minimum aggregation ratio
|
||||
call read_data(prec%aggr_filter,inp_unit) ! filtering
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
call read_data(prec%thrvsz,inp_unit) ! size of aggr thresh vector
|
||||
if (prec%thrvsz > 0) then
|
||||
call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
@@ -576,7 +595,6 @@ contains
|
||||
else
|
||||
read(inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,inp_unit) ! smoothed aggr thresh
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,inp_unit) ! coarsest-lev subsolver
|
||||
@@ -584,6 +602,17 @@ contains
|
||||
call read_data(prec%cfill,inp_unit) ! fill-in for incompl LU
|
||||
call read_data(prec%cthres,inp_unit) ! Threshold for ILUT
|
||||
call read_data(prec%cjswp,inp_unit) ! sweeps for GS/JAC subsolver
|
||||
! dump
|
||||
call read_data(prec%dump,inp_unit) ! Dump on file?
|
||||
call read_data(prec%dlmin,inp_unit) ! Minimum level to dump
|
||||
call read_data(prec%dlmax,inp_unit) ! Maximum level to dump
|
||||
call read_data(prec%dump_ac,inp_unit)
|
||||
call read_data(prec%dump_rp,inp_unit)
|
||||
call read_data(prec%dump_tprol,inp_unit)
|
||||
call read_data(prec%dump_smoother,inp_unit)
|
||||
call read_data(prec%dump_solver,inp_unit)
|
||||
call read_data(prec%dump_global_num,inp_unit)
|
||||
|
||||
if (inp_unit /= psb_inp_unit) then
|
||||
close(inp_unit)
|
||||
end if
|
||||
@@ -630,6 +659,7 @@ contains
|
||||
call psb_bcast(ctxt,prec%mlcycle)
|
||||
call psb_bcast(ctxt,prec%outer_sweeps)
|
||||
call psb_bcast(ctxt,prec%maxlevs)
|
||||
call psb_bcast(ctxt,prec%csizepp)
|
||||
|
||||
call psb_bcast(ctxt,prec%aggr_prol)
|
||||
call psb_bcast(ctxt,prec%par_aggr_alg)
|
||||
@@ -645,15 +675,26 @@ contains
|
||||
end if
|
||||
call psb_bcast(ctxt,prec%athres)
|
||||
|
||||
call psb_bcast(ctxt,prec%csizepp)
|
||||
call psb_bcast(ctxt,prec%cmat)
|
||||
call psb_bcast(ctxt,prec%csolve)
|
||||
call psb_bcast(ctxt,prec%csbsolve)
|
||||
call psb_bcast(ctxt,prec%cfill)
|
||||
call psb_bcast(ctxt,prec%cthres)
|
||||
call psb_bcast(ctxt,prec%cjswp)
|
||||
! dump
|
||||
call psb_bcast(ctxt,prec%dump)
|
||||
call psb_bcast(ctxt,prec%dlmin)
|
||||
call psb_bcast(ctxt,prec%dlmax)
|
||||
|
||||
call psb_bcast(ctxt,prec%dump_ac)
|
||||
call psb_bcast(ctxt,prec%dump_rp)
|
||||
call psb_bcast(ctxt,prec%dump_tprol)
|
||||
call psb_bcast(ctxt,prec%dump_smoother)
|
||||
call psb_bcast(ctxt,prec%dump_solver)
|
||||
call psb_bcast(ctxt,prec%dump_global_num)
|
||||
|
||||
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
end program amg_s_pde3d
|
||||
|
||||
@@ -43,11 +43,11 @@ COUPLED ! Parallel aggregation: DEC, SYMDEC, COUPLED
|
||||
MATCHBOXP ! aggregation measure SOC1, MATCHBOXP
|
||||
8 ! Requested size of the aggregates for MATCHBOXP
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
-2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
%%%%%%%%%%% Coarse level solver %%%%%%%%%%%%%%%%
|
||||
BJAC ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC
|
||||
ILU ! Coarsest-level subsolver for BJAC: ILU ILUT MILU UMF MUMPS SLU
|
||||
@@ -55,3 +55,13 @@ DIST ! Coarsest-level matrix distribution: DIST REPL
|
||||
1 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
1 ! Number of sweeps for JACOBI/GS/BJAC coarsest-level solver
|
||||
%%%%%%%%%%% Dump parms %%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
F ! Dump preconditioner on file
|
||||
1 ! Min level
|
||||
20 ! Max level
|
||||
T ! Dump AC
|
||||
T ! Dump RP
|
||||
F ! Dump TPROL
|
||||
F ! Dump SMOOTHER
|
||||
F ! Dump SOLVER
|
||||
F ! Global numering ?
|
||||
|
||||
@@ -41,13 +41,13 @@ VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MUL
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
COUPLED ! Parallel aggregation: DEC, SYMDEC, COUPLED
|
||||
MATCHBOXP ! aggregation measure SOC1, MATCHBOXP
|
||||
4 ! Requested size of the aggregates for MATCHBOXP
|
||||
8 ! Requested size of the aggregates for MATCHBOXP
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
NOFILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
-2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
%%%%%%%%%%% Coarse level solver %%%%%%%%%%%%%%%%
|
||||
BJAC ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC
|
||||
ILU ! Coarsest-level subsolver for BJAC: ILU ILUT MILU UMF MUMPS SLU
|
||||
@@ -55,3 +55,13 @@ DIST ! Coarsest-level matrix distribution: DIST REPL
|
||||
1 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
1 ! Number of sweeps for JACOBI/GS/BJAC coarsest-level solver
|
||||
%%%%%%%%%%% Dump parms %%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
F ! Dump preconditioner on file
|
||||
1 ! Min level
|
||||
20 ! Max level
|
||||
T ! Dump AC
|
||||
T ! Dump RP
|
||||
F ! Dump TPROL
|
||||
F ! Dump SMOOTHER
|
||||
F ! Dump SOLVER
|
||||
F ! Global numering ?
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
!
|
||||
! File: amg_cexample_ml.f90
|
||||
!
|
||||
! This sample program solves a linear system by using CG coupled with
|
||||
! This sample program solves a linear system by using FCG coupled with
|
||||
! one of the following multi-level preconditioner, as explained in Section 4.1
|
||||
! of the AMG4PSBLAS User's and Reference Guide:
|
||||
!
|
||||
@@ -50,8 +50,8 @@
|
||||
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
|
||||
! sweeps (with ILU(0) on the blocks) as coarsest-level solver (Sec. 4.1, Listing 2)
|
||||
!
|
||||
! - choice = 3, W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! - choice = 3, W-cycle preconditioner based on the coupled aggregation relying
|
||||
! on matching, with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! (Sec. 4.1, Listing 3)
|
||||
@@ -103,7 +103,8 @@ program amg_cexample_ml
|
||||
integer :: ierr, ircode
|
||||
real(psb_spk_) :: resmx, resmxp
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=20) :: name, kmethod
|
||||
character(len=20) :: name
|
||||
character(len=20), parameter :: kmethod='FCG'
|
||||
integer, parameter :: iunit=12
|
||||
|
||||
! initialize the parallel environment
|
||||
@@ -216,7 +217,6 @@ program amg_cexample_ml
|
||||
! solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(2)
|
||||
|
||||
@@ -227,15 +227,16 @@ program amg_cexample_ml
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('SMOOTHER_TYPE','BJAC',info)
|
||||
call P%set('COARSE_SOLVE','BJAC',info)
|
||||
call P%set('COARSE_SUBSOLVE','ILU',info)
|
||||
call P%set('COARSE_SWEEPS',8,info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(3)
|
||||
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation
|
||||
! relying on matching, with maximum size of aggregates equal to 8
|
||||
! and smoothed prolongators, 2 hybrid forward/backward GS sweeps
|
||||
! as pre/post-smoother, a distributed coarsest matrix,
|
||||
! and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('PAR_AGGR_ALG','COUPLED',info)
|
||||
@@ -244,10 +245,10 @@ program amg_cexample_ml
|
||||
call P%set('ML_CYCLE','WCYCLE',info)
|
||||
call P%set('SMOOTHER_SWEEPS',2,info)
|
||||
call P%set('COARSE_SOLVE','KRM',info)
|
||||
kmethod = 'CG'
|
||||
end select
|
||||
call P%set('COARSE_MAT','DIST',info)
|
||||
call P%set('KRM_METHOD','FCG',info)
|
||||
|
||||
! build the preconditioner
|
||||
end select
|
||||
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
@@ -269,7 +270,7 @@ program amg_cexample_ml
|
||||
call x%zero()
|
||||
call psb_geasb(x,desc_A,info)
|
||||
|
||||
! solve Ax=b with preconditioned CG
|
||||
! solve Ax=b with preconditioned Krylov method
|
||||
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
!
|
||||
! File: amg_dexample_ml.f90
|
||||
!
|
||||
! This sample program solves a linear system by using CG coupled with
|
||||
! This sample program solves a linear system by using FCG coupled with
|
||||
! one of the following multi-level preconditioner, as explained in Section 4.1
|
||||
! of the AMG4PSBLAS User's and Reference Guide:
|
||||
!
|
||||
@@ -50,8 +50,8 @@
|
||||
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
|
||||
! sweeps (with ILU(0) on the blocks) as coarsest-level solver (Sec. 4.1, Listing 2)
|
||||
!
|
||||
! - choice = 3, W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! - choice = 3, W-cycle preconditioner based on the coupled aggregation relying
|
||||
! on matching, with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! (Sec. 4.1, Listing 3)
|
||||
@@ -103,7 +103,8 @@ program amg_dexample_ml
|
||||
integer :: ierr, ircode
|
||||
real(psb_dpk_) :: resmx, resmxp
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=20) :: name, kmethod
|
||||
character(len=20) :: name
|
||||
character(len=20), parameter :: kmethod='FCG'
|
||||
integer, parameter :: iunit=12
|
||||
|
||||
! initialize the parallel environment
|
||||
@@ -216,7 +217,6 @@ program amg_dexample_ml
|
||||
! solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(2)
|
||||
|
||||
@@ -227,15 +227,16 @@ program amg_dexample_ml
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('SMOOTHER_TYPE','BJAC',info)
|
||||
call P%set('COARSE_SOLVE','BJAC',info)
|
||||
call P%set('COARSE_SUBSOLVE','ILU',info)
|
||||
call P%set('COARSE_SWEEPS',8,info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(3)
|
||||
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation
|
||||
! relying on matching, with maximum size of aggregates equal to 8
|
||||
! and smoothed prolongators, 2 hybrid forward/backward GS sweeps
|
||||
! as pre/post-smoother, a distributed coarsest matrix,
|
||||
! and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('PAR_AGGR_ALG','COUPLED',info)
|
||||
@@ -244,10 +245,10 @@ program amg_dexample_ml
|
||||
call P%set('ML_CYCLE','WCYCLE',info)
|
||||
call P%set('SMOOTHER_SWEEPS',2,info)
|
||||
call P%set('COARSE_SOLVE','KRM',info)
|
||||
kmethod = 'CG'
|
||||
end select
|
||||
call P%set('COARSE_MAT','DIST',info)
|
||||
call P%set('KRM_METHOD','FCG',info)
|
||||
|
||||
! build the preconditioner
|
||||
end select
|
||||
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
@@ -269,7 +270,7 @@ program amg_dexample_ml
|
||||
call x%zero()
|
||||
call psb_geasb(x,desc_A,info)
|
||||
|
||||
! solve Ax=b with preconditioned CG
|
||||
! solve Ax=b with preconditioned Krylov method
|
||||
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
!
|
||||
! File: amg_sexample_ml.f90
|
||||
!
|
||||
! This sample program solves a linear system by using CG coupled with
|
||||
! This sample program solves a linear system by using FCG coupled with
|
||||
! one of the following multi-level preconditioner, as explained in Section 4.1
|
||||
! of the AMG4PSBLAS User's and Reference Guide:
|
||||
!
|
||||
@@ -50,8 +50,8 @@
|
||||
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
|
||||
! sweeps (with ILU(0) on the blocks) as coarsest-level solver (Sec. 4.1, Listing 2)
|
||||
!
|
||||
! - choice = 3, W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! - choice = 3, W-cycle preconditioner based on the coupled aggregation relying
|
||||
! on matching, with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! (Sec. 4.1, Listing 3)
|
||||
@@ -103,7 +103,8 @@ program amg_sexample_ml
|
||||
integer :: ierr, ircode
|
||||
real(psb_spk_) :: resmx, resmxp
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=20) :: name, kmethod
|
||||
character(len=20) :: name
|
||||
character(len=20), parameter :: kmethod='FCG'
|
||||
integer, parameter :: iunit=12
|
||||
|
||||
! initialize the parallel environment
|
||||
@@ -216,7 +217,6 @@ program amg_sexample_ml
|
||||
! solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(2)
|
||||
|
||||
@@ -227,15 +227,16 @@ program amg_sexample_ml
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('SMOOTHER_TYPE','BJAC',info)
|
||||
call P%set('COARSE_SOLVE','BJAC',info)
|
||||
call P%set('COARSE_SUBSOLVE','ILU',info)
|
||||
call P%set('COARSE_SWEEPS',8,info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(3)
|
||||
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation
|
||||
! relying on matching, with maximum size of aggregates equal to 8
|
||||
! and smoothed prolongators, 2 hybrid forward/backward GS sweeps
|
||||
! as pre/post-smoother, a distributed coarsest matrix,
|
||||
! and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('PAR_AGGR_ALG','COUPLED',info)
|
||||
@@ -244,10 +245,10 @@ program amg_sexample_ml
|
||||
call P%set('ML_CYCLE','WCYCLE',info)
|
||||
call P%set('SMOOTHER_SWEEPS',2,info)
|
||||
call P%set('COARSE_SOLVE','KRM',info)
|
||||
kmethod = 'CG'
|
||||
end select
|
||||
call P%set('COARSE_MAT','DIST',info)
|
||||
call P%set('KRM_METHOD','FCG',info)
|
||||
|
||||
! build the preconditioner
|
||||
end select
|
||||
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
@@ -269,7 +270,7 @@ program amg_sexample_ml
|
||||
call x%zero()
|
||||
call psb_geasb(x,desc_A,info)
|
||||
|
||||
! solve Ax=b with preconditioned CG
|
||||
! solve Ax=b with preconditioned Krylov method
|
||||
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
!
|
||||
! File: amg_zexample_ml.f90
|
||||
!
|
||||
! This sample program solves a linear system by using CG coupled with
|
||||
! This sample program solves a linear system by using FCG coupled with
|
||||
! one of the following multi-level preconditioner, as explained in Section 4.1
|
||||
! of the AMG4PSBLAS User's and Reference Guide:
|
||||
!
|
||||
@@ -50,8 +50,8 @@
|
||||
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
|
||||
! sweeps (with ILU(0) on the blocks) as coarsest-level solver (Sec. 4.1, Listing 2)
|
||||
!
|
||||
! - choice = 3, W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! - choice = 3, W-cycle preconditioner based on the coupled aggregation relying
|
||||
! on matching, with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! (Sec. 4.1, Listing 3)
|
||||
@@ -103,7 +103,8 @@ program amg_zexample_ml
|
||||
integer :: ierr, ircode
|
||||
real(psb_dpk_) :: resmx, resmxp
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=20) :: name, kmethod
|
||||
character(len=20) :: name
|
||||
character(len=20), parameter :: kmethod='FCG'
|
||||
integer, parameter :: iunit=12
|
||||
|
||||
! initialize the parallel environment
|
||||
@@ -216,7 +217,6 @@ program amg_zexample_ml
|
||||
! solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(2)
|
||||
|
||||
@@ -227,15 +227,16 @@ program amg_zexample_ml
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('SMOOTHER_TYPE','BJAC',info)
|
||||
call P%set('COARSE_SOLVE','BJAC',info)
|
||||
call P%set('COARSE_SUBSOLVE','ILU',info)
|
||||
call P%set('COARSE_SWEEPS',8,info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(3)
|
||||
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation
|
||||
! relying on matching, with maximum size of aggregates equal to 8
|
||||
! and smoothed prolongators, 2 hybrid forward/backward GS sweeps
|
||||
! as pre/post-smoother, a distributed coarsest matrix,
|
||||
! and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('PAR_AGGR_ALG','COUPLED',info)
|
||||
@@ -244,10 +245,10 @@ program amg_zexample_ml
|
||||
call P%set('ML_CYCLE','WCYCLE',info)
|
||||
call P%set('SMOOTHER_SWEEPS',2,info)
|
||||
call P%set('COARSE_SOLVE','KRM',info)
|
||||
kmethod = 'CG'
|
||||
end select
|
||||
call P%set('COARSE_MAT','DIST',info)
|
||||
call P%set('KRM_METHOD','FCG',info)
|
||||
|
||||
! build the preconditioner
|
||||
end select
|
||||
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
@@ -269,7 +270,7 @@ program amg_zexample_ml
|
||||
call x%zero()
|
||||
call psb_geasb(x,desc_A,info)
|
||||
|
||||
! solve Ax=b with preconditioned CG
|
||||
! solve Ax=b with preconditioned Krylov method
|
||||
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
wget https://suitesparse-collection-website.herokuapp.com/MM/Schmid/thermal2.tar.gz
|
||||
wget https://suitesparse-collection-website.herokuapp.com/MM/Bourchtein/atmosmodd.tar.gz
|
||||
@@ -38,7 +38,7 @@
|
||||
! File: amg_dexample_ml.f90
|
||||
!
|
||||
! This sample program solves a linear system obtained by discretizing a
|
||||
! PDE with Dirichlet BCs. The solver is CG, coupled with one of the
|
||||
! PDE with Dirichlet BCs. The solver is FCG, coupled with one of the
|
||||
! following multi-level preconditioner, as explained in Section 4.1 of
|
||||
! the AMG4PSBLAS User's and Reference Guide:
|
||||
!
|
||||
@@ -121,7 +121,8 @@ program amg_dexample_ml
|
||||
real(psb_dpk_) :: resmx, resmxp
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=5) :: afmt='CSR'
|
||||
character(len=20) :: name, kmethod
|
||||
character(len=20) :: name
|
||||
character(len=20), parameter :: kmethod='FCG'
|
||||
|
||||
! initialize the parallel environment
|
||||
|
||||
@@ -172,12 +173,11 @@ program amg_dexample_ml
|
||||
case(1)
|
||||
|
||||
! initialize the default multi-level preconditioner, i.e. V-cycle
|
||||
! with basic smoothed aggregation, 1 hybrid forward/backward
|
||||
! with decoupled smoothed aggregation, 1 hybrid forward/backward
|
||||
! GS sweep as pre/post-smoother and UMFPACK as coarsest-level
|
||||
! solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(2)
|
||||
|
||||
@@ -188,15 +188,16 @@ program amg_dexample_ml
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('SMOOTHER_TYPE','BJAC',info)
|
||||
call P%set('COARSE_SOLVE','BJAC',info)
|
||||
call P%set('COARSE_SUBSOLVE','ILU',info)
|
||||
call P%set('COARSE_SWEEPS',8,info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(3)
|
||||
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation
|
||||
! relying on matching, with maximum size of aggregates equal to 8
|
||||
! and smoothed prolongators, 2 hybrid forward/backward GS sweeps
|
||||
! as pre/post-smoother, a distributed coarsest matrix,
|
||||
! and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('PAR_AGGR_ALG','COUPLED',info)
|
||||
@@ -206,7 +207,7 @@ program amg_dexample_ml
|
||||
call P%set('SMOOTHER_SWEEPS',2,info)
|
||||
call P%set('COARSE_SOLVE','KRM',info)
|
||||
call P%set('COARSE_MAT','DIST',info)
|
||||
kmethod = 'CG'
|
||||
call P%set('KRM_METHOD','FCG',info)
|
||||
|
||||
end select
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
! File: amg_sexample_ml.f90
|
||||
!
|
||||
! This sample program solves a linear system obtained by discretizing a
|
||||
! PDE with Dirichlet BCs. The solver is CG, coupled with one of the
|
||||
! PDE with Dirichlet BCs. The solver is FCG, coupled with one of the
|
||||
! following multi-level preconditioner, as explained in Section 4.1 of
|
||||
! the AMG4PSBLAS User's and Reference Guide:
|
||||
!
|
||||
@@ -121,7 +121,8 @@ program amg_sexample_ml
|
||||
real(psb_spk_) :: resmx, resmxp
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=5) :: afmt='CSR'
|
||||
character(len=20) :: name, kmethod
|
||||
character(len=20) :: name
|
||||
character(len=20), parameter :: kmethod='FCG'
|
||||
|
||||
! initialize the parallel environment
|
||||
|
||||
@@ -172,12 +173,11 @@ program amg_sexample_ml
|
||||
case(1)
|
||||
|
||||
! initialize the default multi-level preconditioner, i.e. V-cycle
|
||||
! with basic smoothed aggregation, 1 hybrid forward/backward
|
||||
! with decoupled smoothed aggregation, 1 hybrid forward/backward
|
||||
! GS sweep as pre/post-smoother and UMFPACK as coarsest-level
|
||||
! solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(2)
|
||||
|
||||
@@ -188,15 +188,16 @@ program amg_sexample_ml
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('SMOOTHER_TYPE','BJAC',info)
|
||||
call P%set('COARSE_SOLVE','BJAC',info)
|
||||
call P%set('COARSE_SUBSOLVE','ILU',info)
|
||||
call P%set('COARSE_SWEEPS',8,info)
|
||||
kmethod = 'CG'
|
||||
|
||||
case(3)
|
||||
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation relying on matching,
|
||||
! with maximum size of aggregates equal to 8 and smoothed prolongators,
|
||||
! 2 hybrid forward/backward GS sweeps as pre/post-smoother, a distributed coarsest
|
||||
! matrix, and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
! initialize a W-cycle preconditioner based on the coupled aggregation
|
||||
! relying on matching, with maximum size of aggregates equal to 8
|
||||
! and smoothed prolongators, 2 hybrid forward/backward GS sweeps
|
||||
! as pre/post-smoother, a distributed coarsest matrix,
|
||||
! and preconditioned Flexible Conjugate Gradient as coarsest-level solver
|
||||
|
||||
call P%init(ctxt,'ML',info)
|
||||
call P%set('PAR_AGGR_ALG','COUPLED',info)
|
||||
@@ -206,7 +207,7 @@ program amg_sexample_ml
|
||||
call P%set('SMOOTHER_SWEEPS',2,info)
|
||||
call P%set('COARSE_SOLVE','KRM',info)
|
||||
call P%set('COARSE_MAT','DIST',info)
|
||||
kmethod = 'CG'
|
||||
call P%set('KRM_METHOD','FCG',info)
|
||||
|
||||
end select
|
||||
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
MLDDIR=../..
|
||||
MLDINCDIR=$(MLDDIR)/include
|
||||
include $(MLDINCDIR)/Make.inc.amg4psblas
|
||||
MLDMODDIR=$(MLDDIR)/modules
|
||||
MLDLIBDIR=$(MLDDIR)/lib
|
||||
MLD_LIBS=-L$(MLDLIBDIR) -lpsb_krylov -lmld_prec -lpsb_prec
|
||||
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDMODDIR) $(FMFLAG)$(MLDINCDIR) $(PSBLAS_INCLUDES) $(FIFLAG).
|
||||
|
||||
HSL_DIR=/opt/hsl/2.3.1/gnu/6.4.0
|
||||
HSL_INCDIR=$(HSL_DIR)/include
|
||||
HSL_LIBDIR=$(HSL_DIR)/lib
|
||||
HSL_LIBS=-lhsl_mc64 -L$(HSL_LIBDIR)
|
||||
HSL_FLAGS= -DHAVE_HSL -I$(HSL_INCDIR)
|
||||
|
||||
# SPRAL package for auction algorithm
|
||||
SPRAL_DIR=/opt/spral/2015.04.20/gnu/6.4.0
|
||||
SPRAL_INCDIR=$(SPRAL_DIR)/include
|
||||
SPRAL_LIBDIR=$(SPRAL_DIR)/lib
|
||||
SPRAL_LIBS=-lspral -L$(SPRAL_LIBDIR)
|
||||
SPRAL_FLAGS=-DHAVE_SPRAL -I$(SPRAL_INCDIR)
|
||||
|
||||
BCM_DIR=/opt/bcm/0.9/gnu/6.4.0
|
||||
BCM_INCDIR=$(BCM_DIR)/include
|
||||
BCM_LIBDIR=$(BCM_DIR)/lib
|
||||
BCM_LDLIBS=-lBCM -L$(BCM_LIBDIR) $(HSL_LIBS) $(SPRAL_LIBS)
|
||||
|
||||
CDEFINES=$(MLDCDEFINES) -I$(BCM_INCDIR)
|
||||
|
||||
LINKOPT=
|
||||
EXEDIR=./runs
|
||||
|
||||
all: mld_d_pde3d
|
||||
|
||||
BCMOBJS= mld_d_bcmatch_aggregator_mod.o mld_d_bcmatch_aggregator_mat_asb.o \
|
||||
mld_d_bcmatch_aggregator_tprol.o mld_d_bcmatch_map_to_tprol.o \
|
||||
mld_daggrmat_unsmth_spmm_asb.o bootCMatch_interface.o
|
||||
|
||||
mld_d_pde3d: mld_d_pde3d.o data_input.o $(BCMOBJS)
|
||||
$(FLINK) $(LINKOPT) mld_d_pde3d.o data_input.o $(BCMOBJS) -o mld_d_pde3d $(MLD_LIBS) $(BCM_LDLIBS) $(PSBLAS_LIBS) $(LDLIBS)
|
||||
/bin/mv mld_d_pde3d $(EXEDIR)
|
||||
|
||||
mld_d_pde3d.o: data_input.o mld_d_bcmatch_aggregator_mod.o
|
||||
mld_d_bcmatch_aggregator_mat_asb.o mld_d_bcmatch_aggregator_tprol.o mld_d_bcmatch_map_to_tprol.o: mld_d_bcmatch_aggregator_mod.o
|
||||
|
||||
check: all
|
||||
cd runs && ./mld_d_pde2d <mld_pde2d.inp && ./mld_s_pde2d<mld_pde2d.inp
|
||||
|
||||
|
||||
clean:
|
||||
/bin/rm -f data_input.o mld_d_pde3d.o *$(.mod) $(BCMOBJS)\
|
||||
$(EXEDIR)/mld_d_pde3d
|
||||
|
||||
verycleanlib:
|
||||
(cd ../..; make veryclean)
|
||||
lib:
|
||||
(cd ../../; make library)
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
This directory contains an experimental interface to the BootCMatch
|
||||
aggregator. It may also serve as an example of how to introduce a new
|
||||
aggregation procedure.
|
||||
@@ -1,213 +0,0 @@
|
||||
!
|
||||
!
|
||||
! MLD2P4 version 2.1
|
||||
! MultiLevel Domain Decomposition Parallel Preconditioners Package
|
||||
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
|
||||
!
|
||||
! (C) Copyright 2008, 2010, 2012, 2015, 2017 , 2017
|
||||
!
|
||||
! Salvatore Filippone Cranfield University
|
||||
! Ambra Abdullahi Hassan University of Rome Tor Vergata
|
||||
! Pasqua D'Ambra IAC-CNR, Naples, IT
|
||||
! Daniela di Serafino University of Campania "L. Vanvitelli", Caserta, IT
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the MLD2P4 group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: mld_d_base_aggregator_mat_asb.f90
|
||||
!
|
||||
! Subroutine: mld_d_base_aggregator_mat_asb
|
||||
! Version: real
|
||||
!
|
||||
! This routine builds the matrix associated to the current level of the
|
||||
! multilevel preconditioner from the matrix associated to the previous level,
|
||||
! by using the user-specified aggregation technique (therefore, it also builds the
|
||||
! prolongation and restriction operators mapping the current level to the
|
||||
! previous one and vice versa).
|
||||
! The current level is regarded as the coarse one, while the previous as
|
||||
! the fine one. This is in agreement with the fact that the routine is called,
|
||||
! by mld_mlprec_bld, only on levels >=2.
|
||||
! The coarse-level matrix A_C is built from a fine-level matrix A
|
||||
! by using the Galerkin approach, i.e.
|
||||
!
|
||||
! A_C = P_C^T A P_C,
|
||||
!
|
||||
! where P_C is a prolongator from the coarse level to the fine one.
|
||||
!
|
||||
! A mapping from the nodes of the adjacency graph of A to the nodes of the
|
||||
! adjacency graph of A_C has been computed by the mld_aggrmap_bld subroutine.
|
||||
! The prolongator P_C is built here from this mapping, according to the
|
||||
! value of p%iprcparm(mld_aggr_kind_), 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.
|
||||
!
|
||||
! Currently four different prolongators are implemented, corresponding to
|
||||
! four aggregation algorithms:
|
||||
! 1. un-smoothed aggregation,
|
||||
! 2. smoothed aggregation,
|
||||
! 3. "bizarre" aggregation.
|
||||
! 4. minimum energy
|
||||
! 1. The non-smoothed aggregation uses as prolongator the piecewise constant
|
||||
! interpolation operator corresponding to the fine-to-coarse level mapping built
|
||||
! by p%aggr%bld_tprol. This is called tentative prolongator.
|
||||
! 2. The smoothed aggregation uses as prolongator the operator obtained by applying
|
||||
! a damped Jacobi smoother to the tentative prolongator.
|
||||
! 3. The "bizarre" aggregation uses a prolongator proposed by the authors of MLD2P4.
|
||||
! This prolongator still requires a deep analysis and testing and its use is
|
||||
! not recommended.
|
||||
! 4. Minimum energy aggregation
|
||||
!
|
||||
! 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.
|
||||
! M. Sala, R. Tuminaro: A new Petrov-Galerkin smoothed aggregation preconditioner
|
||||
! for nonsymmetric linear systems, SIAM J. Sci. Comput., 31(1):143-166 (2008)
|
||||
!
|
||||
!
|
||||
! The main structure is:
|
||||
! 1. Perform sanity checks;
|
||||
! 2. Compute prolongator/restrictor/AC
|
||||
!
|
||||
!
|
||||
! Arguments:
|
||||
! ag - type(mld_d_base_aggregator_type), input/output.
|
||||
! The aggregator object
|
||||
! parms - type(mld_dml_parms), input
|
||||
! The aggregation parameters
|
||||
! a - type(psb_dspmat_type), input.
|
||||
! The sparse matrix structure containing the local part of
|
||||
! the fine-level matrix.
|
||||
! desc_a - type(psb_desc_type), input.
|
||||
! The communication descriptor of the fine-level matrix.
|
||||
! The 'one-level' data structure that will contain the local
|
||||
! part of the matrix to be built as well as the information
|
||||
! concerning the prolongator and its transpose.
|
||||
! ilaggr - integer, dimension(:), input
|
||||
! The mapping between the row indices of the coarse-level
|
||||
! matrix and the row indices of the fine-level matrix.
|
||||
! ilaggr(i)=j means that node i in the adjacency graph
|
||||
! of the fine-level matrix is mapped onto node j in the
|
||||
! adjacency graph of the coarse-level matrix. Note that the indices
|
||||
! are assumed to be shifted so as to make sure the ranges on
|
||||
! the various processes do not overlap.
|
||||
! nlaggr - integer, dimension(:) input
|
||||
! nlaggr(i) contains the aggregates held by process i.
|
||||
! ac - type(psb_dspmat_type), output
|
||||
! The coarse matrix on output
|
||||
!
|
||||
! op_prol - type(psb_dspmat_type), input/output
|
||||
! The tentative prolongator on input, the computed prolongator on output
|
||||
!
|
||||
! op_restr - type(psb_dspmat_type), output
|
||||
! The restrictor operator; normally, it is the transpose of the prolongator.
|
||||
!
|
||||
! info - integer, output.
|
||||
! Error code.
|
||||
!
|
||||
subroutine mld_d_bcmatch_aggregator_mat_asb(ag,parms,a,desc_a,ilaggr,nlaggr,ac,op_prol,op_restr,info)
|
||||
use psb_base_mod
|
||||
use mld_d_inner_mod
|
||||
use mld_d_prec_type
|
||||
use mld_d_bcmatch_aggregator_mod, mld_protect_name => mld_d_bcmatch_aggregator_mat_asb
|
||||
implicit none
|
||||
|
||||
class(mld_d_bcmatch_aggregator_type), target, intent(inout) :: ag
|
||||
type(mld_dml_parms), intent(inout) :: parms
|
||||
type(psb_dspmat_type), intent(in) :: a
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
|
||||
type(psb_dspmat_type), intent(inout) :: op_prol
|
||||
type(psb_dspmat_type), intent(out) :: ac,op_restr
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! Local variables
|
||||
character(len=20) :: name
|
||||
integer(psb_mpk_) :: ctxt, np, me
|
||||
type(psb_d_coo_sparse_mat) :: acoo, bcoo
|
||||
type(psb_d_csr_sparse_mat) :: acsr1
|
||||
integer(psb_ipk_) :: nzl,ntaggr
|
||||
integer(psb_ipk_) :: err_act
|
||||
integer(psb_ipk_) :: debug_level, debug_unit
|
||||
|
||||
name='mld_d_bcmatch_aggregator_mat_asb'
|
||||
if (psb_get_errstatus().ne.0) return
|
||||
call psb_erractionsave(err_act)
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
info = psb_success_
|
||||
ctxt = desc_a%get_context()
|
||||
call psb_info(ctxt,me,np)
|
||||
|
||||
!
|
||||
! Build the coarse-level matrix from the fine-level one, starting from
|
||||
! the mapping defined by mld_aggrmap_bld and applying the aggregation
|
||||
! algorithm specified by
|
||||
!
|
||||
select case (parms%aggr_prol)
|
||||
case (mld_no_smooth_)
|
||||
|
||||
call mld_daggrmat_unsmth_spmm_asb(a,desc_a,ilaggr,nlaggr,&
|
||||
& parms,ac,op_prol,op_restr,info)
|
||||
|
||||
case(mld_smooth_prol_)
|
||||
|
||||
call mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr, &
|
||||
& parms,ac,op_prol,op_restr,info)
|
||||
|
||||
case(mld_biz_prol_)
|
||||
|
||||
call mld_daggrmat_biz_asb(a,desc_a,ilaggr,nlaggr, &
|
||||
& parms,ac,op_prol,op_restr,info)
|
||||
|
||||
case(mld_min_energy_)
|
||||
|
||||
call mld_daggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr, &
|
||||
& parms,ac,op_prol,op_restr,info)
|
||||
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='Invalid aggr kind')
|
||||
goto 9999
|
||||
|
||||
end select
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='Inner aggrmat asb')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
return
|
||||
|
||||
|
||||
end subroutine mld_d_bcmatch_aggregator_mat_asb
|
||||
@@ -1,400 +0,0 @@
|
||||
!
|
||||
!
|
||||
! MLD2P4 version 2.2
|
||||
! MultiLevel Domain Decomposition Parallel Preconditioners Package
|
||||
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
|
||||
!
|
||||
! (C) Copyright 2008, 2010, 2012, 2015, 2017 , 2017
|
||||
!
|
||||
! Salvatore Filippone Cranfield University
|
||||
! Ambra Abdullahi Hassan University of Rome Tor Vergata
|
||||
! Pasqua D'Ambra IAC-CNR, Naples, IT
|
||||
! Daniela di Serafino University of Campania "L. Vanvitelli", Caserta, IT
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the MLD2P4 group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
!
|
||||
!
|
||||
! The aggregator object hosts the aggregation method for building
|
||||
! the multilevel hierarchy. This variant is based on the hybrid method
|
||||
! presented in
|
||||
!
|
||||
! S. Gratton, P. Henon, P. Jiranek and X. Vasseur:
|
||||
! Reducing complexity of algebraic multigrid by aggregation
|
||||
! Numerical Lin. Algebra with Applications, 2016, 23:501-518
|
||||
!
|
||||
!
|
||||
! sm - class(mld_T_base_smoother_type), allocatable
|
||||
! The current level preconditioner (aka smoother).
|
||||
! parms - type(mld_RTml_parms)
|
||||
! The parameters defining the multilevel strategy.
|
||||
! ac - The local part of the current-level matrix, built by
|
||||
! coarsening the previous-level matrix.
|
||||
! desc_ac - type(psb_desc_type).
|
||||
! The communication descriptor associated to the matrix
|
||||
! stored in ac.
|
||||
! base_a - type(psb_Tspmat_type), pointer.
|
||||
! Pointer (really a pointer!) to the local part of the current
|
||||
! matrix (so we have a unified treatment of residuals).
|
||||
! We need this to avoid passing explicitly the current matrix
|
||||
! to the routine which applies the preconditioner.
|
||||
! base_desc - type(psb_desc_type), pointer.
|
||||
! Pointer to the communication descriptor associated to the
|
||||
! matrix pointed by base_a.
|
||||
! map - Stores the maps (restriction and prolongation) between the
|
||||
! vector spaces associated to the index spaces of the previous
|
||||
! and current levels.
|
||||
!
|
||||
! Methods:
|
||||
! Most methods follow the encapsulation hierarchy: they take whatever action
|
||||
! is appropriate for the current object, then call the corresponding method for
|
||||
! the contained object.
|
||||
! As an example: the descr() method prints out a description of the
|
||||
! level. It starts by invoking the descr() method of the parms object,
|
||||
! then calls the descr() method of the smoother object.
|
||||
!
|
||||
! descr - Prints a description of the object.
|
||||
! default - Set default values
|
||||
! dump - Dump to file object contents
|
||||
! set - Sets various parameters; when a request is unknown
|
||||
! it is passed to the smoother object for further processing.
|
||||
! check - Sanity checks.
|
||||
! sizeof - Total memory occupation in bytes
|
||||
! get_nzeros - Number of nonzeros
|
||||
!
|
||||
!
|
||||
|
||||
module bcm_csr_type_mod
|
||||
use iso_c_binding
|
||||
type, bind(c):: bcm_Vector
|
||||
type(c_ptr) :: data
|
||||
integer(c_int) :: size
|
||||
integer(c_int) :: owns_data
|
||||
end type
|
||||
|
||||
type, bind(c):: bcm_CSRMatrix
|
||||
type(c_ptr) :: i
|
||||
type(c_ptr) :: j
|
||||
integer(c_int) :: num_rows
|
||||
integer(c_int) :: num_cols
|
||||
integer(c_int) :: num_nonzeros
|
||||
integer(c_int) :: owns_data
|
||||
type(c_ptr) :: data
|
||||
end type
|
||||
end module bcm_csr_type_mod
|
||||
|
||||
module mld_d_bcmatch_aggregator_mod
|
||||
use mld_d_base_aggregator_mod
|
||||
use bcm_csr_type_mod
|
||||
|
||||
type, extends(mld_d_base_aggregator_type) :: mld_d_bcmatch_aggregator_type
|
||||
integer(psb_ipk_) :: matching_alg
|
||||
integer(psb_ipk_) :: n_sweeps
|
||||
real(psb_dpk_), allocatable :: w_tmp(:), w_nxt(:)
|
||||
type(bcm_Vector) :: w_par
|
||||
integer(psb_ipk_) :: max_csize
|
||||
integer(psb_ipk_) :: max_nlevels
|
||||
contains
|
||||
procedure, pass(ag) :: bld_tprol => mld_d_bcmatch_aggregator_build_tprol
|
||||
procedure, pass(ag) :: cseti => d_bcmatch_aggr_cseti
|
||||
procedure, pass(ag) :: default => d_bcmatch_aggr_set_default
|
||||
procedure, pass(ag) :: mat_asb => mld_d_bcmatch_aggregator_mat_asb
|
||||
procedure, pass(ag) :: update_next => d_bcmatch_aggregator_update_next
|
||||
procedure, pass(ag) :: bld_wnxt => d_bcmatch_bld_wnxt
|
||||
procedure, pass(ag) :: bld_default_w => d_bld_default_w
|
||||
procedure, pass(ag) :: set_c_default_w => d_set_default_bcm_w
|
||||
procedure, pass(ag) :: descr => d_bcmatch_aggregator_descr
|
||||
procedure, pass(ag) :: clone => d_bcmatch_aggregator_clone
|
||||
procedure, pass(ag) :: free => d_bcmatch_aggregator_free
|
||||
!!$ procedure, pass(ag) :: default => mld_d_base_aggregator_default
|
||||
procedure, nopass :: fmt => d_bcmatch_aggregator_fmt
|
||||
end type mld_d_bcmatch_aggregator_type
|
||||
|
||||
|
||||
interface
|
||||
subroutine mld_d_bcmatch_aggregator_build_tprol(ag,parms,a,desc_a,ilaggr,nlaggr,op_prol,info)
|
||||
import :: mld_d_bcmatch_aggregator_type, psb_desc_type, psb_dspmat_type, psb_dpk_, &
|
||||
& psb_ipk_, psb_long_int_k_, mld_dml_parms
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), target, intent(inout) :: ag
|
||||
type(mld_dml_parms), intent(inout) :: parms
|
||||
type(psb_dspmat_type), intent(in) :: a
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer(psb_ipk_), allocatable, intent(out) :: ilaggr(:),nlaggr(:)
|
||||
type(psb_dspmat_type), intent(out) :: op_prol
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine mld_d_bcmatch_aggregator_build_tprol
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine mld_d_bcmatch_aggregator_mat_asb(ag,parms,a,desc_a,ilaggr,nlaggr,ac,&
|
||||
& op_prol,op_restr,info)
|
||||
import :: mld_d_bcmatch_aggregator_type, psb_desc_type, psb_dspmat_type, psb_dpk_, &
|
||||
& psb_ipk_, psb_long_int_k_, mld_dml_parms
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), target, intent(inout) :: ag
|
||||
type(mld_dml_parms), intent(inout) :: parms
|
||||
type(psb_dspmat_type), intent(in) :: a
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
|
||||
type(psb_dspmat_type), intent(inout) :: op_prol
|
||||
type(psb_dspmat_type), intent(out) :: ac,op_restr
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine mld_d_bcmatch_aggregator_mat_asb
|
||||
end interface
|
||||
|
||||
|
||||
interface
|
||||
subroutine mld_d_bcmatch_map_to_tprol(desc_a,ilaggr,nlaggr,valaggr, op_prol,info)
|
||||
import :: mld_d_bcmatch_aggregator_type, psb_desc_type, psb_dspmat_type, psb_dpk_, &
|
||||
& psb_ipk_, psb_long_int_k_, mld_dml_parms
|
||||
implicit none
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ilaggr(:),nlaggr(:)
|
||||
real(psb_dpk_), allocatable, intent(inout) :: valaggr(:)
|
||||
type(psb_dspmat_type), intent(out) :: op_prol
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine mld_d_bcmatch_map_to_tprol
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine mld_daggrmat_unsmth_spmm_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info)
|
||||
import :: mld_d_bcmatch_aggregator_type, psb_desc_type, psb_dspmat_type, psb_dpk_, &
|
||||
& psb_ipk_, psb_long_int_k_, mld_dml_parms
|
||||
implicit none
|
||||
type(psb_dspmat_type), intent(in) :: a
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
|
||||
type(mld_dml_parms), intent(inout) :: parms
|
||||
type(psb_dspmat_type), intent(inout) :: op_prol
|
||||
type(psb_dspmat_type), intent(out) :: ac,op_restr
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine mld_daggrmat_unsmth_spmm_asb
|
||||
end interface
|
||||
|
||||
|
||||
contains
|
||||
|
||||
subroutine d_bld_default_w(ag,nr)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), target, intent(inout) :: ag
|
||||
integer(psb_ipk_), intent(in) :: nr
|
||||
integer(psb_ipk_) :: info
|
||||
call psb_realloc(nr,ag%w_tmp,info)
|
||||
if (info /= psb_success_) return
|
||||
ag%w_tmp = done
|
||||
call ag%set_c_default_w()
|
||||
end subroutine d_bld_default_w
|
||||
|
||||
subroutine d_set_default_bcm_w(ag)
|
||||
use psb_realloc_mod
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), target, intent(inout) :: ag
|
||||
|
||||
ag%w_par%size = psb_size(ag%w_tmp)
|
||||
ag%w_par%owns_data = 0
|
||||
if (ag%w_par%size > 0) call set_cloc(ag%w_tmp, ag%w_par)
|
||||
|
||||
end subroutine d_set_default_bcm_w
|
||||
|
||||
subroutine set_cloc(vect,w_par)
|
||||
use iso_c_binding
|
||||
real(psb_dpk_), target :: vect(:)
|
||||
type(bcm_Vector) :: w_par
|
||||
|
||||
w_par%data = c_loc(vect)
|
||||
end subroutine set_cloc
|
||||
|
||||
|
||||
subroutine d_bcmatch_bld_wnxt(ag,ilaggr,valaggr,nx)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), target, intent(inout) :: ag
|
||||
integer(psb_ipk_), intent(in) :: ilaggr(:)
|
||||
real(psb_dpk_), intent(in) :: valaggr(:)
|
||||
integer(psb_ipk_), intent(in) :: nx
|
||||
|
||||
integer(psb_ipk_) :: info,i,j
|
||||
|
||||
call psb_realloc(nx,ag%w_nxt,info)
|
||||
associate(w_nxt => ag%w_nxt, w_tmp=>ag%w_tmp)
|
||||
w_nxt = dzero
|
||||
if (.false.) then
|
||||
do j=1, size(ilaggr)
|
||||
i = ilaggr(j)
|
||||
w_nxt(i) = w_nxt(i) + valaggr(j)*w_tmp(j)
|
||||
end do
|
||||
!write(0,*) 'Old copy ',w_nxt(1:10)
|
||||
else
|
||||
!write(0,*) 'New copy ',nx
|
||||
do i=1, nx
|
||||
w_nxt(i) = w_tmp(i)
|
||||
end do
|
||||
!write(0,*) 'New copy ',w_nxt(1:10)
|
||||
end if
|
||||
end associate
|
||||
|
||||
end subroutine d_bcmatch_bld_wnxt
|
||||
|
||||
function d_bcmatch_aggregator_fmt() result(val)
|
||||
implicit none
|
||||
character(len=32) :: val
|
||||
|
||||
val = "BootCMatch aggregation"
|
||||
end function d_bcmatch_aggregator_fmt
|
||||
|
||||
subroutine d_bcmatch_aggregator_descr(ag,parms,iout,info)
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), intent(in) :: ag
|
||||
type(mld_dml_parms), intent(in) :: parms
|
||||
integer(psb_ipk_), intent(in) :: iout
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
write(iout,*) 'BootCMatch Aggregator'
|
||||
write(iout,*) ' Number of BootCMatch sweeps: ',ag%n_sweeps
|
||||
write(iout,*) ' Matching algorithm : ',ag%matching_alg
|
||||
write(iout,*) ' 0: Preis 1: MC64 2: SPRAL '
|
||||
write(iout,*) 'Aggregator object type: ',ag%fmt()
|
||||
call parms%mldescr(iout,info)
|
||||
|
||||
return
|
||||
end subroutine d_bcmatch_aggregator_descr
|
||||
|
||||
subroutine d_bcmatch_aggregator_update_next(ag,agnext,info)
|
||||
use psb_realloc_mod
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), target, intent(inout) :: ag
|
||||
class(mld_d_base_aggregator_type), target, intent(inout) :: agnext
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
!
|
||||
!
|
||||
select type(agnext)
|
||||
class is (mld_d_bcmatch_aggregator_type)
|
||||
agnext%matching_alg = ag%matching_alg
|
||||
agnext%n_sweeps = ag%n_sweeps
|
||||
agnext%max_csize = ag%max_csize
|
||||
agnext%max_nlevels = ag%max_nlevels
|
||||
! Is this going to generate shallow copies/memory leaks/double frees?
|
||||
! To be investigated further.
|
||||
call psb_safe_ab_cpy(ag%w_nxt,agnext%w_tmp,info)
|
||||
call agnext%set_c_default_w()
|
||||
class default
|
||||
! What should we do here?
|
||||
end select
|
||||
info = 0
|
||||
end subroutine d_bcmatch_aggregator_update_next
|
||||
|
||||
subroutine d_bcmatch_aggr_cseti(ag,what,val,info,idx)
|
||||
|
||||
Implicit None
|
||||
|
||||
! Arguments
|
||||
class(mld_d_bcmatch_aggregator_type), intent(inout) :: ag
|
||||
character(len=*), intent(in) :: what
|
||||
integer(psb_ipk_), intent(in) :: val
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer, intent(in), optional :: idx
|
||||
integer(psb_ipk_) :: err_act, iwhat
|
||||
character(len=20) :: name='d_bcmatch_aggr_cseti'
|
||||
info = psb_success_
|
||||
|
||||
! For now we ignore IDX
|
||||
|
||||
select case(what)
|
||||
case('BCM_MATCH_ALG')
|
||||
ag%matching_alg=val
|
||||
case('BCM_SWEEPS')
|
||||
ag%n_sweeps=val
|
||||
case('BCM_MAX_CSIZE')
|
||||
ag%max_csize=val
|
||||
case('BCM_MAX_NLEVELS')
|
||||
ag%max_nlevels=val
|
||||
case('BCM_W_SIZE')
|
||||
call ag%bld_default_w(val)
|
||||
case default
|
||||
|
||||
end select
|
||||
return
|
||||
end subroutine d_bcmatch_aggr_cseti
|
||||
|
||||
subroutine d_bcmatch_aggr_set_default(ag)
|
||||
|
||||
Implicit None
|
||||
|
||||
! Arguments
|
||||
class(mld_d_bcmatch_aggregator_type), intent(inout) :: ag
|
||||
character(len=20) :: name='d_bcmatch_aggr_set_default'
|
||||
ag%matching_alg = 0
|
||||
ag%n_sweeps = 1
|
||||
ag%max_nlevels = 36
|
||||
ag%max_csize = 10
|
||||
|
||||
return
|
||||
|
||||
end subroutine d_bcmatch_aggr_set_default
|
||||
|
||||
subroutine d_bcmatch_aggregator_free(ag,info)
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), intent(inout) :: ag
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
info = 0
|
||||
if (allocated(ag%w_tmp)) deallocate(ag%w_tmp,stat=info)
|
||||
if (info /= 0) return
|
||||
if (allocated(ag%w_nxt)) deallocate(ag%w_nxt,stat=info)
|
||||
if (info /= 0) return
|
||||
ag%w_par%size = 0
|
||||
ag%w_par%data = c_null_ptr
|
||||
ag%w_par%owns_data = 0
|
||||
end subroutine d_bcmatch_aggregator_free
|
||||
|
||||
subroutine d_bcmatch_aggregator_clone(ag,agnext,info)
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), intent(inout) :: ag
|
||||
class(mld_d_base_aggregator_type), allocatable, intent(inout) :: agnext
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
info = 0
|
||||
if (allocated(agnext)) then
|
||||
call agnext%free(info)
|
||||
if (info == 0) deallocate(agnext,stat=info)
|
||||
end if
|
||||
if (info /= 0) return
|
||||
allocate(agnext,source=ag,stat=info)
|
||||
select type(agnext)
|
||||
class is (mld_d_bcmatch_aggregator_type)
|
||||
call agnext%set_c_default_w()
|
||||
class default
|
||||
! Should never ever get here
|
||||
info = -1
|
||||
end select
|
||||
end subroutine d_bcmatch_aggregator_clone
|
||||
|
||||
end module mld_d_bcmatch_aggregator_mod
|
||||
@@ -1,201 +0,0 @@
|
||||
!
|
||||
!
|
||||
! MLD2P4 version 2.1
|
||||
! MultiLevel Domain Decomposition Parallel Preconditioners Package
|
||||
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
|
||||
!
|
||||
! (C) Copyright 2008, 2010, 2012, 2015, 2017 , 2017
|
||||
!
|
||||
! Salvatore Filippone Cranfield University
|
||||
! Ambra Abdullahi Hassan University of Rome Tor Vergata
|
||||
! Pasqua D'Ambra IAC-CNR, Naples, IT
|
||||
! Daniela di Serafino University of Campania "L. Vanvitelli", Caserta, IT
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the MLD2P4 group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: mld_d_bcmatch_aggregator_tprol.f90
|
||||
!
|
||||
! Subroutine: mld_d_bcmatch_aggregator_tprol
|
||||
! Version: real
|
||||
!
|
||||
!
|
||||
|
||||
subroutine mld_d_bcmatch_aggregator_build_tprol(ag,parms,a,desc_a,ilaggr,nlaggr,op_prol,info)
|
||||
use psb_base_mod
|
||||
use mld_d_prec_type
|
||||
use mld_d_bcmatch_aggregator_mod, mld_protect_name => mld_d_bcmatch_aggregator_build_tprol
|
||||
use mld_d_inner_mod
|
||||
use bcm_csr_type_mod
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(mld_d_bcmatch_aggregator_type), target, intent(inout) :: ag
|
||||
type(mld_dml_parms), intent(inout) :: parms
|
||||
type(psb_dspmat_type), intent(in) :: a
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer(psb_ipk_), allocatable, intent(out) :: ilaggr(:),nlaggr(:)
|
||||
type(psb_dspmat_type), intent(out) :: op_prol
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
|
||||
! Local variables
|
||||
real(psb_dpk_), allocatable:: valaggr(:)
|
||||
type(psb_dspmat_type) :: a_tmp
|
||||
type(bcm_CSRMatrix) :: C, P
|
||||
integer(c_int) :: match_algorithm, n_sweeps, max_csize, max_nlevels
|
||||
character(len=20) :: name, ch_err
|
||||
integer(psb_mpk_) :: ctxt, np, me
|
||||
integer(psb_ipk_) :: err_act, ierr
|
||||
integer(psb_ipk_) :: debug_level, debug_unit
|
||||
integer(psb_ipk_) :: i, j, k, nr, nc, isz, num_pcols
|
||||
type(psb_d_csr_sparse_mat), target :: acsr
|
||||
integer(psb_ipk_), allocatable, target :: csr_ia(:), csr_ja(:)
|
||||
integer(psb_ipk_), allocatable :: aux(:)
|
||||
real(psb_dpk_), allocatable, target:: csr_val(:)
|
||||
interface
|
||||
function bootCMatch(C,match_alg,n_sweeps,max_nlevels,max_csize,w)bind(c,name='bootCMatch') result(P)
|
||||
use iso_c_binding
|
||||
use bcm_csr_type_mod
|
||||
implicit none
|
||||
type(bcm_CSRMatrix) :: C, P
|
||||
type(bcm_Vector) :: w
|
||||
integer(c_int) :: match_alg
|
||||
integer(c_int) :: n_sweeps
|
||||
integer(c_int) :: max_nlevels
|
||||
integer(c_int) :: max_csize
|
||||
end function bootCMatch
|
||||
end interface
|
||||
|
||||
interface
|
||||
function mld_bootCMatch_if(C,match_alg,n_sweeps,max_nlevels,max_csize,&
|
||||
& w,isz,ilaggr,valaggr, num_cols) &
|
||||
& bind(c,name='mld_bootCMatch_if') result(iret)
|
||||
use iso_c_binding
|
||||
use bcm_csr_type_mod
|
||||
implicit none
|
||||
type(bcm_CSRMatrix) :: C, P
|
||||
type(bcm_Vector) :: w
|
||||
integer(c_int), value :: match_alg
|
||||
integer(c_int), value :: n_sweeps
|
||||
integer(c_int), value :: max_nlevels
|
||||
integer(c_int), value :: max_csize
|
||||
integer(c_int), value :: isz
|
||||
integer(c_int) :: num_cols
|
||||
integer(c_int) :: ilaggr(*)
|
||||
real(c_double) :: valaggr(*)
|
||||
integer(c_int) :: iret
|
||||
end function mld_bootCMatch_if
|
||||
end interface
|
||||
|
||||
name='mld_d_bcmatch_aggregator_tprol'
|
||||
ctxt = desc_a%get_context()
|
||||
call psb_info(ctxt,me,np)
|
||||
if (psb_get_errstatus().ne.0) return
|
||||
call psb_erractionsave(err_act)
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
info = psb_success_
|
||||
|
||||
|
||||
call mld_check_def(parms%ml_cycle,'Multilevel cycle',&
|
||||
& mld_mult_ml_,is_legal_ml_cycle)
|
||||
call mld_check_def(parms%par_aggr_alg,'Aggregation',&
|
||||
& mld_dec_aggr_,is_legal_ml_par_aggr_alg)
|
||||
call mld_check_def(parms%aggr_ord,'Ordering',&
|
||||
& mld_aggr_ord_nat_,is_legal_ml_aggr_ord)
|
||||
call mld_check_def(parms%aggr_thresh,'Aggr_Thresh',dzero,is_legal_d_aggr_thrs)
|
||||
|
||||
call a%csclip(b=a_tmp, info=info, jmax=a%get_nrows(), imax=a%get_nrows())
|
||||
|
||||
call a_tmp%mv_to(acsr)
|
||||
nr = a%get_nrows()
|
||||
if (psb_size(ag%w_tmp) < nr) call ag%bld_default_w(nr)
|
||||
|
||||
!write(*,*) 'Build_tprol:',acsr%get_nrows(),acsr%get_ncols()
|
||||
C%num_rows = acsr%get_nrows()
|
||||
C%num_cols = acsr%get_ncols()
|
||||
C%num_nonzeros = acsr%get_nzeros()
|
||||
C%owns_data = 0
|
||||
acsr%irp = acsr%irp - 1
|
||||
acsr%ja = acsr%ja - 1
|
||||
C%i = c_loc(acsr%irp)
|
||||
C%j = c_loc(acsr%ja)
|
||||
C%data = c_loc(acsr%val)
|
||||
|
||||
isz = a%get_ncols()
|
||||
call psb_realloc(isz,ilaggr,info)
|
||||
if (info == psb_success_) call psb_realloc(isz,valaggr,info)
|
||||
if (info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_realloc'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
match_algorithm = ag%matching_alg
|
||||
n_sweeps = ag%n_sweeps
|
||||
max_csize = ag%max_csize
|
||||
max_nlevels = ag%max_nlevels
|
||||
|
||||
info = mld_bootCMatch_if(C,match_algorithm,n_sweeps,max_nlevels,max_csize,&
|
||||
& ag%w_par, isz, ilaggr, valaggr, num_pcols)
|
||||
if (info /= psb_success_) then
|
||||
!!$ write(0,*) 'On return from bootCMatch_if:',info
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='mld_bootCMatch_if')
|
||||
goto 9999
|
||||
end if
|
||||
!!$ write(0,*) 'On output from BootCMatch',nr,num_pcols,size(ilaggr),maxval(ilaggr),&
|
||||
!!$ & minval(ilaggr),minval(ilaggr(1:nr)),a%get_nrows(),a%get_ncols()
|
||||
! Prepare vector W for next level, just in case
|
||||
call ag%bld_wnxt(ilaggr(1:nr),valaggr(1:nr),num_pcols)
|
||||
|
||||
|
||||
call psb_realloc(np,nlaggr,info)
|
||||
if (info /= psb_success_) then
|
||||
info=psb_err_alloc_request_
|
||||
call psb_errpush(info,name,i_err=(/np,izero,izero,izero,izero/),&
|
||||
& a_err='integer')
|
||||
goto 9999
|
||||
end if
|
||||
call acsr%free()
|
||||
|
||||
nlaggr(:)=0
|
||||
nlaggr(me+1) = num_pcols
|
||||
call psb_sum(ctxt,nlaggr(1:np))
|
||||
|
||||
|
||||
call mld_d_bcmatch_map_to_tprol(desc_a,ilaggr,nlaggr,valaggr,op_prol,info)
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='mld_bcmatch_map_to_tprol')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
return
|
||||
|
||||
end subroutine mld_d_bcmatch_aggregator_build_tprol
|
||||
@@ -1,159 +0,0 @@
|
||||
!
|
||||
!
|
||||
! MLD2P4 version 2.1
|
||||
! MultiLevel Domain Decomposition Parallel Preconditioners Package
|
||||
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
|
||||
!
|
||||
! (C) Copyright 2008, 2010, 2012, 2015, 2017 , 2017
|
||||
!
|
||||
! Salvatore Filippone Cranfield University
|
||||
! Ambra Abdullahi Hassan University of Rome Tor Vergata
|
||||
! Pasqua D'Ambra IAC-CNR, Naples, IT
|
||||
! Daniela di Serafino University of Campania "L. Vanvitelli", Caserta, IT
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the MLD2P4 group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: mld_d_bcmatch_map_to_tprol.f90
|
||||
!
|
||||
! Subroutine: mld_d_bcmatch_map_to_tprol
|
||||
! Version: real
|
||||
!
|
||||
! This routine uses a mapping from the row indices of the fine-level matrix
|
||||
! to the row indices of the coarse-level matrix to build a tentative
|
||||
! prolongator, i.e. a piecewise constant operator.
|
||||
! This is later used to build the final operator; the code has been refactored here
|
||||
! to be shared among all the methods that provide the tentative prolongator
|
||||
! through a simple integer mapping.
|
||||
!
|
||||
! The aggregation algorithm is a parallel version of that described in
|
||||
! * M. Brezina and P. Vanek, A black-box iterative solver based on a
|
||||
! two-level Schwarz method, Computing, 63 (1999), 233-263.
|
||||
! * P. Vanek, J. Mandel and M. Brezina, Algebraic Multigrid by Smoothed
|
||||
! Aggregation for Second and Fourth Order Elliptic Problems, Computing, 56
|
||||
! (1996), 179-196.
|
||||
! For more details see
|
||||
! 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.
|
||||
!
|
||||
!
|
||||
! Arguments:
|
||||
! aggr_type - integer, input.
|
||||
! The scalar used to identify the aggregation algorithm.
|
||||
! theta - real, input.
|
||||
! The aggregation threshold used in the aggregation algorithm.
|
||||
! a - type(psb_dspmat_type), input.
|
||||
! The sparse matrix structure containing the local part of
|
||||
! the fine-level matrix.
|
||||
! desc_a - type(psb_desc_type), input.
|
||||
! The communication descriptor of the fine-level matrix.
|
||||
! ilaggr - integer, dimension(:), allocatable.
|
||||
! The mapping between the row indices of the coarse-level
|
||||
! matrix and the row indices of the fine-level matrix.
|
||||
! ilaggr(i)=j means that node i in the adjacency graph
|
||||
! of the fine-level matrix is mapped onto node j in the
|
||||
! adjacency graph of the coarse-level matrix. Note that on exit the indices
|
||||
! will be shifted so as to make sure the ranges on the various processes do not
|
||||
! overlap.
|
||||
! nlaggr - integer, dimension(:), allocatable.
|
||||
! nlaggr(i) contains the aggregates held by process i.
|
||||
! op_prol - type(psb_dspmat_type).
|
||||
! The tentative prolongator, based on ilaggr.
|
||||
!
|
||||
! info - integer, output.
|
||||
! Error code.
|
||||
!
|
||||
subroutine mld_d_bcmatch_map_to_tprol(desc_a,ilaggr,nlaggr,valaggr, op_prol,info)
|
||||
|
||||
use psb_base_mod
|
||||
use mld_d_inner_mod!, mld_protect_name => mld_d_bcmatch_map_to_tprol
|
||||
use mld_d_bcmatch_aggregator_mod, mld_protect_name => mld_d_bcmatch_map_to_tprol
|
||||
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ilaggr(:),nlaggr(:)
|
||||
real(psb_dpk_), allocatable, intent(inout) :: valaggr(:)
|
||||
type(psb_dspmat_type), intent(out) :: op_prol
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! Local variables
|
||||
integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m,naggrm1, naggrp1, ntaggr
|
||||
type(psb_d_coo_sparse_mat) :: tmpcoo
|
||||
integer(psb_ipk_) :: debug_level, debug_unit,err_act
|
||||
integer(psb_ipk_) :: ctxt,np,me
|
||||
integer(psb_ipk_) :: nrow, ncol, n_ne
|
||||
character(len=20) :: name, ch_err
|
||||
|
||||
if(psb_get_errstatus() /= 0) return
|
||||
info=psb_success_
|
||||
name = 'mld_d_bcmatch_map_to_tprol'
|
||||
call psb_erractionsave(err_act)
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
!
|
||||
ctxt=desc_a%get_context()
|
||||
call psb_info(ctxt,me,np)
|
||||
nrow = desc_a%get_local_rows()
|
||||
ncol = desc_a%get_local_cols()
|
||||
|
||||
naggr = nlaggr(me+1)
|
||||
ntaggr = sum(nlaggr)
|
||||
naggrm1 = sum(nlaggr(1:me))
|
||||
naggrp1 = sum(nlaggr(1:me+1))
|
||||
ilaggr(1:nrow) = ilaggr(1:nrow) + naggrm1
|
||||
call psb_halo(ilaggr,desc_a,info)
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='psb_halo')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call psb_halo(valaggr,desc_a,info)
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='psb_halo')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call tmpcoo%allocate(ncol,ntaggr,ncol)
|
||||
do i=1,ncol
|
||||
tmpcoo%val(i) = valaggr(i)
|
||||
tmpcoo%ia(i) = i
|
||||
tmpcoo%ja(i) = ilaggr(i)
|
||||
end do
|
||||
call tmpcoo%set_nzeros(ncol)
|
||||
call tmpcoo%set_dupl(psb_dupl_add_)
|
||||
call tmpcoo%set_sorted() ! At this point this is in row-major
|
||||
call op_prol%mv_from(tmpcoo)
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine mld_d_bcmatch_map_to_tprol
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,246 +0,0 @@
|
||||
!
|
||||
!
|
||||
! MLD2P4 version 2.1
|
||||
! MultiLevel Domain Decomposition Parallel Preconditioners Package
|
||||
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
|
||||
!
|
||||
! (C) Copyright 2008, 2010, 2012, 2015, 2017 , 2017
|
||||
!
|
||||
! Salvatore Filippone Cranfield University
|
||||
! Ambra Abdullahi Hassan University of Rome Tor Vergata
|
||||
! Pasqua D'Ambra IAC-CNR, Naples, IT
|
||||
! Daniela di Serafino University of Campania "L. Vanvitelli", Caserta, IT
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the MLD2P4 group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: mld_daggrmat_nosmth_asb.F90
|
||||
!
|
||||
! Subroutine: mld_daggrmat_nosmth_asb
|
||||
! Version: real
|
||||
!
|
||||
! This routine builds a coarse-level matrix A_C from a fine-level matrix A
|
||||
! by using the Galerkin approach, i.e.
|
||||
!
|
||||
! A_C = P_C^T A P_C,
|
||||
!
|
||||
! where P_C is the piecewise constant interpolation operator corresponding
|
||||
! the fine-to-coarse level mapping built by mld_aggrmap_bld.
|
||||
!
|
||||
! The coarse-level matrix A_C is distributed among the parallel processes or
|
||||
! replicated on each of them, according to the value of p%parms%coarse_mat
|
||||
! 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
|
||||
!
|
||||
! For details see
|
||||
! 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.
|
||||
!
|
||||
!
|
||||
! Arguments:
|
||||
! a - type(psb_dspmat_type), input.
|
||||
! The sparse matrix structure containing the local part of
|
||||
! the fine-level matrix.
|
||||
! desc_a - type(psb_desc_type), input.
|
||||
! The communication descriptor of the fine-level matrix.
|
||||
! p - type(mld_d_onelev_type), input/output.
|
||||
! The 'one-level' data structure that will contain the local
|
||||
! part of the matrix to be built as well as the information
|
||||
! concerning the prolongator and its transpose.
|
||||
! parms - type(mld_dml_parms), input
|
||||
! Parameters controlling the choice of algorithm
|
||||
! ac - type(psb_dspmat_type), output
|
||||
! The coarse matrix on output
|
||||
!
|
||||
! ilaggr - integer, dimension(:), input
|
||||
! The mapping between the row indices of the coarse-level
|
||||
! matrix and the row indices of the fine-level matrix.
|
||||
! ilaggr(i)=j means that node i in the adjacency graph
|
||||
! of the fine-level matrix is mapped onto node j in the
|
||||
! adjacency graph of the coarse-level matrix. Note that the indices
|
||||
! are assumed to be shifted so as to make sure the ranges on
|
||||
! the various processes do not overlap.
|
||||
! nlaggr - integer, dimension(:) input
|
||||
! nlaggr(i) contains the aggregates held by process i.
|
||||
! op_prol - type(psb_dspmat_type), input/output
|
||||
! The tentative prolongator on input, the computed prolongator on output
|
||||
!
|
||||
! op_restr - type(psb_dspmat_type), output
|
||||
! The restrictor operator; normally, it is the transpose of the prolongator.
|
||||
!
|
||||
! info - integer, output.
|
||||
! Error code.
|
||||
!
|
||||
!
|
||||
subroutine mld_daggrmat_unsmth_spmm_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info)
|
||||
use psb_base_mod
|
||||
use mld_d_inner_mod!, mld_protect_name => mld_daggrmat_unsmth_spmm_asb
|
||||
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
type(psb_dspmat_type), intent(in) :: a
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
|
||||
type(mld_dml_parms), intent(inout) :: parms
|
||||
type(psb_dspmat_type), intent(inout) :: op_prol
|
||||
type(psb_dspmat_type), intent(out) :: ac,op_restr
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! Local variables
|
||||
integer(psb_ipk_) :: err_act
|
||||
integer(psb_ipk_) :: ctxt,np,me, icomm, ndx, minfo
|
||||
character(len=20) :: name
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
type(psb_d_coo_sparse_mat) :: ac_coo, tmpcoo
|
||||
type(psb_d_csr_sparse_mat) :: acsr1, acsr2
|
||||
type(psb_dspmat_type) :: am3, am4, tmp_prol
|
||||
integer(psb_ipk_) :: debug_level, debug_unit
|
||||
integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, &
|
||||
& naggr, nzt, naggrm1, naggrp1, i, k
|
||||
|
||||
name='mld_aggrmat_unsmth_spmm_asb'
|
||||
if(psb_get_errstatus().ne.0) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
|
||||
ctxt = desc_a%get_context()
|
||||
icomm = desc_a%get_mpic()
|
||||
call psb_info(ctxt, me, np)
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
nglob = desc_a%get_global_rows()
|
||||
nrow = desc_a%get_local_rows()
|
||||
ncol = desc_a%get_local_cols()
|
||||
|
||||
|
||||
naggr = nlaggr(me+1)
|
||||
ntaggr = sum(nlaggr)
|
||||
naggrm1 = sum(nlaggr(1:me))
|
||||
naggrp1 = sum(nlaggr(1:me+1))
|
||||
|
||||
call op_prol%cscnv(info,type='csr',dupl=psb_dupl_add_)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call op_prol%cp_to(acsr1)
|
||||
|
||||
call tmp_prol%mv_from(acsr1)
|
||||
!
|
||||
! Now we have to gather the halo of tmp_prol, and add it to itself
|
||||
! to multiply it by A,
|
||||
!
|
||||
call psb_sphalo(tmp_prol,desc_a,am4,info,&
|
||||
& colcnv=.false.,rowscale=.true.)
|
||||
if (info == psb_success_) call psb_rwextd(ncol,tmp_prol,info,b=am4)
|
||||
if (info == psb_success_) call am4%free()
|
||||
if(info /= psb_success_) then
|
||||
call psb_errpush(psb_err_internal_error_,name,a_err='Halo of tmp_prol')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call psb_spspmm(a,tmp_prol,am3,info)
|
||||
if(info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='spspmm 2')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
call tmp_prol%mv_to(tmpcoo)
|
||||
call tmpcoo%transp()
|
||||
|
||||
nzl = tmpcoo%get_nzeros()
|
||||
i=0
|
||||
!
|
||||
! Now we have to fix this. The only rows of B that are correct
|
||||
! are those corresponding to "local" aggregates, i.e. indices in ilaggr(:)
|
||||
!
|
||||
do k=1, nzl
|
||||
if ((naggrm1 < tmpcoo%ia(k)) .and.(tmpcoo%ia(k) <= naggrp1)) then
|
||||
i = i+1
|
||||
tmpcoo%val(i) = tmpcoo%val(k)
|
||||
tmpcoo%ia(i) = tmpcoo%ia(k)
|
||||
tmpcoo%ja(i) = tmpcoo%ja(k)
|
||||
end if
|
||||
end do
|
||||
call tmpcoo%set_nzeros(i)
|
||||
! call tmpcoo%trim()
|
||||
call op_restr%mv_from(tmpcoo)
|
||||
call op_restr%cscnv(info,type='csr',dupl=psb_dupl_add_)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='spcnv op_restr')
|
||||
goto 9999
|
||||
end if
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'starting sphalo/ rwxtd'
|
||||
|
||||
! op_restr = ((i-wDA)Ptilde)^T
|
||||
call psb_sphalo(am3,desc_a,am4,info,&
|
||||
& colcnv=.false.,rowscale=.true.)
|
||||
if (info == psb_success_) call psb_rwextd(ncol,am3,info,b=am4)
|
||||
if (info == psb_success_) call am4%free()
|
||||
if(info /= psb_success_) then
|
||||
call psb_errpush(psb_err_internal_error_,name,a_err='Extend am3')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
! op_restr
|
||||
call psb_sphalo(am3,desc_a,am4,info,&
|
||||
& colcnv=.false.,rowscale=.true.)
|
||||
if (info == psb_success_) call psb_rwextd(ncol,am3,info,b=am4)
|
||||
if (info == psb_success_) call am4%free()
|
||||
if(info /= psb_success_) then
|
||||
call psb_errpush(psb_err_internal_error_,name,a_err='Extend am3')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'starting spspmm 3'
|
||||
call psb_spspmm(op_restr,am3,ac,info)
|
||||
if (info == psb_success_) call am3%free()
|
||||
if (info == psb_success_) call ac%cscnv(info,type='csr',dupl=psb_dupl_add_)
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_internal_error_,name,a_err='Build ac = op_restr x am3')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done smooth_aggregate '
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine mld_daggrmat_unsmth_spmm_asb
|
||||
@@ -1,72 +0,0 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "bcm.h"
|
||||
|
||||
bcm_CSRMatrix bootCMatch(bcm_CSRMatrix *C, int *match_algorithm, int *n_sweeps, int *max_nlevels, int *max_csize, bcm_Vector *w);
|
||||
bcm_CSRMatrix bootCMatch(bcm_CSRMatrix *C, int *match_algorithm, int *n_sweeps, int *max_nlevels, int *max_csize, bcm_Vector *w){
|
||||
bcm_Vector *w_temp;
|
||||
int info;
|
||||
//double *w_inp;
|
||||
//w_inp=bcm_VectorData(w);
|
||||
|
||||
bcm_CSRMatrix *P;
|
||||
bcm_CSRMatrix *Ac;
|
||||
int ftcoarse=1;
|
||||
int cr_it=0, cr_relax_type=0;
|
||||
double cr_relax_weight=0.0;
|
||||
// Here I am building Ac but I won't use it.
|
||||
Ac=bcm_CSRMatchingAgg(C, &w, &P, *match_algorithm, *n_sweeps, *max_nlevels,*max_csize , &ftcoarse,
|
||||
cr_it, cr_relax_type, cr_relax_weight);
|
||||
//w_inp=bcm_VectorData(w);
|
||||
bcm_CSRMatrixDestroy(Ac);
|
||||
return *P;
|
||||
}
|
||||
|
||||
int mld_bootCMatch_if(bcm_CSRMatrix *C, int match_algorithm, int n_sweeps,
|
||||
int max_nlevels, int max_csize, bcm_Vector *w,
|
||||
int isz, int ilaggr[], double valaggr[], int *num_cols){
|
||||
bcm_Vector *w_temp;
|
||||
int info;
|
||||
//double *w_inp;
|
||||
//w_inp=bcm_VectorData(w);
|
||||
|
||||
bcm_CSRMatrix *P;
|
||||
bcm_CSRMatrix *Ac;
|
||||
int *irp, *ja, nr, nz, nc,i,j;
|
||||
double *val;
|
||||
int ftcoarse=1;
|
||||
int cr_it=0, cr_relax_type=0;
|
||||
double cr_relax_weight=0.0;
|
||||
|
||||
// Sanity checks
|
||||
nr = bcm_CSRMatrixNumRows(C);
|
||||
nc = bcm_VectorSize(w);
|
||||
// fprintf(stderr,"Sanity check: %d %d \n",nr,nc);
|
||||
|
||||
// Here I am building Ac but I won't use it.
|
||||
Ac=bcm_CSRMatchingAgg(C, &w, &P, match_algorithm, n_sweeps, max_nlevels,max_csize , &ftcoarse,
|
||||
cr_it, cr_relax_type, cr_relax_weight);
|
||||
irp = bcm_CSRMatrixI(P);
|
||||
ja = bcm_CSRMatrixJ(P);
|
||||
val = bcm_CSRMatrixData(P);
|
||||
nr = bcm_CSRMatrixNumRows(P);
|
||||
nc = bcm_CSRMatrixNumCols(P);
|
||||
nz = bcm_CSRMatrixNumNonzeros(P);
|
||||
|
||||
if (isz < nr) return(-1);
|
||||
if (nz != nr) return(-2);
|
||||
/* loop here only makes sense when nr==nz */
|
||||
for (i=0; i< nr; i++) {
|
||||
for (j=irp[i]; j<irp[i+1]; j++) {
|
||||
ilaggr[i] = ja[j] + 1;
|
||||
valaggr[i] = val[j];
|
||||
}
|
||||
}
|
||||
*num_cols = nc;
|
||||
//w_inp=bcm_VectorData(w);
|
||||
bcm_CSRMatrixDestroy(Ac);
|
||||
bcm_CSRMatrixDestroy(P);
|
||||
return(0);
|
||||
}
|
||||
@@ -1,324 +0,0 @@
|
||||
!
|
||||
!
|
||||
! MLD2P4 version 2.2
|
||||
! MultiLevel Domain Decomposition Parallel Preconditioners Package
|
||||
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
|
||||
!
|
||||
! (C) Copyright 2008-2018
|
||||
!
|
||||
! Salvatore Filippone
|
||||
! Pasqua D'Ambra
|
||||
! Daniela di Serafino
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the MLD2P4 group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
module data_input
|
||||
use psb_base_mod, only : psb_spk_, psb_dpk_, psb_ipk_
|
||||
|
||||
interface read_data
|
||||
module procedure read_char, read_int, read_int_array,&
|
||||
& read_double, read_double_array, &
|
||||
& read_single, read_single_array, read_logical,&
|
||||
& string_read_char, string_read_int, string_read_int_array,&
|
||||
& string_read_double, string_read_double_array,&
|
||||
& string_read_single, string_read_single_array, &
|
||||
& string_read_logical
|
||||
end interface read_data
|
||||
interface trim_string
|
||||
module procedure trim_string
|
||||
end interface
|
||||
|
||||
character(len=4096), private :: charbuf
|
||||
character, private, parameter :: def_marker="!"
|
||||
character, private, parameter :: cmt_marker="%"
|
||||
|
||||
contains
|
||||
subroutine get_buffer(file,buffer)
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=*), intent(inout) :: buffer
|
||||
integer :: idx
|
||||
do
|
||||
read(file,'(a)',end=999) buffer
|
||||
buffer = adjustl(buffer)
|
||||
idx=index(charbuf,cmt_marker)
|
||||
if (idx == 1 ) then
|
||||
cycle
|
||||
else
|
||||
exit
|
||||
end if
|
||||
end do
|
||||
999 continue
|
||||
return
|
||||
end subroutine get_buffer
|
||||
|
||||
subroutine read_logical(val,file,marker)
|
||||
logical, intent(out) :: val
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_logical
|
||||
|
||||
subroutine read_char(val,file,marker)
|
||||
character(len=*), intent(out) :: val
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_char
|
||||
|
||||
subroutine read_int(val,file,marker)
|
||||
integer(psb_ipk_), intent(out) :: val
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_int
|
||||
|
||||
subroutine read_int_array(val,file,marker)
|
||||
integer(psb_ipk_), intent(out) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_int_array
|
||||
|
||||
subroutine read_single(val,file,marker)
|
||||
real(psb_spk_), intent(out) :: val
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_single
|
||||
|
||||
subroutine read_single_array(val,file,marker)
|
||||
real(psb_spk_), intent(out) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_single_array
|
||||
|
||||
subroutine read_double(val,file,marker)
|
||||
real(psb_dpk_), intent(out) :: val
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_double
|
||||
|
||||
subroutine read_double_array(val,file,marker)
|
||||
real(psb_dpk_), intent(out) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_double_array
|
||||
|
||||
subroutine string_read_char(val,file,marker)
|
||||
character(len=*), intent(out) :: val
|
||||
character(len=*), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
character(len=1) :: marker_
|
||||
character(len=1024) :: charbuf
|
||||
integer(psb_ipk_) :: idx
|
||||
if (present(marker)) then
|
||||
marker_ = marker
|
||||
else
|
||||
marker_ = def_marker
|
||||
end if
|
||||
read(file,'(a)')charbuf
|
||||
charbuf = adjustl(charbuf)
|
||||
idx=index(charbuf,marker_)
|
||||
if (idx == 0) idx = len(charbuf)+1
|
||||
read(charbuf(1:idx-1),'(a)') val
|
||||
end subroutine string_read_char
|
||||
|
||||
subroutine string_read_int(val,file,marker)
|
||||
integer(psb_ipk_), intent(out) :: val
|
||||
character(len=*), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
character(len=1) :: marker_
|
||||
character(len=1024) :: charbuf
|
||||
integer(psb_ipk_) :: idx
|
||||
if (present(marker)) then
|
||||
marker_ = marker
|
||||
else
|
||||
marker_ = def_marker
|
||||
end if
|
||||
read(file,'(a)')charbuf
|
||||
charbuf = adjustl(charbuf)
|
||||
idx=index(charbuf,marker_)
|
||||
if (idx == 0) idx = len(charbuf)+1
|
||||
read(charbuf(1:idx-1),*) val
|
||||
end subroutine string_read_int
|
||||
|
||||
subroutine string_read_int_array(val,file,marker)
|
||||
integer(psb_ipk_), intent(out) :: val(:)
|
||||
character(len=*), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
character(len=1) :: marker_
|
||||
character(len=1024) :: charbuf
|
||||
integer(psb_ipk_) :: idx
|
||||
if (present(marker)) then
|
||||
marker_ = marker
|
||||
else
|
||||
marker_ = def_marker
|
||||
end if
|
||||
read(file,'(a)')charbuf
|
||||
charbuf = adjustl(charbuf)
|
||||
idx=index(charbuf,marker_)
|
||||
if (idx == 0) idx = len(charbuf)+1
|
||||
read(charbuf(1:idx-1),*) val(:)
|
||||
end subroutine string_read_int_array
|
||||
|
||||
subroutine string_read_single(val,file,marker)
|
||||
real(psb_spk_), intent(out) :: val
|
||||
character(len=*), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
character(len=1) :: marker_
|
||||
character(len=1024) :: charbuf
|
||||
integer(psb_ipk_) :: idx
|
||||
if (present(marker)) then
|
||||
marker_ = marker
|
||||
else
|
||||
marker_ = def_marker
|
||||
end if
|
||||
read(file,'(a)')charbuf
|
||||
charbuf = adjustl(charbuf)
|
||||
idx=index(charbuf,marker_)
|
||||
if (idx == 0) idx = len(charbuf)+1
|
||||
read(charbuf(1:idx-1),*) val
|
||||
end subroutine string_read_single
|
||||
|
||||
subroutine string_read_single_array(val,file,marker)
|
||||
real(psb_spk_), intent(out) :: val(:)
|
||||
character(len=*), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
character(len=1) :: marker_
|
||||
character(len=1024) :: charbuf
|
||||
integer(psb_ipk_) :: idx
|
||||
if (present(marker)) then
|
||||
marker_ = marker
|
||||
else
|
||||
marker_ = def_marker
|
||||
end if
|
||||
read(file,'(a)')charbuf
|
||||
charbuf = adjustl(charbuf)
|
||||
idx=index(charbuf,marker_)
|
||||
if (idx == 0) idx = len(charbuf)+1
|
||||
read(charbuf(1:idx-1),*) val(:)
|
||||
end subroutine string_read_single_array
|
||||
|
||||
subroutine string_read_double(val,file,marker)
|
||||
real(psb_dpk_), intent(out) :: val
|
||||
character(len=*), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
character(len=1) :: marker_
|
||||
character(len=1024) :: charbuf
|
||||
integer(psb_ipk_) :: idx
|
||||
if (present(marker)) then
|
||||
marker_ = marker
|
||||
else
|
||||
marker_ = def_marker
|
||||
end if
|
||||
read(file,'(a)')charbuf
|
||||
charbuf = adjustl(charbuf)
|
||||
idx=index(charbuf,marker_)
|
||||
if (idx == 0) idx = len(charbuf)+1
|
||||
read(charbuf(1:idx-1),*) val
|
||||
end subroutine string_read_double
|
||||
|
||||
subroutine string_read_double_array(val,file,marker)
|
||||
real(psb_dpk_), intent(out) :: val(:)
|
||||
character(len=*), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
character(len=1) :: marker_
|
||||
character(len=1024) :: charbuf
|
||||
integer(psb_ipk_) :: idx
|
||||
if (present(marker)) then
|
||||
marker_ = marker
|
||||
else
|
||||
marker_ = def_marker
|
||||
end if
|
||||
read(file,'(a)')charbuf
|
||||
charbuf = adjustl(charbuf)
|
||||
idx=index(charbuf,marker_)
|
||||
if (idx == 0) idx = len(charbuf)+1
|
||||
read(charbuf(1:idx-1),*) val(:)
|
||||
end subroutine string_read_double_array
|
||||
|
||||
subroutine string_read_logical(val,file,marker)
|
||||
logical, intent(out) :: val
|
||||
character(len=*), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
character(len=1) :: marker_
|
||||
character(len=1024) :: charbuf
|
||||
integer(psb_ipk_) :: idx
|
||||
if (present(marker)) then
|
||||
marker_ = marker
|
||||
else
|
||||
marker_ = def_marker
|
||||
end if
|
||||
read(file,'(a)')charbuf
|
||||
charbuf = adjustl(charbuf)
|
||||
idx=index(charbuf,marker_)
|
||||
if (idx == 0) idx = len(charbuf)+1
|
||||
read(charbuf(1:idx-1),*) val
|
||||
end subroutine string_read_logical
|
||||
|
||||
function trim_string(string,marker)
|
||||
character(len=*), intent(in) :: string
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
character(len=len(string)) :: trim_string
|
||||
character(len=1) :: marker_
|
||||
integer(psb_ipk_) :: idx
|
||||
if (present(marker)) then
|
||||
marker_ = marker
|
||||
else
|
||||
marker_ = def_marker
|
||||
end if
|
||||
idx=index(string,marker_)
|
||||
trim_string = adjustl(string(idx:))
|
||||
end function trim_string
|
||||
end module data_input
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
%%%%%%%%%%% General arguments % Lines starting with % are ignored.
|
||||
CSR ! Storage format CSR COO JAD
|
||||
0100 ! IDIM; domain size. Linear system size is IDIM**2
|
||||
FCG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS FCG GCR RGMRES
|
||||
2 ! ISTOPC
|
||||
00500 ! ITMAX
|
||||
1 ! ITRACE
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-6 ! EPS
|
||||
ML-KCYCLE-FBGS-ILU ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
%%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%%
|
||||
FBGS ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-level, repeats previous.
|
||||
1 ! Number of sweeps for smoother
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
0 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
%%%%%%%%%%% Second smoother, always ignored for non-ML %%%%%%%%%%%%%%%%
|
||||
NONE ! Second (post) smoother, ignored if NONE
|
||||
1 ! Number of sweeps for (post) smoother
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
0 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
%%%%%%%%%%% Multilevel parameters %%%%%%%%%%%%%%%%
|
||||
KCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MULT ADD
|
||||
1 ! Number of outer sweeps for ML
|
||||
-3 ! Max Number of levels in a multilevel preconditioner; if <0, lib default
|
||||
-3 ! Target coarse matrix size; if <0, lib default
|
||||
UNSMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
NOFILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
-2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
-0.0100d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
%%%%%%%%%%% Coarse level solver %%%%%%%%%%%%%%%%
|
||||
BJAC ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC DEFLT
|
||||
ILU ! Coarsest-level subsolver for BJAC: ILU ILUT MILU UMF MUMPS SLU
|
||||
DIST ! Coarsest-level matrix distribution: DIST REPL, DEFLT
|
||||
1 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
1 ! Number of sweeps for JACOBI/GS/BJAC coarsest-level solver
|
||||
T ! Use BootCMatch
|
||||
2 ! Matching method: 0 PREIS, 1 MC64, 2 SPRAL (auction)
|
||||
2 ! Pairing sweeps
|
||||
Reference in New Issue
Block a user