From fa4623f54b20a626692db621d714e58734818084 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 22 Apr 2020 10:41:08 +0100 Subject: [PATCH] Ensure using correct NZ value --- mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 | 3 ++- mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 | 3 ++- mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 | 3 ++- mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 b/mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 index 0e75eb30..deea748f 100644 --- a/mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 +++ b/mlprec/impl/aggregator/mld_c_spmm_bld_inner.f90 @@ -170,10 +170,11 @@ subroutine mld_c_spmm_bld_inner(a_csr,desc_a,nlaggr,parms,ac,& call csr_restr%free() call acsr3%free() call ac_csr%mv_to_lcoo(ac_coo,info) - call ac_coo%fix(info) nza = ac_coo%get_nzeros() if (debug) write(0,*) me,trim(name),' Fixing ac ',& & ac_coo%get_nrows(),ac_coo%get_ncols(), nza + call ac_coo%fix(info) + nza = ac_coo%get_nzeros() call desc_cprol%indxmap%l2gip(ac_coo%ia(1:nza),info) call desc_cprol%indxmap%l2gip(ac_coo%ja(1:nza),info) call ac_coo%set_nrows(ntaggr) diff --git a/mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 b/mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 index 0d85c647..ecde7398 100644 --- a/mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 +++ b/mlprec/impl/aggregator/mld_d_spmm_bld_inner.f90 @@ -170,10 +170,11 @@ subroutine mld_d_spmm_bld_inner(a_csr,desc_a,nlaggr,parms,ac,& call csr_restr%free() call acsr3%free() call ac_csr%mv_to_lcoo(ac_coo,info) - call ac_coo%fix(info) nza = ac_coo%get_nzeros() if (debug) write(0,*) me,trim(name),' Fixing ac ',& & ac_coo%get_nrows(),ac_coo%get_ncols(), nza + call ac_coo%fix(info) + nza = ac_coo%get_nzeros() call desc_cprol%indxmap%l2gip(ac_coo%ia(1:nza),info) call desc_cprol%indxmap%l2gip(ac_coo%ja(1:nza),info) call ac_coo%set_nrows(ntaggr) diff --git a/mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 b/mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 index 4ae68bbb..a2c2d1d0 100644 --- a/mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 +++ b/mlprec/impl/aggregator/mld_s_spmm_bld_inner.f90 @@ -170,10 +170,11 @@ subroutine mld_s_spmm_bld_inner(a_csr,desc_a,nlaggr,parms,ac,& call csr_restr%free() call acsr3%free() call ac_csr%mv_to_lcoo(ac_coo,info) - call ac_coo%fix(info) nza = ac_coo%get_nzeros() if (debug) write(0,*) me,trim(name),' Fixing ac ',& & ac_coo%get_nrows(),ac_coo%get_ncols(), nza + call ac_coo%fix(info) + nza = ac_coo%get_nzeros() call desc_cprol%indxmap%l2gip(ac_coo%ia(1:nza),info) call desc_cprol%indxmap%l2gip(ac_coo%ja(1:nza),info) call ac_coo%set_nrows(ntaggr) diff --git a/mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 b/mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 index 98aa63f2..b0c459d5 100644 --- a/mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 +++ b/mlprec/impl/aggregator/mld_z_spmm_bld_inner.f90 @@ -170,10 +170,11 @@ subroutine mld_z_spmm_bld_inner(a_csr,desc_a,nlaggr,parms,ac,& call csr_restr%free() call acsr3%free() call ac_csr%mv_to_lcoo(ac_coo,info) - call ac_coo%fix(info) nza = ac_coo%get_nzeros() if (debug) write(0,*) me,trim(name),' Fixing ac ',& & ac_coo%get_nrows(),ac_coo%get_ncols(), nza + call ac_coo%fix(info) + nza = ac_coo%get_nzeros() call desc_cprol%indxmap%l2gip(ac_coo%ia(1:nza),info) call desc_cprol%indxmap%l2gip(ac_coo%ja(1:nza),info) call ac_coo%set_nrows(ntaggr)