diff --git a/base/serial/impl/psb_c_coo_impl.F90 b/base/serial/impl/psb_c_coo_impl.F90 index 46391dee..b1d71321 100644 --- a/base/serial/impl/psb_c_coo_impl.F90 +++ b/base/serial/impl/psb_c_coo_impl.F90 @@ -2878,14 +2878,20 @@ subroutine psb_c_coo_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info) if (isza < (nza+nz)) then info = psb_err_alloc_dealloc_; call psb_errpush(info,name) else +#if defined(OPENMP) nzaold = nza nza = nza + nz +#endif call a%set_nzeros(nza) end if !$omp end critical if (info /= 0) goto 9999 call psb_inner_ins(nz,ia,ja,val,nzaold,a%ia,a%ja,a%val,isza,& & imin,imax,jmin,jmax,info) +#if !defined(OPENMP) + nza = nzaold + call a%set_nzeros(nza) +#endif call a%set_sorted(.false.) else if (a%is_upd()) then diff --git a/base/serial/impl/psb_d_coo_impl.F90 b/base/serial/impl/psb_d_coo_impl.F90 index c2babf8e..350085bb 100644 --- a/base/serial/impl/psb_d_coo_impl.F90 +++ b/base/serial/impl/psb_d_coo_impl.F90 @@ -2878,14 +2878,20 @@ subroutine psb_d_coo_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info) if (isza < (nza+nz)) then info = psb_err_alloc_dealloc_; call psb_errpush(info,name) else +#if defined(OPENMP) nzaold = nza nza = nza + nz +#endif call a%set_nzeros(nza) end if !$omp end critical if (info /= 0) goto 9999 call psb_inner_ins(nz,ia,ja,val,nzaold,a%ia,a%ja,a%val,isza,& & imin,imax,jmin,jmax,info) +#if !defined(OPENMP) + nza = nzaold + call a%set_nzeros(nza) +#endif call a%set_sorted(.false.) else if (a%is_upd()) then diff --git a/base/serial/impl/psb_s_coo_impl.F90 b/base/serial/impl/psb_s_coo_impl.F90 index 402c608a..51858efd 100644 --- a/base/serial/impl/psb_s_coo_impl.F90 +++ b/base/serial/impl/psb_s_coo_impl.F90 @@ -2878,14 +2878,20 @@ subroutine psb_s_coo_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info) if (isza < (nza+nz)) then info = psb_err_alloc_dealloc_; call psb_errpush(info,name) else +#if defined(OPENMP) nzaold = nza nza = nza + nz +#endif call a%set_nzeros(nza) end if !$omp end critical if (info /= 0) goto 9999 call psb_inner_ins(nz,ia,ja,val,nzaold,a%ia,a%ja,a%val,isza,& & imin,imax,jmin,jmax,info) +#if !defined(OPENMP) + nza = nzaold + call a%set_nzeros(nza) +#endif call a%set_sorted(.false.) else if (a%is_upd()) then diff --git a/base/serial/impl/psb_z_coo_impl.F90 b/base/serial/impl/psb_z_coo_impl.F90 index 542f842e..0624dd21 100644 --- a/base/serial/impl/psb_z_coo_impl.F90 +++ b/base/serial/impl/psb_z_coo_impl.F90 @@ -2878,14 +2878,20 @@ subroutine psb_z_coo_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info) if (isza < (nza+nz)) then info = psb_err_alloc_dealloc_; call psb_errpush(info,name) else +#if defined(OPENMP) nzaold = nza nza = nza + nz +#endif call a%set_nzeros(nza) end if !$omp end critical if (info /= 0) goto 9999 call psb_inner_ins(nz,ia,ja,val,nzaold,a%ia,a%ja,a%val,isza,& & imin,imax,jmin,jmax,info) +#if !defined(OPENMP) + nza = nzaold + call a%set_nzeros(nza) +#endif call a%set_sorted(.false.) else if (a%is_upd()) then