Index: src/H5.c =================================================================== --- src/H5.c (revision 25263) +++ src/H5.c (working copy) @@ -83,12 +83,46 @@ static hbool_t H5_dont_atexit_g = FALSE; H5_debug_t H5_debug_g; /*debugging info */ +H5_nftimers_t nftimers_g; +#ifdef H5_HAVE_PARALLEL +MPI_Comm last_mpi_comm_g = MPI_COMM_SELF; +#endif + /*******************/ /* Local Variables */ /*******************/ +herr_t +H5_start_nftimer(double *t_start, H5_nftimer_t *timer) +{ + FUNC_ENTER_NOAPI_NOERR + + timer->active = TRUE; + + *t_start = MPI_Wtime(); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5_start_nftimer() */ + +herr_t +H5_end_nftimer(double *t_start, H5_nftimer_t *timer) +{ + double t_end; + + FUNC_ENTER_NOAPI_NOERR + + t_end = MPI_Wtime(); + timer->t_monotonic += t_end - *t_start; + + timer->num_calls++; + + timer->active = FALSE; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5_end_nftimer() */ + /*-------------------------------------------------------------------------- * NAME * H5_init_library -- Initialize library-global information @@ -132,6 +166,25 @@ H5_debug_g.pkg[H5_PKG_V].name = "v"; H5_debug_g.pkg[H5_PKG_Z].name = "z"; + HDmemset(&nftimers_g, 0, sizeof(nftimers_g)); + nftimers_g.t_H5Dwrite.t_monotonic = 0.; + nftimers_g.t_write_H5Dwrite.t_monotonic = 0.; + nftimers_g.t_read_H5Dwrite.t_monotonic = 0.; + nftimers_g.t_H5Dread.t_monotonic = 0.; + nftimers_g.t_write_H5Dread.t_monotonic = 0.; + nftimers_g.t_read_H5Dread.t_monotonic = 0.; + nftimers_g.t_H5Dclose.t_monotonic = 0.; + nftimers_g.t_write_H5Dclose.t_monotonic = 0.; + nftimers_g.t_read_H5Dclose.t_monotonic = 0.; + nftimers_g.t_H5Fclose.t_monotonic = 0.; + nftimers_g.t_write_H5Fclose.t_monotonic = 0.; + nftimers_g.t_read_H5Fclose.t_monotonic = 0.; + nftimers_g.t_write_other.t_monotonic = 0.; + nftimers_g.t_read_other.t_monotonic = 0.; + nftimers_g.t_sync.t_monotonic = 0.; + nftimers_g.t_trunc.t_monotonic = 0.; + nftimers_g.t_close.t_monotonic = 0.; + #ifdef H5_HAVE_MPE /* Initialize MPE instrumentation library. May need to move this * up earlier if any of the above initialization involves using @@ -226,6 +279,9 @@ size_t at = 0; char loop[1024]; H5E_auto2_t func; + uint64_t sum_loc; + double double_sum; + int mpi_rank = 0; #ifdef H5_HAVE_THREADSAFE /* explicit locking of the API */ @@ -237,6 +293,275 @@ if(!(H5_INIT_GLOBAL)) goto done; +#ifdef H5_HAVE_PARALLEL + if(last_mpi_comm_g != MPI_COMM_SELF) { + (void)MPI_Reduce(&nftimers_g.t_H5Dwrite.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Dwrite.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_H5Dwrite.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Dwrite.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_H5Dwrite.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Dwrite.num_calls = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_H5Dread.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Dread.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_H5Dread.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Dread.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_H5Dread.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Dread.num_calls = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_H5Dclose.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Dclose.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_H5Dclose.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Dclose.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_H5Dclose.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Dclose.num_calls = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_H5Fclose.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Fclose.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_H5Fclose.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Fclose.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_H5Fclose.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_H5Fclose.num_calls = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_write_H5Dwrite.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dwrite.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_write_H5Dwrite.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dwrite.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_write_H5Dwrite.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dwrite.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_write_H5Dwrite.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dwrite.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_write_H5Dread.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dread.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_write_H5Dread.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dread.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_write_H5Dread.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dread.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_write_H5Dread.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dread.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_write_H5Dclose.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dclose.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_write_H5Dclose.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dclose.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_write_H5Dclose.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dclose.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_write_H5Dclose.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Dclose.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_write_H5Fclose.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Fclose.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_write_H5Fclose.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Fclose.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_write_H5Fclose.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Fclose.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_write_H5Fclose.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_H5Fclose.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_read_H5Dwrite.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dwrite.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_read_H5Dwrite.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dwrite.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_read_H5Dwrite.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dwrite.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_read_H5Dwrite.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dwrite.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_read_H5Dread.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dread.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_read_H5Dread.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dread.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_read_H5Dread.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dread.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_read_H5Dread.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dread.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_read_H5Dclose.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dclose.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_read_H5Dclose.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dclose.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_read_H5Dclose.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dclose.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_read_H5Dclose.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Dclose.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_read_H5Fclose.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Fclose.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_read_H5Fclose.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Fclose.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_read_H5Fclose.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Fclose.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_read_H5Fclose.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_H5Fclose.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_write_other.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_other.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_write_other.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_other.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_write_other.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_other.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_write_other.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_other.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_read_other.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_other.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_read_other.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_other.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_read_other.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_other.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_read_other.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_read_other.num_collective = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_sync.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_sync.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_sync.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_sync.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_sync.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_sync.num_calls = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_trunc.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_trunc.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_trunc.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_trunc.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_trunc.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_trunc.num_calls = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_close.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_close.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_close.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_close.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_close.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_close.num_calls = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_tmp.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_tmp.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_close.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_close.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_tmp.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_tmp.num_calls = sum_loc; + + (void)MPI_Reduce(&nftimers_g.t_write_tmp.t_monotonic, &double_sum, 1, MPI_DOUBLE, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_tmp.t_monotonic = double_sum; + /*(void)MPI_Reduce(&nftimers_g.t_write_other.t_thread, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_other.t_thread = sum_loc;*/ + (void)MPI_Reduce(&nftimers_g.t_write_tmp.num_calls, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_tmp.num_calls = sum_loc; + (void)MPI_Reduce(&nftimers_g.t_write_tmp.num_collective, &sum_loc, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, 0, last_mpi_comm_g); + nftimers_g.t_write_tmp.num_collective = sum_loc; + + (void)MPI_Comm_rank(last_mpi_comm_g, &mpi_rank); + } /* end if */ +#endif + + if(mpi_rank == 0) { + printf("H5Dwrite(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_H5Dwrite.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_H5Dwrite.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_H5Dwrite.num_calls); + + printf(" MPI_File_write_at(_all) within H5Dwrite(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_write_H5Dwrite.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_write_H5Dwrite.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_write_H5Dwrite.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_write_H5Dwrite.num_collective); + + printf(" MPI_File_read_at(_all) within H5Dwrite(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_read_H5Dwrite.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_read_H5Dwrite.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_read_H5Dwrite.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_read_H5Dwrite.num_collective); + + printf("H5Dread(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_H5Dread.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_H5Dread.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_H5Dread.num_calls); + + printf(" MPI_File_write_at(_all) within H5Dread(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_write_H5Dread.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_write_H5Dread.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_write_H5Dread.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_write_H5Dread.num_collective); + + printf(" MPI_File_read_at(_all) within H5Dread(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_read_H5Dread.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_read_H5Dread.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_read_H5Dread.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_read_H5Dread.num_collective); + + printf("H5Dclose(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_H5Dclose.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_H5Dclose.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_H5Dclose.num_calls); + + printf(" MPI_File_write_at(_all) within H5Dclose(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_write_H5Dclose.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_write_H5Dclose.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_write_H5Dclose.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_write_H5Dclose.num_collective); + + printf(" MPI_File_read_at(_all) within H5Dclose(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_read_H5Dclose.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_read_H5Dclose.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_read_H5Dclose.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_read_H5Dclose.num_collective); + + printf("H5Fclose(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_H5Fclose.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_H5Fclose.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_H5Fclose.num_calls); + + printf(" MPI_File_write_at(_all) within H5Fclose(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_write_H5Fclose.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_write_H5Fclose.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_write_H5Fclose.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_write_H5Fclose.num_collective); + + printf(" MPI_File_read_at(_all) within H5Fclose(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_read_H5Fclose.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_read_H5Fclose.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_read_H5Fclose.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_read_H5Fclose.num_collective); + + printf("MPI_File_write_at(_all) within other contexts: \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_write_other.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_write_other.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_write_other.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_write_other.num_collective); + + printf("MPI_File_read_at(_all) within other contexts: \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_read_other.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_read_other.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_read_other.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_read_other.num_collective); + + printf("MPI_File_sync(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_sync.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_sync.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_sync.num_calls); + + printf("H5FD_mpio_truncate() (after eoa check): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_sync.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_sync.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_sync.num_calls); + + printf("MPI_File_close(): \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_close.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_close.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_close.num_calls); + + printf("\"tmp\": \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_tmp.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_close.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_tmp.num_calls); + + printf(" MPI_File_write_at(_all) within \"tmp\": \n"); + printf(" Total wall time: %fs\n", ((double)nftimers_g.t_write_tmp.t_monotonic)); + //printf(" Total proc time: %fs\n", ((double)nftimers_g.t_write_tmp.t_thread)/1000000000.); + printf(" Total num calls: %llu\n", (long long unsigned)nftimers_g.t_write_tmp.num_calls); + printf(" Num collective : %llu\n", (long long unsigned)nftimers_g.t_write_tmp.num_collective); + } /* end if */ + /* Check if we should display error output */ (void)H5Eget_auto2(H5E_DEFAULT, &func, NULL); Index: src/H5D.c =================================================================== --- src/H5D.c (revision 25263) +++ src/H5D.c (working copy) @@ -406,10 +406,15 @@ H5Dclose(hid_t dset_id) { herr_t ret_value = SUCCEED; /* Return value */ + double t_start_monotonic; + //struct timespec t_start_thread; FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", dset_id); + if(H5_start_nftimer(&t_start_monotonic, &nftimers_g.t_H5Dclose) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't start timer") + /* Check args */ if(NULL == H5I_object_verify(dset_id, H5I_DATASET)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") @@ -426,6 +431,9 @@ HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't decrement count on dataset ID") done: + if(H5_end_nftimer(&t_start_monotonic, &nftimers_g.t_H5Dclose) < 0) + HDONE_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't end timer") + FUNC_LEAVE_API(ret_value) } /* end H5Dclose() */ Index: src/H5Dio.c =================================================================== --- src/H5Dio.c (revision 25263) +++ src/H5Dio.c (working copy) @@ -129,6 +129,8 @@ H5D_t *dset = NULL; const H5S_t *mem_space = NULL; const H5S_t *file_space = NULL; + double t_start; + //struct timespec t_start_thread; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -135,6 +137,9 @@ H5TRACE6("e", "iiiiix", dset_id, mem_type_id, mem_space_id, file_space_id, plist_id, buf); + if(H5_start_nftimer(&t_start, &nftimers_g.t_H5Dread) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't start timer") + /* check arguments */ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") @@ -173,6 +178,9 @@ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") done: + if(H5_end_nftimer(&t_start, &nftimers_g.t_H5Dread) < 0) + HDONE_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't end timer") + FUNC_LEAVE_API(ret_value) } /* end H5Dread() */ @@ -212,6 +220,8 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id, const void *buf) { + double t_start; + //struct timespec t_start_thread; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -218,6 +228,9 @@ H5TRACE6("e", "iiiii*x", dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf); + if(H5_start_nftimer(&t_start, &nftimers_g.t_H5Dwrite) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't start timer") + if(!dset_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") @@ -225,6 +238,9 @@ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't prepare for writing data") done: + if(H5_end_nftimer(&t_start, &nftimers_g.t_H5Dwrite) < 0) + HDONE_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't end timer") + FUNC_LEAVE_API(ret_value) } /* end H5Dwrite() */ Index: src/H5F.c =================================================================== --- src/H5F.c (revision 25263) +++ src/H5F.c (working copy) @@ -1477,11 +1477,15 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) { H5F_t *new_file = NULL; /*file struct for new file */ + double t_start_monotonic; hid_t ret_value; /*return value */ FUNC_ENTER_API(FAIL) H5TRACE4("i", "*sIuii", filename, flags, fcpl_id, fapl_id); + if(H5_start_nftimer(&t_start_monotonic, &nftimers_g.t_tmp) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't start timer") + /* Check/fix arguments */ if(!filename || !*filename) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file name") @@ -1531,6 +1535,9 @@ new_file->file_id = ret_value; done: + if(H5_end_nftimer(&t_start_monotonic, &nftimers_g.t_tmp) < 0) + HDONE_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't end timer") + if(ret_value < 0 && new_file) if(H5F_close(new_file) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problems closing file") @@ -2057,11 +2064,16 @@ { H5F_t *f = NULL; int nref; + double t_start; + //struct timespec t_start_thread; herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", file_id); + if(H5_start_nftimer(&t_start, &nftimers_g.t_H5Fclose) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't start timer") + /* Check/fix arguments. */ if(H5I_FILE != H5I_get_type(file_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID") @@ -2088,6 +2100,9 @@ HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed") done: + if(H5_end_nftimer(&t_start, &nftimers_g.t_H5Fclose) < 0) + HDONE_ERROR(H5E_DATASET, H5E_SYSTEM, FAIL, "can't end timer") + FUNC_LEAVE_API(ret_value) } /* end H5Fclose() */ Index: src/H5FDmpio.c =================================================================== --- src/H5FDmpio.c (revision 25263) +++ src/H5FDmpio.c (working copy) @@ -349,6 +349,8 @@ fa.comm = comm; fa.info = info; + last_mpi_comm_g = comm; + /* duplication is done during driver setting. */ ret_value= H5P_set_driver(plist, H5FD_MPIO, &fa); @@ -1166,6 +1168,8 @@ { H5FD_mpio_t *file = (H5FD_mpio_t*)_file; int mpi_code; /* MPI return code */ + double t_start; + //struct timespec t_start_thread; herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1177,10 +1181,16 @@ HDassert(file); HDassert(H5FD_MPIO==file->pub.driver_id); + if(H5_start_nftimer(&t_start, &nftimers_g.t_close) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't start timer") + /* MPI_File_close sets argument to MPI_FILE_NULL */ if (MPI_SUCCESS != (mpi_code=MPI_File_close(&(file->f)/*in,out*/))) HMPI_GOTO_ERROR(FAIL, "MPI_File_close failed", mpi_code) + if(H5_end_nftimer(&t_start, &nftimers_g.t_close) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't end timer") + /* Clean up other stuff */ H5FD_mpi_comm_info_free(&file->comm, &file->info); H5MM_xfree(file); @@ -1467,6 +1477,9 @@ int io_size; /* Actual number of bytes requested */ H5P_genplist_t *plist = NULL; /* Property list pointer */ hbool_t use_view_this_time = FALSE; + H5_nftimer_t *timer = NULL; + double t_start; + //struct timespec t_start_thread; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -1539,6 +1552,17 @@ } /* end if */ } /* end if */ + if(nftimers_g.t_H5Dwrite.active) + timer = &nftimers_g.t_read_H5Dwrite; + else if(nftimers_g.t_H5Dread.active) + timer = &nftimers_g.t_read_H5Dread; + else if(nftimers_g.t_H5Dclose.active) + timer = &nftimers_g.t_read_H5Dclose; + else if(nftimers_g.t_H5Fclose.active) + timer = &nftimers_g.t_read_H5Fclose; + else + timer = &nftimers_g.t_read_other; + /* Read the data. */ if(use_view_this_time) { H5FD_mpio_collective_opt_t coll_opt_mode; @@ -1556,8 +1580,15 @@ if(H5FD_mpio_Debug[(int)'t']) fprintf(stdout, "H5FD_mpio_read: doing MPI collective IO\n"); #endif + if(H5_start_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't start timer") + if(MPI_SUCCESS != (mpi_code = MPI_File_read_at_all(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat))) HMPI_GOTO_ERROR(FAIL, "MPI_File_read_at_all failed", mpi_code) + + if(H5_end_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't end timer") + timer->num_collective++; } /* end if */ else { #ifdef H5FDmpio_DEBUG @@ -1564,9 +1595,14 @@ if(H5FD_mpio_Debug[(int)'t']) fprintf(stdout, "H5FD_mpio_read: doing MPI independent IO\n"); #endif + if(H5_start_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't start timer") if(MPI_SUCCESS != (mpi_code = MPI_File_read_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat))) HMPI_GOTO_ERROR(FAIL, "MPI_File_read_at failed", mpi_code) + + if(H5_end_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't end timer") } /* end else */ /* @@ -1576,8 +1612,14 @@ if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, H5FD_mpi_native_g, file->info))) HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code) } else { + if(H5_start_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't start timer") + if(MPI_SUCCESS != (mpi_code = MPI_File_read_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat))) HMPI_GOTO_ERROR(FAIL, "MPI_File_read_at failed", mpi_code) + + if(H5_end_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't end timer") } /* How many bytes were actually read? */ @@ -1751,6 +1793,9 @@ int io_size; /* Actual number of bytes requested */ hbool_t use_view_this_time = FALSE; H5P_genplist_t *plist = NULL; /* Property list pointer */ + H5_nftimer_t *timer = NULL; + double t_start; + //struct timespec t_start_thread; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -1834,6 +1879,19 @@ #endif /* JRM */ } /* end if */ + if(nftimers_g.t_H5Dwrite.active) + timer = &nftimers_g.t_write_H5Dwrite; + else if(nftimers_g.t_H5Dread.active) + timer = &nftimers_g.t_write_H5Dread; + else if(nftimers_g.t_H5Dclose.active) + timer = &nftimers_g.t_write_H5Dclose; + else if(nftimers_g.t_H5Fclose.active) + timer = &nftimers_g.t_write_H5Fclose; + else if(nftimers_g.t_tmp.active) + timer = &nftimers_g.t_write_tmp; + else + timer = &nftimers_g.t_write_other; + /* Write the data. */ if(use_view_this_time) { H5FD_mpio_collective_opt_t coll_opt_mode; @@ -1852,8 +1910,15 @@ if(H5FD_mpio_Debug[(int)'t']) fprintf(stdout, "H5FD_mpio_write: doing MPI collective IO\n"); #endif + if(H5_start_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't start timer") + if(MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(file->f, mpi_off, (void*)buf, size_i, buf_type, &mpi_stat))) HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at_all failed", mpi_code) + + if(H5_end_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't end timer") + timer->num_collective++; } /* end if */ else { #ifdef H5FDmpio_DEBUG @@ -1860,8 +1925,14 @@ if(H5FD_mpio_Debug[(int)'t']) fprintf(stdout, "H5FD_mpio_write: doing MPI independent IO\n"); #endif + if(H5_start_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't start timer") + if(MPI_SUCCESS != (mpi_code = MPI_File_write_at(file->f, mpi_off, (void*)buf, size_i, buf_type, &mpi_stat))) HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at failed", mpi_code) + + if(H5_end_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't end timer") } /* end else */ /* Reset the file view when we used MPI derived types */ @@ -1869,9 +1940,15 @@ if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, H5FD_mpi_native_g, file->info))) HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code) } else { + if(H5_start_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't start timer") + /*OKAY: CAST DISCARDS CONST QUALIFIER*/ if(MPI_SUCCESS != (mpi_code = MPI_File_write_at(file->f, mpi_off, (void*)buf, size_i, buf_type, &mpi_stat))) HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at failed", mpi_code) + + if(H5_end_nftimer(&t_start, timer) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't end timer") } /* How many bytes were actually written? */ @@ -1926,6 +2003,8 @@ { H5FD_mpio_t *file = (H5FD_mpio_t*)_file; int mpi_code; /* mpi return code */ + double t_start; + //struct timespec t_start_thread; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -1939,8 +2018,14 @@ /* Only sync the file if we are not going to immediately close it */ if(!closing) { + if(H5_start_nftimer(&t_start, &nftimers_g.t_sync) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't start timer") + if(MPI_SUCCESS != (mpi_code = MPI_File_sync(file->f))) HMPI_GOTO_ERROR(FAIL, "MPI_File_sync failed", mpi_code) + + if(H5_end_nftimer(&t_start, &nftimers_g.t_sync) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't end timer") } /* end if */ done: @@ -1970,6 +2055,8 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing) { H5FD_mpio_t *file = (H5FD_mpio_t*)_file; + double t_start; + //struct timespec t_start_thread; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -1989,6 +2076,9 @@ int mpi_code; /* mpi return code */ MPI_Offset mpi_off; + if(H5_start_nftimer(&t_start, &nftimers_g.t_trunc) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't start timer") + #ifdef H5_MPI_FILE_SET_SIZE_BIG if(H5FD_mpi_haddr_to_MPIOff(file->eoa, &mpi_off) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "cannot convert from haddr_t to MPI_Offset") @@ -2029,6 +2119,9 @@ if(MPI_SUCCESS != (mpi_code = MPI_Barrier(file->comm))) HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code) + if(H5_end_nftimer(&t_start, &nftimers_g.t_trunc) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_SYSTEM, FAIL, "can't end timer") + /* Update the 'last' eoa value */ file->last_eoa = file->eoa; } /* end if */ Index: src/H5private.h =================================================================== --- src/H5private.h (revision 25263) +++ src/H5private.h (working copy) @@ -491,6 +491,11 @@ H5_DLL void H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds); H5_DLL time_t H5_now(void); +H5_DLL herr_t H5_start_nftimer(double *t_start, H5_nftimer_t *timer); +H5_DLL herr_t H5_end_nftimer(double *t_start, H5_nftimer_t *timer); + +extern MPI_Comm last_mpi_comm_g; + /* Depth of object copy */ typedef enum { H5_COPY_SHALLOW, /* Shallow copy from source to destination, just copy field pointers */ Index: src/H5public.h =================================================================== --- src/H5public.h (revision 25263) +++ src/H5public.h (working copy) @@ -322,6 +322,38 @@ hsize_t heap_size; } H5_ih_info_t; +typedef struct H5_nftimer_t { + double t_monotonic; + //uint64_t t_thread; + uint64_t num_calls; + uint64_t num_collective; + hbool_t active; +} H5_nftimer_t; + +typedef struct { + H5_nftimer_t t_H5Dwrite; + H5_nftimer_t t_write_H5Dwrite; + H5_nftimer_t t_read_H5Dwrite; + H5_nftimer_t t_H5Dread; + H5_nftimer_t t_write_H5Dread; + H5_nftimer_t t_read_H5Dread; + H5_nftimer_t t_H5Dclose; + H5_nftimer_t t_write_H5Dclose; + H5_nftimer_t t_read_H5Dclose; + H5_nftimer_t t_H5Fclose; + H5_nftimer_t t_write_H5Fclose; + H5_nftimer_t t_read_H5Fclose; + H5_nftimer_t t_write_other; + H5_nftimer_t t_read_other; + H5_nftimer_t t_sync; + H5_nftimer_t t_trunc; + H5_nftimer_t t_close; + H5_nftimer_t t_tmp; + H5_nftimer_t t_write_tmp; +} H5_nftimers_t; + +extern H5_nftimers_t nftimers_g; + /* Functions in H5.c */ H5_DLL herr_t H5open(void); H5_DLL herr_t H5close(void);