From 978019add3ec9c28c5a32c359184cfdf174552a6 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 7 Feb 2012 16:15:13 +0000 Subject: [PATCH] mld2p4-2: examples/fileread/mld_cexample_1lev.f90 examples/fileread/mld_cexample_ml.f90 examples/fileread/mld_dexample_1lev.f90 examples/fileread/mld_dexample_ml.f90 examples/fileread/mld_sexample_1lev.f90 examples/fileread/mld_sexample_ml.f90 examples/fileread/mld_zexample_1lev.f90 examples/fileread/mld_zexample_ml.f90 examples/pdegen/mld_dexample_1lev.f90 examples/pdegen/mld_dexample_ml.f90 examples/pdegen/mld_sexample_1lev.f90 examples/pdegen/mld_sexample_ml.f90 mlprec/mld_c_prec_type.f90 mlprec/mld_d_prec_type.f90 mlprec/mld_s_prec_type.f90 mlprec/mld_z_prec_type.f90 tests/fileread/cf_sample.f90 tests/fileread/df_sample.f90 tests/fileread/sf_sample.f90 tests/fileread/zf_sample.f90 tests/pdegen/ppde.f90 tests/pdegen/spde.f90 Made prec_sizeof into a method of prec. Aligned test programs. --- examples/fileread/mld_cexample_1lev.f90 | 6 +++--- examples/fileread/mld_cexample_ml.f90 | 6 +++--- examples/fileread/mld_dexample_1lev.f90 | 6 +++--- examples/fileread/mld_dexample_ml.f90 | 6 +++--- examples/fileread/mld_sexample_1lev.f90 | 6 +++--- examples/fileread/mld_sexample_ml.f90 | 6 +++--- examples/fileread/mld_zexample_1lev.f90 | 6 +++--- examples/fileread/mld_zexample_ml.f90 | 6 +++--- examples/pdegen/mld_dexample_1lev.f90 | 6 +++--- examples/pdegen/mld_dexample_ml.f90 | 6 +++--- examples/pdegen/mld_sexample_1lev.f90 | 6 +++--- examples/pdegen/mld_sexample_ml.f90 | 6 +++--- mlprec/mld_c_prec_type.f90 | 3 ++- mlprec/mld_d_prec_type.f90 | 3 ++- mlprec/mld_s_prec_type.f90 | 3 ++- mlprec/mld_z_prec_type.f90 | 3 ++- tests/fileread/cf_sample.f90 | 2 +- tests/fileread/df_sample.f90 | 2 +- tests/fileread/sf_sample.f90 | 2 +- tests/fileread/zf_sample.f90 | 2 +- tests/pdegen/ppde.f90 | 2 +- tests/pdegen/spde.f90 | 4 ++-- 22 files changed, 51 insertions(+), 47 deletions(-) diff --git a/examples/fileread/mld_cexample_1lev.f90 b/examples/fileread/mld_cexample_1lev.f90 index aa755dc4..3452c1b3 100644 --- a/examples/fileread/mld_cexample_1lev.f90 +++ b/examples/fileread/mld_cexample_1lev.f90 @@ -241,9 +241,9 @@ program mld_cexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/fileread/mld_cexample_ml.f90 b/examples/fileread/mld_cexample_ml.f90 index d8f60f13..4f5a9765 100644 --- a/examples/fileread/mld_cexample_ml.f90 +++ b/examples/fileread/mld_cexample_ml.f90 @@ -278,9 +278,9 @@ program mld_cexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/fileread/mld_dexample_1lev.f90 b/examples/fileread/mld_dexample_1lev.f90 index 31d7337d..bf19a1bf 100644 --- a/examples/fileread/mld_dexample_1lev.f90 +++ b/examples/fileread/mld_dexample_1lev.f90 @@ -240,9 +240,9 @@ program mld_dexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/fileread/mld_dexample_ml.f90 b/examples/fileread/mld_dexample_ml.f90 index d571d166..bfe25467 100644 --- a/examples/fileread/mld_dexample_ml.f90 +++ b/examples/fileread/mld_dexample_ml.f90 @@ -277,9 +277,9 @@ program mld_dexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/fileread/mld_sexample_1lev.f90 b/examples/fileread/mld_sexample_1lev.f90 index f17e356b..045abce3 100644 --- a/examples/fileread/mld_sexample_1lev.f90 +++ b/examples/fileread/mld_sexample_1lev.f90 @@ -241,9 +241,9 @@ program mld_sexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/fileread/mld_sexample_ml.f90 b/examples/fileread/mld_sexample_ml.f90 index fd00da86..4999bcfc 100644 --- a/examples/fileread/mld_sexample_ml.f90 +++ b/examples/fileread/mld_sexample_ml.f90 @@ -278,9 +278,9 @@ program mld_sexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/fileread/mld_zexample_1lev.f90 b/examples/fileread/mld_zexample_1lev.f90 index 4eb38503..3e4239f6 100644 --- a/examples/fileread/mld_zexample_1lev.f90 +++ b/examples/fileread/mld_zexample_1lev.f90 @@ -240,9 +240,9 @@ program mld_zexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/fileread/mld_zexample_ml.f90 b/examples/fileread/mld_zexample_ml.f90 index da1c48d7..0081f037 100644 --- a/examples/fileread/mld_zexample_ml.f90 +++ b/examples/fileread/mld_zexample_ml.f90 @@ -277,9 +277,9 @@ program mld_zexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/pdegen/mld_dexample_1lev.f90 b/examples/pdegen/mld_dexample_1lev.f90 index 69c7fec5..0a552c4d 100644 --- a/examples/pdegen/mld_dexample_1lev.f90 +++ b/examples/pdegen/mld_dexample_1lev.f90 @@ -193,9 +193,9 @@ program mld_dexample_1lev call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/pdegen/mld_dexample_ml.f90 b/examples/pdegen/mld_dexample_ml.f90 index 8aaf5701..79f5d682 100644 --- a/examples/pdegen/mld_dexample_ml.f90 +++ b/examples/pdegen/mld_dexample_ml.f90 @@ -229,9 +229,9 @@ program mld_dexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/pdegen/mld_sexample_1lev.f90 b/examples/pdegen/mld_sexample_1lev.f90 index 719d3df2..97b36820 100644 --- a/examples/pdegen/mld_sexample_1lev.f90 +++ b/examples/pdegen/mld_sexample_1lev.f90 @@ -194,9 +194,9 @@ program mld_sexample_1lev call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/examples/pdegen/mld_sexample_ml.f90 b/examples/pdegen/mld_sexample_ml.f90 index 88608d5f..bbe07863 100644 --- a/examples/pdegen/mld_sexample_ml.f90 +++ b/examples/pdegen/mld_sexample_ml.f90 @@ -230,9 +230,9 @@ program mld_sexample_ml call psb_genrm2s(resmx,r,desc_A,info) call psb_geamaxs(resmxp,r,desc_A,info) - amatsize = psb_sizeof(A) - descsize = psb_sizeof(desc_A) - precsize = mld_sizeof(P) + amatsize = a%sizeof() + descsize = desc_a%sizeof() + precsize = p%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/mlprec/mld_c_prec_type.f90 b/mlprec/mld_c_prec_type.f90 index 0b0981bb..a39eef0b 100644 --- a/mlprec/mld_c_prec_type.f90 +++ b/mlprec/mld_c_prec_type.f90 @@ -92,6 +92,7 @@ module mld_c_prec_type procedure, pass(prec) :: get_complexity => mld_c_get_compl procedure, pass(prec) :: cmp_complexity => mld_c_cmp_compl procedure, pass(prec) :: get_nzeros => mld_c_get_nzeros + procedure, pass(prec) :: sizeof => mld_cprec_sizeof end type mld_cprec_type private :: mld_c_dump, mld_c_get_compl, mld_c_cmp_compl,& @@ -178,7 +179,7 @@ contains function mld_cprec_sizeof(prec) result(val) implicit none - type(mld_cprec_type), intent(in) :: prec + class(mld_cprec_type), intent(in) :: prec integer(psb_long_int_k_) :: val integer :: i val = 0 diff --git a/mlprec/mld_d_prec_type.f90 b/mlprec/mld_d_prec_type.f90 index 550519cf..74b4a1f7 100644 --- a/mlprec/mld_d_prec_type.f90 +++ b/mlprec/mld_d_prec_type.f90 @@ -92,6 +92,7 @@ module mld_d_prec_type procedure, pass(prec) :: get_complexity => mld_d_get_compl procedure, pass(prec) :: cmp_complexity => mld_d_cmp_compl procedure, pass(prec) :: get_nzeros => mld_d_get_nzeros + procedure, pass(prec) :: sizeof => mld_dprec_sizeof end type mld_dprec_type private :: mld_d_dump, mld_d_get_compl, mld_d_cmp_compl,& @@ -178,7 +179,7 @@ contains function mld_dprec_sizeof(prec) result(val) implicit none - type(mld_dprec_type), intent(in) :: prec + class(mld_dprec_type), intent(in) :: prec integer(psb_long_int_k_) :: val integer :: i val = 0 diff --git a/mlprec/mld_s_prec_type.f90 b/mlprec/mld_s_prec_type.f90 index f332722b..5972a517 100644 --- a/mlprec/mld_s_prec_type.f90 +++ b/mlprec/mld_s_prec_type.f90 @@ -92,6 +92,7 @@ module mld_s_prec_type procedure, pass(prec) :: get_complexity => mld_s_get_compl procedure, pass(prec) :: cmp_complexity => mld_s_cmp_compl procedure, pass(prec) :: get_nzeros => mld_s_get_nzeros + procedure, pass(prec) :: sizeof => mld_sprec_sizeof end type mld_sprec_type private :: mld_s_dump, mld_s_get_compl, mld_s_cmp_compl,& @@ -178,7 +179,7 @@ contains function mld_sprec_sizeof(prec) result(val) implicit none - type(mld_sprec_type), intent(in) :: prec + class(mld_sprec_type), intent(in) :: prec integer(psb_long_int_k_) :: val integer :: i val = 0 diff --git a/mlprec/mld_z_prec_type.f90 b/mlprec/mld_z_prec_type.f90 index b32f9380..cd29b8af 100644 --- a/mlprec/mld_z_prec_type.f90 +++ b/mlprec/mld_z_prec_type.f90 @@ -92,6 +92,7 @@ module mld_z_prec_type procedure, pass(prec) :: get_complexity => mld_z_get_compl procedure, pass(prec) :: cmp_complexity => mld_z_cmp_compl procedure, pass(prec) :: get_nzeros => mld_z_get_nzeros + procedure, pass(prec) :: sizeof => mld_zprec_sizeof end type mld_zprec_type private :: mld_z_dump, mld_z_get_compl, mld_z_cmp_compl,& @@ -178,7 +179,7 @@ contains function mld_zprec_sizeof(prec) result(val) implicit none - type(mld_zprec_type), intent(in) :: prec + class(mld_zprec_type), intent(in) :: prec integer(psb_long_int_k_) :: val integer :: i val = 0 diff --git a/tests/fileread/cf_sample.f90 b/tests/fileread/cf_sample.f90 index 0a46eaf2..d4b84c20 100644 --- a/tests/fileread/cf_sample.f90 +++ b/tests/fileread/cf_sample.f90 @@ -317,7 +317,7 @@ program cf_sample amatsize = a%sizeof() descsize = desc_a%sizeof() - precsize = mld_sizeof(prec) + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/tests/fileread/df_sample.f90 b/tests/fileread/df_sample.f90 index 0f2af0d8..590f4b6f 100644 --- a/tests/fileread/df_sample.f90 +++ b/tests/fileread/df_sample.f90 @@ -321,7 +321,7 @@ program df_sample amatsize = a%sizeof() descsize = desc_a%sizeof() - precsize = mld_sizeof(prec) + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/tests/fileread/sf_sample.f90 b/tests/fileread/sf_sample.f90 index fdc4307d..a170495a 100644 --- a/tests/fileread/sf_sample.f90 +++ b/tests/fileread/sf_sample.f90 @@ -317,7 +317,7 @@ program sf_sample amatsize = a%sizeof() descsize = desc_a%sizeof() - precsize = mld_sizeof(prec) + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/tests/fileread/zf_sample.f90 b/tests/fileread/zf_sample.f90 index 035f091f..005da4b6 100644 --- a/tests/fileread/zf_sample.f90 +++ b/tests/fileread/zf_sample.f90 @@ -317,7 +317,7 @@ program zf_sample amatsize = a%sizeof() descsize = desc_a%sizeof() - precsize = mld_sizeof(prec) + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/tests/pdegen/ppde.f90 b/tests/pdegen/ppde.f90 index 5207b03d..59d66211 100644 --- a/tests/pdegen/ppde.f90 +++ b/tests/pdegen/ppde.f90 @@ -260,7 +260,7 @@ program ppde amatsize = a%sizeof() descsize = desc_a%sizeof() - precsize = mld_sizeof(prec) + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize) diff --git a/tests/pdegen/spde.f90 b/tests/pdegen/spde.f90 index b5c18a4b..5ccfee6b 100644 --- a/tests/pdegen/spde.f90 +++ b/tests/pdegen/spde.f90 @@ -258,9 +258,9 @@ program spde t2 = psb_wtime() - t1 call psb_amx(ictxt,t2) - amatsize = psb_sizeof(a) + amatsize = a%sizeof() descsize = desc_a%sizeof() - precsize = mld_sizeof(prec) + precsize = prec%sizeof() call psb_sum(ictxt,amatsize) call psb_sum(ictxt,descsize) call psb_sum(ictxt,precsize)