From 087a33c4d77756bd4101e31daef726ca875bb69c Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sun, 2 Jan 2011 18:50:18 +0000 Subject: [PATCH] mld2p4-2: mlprec/mld_c_prec_type.f90 mlprec/mld_cmlprec_bld.f90 mlprec/mld_cprecbld.f90 mlprec/mld_csp_renum.f90 mlprec/mld_d_prec_type.f90 mlprec/mld_dmlprec_bld.f90 mlprec/mld_dprecbld.f90 mlprec/mld_s_prec_type.f90 mlprec/mld_smlprec_bld.f90 mlprec/mld_sprecbld.f90 mlprec/mld_ssp_renum.f90 mlprec/mld_z_prec_type.f90 mlprec/mld_zas_bld.f90 mlprec/mld_zilu_bld.f90 mlprec/mld_zmlprec_bld.f90 mlprec/mld_zprecbld.f90 mlprec/mld_zsp_renum.f90 Wipe out direct use of DESC internal components. --- mlprec/mld_c_prec_type.f90 | 3 ++- mlprec/mld_cmlprec_bld.f90 | 2 +- mlprec/mld_cprecbld.f90 | 2 +- mlprec/mld_csp_renum.f90 | 2 +- mlprec/mld_d_prec_type.f90 | 10 ++++------ mlprec/mld_dmlprec_bld.f90 | 2 +- mlprec/mld_dprecbld.f90 | 2 +- mlprec/mld_s_prec_type.f90 | 6 +++--- mlprec/mld_smlprec_bld.f90 | 2 +- mlprec/mld_sprecbld.f90 | 2 +- mlprec/mld_ssp_renum.f90 | 2 +- mlprec/mld_z_prec_type.f90 | 5 ++--- mlprec/mld_zas_bld.f90 | 4 ++-- mlprec/mld_zilu_bld.f90 | 2 +- mlprec/mld_zmlprec_bld.f90 | 2 +- mlprec/mld_zprecbld.f90 | 2 +- mlprec/mld_zsp_renum.f90 | 2 +- 17 files changed, 25 insertions(+), 27 deletions(-) diff --git a/mlprec/mld_c_prec_type.f90 b/mlprec/mld_c_prec_type.f90 index 767d8451..86eec8c0 100644 --- a/mlprec/mld_c_prec_type.f90 +++ b/mlprec/mld_c_prec_type.f90 @@ -571,6 +571,7 @@ contains end subroutine mld_cbase_precfree subroutine mld_c_onelev_precfree(p,info) + use psb_sparse_mod implicit none type(mld_conelev_type), intent(inout) :: p @@ -584,7 +585,7 @@ contains call mld_precfree(p%prec,info) call p%ac%free() - if (allocated(p%desc_ac%matrix_data)) & + if (psb_is_ok_desc(p%desc_ac)) & & call psb_cdfree(p%desc_ac,info) if (allocated(p%rprcparm)) then diff --git a/mlprec/mld_cmlprec_bld.f90 b/mlprec/mld_cmlprec_bld.f90 index c52a4bab..eccad4ef 100644 --- a/mlprec/mld_cmlprec_bld.f90 +++ b/mlprec/mld_cmlprec_bld.f90 @@ -107,7 +107,7 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Entering ',desc_a%matrix_data(:) + & 'Entering ' ! ! For the time being we are commenting out the UPDATE argument ! we plan to resurrect it later. diff --git a/mlprec/mld_cprecbld.f90 b/mlprec/mld_cprecbld.f90 index d0858609..665994e5 100644 --- a/mlprec/mld_cprecbld.f90 +++ b/mlprec/mld_cprecbld.f90 @@ -103,7 +103,7 @@ subroutine mld_cprecbld(a,desc_a,p,info) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Entering ',desc_a%matrix_data(:) + & 'Entering ' ! ! For the time being we are commenting out the UPDATE argument ! we plan to resurrect it later. diff --git a/mlprec/mld_csp_renum.f90 b/mlprec/mld_csp_renum.f90 index 73f6dc72..66ae6018 100644 --- a/mlprec/mld_csp_renum.f90 +++ b/mlprec/mld_csp_renum.f90 @@ -130,7 +130,7 @@ subroutine mld_csp_renum(a,blck,p,atmp,info) ! Remember: we have switched IA1=COLS and IA2=ROWS. ! Now identify the set of distinct local column indices. ! - nnr = p%desc_data%matrix_data(psb_n_row_) + nnr = psb_cd_get_local_rows(p%desc_data) allocate(p%perm(nnr),p%invperm(nnr),itmp2(nnr),stat=info) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') diff --git a/mlprec/mld_d_prec_type.f90 b/mlprec/mld_d_prec_type.f90 index c0dbf3de..b366e53a 100644 --- a/mlprec/mld_d_prec_type.f90 +++ b/mlprec/mld_d_prec_type.f90 @@ -215,9 +215,9 @@ module mld_d_prec_type type(mld_dbaseprec_type) :: prec integer, allocatable :: iprcparm(:) real(psb_dpk_), allocatable :: rprcparm(:) - type(psb_dspmat_type) :: ac + type(psb_dspmat_type) :: ac type(psb_desc_type) :: desc_ac - type(psb_dspmat_type), pointer :: base_a => null() + type(psb_dspmat_type), pointer :: base_a => null() type(psb_desc_type), pointer :: base_desc => null() type(psb_dlinmap_type) :: map contains @@ -550,9 +550,6 @@ contains !!$ deallocate(p%av,stat=info) !!$ end if !!$ -!!$ if (allocated(p%desc_data%matrix_data)) & -!!$ & call psb_cdfree(p%desc_data,info) -!!$ if (allocated(p%rprcparm)) then deallocate(p%rprcparm,stat=info) end if @@ -585,6 +582,7 @@ contains end subroutine mld_dbase_precfree subroutine mld_d_onelev_precfree(p,info) + use psb_sparse_mod implicit none type(mld_donelev_type), intent(inout) :: p @@ -598,7 +596,7 @@ contains call mld_precfree(p%prec,info) call p%ac%free() - if (allocated(p%desc_ac%matrix_data)) & + if (psb_is_ok_desc(p%desc_ac)) & & call psb_cdfree(p%desc_ac,info) if (allocated(p%rprcparm)) then diff --git a/mlprec/mld_dmlprec_bld.f90 b/mlprec/mld_dmlprec_bld.f90 index 5ca93684..c8bc0eb9 100644 --- a/mlprec/mld_dmlprec_bld.f90 +++ b/mlprec/mld_dmlprec_bld.f90 @@ -107,7 +107,7 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Entering ',desc_a%matrix_data(:) + & 'Entering ' ! ! For the time being we are commenting out the UPDATE argument ! we plan to resurrect it later. diff --git a/mlprec/mld_dprecbld.f90 b/mlprec/mld_dprecbld.f90 index 8600dc2e..50e17e09 100644 --- a/mlprec/mld_dprecbld.f90 +++ b/mlprec/mld_dprecbld.f90 @@ -102,7 +102,7 @@ subroutine mld_dprecbld(a,desc_a,p,info) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Entering ',desc_a%matrix_data(:) + & 'Entering ' ! ! For the time being we are commenting out the UPDATE argument; ! we plan to resurrect it later. diff --git a/mlprec/mld_s_prec_type.f90 b/mlprec/mld_s_prec_type.f90 index 45d48cff..3ce5aead 100644 --- a/mlprec/mld_s_prec_type.f90 +++ b/mlprec/mld_s_prec_type.f90 @@ -520,6 +520,7 @@ contains ! error code. ! subroutine mld_sbase_precfree(p,info) + use psb_sparse_mod implicit none type(mld_sbaseprec_type), intent(inout) :: p @@ -547,8 +548,6 @@ contains !!$ deallocate(p%av,stat=info) !!$ end if !!$ -!!$ if (allocated(p%desc_data%matrix_data)) & -!!$ & call psb_cdfree(p%desc_data,info) !!$ if (allocated(p%rprcparm)) then deallocate(p%rprcparm,stat=info) @@ -575,6 +574,7 @@ contains end subroutine mld_sbase_precfree subroutine mld_s_onelev_precfree(p,info) + use psb_sparse_mod implicit none type(mld_sonelev_type), intent(inout) :: p @@ -588,7 +588,7 @@ contains call mld_precfree(p%prec,info) call p%ac%free() - if (allocated(p%desc_ac%matrix_data)) & + if (psb_is_ok_desc(p%desc_ac)) & & call psb_cdfree(p%desc_ac,info) if (allocated(p%rprcparm)) then diff --git a/mlprec/mld_smlprec_bld.f90 b/mlprec/mld_smlprec_bld.f90 index 76cc4625..557d8778 100644 --- a/mlprec/mld_smlprec_bld.f90 +++ b/mlprec/mld_smlprec_bld.f90 @@ -107,7 +107,7 @@ subroutine mld_smlprec_bld(a,desc_a,p,info) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Entering ',desc_a%matrix_data(:) + & 'Entering ' ! ! For the time being we are commenting out the UPDATE argument ! we plan to resurrect it later. diff --git a/mlprec/mld_sprecbld.f90 b/mlprec/mld_sprecbld.f90 index 8522d481..b976a300 100644 --- a/mlprec/mld_sprecbld.f90 +++ b/mlprec/mld_sprecbld.f90 @@ -102,7 +102,7 @@ subroutine mld_sprecbld(a,desc_a,p,info) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Entering ',desc_a%matrix_data(:) + & 'Entering ' ! ! For the time being we are commenting out the UPDATE argument ! we plan to resurrect it later. diff --git a/mlprec/mld_ssp_renum.f90 b/mlprec/mld_ssp_renum.f90 index a0f90dd2..88ef7955 100644 --- a/mlprec/mld_ssp_renum.f90 +++ b/mlprec/mld_ssp_renum.f90 @@ -130,7 +130,7 @@ subroutine mld_ssp_renum(a,blck,p,atmp,info) ! Remember: we have switched IA1=COLS and IA2=ROWS. ! Now identify the set of distinct local column indices. ! - nnr = p%desc_data%matrix_data(psb_n_row_) + nnr = psb_cd_get_local_rows(p%desc_data) allocate(p%perm(nnr),p%invperm(nnr),itmp2(nnr),stat=info) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') diff --git a/mlprec/mld_z_prec_type.f90 b/mlprec/mld_z_prec_type.f90 index 8e8bc86d..e03234c5 100644 --- a/mlprec/mld_z_prec_type.f90 +++ b/mlprec/mld_z_prec_type.f90 @@ -544,8 +544,6 @@ contains !!$ deallocate(p%av,stat=info) !!$ end if !!$ -!!$ if (allocated(p%desc_data%matrix_data)) & -!!$ & call psb_cdfree(p%desc_data,info) !!$ if (allocated(p%rprcparm)) then deallocate(p%rprcparm,stat=info) @@ -571,6 +569,7 @@ contains end subroutine mld_zbase_precfree subroutine mld_z_onelev_precfree(p,info) + use psb_sparse_mod implicit none type(mld_zonelev_type), intent(inout) :: p @@ -584,7 +583,7 @@ contains call mld_precfree(p%prec,info) call p%ac%free() - if (allocated(p%desc_ac%matrix_data)) & + if (psb_is_ok_desc(p%desc_ac)) & & call psb_cdfree(p%desc_ac,info) if (allocated(p%rprcparm)) then diff --git a/mlprec/mld_zas_bld.f90 b/mlprec/mld_zas_bld.f90 index 25037095..89c49090 100644 --- a/mlprec/mld_zas_bld.f90 +++ b/mlprec/mld_zas_bld.f90 @@ -216,8 +216,8 @@ subroutine mld_zas_bld(a,desc_a,p,upd,info) call psb_cdbldext(a,desc_a,novr,p%desc_data,info,extype=psb_ovt_asov_) if(debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & ' From cdbldext _:',p%desc_data%matrix_data(psb_n_row_),& - & p%desc_data%matrix_data(psb_n_col_) + & ' From cdbldext _:',psb_cd_get_local_rows(p%desc_data),& + & psb_cd_get_local_cols(p%desc_data) if (info /= psb_success_) then info=psb_err_from_subroutine_ diff --git a/mlprec/mld_zilu_bld.f90 b/mlprec/mld_zilu_bld.f90 index 850f2146..bbc07ad9 100644 --- a/mlprec/mld_zilu_bld.f90 +++ b/mlprec/mld_zilu_bld.f90 @@ -157,7 +157,7 @@ subroutine mld_zilu_bld(a,p,upd,info,blck) & write(debug_unit,*) me,' ',trim(name),& & ': out get_nnzeros',nztota,a%m,a%k,nrow_a - n_row = p%desc_data%matrix_data(psb_n_row_) + n_row = psb_cd_get_local_rows(p%desc_data) p%av(mld_l_pr_)%m = n_row p%av(mld_l_pr_)%k = n_row p%av(mld_u_pr_)%m = n_row diff --git a/mlprec/mld_zmlprec_bld.f90 b/mlprec/mld_zmlprec_bld.f90 index ed0e3b98..bf9446e6 100644 --- a/mlprec/mld_zmlprec_bld.f90 +++ b/mlprec/mld_zmlprec_bld.f90 @@ -107,7 +107,7 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Entering ',desc_a%matrix_data(:) + & 'Entering ' ! ! For the time being we are commenting out the UPDATE argument ! we plan to resurrect it later. diff --git a/mlprec/mld_zprecbld.f90 b/mlprec/mld_zprecbld.f90 index d48400bc..c27f385b 100644 --- a/mlprec/mld_zprecbld.f90 +++ b/mlprec/mld_zprecbld.f90 @@ -103,7 +103,7 @@ subroutine mld_zprecbld(a,desc_a,p,info) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Entering ',desc_a%matrix_data(:) + & 'Entering ' ! ! For the time being we are commenting out the UPDATE argument; ! we plan to resurrect it later. diff --git a/mlprec/mld_zsp_renum.f90 b/mlprec/mld_zsp_renum.f90 index 351e8d98..fcc0e611 100644 --- a/mlprec/mld_zsp_renum.f90 +++ b/mlprec/mld_zsp_renum.f90 @@ -130,7 +130,7 @@ subroutine mld_zsp_renum(a,blck,p,atmp,info) ! Remember: we have switched IA1=COLS and IA2=ROWS. ! Now identify the set of distinct local column indices. ! - nnr = p%desc_data%matrix_data(psb_n_row_) + nnr = psb_cd_get_local_rows(p%desc_data) allocate(p%perm(nnr),p%invperm(nnr),itmp2(nnr),stat=info) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate')