summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-04-27 15:06:44 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2011-04-27 15:06:44 -0400
commit8297cf3e931b58455289f28288f15cd29826aba8 (patch)
tree9b264be49199289a9d307ef8b0dbc36436db213f
parent22522d9bc36192c3b1fc35aa165e80c517469592 (diff)
add iteration timer
-rw-r--r--training/mpi_batch_optimize.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/training/mpi_batch_optimize.cc b/training/mpi_batch_optimize.cc
index 5a6bf301..39a8af7d 100644
--- a/training/mpi_batch_optimize.cc
+++ b/training/mpi_batch_optimize.cc
@@ -335,6 +335,7 @@ int main(int argc, char** argv) {
while (!converged) {
observer.Reset();
#ifdef HAVE_MPI
+ mpi::timer timer;
world.barrier();
#endif
if (rank == 0) {
@@ -404,6 +405,7 @@ int main(int argc, char** argv) {
#ifdef HAVE_MPI
mpi::broadcast(world, &lambdas[0], lambdas.size(), 0);
mpi::broadcast(world, cint, 0);
+ if (rank == 0) { cerr << " ELAPSED TIME THIS ITERATION=" << timer.elapsed() << endl; }
#endif
converged = cint;
}