[MOAB-dev] r3869 - MOAB/trunk/src

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon May 10 08:55:42 CDT 2010


Author: kraftche
Date: 2010-05-10 08:55:42 -0500 (Mon, 10 May 2010)
New Revision: 3869

Modified:
   MOAB/trunk/src/DebugOutput.cpp
Log:
use MPI_Wtime to get time when compiling w/ MPI

Modified: MOAB/trunk/src/DebugOutput.cpp
===================================================================
--- MOAB/trunk/src/DebugOutput.cpp	2010-05-08 04:33:24 UTC (rev 3868)
+++ MOAB/trunk/src/DebugOutput.cpp	2010-05-10 13:55:42 UTC (rev 3869)
@@ -289,8 +289,11 @@
 
 void DebugOutput::tprint()
 {
-  clock_t t = clock();
-  double tm = ((double)t)/CLOCKS_PER_SEC;
+#ifdef USE_MPI
+  double tm = MPI_Wtime();
+#else
+  double tm = clock()/(double)CLOCKS_PER_SEC;
+#endif
   size_t s = lineBuffer.size();
   lineBuffer.resize( s + 64 );
   size_t ss = sprintf(&lineBuffer[s],"(%.2f s) ", tm );



































More information about the moab-dev mailing list