net & multicore: Print overall execution time at shutdown 76/376/3
authorPhil Miller <mille121@illinois.edu>
Mon, 29 Sep 2014 16:40:35 +0000 (11:40 -0500)
committerGerrit Code Review <gerrit2@charm.cs.uiuc.edu>
Tue, 4 Nov 2014 16:42:35 +0000 (10:42 -0600)
Change-Id: I01b187ac9a242537d518c1fa9f4e3acf0dc8b27b

src/arch/net/machine.c

index 5fe39d7b4f54f5409a53a302e6cf52c468e2090a..61ff235e16e8540d33436ced2c5360f02bec1828 100644 (file)
@@ -308,6 +308,17 @@ extern void getAvailSysMem();
 
 #define BROADCAST_SPANNING_FACTOR              4
 
+/******************************************************************************
+ *
+ * Node state
+ *
+ *****************************************************************************/
+
+
+static CmiNodeLock    Cmi_scanf_mutex;
+static double         Cmi_clock;
+static double         Cmi_check_delay = 3.0;
+
 /****************************************************************************
  *
  * Handling Errors
@@ -442,7 +453,7 @@ static void machine_atexit_check(void)
 {
   if (!machine_initiated_shutdown)
     CmiAbort("unexpected call to exit by user program. Must use CkExit, not exit!");
-  printf("Program finished.\n");
+  printf("Program finished after %f seconds.\n", CmiWallTimer() - Cmi_clock);
 #if 0 /*Wait for the user to press any key (for Win32 debugging)*/
   fgetc(stdin);
 #endif
@@ -879,17 +890,6 @@ void printLog(void)
 
 #endif
 
-/******************************************************************************
- *
- * Node state
- *
- *****************************************************************************/
-
-
-static CmiNodeLock    Cmi_scanf_mutex;
-static double         Cmi_clock;
-static double         Cmi_check_delay = 3.0;
-
 /******************************************************************************
  *
  * OS Threads