Commits

Jed Brown committed fa2fae7 Merge

Merge branch 'jed/mat-restore-zeros'

* jed/mat-restore-zeros:
MatConvertFrom_MPIAdj: fix use of row length after MatRestoreRow

Comments (0)

Files changed (1)

src/mat/impls/adj/mpi/mpiadj.c

     for (j=0; j<len; j++) {
       if (rj[j] == i+rstart) {len--; break;}    /* don't count diagonal */
     }
-    ierr    = MatRestoreRow(A,i+rstart,&len,&rj,NULL);CHKERRQ(ierr);
     nzeros += len;
+    ierr    = MatRestoreRow(A,i+rstart,&len,&rj,NULL);CHKERRQ(ierr);
   }
 
   /* malloc space for nonzeros */