Commits

Peter Brune committed fb39691

Better logging of states of colorings; better error checking

  • Participants
  • Parent commits a402c28

Comments (0)

Files changed (7)

File include/petsc-private/matimpl.h

 PETSC_EXTERN PetscLogEvent MAT_CUSPCopyToGPU, MAT_CUSPARSECopyToGPU, MAT_SetValuesBatch, MAT_SetValuesBatchI, MAT_SetValuesBatchII, MAT_SetValuesBatchIII, MAT_SetValuesBatchIV;
 PETSC_EXTERN PetscLogEvent MAT_ViennaCLCopyToGPU;
 PETSC_EXTERN PetscLogEvent MAT_Merge,MAT_Residual;
-PETSC_EXTERN PetscLogEvent Mat_Coloring_Apply,Mat_Coloring_Comm;
+PETSC_EXTERN PetscLogEvent Mat_Coloring_Apply,Mat_Coloring_Comm,Mat_Coloring_Local,Mat_Coloring_ISCreate,Mat_Coloring_SetUp;
 
 #endif

File src/mat/color/impls/jp/jp.c

 PetscErrorCode JPGreatestWeight_Private(MatColoring mc,PetscReal *wtsin,PetscReal *maxwts)
 {
   MC_JP         *jp = (MC_JP *)mc->data;
-  PetscInt       nrows,ncols,nentries,idx,dist=mc->dist;
+  PetscInt       nrows,ncols,nleafrows,nleafcols,nentries,idx,dist=mc->dist;
   PetscInt       i,j,k;
   const PetscInt *degrees;
   PetscReal      *ewts,*wtsrow=jp->wtsrow,*wtscol=jp->wtscol;
 
   PetscFunctionBegin;
   nentries=0;
-  ierr = PetscSFGetGraph(etor,&nrows,NULL,NULL,NULL);CHKERRQ(ierr);
-  ierr = PetscSFGetGraph(etoc,&ncols,NULL,NULL,NULL);CHKERRQ(ierr);
+  ierr = PetscSFGetGraph(etor,&nrows,&nleafrows,NULL,NULL);CHKERRQ(ierr);
+  ierr = PetscSFGetGraph(etoc,&ncols,&nleafcols,NULL,NULL);CHKERRQ(ierr);
   for (i=0;i<ncols;i++) {
     wtscol[i] = wtsin[i];
   }
   for (k=0;k<dist;k++) {
     if (k%2 == 1) {
       /* second step takes the row weights to the column weights */
-      ierr = PetscLogEventBegin(Mat_Coloring_Comm,mc,0,0,0);CHKERRQ(ierr);
       ierr = PetscSFComputeDegreeBegin(etor,&degrees);CHKERRQ(ierr);
       ierr = PetscSFComputeDegreeEnd(etor,&degrees);CHKERRQ(ierr);
-      ierr = PetscLogEventEnd(Mat_Coloring_Comm,mc,0,0,0);CHKERRQ(ierr);
-      nentries=0;
-      for(i=0;i<nrows;i++) {
-          nentries += degrees[i];
-      }
+      nentries=nleafrows;
       idx=0;
       ewts = jp->wtsleafrow;
       for(i=0;i<nrows;i++) {
           ewts[idx] = wtsrow[i];
           idx++;
         }
+      }
+      for(i=0;i<ncols;i++) {
         wtscol[i]=0.;
       }
+
       if (idx != nentries) SETERRQ2(PetscObjectComm((PetscObject)mc),PETSC_ERR_NOT_CONVERGED,"Bad number of entries %d vs %d",idx,nentries);
       ierr = PetscLogEventBegin(Mat_Coloring_Comm,mc,0,0,0);CHKERRQ(ierr);
       ierr = PetscSFReduceBegin(etoc,MPI_DOUBLE,ewts,wtscol,MPI_MAX);CHKERRQ(ierr);
       /* first step takes the column weights to the row weights */
       ierr = PetscSFComputeDegreeBegin(etoc,&degrees);CHKERRQ(ierr);
       ierr = PetscSFComputeDegreeEnd(etoc,&degrees);CHKERRQ(ierr);
-      nentries=0;
-      for(i=0;i<ncols;i++) {
-          nentries += degrees[i];
-      }
+      nentries=nleafcols;
       ewts = jp->wtsleafcol;
       idx=0;
       for(i=0;i<ncols;i++) {
           ewts[idx] = wtscol[i];
           idx++;
         }
+      }
+      for(i=0;i<nrows;i++) {
         wtsrow[i]=0.;
       }
       if (idx != nentries) SETERRQ2(PetscObjectComm((PetscObject)mc),PETSC_ERR_NOT_CONVERGED,"Bad number of entries %d vs %d",idx,nentries);
 
   for (k=0;k<dist;k++) {
     if (k%2 == 1) {
-      ierr = PetscLogEventBegin(Mat_Coloring_Comm,mc,0,0,0);CHKERRQ(ierr);
       ierr = PetscSFComputeDegreeBegin(etor,&degrees);CHKERRQ(ierr);
       ierr = PetscSFComputeDegreeEnd(etor,&degrees);CHKERRQ(ierr);
-      ierr = PetscLogEventEnd(Mat_Coloring_Comm,mc,0,0,0);CHKERRQ(ierr);
       nentries=0;
       for(i=0;i<nrows;i++) {
         nentries += degrees[i];
         ierr = PetscLogEventEnd(Mat_Coloring_Comm,etoc,0,0,0);CHKERRQ(ierr);
       }
     } else {
-      ierr = PetscLogEventBegin(Mat_Coloring_Comm,etor,0,0,0);CHKERRQ(ierr);
       ierr = PetscSFComputeDegreeBegin(etoc,&degrees);CHKERRQ(ierr);
       ierr = PetscSFComputeDegreeEnd(etoc,&degrees);CHKERRQ(ierr);
-      ierr = PetscLogEventEnd(Mat_Coloring_Comm,etor,0,0,0);CHKERRQ(ierr);
       nentries=0;
       for(i=0;i<ncols;i++) {
         nentries += degrees[i];
   PetscInt        nr,nc;
   PetscInt        maxcolor_local,maxcolor_global;
   PetscInt        nboundary,*boundary,totalboundary;
+  PetscMPIInt     rank;
 
   PetscFunctionBegin;
+  ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)mc),&rank);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(Mat_Coloring_SetUp,mc,0,0,0);CHKERRQ(ierr);
   ierr = JPInitialize_Private(mc);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(Mat_Coloring_SetUp,mc,0,0,0);CHKERRQ(ierr);
   ierr = JPCreateWeights_Private(mc);CHKERRQ(ierr);
   ierr = MatGetSize(mc->mat,NULL,&ncolstotal);CHKERRQ(ierr);
   ierr = MatGetLocalSize(mc->mat,NULL,&ncols);CHKERRQ(ierr);
   ierr = PetscSFGetGraph(jp->etor,&nr,NULL,NULL,NULL);CHKERRQ(ierr);
   ierr = PetscSFGetGraph(jp->etoc,&nc,NULL,NULL,NULL);CHKERRQ(ierr);
+
+  ierr = PetscLogEventBegin(Mat_Coloring_Local,mc,0,0,0);CHKERRQ(ierr);
   ierr = MatColoringDiscoverBoundary(mc,jp->etoc,jp->etor,&nboundary,&boundary);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(Mat_Coloring_Local,mc,0,0,0);CHKERRQ(ierr);
   totalboundary=0;
   ierr = MPI_Allreduce(&nboundary,&totalboundary,1,MPI_INT,MPI_SUM,PetscObjectComm((PetscObject)mc));CHKERRQ(ierr);
-  for (i=0;i<nc;i++) {
-    jp->wtsinit[i] = 0.;
-    jp->state[i]=0;
-    jp->wtsspread[i]=0.;
-    jp->statespread[i]=0;
-  }
-  for (i=0;i<nboundary;i++) {
-    jp->wtsinit[boundary[i]] = jp->wts[boundary[i]];
+  if (totalboundary > 0) {
+    for (i=0;i<nc;i++) {
+      jp->wtsinit[i] = 0.;
+      jp->state[i]=0;
+      jp->wtsspread[i]=0.;
+      jp->statespread[i]=0;
+    }
+    for (i=0;i<nboundary;i++) {
+      jp->wtsinit[boundary[i]] = jp->wts[boundary[i]];
+    }
+    nadded=0;
+    nadded_total=0;
+    nadded_total_old=0;
   }
-
-
-  nadded=0;
-  nadded_total=0;
-  nadded_total_old=0;
   while (nadded_total < totalboundary) {
     ierr = JPGreatestWeight_Private(mc,jp->wtsinit,jp->wtsspread);CHKERRQ(ierr);
     ierr = JPMinColor_Private(mc,jp->color,jp->mincolor);CHKERRQ(ierr);
         if (jp->color[boundary[i]] > jp->maxcolor) jp->maxcolor = jp->color[boundary[i]];
         jp->wtsinit[boundary[i]] = 0.;
         nadded++;
-      } else {
       }
     }
     ierr = MPI_Allreduce(&nadded,&nadded_total,1,MPI_INT,MPI_SUM,PetscObjectComm((PetscObject)mc));CHKERRQ(ierr);
     maxcolor_global = 0;
     ierr = MPI_Allreduce(&maxcolor_local,&maxcolor_global,1,MPI_INT,MPI_MAX,PetscObjectComm((PetscObject)mc));CHKERRQ(ierr);
     jp->maxcolor = maxcolor_global;
-    }
+  }
+  ierr = PetscLogEventBegin(Mat_Coloring_Local,mc,0,0,0);CHKERRQ(ierr);
   ierr = MatColoringLocalColor(mc,jp->etoc,jp->etor,jp->wts,jp->color,&jp->maxcolor);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(Mat_Coloring_Local,mc,0,0,0);CHKERRQ(ierr);
   maxcolor_local = (PetscInt)jp->maxcolor;
   maxcolor_global = 0;
   ierr = MPI_Allreduce(&maxcolor_local,&maxcolor_global,1,MPI_INT,MPI_MAX,PetscObjectComm((PetscObject)mc));CHKERRQ(ierr);
   jp->maxcolor = maxcolor_global;
