From 76eaf13fcf3c1bd77f1a5108bb7150c49177c8ef Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 2 Jan 2008 16:05:35 +0000 Subject: [PATCH] Fixed INTENT(OUT) on AC,DESC_AC on AGGRMAT_ASB. Changed subroutine name is_legal_ml_aggr_kind into is_legal_ml_aggr_alg. --- mlprec/mld_daggrmat_asb.f90 | 12 +++--- mlprec/mld_daggrmat_raw_asb.F90 | 8 ++-- mlprec/mld_daggrmat_smth_asb.F90 | 14 +++---- mlprec/mld_dmlprec_bld.f90 | 4 +- mlprec/mld_prec_mod.f90 | 66 ++++++++++++++++---------------- mlprec/mld_prec_type.f90 | 8 ++-- mlprec/mld_zaggrmat_asb.f90 | 14 +++---- mlprec/mld_zaggrmat_raw_asb.F90 | 12 +++--- mlprec/mld_zaggrmat_smth_asb.F90 | 15 +++++--- mlprec/mld_zmlprec_bld.f90 | 4 +- 10 files changed, 78 insertions(+), 79 deletions(-) diff --git a/mlprec/mld_daggrmat_asb.f90 b/mlprec/mld_daggrmat_asb.f90 index 1a6d4d5c..5946dced 100644 --- a/mlprec/mld_daggrmat_asb.f90 +++ b/mlprec/mld_daggrmat_asb.f90 @@ -99,15 +99,15 @@ subroutine mld_daggrmat_asb(a,desc_a,ac,desc_ac,p,info) implicit none ! Arguments - 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_dspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_dspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac type(mld_dbaseprc_type), intent(inout), target :: p - integer, intent(out) :: info + integer, intent(out) :: info ! Local variables - integer ::ictxt,np,me, err_act, icomm + integer :: ictxt,np,me, err_act, icomm character(len=20) :: name name='mld_aggrmat_asb' diff --git a/mlprec/mld_daggrmat_raw_asb.F90 b/mlprec/mld_daggrmat_raw_asb.F90 index 91b90790..fac51070 100644 --- a/mlprec/mld_daggrmat_raw_asb.F90 +++ b/mlprec/mld_daggrmat_raw_asb.F90 @@ -87,10 +87,10 @@ subroutine mld_daggrmat_raw_asb(a,desc_a,ac,desc_ac,p,info) #endif ! Arguments - 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_dspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_dspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac type(mld_dbaseprc_type), intent(inout), target :: p integer, intent(out) :: info diff --git a/mlprec/mld_daggrmat_smth_asb.F90 b/mlprec/mld_daggrmat_smth_asb.F90 index 7631ef23..1764fa88 100644 --- a/mlprec/mld_daggrmat_smth_asb.F90 +++ b/mlprec/mld_daggrmat_smth_asb.F90 @@ -105,12 +105,12 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info) #endif ! Arguments - 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 + type(psb_dspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_dspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac + type(mld_dbaseprc_type), intent(inout), target :: p + integer, intent(out) :: info ! Local variables type(psb_dspmat_type) :: b @@ -244,7 +244,7 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info) call psb_spcnv(am4,info,afmt='csr',dupl=psb_dupl_add_) - if (info==0) call psb_spcnv(a,am3,info,afmt='csr') + if (info==0) call psb_spcnv(a,am3,info,afmt='csr',dupl=psb_dupl_add_) if (info /= 0) then call psb_errpush(4010,name,a_err='spcnv') goto 9999 diff --git a/mlprec/mld_dmlprec_bld.f90 b/mlprec/mld_dmlprec_bld.f90 index 9f1af0ee..a7aba345 100644 --- a/mlprec/mld_dmlprec_bld.f90 +++ b/mlprec/mld_dmlprec_bld.f90 @@ -90,7 +90,7 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info) call mld_check_def(p%iprcparm(mld_ml_type_),'Multilevel type',& & mld_mult_ml_,is_legal_ml_type) call mld_check_def(p%iprcparm(mld_aggr_alg_),'Aggregation',& - & mld_dec_aggr_,is_legal_ml_aggr_kind) + & mld_dec_aggr_,is_legal_ml_aggr_alg) call mld_check_def(p%iprcparm(mld_aggr_kind_),'Smoother',& & mld_smooth_prol_,is_legal_ml_smth_kind) call mld_check_def(p%iprcparm(mld_coarse_mat_),'Coarse matrix',& @@ -127,8 +127,6 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info) ! the mapping defined by mld_aggrmap_bld and applying the aggregation ! algorithm specified by p%iprcparm(mld_aggr_kind_) ! - call psb_nullify_sp(ac) - call psb_nullify_desc(desc_ac) call mld_aggrmat_asb(a,desc_a,ac,desc_ac,p,info) if(info /= 0) then call psb_errpush(4010,name,a_err='mld_aggrmat_asb') diff --git a/mlprec/mld_prec_mod.f90 b/mlprec/mld_prec_mod.f90 index 90e34edb..d57f4800 100644 --- a/mlprec/mld_prec_mod.f90 +++ b/mlprec/mld_prec_mod.f90 @@ -628,22 +628,22 @@ module mld_prec_mod 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(psb_dspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_dspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac type(mld_dbaseprc_type), intent(inout), target :: p - integer, intent(out) :: info + 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 + type(psb_zspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_zspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac + type(mld_zbaseprc_type), intent(inout), target :: p + integer, intent(out) :: info end subroutine mld_zaggrmat_asb end interface @@ -651,22 +651,22 @@ module mld_prec_mod subroutine mld_daggrmat_raw_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(psb_dspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_dspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac type(mld_dbaseprc_type), intent(inout), target :: p - integer, intent(out) :: info + integer, intent(out) :: info end subroutine mld_daggrmat_raw_asb subroutine mld_zaggrmat_raw_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 + type(psb_zspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_zspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac + type(mld_zbaseprc_type), intent(inout), target :: p + integer, intent(out) :: info end subroutine mld_zaggrmat_raw_asb end interface @@ -674,22 +674,22 @@ module mld_prec_mod subroutine mld_daggrmat_smth_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(psb_dspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_dspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac type(mld_dbaseprc_type), intent(inout), target :: p - integer, intent(out) :: info + integer, intent(out) :: info end subroutine mld_daggrmat_smth_asb subroutine mld_zaggrmat_smth_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 + type(psb_zspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_zspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac + type(mld_zbaseprc_type), intent(inout), target :: p + integer, intent(out) :: info end subroutine mld_zaggrmat_smth_asb end interface diff --git a/mlprec/mld_prec_type.f90 b/mlprec/mld_prec_type.f90 index f54e3568..f6ca4a6c 100644 --- a/mlprec/mld_prec_type.f90 +++ b/mlprec/mld_prec_type.f90 @@ -915,14 +915,14 @@ contains is_legal_ml_type = ((ip>=mld_no_ml_).and.(ip<=mld_max_ml_)) return end function is_legal_ml_type - function is_legal_ml_aggr_kind(ip) + function is_legal_ml_aggr_alg(ip) use psb_base_mod integer, intent(in) :: ip - logical :: is_legal_ml_aggr_kind + logical :: is_legal_ml_aggr_alg - is_legal_ml_aggr_kind = ((ip>=mld_dec_aggr_).and.(ip<=mld_max_aggr_)) + is_legal_ml_aggr_alg = ((ip>=mld_dec_aggr_).and.(ip<=mld_max_aggr_)) return - end function is_legal_ml_aggr_kind + end function is_legal_ml_aggr_alg function is_legal_ml_smooth_pos(ip) use psb_base_mod integer, intent(in) :: ip diff --git a/mlprec/mld_zaggrmat_asb.f90 b/mlprec/mld_zaggrmat_asb.f90 index dafe2573..c66f8f1b 100644 --- a/mlprec/mld_zaggrmat_asb.f90 +++ b/mlprec/mld_zaggrmat_asb.f90 @@ -99,15 +99,15 @@ subroutine mld_zaggrmat_asb(a,desc_a,ac,desc_ac,p,info) implicit none ! Arguments - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_zspmat_type), intent(inout), target :: ac - type(psb_desc_type), intent(inout) :: desc_ac - type(mld_zbaseprc_type), intent(inout), target :: p - integer, intent(out) :: info + type(psb_zspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_zspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac + type(mld_zbaseprc_type), intent(inout), target :: p + integer, intent(out) :: info ! Local variables - integer ::ictxt,np,me, err_act, icomm + integer :: ictxt,np,me, err_act, icomm character(len=20) :: name name='mld_aggrmat_asb' diff --git a/mlprec/mld_zaggrmat_raw_asb.F90 b/mlprec/mld_zaggrmat_raw_asb.F90 index 65227d0c..39d013f0 100644 --- a/mlprec/mld_zaggrmat_raw_asb.F90 +++ b/mlprec/mld_zaggrmat_raw_asb.F90 @@ -87,12 +87,12 @@ subroutine mld_zaggrmat_raw_asb(a,desc_a,ac,desc_ac,p,info) #endif ! Arguments - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_zspmat_type), intent(inout), target :: ac - type(psb_desc_type), intent(inout) :: desc_ac - type(mld_zbaseprc_type), intent(inout), target :: p - integer, intent(out) :: info + type(psb_zspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_zspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac + type(mld_zbaseprc_type), intent(inout), target :: p + integer, intent(out) :: info ! Local variables integer ::ictxt,np,me, err_act, icomm diff --git a/mlprec/mld_zaggrmat_smth_asb.F90 b/mlprec/mld_zaggrmat_smth_asb.F90 index ebec7773..71ca2d4b 100644 --- a/mlprec/mld_zaggrmat_smth_asb.F90 +++ b/mlprec/mld_zaggrmat_smth_asb.F90 @@ -105,12 +105,12 @@ subroutine mld_zaggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info) #endif ! Arguments - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_zspmat_type), intent(inout), target :: ac - type(psb_desc_type), intent(inout) :: desc_ac - type(mld_zbaseprc_type), intent(inout), target :: p - integer, intent(out) :: info + type(psb_zspmat_type), intent(in) :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_zspmat_type), intent(out) :: ac + type(psb_desc_type), intent(out) :: desc_ac + type(mld_zbaseprc_type), intent(inout), target :: p + integer, intent(out) :: info ! Local variables type(psb_zspmat_type) :: b @@ -249,6 +249,9 @@ subroutine mld_zaggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info) call psb_errpush(4010,name,a_err='spcnv') goto 9999 end if + if (debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & ' Initial copies done.' ! ! WARNING: the cycles below assume that AM3 does have diff --git a/mlprec/mld_zmlprec_bld.f90 b/mlprec/mld_zmlprec_bld.f90 index 27f3b88b..cf2d3475 100644 --- a/mlprec/mld_zmlprec_bld.f90 +++ b/mlprec/mld_zmlprec_bld.f90 @@ -90,7 +90,7 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info) call mld_check_def(p%iprcparm(mld_ml_type_),'Multilevel type',& & mld_mult_ml_,is_legal_ml_type) call mld_check_def(p%iprcparm(mld_aggr_alg_),'Aggregation',& - & mld_dec_aggr_,is_legal_ml_aggr_kind) + & mld_dec_aggr_,is_legal_ml_aggr_alg) call mld_check_def(p%iprcparm(mld_aggr_kind_),'Smoother',& & mld_smooth_prol_,is_legal_ml_smth_kind) call mld_check_def(p%iprcparm(mld_coarse_mat_),'Coarse matrix',& @@ -127,8 +127,6 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info) ! the mapping defined by mld_aggrmap_bld and applying the aggregation ! algorithm specified by p%iprcparm(mld_aggr_kind_) ! - call psb_nullify_sp(ac) - call psb_nullify_desc(desc_ac) call mld_aggrmat_asb(a,desc_a,ac,desc_ac,p,info) if(info /= 0) then call psb_errpush(4010,name,a_err='mld_aggrmat_asb')