Updates in fileread. To be completed.

merge-amgext
Salvatore Filippone 4 years ago
parent 9898caa576
commit 3f449710a3

@ -1,89 +1,89 @@
MLDDIR=../.. AMGDIR=../..
MLDINCDIR=$(MLDDIR)/include AMGINCDIR=$(AMGDIR)/include
include $(MLDINCDIR)/Make.inc.amg4psblas include $(AMGINCDIR)/Make.inc.amg4psblas
MLDMODDIR=$(MLDDIR)/modules AMGMODDIR=$(AMGDIR)/modules
MLDLIBDIR=$(MLDDIR)/lib AMGLIBDIR=$(AMGDIR)/lib
MLD_LIBS=-L$(MLDLIBDIR) -lpsb_krylov -lmld_prec -lpsb_prec AMG_LIBS=-L$(AMGLIBDIR) -lpsb_krylov -lamg_prec -lpsb_prec
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDMODDIR) $(FMFLAG)$(MLDINCDIR) $(PSBLAS_INCLUDES) $(FIFLAG). FINCLUDES=$(FMFLAG). $(FMFLAG)$(AMGMODDIR) $(FMFLAG)$(AMGINCDIR) $(PSBLAS_INCLUDES) $(FIFLAG).
LINKOPT= LINKOPT=
DMOBJS=mld_dexample_ml.o data_input.o DMOBJS=amg_dexample_ml.o data_input.o
D1OBJS=mld_dexample_1lev.o data_input.o D1OBJS=amg_dexample_1lev.o data_input.o
ZMOBJS=mld_zexample_ml.o data_input.o ZMOBJS=amg_zexample_ml.o data_input.o
Z1OBJS=mld_zexample_1lev.o data_input.o Z1OBJS=amg_zexample_1lev.o data_input.o
SMOBJS=mld_sexample_ml.o data_input.o SMOBJS=amg_sexample_ml.o data_input.o
S1OBJS=mld_sexample_1lev.o data_input.o S1OBJS=amg_sexample_1lev.o data_input.o
CMOBJS=mld_cexample_ml.o data_input.o CMOBJS=amg_cexample_ml.o data_input.o
C1OBJS=mld_cexample_1lev.o data_input.o C1OBJS=amg_cexample_1lev.o data_input.o
EXEDIR=./runs EXEDIR=./runs
all: mld_dexample_ml mld_dexample_1lev mld_zexample_ml mld_zexample_1lev\ all: amg_dexample_ml amg_dexample_1lev amg_zexample_ml amg_zexample_1lev\
mld_sexample_ml mld_sexample_1lev mld_cexample_ml mld_cexample_1lev amg_sexample_ml amg_sexample_1lev amg_cexample_ml amg_cexample_1lev
mld_dexample_ml: $(DMOBJS) amg_dexample_ml: $(DMOBJS)
$(FLINK) $(LINKOPT) $(DMOBJS) -o mld_dexample_ml \ $(FLINK) $(LINKOPT) $(DMOBJS) -o amg_dexample_ml \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_dexample_ml $(EXEDIR) /bin/mv amg_dexample_ml $(EXEDIR)
mld_dexample_1lev: $(D1OBJS) amg_dexample_1lev: $(D1OBJS)
$(FLINK) $(LINKOPT) $(D1OBJS) -o mld_dexample_1lev \ $(FLINK) $(LINKOPT) $(D1OBJS) -o amg_dexample_1lev \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_dexample_1lev $(EXEDIR) /bin/mv amg_dexample_1lev $(EXEDIR)
mld_dexample_ml.o: data_input.o amg_dexample_ml.o: data_input.o
mld_dexample_1lev.o: data_input.o amg_dexample_1lev.o: data_input.o
mld_zexample_ml: $(ZMOBJS) amg_zexample_ml: $(ZMOBJS)
$(FLINK) $(LINKOPT) $(ZMOBJS) -o mld_zexample_ml \ $(FLINK) $(LINKOPT) $(ZMOBJS) -o amg_zexample_ml \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_zexample_ml $(EXEDIR) /bin/mv amg_zexample_ml $(EXEDIR)
mld_zexample_1lev: $(Z1OBJS) amg_zexample_1lev: $(Z1OBJS)
$(FLINK) $(LINKOPT) $(Z1OBJS) -o mld_zexample_1lev \ $(FLINK) $(LINKOPT) $(Z1OBJS) -o amg_zexample_1lev \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_zexample_1lev $(EXEDIR) /bin/mv amg_zexample_1lev $(EXEDIR)
mld_zexample_ml.o: data_input.o amg_zexample_ml.o: data_input.o
mld_zexample_1lev.o: data_input.o amg_zexample_1lev.o: data_input.o
mld_sexample_ml: $(SMOBJS) amg_sexample_ml: $(SMOBJS)
$(FLINK) $(LINKOPT) $(SMOBJS) -o mld_sexample_ml \ $(FLINK) $(LINKOPT) $(SMOBJS) -o amg_sexample_ml \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_sexample_ml $(EXEDIR) /bin/mv amg_sexample_ml $(EXEDIR)
mld_sexample_1lev: $(S1OBJS) amg_sexample_1lev: $(S1OBJS)
$(FLINK) $(LINKOPT) $(S1OBJS) -o mld_sexample_1lev \ $(FLINK) $(LINKOPT) $(S1OBJS) -o amg_sexample_1lev \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_sexample_1lev $(EXEDIR) /bin/mv amg_sexample_1lev $(EXEDIR)
mld_sexample_ml.o: data_input.o amg_sexample_ml.o: data_input.o
mld_sexample_1lev.o: data_input.o amg_sexample_1lev.o: data_input.o
mld_cexample_ml: $(CMOBJS) amg_cexample_ml: $(CMOBJS)
$(FLINK) $(LINKOPT) $(CMOBJS) -o mld_cexample_ml \ $(FLINK) $(LINKOPT) $(CMOBJS) -o amg_cexample_ml \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_cexample_ml $(EXEDIR) /bin/mv amg_cexample_ml $(EXEDIR)
mld_cexample_1lev: $(C1OBJS) amg_cexample_1lev: $(C1OBJS)
$(FLINK) $(LINKOPT) $(C1OBJS) -o mld_cexample_1lev \ $(FLINK) $(LINKOPT) $(C1OBJS) -o amg_cexample_1lev \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_cexample_1lev $(EXEDIR) /bin/mv amg_cexample_1lev $(EXEDIR)
mld_cexample_ml.o: data_input.o amg_cexample_ml.o: data_input.o
mld_cexample_1lev.o: data_input.o amg_cexample_1lev.o: data_input.o
clean: clean:
/bin/rm -f *$(.mod) \ /bin/rm -f *$(.mod) \
$(DMOBJS) $(D1OBJS) $(ZMOBJS) $(Z1OBJS) \ $(DMOBJS) $(D1OBJS) $(ZMOBJS) $(Z1OBJS) \
$(EXEDIR)/mld_dexample_ml $(EXEDIR)/mld_dexample_1lev \ $(EXEDIR)/amg_dexample_ml $(EXEDIR)/amg_dexample_1lev \
$(EXEDIR)/mld_zexample_ml $(EXEDIR)/mld_zexample_1lev \ $(EXEDIR)/amg_zexample_ml $(EXEDIR)/amg_zexample_1lev \
$(SMOBJS) $(S1OBJS) $(CMOBJS) $(C1OBJS) \ $(SMOBJS) $(S1OBJS) $(CMOBJS) $(C1OBJS) \
$(EXEDIR)/mld_sexample_ml $(EXEDIR)/mld_sexample_1lev \ $(EXEDIR)/amg_sexample_ml $(EXEDIR)/amg_sexample_1lev \
$(EXEDIR)/mld_cexample_ml $(EXEDIR)/mld_cexample_1lev $(EXEDIR)/amg_cexample_ml $(EXEDIR)/amg_cexample_1lev
lib: lib:
(cd ../../; make library) (cd ../../; make library)

