I noticed that the current next is broken in MatZeroRows The following patch solves the problem
[szampini@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: [email protected] SkypeID: stefano.zampini GoogleTalk: [email protected] Tel: +39 06.44486.707 ------------------------------------------------------------------------------------------------------------------------