+  ierr = PetscLogEventBegin(Mat_Coloring_ISCreate,mc,0,0,0);CHKERRQ(ierr);
   ierr = ISColoringCreate(PetscObjectComm((PetscObject)mc),jp->maxcolor+1,ncols,jp->color,iscoloring);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(Mat_Coloring_ISCreate,mc,0,0,0);CHKERRQ(ierr);
   ierr = PetscFree(boundary);CHKERRQ(ierr);
   ierr = JPTearDown_Private(mc);CHKERRQ(ierr);
   PetscFunctionReturn(0);

File src/mat/color/impls/mis/miscoloring.c

 #include <petscsf.h>
 
 PETSC_EXTERN PetscErrorCode MatColoringCreateBipartiteGraph(MatColoring,PetscSF *,PetscSF *);
+PETSC_EXTERN PetscErrorCode MatColoringDiscoverBoundary(MatColoring,PetscSF,PetscSF,PetscInt *,PetscInt**);
 
 typedef struct {
   PetscSF         etoc;

File src/mat/color/utils/bipartite.c

   PetscInt          ncol;
   const PetscScalar *vcol;
   const PetscInt    *icol;
-  const PetscInt    *coldegrees;
+  const PetscInt    *coldegrees,*rowdegrees;
   Mat               m = mc->mat;
 
   PetscFunctionBegin;
   ierr = PetscSFSetGraphLayout(*etor,m->rmap,ncolentries,NULL,PETSC_COPY_VALUES,colleaf);CHKERRQ(ierr);
   ierr = PetscSFSetFromOptions(*etor);CHKERRQ(ierr);
 
+  ierr = PetscLogEventBegin(Mat_Coloring_Comm,*etor,0,0,0);CHKERRQ(ierr);
+  ierr = PetscSFComputeDegreeBegin(*etor,&rowdegrees);CHKERRQ(ierr);
+  ierr = PetscSFComputeDegreeEnd(*etor,&rowdegrees);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(Mat_Coloring_Comm,*etor,0,0,0);CHKERRQ(ierr);
+
   ierr = PetscFree(rowdata);CHKERRQ(ierr);
   ierr = PetscFree(rowleaf);CHKERRQ(ierr);
   ierr = PetscFree(colleaf);CHKERRQ(ierr);

File src/mat/color/utils/localcolor.c

 #include <petsc-private/matimpl.h>      /*I "petscmat.h"  I*/
 #include <petscsf.h>
 
+
+
 #undef __FUNCT__
 #define __FUNCT__ "MatColoringLocalColor"
 PETSC_EXTERN PetscErrorCode MatColoringLocalColor(MatColoring mc,PetscSF etoc,PetscSF etor,PetscReal *wts,ISColoringValue *color, ISColoringValue *maxcolor)
   const PetscSFNode *colentries,*rowentries;
 
   PetscFunctionBegin;
-  *maxcolor = 0;
   ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)mc),&rank);CHKERRQ(ierr);
 
   ierr = PetscSFGetGraph(etoc,&ncols,&ncolentries,NULL,&colentries);CHKERRQ(ierr);
   ierr = PetscSFGetGraph(etor,&nrows,&nrowentries,NULL,&rowentries);CHKERRQ(ierr);
 