@ -1,52 +1,52 @@
MLDDIR=../.. AMGDIR=../..
MLDINCDIR=$(MLDDIR)/include AMGINCDIR=$(AMGDIR)/include
include $(MLDINCDIR)/Make.inc.amg4psblas include $(AMGINCDIR)/Make.inc.amg4psblas
MLDMODDIR=$(MLDDIR)/modules AMGMODDIR=$(AMGDIR)/modules
MLDLIBDIR=$(MLDDIR)/lib AMGLIBDIR=$(AMGDIR)/lib
MLD_LIBS=-L$(MLDLIBDIR) -lpsb_krylov -lmld_prec -lpsb_prec AMG_LIBS=-L$(AMGLIBDIR) -lpsb_krylov -lamg_prec -lpsb_prec
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDMODDIR) $(FMFLAG)$(MLDINCDIR) $(PSBLAS_INCLUDES) $(FIFLAG). FINCLUDES=$(FMFLAG). $(FMFLAG)$(AMGMODDIR) $(FMFLAG)$(AMGINCDIR) $(PSBLAS_INCLUDES) $(FIFLAG).
LINKOPT= LINKOPT=
DMOBJS=mld_dexample_ml.o data_input.o mld_dpde_mod.o DMOBJS=amg_dexample_ml.o data_input.o amg_dpde_mod.o
D1OBJS=mld_dexample_1lev.o data_input.o mld_dpde_mod.o D1OBJS=amg_dexample_1lev.o data_input.o amg_dpde_mod.o
SMOBJS=mld_sexample_ml.o data_input.o mld_spde_mod.o SMOBJS=amg_sexample_ml.o data_input.o amg_spde_mod.o
S1OBJS=mld_sexample_1lev.o data_input.o mld_spde_mod.o S1OBJS=amg_sexample_1lev.o data_input.o amg_spde_mod.o
EXEDIR=./runs EXEDIR=./runs
all: mld_sexample_ml mld_sexample_1lev mld_dexample_ml mld_dexample_1lev all: amg_sexample_ml amg_sexample_1lev amg_dexample_ml amg_dexample_1lev
mld_dexample_ml: $(DMOBJS) amg_dexample_ml: $(DMOBJS)
$(FLINK) $(LINKOPT) $(DMOBJS) -o mld_dexample_ml \ $(FLINK) $(LINKOPT) $(DMOBJS) -o amg_dexample_ml \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_dexample_ml $(EXEDIR) /bin/mv amg_dexample_ml $(EXEDIR)
mld_dexample_1lev: $(D1OBJS) amg_dexample_1lev: $(D1OBJS)
$(FLINK) $(LINKOPT) $(D1OBJS) -o mld_dexample_1lev \ $(FLINK) $(LINKOPT) $(D1OBJS) -o amg_dexample_1lev \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_dexample_1lev $(EXEDIR) /bin/mv amg_dexample_1lev $(EXEDIR)
mld_dexample_ml.o: data_input.o mld_dpde_mod.o amg_dexample_ml.o: data_input.o amg_dpde_mod.o
mld_dexample_1lev.o: data_input.o mld_dpde_mod.o amg_dexample_1lev.o: data_input.o amg_dpde_mod.o
mld_sexample_ml: $(SMOBJS) amg_sexample_ml: $(SMOBJS)
$(FLINK) $(LINKOPT) $(SMOBJS) -o mld_sexample_ml \ $(FLINK) $(LINKOPT) $(SMOBJS) -o amg_sexample_ml \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_sexample_ml $(EXEDIR) /bin/mv amg_sexample_ml $(EXEDIR)
mld_sexample_1lev: $(S1OBJS) amg_sexample_1lev: $(S1OBJS)
$(FLINK) $(LINKOPT) $(S1OBJS) -o mld_sexample_1lev \ $(FLINK) $(LINKOPT) $(S1OBJS) -o amg_sexample_1lev \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_sexample_1lev $(EXEDIR) /bin/mv amg_sexample_1lev $(EXEDIR)
mld_sexample_ml.o: data_input.o mld_spde_mod.o amg_sexample_ml.o: data_input.o amg_spde_mod.o
mld_sexample_1lev.o: data_input.o mld_spde_mod.o amg_sexample_1lev.o: data_input.o amg_spde_mod.o
clean: clean:
/bin/rm -f $(DMOBJS) $(D1OBJS) $(SMOBJS) $(S1OBJS) \ /bin/rm -f $(DMOBJS) $(D1OBJS) $(SMOBJS) $(S1OBJS) \
*$(.mod) $(EXEDIR)/mld_dexample_ml $(EXEDIR)/mld_dexample_1lev\ *$(.mod) $(EXEDIR)/amg_dexample_ml $(EXEDIR)/amg_dexample_1lev\
$(EXEDIR)/mld_sexample_ml $(EXEDIR)/mld_sexample_1lev $(EXEDIR)/amg_sexample_ml $(EXEDIR)/amg_sexample_1lev
lib: lib:
(cd ../../; make library) (cd ../../; make library)

