From 2baee73b38a5162d42e377fd54aafd5ce67c1f07 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Wed, 27 Apr 2011 15:06:44 -0400 Subject: add iteration timer --- training/mpi_batch_optimize.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'training') 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; } -- cgit v1.2.3