Revision: 177
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=177&view=rev
Author: jmwozniak
Date: 2011-04-15 21:35:14 +0000 (Fri, 15 Apr 2011)
Log Message:
-----------
Better test mechanics for timing
Modified Paths:
--------------
test/cmpi/test-manyputs.c
Modified: test/cmpi/test-manyputs.c
===================================================================
--- test/cmpi/test-manyputs.c 2011-04-15 20:45:06 UTC (rev 176)
+++ test/cmpi/test-manyputs.c 2011-04-15 21:35:14 UTC (rev 177)
@@ -32,6 +32,10 @@
wait_for_notification();
notify_next();
+ MPI_Barrier(cmpi_comm_clients);
+
+ double start = MPI_Wtime();
+
for (i = 0; i < reps; i++)
{
char key[20];
@@ -42,16 +46,14 @@
free(value);
}
- sleep((mpi_size-mpi_rank)*3+10);
+ double stop = MPI_Wtime();
+ // sleep((mpi_size-mpi_rank)*3+10);
+ MPI_Barrier(cmpi_comm_clients);
+
+ sleep(1000);
+ if (mpi_rank + 1 == mpi_size)
+ printf("TOOK: %0.3f\n", stop-start);
+
cmpi_shutdown();
- /*
- int client_rank;
- MPI_Comm_rank(cmpi_comm_clients, &client_rank);
- if (client_rank == 0)
- {
- note("Shutting down...");
- cmpi_shutdown();
- }
- */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|