@ -116,7 +116,7 @@ contains
! Process grid ! Process grid
integer(psb_ipk_) :: np, iam integer(psb_ipk_) :: np, iam
integer(psb_ipk_) :: icoeff integer(psb_ipk_) :: icoeff
integer(psb_ipk_), allocatable :: irow(:),icol(:),myidx(:) integer(psb_lpk_), allocatable :: irow(:),icol(:),myidx(:)
real(psb_dpk_), allocatable :: val(:) real(psb_dpk_), allocatable :: val(:)
! deltah dimension of each grid cell ! deltah dimension of each grid cell
! deltat discretization time ! deltat discretization time

@ -116,7 +116,7 @@ contains
! Process grid ! Process grid
integer(psb_ipk_) :: np, iam integer(psb_ipk_) :: np, iam
integer(psb_ipk_) :: icoeff integer(psb_ipk_) :: icoeff
integer(psb_ipk_), allocatable :: irow(:),icol(:),myidx(:) integer(psb_lpk_), allocatable :: irow(:),icol(:),myidx(:)
real(psb_spk_), allocatable :: val(:) real(psb_spk_), allocatable :: val(:)
! deltah dimension of each grid cell ! deltah dimension of each grid cell
! deltat discretization time ! deltat discretization time

@ -1,51 +1,51 @@
MLDDIR=../.. AMGDIR=../..
MLDINCDIR=$(MLDDIR)/include AMGINCDIR=$(AMGDIR)/include
include $(MLDINCDIR)/Make.inc.amg4psblas include $(AMGINCDIR)/Make.inc.amg4psblas
MLDMODDIR=$(MLDDIR)/modules AMGMODDIR=$(AMGDIR)/modules
MLDLIBDIR=$(MLDDIR)/lib AMGLIBDIR=$(AMGDIR)/lib
MLD_LIBS=-L$(MLDLIBDIR) -lpsb_krylov -lmld_prec -lpsb_prec AMG_LIBS=-L$(AMGLIBDIR) -lpsb_krylov -lamg_prec -lpsb_prec
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDMODDIR) $(FMFLAG)$(MLDINCDIR) $(PSBLAS_INCLUDES) $(FIFLAG). FINCLUDES=$(FMFLAG). $(FMFLAG)$(AMGMODDIR) $(FMFLAG)$(AMGINCDIR) $(PSBLAS_INCLUDES) $(FIFLAG).
DFSOBJS=mld_df_sample.o data_input.o DFSOBJS=amg_df_sample.o data_input.o
SFSOBJS=mld_sf_sample.o data_input.o SFSOBJS=amg_sf_sample.o data_input.o
CFSOBJS=mld_cf_sample.o data_input.o CFSOBJS=amg_cf_sample.o data_input.o
ZFSOBJS=mld_zf_sample.o data_input.o ZFSOBJS=amg_zf_sample.o data_input.o
LINKOPT= LINKOPT=
EXEDIR=./runs 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) amg_df_sample: $(DFSOBJS)
$(FLINK) $(LINKOPT) $(DFSOBJS) -o mld_df_sample \ $(FLINK) $(LINKOPT) $(DFSOBJS) -o amg_df_sample \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_df_sample $(EXEDIR) /bin/mv amg_df_sample $(EXEDIR)
mld_sf_sample: $(SFSOBJS) amg_sf_sample: $(SFSOBJS)
$(FLINK) $(LINKOPT) $(SFSOBJS) -o mld_sf_sample \ $(FLINK) $(LINKOPT) $(SFSOBJS) -o amg_sf_sample \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_sf_sample $(EXEDIR) /bin/mv amg_sf_sample $(EXEDIR)
mld_cf_sample: $(CFSOBJS) amg_cf_sample: $(CFSOBJS)
$(FLINK) $(LINKOPT) $(CFSOBJS) -o mld_cf_sample \ $(FLINK) $(LINKOPT) $(CFSOBJS) -o amg_cf_sample \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_cf_sample $(EXEDIR) /bin/mv amg_cf_sample $(EXEDIR)
mld_zf_sample: $(ZFSOBJS) amg_zf_sample: $(ZFSOBJS)
$(FLINK) $(LINKOPT) $(ZFSOBJS) -o mld_zf_sample \ $(FLINK) $(LINKOPT) $(ZFSOBJS) -o amg_zf_sample \
$(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) $(AMG_LIBS) $(PSBLAS_LIBS) $(LDLIBS)
/bin/mv mld_zf_sample $(EXEDIR) /bin/mv amg_zf_sample $(EXEDIR)
mld_sf_sample.o: data_input.o amg_sf_sample.o: data_input.o
mld_df_sample.o: data_input.o amg_df_sample.o: data_input.o
mld_cf_sample.o: data_input.o amg_cf_sample.o: data_input.o
mld_zf_sample.o: data_input.o amg_zf_sample.o: data_input.o
clean: clean:
/bin/rm -f $(DFSOBJS) $(ZFSOBJS) $(SFSOBJS) $(CFSOBJS) \ /bin/rm -f $(DFSOBJS) $(ZFSOBJS) $(SFSOBJS) $(CFSOBJS) \
*$(.mod) $(EXEDIR)/mld_sf_sample $(EXEDIR)/mld_cf_sample \ *$(.mod) $(EXEDIR)/amg_sf_sample $(EXEDIR)/amg_cf_sample \
$(EXEDIR)/mld_df_sample $(EXEDIR)/mld_zf_sample $(EXEDIR)/amg_df_sample $(EXEDIR)/amg_zf_sample
lib: lib:
(cd ../../; make library) (cd ../../; make library)