-  ierr = PetscMalloc(sizeof(PetscBool)*nrows,&rowseen);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscBool)*ncols,&colseen);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscInt)*ncols,&coloffsets);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscInt)*nrows,&rowoffsets);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscInt)*ncols,&ll_ptr);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscInt)*ncols,&ll_idx);CHKERRQ(ierr);
+  ierr = PetscMalloc6(nrows,PetscBool,&rowseen,
+                      ncols,PetscBool,&colseen,
+                      ncols,PetscInt,&coloffsets,
+                      nrows,PetscInt,&rowoffsets,
+                      2*ncols,PetscInt,&ll_ptr,
+                      2*ncols,PetscInt,&ll_idx);CHKERRQ(ierr);
 
-  ierr = PetscMalloc(sizeof(PetscInt)*ncols,&sidx);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscReal)*ncols,&swts);CHKERRQ(ierr);
+  ierr = PetscMalloc2(ncols,PetscInt,&sidx,
+                      ncols,PetscReal,&swts);CHKERRQ(ierr);
 
   ierr = PetscSFComputeDegreeBegin(etoc,&rowdegrees);CHKERRQ(ierr);
   ierr = PetscSFComputeDegreeEnd(etoc,&rowdegrees);CHKERRQ(ierr);
 
   /* set up the "unused" linked list */
   unused = 0;
