[petsc-dev] Broken ZeroRows in next
Stefano Zampini
s.zampini at cineca.it
Tue Nov 5 12:41:38 CST 2013
I noticed that the current next is broken in MatZeroRows
The following patch solves the problem
[szampini at node362 petsc]$ git diff src/mat/impls/aij/mpi/mpiaij.c
diff --git a/src/mat/impls/aij/mpi/mpiaij.c b/src/mat/impls/aij/mpi/mpiaij.c
index 820d52e..41f89e9 100644
--- a/src/mat/impls/aij/mpi/mpiaij.c
+++ b/src/mat/impls/aij/mpi/mpiaij.c
@@ -778,6 +778,7 @@ PetscErrorCode MatZeroRows_MPIAIJ(Mat A,PetscInt
N,const PetscInt rows[],PetscSc
ierr = PetscSFSetGraph(sf, n, N, NULL, PETSC_OWN_POINTER, rrows,
PETSC_OWN_POINTER);CHKERRQ(ierr);
/* Collect flags for rows to be zeroed */
ierr = PetscSFReduceBegin(sf, MPIU_INT, rows, lrows,
MPI_LOR);CHKERRQ(ierr);
+ ierr = PetscSFReduceEnd(sf, MPIU_INT, rows, lrows,
MPI_LOR);CHKERRQ(ierr);
ierr = PetscSFDestroy(&sf);CHKERRQ(ierr);
/* Compress and put in row numbers */
for (r = 0; r < n; ++r) if (lrows[r]) lrows[len++] = r;
--
Ph. D. Stefano Zampini
CINECA
SuperComputing Applications and Innovations Department - SCAI
Via dei Tizii, 6 00185 Roma - ITALY
------------------------------------------------------------------------------------------------------------------------
Email: s.zampini at cineca.it
SkypeID: stefano.zampini
GoogleTalk: stefano.zampini at gmail.com
Tel: +39 06.44486.707
------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131105/170fd1df/attachment.html>
More information about the petsc-dev
mailing list