1. petsc
  2. PETSc
  3. petsc

Commits

Tobin Isaac  committed 0f2063b

MatConvertFrom_MPIAdj: fix use of row length after MatRestoreRow

  • Participants
  • Parent commits 9383aa0
  • Branches master

Comments (0)

Files changed (1)

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

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