From 204faaba127d4e237acda37838fdce389d69c77c Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 7 Feb 2012 15:54:02 +0000 Subject: [PATCH] psblas3: prec/psb_c_prec_type.f90 prec/psb_d_prec_type.f90 prec/psb_s_prec_type.f90 prec/psb_z_prec_type.f90 test/fileread/cf_sample.f90 test/fileread/df_sample.f90 test/fileread/sf_sample.f90 test/fileread/zf_sample.f90 test/pargen/ppde.f90 test/pargen/runs/ppde.inp test/pargen/spde.f90 Made prec_sizeof into a method of prec. --- prec/psb_c_prec_type.f90 | 5 +++-- prec/psb_d_prec_type.f90 | 5 +++-- prec/psb_s_prec_type.f90 | 5 +++-- prec/psb_z_prec_type.f90 | 5 +++-- test/fileread/cf_sample.f90 | 6 +++--- test/fileread/df_sample.f90 | 6 +++--- test/fileread/sf_sample.f90 | 6 +++--- test/fileread/zf_sample.f90 | 6 +++--- test/pargen/ppde.f90 | 6 +++--- test/pargen/runs/ppde.inp | 4 ++-- test/pargen/spde.f90 | 8 ++++---- 11 files changed, 33 insertions(+), 29 deletions(-) diff --git a/prec/psb_c_prec_type.f90 b/prec/psb_c_prec_type.f90 index a751b921..977fa286 100644 --- a/prec/psb_c_prec_type.f90 +++ b/prec/psb_c_prec_type.f90 @@ -47,6 +47,7 @@ module psb_c_prec_type procedure, pass(prec) :: psb_c_apply1v generic, public :: apply => psb_c_apply2v, psb_c_apply1v,& & psb_c_apply1_vect, psb_c_apply2_vect + procedure, pass(prec) :: sizeof => psb_cprec_sizeof end type psb_cprec_type interface psb_precfree @@ -195,9 +196,9 @@ contains type(psb_cprec_type), intent(inout) :: p end subroutine psb_nullify_cprec - + function psb_cprec_sizeof(prec) result(val) - type(psb_cprec_type), intent(in) :: prec + class(psb_cprec_type), intent(in) :: prec integer(psb_long_int_k_) :: val integer(psb_ipk_) :: i diff --git a/prec/psb_d_prec_type.f90 b/prec/psb_d_prec_type.f90 index c03326d3..ad7d1164 100644 --- a/prec/psb_d_prec_type.f90 +++ b/prec/psb_d_prec_type.f90 @@ -47,6 +47,7 @@ module psb_d_prec_type procedure, pass(prec) :: psb_d_apply1v generic, public :: apply => psb_d_apply2v, psb_d_apply1v,& & psb_d_apply1_vect, psb_d_apply2_vect + procedure, pass(prec) :: sizeof => psb_dprec_sizeof end type psb_dprec_type interface psb_precfree @@ -195,9 +196,9 @@ contains type(psb_dprec_type), intent(inout) :: p end subroutine psb_nullify_cprec - + function psb_dprec_sizeof(prec) result(val) - type(psb_dprec_type), intent(in) :: prec + class(psb_dprec_type), intent(in) :: prec integer(psb_long_int_k_) :: val integer(psb_ipk_) :: i diff --git a/prec/psb_s_prec_type.f90 b/prec/psb_s_prec_type.f90 index 7bd29d00..3cd7edea 100644 --- a/prec/psb_s_prec_type.f90 +++ b/prec/psb_s_prec_type.f90 @@ -47,6 +47,7 @@ module psb_s_prec_type procedure, pass(prec) :: psb_s_apply1v generic, public :: apply => psb_s_apply2v, psb_s_apply1v,& & psb_s_apply1_vect, psb_s_apply2_vect + procedure, pass(prec) :: sizeof => psb_sprec_sizeof end type psb_sprec_type interface psb_precfree @@ -195,9 +196,9 @@ contains type(psb_sprec_type), intent(inout) :: p end subroutine psb_nullify_cprec - + function psb_sprec_sizeof(prec) result(val) - type(psb_sprec_type), intent(in) :: prec + class(psb_sprec_type), intent(in) :: prec integer(psb_long_int_k_) :: val integer(psb_ipk_) :: i diff --git a/prec/psb_z_prec_type.f90 b/prec/psb_z_prec_type.f90 index bf769bf0..b3eeea13 100644 --- a/prec/psb_z_prec_type.f90 +++ b/prec/psb_z_prec_type.f90 @@ -47,6 +47,7 @@ module psb_z_prec_type procedure, pass(prec) :: psb_z_apply1v generic, public :: apply => psb_z_apply2v, psb_z_apply1v,& & psb_z_apply1_vect, psb_z_apply2_vect + procedure, pass(prec) :: sizeof => psb_zprec_sizeof end type psb_zprec_type interface psb_precfree @@ -195,9 +196,9 @@ contains type(psb_zprec_type), intent(inout) :: p end subroutine psb_nullify_cprec - + function psb_zprec_sizeof(prec) result(val) - type(psb_zprec_type), intent(in) :: prec + class(psb_zprec_type), intent(in) :: prec integer(psb_long_int_k_) :: val integer(psb_ipk_) :: i diff --git a/test/fileread/cf_sample.f90 b/test/fileread/cf_sample.f90 index 48d33aa8..1c39e48b 100644 --- a/test/fileread/cf_sample.f90 +++ b/test/fileread/cf_sample.f90 @@ -259,9 +259,9 @@ program cf_sample resmx = psb_genrm2(r_col,desc_a,info) resmxp = psb_geamax(r_col,desc_a,info) - amatsize = psb_sizeof(a) - descsize = psb_sizeof(desc_a) - precsize = psb_sizeof(prec) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/test/fileread/df_sample.f90 b/test/fileread/df_sample.f90 index 961ce6d2..b0a69993 100644 --- a/test/fileread/df_sample.f90 +++ b/test/fileread/df_sample.f90 @@ -264,9 +264,9 @@ program df_sample resmx = psb_genrm2(r_col,desc_a,info) resmxp = psb_geamax(r_col,desc_a,info) - amatsize = psb_sizeof(a) - descsize = psb_sizeof(desc_a) - precsize = psb_sizeof(prec) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/test/fileread/sf_sample.f90 b/test/fileread/sf_sample.f90 index 56728d5b..b27dd983 100644 --- a/test/fileread/sf_sample.f90 +++ b/test/fileread/sf_sample.f90 @@ -262,9 +262,9 @@ program sf_sample resmx = psb_genrm2(r_col,desc_a,info) resmxp = psb_geamax(r_col,desc_a,info) - amatsize = psb_sizeof(a) - descsize = psb_sizeof(desc_a) - precsize = psb_sizeof(prec) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/test/fileread/zf_sample.f90 b/test/fileread/zf_sample.f90 index def73549..988d9363 100644 --- a/test/fileread/zf_sample.f90 +++ b/test/fileread/zf_sample.f90 @@ -259,9 +259,9 @@ program zf_sample resmx = psb_genrm2(r_col,desc_a,info) resmxp = psb_geamax(r_col,desc_a,info) - amatsize = psb_sizeof(a) - descsize = psb_sizeof(desc_a) - precsize = psb_sizeof(prec) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/test/pargen/ppde.f90 b/test/pargen/ppde.f90 index f33d6d0f..3fef67c4 100644 --- a/test/pargen/ppde.f90 +++ b/test/pargen/ppde.f90 @@ -195,9 +195,9 @@ program ppde call psb_barrier(ictxt) t2 = psb_wtime() - t1 call psb_amx(ictxt,t2) - amatsize = psb_sizeof(a) - descsize = psb_sizeof(desc_a) - precsize = psb_sizeof(prec) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/test/pargen/runs/ppde.inp b/test/pargen/runs/ppde.inp index 09b8c6e0..7f210448 100644 --- a/test/pargen/runs/ppde.inp +++ b/test/pargen/runs/ppde.inp @@ -2,10 +2,10 @@ BICGSTAB Iterative method BICGSTAB CGS BICG BICGSTABL RGMRES BJAC Preconditioner NONE DIAG BJAC CSR Storage format for matrix A: CSR COO JAD -040 Domain size (acutal system is this**3) +100 Domain size (acutal system is this**3) 2 Stopping criterion 0200 MAXIT -02 ITRACE +-2 ITRACE 02 IRST restart for RGMRES and BiCGSTABL diff --git a/test/pargen/spde.f90 b/test/pargen/spde.f90 index 02da534a..416315c4 100644 --- a/test/pargen/spde.f90 +++ b/test/pargen/spde.f90 @@ -195,12 +195,12 @@ program ppde call psb_barrier(ictxt) t2 = psb_wtime() - t1 call psb_amx(ictxt,t2) - amatsize = psb_sizeof(a) - descsize = psb_sizeof(desc_a) - precsize = psb_sizeof(prec) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) - call psb_sum(ictxt,precsize) + call psb_sum(ictxt,precsize) if (iam == psb_root_) then write(psb_out_unit,'(" ")')