- for (i=0;i<5;i++) {
- SMPI_SAMPLE_LOCAL(0, 0.1) { // I want the standard error to go below 0.1 second. Two tests at least will be run (count is not >0)
- fprintf(stderr,"[rank:%d] Run the first (locally benched) computation. It's locally benched, and I want the standard error to go below 0.1 second (count is not >0)\n", smpi_process_index());
- for (j=0;j<100*1000*1000;j++) { // 100 kflop
- if (d < 100000) {
- d = d * d;
- } else {
- d = 2;
- }
- }
+ n = 0;
+ for (i = 0; i < 5; i++) {
+ /* I want the standard error to go below 0.1 second.
+ * Two tests at least will be run (count is not > 0) */
+ SMPI_SAMPLE_LOCAL(0, 0.1) {
+ if (verbose || n++ < 2) {
+ if (verbose)
+ fprintf(stderr, "(%12.6f)", MPI_Wtime());
+ else
+ fprintf(stderr, "(1)");
+ fprintf(stderr,
+ " [rank:%d] Run the first (locally benched) computation. "
+ "It's locally benched, and I want the standard error to go "
+ "below 0.1 second (count is not >0)\n", smpi_process_index());
+ }
+ d = compute(d);