From c420d65d9e98563223e9efe5f9068831805b83aa Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 12 Jul 2007 12:35:59 +0000 Subject: [PATCH] Applied changes from Daniela & c. Switched to MLD_ for everything. Wrote thin PSB_PREC shell around MLD_, using renaming. The implementation may change when PR 32364 in Gnu Fortran gets fixed. --- Makefile | 13 +- mld_daggrmap_bld.f90 | 2 +- mld_daggrmat_asb.F90 | 8 +- mld_dasmat_bld.f90 | 2 +- mld_dbaseprec_aply.f90 | 4 +- mld_dbaseprec_bld.f90 | 16 +- mld_dbjac_aply.f90 | 4 +- mld_dbjac_bld.f90 | 4 +- mld_ddiagsc_bld.f90 | 4 +- mld_dilu_bld.f90 | 4 +- mld_dmlprec_aply.f90 | 4 +- mld_dmlprec_bld.f90 | 22 +- mld_dprec_aply.f90 | 12 +- psb_dprecbld.f90 => mld_dprecbld.f90 | 12 +- psb_dprecfree.f90 => mld_dprecfree.f90 | 12 +- psb_dprecinit.f90 => mld_dprecinit.f90 | 10 +- psb_dprecset.f90 => mld_dprecset.f90 | 16 +- mld_dslu_bld.f90 | 4 +- mld_dslud_bld.f90 | 4 +- mld_dsp_renum.f90 | 4 +- mld_dumf_bld.f90 | 4 +- mld_prec_mod.f90 | 534 +++++++++++++++++++++++++ psb_prec_type.f90 => mld_prec_type.f90 | 180 ++++----- mld_zaggrmap_bld.f90 | 2 +- mld_zaggrmat_asb.F90 | 8 +- mld_zasmat_bld.f90 | 2 +- mld_zbaseprec_aply.f90 | 4 +- mld_zbaseprec_bld.f90 | 16 +- mld_zbjac_aply.f90 | 4 +- mld_zbjac_bld.f90 | 4 +- mld_zdiagsc_bld.f90 | 4 +- mld_zilu_bld.f90 | 4 +- mld_zmlprec_aply.f90 | 4 +- mld_zmlprec_bld.f90 | 22 +- mld_zprec_aply.f90 | 10 +- psb_zprecbld.f90 => mld_zprecbld.f90 | 12 +- psb_zprecfree.f90 => mld_zprecfree.f90 | 12 +- psb_zprecinit.f90 => mld_zprecinit.f90 | 10 +- psb_zprecset.f90 => mld_zprecset.f90 | 16 +- mld_zslu_bld.f90 | 4 +- mld_zslud_bld.f90 | 4 +- mld_zsp_renum.f90 | 4 +- mld_zumf_bld.f90 | 4 +- psb_prec_mod.f90 | 507 ++--------------------- 44 files changed, 813 insertions(+), 723 deletions(-) rename psb_dprecbld.f90 => mld_dprecbld.f90 (95%) rename psb_dprecfree.f90 => mld_dprecfree.f90 (91%) rename psb_dprecinit.f90 => mld_dprecinit.f90 (97%) rename psb_dprecset.f90 => mld_dprecset.f90 (95%) create mode 100644 mld_prec_mod.f90 rename psb_prec_type.f90 => mld_prec_type.f90 (90%) rename psb_zprecbld.f90 => mld_zprecbld.f90 (95%) rename psb_zprecfree.f90 => mld_zprecfree.f90 (91%) rename psb_zprecinit.f90 => mld_zprecinit.f90 (97%) rename psb_zprecset.f90 => mld_zprecset.f90 (95%) diff --git a/Makefile b/Makefile index b0cb3cbe..0355b4fe 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PSBLASDIR=../psblas2 +PSBLASDIR=../psblas2-dev include $(PSBLASDIR)/Make.inc @@ -7,18 +7,18 @@ HERE=. FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG). -MODOBJS=psb_prec_type.o psb_prec_mod.o +MODOBJS=mld_prec_type.o mld_prec_mod.o psb_prec_mod.o MPFOBJS=mld_daggrmat_asb.o mld_zaggrmat_asb.o MPCOBJS=mld_slud_impl.o mld_zslud_impl.o F90OBJS=mld_dasmat_bld.o mld_dslu_bld.o mld_dumf_bld.o mld_dilu_fct.o\ mld_dmlprec_bld.o mld_dsp_renum.o mld_dbjac_bld.o mld_dilu_bld.o \ - psb_dprecbld.o psb_dprecfree.o psb_dprecset.o psb_dprecinit.o\ + mld_dprecbld.o mld_dprecfree.o mld_dprecset.o mld_dprecinit.o\ mld_dbaseprec_bld.o mld_ddiagsc_bld.o mld_daggrmap_bld.o \ mld_dprec_aply.o mld_dmlprec_aply.o mld_dslud_bld.o\ mld_dbaseprec_aply.o mld_dbjac_aply.o\ mld_zasmat_bld.o mld_zslu_bld.o mld_zumf_bld.o mld_zilu_fct.o\ mld_zmlprec_bld.o mld_zsp_renum.o mld_zbjac_bld.o mld_zilu_bld.o \ - psb_zprecbld.o psb_zprecfree.o psb_zprecset.o psb_zprecinit.o \ + mld_zprecbld.o mld_zprecfree.o mld_zprecset.o mld_zprecinit.o \ mld_zbaseprec_bld.o mld_zdiagsc_bld.o mld_zaggrmap_bld.o \ mld_zprec_aply.o mld_zmlprec_aply.o mld_zslud_bld.o\ mld_zbaseprec_aply.o mld_zbjac_aply.o\ @@ -27,7 +27,7 @@ COBJS=mld_slu_impl.o mld_umf_impl.o mld_zslu_impl.o mld_zumf_impl.o OBJS=$(F90OBJS) $(COBJS) $(MPFOBJS) $(MPCOBJS) $(MODOBJS) LIBMOD=psb_prec_mod$(.mod) -LOCAL_MODS=$(LIBMOD) psb_prec_type$(.mod) +LOCAL_MODS=$(LIBMOD) mld_prec_type$(.mod) mld_prec_mod$(.mod) LIBNAME=$(PRECLIBNAME) lib: mpobjs $(OBJS) @@ -37,7 +37,8 @@ lib: mpobjs $(OBJS) /bin/cp -p $(LIBMOD) $(LOCAL_MODS) $(LIBDIR) $(F90OBJS) $(MPFOBJS): $(MODOBJS) -psb_prec_mod.o: psb_prec_type.o +psb_prec_mod.o: mld_prec_mod.o +mld_prec_mod.o: mld_prec_type.o mpobjs: (make $(MPFOBJS) F90="$(MPF90)" F90COPT="$(F90COPT)") diff --git a/mld_daggrmap_bld.f90 b/mld_daggrmap_bld.f90 index 105fb6ee..f9ee8346 100644 --- a/mld_daggrmap_bld.f90 +++ b/mld_daggrmap_bld.f90 @@ -36,7 +36,7 @@ !!$ subroutine mld_daggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_daggrmap_bld + use mld_prec_mod, mld_protect_name => mld_daggrmap_bld implicit none integer, intent(in) :: aggr_type diff --git a/mld_daggrmat_asb.F90 b/mld_daggrmat_asb.F90 index 4589e0b5..000cb6e0 100644 --- a/mld_daggrmat_asb.F90 +++ b/mld_daggrmat_asb.F90 @@ -36,12 +36,12 @@ !!$ subroutine mld_daggrmat_asb(a,desc_a,ac,desc_ac,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_daggrmat_asb + use mld_prec_mod, mld_protect_name => mld_daggrmat_asb implicit none type(psb_dspmat_type), intent(in), target :: a - type(psb_dbaseprc_type), intent(inout), target :: p + type(mld_dbaseprc_type), intent(inout), target :: p type(psb_dspmat_type), intent(inout), target :: ac type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(inout) :: desc_ac @@ -103,7 +103,7 @@ contains subroutine raw_aggregate(info) use psb_base_mod - use psb_prec_type + use mld_prec_type #ifdef MPI_MOD use mpi #endif @@ -302,7 +302,7 @@ contains subroutine smooth_aggregate(info) use psb_base_mod - use psb_prec_type + use mld_prec_type #ifdef MPI_MOD use mpi #endif diff --git a/mld_dasmat_bld.f90 b/mld_dasmat_bld.f90 index daef38f2..ea6846cc 100644 --- a/mld_dasmat_bld.f90 +++ b/mld_dasmat_bld.f90 @@ -54,7 +54,7 @@ Subroutine mld_dasmat_bld(ptype,novr,a,blk,desc_data,upd,desc_p,info,outfmt) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dasmat_bld + use mld_prec_mod, mld_protect_name => mld_dasmat_bld Implicit None ! .. Array Arguments .. diff --git a/mld_dbaseprec_aply.f90 b/mld_dbaseprec_aply.f90 index 2dd17eee..48074e4c 100644 --- a/mld_dbaseprec_aply.f90 +++ b/mld_dbaseprec_aply.f90 @@ -41,12 +41,12 @@ subroutine mld_dbaseprec_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) ! use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dbaseprec_aply + use mld_prec_mod, mld_protect_name => mld_dbaseprec_aply implicit none type(psb_desc_type),intent(in) :: desc_data - type(psb_dbaseprc_type), intent(in) :: prec + type(mld_dbaseprc_type), intent(in) :: prec real(kind(0.d0)),intent(inout) :: x(:), y(:) real(kind(0.d0)),intent(in) :: alpha,beta character(len=1) :: trans diff --git a/mld_dbaseprec_bld.f90 b/mld_dbaseprec_bld.f90 index 7ae636da..b7188121 100644 --- a/mld_dbaseprec_bld.f90 +++ b/mld_dbaseprec_bld.f90 @@ -37,13 +37,13 @@ subroutine mld_dbaseprc_bld(a,desc_a,p,info,upd) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dbaseprc_bld + use mld_prec_mod, mld_protect_name => mld_dbaseprc_bld Implicit None type(psb_dspmat_type), target :: a type(psb_desc_type), intent(in), target :: desc_a - type(psb_dbaseprc_type),intent(inout) :: p + type(mld_dbaseprc_type),intent(inout) :: p integer, intent(out) :: info character, intent(in), optional :: upd @@ -91,7 +91,7 @@ subroutine mld_dbaseprc_bld(a,desc_a,p,info,upd) ! Should add check to ensure all procs have the same... ! - call psb_check_def(p%iprcparm(prec_type_),'base_prec',& + call mld_check_def(p%iprcparm(prec_type_),'base_prec',& & diag_,is_legal_base_prec) @@ -121,15 +121,15 @@ subroutine mld_dbaseprc_bld(a,desc_a,p,info,upd) case(bjac_,as_) - call psb_check_def(p%iprcparm(n_ovr_),'overlap',& + call mld_check_def(p%iprcparm(n_ovr_),'overlap',& & 0,is_legal_n_ovr) - call psb_check_def(p%iprcparm(sub_restr_),'restriction',& + call mld_check_def(p%iprcparm(sub_restr_),'restriction',& & psb_halo_,is_legal_restrict) - call psb_check_def(p%iprcparm(sub_prol_),'prolongator',& + call mld_check_def(p%iprcparm(sub_prol_),'prolongator',& & psb_none_,is_legal_prolong) - call psb_check_def(p%iprcparm(sub_ren_),'renumbering',& + call mld_check_def(p%iprcparm(sub_ren_),'renumbering',& & renum_none_,is_legal_renum) - call psb_check_def(p%iprcparm(sub_solve_),'fact',& + call mld_check_def(p%iprcparm(sub_solve_),'fact',& & ilu_n_,is_legal_ml_fact) if (p%iprcparm(sub_solve_)==sludist_) then diff --git a/mld_dbjac_aply.f90 b/mld_dbjac_aply.f90 index 10406934..4179d455 100644 --- a/mld_dbjac_aply.f90 +++ b/mld_dbjac_aply.f90 @@ -43,12 +43,12 @@ subroutine mld_dbjac_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) ! use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dbjac_aply + use mld_prec_mod, mld_protect_name => mld_dbjac_aply implicit none type(psb_desc_type), intent(in) :: desc_data - type(psb_dbaseprc_type), intent(in) :: prec + type(mld_dbaseprc_type), intent(in) :: prec real(kind(0.d0)),intent(inout) :: x(:), y(:) real(kind(0.d0)),intent(in) :: alpha,beta character(len=1) :: trans diff --git a/mld_dbjac_bld.f90 b/mld_dbjac_bld.f90 index cf34b9c9..a79c3688 100644 --- a/mld_dbjac_bld.f90 +++ b/mld_dbjac_bld.f90 @@ -51,14 +51,14 @@ !***************************************************************************** subroutine mld_dbjac_bld(a,desc_a,p,upd,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dbjac_bld + use mld_prec_mod, mld_protect_name => mld_dbjac_bld implicit none ! ! .. Scalar Arguments .. integer, intent(out) :: info ! .. array Arguments .. type(psb_dspmat_type), intent(in), target :: a - type(psb_dbaseprc_type), intent(inout) :: p + type(mld_dbaseprc_type), intent(inout) :: p type(psb_desc_type), intent(in) :: desc_a character, intent(in) :: upd diff --git a/mld_ddiagsc_bld.f90 b/mld_ddiagsc_bld.f90 index 5ae6c5c9..73e6df0a 100644 --- a/mld_ddiagsc_bld.f90 +++ b/mld_ddiagsc_bld.f90 @@ -36,12 +36,12 @@ !!$ subroutine mld_ddiag_bld(a,desc_a,p,upd,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_ddiag_bld + use mld_prec_mod, mld_protect_name => mld_ddiag_bld Implicit None type(psb_dspmat_type), target :: a type(psb_desc_type), intent(in) :: desc_a - type(psb_dbaseprc_type),intent(inout) :: p + type(mld_dbaseprc_type),intent(inout) :: p character, intent(in) :: upd integer, intent(out) :: info diff --git a/mld_dilu_bld.f90 b/mld_dilu_bld.f90 index 7427bf48..37afddbe 100644 --- a/mld_dilu_bld.f90 +++ b/mld_dilu_bld.f90 @@ -51,7 +51,7 @@ !***************************************************************************** subroutine mld_dilu_bld(a,desc_a,p,upd,info,blck) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dilu_bld + use mld_prec_mod, mld_protect_name => mld_dilu_bld implicit none ! @@ -59,7 +59,7 @@ subroutine mld_dilu_bld(a,desc_a,p,upd,info,blck) integer, intent(out) :: info ! .. array Arguments .. type(psb_dspmat_type), intent(in), target :: a - type(psb_dbaseprc_type), intent(inout) :: p + type(mld_dbaseprc_type), intent(inout) :: p type(psb_desc_type), intent(in) :: desc_a character, intent(in) :: upd type(psb_dspmat_type), intent(in), optional :: blck diff --git a/mld_dmlprec_aply.f90 b/mld_dmlprec_aply.f90 index 729ad91c..91845494 100644 --- a/mld_dmlprec_aply.f90 +++ b/mld_dmlprec_aply.f90 @@ -84,11 +84,11 @@ subroutine mld_dmlprec_aply(alpha,baseprecv,x,beta,y,desc_data,trans,work,info) ! use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dmlprec_aply + use mld_prec_mod, mld_protect_name => mld_dmlprec_aply implicit none type(psb_desc_type),intent(in) :: desc_data - type(psb_dbaseprc_type), intent(in) :: baseprecv(:) + type(mld_dbaseprc_type), intent(in) :: baseprecv(:) real(kind(0.d0)),intent(in) :: alpha,beta real(kind(0.d0)),intent(inout) :: x(:), y(:) character :: trans diff --git a/mld_dmlprec_bld.f90 b/mld_dmlprec_bld.f90 index aed38bb7..7670587e 100644 --- a/mld_dmlprec_bld.f90 +++ b/mld_dmlprec_bld.f90 @@ -37,12 +37,12 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dmlprec_bld + use mld_prec_mod, mld_protect_name => mld_dmlprec_bld implicit none type(psb_dspmat_type), intent(in), target :: a type(psb_desc_type), intent(in), target :: desc_a - type(psb_dbaseprc_type), intent(inout),target :: p + type(mld_dbaseprc_type), intent(inout),target :: p integer, intent(out) :: info type(psb_desc_type) :: desc_ac @@ -67,27 +67,27 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info) call psb_errpush(info,name) goto 9999 endif - call psb_check_def(p%iprcparm(ml_type_),'Multilevel type',& + call mld_check_def(p%iprcparm(ml_type_),'Multilevel type',& & mult_ml,is_legal_ml_type) - call psb_check_def(p%iprcparm(aggr_alg_),'aggregation',& + call mld_check_def(p%iprcparm(aggr_alg_),'aggregation',& & dec_aggr_,is_legal_ml_aggr_kind) - call psb_check_def(p%iprcparm(aggr_kind_),'Smoother kind',& + call mld_check_def(p%iprcparm(aggr_kind_),'Smoother kind',& & tent_prol,is_legal_ml_smth_kind) - call psb_check_def(p%iprcparm(coarse_mat_),'Coarse matrix',& + call mld_check_def(p%iprcparm(coarse_mat_),'Coarse matrix',& & distr_mat_,is_legal_ml_coarse_mat) - call psb_check_def(p%iprcparm(smooth_pos_),'smooth_pos',& + call mld_check_def(p%iprcparm(smooth_pos_),'smooth_pos',& & pre_smooth_,is_legal_ml_smooth_pos) !!$ nullify(p%desc_data) select case(p%iprcparm(sub_solve_)) case(ilu_n_) - call psb_check_def(p%iprcparm(sub_fill_in_),'Level',0,is_legal_ml_lev) + call mld_check_def(p%iprcparm(sub_fill_in_),'Level',0,is_legal_ml_lev) case(ilu_t_) - call psb_check_def(p%dprcparm(fact_eps_),'Eps',dzero,is_legal_ml_eps) + call mld_check_def(p%dprcparm(fact_eps_),'Eps',dzero,is_legal_ml_eps) end select - call psb_check_def(p%dprcparm(aggr_damp_),'omega',dzero,is_legal_omega) - call psb_check_def(p%iprcparm(smooth_sweeps_),'Jacobi sweeps',& + call mld_check_def(p%dprcparm(aggr_damp_),'omega',dzero,is_legal_omega) + call mld_check_def(p%iprcparm(smooth_sweeps_),'Jacobi sweeps',& & 1,is_legal_jac_sweeps) diff --git a/mld_dprec_aply.f90 b/mld_dprec_aply.f90 index 8ef06ead..05e2a07d 100644 --- a/mld_dprec_aply.f90 +++ b/mld_dprec_aply.f90 @@ -37,12 +37,12 @@ subroutine mld_dprec_aply(prec,x,y,desc_data,info,trans, work) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dprec_aply + use mld_prec_mod, mld_protect_name => mld_dprec_aply implicit none type(psb_desc_type),intent(in) :: desc_data - type(psb_dprec_type), intent(in) :: prec + type(mld_dprec_type), intent(in) :: prec real(kind(0.d0)),intent(inout) :: x(:), y(:) integer, intent(out) :: info character(len=1), optional :: trans @@ -55,7 +55,7 @@ subroutine mld_dprec_aply(prec,x,y,desc_data,info,trans, work) logical,parameter :: debug=.false., debugprt=.false. character(len=20) :: name - name='psb_dprec_aply' + name='mld_dprec_aply' info = 0 call psb_erractionsave(err_act) @@ -155,12 +155,12 @@ end subroutine mld_dprec_aply subroutine mld_dprec_aply1(prec,x,desc_data,info,trans) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dprec_aply1 + use mld_prec_mod, mld_protect_name => mld_dprec_aply1 implicit none type(psb_desc_type),intent(in) :: desc_data - type(psb_dprec_type), intent(in) :: prec + type(mld_dprec_type), intent(in) :: prec real(kind(0.d0)),intent(inout) :: x(:) integer, intent(out) :: info character(len=1), optional :: trans @@ -172,7 +172,7 @@ subroutine mld_dprec_aply1(prec,x,desc_data,info,trans) real(kind(1.d0)), pointer :: WW(:), w1(:) character(len=20) :: name - name='psb_dprec_aply1' + name='mld_dprec_aply1' info = 0 call psb_erractionsave(err_act) diff --git a/psb_dprecbld.f90 b/mld_dprecbld.f90 similarity index 95% rename from psb_dprecbld.f90 rename to mld_dprecbld.f90 index 98aa3223..1fa050ca 100644 --- a/psb_dprecbld.f90 +++ b/mld_dprecbld.f90 @@ -35,15 +35,15 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -subroutine psb_dprecbld(a,desc_a,p,info,upd) +subroutine mld_dprecbld(a,desc_a,p,info,upd) use psb_base_mod - use psb_prec_mod, protect => psb_dprecbld + use mld_prec_mod, protect => mld_dprecbld Implicit None type(psb_dspmat_type), target :: a type(psb_desc_type), intent(in), target :: desc_a - type(psb_dprec_type),intent(inout) :: p + type(mld_dprec_type),intent(inout) :: p integer, intent(out) :: info character, intent(in), optional :: upd @@ -60,7 +60,7 @@ subroutine psb_dprecbld(a,desc_a,p,info,upd) info=0 err=0 call psb_erractionsave(err_act) - name = 'psb_dprecbld' + name = 'mld_dprecbld' if (debug) write(0,*) 'Entering precbld',P%prec,desc_a%matrix_data(:) info = 0 @@ -158,7 +158,7 @@ subroutine psb_dprecbld(a,desc_a,p,info,upd) contains subroutine init_baseprc_av(p,info) - type(psb_dbaseprc_type), intent(inout) :: p + type(mld_dbaseprc_type), intent(inout) :: p integer :: info if (allocated(p%av)) then ! Have not decided what to do yet @@ -171,5 +171,5 @@ contains end subroutine init_baseprc_av -end subroutine psb_dprecbld +end subroutine mld_dprecbld diff --git a/psb_dprecfree.f90 b/mld_dprecfree.f90 similarity index 91% rename from psb_dprecfree.f90 rename to mld_dprecfree.f90 index d8a06b91..050baa9f 100644 --- a/psb_dprecfree.f90 +++ b/mld_dprecfree.f90 @@ -34,12 +34,12 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -subroutine psb_dprecfree(p,info) +subroutine mld_dprecfree(p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => psb_dprecfree + use mld_prec_mod, mld_protect_name => mld_dprecfree implicit none - type(psb_dprec_type), intent(inout) :: p + type(mld_dprec_type), intent(inout) :: p integer, intent(out) :: info !...locals.... @@ -48,14 +48,14 @@ subroutine psb_dprecfree(p,info) if(psb_get_errstatus().ne.0) return info=0 - name = 'psb_dprecfree' + name = 'mld_dprecfree' call psb_erractionsave(err_act) me=-1 if (allocated(p%baseprecv)) then do i=1,size(p%baseprecv) - call psb_base_precfree(p%baseprecv(i),info) + call mld_base_precfree(p%baseprecv(i),info) end do deallocate(p%baseprecv) end if @@ -70,4 +70,4 @@ subroutine psb_dprecfree(p,info) end if return -end subroutine psb_dprecfree +end subroutine mld_dprecfree diff --git a/psb_dprecinit.f90 b/mld_dprecinit.f90 similarity index 97% rename from psb_dprecinit.f90 rename to mld_dprecinit.f90 index 312f94bc..83d61497 100644 --- a/psb_dprecinit.f90 +++ b/mld_dprecinit.f90 @@ -34,13 +34,13 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -subroutine psb_dprecinit(p,ptype,info,nlev) +subroutine mld_dprecinit(p,ptype,info,nlev) use psb_base_mod - use psb_prec_mod, mld_protect_name => psb_dprecinit + use mld_prec_mod, mld_protect_name => mld_dprecinit implicit none - type(psb_dprec_type), intent(inout) :: p + type(mld_dprec_type), intent(inout) :: p character(len=*), intent(in) :: ptype integer, intent(out) :: info integer, optional, intent(in) :: nlev @@ -50,7 +50,7 @@ subroutine psb_dprecinit(p,ptype,info,nlev) info = 0 if (allocated(p%baseprecv)) then - call psb_precfree(p,info) + call mld_precfree(p,info) if (info /=0) then ! Do we want to do something? endif @@ -199,4 +199,4 @@ subroutine psb_dprecinit(p,ptype,info,nlev) end select -end subroutine psb_dprecinit +end subroutine mld_dprecinit diff --git a/psb_dprecset.f90 b/mld_dprecset.f90 similarity index 95% rename from psb_dprecset.f90 rename to mld_dprecset.f90 index 3f5e80b8..5a7eab1f 100644 --- a/psb_dprecset.f90 +++ b/mld_dprecset.f90 @@ -34,13 +34,13 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -subroutine psb_dprecseti(p,what,val,info,ilev) +subroutine mld_dprecseti(p,what,val,info,ilev) use psb_base_mod - use psb_prec_mod, mld_protect_name => psb_dprecseti + use mld_prec_mod, mld_protect_name => mld_dprecseti implicit none - type(psb_dprec_type), intent(inout) :: p + type(mld_dprec_type), intent(inout) :: p integer, intent(in) :: what integer, intent(in) :: val integer, intent(out) :: info @@ -160,14 +160,14 @@ subroutine psb_dprecseti(p,what,val,info,ilev) endif -end subroutine psb_dprecseti -subroutine psb_dprecsetd(p,what,val,info,ilev) +end subroutine mld_dprecseti +subroutine mld_dprecsetd(p,what,val,info,ilev) use psb_base_mod - use psb_prec_mod, mld_protect_name => psb_dprecsetd + use mld_prec_mod, mld_protect_name => mld_dprecsetd implicit none - type(psb_dprec_type), intent(inout) :: p + type(mld_dprec_type), intent(inout) :: p integer, intent(in) :: what real(kind(1.d0)), intent(in) :: val integer, intent(out) :: info @@ -220,4 +220,4 @@ subroutine psb_dprecsetd(p,what,val,info,ilev) end select endif -end subroutine psb_dprecsetd +end subroutine mld_dprecsetd diff --git a/mld_dslu_bld.f90 b/mld_dslu_bld.f90 index 7b138d9c..1f91d44b 100644 --- a/mld_dslu_bld.f90 +++ b/mld_dslu_bld.f90 @@ -36,13 +36,13 @@ !!$ subroutine mld_dslu_bld(a,desc_a,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dslu_bld + use mld_prec_mod, mld_protect_name => mld_dslu_bld implicit none type(psb_dspmat_type), intent(inout) :: a type(psb_desc_type), intent(in) :: desc_a - type(psb_dbaseprc_type), intent(inout) :: p + type(mld_dbaseprc_type), intent(inout) :: p integer, intent(out) :: info integer :: i,j,nza,nzb,nzt,ictxt,me,np,err_act diff --git a/mld_dslud_bld.f90 b/mld_dslud_bld.f90 index 4d48c87e..8bcbcbf3 100644 --- a/mld_dslud_bld.f90 +++ b/mld_dslud_bld.f90 @@ -36,13 +36,13 @@ !!$ subroutine mld_dsludist_bld(a,desc_a,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dsludist_bld + use mld_prec_mod, mld_protect_name => mld_dsludist_bld implicit none type(psb_dspmat_type), intent(inout) :: a type(psb_desc_type), intent(in) :: desc_a - type(psb_dbaseprc_type), intent(inout) :: p + type(mld_dbaseprc_type), intent(inout) :: p integer, intent(out) :: info integer :: i,j,nza,nzb,nzt,ictxt,me,np,err_act,& diff --git a/mld_dsp_renum.f90 b/mld_dsp_renum.f90 index b29bd346..ee1d9eba 100644 --- a/mld_dsp_renum.f90 +++ b/mld_dsp_renum.f90 @@ -36,14 +36,14 @@ !!$ subroutine mld_dsp_renum(a,desc_a,blck,p,atmp,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dsp_renum + use mld_prec_mod, mld_protect_name => mld_dsp_renum implicit none ! .. array Arguments .. type(psb_dspmat_type), intent(in) :: a,blck type(psb_dspmat_type), intent(inout) :: atmp - type(psb_dbaseprc_type), intent(inout) :: p + type(mld_dbaseprc_type), intent(inout) :: p type(psb_desc_type), intent(in) :: desc_a integer, intent(out) :: info diff --git a/mld_dumf_bld.f90 b/mld_dumf_bld.f90 index 7dd0559d..9cfbf696 100644 --- a/mld_dumf_bld.f90 +++ b/mld_dumf_bld.f90 @@ -36,13 +36,13 @@ !!$ subroutine mld_dumf_bld(a,desc_a,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_dumf_bld + use mld_prec_mod, mld_protect_name => mld_dumf_bld implicit none type(psb_dspmat_type), intent(inout) :: a type(psb_desc_type), intent(in) :: desc_a - type(psb_dbaseprc_type), intent(inout) :: p + type(mld_dbaseprc_type), intent(inout) :: p integer, intent(out) :: info diff --git a/mld_prec_mod.f90 b/mld_prec_mod.f90 new file mode 100644 index 00000000..3c8d38e3 --- /dev/null +++ b/mld_prec_mod.f90 @@ -0,0 +1,534 @@ +!!$ +!!$ +!!$ MD2P4 +!!$ Multilevel Domain Decomposition Parallel Preconditioner Package for PSBLAS +!!$ for +!!$ Parallel Sparse BLAS v2.0 +!!$ (C) Copyright 2006 Salvatore Filippone University of Rome Tor Vergata +!!$ Alfredo Buttari University of Rome Tor Vergata +!!$ Daniela di Serafino Second University of Naples +!!$ Pasqua D'Ambra ICAR-CNR +!!$ +!!$ 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 MD2P4 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 MD2P4 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 mld_prec_mod + use mld_prec_type + + + interface mld_precbld + subroutine mld_dprecbld(a,desc_a,prec,info,upd) + use psb_base_mod + use mld_prec_type + implicit none + type(psb_dspmat_type), intent(in), target :: a + type(psb_desc_type), intent(in), target :: desc_a + type(mld_dprec_type), intent(inout) :: prec + integer, intent(out) :: info + character, intent(in),optional :: upd + end subroutine mld_dprecbld + subroutine mld_zprecbld(a,desc_a,prec,info,upd) + use psb_base_mod + use mld_prec_type + implicit none + type(psb_zspmat_type), intent(in), target :: a + type(psb_desc_type), intent(in), target :: desc_a + type(mld_zprec_type), intent(inout) :: prec + integer, intent(out) :: info + character, intent(in),optional :: upd + end subroutine mld_zprecbld + end interface + + interface mld_precinit + subroutine mld_dprecinit(p,ptype,info,nlev) + + use psb_base_mod + use mld_prec_type + type(mld_dprec_type), intent(inout) :: p + character(len=*), intent(in) :: ptype + integer, intent(out) :: info + integer, optional, intent(in) :: nlev + end subroutine mld_dprecinit + subroutine mld_zprecinit(p,ptype,info,nlev) + + use psb_base_mod + use mld_prec_type + type(mld_zprec_type), intent(inout) :: p + character(len=*), intent(in) :: ptype + integer, intent(out) :: info + integer, optional, intent(in) :: nlev + end subroutine mld_zprecinit + end interface + + interface mld_precset + subroutine mld_dprecseti(p,what,val,info,ilev) + use psb_base_mod + use mld_prec_type + type(mld_dprec_type), intent(inout) :: p + integer, intent(in) :: what + integer, intent(in) :: val + integer, intent(out) :: info + integer, optional, intent(in) :: ilev + end subroutine mld_dprecseti + subroutine mld_dprecsetd(p,what,val,info,ilev) + use psb_base_mod + use mld_prec_type + type(mld_dprec_type), intent(inout) :: p + integer, intent(in) :: what + real(kind(1.d0)), intent(in) :: val + integer, intent(out) :: info + integer, optional, intent(in) :: ilev + end subroutine mld_dprecsetd + subroutine mld_zprecseti(p,what,val,info,ilev) + use psb_base_mod + use mld_prec_type + type(mld_zprec_type), intent(inout) :: p + integer, intent(in) :: what + integer, intent(in) :: val + integer, intent(out) :: info + integer, optional, intent(in) :: ilev + end subroutine mld_zprecseti + subroutine mld_zprecsetd(p,what,val,info,ilev) + use psb_base_mod + use mld_prec_type + type(mld_zprec_type), intent(inout) :: p + integer, intent(in) :: what + real(kind(1.d0)), intent(in) :: val + integer, intent(out) :: info + integer, optional, intent(in) :: ilev + end subroutine mld_zprecsetd + end interface + + + interface mld_precfree + subroutine mld_dprecfree(p,info) + use psb_base_mod + use mld_prec_type + type(mld_dprec_type), intent(inout) :: p + integer, intent(out) :: info + end subroutine mld_dprecfree + subroutine mld_zprecfree(p,info) + use psb_base_mod + use mld_prec_type + type(mld_zprec_type), intent(inout) :: p + integer, intent(out) :: info + end subroutine mld_zprecfree + end interface + + interface mld_precaply + subroutine mld_dprec_aply(prec,x,y,desc_data,info,trans,work) + use psb_base_mod + use mld_prec_type + type(psb_desc_type),intent(in) :: desc_data + type(mld_dprec_type), intent(in) :: prec + real(kind(0.d0)),intent(inout) :: x(:), y(:) + integer, intent(out) :: info + character(len=1), optional :: trans + real(kind(0.d0)),intent(inout), optional, target :: work(:) + end subroutine mld_dprec_aply + subroutine mld_dprec_aply1(prec,x,desc_data,info,trans) + use psb_base_mod + use mld_prec_type + type(psb_desc_type),intent(in) :: desc_data + type(mld_dprec_type), intent(in) :: prec + real(kind(0.d0)),intent(inout) :: x(:) + integer, intent(out) :: info + character(len=1), optional :: trans + end subroutine mld_dprec_aply1 + subroutine mld_zprec_aply(prec,x,y,desc_data,info,trans,work) + use psb_base_mod + use mld_prec_type + type(psb_desc_type),intent(in) :: desc_data + type(mld_zprec_type), intent(in) :: prec + complex(kind(0.d0)),intent(inout) :: x(:), y(:) + integer, intent(out) :: info + character(len=1), optional :: trans + complex(kind(0.d0)),intent(inout), optional, target :: work(:) + end subroutine mld_zprec_aply + subroutine mld_zprec_aply1(prec,x,desc_data,info,trans) + use psb_base_mod + use mld_prec_type + type(psb_desc_type),intent(in) :: desc_data + type(mld_zprec_type), intent(in) :: prec + complex(kind(0.d0)),intent(inout) :: x(:) + integer, intent(out) :: info + character(len=1), optional :: trans + end subroutine mld_zprec_aply1 + end interface + + interface mld_baseprc_bld + subroutine mld_dbaseprc_bld(a,desc_a,p,info,upd) + use psb_base_mod + use mld_prec_type + type(psb_dspmat_type), target :: a + type(psb_desc_type), intent(in), target :: desc_a + type(mld_dbaseprc_type),intent(inout) :: p + integer, intent(out) :: info + character, intent(in), optional :: upd + end subroutine mld_dbaseprc_bld + subroutine mld_zbaseprc_bld(a,desc_a,p,info,upd) + use psb_base_mod + use mld_prec_type + type(psb_zspmat_type), target :: a + type(psb_desc_type), intent(in), target :: desc_a + type(mld_zbaseprc_type),intent(inout) :: p + integer, intent(out) :: info + character, intent(in), optional :: upd + end subroutine mld_zbaseprc_bld + end interface + + interface mld_mlprec_bld + subroutine mld_dmlprec_bld(a,desc_a,p,info) + use psb_base_mod + use mld_prec_type + type(psb_dspmat_type), intent(inout), target :: a + type(psb_desc_type), intent(in), target :: desc_a + type(mld_dbaseprc_type), intent(inout), target :: p + integer, intent(out) :: info + end subroutine mld_dmlprec_bld + subroutine mld_zmlprec_bld(a,desc_a,p,info) + use psb_base_mod + use mld_prec_type + type(psb_zspmat_type), intent(inout), target :: a + type(psb_desc_type), intent(in), target :: desc_a + type(mld_zbaseprc_type), intent(inout),target :: p + integer, intent(out) :: info + end subroutine mld_zmlprec_bld + end interface + + + interface mld_baseprec_aply + subroutine mld_dbaseprec_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) + use psb_base_mod + use mld_prec_type + type(psb_desc_type),intent(in) :: desc_data + type(mld_dbaseprc_type), intent(in) :: prec + real(kind(0.d0)),intent(inout) :: x(:), y(:) + real(kind(0.d0)),intent(in) :: alpha,beta + character(len=1) :: trans + real(kind(0.d0)),target :: work(:) + integer, intent(out) :: info + end subroutine mld_dbaseprec_aply + + subroutine mld_zbaseprec_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) + use psb_base_mod + use mld_prec_type + type(psb_desc_type),intent(in) :: desc_data + type(mld_zbaseprc_type), intent(in) :: prec + complex(kind(1.d0)),intent(inout) :: x(:), y(:) + complex(kind(1.d0)),intent(in) :: alpha,beta + character(len=1) :: trans + complex(kind(1.d0)),target :: work(:) + integer, intent(out) :: info + end subroutine mld_zbaseprec_aply + end interface + + interface mld_mlprec_aply + subroutine mld_dmlprec_aply(alpha,baseprecv,x,beta,y,desc_data,trans,work,info) + use psb_base_mod + use mld_prec_type + type(psb_desc_type),intent(in) :: desc_data + type(mld_dbaseprc_type), intent(in) :: baseprecv(:) + real(kind(0.d0)),intent(in) :: alpha,beta + real(kind(0.d0)),intent(inout) :: x(:), y(:) + character :: trans + real(kind(0.d0)),target :: work(:) + integer, intent(out) :: info + end subroutine mld_dmlprec_aply + subroutine mld_zmlprec_aply(alpha,baseprecv,x,beta,y,desc_data,trans,work,info) + use psb_base_mod + use mld_prec_type + type(psb_desc_type),intent(in) :: desc_data + type(mld_zbaseprc_type), intent(in) :: baseprecv(:) + complex(kind(0.d0)),intent(in) :: alpha,beta + complex(kind(0.d0)),intent(inout) :: x(:), y(:) + character :: trans + complex(kind(0.d0)),target :: work(:) + integer, intent(out) :: info + end subroutine mld_zmlprec_aply + end interface + + interface mld_bjac_aply + subroutine mld_dbjac_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) + use psb_base_mod + use mld_prec_type + type(psb_desc_type), intent(in) :: desc_data + type(mld_dbaseprc_type), intent(in) :: prec + real(kind(0.d0)),intent(inout) :: x(:), y(:) + real(kind(0.d0)),intent(in) :: alpha,beta + character(len=1) :: trans + real(kind(0.d0)),target :: work(:) + integer, intent(out) :: info + end subroutine mld_dbjac_aply + subroutine mld_zbjac_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) + use psb_base_mod + use mld_prec_type + type(psb_desc_type), intent(in) :: desc_data + type(mld_zbaseprc_type), intent(in) :: prec + complex(kind(0.d0)),intent(inout) :: x(:), y(:) + complex(kind(0.d0)),intent(in) :: alpha,beta + character(len=1) :: trans + complex(kind(0.d0)),target :: work(:) + integer, intent(out) :: info + end subroutine mld_zbjac_aply + end interface + + + interface mld_diag_bld + subroutine mld_ddiag_bld(a,desc_data,p,upd,info) + use psb_base_mod + use mld_prec_type + integer, intent(out) :: info + type(psb_dspmat_type), intent(in), target :: a + type(psb_desc_type),intent(in) :: desc_data + type(mld_dbaseprc_type), intent(inout) :: p + character, intent(in) :: upd + end subroutine mld_ddiag_bld + subroutine mld_zdiag_bld(a,desc_data,p,upd,info) + use psb_base_mod + use mld_prec_type + integer, intent(out) :: info + type(psb_zspmat_type), intent(in), target :: a + type(psb_desc_type),intent(in) :: desc_data + type(mld_zbaseprc_type), intent(inout) :: p + character, intent(in) :: upd + end subroutine mld_zdiag_bld + end interface + + interface mld_bjac_bld + subroutine mld_dbjac_bld(a,desc_data,p,upd,info) + use psb_base_mod + use mld_prec_type + integer, intent(out) :: info + type(psb_dspmat_type), intent(in), target :: a + type(psb_desc_type),intent(in) :: desc_data + type(mld_dbaseprc_type), intent(inout) :: p + character, intent(in) :: upd + end subroutine mld_dbjac_bld + subroutine mld_zbjac_bld(a,desc_data,p,upd,info) + use psb_base_mod + use mld_prec_type + integer, intent(out) :: info + type(psb_zspmat_type), intent(in), target :: a + type(psb_desc_type),intent(in) :: desc_data + type(mld_zbaseprc_type), intent(inout) :: p + character, intent(in) :: upd + end subroutine mld_zbjac_bld + end interface + + interface mld_ilu_bld + subroutine mld_dilu_bld(a,desc_data,p,upd,info,blck) + use psb_base_mod + use mld_prec_type + integer, intent(out) :: info + type(psb_dspmat_type), intent(in), target :: a + type(psb_desc_type),intent(in) :: desc_data + type(mld_dbaseprc_type), intent(inout) :: p + character, intent(in) :: upd + type(psb_dspmat_type), intent(in), optional :: blck + end subroutine mld_dilu_bld + subroutine mld_zilu_bld(a,desc_data,p,upd,info,blck) + use psb_base_mod + use mld_prec_type + integer, intent(out) :: info + type(psb_zspmat_type), intent(in), target :: a + type(psb_desc_type),intent(in) :: desc_data + type(mld_zbaseprc_type), intent(inout) :: p + character, intent(in) :: upd + type(psb_zspmat_type), intent(in), optional :: blck + end subroutine mld_zilu_bld + end interface + + interface mld_sludist_bld + subroutine mld_dsludist_bld(a,desc_a,p,info) + use psb_base_mod + use mld_prec_type + type(psb_dspmat_type), intent(inout) :: a + type(psb_desc_type), intent(in) :: desc_a + type(mld_dbaseprc_type), intent(inout) :: p + integer, intent(out) :: info + end subroutine mld_dsludist_bld + subroutine mld_zsludist_bld(a,desc_a,p,info) + use psb_base_mod + use mld_prec_type + type(psb_zspmat_type), intent(inout) :: a + type(psb_desc_type), intent(in) :: desc_a + type(mld_zbaseprc_type), intent(inout) :: p + integer, intent(out) :: info + end subroutine mld_zsludist_bld + end interface + + interface mld_slu_bld + subroutine mld_dslu_bld(a,desc_a,p,info) + use psb_base_mod + use mld_prec_type + type(psb_dspmat_type), intent(inout) :: a + type(psb_desc_type), intent(in) :: desc_a + type(mld_dbaseprc_type), intent(inout) :: p + integer, intent(out) :: info + end subroutine mld_dslu_bld + subroutine mld_zslu_bld(a,desc_a,p,info) + use psb_base_mod + use mld_prec_type + type(psb_zspmat_type), intent(inout) :: a + type(psb_desc_type), intent(in) :: desc_a + type(mld_zbaseprc_type), intent(inout) :: p + integer, intent(out) :: info + end subroutine mld_zslu_bld + end interface + + interface mld_umf_bld + subroutine mld_dumf_bld(a,desc_a,p,info) + use psb_base_mod + use mld_prec_type + type(psb_dspmat_type), intent(inout) :: a + type(psb_desc_type), intent(in) :: desc_a + type(mld_dbaseprc_type), intent(inout) :: p + integer, intent(out) :: info + end subroutine mld_dumf_bld + subroutine mld_zumf_bld(a,desc_a,p,info) + use psb_base_mod + use mld_prec_type + type(psb_zspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(mld_zbaseprc_type), intent(inout) :: p + integer, intent(out) :: info + end subroutine mld_zumf_bld + end interface + + + interface mld_ilu_fct + subroutine mld_dilu_fct(a,l,u,d,info,blck) + use psb_base_mod + integer, intent(out) :: info + type(psb_dspmat_type),intent(in) :: a + type(psb_dspmat_type),intent(inout) :: l,u + type(psb_dspmat_type),intent(in), optional, target :: blck + real(kind(1.d0)), intent(inout) :: d(:) + end subroutine mld_dilu_fct + subroutine mld_zilu_fct(a,l,u,d,info,blck) + use psb_base_mod + integer, intent(out) :: info + type(psb_zspmat_type),intent(in) :: a + type(psb_zspmat_type),intent(inout) :: l,u + type(psb_zspmat_type),intent(in), optional, target :: blck + complex(kind(1.d0)), intent(inout) :: d(:) + end subroutine mld_zilu_fct + end interface + + interface mld_asmat_bld + Subroutine mld_dasmat_bld(ptype,novr,a,blk,desc_data,upd,desc_p,info,outfmt) + use psb_base_mod + use mld_prec_type + integer, intent(in) :: ptype,novr + Type(psb_dspmat_type), Intent(in) :: a + Type(psb_dspmat_type), Intent(inout) :: blk + Type(psb_desc_type), Intent(inout) :: desc_p + Type(psb_desc_type), Intent(in) :: desc_data + Character, Intent(in) :: upd + integer, intent(out) :: info + character(len=5), optional :: outfmt + end Subroutine mld_dasmat_bld + Subroutine mld_zasmat_bld(ptype,novr,a,blk,desc_data,upd,desc_p,info,outfmt) + use psb_base_mod + use mld_prec_type + integer, intent(in) :: ptype,novr + Type(psb_zspmat_type), Intent(in) :: a + Type(psb_zspmat_type), Intent(inout) :: blk + Type(psb_desc_type), Intent(inout) :: desc_p + Type(psb_desc_type), Intent(in) :: desc_data + Character, Intent(in) :: upd + integer, intent(out) :: info + character(len=5), optional :: outfmt + end Subroutine mld_zasmat_bld + end interface + + interface mld_sp_renum + subroutine mld_dsp_renum(a,desc_a,blck,p,atmp,info) + use psb_base_mod + use mld_prec_type + type(psb_dspmat_type), intent(in) :: a,blck + type(psb_dspmat_type), intent(inout) :: atmp + type(mld_dbaseprc_type), intent(inout) :: p + type(psb_desc_type), intent(in) :: desc_a + integer, intent(out) :: info + end subroutine mld_dsp_renum + subroutine mld_zsp_renum(a,desc_a,blck,p,atmp,info) + use psb_base_mod + use mld_prec_type + type(psb_zspmat_type), intent(in) :: a,blck + type(psb_zspmat_type), intent(inout) :: atmp + type(mld_zbaseprc_type), intent(inout) :: p + type(psb_desc_type), intent(in) :: desc_a + integer, intent(out) :: info + end subroutine mld_zsp_renum + end interface + + + interface mld_aggrmap_bld + subroutine mld_daggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info) + use psb_base_mod + use mld_prec_type + integer, intent(in) :: aggr_type + type(psb_dspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + integer, allocatable :: ilaggr(:),nlaggr(:) + integer, intent(out) :: info + end subroutine mld_daggrmap_bld + subroutine mld_zaggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info) + use psb_base_mod + use mld_prec_type + integer, intent(in) :: aggr_type + type(psb_zspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + integer, allocatable :: ilaggr(:),nlaggr(:) + integer, intent(out) :: info + end subroutine mld_zaggrmap_bld + end interface + + interface mld_aggrmat_asb + subroutine mld_daggrmat_asb(a,desc_a,ac,desc_ac,p,info) + use psb_base_mod + use mld_prec_type + type(psb_dspmat_type), intent(in), target :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_dspmat_type), intent(inout),target :: ac + type(psb_desc_type), intent(inout) :: desc_ac + type(mld_dbaseprc_type), intent(inout), target :: p + integer, intent(out) :: info + end subroutine mld_daggrmat_asb + subroutine mld_zaggrmat_asb(a,desc_a,ac,desc_ac,p,info) + use psb_base_mod + use mld_prec_type + type(psb_zspmat_type), intent(in), target :: a + type(mld_zbaseprc_type), intent(inout),target :: p + type(psb_zspmat_type), intent(inout),target :: ac + type(psb_desc_type), intent(in) :: desc_a + type(psb_desc_type), intent(inout) :: desc_ac + integer, intent(out) :: info + end subroutine mld_zaggrmat_asb + end interface + +end module mld_prec_mod diff --git a/psb_prec_type.f90 b/mld_prec_type.f90 similarity index 90% rename from psb_prec_type.f90 rename to mld_prec_type.f90 index 4257324c..6a69de47 100644 --- a/psb_prec_type.f90 +++ b/mld_prec_type.f90 @@ -33,7 +33,7 @@ !!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE !!$ POSSIBILITY OF SUCH DAMAGE. !!$ -module psb_prec_type +module mld_prec_type !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Module to define PREC_DATA, !! !! structure for preconditioning. !! @@ -87,7 +87,7 @@ module psb_prec_type ! 6. baseprecv(ilev)%nlaggr Number of aggregates on the various procs. ! - type psb_dbaseprc_type + type mld_dbaseprc_type type(psb_dspmat_type), allocatable :: av(:) real(kind(1.d0)), allocatable :: d(:) @@ -100,16 +100,16 @@ module psb_prec_type type(psb_desc_type), pointer :: base_desc => null() real(kind(1.d0)), allocatable :: dorig(:) - end type psb_dbaseprc_type + end type mld_dbaseprc_type - type psb_dprec_type - type(psb_dbaseprc_type), allocatable :: baseprecv(:) + type mld_dprec_type + type(mld_dbaseprc_type), allocatable :: baseprecv(:) ! contain type of preconditioning to be performed integer :: prec, base_prec - end type psb_dprec_type + end type mld_dprec_type - type psb_zbaseprc_type + type mld_zbaseprc_type type(psb_zspmat_type), allocatable :: av(:) complex(kind(1.d0)), allocatable :: d(:) @@ -122,13 +122,13 @@ module psb_prec_type type(psb_desc_type), pointer :: base_desc => null() complex(kind(1.d0)), allocatable :: dorig(:) - end type psb_zbaseprc_type + end type mld_zbaseprc_type - type psb_zprec_type - type(psb_zbaseprc_type), allocatable :: baseprecv(:) + type mld_zprec_type + type(mld_zbaseprc_type), allocatable :: baseprecv(:) ! contain type of preconditioning to be performed integer :: prec, base_prec - end type psb_zprec_type + end type mld_zprec_type ! Entries in iprcparm @@ -220,66 +220,66 @@ module psb_prec_type & 'ILU(T) ','Sparse SuperLU','UMFPACK Sp. LU',& & 'SuperLU_Dist '/) - interface psb_base_precfree - module procedure psb_dbase_precfree, psb_zbase_precfree + interface mld_base_precfree + module procedure mld_dbase_precfree, mld_zbase_precfree end interface - interface psb_nullify_baseprec - module procedure psb_nullify_dbaseprec, psb_nullify_zbaseprec + interface mld_nullify_baseprec + module procedure mld_nullify_dbaseprec, mld_nullify_zbaseprec end interface - interface psb_check_def - module procedure psb_icheck_def, psb_dcheck_def + interface mld_check_def + module procedure mld_icheck_def, mld_dcheck_def end interface - interface psb_prec_descr - module procedure psb_out_prec_descr, psb_file_prec_descr, & - & psb_zout_prec_descr, psb_zfile_prec_descr + interface mld_prec_descr + module procedure mld_out_prec_descr, mld_file_prec_descr, & + & mld_zout_prec_descr, mld_zfile_prec_descr end interface - interface psb_prec_short_descr - module procedure psb_prec_short_descr, psb_zprec_short_descr + interface mld_prec_short_descr + module procedure mld_prec_short_descr, mld_zprec_short_descr end interface - interface psb_sizeof - module procedure psb_dprec_sizeof, psb_zprec_sizeof, & - & psb_dbaseprc_sizeof, psb_zbaseprc_sizeof + interface mld_sizeof + module procedure mld_dprec_sizeof, mld_zprec_sizeof, & + & mld_dbaseprc_sizeof, mld_zbaseprc_sizeof end interface contains - function psb_dprec_sizeof(prec) + function mld_dprec_sizeof(prec) use psb_base_mod - type(psb_dprec_type), intent(in) :: prec - integer :: psb_dprec_sizeof + type(mld_dprec_type), intent(in) :: prec + integer :: mld_dprec_sizeof integer :: val,i val = 8 if (allocated(prec%baseprecv)) then do i=1, size(prec%baseprecv) - val = val + psb_sizeof(prec%baseprecv(i)) + val = val + mld_sizeof(prec%baseprecv(i)) end do end if - psb_dprec_sizeof = val - end function psb_dprec_sizeof + mld_dprec_sizeof = val + end function mld_dprec_sizeof - function psb_zprec_sizeof(prec) + function mld_zprec_sizeof(prec) use psb_base_mod - type(psb_zprec_type), intent(in) :: prec - integer :: psb_zprec_sizeof + type(mld_zprec_type), intent(in) :: prec + integer :: mld_zprec_sizeof integer :: val,i val = 8 if (allocated(prec%baseprecv)) then do i=1, size(prec%baseprecv) - val = val + psb_sizeof(prec%baseprecv(i)) + val = val + mld_sizeof(prec%baseprecv(i)) end do end if - psb_zprec_sizeof = val - end function psb_zprec_sizeof + mld_zprec_sizeof = val + end function mld_zprec_sizeof - function psb_dbaseprc_sizeof(prec) + function mld_dbaseprc_sizeof(prec) use psb_base_mod - type(psb_dbaseprc_type), intent(in) :: prec - integer :: psb_dbaseprc_sizeof + type(mld_dbaseprc_type), intent(in) :: prec + integer :: mld_dbaseprc_sizeof integer :: val,i val = 0 @@ -311,14 +311,14 @@ contains end do end if - psb_dbaseprc_sizeof = val + mld_dbaseprc_sizeof = val - end function psb_dbaseprc_sizeof + end function mld_dbaseprc_sizeof - function psb_zbaseprc_sizeof(prec) + function mld_zbaseprc_sizeof(prec) use psb_base_mod - type(psb_zbaseprc_type), intent(in) :: prec - integer :: psb_zbaseprc_sizeof + type(mld_zbaseprc_type), intent(in) :: prec + integer :: mld_zbaseprc_sizeof integer :: val,i val = 0 @@ -350,28 +350,28 @@ contains end do end if - psb_zbaseprc_sizeof = val + mld_zbaseprc_sizeof = val - end function psb_zbaseprc_sizeof + end function mld_zbaseprc_sizeof - subroutine psb_out_prec_descr(p) + subroutine mld_out_prec_descr(p) use psb_base_mod - type(psb_dprec_type), intent(in) :: p - call psb_file_prec_descr(6,p) - end subroutine psb_out_prec_descr + type(mld_dprec_type), intent(in) :: p + call mld_file_prec_descr(6,p) + end subroutine mld_out_prec_descr - subroutine psb_zout_prec_descr(p) + subroutine mld_zout_prec_descr(p) use psb_base_mod - type(psb_zprec_type), intent(in) :: p - call psb_zfile_prec_descr(6,p) - end subroutine psb_zout_prec_descr + type(mld_zprec_type), intent(in) :: p + call mld_zfile_prec_descr(6,p) + end subroutine mld_zout_prec_descr - subroutine psb_file_prec_descr(iout,p) + subroutine mld_file_prec_descr(iout,p) use psb_base_mod integer, intent(in) :: iout - type(psb_dprec_type), intent(in) :: p + type(mld_dprec_type), intent(in) :: p integer :: ilev write(iout,*) 'Preconditioner description' @@ -446,13 +446,13 @@ contains return endif - end subroutine psb_file_prec_descr + end subroutine mld_file_prec_descr - function psb_prec_short_descr(p) + function mld_prec_short_descr(p) use psb_base_mod - type(psb_dprec_type), intent(in) :: p - character(len=20) :: psb_prec_short_descr - psb_prec_short_descr = ' ' + type(mld_dprec_type), intent(in) :: p + character(len=20) :: mld_prec_short_descr + mld_prec_short_descr = ' ' !!$ write(iout,*) 'Preconditioner description' !!$ if (associated(p%baseprecv)) then !!$ if (size(p%baseprecv)>=1) then @@ -514,13 +514,13 @@ contains !!$ return !!$ endif - end function psb_prec_short_descr + end function mld_prec_short_descr - subroutine psb_zfile_prec_descr(iout,p) + subroutine mld_zfile_prec_descr(iout,p) use psb_base_mod integer, intent(in) :: iout - type(psb_zprec_type), intent(in) :: p + type(mld_zprec_type), intent(in) :: p write(iout,*) 'Preconditioner description' if (allocated(p%baseprecv)) then @@ -590,13 +590,13 @@ contains return endif - end subroutine psb_zfile_prec_descr + end subroutine mld_zfile_prec_descr - function psb_zprec_short_descr(p) + function mld_zprec_short_descr(p) use psb_base_mod - type(psb_zprec_type), intent(in) :: p - character(len=20) :: psb_zprec_short_descr - psb_zprec_short_descr = ' ' + type(mld_zprec_type), intent(in) :: p + character(len=20) :: mld_zprec_short_descr + mld_zprec_short_descr = ' ' !!$ write(iout,*) 'Preconditioner description' !!$ if (associated(p%baseprecv)) then !!$ if (size(p%baseprecv)>=1) then @@ -658,7 +658,7 @@ contains !!$ return !!$ endif - end function psb_zprec_short_descr + end function mld_zprec_short_descr @@ -783,7 +783,7 @@ contains end function is_legal_ml_eps - subroutine psb_icheck_def(ip,name,id,is_legal) + subroutine mld_icheck_def(ip,name,id,is_legal) use psb_base_mod integer, intent(inout) :: ip integer, intent(in) :: id @@ -799,9 +799,9 @@ contains write(0,*) 'Illegal value for ',name,' :',ip, '. defaulting to ',id ip = id end if - end subroutine psb_icheck_def + end subroutine mld_icheck_def - subroutine psb_dcheck_def(ip,name,id,is_legal) + subroutine mld_dcheck_def(ip,name,id,is_legal) use psb_base_mod real(kind(1.d0)), intent(inout) :: ip real(kind(1.d0)), intent(in) :: id @@ -817,12 +817,12 @@ contains write(0,*) 'Illegal value for ',name,' :',ip, '. defaulting to ',id ip = id end if - end subroutine psb_dcheck_def + end subroutine mld_dcheck_def - subroutine psb_dbase_precfree(p,info) + subroutine mld_dbase_precfree(p,info) use psb_base_mod - type(psb_dbaseprc_type), intent(inout) :: p + type(mld_dbaseprc_type), intent(inout) :: p integer, intent(out) :: info integer :: i @@ -893,24 +893,24 @@ contains end if deallocate(p%iprcparm,stat=info) end if - call psb_nullify_baseprec(p) - end subroutine psb_dbase_precfree + call mld_nullify_baseprec(p) + end subroutine mld_dbase_precfree - subroutine psb_nullify_dbaseprec(p) + subroutine mld_nullify_dbaseprec(p) use psb_base_mod - type(psb_dbaseprc_type), intent(inout) :: p + type(mld_dbaseprc_type), intent(inout) :: p nullify(p%base_a) nullify(p%base_desc) !!$ nullify(p%av,p%d,p%iprcparm,p%dprcparm,p%perm,p%invperm,p%mlia,& !!$ & p%nlaggr,p%base_a,p%base_desc,p%dorig,p%desc_data, p%desc_ac) - end subroutine psb_nullify_dbaseprec + end subroutine mld_nullify_dbaseprec - subroutine psb_zbase_precfree(p,info) + subroutine mld_zbase_precfree(p,info) use psb_base_mod - type(psb_zbaseprc_type), intent(inout) :: p + type(mld_zbaseprc_type), intent(inout) :: p integer, intent(out) :: info integer :: i @@ -973,19 +973,19 @@ contains end if deallocate(p%iprcparm,stat=info) end if - call psb_nullify_baseprec(p) - end subroutine psb_zbase_precfree + call mld_nullify_baseprec(p) + end subroutine mld_zbase_precfree - subroutine psb_nullify_zbaseprec(p) + subroutine mld_nullify_zbaseprec(p) use psb_base_mod - type(psb_zbaseprc_type), intent(inout) :: p + type(mld_zbaseprc_type), intent(inout) :: p nullify(p%base_a) nullify(p%base_desc) - end subroutine psb_nullify_zbaseprec + end subroutine mld_nullify_zbaseprec function pr_to_str(iprec) @@ -1007,4 +1007,4 @@ contains end function pr_to_str -end module psb_prec_type +end module mld_prec_type diff --git a/mld_zaggrmap_bld.f90 b/mld_zaggrmap_bld.f90 index db2e79a4..056481cc 100644 --- a/mld_zaggrmap_bld.f90 +++ b/mld_zaggrmap_bld.f90 @@ -36,7 +36,7 @@ !!$ subroutine mld_zaggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zaggrmap_bld + use mld_prec_mod, mld_protect_name => mld_zaggrmap_bld implicit none integer, intent(in) :: aggr_type diff --git a/mld_zaggrmat_asb.F90 b/mld_zaggrmat_asb.F90 index 900d13a3..631397d4 100644 --- a/mld_zaggrmat_asb.F90 +++ b/mld_zaggrmat_asb.F90 @@ -36,12 +36,12 @@ !!$ subroutine mld_zaggrmat_asb(a,desc_a,ac,desc_ac,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zaggrmat_asb + use mld_prec_mod, mld_protect_name => mld_zaggrmat_asb implicit none type(psb_zspmat_type), intent(in), target :: a - type(psb_zbaseprc_type), intent(inout),target :: p + type(mld_zbaseprc_type), intent(inout),target :: p type(psb_zspmat_type), intent(inout), target :: ac type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(inout) :: desc_ac @@ -102,7 +102,7 @@ contains subroutine raw_aggregate(info) use psb_base_mod - use psb_prec_type + use mld_prec_type #ifdef MPI_MOD use mpi #endif @@ -301,7 +301,7 @@ contains subroutine smooth_aggregate(info) use psb_base_mod - use psb_prec_type + use mld_prec_type #ifdef MPI_MOD use mpi #endif diff --git a/mld_zasmat_bld.f90 b/mld_zasmat_bld.f90 index 1897502b..14a0f560 100644 --- a/mld_zasmat_bld.f90 +++ b/mld_zasmat_bld.f90 @@ -54,7 +54,7 @@ Subroutine mld_zasmat_bld(ptype,novr,a,blk,desc_data,upd,desc_p,info,outfmt) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zasmat_bld + use mld_prec_mod, mld_protect_name => mld_zasmat_bld Implicit None diff --git a/mld_zbaseprec_aply.f90 b/mld_zbaseprec_aply.f90 index dcc8d60b..fcb66d60 100644 --- a/mld_zbaseprec_aply.f90 +++ b/mld_zbaseprec_aply.f90 @@ -40,12 +40,12 @@ subroutine mld_zbaseprec_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) ! where K is a a basic preconditioner stored in prec ! use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zbaseprec_aply + use mld_prec_mod, mld_protect_name => mld_zbaseprec_aply implicit none type(psb_desc_type),intent(in) :: desc_data - type(psb_zbaseprc_type), intent(in) :: prec + type(mld_zbaseprc_type), intent(in) :: prec complex(kind(0.d0)),intent(inout) :: x(:), y(:) complex(kind(0.d0)),intent(in) :: alpha,beta character(len=1) :: trans diff --git a/mld_zbaseprec_bld.f90 b/mld_zbaseprec_bld.f90 index 423be6fa..c65a1145 100644 --- a/mld_zbaseprec_bld.f90 +++ b/mld_zbaseprec_bld.f90 @@ -37,13 +37,13 @@ subroutine mld_zbaseprc_bld(a,desc_a,p,info,upd) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zbaseprc_bld + use mld_prec_mod, mld_protect_name => mld_zbaseprc_bld Implicit None type(psb_zspmat_type), target :: a type(psb_desc_type), intent(in), target :: desc_a - type(psb_zbaseprc_type),intent(inout) :: p + type(mld_zbaseprc_type),intent(inout) :: p integer, intent(out) :: info character, intent(in), optional :: upd @@ -91,7 +91,7 @@ subroutine mld_zbaseprc_bld(a,desc_a,p,info,upd) ! Should add check to ensure all procs have the same... ! - call psb_check_def(p%iprcparm(prec_type_),'base_prec',& + call mld_check_def(p%iprcparm(prec_type_),'base_prec',& & diag_,is_legal_base_prec) @@ -121,15 +121,15 @@ subroutine mld_zbaseprc_bld(a,desc_a,p,info,upd) case (bjac_,as_) - call psb_check_def(p%iprcparm(n_ovr_),'overlap',& + call mld_check_def(p%iprcparm(n_ovr_),'overlap',& & 0,is_legal_n_ovr) - call psb_check_def(p%iprcparm(sub_restr_),'restriction',& + call mld_check_def(p%iprcparm(sub_restr_),'restriction',& & psb_halo_,is_legal_restrict) - call psb_check_def(p%iprcparm(sub_prol_),'prolongator',& + call mld_check_def(p%iprcparm(sub_prol_),'prolongator',& & psb_none_,is_legal_prolong) - call psb_check_def(p%iprcparm(sub_ren_),'renumbering',& + call mld_check_def(p%iprcparm(sub_ren_),'renumbering',& & renum_none_,is_legal_renum) - call psb_check_def(p%iprcparm(sub_solve_),'fact',& + call mld_check_def(p%iprcparm(sub_solve_),'fact',& & ilu_n_,is_legal_ml_fact) if (p%iprcparm(sub_solve_)==sludist_) then diff --git a/mld_zbjac_aply.f90 b/mld_zbjac_aply.f90 index 8e318666..09bd72de 100644 --- a/mld_zbjac_aply.f90 +++ b/mld_zbjac_aply.f90 @@ -43,12 +43,12 @@ subroutine mld_zbjac_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) ! use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zbjac_aply + use mld_prec_mod, mld_protect_name => mld_zbjac_aply implicit none type(psb_desc_type), intent(in) :: desc_data - type(psb_zbaseprc_type), intent(in) :: prec + type(mld_zbaseprc_type), intent(in) :: prec complex(kind(0.d0)),intent(inout) :: x(:), y(:) complex(kind(0.d0)),intent(in) :: alpha,beta character(len=1) :: trans diff --git a/mld_zbjac_bld.f90 b/mld_zbjac_bld.f90 index 7fa31069..af6e4637 100644 --- a/mld_zbjac_bld.f90 +++ b/mld_zbjac_bld.f90 @@ -51,7 +51,7 @@ !***************************************************************************** subroutine mld_zbjac_bld(a,desc_a,p,upd,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zbjac_bld + use mld_prec_mod, mld_protect_name => mld_zbjac_bld implicit none ! @@ -59,7 +59,7 @@ subroutine mld_zbjac_bld(a,desc_a,p,upd,info) integer, intent(out) :: info ! .. array Arguments .. type(psb_zspmat_type), intent(in), target :: a - type(psb_zbaseprc_type), intent(inout) :: p + type(mld_zbaseprc_type), intent(inout) :: p type(psb_desc_type), intent(in) :: desc_a character, intent(in) :: upd diff --git a/mld_zdiagsc_bld.f90 b/mld_zdiagsc_bld.f90 index 1a08ee84..ecb5521f 100644 --- a/mld_zdiagsc_bld.f90 +++ b/mld_zdiagsc_bld.f90 @@ -37,13 +37,13 @@ subroutine mld_zdiag_bld(a,desc_a,p,upd,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zdiag_bld + use mld_prec_mod, mld_protect_name => mld_zdiag_bld Implicit None type(psb_zspmat_type), target :: a type(psb_desc_type), intent(in) :: desc_a - type(psb_zbaseprc_type),intent(inout) :: p + type(mld_zbaseprc_type),intent(inout) :: p character, intent(in) :: upd integer, intent(out) :: info diff --git a/mld_zilu_bld.f90 b/mld_zilu_bld.f90 index 29e11e96..afd45347 100644 --- a/mld_zilu_bld.f90 +++ b/mld_zilu_bld.f90 @@ -51,7 +51,7 @@ !***************************************************************************** subroutine mld_zilu_bld(a,desc_a,p,upd,info,blck) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zilu_bld + use mld_prec_mod, mld_protect_name => mld_zilu_bld implicit none ! @@ -59,7 +59,7 @@ subroutine mld_zilu_bld(a,desc_a,p,upd,info,blck) integer, intent(out) :: info ! .. array Arguments .. type(psb_zspmat_type), intent(in), target :: a - type(psb_zbaseprc_type), intent(inout) :: p + type(mld_zbaseprc_type), intent(inout) :: p type(psb_desc_type), intent(in) :: desc_a character, intent(in) :: upd type(psb_zspmat_type), intent(in), optional :: blck diff --git a/mld_zmlprec_aply.f90 b/mld_zmlprec_aply.f90 index 4b71188e..97fa9682 100644 --- a/mld_zmlprec_aply.f90 +++ b/mld_zmlprec_aply.f90 @@ -84,12 +84,12 @@ subroutine mld_zmlprec_aply(alpha,baseprecv,x,beta,y,desc_data,trans,work,info) ! use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zmlprec_aply + use mld_prec_mod, mld_protect_name => mld_zmlprec_aply implicit none type(psb_desc_type),intent(in) :: desc_data - type(psb_zbaseprc_type), intent(in) :: baseprecv(:) + type(mld_zbaseprc_type), intent(in) :: baseprecv(:) complex(kind(1.d0)),intent(in) :: alpha,beta complex(kind(1.d0)),intent(inout) :: x(:), y(:) character :: trans diff --git a/mld_zmlprec_bld.f90 b/mld_zmlprec_bld.f90 index d2d19e08..02d4f889 100644 --- a/mld_zmlprec_bld.f90 +++ b/mld_zmlprec_bld.f90 @@ -37,13 +37,13 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zmlprec_bld + use mld_prec_mod, mld_protect_name => mld_zmlprec_bld implicit none type(psb_zspmat_type), intent(in), target :: a type(psb_desc_type), intent(in), target :: desc_a - type(psb_zbaseprc_type), intent(inout),target :: p + type(mld_zbaseprc_type), intent(inout),target :: p integer, intent(out) :: info type(psb_desc_type) :: desc_ac @@ -68,27 +68,27 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info) call psb_errpush(info,name) goto 9999 endif - call psb_check_def(p%iprcparm(ml_type_),'Multilevel type',& + call mld_check_def(p%iprcparm(ml_type_),'Multilevel type',& & mult_ml,is_legal_ml_type) - call psb_check_def(p%iprcparm(aggr_alg_),'aggregation',& + call mld_check_def(p%iprcparm(aggr_alg_),'aggregation',& & dec_aggr_,is_legal_ml_aggr_kind) - call psb_check_def(p%iprcparm(aggr_kind_),'Smoother kind',& + call mld_check_def(p%iprcparm(aggr_kind_),'Smoother kind',& & tent_prol,is_legal_ml_smth_kind) - call psb_check_def(p%iprcparm(coarse_mat_),'Coarse matrix',& + call mld_check_def(p%iprcparm(coarse_mat_),'Coarse matrix',& & distr_mat_,is_legal_ml_coarse_mat) - call psb_check_def(p%iprcparm(smooth_pos_),'smooth_pos',& + call mld_check_def(p%iprcparm(smooth_pos_),'smooth_pos',& & pre_smooth_,is_legal_ml_smooth_pos) !!$ nullify(p%desc_data) select case(p%iprcparm(sub_solve_)) case(ilu_n_) - call psb_check_def(p%iprcparm(sub_fill_in_),'Level',0,is_legal_ml_lev) + call mld_check_def(p%iprcparm(sub_fill_in_),'Level',0,is_legal_ml_lev) case(ilu_t_) - call psb_check_def(p%dprcparm(fact_eps_),'Eps',dzero,is_legal_ml_eps) + call mld_check_def(p%dprcparm(fact_eps_),'Eps',dzero,is_legal_ml_eps) end select - call psb_check_def(p%dprcparm(aggr_damp_),'omega',dzero,is_legal_omega) - call psb_check_def(p%iprcparm(smooth_sweeps_),'Jacobi sweeps',& + call mld_check_def(p%dprcparm(aggr_damp_),'omega',dzero,is_legal_omega) + call mld_check_def(p%iprcparm(smooth_sweeps_),'Jacobi sweeps',& & 1,is_legal_jac_sweeps) diff --git a/mld_zprec_aply.f90 b/mld_zprec_aply.f90 index eb9052c1..e301bf45 100644 --- a/mld_zprec_aply.f90 +++ b/mld_zprec_aply.f90 @@ -37,12 +37,12 @@ subroutine mld_zprec_aply(prec,x,y,desc_data,info,trans, work) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zprec_aply + use mld_prec_mod, mld_protect_name => mld_zprec_aply implicit none type(psb_desc_type),intent(in) :: desc_data - type(psb_zprec_type), intent(in) :: prec + type(mld_zprec_type), intent(in) :: prec complex(kind(0.d0)),intent(inout) :: x(:), y(:) integer, intent(out) :: info character(len=1), optional :: trans @@ -156,12 +156,12 @@ end subroutine mld_zprec_aply !!$ subroutine mld_zprec_aply1(prec,x,desc_data,info,trans) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zprec_aply1 + use mld_prec_mod, mld_protect_name => mld_zprec_aply1 implicit none type(psb_desc_type),intent(in) :: desc_data - type(psb_zprec_type), intent(in) :: prec + type(mld_zprec_type), intent(in) :: prec complex(kind(0.d0)),intent(inout) :: x(:) integer, intent(out) :: info character(len=1), optional :: trans @@ -172,7 +172,7 @@ subroutine mld_zprec_aply1(prec,x,desc_data,info,trans) integer :: ictxt,np,me,i, isz, err_act, int_err(5) complex(kind(1.d0)), pointer :: WW(:), w1(:) character(len=20) :: name, ch_err - name='psb_zprec_aply1' + name='mld_zprec_aply1' info = 0 call psb_erractionsave(err_act) diff --git a/psb_zprecbld.f90 b/mld_zprecbld.f90 similarity index 95% rename from psb_zprecbld.f90 rename to mld_zprecbld.f90 index a0339d2b..9a7831ba 100644 --- a/psb_zprecbld.f90 +++ b/mld_zprecbld.f90 @@ -34,15 +34,15 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -subroutine psb_zprecbld(a,desc_a,p,info,upd) +subroutine mld_zprecbld(a,desc_a,p,info,upd) use psb_base_mod - use psb_prec_mod, mld_protect_name => psb_zprecbld + use mld_prec_mod, mld_protect_name => mld_zprecbld Implicit None type(psb_zspmat_type), target :: a type(psb_desc_type), intent(in), target :: desc_a - type(psb_zprec_type),intent(inout) :: p + type(mld_zprec_type),intent(inout) :: p integer, intent(out) :: info character, intent(in), optional :: upd @@ -60,7 +60,7 @@ subroutine psb_zprecbld(a,desc_a,p,info,upd) info=0 err=0 call psb_erractionsave(err_act) - name = 'psb_zprecbld' + name = 'mld_zprecbld' if (debug) write(0,*) 'Entering precbld',P%prec,desc_a%matrix_data(:) info = 0 @@ -152,7 +152,7 @@ subroutine psb_zprecbld(a,desc_a,p,info,upd) contains subroutine init_baseprc_av(p,info) - type(psb_zbaseprc_type), intent(inout) :: p + type(mld_zbaseprc_type), intent(inout) :: p integer :: info if (allocated(p%av)) then ! Have not decided what to do yet @@ -164,5 +164,5 @@ contains end do end subroutine init_baseprc_av -end subroutine psb_zprecbld +end subroutine mld_zprecbld diff --git a/psb_zprecfree.f90 b/mld_zprecfree.f90 similarity index 91% rename from psb_zprecfree.f90 rename to mld_zprecfree.f90 index 84997aa9..577aab67 100644 --- a/psb_zprecfree.f90 +++ b/mld_zprecfree.f90 @@ -34,14 +34,14 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -subroutine psb_zprecfree(p,info) +subroutine mld_zprecfree(p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => psb_zprecfree + use mld_prec_mod, mld_protect_name => mld_zprecfree implicit none !....parameters... - type(psb_zprec_type), intent(inout) :: p + type(mld_zprec_type), intent(inout) :: p integer, intent(out) :: info !...locals.... @@ -50,14 +50,14 @@ subroutine psb_zprecfree(p,info) if(psb_get_errstatus().ne.0) return info=0 - name = 'psb_zprecfree' + name = 'mld_zprecfree' call psb_erractionsave(err_act) me=-1 if (allocated(p%baseprecv)) then do i=1,size(p%baseprecv) - call psb_base_precfree(p%baseprecv(i),info) + call mld_base_precfree(p%baseprecv(i),info) end do deallocate(p%baseprecv) end if @@ -72,4 +72,4 @@ subroutine psb_zprecfree(p,info) end if return -end subroutine psb_zprecfree +end subroutine mld_zprecfree diff --git a/psb_zprecinit.f90 b/mld_zprecinit.f90 similarity index 97% rename from psb_zprecinit.f90 rename to mld_zprecinit.f90 index 3ab92e6a..7b3f084a 100644 --- a/psb_zprecinit.f90 +++ b/mld_zprecinit.f90 @@ -34,13 +34,13 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -subroutine psb_zprecinit(p,ptype,info,nlev) +subroutine mld_zprecinit(p,ptype,info,nlev) use psb_base_mod - use psb_prec_mod, psb_protect_name => psb_zprecinit + use mld_prec_mod, psb_protect_name => mld_zprecinit implicit none - type(psb_zprec_type), intent(inout) :: p + type(mld_zprec_type), intent(inout) :: p character(len=*), intent(in) :: ptype integer, intent(out) :: info integer, optional, intent(in) :: nlev @@ -50,7 +50,7 @@ subroutine psb_zprecinit(p,ptype,info,nlev) info = 0 if (allocated(p%baseprecv)) then - call psb_precfree(p,info) + call mld_precfree(p,info) if (info /=0) then ! Do we want to do something? endif @@ -194,4 +194,4 @@ subroutine psb_zprecinit(p,ptype,info,nlev) end select -end subroutine psb_zprecinit +end subroutine mld_zprecinit diff --git a/psb_zprecset.f90 b/mld_zprecset.f90 similarity index 95% rename from psb_zprecset.f90 rename to mld_zprecset.f90 index 329e70f2..39199ae0 100644 --- a/psb_zprecset.f90 +++ b/mld_zprecset.f90 @@ -34,14 +34,14 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -subroutine psb_zprecseti(p,what,val,info,ilev) +subroutine mld_zprecseti(p,what,val,info,ilev) use psb_base_mod - use psb_prec_mod, mld_protect_name => psb_zprecseti + use mld_prec_mod, mld_protect_name => mld_zprecseti implicit none - type(psb_zprec_type), intent(inout) :: p + type(mld_zprec_type), intent(inout) :: p integer, intent(in) :: what integer, intent(in) :: val integer, intent(out) :: info @@ -161,14 +161,14 @@ subroutine psb_zprecseti(p,what,val,info,ilev) endif -end subroutine psb_zprecseti -subroutine psb_zprecsetd(p,what,val,info,ilev) +end subroutine mld_zprecseti +subroutine mld_zprecsetd(p,what,val,info,ilev) use psb_base_mod - use psb_prec_mod, mld_protect_name => psb_zprecsetd + use mld_prec_mod, mld_protect_name => mld_zprecsetd implicit none - type(psb_zprec_type), intent(inout) :: p + type(mld_zprec_type), intent(inout) :: p integer, intent(in) :: what real(kind(1.d0)), intent(in) :: val integer, intent(out) :: info @@ -221,4 +221,4 @@ subroutine psb_zprecsetd(p,what,val,info,ilev) end select endif -end subroutine psb_zprecsetd +end subroutine mld_zprecsetd diff --git a/mld_zslu_bld.f90 b/mld_zslu_bld.f90 index 8b9436f1..348d4525 100644 --- a/mld_zslu_bld.f90 +++ b/mld_zslu_bld.f90 @@ -36,13 +36,13 @@ !!$ subroutine mld_zslu_bld(a,desc_a,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zslu_bld + use mld_prec_mod, mld_protect_name => mld_zslu_bld implicit none type(psb_zspmat_type), intent(in) :: a type(psb_desc_type), intent(in) :: desc_a - type(psb_zbaseprc_type), intent(inout) :: p + type(mld_zbaseprc_type), intent(inout) :: p integer, intent(out) :: info integer :: i,j,nza,nzb,nzt,ictxt,me,np,err_act diff --git a/mld_zslud_bld.f90 b/mld_zslud_bld.f90 index cbd3fb4b..d99b9088 100644 --- a/mld_zslud_bld.f90 +++ b/mld_zslud_bld.f90 @@ -36,13 +36,13 @@ !!$ subroutine mld_zsludist_bld(a,desc_a,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zsludist_bld + use mld_prec_mod, mld_protect_name => mld_zsludist_bld implicit none type(psb_zspmat_type), intent(inout) :: a type(psb_desc_type), intent(in) :: desc_a - type(psb_zbaseprc_type), intent(inout) :: p + type(mld_zbaseprc_type), intent(inout) :: p integer, intent(out) :: info integer :: i,j,nza,nzb,nzt,ictxt,me,np,err_act,& diff --git a/mld_zsp_renum.f90 b/mld_zsp_renum.f90 index 10e7ebba..e6540a33 100644 --- a/mld_zsp_renum.f90 +++ b/mld_zsp_renum.f90 @@ -36,14 +36,14 @@ !!$ subroutine mld_zsp_renum(a,desc_a,blck,p,atmp,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zsp_renum + use mld_prec_mod, mld_protect_name => mld_zsp_renum implicit none ! .. array Arguments .. type(psb_zspmat_type), intent(in) :: a,blck type(psb_zspmat_type), intent(inout) :: atmp - type(psb_zbaseprc_type), intent(inout) :: p + type(mld_zbaseprc_type), intent(inout) :: p type(psb_desc_type), intent(in) :: desc_a integer, intent(out) :: info diff --git a/mld_zumf_bld.f90 b/mld_zumf_bld.f90 index 9f06e75e..ff43decb 100644 --- a/mld_zumf_bld.f90 +++ b/mld_zumf_bld.f90 @@ -36,13 +36,13 @@ !!$ subroutine mld_zumf_bld(a,desc_a,p,info) use psb_base_mod - use psb_prec_mod, mld_protect_name => mld_zumf_bld + use mld_prec_mod, mld_protect_name => mld_zumf_bld implicit none type(psb_zspmat_type), intent(inout) :: a type(psb_desc_type), intent(in) :: desc_a - type(psb_zbaseprc_type), intent(inout) :: p + type(mld_zbaseprc_type), intent(inout) :: p integer, intent(out) :: info diff --git a/psb_prec_mod.f90 b/psb_prec_mod.f90 index 49917790..eb8bc2b6 100644 --- a/psb_prec_mod.f90 +++ b/psb_prec_mod.f90 @@ -35,500 +35,55 @@ !!$ !!$ module psb_prec_mod - use psb_prec_type + use mld_prec_type, & + & psb_dbaseprc_type => mld_dbaseprc_type,& + & psb_zbaseprc_type => mld_zbaseprc_type,& + & psb_dprec_type => mld_dprec_type,& + & psb_zprec_type => mld_zprec_type,& + & psb_base_precfree => mld_base_precfree,& + & psb_nullify_baseprec => mld_nullify_baseprec,& + & psb_prec_descr => mld_prec_descr,& + & psb_prec_short_descr => mld_prec_short_descr + + use mld_prec_mod + interface psb_precbld - subroutine psb_dprecbld(a,desc_a,prec,info,upd) - use psb_base_mod - use psb_prec_type - implicit none - type(psb_dspmat_type), intent(in), target :: a - type(psb_desc_type), intent(in), target :: desc_a - type(psb_dprec_type), intent(inout) :: prec - integer, intent(out) :: info - character, intent(in),optional :: upd - end subroutine psb_dprecbld - subroutine psb_zprecbld(a,desc_a,prec,info,upd) - use psb_base_mod - use psb_prec_type - implicit none - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type), intent(in), target :: desc_a - type(psb_zprec_type), intent(inout) :: prec - integer, intent(out) :: info - character, intent(in),optional :: upd - end subroutine psb_zprecbld + module procedure mld_dprecbld, mld_zprecbld end interface interface psb_precinit - subroutine psb_dprecinit(p,ptype,info,nlev) - - use psb_base_mod - use psb_prec_type - type(psb_dprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer, intent(out) :: info - integer, optional, intent(in) :: nlev - end subroutine psb_dprecinit - subroutine psb_zprecinit(p,ptype,info,nlev) - - use psb_base_mod - use psb_prec_type - type(psb_zprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer, intent(out) :: info - integer, optional, intent(in) :: nlev - end subroutine psb_zprecinit + module procedure mld_dprecinit, mld_zprecinit end interface interface psb_precset - subroutine psb_dprecseti(p,what,val,info,ilev) - use psb_base_mod - use psb_prec_type - type(psb_dprec_type), intent(inout) :: p - integer, intent(in) :: what - integer, intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev - end subroutine psb_dprecseti - subroutine psb_dprecsetd(p,what,val,info,ilev) - use psb_base_mod - use psb_prec_type - type(psb_dprec_type), intent(inout) :: p - integer, intent(in) :: what - real(kind(1.d0)), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev - end subroutine psb_dprecsetd - subroutine psb_zprecseti(p,what,val,info,ilev) - use psb_base_mod - use psb_prec_type - type(psb_zprec_type), intent(inout) :: p - integer, intent(in) :: what - integer, intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev - end subroutine psb_zprecseti - subroutine psb_zprecsetd(p,what,val,info,ilev) - use psb_base_mod - use psb_prec_type - type(psb_zprec_type), intent(inout) :: p - integer, intent(in) :: what - real(kind(1.d0)), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev - end subroutine psb_zprecsetd + module procedure mld_dprecseti, mld_dprecsetd,& + & mld_zprecseti, mld_zprecsetd end interface - interface psb_precfree - subroutine psb_dprecfree(p,info) - use psb_base_mod - use psb_prec_type - type(psb_dprec_type), intent(inout) :: p - integer, intent(out) :: info - end subroutine psb_dprecfree - subroutine psb_zprecfree(p,info) - use psb_base_mod - use psb_prec_type - type(psb_zprec_type), intent(inout) :: p - integer, intent(out) :: info - end subroutine psb_zprecfree + module procedure mld_dprecfree, mld_zprecfree end interface interface psb_precaply - subroutine mld_dprec_aply(prec,x,y,desc_data,info,trans,work) - use psb_base_mod - use psb_prec_type - type(psb_desc_type),intent(in) :: desc_data - type(psb_dprec_type), intent(in) :: prec - real(kind(0.d0)),intent(inout) :: x(:), y(:) - integer, intent(out) :: info - character(len=1), optional :: trans - real(kind(0.d0)),intent(inout), optional, target :: work(:) - end subroutine mld_dprec_aply - subroutine mld_dprec_aply1(prec,x,desc_data,info,trans) - use psb_base_mod - use psb_prec_type - type(psb_desc_type),intent(in) :: desc_data - type(psb_dprec_type), intent(in) :: prec - real(kind(0.d0)),intent(inout) :: x(:) - integer, intent(out) :: info - character(len=1), optional :: trans - end subroutine mld_dprec_aply1 - subroutine mld_zprec_aply(prec,x,y,desc_data,info,trans,work) - use psb_base_mod - use psb_prec_type - type(psb_desc_type),intent(in) :: desc_data - type(psb_zprec_type), intent(in) :: prec - complex(kind(0.d0)),intent(inout) :: x(:), y(:) - integer, intent(out) :: info - character(len=1), optional :: trans - complex(kind(0.d0)),intent(inout), optional, target :: work(:) - end subroutine mld_zprec_aply - subroutine mld_zprec_aply1(prec,x,desc_data,info,trans) - use psb_base_mod - use psb_prec_type - type(psb_desc_type),intent(in) :: desc_data - type(psb_zprec_type), intent(in) :: prec - complex(kind(0.d0)),intent(inout) :: x(:) - integer, intent(out) :: info - character(len=1), optional :: trans - end subroutine mld_zprec_aply1 - end interface - - interface mld_baseprc_bld - subroutine mld_dbaseprc_bld(a,desc_a,p,info,upd) - use psb_base_mod - use psb_prec_type - type(psb_dspmat_type), target :: a - type(psb_desc_type), intent(in), target :: desc_a - type(psb_dbaseprc_type),intent(inout) :: p - integer, intent(out) :: info - character, intent(in), optional :: upd - end subroutine mld_dbaseprc_bld - subroutine mld_zbaseprc_bld(a,desc_a,p,info,upd) - use psb_base_mod - use psb_prec_type - type(psb_zspmat_type), target :: a - type(psb_desc_type), intent(in), target :: desc_a - type(psb_zbaseprc_type),intent(inout) :: p - integer, intent(out) :: info - character, intent(in), optional :: upd - end subroutine mld_zbaseprc_bld - end interface - - interface mld_mlprec_bld - subroutine mld_dmlprec_bld(a,desc_a,p,info) - use psb_base_mod - use psb_prec_type - type(psb_dspmat_type), intent(inout), target :: a - type(psb_desc_type), intent(in), target :: desc_a - type(psb_dbaseprc_type), intent(inout), target :: p - integer, intent(out) :: info - end subroutine mld_dmlprec_bld - subroutine mld_zmlprec_bld(a,desc_a,p,info) - use psb_base_mod - use psb_prec_type - type(psb_zspmat_type), intent(inout), target :: a - type(psb_desc_type), intent(in), target :: desc_a - type(psb_zbaseprc_type), intent(inout),target :: p - integer, intent(out) :: info - end subroutine mld_zmlprec_bld - end interface - - - interface mld_baseprec_aply - subroutine mld_dbaseprec_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) - use psb_base_mod - use psb_prec_type - type(psb_desc_type),intent(in) :: desc_data - type(psb_dbaseprc_type), intent(in) :: prec - real(kind(0.d0)),intent(inout) :: x(:), y(:) - real(kind(0.d0)),intent(in) :: alpha,beta - character(len=1) :: trans - real(kind(0.d0)),target :: work(:) - integer, intent(out) :: info - end subroutine mld_dbaseprec_aply - - subroutine mld_zbaseprec_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) - use psb_base_mod - use psb_prec_type - type(psb_desc_type),intent(in) :: desc_data - type(psb_zbaseprc_type), intent(in) :: prec - complex(kind(1.d0)),intent(inout) :: x(:), y(:) - complex(kind(1.d0)),intent(in) :: alpha,beta - character(len=1) :: trans - complex(kind(1.d0)),target :: work(:) - integer, intent(out) :: info - end subroutine mld_zbaseprec_aply - end interface - - interface mld_mlprec_aply - subroutine mld_dmlprec_aply(alpha,baseprecv,x,beta,y,desc_data,trans,work,info) - use psb_base_mod - use psb_prec_type - type(psb_desc_type),intent(in) :: desc_data - type(psb_dbaseprc_type), intent(in) :: baseprecv(:) - real(kind(0.d0)),intent(in) :: alpha,beta - real(kind(0.d0)),intent(inout) :: x(:), y(:) - character :: trans - real(kind(0.d0)),target :: work(:) - integer, intent(out) :: info - end subroutine mld_dmlprec_aply - subroutine mld_zmlprec_aply(alpha,baseprecv,x,beta,y,desc_data,trans,work,info) - use psb_base_mod - use psb_prec_type - type(psb_desc_type),intent(in) :: desc_data - type(psb_zbaseprc_type), intent(in) :: baseprecv(:) - complex(kind(0.d0)),intent(in) :: alpha,beta - complex(kind(0.d0)),intent(inout) :: x(:), y(:) - character :: trans - complex(kind(0.d0)),target :: work(:) - integer, intent(out) :: info - end subroutine mld_zmlprec_aply - end interface - - interface mld_bjac_aply - subroutine mld_dbjac_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) - use psb_base_mod - use psb_prec_type - type(psb_desc_type), intent(in) :: desc_data - type(psb_dbaseprc_type), intent(in) :: prec - real(kind(0.d0)),intent(inout) :: x(:), y(:) - real(kind(0.d0)),intent(in) :: alpha,beta - character(len=1) :: trans - real(kind(0.d0)),target :: work(:) - integer, intent(out) :: info - end subroutine mld_dbjac_aply - subroutine mld_zbjac_aply(alpha,prec,x,beta,y,desc_data,trans,work,info) - use psb_base_mod - use psb_prec_type - type(psb_desc_type), intent(in) :: desc_data - type(psb_zbaseprc_type), intent(in) :: prec - complex(kind(0.d0)),intent(inout) :: x(:), y(:) - complex(kind(0.d0)),intent(in) :: alpha,beta - character(len=1) :: trans - complex(kind(0.d0)),target :: work(:) - integer, intent(out) :: info - end subroutine mld_zbjac_aply - end interface - - - interface mld_diag_bld - subroutine mld_ddiag_bld(a,desc_data,p,upd,info) - use psb_base_mod - use psb_prec_type - integer, intent(out) :: info - type(psb_dspmat_type), intent(in), target :: a - type(psb_desc_type),intent(in) :: desc_data - type(psb_dbaseprc_type), intent(inout) :: p - character, intent(in) :: upd - end subroutine mld_ddiag_bld - subroutine mld_zdiag_bld(a,desc_data,p,upd,info) - use psb_base_mod - use psb_prec_type - integer, intent(out) :: info - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type),intent(in) :: desc_data - type(psb_zbaseprc_type), intent(inout) :: p - character, intent(in) :: upd - end subroutine mld_zdiag_bld - end interface - - interface mld_bjac_bld - subroutine mld_dbjac_bld(a,desc_data,p,upd,info) - use psb_base_mod - use psb_prec_type - integer, intent(out) :: info - type(psb_dspmat_type), intent(in), target :: a - type(psb_desc_type),intent(in) :: desc_data - type(psb_dbaseprc_type), intent(inout) :: p - character, intent(in) :: upd - end subroutine mld_dbjac_bld - subroutine mld_zbjac_bld(a,desc_data,p,upd,info) - use psb_base_mod - use psb_prec_type - integer, intent(out) :: info - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type),intent(in) :: desc_data - type(psb_zbaseprc_type), intent(inout) :: p - character, intent(in) :: upd - end subroutine mld_zbjac_bld - end interface - - interface mld_ilu_bld - subroutine mld_dilu_bld(a,desc_data,p,upd,info,blck) - use psb_base_mod - use psb_prec_type - integer, intent(out) :: info - type(psb_dspmat_type), intent(in), target :: a - type(psb_desc_type),intent(in) :: desc_data - type(psb_dbaseprc_type), intent(inout) :: p - character, intent(in) :: upd - type(psb_dspmat_type), intent(in), optional :: blck - end subroutine mld_dilu_bld - subroutine mld_zilu_bld(a,desc_data,p,upd,info,blck) - use psb_base_mod - use psb_prec_type - integer, intent(out) :: info - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type),intent(in) :: desc_data - type(psb_zbaseprc_type), intent(inout) :: p - character, intent(in) :: upd - type(psb_zspmat_type), intent(in), optional :: blck - end subroutine mld_zilu_bld - end interface - - interface mld_sludist_bld - subroutine mld_dsludist_bld(a,desc_a,p,info) - use psb_base_mod - use psb_prec_type - type(psb_dspmat_type), intent(inout) :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_dbaseprc_type), intent(inout) :: p - integer, intent(out) :: info - end subroutine mld_dsludist_bld - subroutine mld_zsludist_bld(a,desc_a,p,info) - use psb_base_mod - use psb_prec_type - type(psb_zspmat_type), intent(inout) :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_zbaseprc_type), intent(inout) :: p - integer, intent(out) :: info - end subroutine mld_zsludist_bld - end interface - - interface mld_slu_bld - subroutine mld_dslu_bld(a,desc_a,p,info) - use psb_base_mod - use psb_prec_type - type(psb_dspmat_type), intent(inout) :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_dbaseprc_type), intent(inout) :: p - integer, intent(out) :: info - end subroutine mld_dslu_bld - subroutine mld_zslu_bld(a,desc_a,p,info) - use psb_base_mod - use psb_prec_type - type(psb_zspmat_type), intent(inout) :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_zbaseprc_type), intent(inout) :: p - integer, intent(out) :: info - end subroutine mld_zslu_bld - end interface - - interface mld_umf_bld - subroutine mld_dumf_bld(a,desc_a,p,info) - use psb_base_mod - use psb_prec_type - type(psb_dspmat_type), intent(inout) :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_dbaseprc_type), intent(inout) :: p - integer, intent(out) :: info - end subroutine mld_dumf_bld - subroutine mld_zumf_bld(a,desc_a,p,info) - use psb_base_mod - use psb_prec_type - type(psb_zspmat_type), intent(in) :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_zbaseprc_type), intent(inout) :: p - integer, intent(out) :: info - end subroutine mld_zumf_bld + module procedure mld_dprec_aply, mld_dprec_aply1, & + & mld_zprec_aply, mld_zprec_aply1 end interface - - interface mld_ilu_fct - subroutine mld_dilu_fct(a,l,u,d,info,blck) - use psb_base_mod - integer, intent(out) :: info - type(psb_dspmat_type),intent(in) :: a - type(psb_dspmat_type),intent(inout) :: l,u - type(psb_dspmat_type),intent(in), optional, target :: blck - real(kind(1.d0)), intent(inout) :: d(:) - end subroutine mld_dilu_fct - subroutine mld_zilu_fct(a,l,u,d,info,blck) - use psb_base_mod - integer, intent(out) :: info - type(psb_zspmat_type),intent(in) :: a - type(psb_zspmat_type),intent(inout) :: l,u - type(psb_zspmat_type),intent(in), optional, target :: blck - complex(kind(1.d0)), intent(inout) :: d(:) - end subroutine mld_zilu_fct - end interface - - interface mld_asmat_bld - Subroutine mld_dasmat_bld(ptype,novr,a,blk,desc_data,upd,desc_p,info,outfmt) - use psb_base_mod - use psb_prec_type - integer, intent(in) :: ptype,novr - Type(psb_dspmat_type), Intent(in) :: a - Type(psb_dspmat_type), Intent(inout) :: blk - Type(psb_desc_type), Intent(inout) :: desc_p - Type(psb_desc_type), Intent(in) :: desc_data - Character, Intent(in) :: upd - integer, intent(out) :: info - character(len=5), optional :: outfmt - end Subroutine mld_dasmat_bld - Subroutine mld_zasmat_bld(ptype,novr,a,blk,desc_data,upd,desc_p,info,outfmt) - use psb_base_mod - use psb_prec_type - integer, intent(in) :: ptype,novr - Type(psb_zspmat_type), Intent(in) :: a - Type(psb_zspmat_type), Intent(inout) :: blk - Type(psb_desc_type), Intent(inout) :: desc_p - Type(psb_desc_type), Intent(in) :: desc_data - Character, Intent(in) :: upd - integer, intent(out) :: info - character(len=5), optional :: outfmt - end Subroutine mld_zasmat_bld - end interface - - interface mld_sp_renum - subroutine mld_dsp_renum(a,desc_a,blck,p,atmp,info) - use psb_base_mod - use psb_prec_type - type(psb_dspmat_type), intent(in) :: a,blck - type(psb_dspmat_type), intent(inout) :: atmp - type(psb_dbaseprc_type), intent(inout) :: p - type(psb_desc_type), intent(in) :: desc_a - integer, intent(out) :: info - end subroutine mld_dsp_renum - subroutine mld_zsp_renum(a,desc_a,blck,p,atmp,info) - use psb_base_mod - use psb_prec_type - type(psb_zspmat_type), intent(in) :: a,blck - type(psb_zspmat_type), intent(inout) :: atmp - type(psb_zbaseprc_type), intent(inout) :: p - type(psb_desc_type), intent(in) :: desc_a - integer, intent(out) :: info - end subroutine mld_zsp_renum +!!$ +!!$ use mld_prec_mod, & +!!$ & psb_precbld => mld_precbld, & +!!$ & psb_precinit => mld_precinit, & +!!$ & psb_precset => mld_dprecset, & +!!$ & psb_precfree => mld_precfree, & +!!$ & psb_precaply => mld_precaply +!!$ + + interface psb_sizeof + module procedure mld_dprec_sizeof, mld_zprec_sizeof, & + & mld_dbaseprc_sizeof, mld_zbaseprc_sizeof end interface - interface mld_aggrmap_bld - subroutine mld_daggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info) - use psb_base_mod - use psb_prec_type - integer, intent(in) :: aggr_type - type(psb_dspmat_type), intent(in) :: a - type(psb_desc_type), intent(in) :: desc_a - integer, allocatable :: ilaggr(:),nlaggr(:) - integer, intent(out) :: info - end subroutine mld_daggrmap_bld - subroutine mld_zaggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info) - use psb_base_mod - use psb_prec_type - integer, intent(in) :: aggr_type - type(psb_zspmat_type), intent(in) :: a - type(psb_desc_type), intent(in) :: desc_a - integer, allocatable :: ilaggr(:),nlaggr(:) - integer, intent(out) :: info - end subroutine mld_zaggrmap_bld - end interface - - interface mld_aggrmat_asb - subroutine mld_daggrmat_asb(a,desc_a,ac,desc_ac,p,info) - use psb_base_mod - use psb_prec_type - type(psb_dspmat_type), intent(in), target :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_dspmat_type), intent(inout),target :: ac - type(psb_desc_type), intent(inout) :: desc_ac - type(psb_dbaseprc_type), intent(inout), target :: p - integer, intent(out) :: info - end subroutine mld_daggrmat_asb - subroutine mld_zaggrmat_asb(a,desc_a,ac,desc_ac,p,info) - use psb_base_mod - use psb_prec_type - type(psb_zspmat_type), intent(in), target :: a - type(psb_zbaseprc_type), intent(inout),target :: p - type(psb_zspmat_type), intent(inout),target :: ac - type(psb_desc_type), intent(in) :: desc_a - type(psb_desc_type), intent(inout) :: desc_ac - integer, intent(out) :: info - end subroutine mld_zaggrmat_asb - end interface - end module psb_prec_mod