Commits

Tobin Isaac committed 0f2063b

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 */