-  ll_ptr[ncols-1] = -1;
-  for (i=0;i<ncols-1;i++) {
+  ll_ptr[2*ncols-1] = -1;
+  for (i=0;i<2*ncols-1;i++) {
     ll_ptr[i] = i+1;
   }
 
 
   /* alternate between rows and columns to get the distance k minimum coloring */
   for (i=0;i<ncols;i++) {
+    collist = -1;
+    rowlist = -1;
     if (color[sidx[i]] == IS_COLORING_MAX) {
-      collist = -1;
-      rowlist = -1;
       for (j=0;j<totalcolors;j++) colormask[j] = PETSC_FALSE;
       swp = unused;
       unused = ll_ptr[unused];
         ierr = PetscMalloc(sizeof(PetscBool)*totalcolors,&colormask);CHKERRQ(ierr);
       }
     }
+    if (collist != -1) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in local coloring BFS -- column queue still has %d\n",collist);
+    if (rowlist != -1) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in local coloring BFS -- row queue still has %d\n",rowlist);
+  }
+  for (i=0;i<ncols;i++) {
+    if (colseen[i]) {SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in local coloring BFS -- column %d still seen\n",i);}
+  }
+  for (i=0;i<nrows;i++) {
+    if (rowseen[i]) {SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in local coloring BFS -- row %d still seen\n",i);}
   }
 
-  ierr = PetscFree(rowseen);CHKERRQ(ierr);
-  ierr = PetscFree(colseen);CHKERRQ(ierr);
-  ierr = PetscFree(coloffsets);CHKERRQ(ierr);
-  ierr = PetscFree(rowoffsets);CHKERRQ(ierr);
-  ierr = PetscFree(ll_ptr);CHKERRQ(ierr);
-  ierr = PetscFree(ll_idx);CHKERRQ(ierr);
-
-  ierr = PetscFree(sidx);CHKERRQ(ierr);
-  ierr = PetscFree(swts);CHKERRQ(ierr);
+  ierr = PetscFree6(rowseen,colseen,coloffsets,rowoffsets,ll_ptr,ll_idx);CHKERRQ(ierr);
+  ierr = PetscFree2(sidx,swts);CHKERRQ(ierr);
   ierr = PetscFree(colormask);CHKERRQ(ierr);
 
   PetscFunctionReturn(0);
   ierr = PetscSFGetGraph(etoc,&ncols,&ncolentries,NULL,&colentries);CHKERRQ(ierr);
   ierr = PetscSFGetGraph(etor,&nrows,&nrowentries,NULL,&rowentries);CHKERRQ(ierr);
 
-  ierr = PetscMalloc(sizeof(PetscBool)*nrows,&rowseen);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscBool)*ncols,&colseen);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscInt)*ncols,&coloffsets);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscInt)*nrows,&rowoffsets);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscInt)*ncols,&ll_ptr);CHKERRQ(ierr);
-  ierr = PetscMalloc(sizeof(PetscInt)*ncols,&ll_idx);CHKERRQ(ierr);
+  ierr = PetscMalloc6(nrows,PetscBool,&rowseen,
+                      ncols,PetscBool,&colseen,
+                      ncols,PetscInt,&coloffsets,
+                      nrows,PetscInt,&rowoffsets,
+                      2*ncols,PetscInt,&ll_ptr,
+                      2*ncols,PetscInt,&ll_idx);CHKERRQ(ierr);
 
   ierr = PetscSFComputeDegreeBegin(etoc,&rowdegrees);CHKERRQ(ierr);
   ierr = PetscSFComputeDegreeEnd(etoc,&rowdegrees);CHKERRQ(ierr);
   ierr = PetscSFComputeDegreeBegin(etor,&coldegrees);CHKERRQ(ierr);
   ierr = PetscSFComputeDegreeEnd(etor,&coldegrees);CHKERRQ(ierr);
 
