summaryrefslogtreecommitdiff
path: root/training
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
commit2baee73b38a5162d42e377fd54aafd5ce67c1f07 (patch)
tree51401b64445ba5d8d145effe0f6391a315bd639b /training
parent01cd1165ffc6f592067844a2103bd9e135a69fe3 (diff)
add iteration timer
Diffstat (limited to 'training')
-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;
}