Skip to content

Commit

Permalink
Add logging for dLOG_MeshLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
jedbrown committed Apr 28, 2011
1 parent 98144c5 commit 7a1a690
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/dohpmesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ typedef struct _p_dMesh *dMesh;

extern dClassId dMESH_CLASSID;
extern PetscBool dMeshRegisterAllCalled;
extern PetscLogEvent dLOG_MeshLoad;

extern const char *const iBase_ErrorString[];
extern const char *const iBase_TagValueTypeName[];
Expand Down
4 changes: 4 additions & 0 deletions src/fs/mesh/interface/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,8 @@ dErr dMeshLoad(dMesh mesh)
dErr err;

dFunctionBegin;
dValidHeader(mesh,dMESH_CLASSID,1);
err = PetscLogEventBegin(dLOG_MeshLoad,mesh,0,0,0);dCHK(err);
{
PetscMPIInt rank;
FILE *file;
Expand Down Expand Up @@ -911,6 +913,8 @@ dErr dMeshLoad(dMesh mesh)
iMesh_getArrData(mi,mesh->f.v,mesh->f.s,ofe,&mesh->ofe.v,&mesh->ofe.a,&mesh->ofe.s,&err);dICHK(mi,err); /* face[edge] */
#endif

err = PetscLogEventEnd(dLOG_MeshLoad,mesh,0,0,0);dCHK(err);

/* View if requested */
err = PetscOptionsHasName(((dObject)mesh)->prefix,"-dmesh_view",&flg);dCHK(err);
if (flg) {
Expand Down
2 changes: 2 additions & 0 deletions src/fs/mesh/interface/meshreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

dClassId dMESH_CLASSID;
PetscBool dMeshRegisterAllCalled;
PetscLogEvent dLOG_MeshLoad;
static PetscFList MeshList;

dErr dMeshCreate(MPI_Comm comm,dMesh *inm)
Expand Down Expand Up @@ -88,6 +89,7 @@ dErr dMeshInitializePackage(const char path[])
initialized = PETSC_TRUE;
err = PetscClassIdRegister("Mesh",&dMESH_CLASSID);dCHK(err);
err = dMeshRegisterAll(path);dCHK(err);
err = PetscLogEventRegister("dMeshLoad", dMESH_CLASSID,&dLOG_MeshLoad);dCHK(err);
dFunctionReturn(0);
}

Expand Down

0 comments on commit 7a1a690

Please sign in to comment.