-  /* set up the "unused" linked list */
+  /* set up the "unused" linked list -- double the size of the number of items as in tiny or large distance cases we may have a clique */
   unused = 0;
-  ll_ptr[ncols-1] = -1;
-  for (i=0;i<ncols-1;i++) {
+  ll_ptr[2*ncols-1] = -1;
+  for (i=0;i<2*ncols-1;i++) {
     ll_ptr[i] = i+1;
   }
 
       }
     }
     if (onBoundary) {(*nboundary)++;}
+    if (collist != -1) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in boundary count BFS -- column queue still has %d\n",collist);
+    if (rowlist != -1) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in boundary count BFS -- row queue still has %d\n",collist);
   }
+  for (i=0;i<ncols;i++) {
+    if (colseen[i]) {SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in boundary count BFS -- column %d still seen\n",i);}
+  }
+  for (i=0;i<nrows;i++) {
+    if (rowseen[i]) {SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in boundary count BFS -- row %d still seen\n",i);}
+  }
+
   ierr = PetscMalloc(sizeof(PetscInt)*(*nboundary),boundary);CHKERRQ(ierr);
 
   /* set the boundary nodes */
   bidx=0;
-  /* count the number of boundary nodes */
   for (i=0;i<ncols;i++) {
     onBoundary = PETSC_FALSE;
     collist = -1;
     if (onBoundary) {(*boundary)[bidx] = i; bidx++;}
   }
   for (i=0;i<ncols;i++) {
-    if (colseen[i]) {SETERRQ1(PetscObjectComm((PetscObject)mc),PETSC_ERR_NOT_CONVERGED,"Likely error in BFS -- column %d still seen\n",i);}
+    if (colseen[i]) {SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in boundary set BFS -- column %d still seen\n",i);}
   }
   for (i=0;i<nrows;i++) {
-    if (rowseen[i]) {SETERRQ1(PetscObjectComm((PetscObject)mc),PETSC_ERR_NOT_CONVERGED,"Likely error in BFS -- row %d still seen\n",i);}
+    if (rowseen[i]) {SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_NOT_CONVERGED,"Likely error in boundary set BFS -- row %d still seen\n",i);}
   }
-
   if (bidx != *nboundary) {SETERRQ(PetscObjectComm((PetscObject)mc),PETSC_ERR_NOT_CONVERGED,"Number of boundary nodes not matched");}
-
-  ierr = PetscFree(rowseen);CHKERRQ(ierr);
-  ierr = PetscFree(colseen);CHKERRQ(ierr);
-  ierr = PetscFree(coloffsets);CHKERRQ(ierr);
-  ierr = PetscFree(rowoffsets);CHKERRQ(ierr);
-  ierr = PetscFree(ll_ptr);CHKERRQ(ierr);
-  ierr = PetscFree(ll_idx);CHKERRQ(ierr);
-
+  ierr = PetscFree6(rowseen,colseen,coloffsets,rowoffsets,ll_ptr,ll_idx);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }

File src/mat/interface/dlregismat.c

 
   ierr = PetscLogEventRegister("MatColoringApply",MAT_COLORING_CLASSID,&Mat_Coloring_Apply);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("MatColoringComm",MAT_COLORING_CLASSID,&Mat_Coloring_Comm);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("MatColoringLocal",MAT_COLORING_CLASSID,&Mat_Coloring_Local);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("MatColoringIS",MAT_COLORING_CLASSID,&Mat_Coloring_ISCreate);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("MatColoringSetUp",MAT_COLORING_CLASSID,&Mat_Coloring_SetUp);CHKERRQ(ierr);
 
   /* Turn off high traffic events by default */
   ierr = PetscLogEventSetActiveAll(MAT_SetValues, PETSC_FALSE);CHKERRQ(ierr);

File src/mat/interface/matrix.c

 PetscLogEvent MAT_CUSPCopyToGPU, MAT_CUSPARSECopyToGPU, MAT_SetValuesBatch, MAT_SetValuesBatchI, MAT_SetValuesBatchII, MAT_SetValuesBatchIII, MAT_SetValuesBatchIV;
 PetscLogEvent MAT_ViennaCLCopyToGPU;
 PetscLogEvent MAT_Merge,MAT_Residual;
-PetscLogEvent Mat_Coloring_Apply,Mat_Coloring_Comm;
+PetscLogEvent Mat_Coloring_Apply,Mat_Coloring_Comm,Mat_Coloring_Local,Mat_Coloring_ISCreate,Mat_Coloring_SetUp;
 
 const char *const MatFactorTypes[] = {"NONE","LU","CHOLESKY","ILU","ICC","ILUDT","MatFactorType","MAT_FACTOR_",0};