Updates in fileread. To be completed.

This commit is contained in:
Salvatore Filippone
2020-11-27 14:34:39 +01:00
parent 9898caa576
commit 3f449710a3
12 changed files with 178 additions and 153 deletions
+34 -34
View File
@@ -1,51 +1,51 @@
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).
AMGDIR=../..
AMGINCDIR=$(AMGDIR)/include
include $(AMGINCDIR)/Make.inc.amg4psblas
AMGMODDIR=$(AMGDIR)/modules
AMGLIBDIR=$(AMGDIR)/lib
AMG_LIBS=-L$(AMGLIBDIR) -lpsb_krylov -lamg_prec -lpsb_prec
FINCLUDES=$(FMFLAG). $(FMFLAG)$(AMGMODDIR) $(FMFLAG)$(AMGINCDIR) $(PSBLAS_INCLUDES) $(FIFLAG).
DFSOBJS=mld_df_sample.o data_input.o
SFSOBJS=mld_sf_sample.o data_input.o
CFSOBJS=mld_cf_sample.o data_input.o
ZFSOBJS=mld_zf_sample.o data_input.o
DFSOBJS=amg_df_sample.o data_input.o
SFSOBJS=amg_sf_sample.o data_input.o
CFSOBJS=amg_cf_sample.o data_input.o
ZFSOBJS=amg_zf_sample.o data_input.o
LINKOPT=
EXEDIR=./runs
all: mld_sf_sample mld_df_sample mld_cf_sample mld_zf_sample
all: amg_sf_sample amg_df_sample amg_cf_sample amg_zf_sample
mld_df_sample: $(DFSOBJS)
$(FLINK) $(LINKOPT) $(DFSOBJS) -o mld_df_sample \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_df_sample $(EXEDIR)
amg_df_sample: $(DFSOBJS)
$(FLINK) $(LINKOPT) $(DFSOBJS) -o amg_df_sample \
$(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv amg_df_sample $(EXEDIR)
mld_sf_sample: $(SFSOBJS)
$(FLINK) $(LINKOPT) $(SFSOBJS) -o mld_sf_sample \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_sf_sample $(EXEDIR)
amg_sf_sample: $(SFSOBJS)
$(FLINK) $(LINKOPT) $(SFSOBJS) -o amg_sf_sample \
$(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv amg_sf_sample $(EXEDIR)
mld_cf_sample: $(CFSOBJS)
$(FLINK) $(LINKOPT) $(CFSOBJS) -o mld_cf_sample \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_cf_sample $(EXEDIR)
amg_cf_sample: $(CFSOBJS)
$(FLINK) $(LINKOPT) $(CFSOBJS) -o amg_cf_sample \
$(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv amg_cf_sample $(EXEDIR)
mld_zf_sample: $(ZFSOBJS)
$(FLINK) $(LINKOPT) $(ZFSOBJS) -o mld_zf_sample \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_zf_sample $(EXEDIR)
amg_zf_sample: $(ZFSOBJS)
$(FLINK) $(LINKOPT) $(ZFSOBJS) -o amg_zf_sample \
$(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv amg_zf_sample $(EXEDIR)
mld_sf_sample.o: data_input.o
mld_df_sample.o: data_input.o
mld_cf_sample.o: data_input.o
mld_zf_sample.o: data_input.o
amg_sf_sample.o: data_input.o
amg_df_sample.o: data_input.o
amg_cf_sample.o: data_input.o
amg_zf_sample.o: data_input.o
clean:
/bin/rm -f $(DFSOBJS) $(ZFSOBJS) $(SFSOBJS) $(CFSOBJS) \
*$(.mod) $(EXEDIR)/mld_sf_sample $(EXEDIR)/mld_cf_sample \
$(EXEDIR)/mld_df_sample $(EXEDIR)/mld_zf_sample
*$(.mod) $(EXEDIR)/amg_sf_sample $(EXEDIR)/amg_cf_sample \
$(EXEDIR)/amg_df_sample $(EXEDIR)/amg_zf_sample
lib:
(cd ../../; make library)
+10 -5
View File
@@ -121,7 +121,8 @@ program amg_cf_sample
type(precdata) :: p_choice
! sparse matrices
type(psb_cspmat_type) :: a, aux_a
type(psb_cspmat_type) :: a
type(psb_lcspmat_type) :: aux_a
! preconditioner data
type(amg_cprec_type) :: prec
@@ -135,8 +136,8 @@ program amg_cf_sample
type(psb_desc_type):: desc_a
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: iam, np
integer(psb_ipk_) :: iam, np
integer(psb_lpk_) :: lnp
! solver paramters
integer(psb_ipk_) :: iter, ircode, nlv
integer(psb_epk_) :: amatsize, precsize, descsize
@@ -149,7 +150,7 @@ program amg_cf_sample
! other variables
integer(psb_ipk_) :: i, info, j, k, m_problem
integer(psb_ipk_) :: lbw, ubw, prf
integer(psb_lpk_) :: lbw, ubw, prf
real(psb_dpk_) :: t1, t2, tprec, thier, tslv
real(psb_spk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2
integer(psb_ipk_) :: nrhs, nv
@@ -324,7 +325,11 @@ program amg_cf_sample
if (iam == psb_root_) then
write(psb_out_unit,'("Partition type: graph")')
write(psb_out_unit,'(" ")')
call build_mtpart(aux_a,np)
! write(psb_err_unit,'("Build type: graph")')
call aux_a%cscnv(info,type='csr')
lnp = np
call build_mtpart(aux_a,lnp)
endif
call distr_mtpart(psb_root_,ctxt)
call getv_mtpart(ivg)
+10 -5
View File
@@ -121,7 +121,8 @@ program amg_df_sample
type(precdata) :: p_choice
! sparse matrices
type(psb_dspmat_type) :: a, aux_a
type(psb_dspmat_type) :: a
type(psb_ldspmat_type) :: aux_a
! preconditioner data
type(amg_dprec_type) :: prec
@@ -135,8 +136,8 @@ program amg_df_sample
type(psb_desc_type):: desc_a
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: iam, np
integer(psb_ipk_) :: iam, np
integer(psb_lpk_) :: lnp
! solver paramters
integer(psb_ipk_) :: iter, ircode, nlv
integer(psb_epk_) :: amatsize, precsize, descsize
@@ -149,7 +150,7 @@ program amg_df_sample
! other variables
integer(psb_ipk_) :: i, info, j, k, m_problem
integer(psb_ipk_) :: lbw, ubw, prf
integer(psb_lpk_) :: lbw, ubw, prf
real(psb_dpk_) :: t1, t2, tprec, thier, tslv
real(psb_dpk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2
integer(psb_ipk_) :: nrhs, nv
@@ -324,7 +325,11 @@ program amg_df_sample
if (iam == psb_root_) then
write(psb_out_unit,'("Partition type: graph")')
write(psb_out_unit,'(" ")')
call build_mtpart(aux_a,np)
! write(psb_err_unit,'("Build type: graph")')
call aux_a%cscnv(info,type='csr')
lnp = np
call build_mtpart(aux_a,lnp)
endif
call distr_mtpart(psb_root_,ctxt)
call getv_mtpart(ivg)
+10 -5
View File
@@ -121,7 +121,8 @@ program amg_sf_sample
type(precdata) :: p_choice
! sparse matrices
type(psb_sspmat_type) :: a, aux_a
type(psb_sspmat_type) :: a
type(psb_lsspmat_type) :: aux_a
! preconditioner data
type(amg_sprec_type) :: prec
@@ -135,8 +136,8 @@ program amg_sf_sample
type(psb_desc_type):: desc_a
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: iam, np
integer(psb_ipk_) :: iam, np
integer(psb_lpk_) :: lnp
! solver paramters
integer(psb_ipk_) :: iter, ircode, nlv
integer(psb_epk_) :: amatsize, precsize, descsize
@@ -149,7 +150,7 @@ program amg_sf_sample
! other variables
integer(psb_ipk_) :: i, info, j, k, m_problem
integer(psb_ipk_) :: lbw, ubw, prf
integer(psb_lpk_) :: lbw, ubw, prf
real(psb_dpk_) :: t1, t2, tprec, thier, tslv
real(psb_spk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2
integer(psb_ipk_) :: nrhs, nv
@@ -324,7 +325,11 @@ program amg_sf_sample
if (iam == psb_root_) then
write(psb_out_unit,'("Partition type: graph")')
write(psb_out_unit,'(" ")')
call build_mtpart(aux_a,np)
! write(psb_err_unit,'("Build type: graph")')
call aux_a%cscnv(info,type='csr')
lnp = np
call build_mtpart(aux_a,lnp)
endif
call distr_mtpart(psb_root_,ctxt)
call getv_mtpart(ivg)
+10 -5
View File
@@ -121,7 +121,8 @@ program amg_zf_sample
type(precdata) :: p_choice
! sparse matrices
type(psb_zspmat_type) :: a, aux_a
type(psb_zspmat_type) :: a
type(psb_lzspmat_type) :: aux_a
! preconditioner data
type(amg_zprec_type) :: prec
@@ -135,8 +136,8 @@ program amg_zf_sample
type(psb_desc_type):: desc_a
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: iam, np
integer(psb_ipk_) :: iam, np
integer(psb_lpk_) :: lnp
! solver paramters
integer(psb_ipk_) :: iter, ircode, nlv
integer(psb_epk_) :: amatsize, precsize, descsize
@@ -149,7 +150,7 @@ program amg_zf_sample
! other variables
integer(psb_ipk_) :: i, info, j, k, m_problem
integer(psb_ipk_) :: lbw, ubw, prf
integer(psb_lpk_) :: lbw, ubw, prf
real(psb_dpk_) :: t1, t2, tprec, thier, tslv
real(psb_dpk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2
integer(psb_ipk_) :: nrhs, nv
@@ -324,7 +325,11 @@ program amg_zf_sample
if (iam == psb_root_) then
write(psb_out_unit,'("Partition type: graph")')
write(psb_out_unit,'(" ")')
call build_mtpart(aux_a,np)
! write(psb_err_unit,'("Build type: graph")')
call aux_a%cscnv(info,type='csr')
lnp = np
call build_mtpart(aux_a,lnp)
endif
call distr_mtpart(psb_root_,ctxt)
call getv_mtpart(ivg)
+1 -1
View File
@@ -1,4 +1,4 @@
AMGDIR=../../..
AMGDIR=../..
AMGINCDIR=$(AMGDIR)/include
include $(AMGINCDIR)/Make.inc.amg4psblas
AMGMODDIR=$(AMGDIR)/modules
+5 -1
View File
@@ -9,7 +9,7 @@ CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS F
30 ! IRST (restart for RGMRES and BiCGSTABL)
1.d-6 ! EPS
%%%%%%%%%%% Main preconditioner choices %%%%%%%%%%%%%%%%
ML-VCYCLE-BJAC-R-UMF ! Longer descriptive name for preconditioner (up to 20 chars)
ML-VCYCLE-BJAC-D-BJAC ! 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) %%%%%%%%%%%%%%%%
BJAC ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-level, repeats previous.
@@ -18,7 +18,9 @@ BJAC ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-l
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
LLK ! AINV variant, ignored otherwise
0 ! Fill level P for ILU(P) and ILU(T,P)
1 ! Inverse Fill level P for INVK
1.d-4 ! Threshold T for ILU(T,P)
%%%%%%%%%%% Second smoother, always ignored for non-ML %%%%%%%%%%%%%%%%
NONE ! Second (post) smoother, ignored if NONE
@@ -27,7 +29,9 @@ NONE ! Second (post) smoother, ignored if NONE
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
LLK ! AINV variant, ignored otherwise
0 ! Fill level P for ILU(P) and ILU(T,P)
8 ! Inverse Fill level P for INVK
1.d-4 ! Threshold T for ILU(T,P)
%%%%%%%%%%% Multilevel parameters %%%%%%%%%%%%%%%%
VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MULT ADD
+1
View File
@@ -8,6 +8,7 @@ BICGSTAB ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS F
1 ! ITRACE
30 ! IRST (restart for RGMRES and BiCGSTABL)
1.d-6 ! EPS
%%%%%%%%%%% Main preconditioner choices %%%%%%%%%%%%%%%%
ML-VCYCLE-BJAC-R-UMF ! 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) %%%%%%%%%%%%%%%%