From 78120dc1c09db9bad6026a7688aa3c086b06e400 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 10 Oct 2018 13:54:54 +0100 Subject: [PATCH] New ICTXT arg in INIT. --- prec/impl/psb_cprecinit.f90 | 7 +++++-- prec/impl/psb_dprecinit.f90 | 7 +++++-- prec/impl/psb_sprecinit.f90 | 7 +++++-- prec/impl/psb_zprecinit.f90 | 7 +++++-- prec/psb_c_prec_type.f90 | 4 +++- prec/psb_d_prec_type.f90 | 4 +++- prec/psb_s_prec_type.f90 | 4 +++- prec/psb_z_prec_type.f90 | 4 +++- test/fileread/psb_cf_sample.f90 | 2 +- test/fileread/psb_df_sample.f90 | 2 +- test/fileread/psb_sf_sample.f90 | 2 +- test/fileread/psb_zf_sample.f90 | 2 +- test/pargen/psb_d_pde2d.f90 | 2 +- test/pargen/psb_d_pde3d.f90 | 2 +- test/pargen/psb_s_pde2d.f90 | 2 +- test/pargen/psb_s_pde3d.f90 | 2 +- 16 files changed, 40 insertions(+), 20 deletions(-) diff --git a/prec/impl/psb_cprecinit.f90 b/prec/impl/psb_cprecinit.f90 index 6a757e39..7f6da35f 100644 --- a/prec/impl/psb_cprecinit.f90 +++ b/prec/impl/psb_cprecinit.f90 @@ -29,7 +29,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine psb_cprecinit(p,ptype,info) +subroutine psb_cprecinit(ictxt,p,ptype,info) use psb_base_mod use psb_c_prec_type, psb_protect_name => psb_cprecinit @@ -37,7 +37,8 @@ subroutine psb_cprecinit(p,ptype,info) use psb_c_diagprec, only : psb_c_diag_prec_type use psb_c_bjacprec, only : psb_c_bjac_prec_type implicit none - class(psb_cprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: ictxt + class(psb_cprec_type), intent(inout) :: p character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info @@ -49,6 +50,8 @@ subroutine psb_cprecinit(p,ptype,info) if (info /= psb_success_) return end if + p%ictxt = ictxt + select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NONE','NOPREC') diff --git a/prec/impl/psb_dprecinit.f90 b/prec/impl/psb_dprecinit.f90 index b5bee7ab..70f7c05a 100644 --- a/prec/impl/psb_dprecinit.f90 +++ b/prec/impl/psb_dprecinit.f90 @@ -29,7 +29,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine psb_dprecinit(p,ptype,info) +subroutine psb_dprecinit(ictxt,p,ptype,info) use psb_base_mod use psb_d_prec_type, psb_protect_name => psb_dprecinit @@ -37,7 +37,8 @@ subroutine psb_dprecinit(p,ptype,info) use psb_d_diagprec, only : psb_d_diag_prec_type use psb_d_bjacprec, only : psb_d_bjac_prec_type implicit none - class(psb_dprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: ictxt + class(psb_dprec_type), intent(inout) :: p character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info @@ -49,6 +50,8 @@ subroutine psb_dprecinit(p,ptype,info) if (info /= psb_success_) return end if + p%ictxt = ictxt + select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NONE','NOPREC') diff --git a/prec/impl/psb_sprecinit.f90 b/prec/impl/psb_sprecinit.f90 index 54897772..46ab547a 100644 --- a/prec/impl/psb_sprecinit.f90 +++ b/prec/impl/psb_sprecinit.f90 @@ -29,7 +29,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine psb_sprecinit(p,ptype,info) +subroutine psb_sprecinit(ictxt,p,ptype,info) use psb_base_mod use psb_s_prec_type, psb_protect_name => psb_sprecinit @@ -37,7 +37,8 @@ subroutine psb_sprecinit(p,ptype,info) use psb_s_diagprec, only : psb_s_diag_prec_type use psb_s_bjacprec, only : psb_s_bjac_prec_type implicit none - class(psb_sprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: ictxt + class(psb_sprec_type), intent(inout) :: p character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info @@ -49,6 +50,8 @@ subroutine psb_sprecinit(p,ptype,info) if (info /= psb_success_) return end if + p%ictxt = ictxt + select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NONE','NOPREC') diff --git a/prec/impl/psb_zprecinit.f90 b/prec/impl/psb_zprecinit.f90 index 40ecb78e..200e36dd 100644 --- a/prec/impl/psb_zprecinit.f90 +++ b/prec/impl/psb_zprecinit.f90 @@ -29,7 +29,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine psb_zprecinit(p,ptype,info) +subroutine psb_zprecinit(ictxt,p,ptype,info) use psb_base_mod use psb_z_prec_type, psb_protect_name => psb_zprecinit @@ -37,7 +37,8 @@ subroutine psb_zprecinit(p,ptype,info) use psb_z_diagprec, only : psb_z_diag_prec_type use psb_z_bjacprec, only : psb_z_bjac_prec_type implicit none - class(psb_zprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: ictxt + class(psb_zprec_type), intent(inout) :: p character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info @@ -49,6 +50,8 @@ subroutine psb_zprecinit(p,ptype,info) if (info /= psb_success_) return end if + p%ictxt = ictxt + select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NONE','NOPREC') diff --git a/prec/psb_c_prec_type.f90 b/prec/psb_c_prec_type.f90 index a7bc4031..06445102 100644 --- a/prec/psb_c_prec_type.f90 +++ b/prec/psb_c_prec_type.f90 @@ -39,6 +39,7 @@ module psb_c_prec_type use psb_c_base_prec_mod type psb_cprec_type + integer(psb_ipk_) :: ictxt class(psb_c_base_prec_type), allocatable :: prec contains procedure, pass(prec) :: psb_c_apply1_vect @@ -60,9 +61,10 @@ module psb_c_prec_type end interface interface psb_precinit - subroutine psb_cprecinit(prec,ptype,info) + subroutine psb_cprecinit(ictxt,prec,ptype,info) import :: psb_ipk_, psb_cprec_type implicit none + integer(psb_ipk_), intent(in) :: ictxt class(psb_cprec_type), intent(inout) :: prec character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info diff --git a/prec/psb_d_prec_type.f90 b/prec/psb_d_prec_type.f90 index 814baa74..aeb314ae 100644 --- a/prec/psb_d_prec_type.f90 +++ b/prec/psb_d_prec_type.f90 @@ -39,6 +39,7 @@ module psb_d_prec_type use psb_d_base_prec_mod type psb_dprec_type + integer(psb_ipk_) :: ictxt class(psb_d_base_prec_type), allocatable :: prec contains procedure, pass(prec) :: psb_d_apply1_vect @@ -60,9 +61,10 @@ module psb_d_prec_type end interface interface psb_precinit - subroutine psb_dprecinit(prec,ptype,info) + subroutine psb_dprecinit(ictxt,prec,ptype,info) import :: psb_ipk_, psb_dprec_type implicit none + integer(psb_ipk_), intent(in) :: ictxt class(psb_dprec_type), intent(inout) :: prec character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info diff --git a/prec/psb_s_prec_type.f90 b/prec/psb_s_prec_type.f90 index 5cbc1018..e5984404 100644 --- a/prec/psb_s_prec_type.f90 +++ b/prec/psb_s_prec_type.f90 @@ -39,6 +39,7 @@ module psb_s_prec_type use psb_s_base_prec_mod type psb_sprec_type + integer(psb_ipk_) :: ictxt class(psb_s_base_prec_type), allocatable :: prec contains procedure, pass(prec) :: psb_s_apply1_vect @@ -60,9 +61,10 @@ module psb_s_prec_type end interface interface psb_precinit - subroutine psb_sprecinit(prec,ptype,info) + subroutine psb_sprecinit(ictxt,prec,ptype,info) import :: psb_ipk_, psb_sprec_type implicit none + integer(psb_ipk_), intent(in) :: ictxt class(psb_sprec_type), intent(inout) :: prec character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info diff --git a/prec/psb_z_prec_type.f90 b/prec/psb_z_prec_type.f90 index 526628b9..90fc8f9b 100644 --- a/prec/psb_z_prec_type.f90 +++ b/prec/psb_z_prec_type.f90 @@ -39,6 +39,7 @@ module psb_z_prec_type use psb_z_base_prec_mod type psb_zprec_type + integer(psb_ipk_) :: ictxt class(psb_z_base_prec_type), allocatable :: prec contains procedure, pass(prec) :: psb_z_apply1_vect @@ -60,9 +61,10 @@ module psb_z_prec_type end interface interface psb_precinit - subroutine psb_zprecinit(prec,ptype,info) + subroutine psb_zprecinit(ictxt,prec,ptype,info) import :: psb_ipk_, psb_zprec_type implicit none + integer(psb_ipk_), intent(in) :: ictxt class(psb_zprec_type), intent(inout) :: prec character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info diff --git a/test/fileread/psb_cf_sample.f90 b/test/fileread/psb_cf_sample.f90 index 79077feb..cb9074eb 100644 --- a/test/fileread/psb_cf_sample.f90 +++ b/test/fileread/psb_cf_sample.f90 @@ -213,7 +213,7 @@ program psb_cf_sample ! - call prec%init(ptype,info) + call prec%init(ictxt,ptype,info) ! building the preconditioner t1 = psb_wtime() diff --git a/test/fileread/psb_df_sample.f90 b/test/fileread/psb_df_sample.f90 index 59356726..18e96b0b 100644 --- a/test/fileread/psb_df_sample.f90 +++ b/test/fileread/psb_df_sample.f90 @@ -213,7 +213,7 @@ program psb_df_sample ! - call prec%init(ptype,info) + call prec%init(ictxt,ptype,info) ! building the preconditioner t1 = psb_wtime() diff --git a/test/fileread/psb_sf_sample.f90 b/test/fileread/psb_sf_sample.f90 index fb8d5982..7d943953 100644 --- a/test/fileread/psb_sf_sample.f90 +++ b/test/fileread/psb_sf_sample.f90 @@ -213,7 +213,7 @@ program psb_sf_sample ! - call prec%init(ptype,info) + call prec%init(ictxt,ptype,info) ! building the preconditioner t1 = psb_wtime() diff --git a/test/fileread/psb_zf_sample.f90 b/test/fileread/psb_zf_sample.f90 index fef3be2f..b8ed73d2 100644 --- a/test/fileread/psb_zf_sample.f90 +++ b/test/fileread/psb_zf_sample.f90 @@ -213,7 +213,7 @@ program psb_zf_sample ! - call prec%init(ptype,info) + call prec%init(ictxt,ptype,info) ! building the preconditioner t1 = psb_wtime() diff --git a/test/pargen/psb_d_pde2d.f90 b/test/pargen/psb_d_pde2d.f90 index 955de6ef..8440281b 100644 --- a/test/pargen/psb_d_pde2d.f90 +++ b/test/pargen/psb_d_pde2d.f90 @@ -609,7 +609,7 @@ program psb_d_pde2d ! prepare the preconditioner. ! if(iam == psb_root_) write(psb_out_unit,'("Setting preconditioner to : ",a)')ptype - call prec%init(ptype,info) + call prec%init(ictxt,ptype,info) call psb_barrier(ictxt) t1 = psb_wtime() diff --git a/test/pargen/psb_d_pde3d.f90 b/test/pargen/psb_d_pde3d.f90 index f3c165d1..a34f462e 100644 --- a/test/pargen/psb_d_pde3d.f90 +++ b/test/pargen/psb_d_pde3d.f90 @@ -650,7 +650,7 @@ program psb_d_pde3d ! prepare the preconditioner. ! if(iam == psb_root_) write(psb_out_unit,'("Setting preconditioner to : ",a)')ptype - call prec%init(ptype,info) + call prec%init(ictxt,ptype,info) call psb_barrier(ictxt) t1 = psb_wtime() diff --git a/test/pargen/psb_s_pde2d.f90 b/test/pargen/psb_s_pde2d.f90 index f4a80d0c..ab33a8ba 100644 --- a/test/pargen/psb_s_pde2d.f90 +++ b/test/pargen/psb_s_pde2d.f90 @@ -609,7 +609,7 @@ program psb_s_pde2d ! prepare the preconditioner. ! if(iam == psb_root_) write(psb_out_unit,'("Setting preconditioner to : ",a)')ptype - call prec%init(ptype,info) + call prec%init(ictxt,ptype,info) call psb_barrier(ictxt) t1 = psb_wtime() diff --git a/test/pargen/psb_s_pde3d.f90 b/test/pargen/psb_s_pde3d.f90 index 0ca70230..32c47593 100644 --- a/test/pargen/psb_s_pde3d.f90 +++ b/test/pargen/psb_s_pde3d.f90 @@ -650,7 +650,7 @@ program psb_s_pde3d ! prepare the preconditioner. ! if(iam == psb_root_) write(psb_out_unit,'("Setting preconditioner to : ",a)')ptype - call prec%init(ptype,info) + call prec%init(ictxt,ptype,info) call psb_barrier(ictxt) t1 = psb_wtime()