From 3c6dcddfea9c7caa33ead54deffed9ffe9453185 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 16 Mar 2021 16:43:41 +0100 Subject: [PATCH] Fix sizeof --- prec/psb_c_prec_type.f90 | 9 ++------- prec/psb_d_prec_type.f90 | 9 ++------- prec/psb_s_prec_type.f90 | 9 ++------- prec/psb_z_prec_type.f90 | 9 ++------- 4 files changed, 8 insertions(+), 28 deletions(-) diff --git a/prec/psb_c_prec_type.f90 b/prec/psb_c_prec_type.f90 index 32225d31..dea15741 100644 --- a/prec/psb_c_prec_type.f90 +++ b/prec/psb_c_prec_type.f90 @@ -400,13 +400,8 @@ contains global_ = .false. end if - val = 0 - val = val + psb_sizeof_int - if (allocated(prec%precv)) then - do i=1, size(prec%precv) - val = val + prec%precv(i)%sizeof() - end do - end if + val = 0 + val = val + prec%prec%sizeof() if (global_) then ctxt = prec%ctxt call psb_sum(ctxt,val) diff --git a/prec/psb_d_prec_type.f90 b/prec/psb_d_prec_type.f90 index 1c697570..54ddd992 100644 --- a/prec/psb_d_prec_type.f90 +++ b/prec/psb_d_prec_type.f90 @@ -400,13 +400,8 @@ contains global_ = .false. end if - val = 0 - val = val + psb_sizeof_int - if (allocated(prec%precv)) then - do i=1, size(prec%precv) - val = val + prec%precv(i)%sizeof() - end do - end if + val = 0 + val = val + prec%prec%sizeof() if (global_) then ctxt = prec%ctxt call psb_sum(ctxt,val) diff --git a/prec/psb_s_prec_type.f90 b/prec/psb_s_prec_type.f90 index 1785572a..255f40cc 100644 --- a/prec/psb_s_prec_type.f90 +++ b/prec/psb_s_prec_type.f90 @@ -400,13 +400,8 @@ contains global_ = .false. end if - val = 0 - val = val + psb_sizeof_int - if (allocated(prec%precv)) then - do i=1, size(prec%precv) - val = val + prec%precv(i)%sizeof() - end do - end if + val = 0 + val = val + prec%prec%sizeof() if (global_) then ctxt = prec%ctxt call psb_sum(ctxt,val) diff --git a/prec/psb_z_prec_type.f90 b/prec/psb_z_prec_type.f90 index 805a93e4..a6039032 100644 --- a/prec/psb_z_prec_type.f90 +++ b/prec/psb_z_prec_type.f90 @@ -400,13 +400,8 @@ contains global_ = .false. end if - val = 0 - val = val + psb_sizeof_int - if (allocated(prec%precv)) then - do i=1, size(prec%precv) - val = val + prec%precv(i)%sizeof() - end do - end if + val = 0 + val = val + prec%prec%sizeof() if (global_) then ctxt = prec%ctxt call psb_sum(ctxt,val)