From 555d7433b767416340e9c98a85beef8dc0e2fb8a Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 6 May 2021 19:17:19 +0200 Subject: [PATCH] Redefine interface of prec%descr to get INFO --- amgprec/amg_c_prec_type.f90 | 3 ++- amgprec/amg_d_prec_type.f90 | 3 ++- amgprec/amg_s_prec_type.f90 | 3 ++- amgprec/amg_z_prec_type.f90 | 3 ++- amgprec/impl/amg_cfile_prec_descr.f90 | 5 +++-- amgprec/impl/amg_dfile_prec_descr.f90 | 5 +++-- amgprec/impl/amg_sfile_prec_descr.f90 | 5 +++-- amgprec/impl/amg_zfile_prec_descr.f90 | 5 +++-- cbind/amgprec/amg_dprec_cbind_mod.F90 | 4 ++-- cbind/amgprec/amg_zprec_cbind_mod.F90 | 4 ++-- tests/fileread/amg_cf_sample.f90 | 2 +- tests/fileread/amg_df_sample.f90 | 2 +- tests/fileread/amg_sf_sample.f90 | 2 +- tests/fileread/amg_zf_sample.f90 | 2 +- tests/pdegen/amg_d_pde2d.f90 | 2 +- tests/pdegen/amg_d_pde3d.f90 | 2 +- tests/pdegen/amg_s_pde2d.f90 | 2 +- tests/pdegen/amg_s_pde3d.f90 | 2 +- 18 files changed, 32 insertions(+), 24 deletions(-) diff --git a/amgprec/amg_c_prec_type.f90 b/amgprec/amg_c_prec_type.f90 index af6d2809..cc176861 100644 --- a/amgprec/amg_c_prec_type.f90 +++ b/amgprec/amg_c_prec_type.f90 @@ -155,11 +155,12 @@ module amg_c_prec_type interface amg_precdescr - subroutine amg_cfile_prec_descr(prec,iout,root,verbosity) + subroutine amg_cfile_prec_descr(prec,info,iout,root,verbosity) import :: amg_cprec_type, psb_ipk_ implicit none ! Arguments class(amg_cprec_type), intent(in) :: prec + integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: verbosity diff --git a/amgprec/amg_d_prec_type.f90 b/amgprec/amg_d_prec_type.f90 index a688567c..b41243ec 100644 --- a/amgprec/amg_d_prec_type.f90 +++ b/amgprec/amg_d_prec_type.f90 @@ -155,11 +155,12 @@ module amg_d_prec_type interface amg_precdescr - subroutine amg_dfile_prec_descr(prec,iout,root,verbosity) + subroutine amg_dfile_prec_descr(prec,info,iout,root,verbosity) import :: amg_dprec_type, psb_ipk_ implicit none ! Arguments class(amg_dprec_type), intent(in) :: prec + integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: verbosity diff --git a/amgprec/amg_s_prec_type.f90 b/amgprec/amg_s_prec_type.f90 index c89f91af..e8dfeae4 100644 --- a/amgprec/amg_s_prec_type.f90 +++ b/amgprec/amg_s_prec_type.f90 @@ -155,11 +155,12 @@ module amg_s_prec_type interface amg_precdescr - subroutine amg_sfile_prec_descr(prec,iout,root,verbosity) + subroutine amg_sfile_prec_descr(prec,info,iout,root,verbosity) import :: amg_sprec_type, psb_ipk_ implicit none ! Arguments class(amg_sprec_type), intent(in) :: prec + integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: verbosity diff --git a/amgprec/amg_z_prec_type.f90 b/amgprec/amg_z_prec_type.f90 index d914674d..98a7aa1f 100644 --- a/amgprec/amg_z_prec_type.f90 +++ b/amgprec/amg_z_prec_type.f90 @@ -155,11 +155,12 @@ module amg_z_prec_type interface amg_precdescr - subroutine amg_zfile_prec_descr(prec,iout,root,verbosity) + subroutine amg_zfile_prec_descr(prec,info,iout,root,verbosity) import :: amg_zprec_type, psb_ipk_ implicit none ! Arguments class(amg_zprec_type), intent(in) :: prec + integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: verbosity diff --git a/amgprec/impl/amg_cfile_prec_descr.f90 b/amgprec/impl/amg_cfile_prec_descr.f90 index 6f35ea1a..6ce27bf2 100644 --- a/amgprec/impl/amg_cfile_prec_descr.f90 +++ b/amgprec/impl/amg_cfile_prec_descr.f90 @@ -65,7 +65,7 @@ ! 0: normal ! >1: increased details ! -subroutine amg_cfile_prec_descr(prec,iout,root, verbosity) +subroutine amg_cfile_prec_descr(prec,info,iout,root, verbosity) use psb_base_mod use amg_c_prec_mod, amg_protect_name => amg_cfile_prec_descr use amg_c_inner_mod @@ -74,13 +74,14 @@ subroutine amg_cfile_prec_descr(prec,iout,root, verbosity) implicit none ! Arguments class(amg_cprec_type), intent(in) :: prec + integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: verbosity ! Local variables - integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps + integer(psb_ipk_) :: ilev, nlev, ilmin, nswps type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: me, np logical :: is_symgs diff --git a/amgprec/impl/amg_dfile_prec_descr.f90 b/amgprec/impl/amg_dfile_prec_descr.f90 index 7472da79..ed2fd2fb 100644 --- a/amgprec/impl/amg_dfile_prec_descr.f90 +++ b/amgprec/impl/amg_dfile_prec_descr.f90 @@ -65,7 +65,7 @@ ! 0: normal ! >1: increased details ! -subroutine amg_dfile_prec_descr(prec,iout,root, verbosity) +subroutine amg_dfile_prec_descr(prec,info,iout,root, verbosity) use psb_base_mod use amg_d_prec_mod, amg_protect_name => amg_dfile_prec_descr use amg_d_inner_mod @@ -74,13 +74,14 @@ subroutine amg_dfile_prec_descr(prec,iout,root, verbosity) implicit none ! Arguments class(amg_dprec_type), intent(in) :: prec + integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: verbosity ! Local variables - integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps + integer(psb_ipk_) :: ilev, nlev, ilmin, nswps type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: me, np logical :: is_symgs diff --git a/amgprec/impl/amg_sfile_prec_descr.f90 b/amgprec/impl/amg_sfile_prec_descr.f90 index 6849c0e9..61cc1ae4 100644 --- a/amgprec/impl/amg_sfile_prec_descr.f90 +++ b/amgprec/impl/amg_sfile_prec_descr.f90 @@ -65,7 +65,7 @@ ! 0: normal ! >1: increased details ! -subroutine amg_sfile_prec_descr(prec,iout,root, verbosity) +subroutine amg_sfile_prec_descr(prec,info,iout,root, verbosity) use psb_base_mod use amg_s_prec_mod, amg_protect_name => amg_sfile_prec_descr use amg_s_inner_mod @@ -74,13 +74,14 @@ subroutine amg_sfile_prec_descr(prec,iout,root, verbosity) implicit none ! Arguments class(amg_sprec_type), intent(in) :: prec + integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: verbosity ! Local variables - integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps + integer(psb_ipk_) :: ilev, nlev, ilmin, nswps type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: me, np logical :: is_symgs diff --git a/amgprec/impl/amg_zfile_prec_descr.f90 b/amgprec/impl/amg_zfile_prec_descr.f90 index 4cdd5afe..fa7afe24 100644 --- a/amgprec/impl/amg_zfile_prec_descr.f90 +++ b/amgprec/impl/amg_zfile_prec_descr.f90 @@ -65,7 +65,7 @@ ! 0: normal ! >1: increased details ! -subroutine amg_zfile_prec_descr(prec,iout,root, verbosity) +subroutine amg_zfile_prec_descr(prec,info,iout,root, verbosity) use psb_base_mod use amg_z_prec_mod, amg_protect_name => amg_zfile_prec_descr use amg_z_inner_mod @@ -74,13 +74,14 @@ subroutine amg_zfile_prec_descr(prec,iout,root, verbosity) implicit none ! Arguments class(amg_zprec_type), intent(in) :: prec + integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: verbosity ! Local variables - integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps + integer(psb_ipk_) :: ilev, nlev, ilmin, nswps type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: me, np logical :: is_symgs diff --git a/cbind/amgprec/amg_dprec_cbind_mod.F90 b/cbind/amgprec/amg_dprec_cbind_mod.F90 index 5255916f..29c514a9 100644 --- a/cbind/amgprec/amg_dprec_cbind_mod.F90 +++ b/cbind/amgprec/amg_dprec_cbind_mod.F90 @@ -384,7 +384,7 @@ contains integer(psb_c_ipk_) :: res type(psb_c_object_type) :: ph - integer :: info + integer(psb_c_ipk_) :: info type(amg_dprec_type), pointer :: precp res = -1 @@ -396,7 +396,7 @@ contains end if - call precp%descr() + call precp%descr(info) call flush(psb_out_unit) info = 0 diff --git a/cbind/amgprec/amg_zprec_cbind_mod.F90 b/cbind/amgprec/amg_zprec_cbind_mod.F90 index d93e55f5..167509d9 100644 --- a/cbind/amgprec/amg_zprec_cbind_mod.F90 +++ b/cbind/amgprec/amg_zprec_cbind_mod.F90 @@ -384,7 +384,7 @@ contains integer(psb_c_ipk_) :: res type(psb_c_object_type) :: ph - integer :: info + integer(psb_c_ipk_) :: info type(amg_zprec_type), pointer :: precp res = -1 @@ -396,7 +396,7 @@ contains end if - call precp%descr() + call precp%descr(info) call flush(psb_out_unit) info = 0 diff --git a/tests/fileread/amg_cf_sample.f90 b/tests/fileread/amg_cf_sample.f90 index 6a5d3008..c881fb40 100644 --- a/tests/fileread/amg_cf_sample.f90 +++ b/tests/fileread/amg_cf_sample.f90 @@ -523,7 +523,7 @@ program amg_cf_sample call psb_sum(ctxt,amatsize) call psb_sum(ctxt,descsize) call psb_sum(ctxt,precsize) - call prec%descr(iout=psb_out_unit) + call prec%descr(info,iout=psb_out_unit) if (iam == psb_root_) then write(psb_out_unit,'("Matrix: ",a)')mtrx_file write(psb_out_unit,'("Computed solution on ",i8," processors")')np diff --git a/tests/fileread/amg_df_sample.f90 b/tests/fileread/amg_df_sample.f90 index 31b7f395..a43a654e 100644 --- a/tests/fileread/amg_df_sample.f90 +++ b/tests/fileread/amg_df_sample.f90 @@ -523,7 +523,7 @@ program amg_df_sample call psb_sum(ctxt,amatsize) call psb_sum(ctxt,descsize) call psb_sum(ctxt,precsize) - call prec%descr(iout=psb_out_unit) + call prec%descr(info,iout=psb_out_unit) if (iam == psb_root_) then write(psb_out_unit,'("Matrix: ",a)')mtrx_file write(psb_out_unit,'("Computed solution on ",i8," processors")')np diff --git a/tests/fileread/amg_sf_sample.f90 b/tests/fileread/amg_sf_sample.f90 index a82190c3..650ca0ea 100644 --- a/tests/fileread/amg_sf_sample.f90 +++ b/tests/fileread/amg_sf_sample.f90 @@ -523,7 +523,7 @@ program amg_sf_sample call psb_sum(ctxt,amatsize) call psb_sum(ctxt,descsize) call psb_sum(ctxt,precsize) - call prec%descr(iout=psb_out_unit) + call prec%descr(info,iout=psb_out_unit) if (iam == psb_root_) then write(psb_out_unit,'("Matrix: ",a)')mtrx_file write(psb_out_unit,'("Computed solution on ",i8," processors")')np diff --git a/tests/fileread/amg_zf_sample.f90 b/tests/fileread/amg_zf_sample.f90 index 14a9793f..7ea18464 100644 --- a/tests/fileread/amg_zf_sample.f90 +++ b/tests/fileread/amg_zf_sample.f90 @@ -523,7 +523,7 @@ program amg_zf_sample call psb_sum(ctxt,amatsize) call psb_sum(ctxt,descsize) call psb_sum(ctxt,precsize) - call prec%descr(iout=psb_out_unit) + call prec%descr(info,iout=psb_out_unit) if (iam == psb_root_) then write(psb_out_unit,'("Matrix: ",a)')mtrx_file write(psb_out_unit,'("Computed solution on ",i8," processors")')np diff --git a/tests/pdegen/amg_d_pde2d.f90 b/tests/pdegen/amg_d_pde2d.f90 index 00922ad5..d4e5ad68 100644 --- a/tests/pdegen/amg_d_pde2d.f90 +++ b/tests/pdegen/amg_d_pde2d.f90 @@ -432,7 +432,7 @@ program amg_d_pde2d call psb_sum(ctxt,amatsize) call psb_sum(ctxt,descsize) call psb_sum(ctxt,precsize) - call prec%descr(iout=psb_out_unit) + call prec%descr(info,iout=psb_out_unit) if (iam == psb_root_) then write(psb_out_unit,'("Computed solution on ",i8," processors")') np write(psb_out_unit,'("Linear system size : ",i12)') system_size diff --git a/tests/pdegen/amg_d_pde3d.f90 b/tests/pdegen/amg_d_pde3d.f90 index 5e4bcf5d..b80e14df 100644 --- a/tests/pdegen/amg_d_pde3d.f90 +++ b/tests/pdegen/amg_d_pde3d.f90 @@ -436,7 +436,7 @@ program amg_d_pde3d call psb_sum(ctxt,amatsize) call psb_sum(ctxt,descsize) call psb_sum(ctxt,precsize) - call prec%descr(iout=psb_out_unit) + call prec%descr(info,iout=psb_out_unit) if (iam == psb_root_) then write(psb_out_unit,'("Computed solution on ",i8," processors")') np write(psb_out_unit,'("Linear system size : ",i12)') system_size diff --git a/tests/pdegen/amg_s_pde2d.f90 b/tests/pdegen/amg_s_pde2d.f90 index d1db5c85..9211441a 100644 --- a/tests/pdegen/amg_s_pde2d.f90 +++ b/tests/pdegen/amg_s_pde2d.f90 @@ -432,7 +432,7 @@ program amg_s_pde2d call psb_sum(ctxt,amatsize) call psb_sum(ctxt,descsize) call psb_sum(ctxt,precsize) - call prec%descr(iout=psb_out_unit) + call prec%descr(info,iout=psb_out_unit) if (iam == psb_root_) then write(psb_out_unit,'("Computed solution on ",i8," processors")') np write(psb_out_unit,'("Linear system size : ",i12)') system_size diff --git a/tests/pdegen/amg_s_pde3d.f90 b/tests/pdegen/amg_s_pde3d.f90 index f409765b..a743b3d6 100644 --- a/tests/pdegen/amg_s_pde3d.f90 +++ b/tests/pdegen/amg_s_pde3d.f90 @@ -436,7 +436,7 @@ program amg_s_pde3d call psb_sum(ctxt,amatsize) call psb_sum(ctxt,descsize) call psb_sum(ctxt,precsize) - call prec%descr(iout=psb_out_unit) + call prec%descr(info,iout=psb_out_unit) if (iam == psb_root_) then write(psb_out_unit,'("Computed solution on ",i8," processors")') np write(psb_out_unit,'("Linear system size : ",i12)') system_size