@ -121,7 +121,8 @@ program amg_cf_sample
type(precdata) :: p_choice type(precdata) :: p_choice
! sparse matrices ! sparse matrices
type(psb_cspmat_type) :: a, aux_a type(psb_cspmat_type) :: a
type(psb_lcspmat_type) :: aux_a
! preconditioner data ! preconditioner data
type(amg_cprec_type) :: prec type(amg_cprec_type) :: prec
@ -135,8 +136,8 @@ program amg_cf_sample
type(psb_desc_type):: desc_a type(psb_desc_type):: desc_a
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: iam, np integer(psb_ipk_) :: iam, np
integer(psb_lpk_) :: lnp
! solver paramters ! solver paramters
integer(psb_ipk_) :: iter, ircode, nlv integer(psb_ipk_) :: iter, ircode, nlv
integer(psb_epk_) :: amatsize, precsize, descsize integer(psb_epk_) :: amatsize, precsize, descsize
@ -149,7 +150,7 @@ program amg_cf_sample
! other variables ! other variables
integer(psb_ipk_) :: i, info, j, k, m_problem 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_) :: t1, t2, tprec, thier, tslv
real(psb_spk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2 real(psb_spk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2
integer(psb_ipk_) :: nrhs, nv integer(psb_ipk_) :: nrhs, nv
@ -324,7 +325,11 @@ program amg_cf_sample
if (iam == psb_root_) then if (iam == psb_root_) then
write(psb_out_unit,'("Partition type: graph")') write(psb_out_unit,'("Partition type: graph")')
write(psb_out_unit,'(" ")') 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 endif
call distr_mtpart(psb_root_,ctxt) call distr_mtpart(psb_root_,ctxt)
call getv_mtpart(ivg) call getv_mtpart(ivg)

@ -121,7 +121,8 @@ program amg_df_sample
type(precdata) :: p_choice type(precdata) :: p_choice
! sparse matrices ! sparse matrices
type(psb_dspmat_type) :: a, aux_a type(psb_dspmat_type) :: a
type(psb_ldspmat_type) :: aux_a
! preconditioner data ! preconditioner data
type(amg_dprec_type) :: prec type(amg_dprec_type) :: prec
@ -135,8 +136,8 @@ program amg_df_sample
type(psb_desc_type):: desc_a type(psb_desc_type):: desc_a
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: iam, np integer(psb_ipk_) :: iam, np
integer(psb_lpk_) :: lnp
! solver paramters ! solver paramters
integer(psb_ipk_) :: iter, ircode, nlv integer(psb_ipk_) :: iter, ircode, nlv
integer(psb_epk_) :: amatsize, precsize, descsize integer(psb_epk_) :: amatsize, precsize, descsize
@ -149,7 +150,7 @@ program amg_df_sample
! other variables ! other variables
integer(psb_ipk_) :: i, info, j, k, m_problem 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_) :: t1, t2, tprec, thier, tslv
real(psb_dpk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2 real(psb_dpk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2
integer(psb_ipk_) :: nrhs, nv integer(psb_ipk_) :: nrhs, nv
@ -324,7 +325,11 @@ program amg_df_sample
if (iam == psb_root_) then if (iam == psb_root_) then
write(psb_out_unit,'("Partition type: graph")') write(psb_out_unit,'("Partition type: graph")')
write(psb_out_unit,'(" ")') 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 endif
call distr_mtpart(psb_root_,ctxt) call distr_mtpart(psb_root_,ctxt)
call getv_mtpart(ivg) call getv_mtpart(ivg)

@ -121,7 +121,8 @@ program amg_sf_sample
type(precdata) :: p_choice type(precdata) :: p_choice
! sparse matrices ! sparse matrices
type(psb_sspmat_type) :: a, aux_a type(psb_sspmat_type) :: a
type(psb_lsspmat_type) :: aux_a
! preconditioner data ! preconditioner data
type(amg_sprec_type) :: prec type(amg_sprec_type) :: prec
@ -135,8 +136,8 @@ program amg_sf_sample
type(psb_desc_type):: desc_a type(psb_desc_type):: desc_a
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: iam, np integer(psb_ipk_) :: iam, np
integer(psb_lpk_) :: lnp
! solver paramters ! solver paramters
integer(psb_ipk_) :: iter, ircode, nlv integer(psb_ipk_) :: iter, ircode, nlv
integer(psb_epk_) :: amatsize, precsize, descsize integer(psb_epk_) :: amatsize, precsize, descsize
@ -149,7 +150,7 @@ program amg_sf_sample
! other variables ! other variables
integer(psb_ipk_) :: i, info, j, k, m_problem 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_) :: t1, t2, tprec, thier, tslv
real(psb_spk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2 real(psb_spk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2
integer(psb_ipk_) :: nrhs, nv integer(psb_ipk_) :: nrhs, nv
@ -324,7 +325,11 @@ program amg_sf_sample
if (iam == psb_root_) then if (iam == psb_root_) then
write(psb_out_unit,'("Partition type: graph")') write(psb_out_unit,'("Partition type: graph")')
write(psb_out_unit,'(" ")') 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 endif
call distr_mtpart(psb_root_,ctxt) call distr_mtpart(psb_root_,ctxt)
call getv_mtpart(ivg) call getv_mtpart(ivg)

@ -121,7 +121,8 @@ program amg_zf_sample
type(precdata) :: p_choice type(precdata) :: p_choice
! sparse matrices ! sparse matrices
type(psb_zspmat_type) :: a, aux_a type(psb_zspmat_type) :: a
type(psb_lzspmat_type) :: aux_a
! preconditioner data ! preconditioner data
type(amg_zprec_type) :: prec type(amg_zprec_type) :: prec
@ -135,8 +136,8 @@ program amg_zf_sample
type(psb_desc_type):: desc_a type(psb_desc_type):: desc_a
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: iam, np integer(psb_ipk_) :: iam, np
integer(psb_lpk_) :: lnp
! solver paramters ! solver paramters
integer(psb_ipk_) :: iter, ircode, nlv integer(psb_ipk_) :: iter, ircode, nlv
integer(psb_epk_) :: amatsize, precsize, descsize integer(psb_epk_) :: amatsize, precsize, descsize
@ -149,7 +150,7 @@ program amg_zf_sample
! other variables ! other variables
integer(psb_ipk_) :: i, info, j, k, m_problem 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_) :: t1, t2, tprec, thier, tslv
real(psb_dpk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2 real(psb_dpk_) :: resmx, resmxp, xdiffn2, xdiffni, xni, xn2
integer(psb_ipk_) :: nrhs, nv integer(psb_ipk_) :: nrhs, nv
@ -324,7 +325,11 @@ program amg_zf_sample
if (iam == psb_root_) then if (iam == psb_root_) then
write(psb_out_unit,'("Partition type: graph")') write(psb_out_unit,'("Partition type: graph")')
write(psb_out_unit,'(" ")') 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 endif
call distr_mtpart(psb_root_,ctxt) call distr_mtpart(psb_root_,ctxt)
call getv_mtpart(ivg) call getv_mtpart(ivg)

@ -1,4 +1,4 @@
AMGDIR=../../.. AMGDIR=../..
AMGINCDIR=$(AMGDIR)/include AMGINCDIR=$(AMGDIR)/include
include $(AMGINCDIR)/Make.inc.amg4psblas include $(AMGINCDIR)/Make.inc.amg4psblas
AMGMODDIR=$(AMGDIR)/modules AMGMODDIR=$(AMGDIR)/modules

@ -9,7 +9,7 @@ CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS F
30 ! IRST (restart for RGMRES and BiCGSTABL) 30 ! IRST (restart for RGMRES and BiCGSTABL)
1.d-6 ! EPS 1.d-6 ! EPS
%%%%%%%%%%% Main preconditioner choices %%%%%%%%%%%%%%%% %%%%%%%%%%% 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 ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
%%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%% %%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%%
BJAC ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-level, repeats previous. 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 HALO ! AS restriction operator: NONE HALO
NONE ! AS prolongation operator: NONE SUM AVG NONE ! AS prolongation operator: NONE SUM AVG
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF 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) 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) 1.d-4 ! Threshold T for ILU(T,P)
%%%%%%%%%%% Second smoother, always ignored for non-ML %%%%%%%%%%%%%%%% %%%%%%%%%%% Second smoother, always ignored for non-ML %%%%%%%%%%%%%%%%
NONE ! Second (post) smoother, ignored if NONE NONE ! Second (post) smoother, ignored if NONE
@ -27,7 +29,9 @@ NONE ! Second (post) smoother, ignored if NONE
HALO ! AS restriction operator: NONE HALO HALO ! AS restriction operator: NONE HALO
NONE ! AS prolongation operator: NONE SUM AVG NONE ! AS prolongation operator: NONE SUM AVG
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF 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) 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) 1.d-4 ! Threshold T for ILU(T,P)
%%%%%%%%%%% Multilevel parameters %%%%%%%%%%%%%%%% %%%%%%%%%%% Multilevel parameters %%%%%%%%%%%%%%%%
VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MULT ADD VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MULT ADD

@ -8,6 +8,7 @@ BICGSTAB ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS F
1 ! ITRACE 1 ! ITRACE
30 ! IRST (restart for RGMRES and BiCGSTABL) 30 ! IRST (restart for RGMRES and BiCGSTABL)
1.d-6 ! EPS 1.d-6 ! EPS
%%%%%%%%%%% Main preconditioner choices %%%%%%%%%%%%%%%%
ML-VCYCLE-BJAC-R-UMF ! Longer descriptive name for preconditioner (up to 20 chars) ML-VCYCLE-BJAC-R-UMF ! Longer descriptive name for preconditioner (up to 20 chars)
ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
%%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%% %%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%%

Loading…
Cancel
Save