From b9b1c878bb593929bf9bb51f00061f5af1d66c32 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 19 Mar 2019 17:00:00 +0000 Subject: [PATCH] Fix printout of global sizes with long integer kind. --- mlprec/impl/level/mld_c_base_onelev_descr.f90 | 2 +- mlprec/impl/level/mld_d_base_onelev_descr.f90 | 2 +- mlprec/impl/level/mld_s_base_onelev_descr.f90 | 2 +- mlprec/impl/level/mld_z_base_onelev_descr.f90 | 2 +- mlprec/mld_c_onelev_mod.f90 | 3 ++- mlprec/mld_d_onelev_mod.f90 | 5 +++-- mlprec/mld_s_onelev_mod.f90 | 3 ++- mlprec/mld_z_onelev_mod.f90 | 3 ++- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/mlprec/impl/level/mld_c_base_onelev_descr.f90 b/mlprec/impl/level/mld_c_base_onelev_descr.f90 index f271be0c..aef7c868 100644 --- a/mlprec/impl/level/mld_c_base_onelev_descr.f90 +++ b/mlprec/impl/level/mld_c_base_onelev_descr.f90 @@ -91,7 +91,7 @@ subroutine mld_c_base_onelev_descr(lv,il,nl,ilmin,info,iout) if (nl > 1) then if (allocated(lv%map%naggr)) then write(iout_,*) ' Coarse Matrix: Global size: ', & - & sum(lv%map%naggr(:)),' Nonzeros: ',lv%ac_nz_tot + & sum((1_psb_lpk_*lv%map%naggr(:))),' Nonzeros: ',lv%ac_nz_tot write(iout_,*) ' Local matrix sizes: ', & & lv%map%naggr(:) write(iout_,*) ' Aggregation ratio: ', & diff --git a/mlprec/impl/level/mld_d_base_onelev_descr.f90 b/mlprec/impl/level/mld_d_base_onelev_descr.f90 index 6ca546df..2ae49217 100644 --- a/mlprec/impl/level/mld_d_base_onelev_descr.f90 +++ b/mlprec/impl/level/mld_d_base_onelev_descr.f90 @@ -91,7 +91,7 @@ subroutine mld_d_base_onelev_descr(lv,il,nl,ilmin,info,iout) if (nl > 1) then if (allocated(lv%map%naggr)) then write(iout_,*) ' Coarse Matrix: Global size: ', & - & sum(lv%map%naggr(:)),' Nonzeros: ',lv%ac_nz_tot + & sum((1_psb_lpk_*lv%map%naggr(:))),' Nonzeros: ',lv%ac_nz_tot write(iout_,*) ' Local matrix sizes: ', & & lv%map%naggr(:) write(iout_,*) ' Aggregation ratio: ', & diff --git a/mlprec/impl/level/mld_s_base_onelev_descr.f90 b/mlprec/impl/level/mld_s_base_onelev_descr.f90 index 5c09e28b..1862385f 100644 --- a/mlprec/impl/level/mld_s_base_onelev_descr.f90 +++ b/mlprec/impl/level/mld_s_base_onelev_descr.f90 @@ -91,7 +91,7 @@ subroutine mld_s_base_onelev_descr(lv,il,nl,ilmin,info,iout) if (nl > 1) then if (allocated(lv%map%naggr)) then write(iout_,*) ' Coarse Matrix: Global size: ', & - & sum(lv%map%naggr(:)),' Nonzeros: ',lv%ac_nz_tot + & sum((1_psb_lpk_*lv%map%naggr(:))),' Nonzeros: ',lv%ac_nz_tot write(iout_,*) ' Local matrix sizes: ', & & lv%map%naggr(:) write(iout_,*) ' Aggregation ratio: ', & diff --git a/mlprec/impl/level/mld_z_base_onelev_descr.f90 b/mlprec/impl/level/mld_z_base_onelev_descr.f90 index 7ec9e91f..cadd83ca 100644 --- a/mlprec/impl/level/mld_z_base_onelev_descr.f90 +++ b/mlprec/impl/level/mld_z_base_onelev_descr.f90 @@ -91,7 +91,7 @@ subroutine mld_z_base_onelev_descr(lv,il,nl,ilmin,info,iout) if (nl > 1) then if (allocated(lv%map%naggr)) then write(iout_,*) ' Coarse Matrix: Global size: ', & - & sum(lv%map%naggr(:)),' Nonzeros: ',lv%ac_nz_tot + & sum((1_psb_lpk_*lv%map%naggr(:))),' Nonzeros: ',lv%ac_nz_tot write(iout_,*) ' Local matrix sizes: ', & & lv%map%naggr(:) write(iout_,*) ' Aggregation ratio: ', & diff --git a/mlprec/mld_c_onelev_mod.f90 b/mlprec/mld_c_onelev_mod.f90 index 76663134..475e91e1 100644 --- a/mlprec/mld_c_onelev_mod.f90 +++ b/mlprec/mld_c_onelev_mod.f90 @@ -160,7 +160,8 @@ module mld_c_onelev_mod class(mld_c_base_aggregator_type), allocatable :: aggr type(mld_sml_parms) :: parms type(psb_cspmat_type) :: ac - integer(psb_ipk_) :: ac_nz_loc, ac_nz_tot + integer(psb_ipk_) :: ac_nz_loc + integer(psb_lpk_) :: ac_nz_tot type(psb_desc_type) :: desc_ac type(psb_cspmat_type), pointer :: base_a => null() type(psb_desc_type), pointer :: base_desc => null() diff --git a/mlprec/mld_d_onelev_mod.f90 b/mlprec/mld_d_onelev_mod.f90 index fc92621a..34f3be63 100644 --- a/mlprec/mld_d_onelev_mod.f90 +++ b/mlprec/mld_d_onelev_mod.f90 @@ -160,7 +160,8 @@ module mld_d_onelev_mod class(mld_d_base_aggregator_type), allocatable :: aggr type(mld_dml_parms) :: parms type(psb_dspmat_type) :: ac - integer(psb_ipk_) :: ac_nz_loc, ac_nz_tot + integer(psb_ipk_) :: ac_nz_loc + integer(psb_lpk_) :: ac_nz_tot type(psb_desc_type) :: desc_ac type(psb_dspmat_type), pointer :: base_a => null() type(psb_desc_type), pointer :: base_desc => null() @@ -421,7 +422,7 @@ contains val = val + lv%desc_ac%sizeof() val = val + lv%ac%sizeof() val = val + lv%tprol%sizeof() - val = val + lv%map%sizeof() + val = val + lv%map%sizeof() if (allocated(lv%sm)) val = val + lv%sm%sizeof() if (allocated(lv%sm2a)) val = val + lv%sm2a%sizeof() end function d_base_onelev_sizeof diff --git a/mlprec/mld_s_onelev_mod.f90 b/mlprec/mld_s_onelev_mod.f90 index ab456ce3..e9667402 100644 --- a/mlprec/mld_s_onelev_mod.f90 +++ b/mlprec/mld_s_onelev_mod.f90 @@ -160,7 +160,8 @@ module mld_s_onelev_mod class(mld_s_base_aggregator_type), allocatable :: aggr type(mld_sml_parms) :: parms type(psb_sspmat_type) :: ac - integer(psb_ipk_) :: ac_nz_loc, ac_nz_tot + integer(psb_ipk_) :: ac_nz_loc + integer(psb_lpk_) :: ac_nz_tot type(psb_desc_type) :: desc_ac type(psb_sspmat_type), pointer :: base_a => null() type(psb_desc_type), pointer :: base_desc => null() diff --git a/mlprec/mld_z_onelev_mod.f90 b/mlprec/mld_z_onelev_mod.f90 index 253a10e5..124fc8d2 100644 --- a/mlprec/mld_z_onelev_mod.f90 +++ b/mlprec/mld_z_onelev_mod.f90 @@ -160,7 +160,8 @@ module mld_z_onelev_mod class(mld_z_base_aggregator_type), allocatable :: aggr type(mld_dml_parms) :: parms type(psb_zspmat_type) :: ac - integer(psb_ipk_) :: ac_nz_loc, ac_nz_tot + integer(psb_ipk_) :: ac_nz_loc + integer(psb_lpk_) :: ac_nz_tot type(psb_desc_type) :: desc_ac type(psb_zspmat_type), pointer :: base_a => null() type(psb_desc_type), pointer :: base_desc => null()