Commits

James Bordner  committed ec96690

[lcaperf] Moved lcaperf print() to dump perf data every cycle; moved EvolveHierarchy instrumentation inside main loop to allow print()

  • Participants
  • Parent commits 814b162
  • Branches lcaperf

Comments (0)

Files changed (1)

File src/enzo/EvolveHierarchy.C

   LevelHierarchyEntry *Temp;
   double LastCPUTime;
 
-  LCAPERF_START("EvolveHierarchy");
-
 #ifdef USE_LCAPERF
     Eint32 lcaperf_cycle = MetaData.CycleNumber;
     lcaperf.attribute ("cycle",&lcaperf_cycle, LCAP_INT);
   bool FirstLoop = true;
   while (!Stop) {
 
+    LCAPERF_START("EvolveHierarchy");
+
 #ifdef USE_MPI
     tloop0 = MPI_Wtime();
 #endif
         return FAIL;
       }
     }
-
+    
+    lcaperf.attribute ("level",0,LCAP_INT);
 
 
 #ifdef USE_MPI 
  
     MetaData.Time += dt;
     MetaData.CycleNumber++;
-#ifdef USE_LCAPERF
-    lcaperf_cycle = MetaData.CycleNumber;
-    lcaperf.attribute ("cycle",&lcaperf_cycle, LCAP_INT);
-#endif
     
     MetaData.LastCycleCPUTime = ReturnWallTime() - LastCPUTime;
     MetaData.CPUTime += MetaData.LastCycleCPUTime;
     }
 #endif
 
+    LCAPERF_STOP("EvolveHierarchy");
+
+    lcaperf.print();
+
+#ifdef USE_LCAPERF
+    lcaperf_cycle = MetaData.CycleNumber;
+    lcaperf.attribute ("cycle",&lcaperf_cycle, LCAP_INT);
+#endif
+
     FirstLoop = false;
  
   } // ===== end of main loop ====
     lcaperf.attribute ("cycle",0, LCAP_INT);
 #endif
 
-  LCAPERF_STOP("EvolveHierarchy");
-
 #ifdef USE_MPI
   texit = MPI_Wtime();
 #endif