summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-03-03 05:08:02 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-03-03 05:08:02 (GMT)
commit394f6f50bfaeef0a68b7c363db523305aa0882e2 (patch)
treea8f3107b005e099fdd0e3fdaeee2ebda30c56912 /tools
parent690b832ce1de4698a7fbe1f49b3c71d8c0a5fc14 (diff)
downloadhdf5-394f6f50bfaeef0a68b7c363db523305aa0882e2.zip
hdf5-394f6f50bfaeef0a68b7c363db523305aa0882e2.tar.gz
hdf5-394f6f50bfaeef0a68b7c363db523305aa0882e2.tar.bz2
[svn-r26345] Bring revisions #25902 - #25971 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake4
-rw-r--r--tools/lib/CMakeLists.txt1
-rw-r--r--tools/lib/Makefile.am2
-rw-r--r--tools/lib/Makefile.in5
-rw-r--r--tools/lib/io_timer.c232
-rw-r--r--tools/lib/io_timer.h (renamed from tools/perform/pio_timer.h)27
-rw-r--r--tools/perform/CMakeLists.txt38
-rw-r--r--tools/perform/CMakeTests.cmake4
-rw-r--r--tools/perform/Makefile.am4
-rw-r--r--tools/perform/Makefile.in12
-rw-r--r--tools/perform/benchpar.c488
-rw-r--r--tools/perform/pio_engine.c7
-rw-r--r--tools/perform/pio_perf.c54
-rw-r--r--tools/perform/pio_perf.h6
-rw-r--r--tools/perform/pio_timer.c258
-rw-r--r--tools/perform/sio_engine.c5
-rw-r--r--tools/perform/sio_perf.c49
-rw-r--r--tools/perform/sio_perf.h6
-rw-r--r--tools/perform/sio_timer.c197
-rw-r--r--tools/perform/sio_timer.h78
20 files changed, 383 insertions, 1094 deletions
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
index 0d4e0f4..a939d78 100644
--- a/tools/h5dump/CMakeTestsXML.cmake
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -414,9 +414,9 @@
# The lone colon here confuses some systems (Cray X1). Skip
# it if configure detects that this is a problem.
set (TESTTYPE "TEST")
- if (NOT "H5_LONE_COLON")
+ if (NOT ${H5_LONE_COLON})
set (TESTTYPE "SKIP")
- endif (NOT "H5_LONE_COLON")
+ endif (NOT ${H5_LONE_COLON})
ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5)
ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5)
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index e65673a..3dba919 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -24,6 +24,7 @@ set (H5_TOOLS_LIB_SRCS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_type.c
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_utils.c
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5trav.c
+ ${HDF5_TOOLS_LIB_SOURCE_DIR}/io_timer.c
)
set (H5_TOOLS_LIB_HDRS
diff --git a/tools/lib/Makefile.am b/tools/lib/Makefile.am
index 9050aac..e8fc6a1 100644
--- a/tools/lib/Makefile.am
+++ b/tools/lib/Makefile.am
@@ -28,7 +28,7 @@ noinst_LTLIBRARIES=libh5tools.la
libh5tools_la_SOURCES=h5tools.c h5tools_dump.c h5tools_str.c h5tools_utils.c h5diff.c \
h5diff_array.c h5diff_attr.c h5diff_dset.c h5diff_util.c h5trav.c \
- h5tools_filters.c h5tools_ref.c h5tools_type.c
+ h5tools_filters.c h5tools_ref.c h5tools_type.c io_timer.c
# Test program. Link using libhdf5 and libh5tools
TEST_PROG=
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 210b6b3..b2afb07 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -115,7 +115,7 @@ libh5tools_la_LIBADD =
am_libh5tools_la_OBJECTS = h5tools.lo h5tools_dump.lo h5tools_str.lo \
h5tools_utils.lo h5diff.lo h5diff_array.lo h5diff_attr.lo \
h5diff_dset.lo h5diff_util.lo h5trav.lo h5tools_filters.lo \
- h5tools_ref.lo h5tools_type.lo
+ h5tools_ref.lo h5tools_type.lo io_timer.lo
libh5tools_la_OBJECTS = $(am_libh5tools_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -666,7 +666,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
noinst_LTLIBRARIES = libh5tools.la
libh5tools_la_SOURCES = h5tools.c h5tools_dump.c h5tools_str.c h5tools_utils.c h5diff.c \
h5diff_array.c h5diff_attr.c h5diff_dset.c h5diff_util.c h5trav.c \
- h5tools_filters.c h5tools_ref.c h5tools_type.c
+ h5tools_filters.c h5tools_ref.c h5tools_type.c io_timer.c
# Test program. Link using libhdf5 and libh5tools
@@ -773,6 +773,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5tools_type.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5tools_utils.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5trav.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io_timer.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c
new file mode 100644
index 0000000..78e7fe9
--- /dev/null
+++ b/tools/lib/io_timer.c
@@ -0,0 +1,232 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/* changes:
+ * rename pio_timer.c as io_timer.c;
+ * Removed pio_perf.h so that it is not dependant on it;
+ * Removed set_timer_type() and get_timer_type() since no one calls them;
+ * Merged sio_timer.c into io_timer.c;
+ */
+
+/*
+ * Purpose:
+ *
+ * This is a module of useful timing functions for performance testing.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "H5private.h"
+#include "hdf5.h"
+
+#ifdef H5_HAVE_PARALLEL
+#include <mpi.h>
+#endif
+
+#include "io_timer.h"
+
+/*
+ * The number to divide the tv_usec field with to get a nice decimal to add to
+ * the number of seconds.
+ */
+#define MICROSECOND 1000000.0
+
+/* global variables */
+io_time_t *timer_g; /* timer: global for stub functions */
+
+/*
+ * Function: sub_time
+ * Purpose: Struct two time values, and return the difference, in microseconds
+ *
+ * Note that the function assumes that a > b
+ * Programmer: Leon Arber, 1/27/06
+ */
+static double sub_time(struct timeval* a, struct timeval* b)
+{
+ return (((double)a->tv_sec +
+ ((double)a->tv_usec) / MICROSECOND) -
+ ((double)b->tv_sec +
+ ((double)b->tv_usec) / MICROSECOND));
+}
+
+
+/*
+ * Function: io_time_new
+ * Purpose: Build us a brand, spankin', new performance time object.
+ * The object is a black box to the user. They just tell us
+ * what type of timer they want (MPI_CLOCK for MPI_Wtime or
+ * SYS_CLOCK for system time).
+ * Return: Pointer to io_time object
+ * Programmer: Bill Wendling, 01. October 2001
+ * Modifications:
+ */
+io_time_t *
+io_time_new(clock_type type)
+{
+ io_time_t *pt = (io_time_t *)HDcalloc(1, sizeof(struct io_time_t));
+
+ /* set global timer variable */
+ timer_g = pt;
+
+ pt->type = type;
+ return pt;
+}
+
+/*
+ * Function: io_time_destroy
+ * Purpose: Remove the memory allocated for the io_time object. Only
+ * need to call on a pointer allocated with the ``io_time_new''
+ * function.
+ * Return: Nothing
+ * Programmer: Bill Wendling, 01. October 2001
+ * Modifications:
+ */
+void
+io_time_destroy(io_time_t *pt)
+{
+ HDfree(pt);
+ /* reset the global timer pointer too. */
+ timer_g = NULL;
+}
+
+#if 0
+/* no one is calling set_timer_type or get_timer_type ???*/
+/*
+ * Function: set_timer_type
+ * Purpose: Set the type of the timer to either MPI_CLOCK or SYS_CLOCK.
+ * This really only needs to be called if you didn't construct a
+ * timer with the pio_timer_new function (shame!).
+ * Return: Nothing
+ * Programmer: Bill Wendling, 04. October 2001
+ * Modifications:
+ */
+void
+set_timer_type(io_time_t *pt, clock_type type)
+{
+ pt->type = type;
+}
+
+/*
+ * Function: get_timer_type
+ * Purpose: Get the type of the timer.
+ * Return: MPI_CLOCK or SYS_CLOCK.
+ * Programmer: Bill Wendling, 04. October 2001
+ * Modifications:
+ */
+clock_type
+get_timer_type(io_time_t *pt)
+{
+ return pt->type;
+}
+#endif
+
+/*
+ * Function: set_time
+ * Purpose: Set the time in a ``io_time_t'' object.
+ * Return: Pointer to the passed in ``io_time_t'' object if SUCCEED; Null otherwise.
+ * Programmer: Bill Wendling, 01. October 2001
+ * Modifications:
+ */
+io_time_t *
+set_time(io_time_t *pt, timer_type t, int start_stop)
+{
+ /* sanity check */
+ assert(pt);
+
+ switch(pt->type){
+#ifdef H5_HAVE_PARALLEL
+ case MPI_CLOCK:
+ if (start_stop == TSTART) {
+ pt->mpi_timer[t] = MPI_Wtime();
+
+ /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS
+ * we compute the time it took to only open the file */
+ if(t == HDF5_FINE_WRITE_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_WRITE_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_WRITE_FIXED_DIMS];
+ else if(t == HDF5_FINE_READ_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_READ_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_READ_FIXED_DIMS];
+
+ } else {
+ pt->total_time[t] += MPI_Wtime() - pt->mpi_timer[t];
+ pt->mpi_timer[t] = MPI_Wtime();
+
+ /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS
+ * we compute the time it took to close the file after the last read/write finished */
+ if(t == HDF5_GROSS_WRITE_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_WRITE_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_WRITE_FIXED_DIMS];
+ else if(t == HDF5_GROSS_READ_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_READ_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_READ_FIXED_DIMS];
+ }
+ break;
+#endif /* H5_HAVE_PARALLEL */
+ case SYS_CLOCK:
+ if (start_stop == TSTART) {
+ HDgettimeofday(&pt->sys_timer[t], NULL);
+
+ /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS
+ * we compute the time it took to only open the file */
+ if(t == HDF5_FINE_WRITE_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS]));
+ else if(t == HDF5_FINE_READ_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS]));
+
+
+ } else {
+ struct timeval sys_t;
+
+ HDgettimeofday(&sys_t, NULL);
+ pt->total_time[t] += sub_time(&sys_t, &(pt->sys_timer[t]));
+
+ /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS
+ * we compute the time it took to close the file after the last read/write finished */
+ if(t == HDF5_GROSS_WRITE_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS]));
+ else if(t == HDF5_GROSS_READ_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS]));
+
+ }
+ break;
+ default:
+ HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
+ return (NULL);
+ break;
+ }
+
+#if 0
+ /* this does not belong here. Need fix in h5perf code when set_time() is called. -AKC- */
+ debug_start_stop_time(pt, t, start_stop);
+#endif
+
+ return pt;
+}
+
+/*
+ * Function: get_time
+ * Purpose: Get the time from a ``io_time_t'' object.
+ * Return: The number of seconds as a DOUBLE.
+ * Programmer: Bill Wendling, 01. October 2001
+ * Modifications:
+ */
+double
+get_time(io_time_t *pt, timer_type t)
+{
+ return pt->total_time[t];
+}
+
+#if 0
+/* standalone is not working yet. Need fix later. -AKC- */
+#ifdef STANDALONE
+#include "pio_standalone.c"
+#endif
+#endif
diff --git a/tools/perform/pio_timer.h b/tools/lib/io_timer.h
index a5ee6d7..4ce0733 100644
--- a/tools/perform/pio_timer.h
+++ b/tools/lib/io_timer.h
@@ -13,8 +13,8 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef PIO_TIMER__
-#define PIO_TIMER__
+#ifndef IO_TIMER__
+#define IO_TIMER__
#include "hdf5.h"
@@ -27,6 +27,9 @@
# include <time.h>
#endif
+#ifdef H5_HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif /* H5_HAVE_WINSOCK2_H */
/* The different types of timers we can have */
typedef enum timer_type_ {
HDF5_FILE_OPENCLOSE,
@@ -47,8 +50,8 @@ typedef enum timer_type_ {
} timer_type;
typedef enum clock_type_ {
- MPI_TIMER = 0, /* Use MPI timer to measure time */
- SYS_TIMER = 1 /* Use system clock to measure time */
+ SYS_CLOCK = 0, /* Use system clock to measure time */
+ MPI_CLOCK = 1 /* Use MPI clock to measure time */
} clock_type;
/* Miscellaneous identifiers */
@@ -58,25 +61,23 @@ enum {
};
/* The performance time structure */
-typedef struct pio_time_ {
+typedef struct io_time_t {
clock_type type;
double total_time[NUM_TIMERS];
double mpi_timer[NUM_TIMERS];
struct timeval sys_timer[NUM_TIMERS];
-} pio_time;
+} io_time_t;
/* External function declarations */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-extern pio_time *pio_time_new(clock_type t);
-extern void pio_time_destroy(pio_time *pt);
-extern void set_timer_type(pio_time *pt, clock_type type);
-extern clock_type get_timer_type(pio_time *pt);
-extern pio_time *set_time(pio_time *pt, timer_type t, int start_stop);
-extern double get_time(pio_time *pt, timer_type t);
+H5TOOLS_DLL io_time_t *io_time_new(clock_type t);
+H5TOOLS_DLL void io_time_destroy(io_time_t *pt);
+H5TOOLS_DLL io_time_t *set_time(io_time_t *pt, timer_type t, int start_stop);
+H5TOOLS_DLL double get_time(io_time_t *pt, timer_type t);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* PIO_TIMER__ */
+#endif /* IO_TIMER__ */
diff --git a/tools/perform/CMakeLists.txt b/tools/perform/CMakeLists.txt
index 6887c60..0713661 100644
--- a/tools/perform/CMakeLists.txt
+++ b/tools/perform/CMakeLists.txt
@@ -17,7 +17,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib )
# --------------------------------------------------------------------
#-- Adding test for h5perf_serial
set (h5perf_serial_SRCS
- ${HDF5_PERFORM_SOURCE_DIR}/sio_timer.c
${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c
${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c
)
@@ -30,7 +29,6 @@ set_target_properties (h5perf_serial PROPERTIES FOLDER perform)
if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf_serial_alone
set (h5perf_serial_alone_SRCS
- ${HDF5_PERFORM_SOURCE_DIR}/sio_timer.c
${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c
${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c
)
@@ -74,15 +72,17 @@ TARGET_C_PROPERTIES (overhead " " " ")
target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (overhead PROPERTIES FOLDER perform)
+if (BUILD_TESTING)
#-- Adding test for perf_meta
-set (perf_meta_SRCS
- ${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c
-)
-add_executable (perf_meta ${perf_meta_SRCS})
-TARGET_NAMING (perf_meta ${LIB_TYPE})
-TARGET_C_PROPERTIES (perf_meta " " " ")
-target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-set_target_properties (perf_meta PROPERTIES FOLDER perform)
+ set (perf_meta_SRCS
+ ${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c
+ )
+ add_executable (perf_meta ${perf_meta_SRCS})
+ TARGET_NAMING (perf_meta ${LIB_TYPE})
+ TARGET_C_PROPERTIES (perf_meta " " " ")
+ target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (perf_meta PROPERTIES FOLDER perform)
+endif (BUILD_TESTING)
#-- Adding test for zip_perf
set (zip_perf_SRCS
@@ -94,10 +94,9 @@ TARGET_C_PROPERTIES (zip_perf " " " ")
target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (zip_perf PROPERTIES FOLDER perform)
-if (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL AND BUILD_TESTING)
#-- Adding test for h5perf
set (h5perf_SRCS
- ${HDF5_PERFORM_SOURCE_DIR}/pio_timer.c
${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c
${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c
)
@@ -110,7 +109,6 @@ if (H5_HAVE_PARALLEL)
if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf
set (h5perf_alone_SRCS
- ${HDF5_PERFORM_SOURCE_DIR}/pio_timer.c
${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c
${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c
)
@@ -123,18 +121,6 @@ if (H5_HAVE_PARALLEL)
target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (h5perf_alone PROPERTIES FOLDER perform)
endif (HDF5_BUILD_PERFORM_STANDALONE)
-
- if (HDF5_BUILD_PARALLEL_ALL)
- #-- Adding test for benchpar
- set (benchpar_SRCS
- ${HDF5_PERFORM_SOURCE_DIR}/benchpar.c
- )
- add_executable (benchpar ${benchpar_SRCS})
- TARGET_NAMING (benchpar ${LIB_TYPE})
- TARGET_C_PROPERTIES (benchpar " " " ")
- target_link_libraries (benchpar ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- set_target_properties (benchpar PROPERTIES FOLDER perform)
- endif (HDF5_BUILD_PARALLEL_ALL)
-endif (H5_HAVE_PARALLEL)
+endif (H5_HAVE_PARALLEL AND BUILD_TESTING)
include (CMakeTests.cmake)
diff --git a/tools/perform/CMakeTests.cmake b/tools/perform/CMakeTests.cmake
index 74055d5..6927124 100644
--- a/tools/perform/CMakeTests.cmake
+++ b/tools/perform/CMakeTests.cmake
@@ -55,8 +55,4 @@ if (H5_HAVE_PARALLEL)
if (HDF5_BUILD_PERFORM_STANDALONE)
add_test (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf_alone>)
endif (HDF5_BUILD_PERFORM_STANDALONE)
-
- if (HDF5_BUILD_PARALLEL_ALL)
- add_test (NAME PERFORM_benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>)
- endif (HDF5_BUILD_PARALLEL_ALL)
endif (H5_HAVE_PARALLEL)
diff --git a/tools/perform/Makefile.am b/tools/perform/Makefile.am
index 59c598a..1af0e7f 100644
--- a/tools/perform/Makefile.am
+++ b/tools/perform/Makefile.am
@@ -59,8 +59,8 @@ TEST_PROG = iopipe chunk overhead zip_perf perf_meta h5perf_serial $(BUILD_ALL_P
# "make clean" and some systems, e.g., AIX, do not like it.
check_PROGRAMS= iopipe chunk overhead zip_perf perf_meta $(BUILD_ALL_PROGS) perf
-h5perf_SOURCES=pio_perf.c pio_engine.c pio_timer.c
-h5perf_serial_SOURCES=sio_perf.c sio_engine.c sio_timer.c
+h5perf_SOURCES=pio_perf.c pio_engine.c
+h5perf_serial_SOURCES=sio_perf.c sio_engine.c
# These are the files that `make clean' (and derivatives) will remove from
# this directory.
diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in
index 1244e27..24aa8be 100644
--- a/tools/perform/Makefile.in
+++ b/tools/perform/Makefile.in
@@ -130,15 +130,13 @@ AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-am_h5perf_OBJECTS = pio_perf.$(OBJEXT) pio_engine.$(OBJEXT) \
- pio_timer.$(OBJEXT)
+am_h5perf_OBJECTS = pio_perf.$(OBJEXT) pio_engine.$(OBJEXT)
h5perf_OBJECTS = $(am_h5perf_OBJECTS)
h5perf_DEPENDENCIES = $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5)
h5perf_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(h5perf_LDFLAGS) $(LDFLAGS) -o $@
-am_h5perf_serial_OBJECTS = sio_perf.$(OBJEXT) sio_engine.$(OBJEXT) \
- sio_timer.$(OBJEXT)
+am_h5perf_serial_OBJECTS = sio_perf.$(OBJEXT) sio_engine.$(OBJEXT)
h5perf_serial_OBJECTS = $(am_h5perf_serial_OBJECTS)
h5perf_serial_DEPENDENCIES = $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5)
h5perf_serial_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -723,8 +721,8 @@ h5perf_serial_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
@BUILD_PARALLEL_CONDITIONAL_TRUE@TEST_PROG_PARA = h5perf perf
# Serial test programs.
TEST_PROG = iopipe chunk overhead zip_perf perf_meta h5perf_serial $(BUILD_ALL_PROGS)
-h5perf_SOURCES = pio_perf.c pio_engine.c pio_timer.c
-h5perf_serial_SOURCES = sio_perf.c sio_engine.c sio_timer.c
+h5perf_SOURCES = pio_perf.c pio_engine.c
+h5perf_serial_SOURCES = sio_perf.c sio_engine.c
# These are the files that `make clean' (and derivatives) will remove from
# this directory.
@@ -898,10 +896,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_meta.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_engine.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_perf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_timer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sio_engine.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sio_perf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sio_timer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zip_perf.Po@am__quote@
.c.o:
diff --git a/tools/perform/benchpar.c b/tools/perform/benchpar.c
deleted file mode 100644
index b75006a..0000000
--- a/tools/perform/benchpar.c
+++ /dev/null
@@ -1,488 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifdef H5_HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <stdlib.h>
-#include <assert.h>
-#include <math.h>
-#include <float.h>
-#include <string.h>
-
-#include "hdf5.h"
-
-/* Local macros */
-#ifdef H5_HAVE_VISUAL_STUDIO
-#define HDgetlogin() Wgetlogin()
-#else /* H5_HAVE_VISUAL_STUDIO */
-#define HDgetlogin() getlogin()
-#endif /* H5_HAVE_VISUAL_STUDIO */
-
-/*
- * HDF Boolean type.
- */
-#ifndef FALSE
-# define FALSE 0
-#endif
-#ifndef TRUE
-# define TRUE 1
-#endif
-
-/* defines for type of VFL driver to use */
-#define FACC_DEFAULT 0
-#define FACC_MPIO 1
-
-/* Defines for computing performance information */
-#define ONE_KB 1024
-#define ONE_MB (ONE_KB * ONE_KB)
-#define ONE_GB (ONE_MB * ONE_KB)
-
-/* report 0.0 in case t is zero too */
-#define MB_PER_SEC(bytes,t) ((fabs(t)<0.0000000001) ? 0.0 : ((((double)bytes) / ONE_MB) / (t)))
-
-/* Control default behavior (with no command line arguments) */
-#define DEFAULT_RANK 3
-#define DEFAULT_DIM 1024
-#define DEFAULT_PREFIX "/tmp"
-#define DEFAULT_USERNAME "koziol"
-#define DEFAULT_FILENAME "benchpar.h5"
-#define DEFAULT_SLICE 0
-#define DEFAULT_C_TYPE int
-#define DEFAULT_HDF5_DATATYPE H5T_NATIVE_INT /* Keep this in sync with the DEFAULT_C_TYPE */
-#define DEFAULT_DATASET_NAME "Dataset"
-#define DEFAULT_VFL_DRIVER FACC_MPIO
-#define DEFAULT_PAR_MODE H5FD_MPIO_COLLECTIVE
-#define DEFAULT_CHUNK_STORAGE 0
-#define DEFAULT_ITER 3
-
-/* MPI info */
-int mpi_rank, mpi_size;
-int mpi_namelen;
-char mpi_name[MPI_MAX_PROCESSOR_NAME];
-
-/* Usage information */
-static void usage(void)
-{
- printf("usage: benchpar [-d <# of dims>] [-s <dim_size>] [-f <file name>] [-h]\n");
- printf(" [-S <slice dim>] [-I] [-c] [-i <# of iterations>\n");
- printf(" -c - Use chunked storage for dataset with 1-1 exact\n");
- printf(" mapping of chunks to hyperslabs\n");
- printf(" Default: off (i.e. contiguous storage)\n");
- printf(" -d <# of dims> - Number of dimensions of the dataset\n");
- printf(" Default: 3\n");
- printf(" -f <file name> - Set the name of the test file\n");
- printf(" Default: /tmp/<login>/benchpar.h5\n");
- printf(" -h - Prints usage information\n");
- printf(" -i <# of iters> - Set the number of test iterations to perform\n");
- printf(" Default: 3\n");
- printf(" -I - Use independent parallel I/O\n");
- printf(" Default: use collective parallel I/O\n");
- printf(" -s <dim_size> - Set the size of each of the dataset's dimensions\n");
- printf(" Default: 1024\n");
- printf(" -S <slice dim> - Set the dimension to slice the dataset along\n");
- printf(" Default: 0\n");
-} /* end usage() */
-
-/* Create & initialize file creation property list with appropriate properties */
-static hid_t create_fcpl(void)
-{
- hid_t fcpl; /* File creation property list */
-
- fcpl=H5Pcreate(H5P_FILE_CREATE);
- assert(fcpl>0);
-
- return(fcpl);
-} /* end create_fcpl() */
-
-/* Create & initialize file access property list with appropriate properties */
-static hid_t create_fapl(MPI_Comm comm, MPI_Info info, int acc_type )
-{
- hid_t fapl; /* File access property list */
- herr_t ret; /* Generic return value */
-
- fapl = H5Pcreate (H5P_FILE_ACCESS);
- assert(fapl>0);
-
- /* set parallel access with communicator, using MPI-I/O driver */
- if (acc_type == FACC_MPIO) {
- ret = H5Pset_fapl_mpio(fapl, comm, info);
- assert(ret>=0);
- } /* end if */
-
- return (fapl);
-} /* end create_fapl() */
-
-/* Create & initialize dataset creation property list with appropriate properties */
-static hid_t create_dcpl(unsigned use_chunks, int rank, hsize_t *dims)
-{
- hid_t dcpl; /* Dataset creation property list */
- herr_t ret; /* Generic return value */
-
- dcpl=H5Pcreate(H5P_DATASET_CREATE);
- assert(dcpl>0);
-
- /* Check if the dataset should be chunked */
- if(use_chunks) {
- ret = H5Pset_chunk(dcpl, rank, dims);
- assert(ret>=0);
- } /* end if */
-
- return(dcpl);
-} /* end create_dcpl() */
-
-/* Create & initialize dataset transfer property list with appropriate properties */
-static hid_t create_dxpl(H5FD_mpio_xfer_t par_mode)
-{
- hid_t dxpl; /* Dataset creation property list */
- herr_t ret; /* Generic return value */
-
- dxpl=H5Pcreate(H5P_DATASET_XFER);
- assert(dxpl>0);
-
- /* Set collective I/O on this transfer */
- ret=H5Pset_dxpl_mpio(dxpl, par_mode);
- assert(ret>=0);
-
- return(dxpl);
-} /* end create_dcpl() */
-
-int main(int argc, char *argv[])
-{
- int curr_arg; /* Current command line argument being processed */
- int rank; /* Number of dimensions of the dataset */
- hsize_t dim_size; /* Dimension size of each dimension */
- hsize_t dims[H5S_MAX_RANK]; /* Pointer to array of dimensions */
- hsize_t start[H5S_MAX_RANK]; /* Pointer to array of starting locations for hyperslab selection */
- hsize_t count[H5S_MAX_RANK]; /* Pointer to array of counts for hyperslab selection */
- unsigned slice_dim; /* Dimension to slice up */
- char *file_name=NULL; /* Name of file to put data into */
- hid_t fcpl; /* HDF5 File creation property list ID */
- hid_t fapl; /* HDF5 File access property list ID */
- hid_t dcpl; /* HDF5 Dataset creation property list ID */
- hid_t dxpl; /* HDF5 Dataset transfer property list ID */
- hid_t fid; /* HDF5 file ID */
- hid_t dsid; /* HDF5 dataset ID */
- hid_t file_sid; /* HDF5 dataspace ID for dataset on disk */
- hid_t mem_sid; /* HDF5 dataspace ID for dataset in memory */
- DEFAULT_C_TYPE *buf; /* Buffer to write out */
- hsize_t buf_size; /* Size of buffer to write */
- int i; /* Local index variable */
- herr_t ret; /* Generic return value */
- double start_write_time, end_write_time, elap_write_time; /* Start, end and elapsed time to write raw data */
- double tmp_max_write_time; /* Temporary holders for maximum time for all nodes to perform raw data I/O */
- double max_write_time=-DBL_MAX, min_write_time=DBL_MAX; /* Minimum & maximum time for all nodes to perform raw data I/O */
- double start_file_time, end_file_time, elap_file_time; /* Start, end and elapsed time from file open to file close */
- double tmp_max_file_time; /* Temporary holders for maximum time for all nodes from file open to file close */
- double max_file_time=-DBL_MAX, min_file_time=DBL_MAX; /* Minimum & maximum time for all nodes from file open to file close */
- int vfl_type; /* Type of VFL driver to use */
- H5FD_mpio_xfer_t par_mode; /* Type of parallel I/O to perform */
- unsigned use_chunks; /* Whether to use chunks for dataset or not */
- unsigned num_iter; /* Number of iterations to perform */
- unsigned u; /* Local index variable */
-
- /* Un-buffer the stdout and stderr */
- setbuf(stderr, NULL);
- setbuf(stdout, NULL);
-
- /* MPI initialization */
- MPI_Init(&argc,&argv);
- MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
- MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
- MPI_Get_processor_name(mpi_name,&mpi_namelen);
-
- /* Set some defaults */
- rank=DEFAULT_RANK;
- dim_size=DEFAULT_DIM;
- slice_dim=DEFAULT_SLICE;
- vfl_type=DEFAULT_VFL_DRIVER;
- par_mode=DEFAULT_PAR_MODE;
- use_chunks=DEFAULT_CHUNK_STORAGE;
- num_iter=DEFAULT_ITER;
-
- /* Parse command line arguments */
- if(argc>1) {
- curr_arg=1;
- while(curr_arg<argc) {
- /* Trap any unknown command line parameters */
- if(argv[curr_arg][0]!='-') {
- printf("unknown command line parameter: %s\n",argv[curr_arg]);
- goto done;
- } /* end if */
-
- /* Skip over command line flag */
- curr_arg++;
-
- switch(argv[curr_arg-1][1]) {
- case 'c': /* Use chunked storage for dataset */
- use_chunks=1;
- break;
-
- case 'd': /* Change number of dimensions */
- /* Get new number of dimensions */
- rank=atoi(argv[curr_arg]);
- curr_arg++; /* Skip over number of dimensions */
-
- /* Sanity check */
- if(rank<=0) {
- printf("rank=%d, invalid number of dimensions: %d\n",mpi_rank,rank);
- goto done;
- } /* end if */
- break;
-
- case 'f': /* Change test file name */
- /* Get new file name */
- file_name=strdup(argv[curr_arg]);
- curr_arg++; /* Skip over file name from command line */
- break;
-
- case 'h': /* Print usage information */
- usage();
- goto done;
- break;
-
- case 'i': /* Change number of iterations */
- /* Get new number of dimensions */
- num_iter=atoi(argv[curr_arg]);
- curr_arg++; /* Skip over number of iterations */
-
- /* Sanity check */
- if(num_iter<1) {
- printf("rank=%d, invalid number of iterations: %u\n",mpi_rank,num_iter);
- goto done;
- } /* end if */
- break;
-
- case 'I': /* Use independent I/O for parallel I/O */
- par_mode=H5FD_MPIO_INDEPENDENT;
- break;
-
- case 's': /* Change dimension size */
- /* Get new dimension size */
- dim_size=atoi(argv[curr_arg]);
- curr_arg++; /* Skip over dimension size from command line */
-
- /* Sanity check */
- if(dim_size<=0) {
- printf("rank=%d, invalid dimension size: %ld\n",mpi_rank,(long)dim_size);
- goto done;
- } /* end if */
- break;
-
- case 'S': /* Change dimension to slice */
- /* Get new dimension to slice */
- slice_dim=atoi(argv[curr_arg]);
- curr_arg++; /* Skip over slice dimension from command line */
- break;
-
- default:
- printf("rank=%d, unknown command line parameter: %s\n",mpi_rank,argv[curr_arg-1]);
- goto done;
- } /* end switch */
- } /* end while */
- } /* end if */
-
- /* Sanity check */
- if(slice_dim>=rank) {
- printf("rank=%d, error, slice dim larger than rank: slice_dim=%d, rank=%d\n",mpi_rank,slice_dim,rank);
- goto done;
- } /* end if */
-
- /* Set rest of defaults */
- if(file_name==NULL) {
- char *login; /* Pointer to login name */
-
- /* Get the login name for this user */
- login=HDgetlogin();
- if(login==NULL)
- login=DEFAULT_USERNAME;
-
- /* Allocate enough room for the prefix, the login name, two '/'s, the filename and the string terminator */
- file_name=malloc(strlen(DEFAULT_PREFIX)+1+strlen(login)+1+strlen(DEFAULT_FILENAME)+1);
- strcpy(file_name,DEFAULT_PREFIX);
- strcat(file_name,"/");
- strcat(file_name,login);
- strcat(file_name,"/");
- strcat(file_name,DEFAULT_FILENAME);
- } /* end if */
-
- /* Allocate memory for this process's portion of dataset */
- buf_size=sizeof(DEFAULT_C_TYPE);
- for(i=0; i<rank; i++)
- buf_size *= dim_size;
- buf_size /= mpi_size;
-
- /* Sanity check for overflow */
- assert((hsize_t)((size_t)buf_size)==buf_size);
-
- buf=malloc((size_t)buf_size);
- assert(buf);
-
- /* Initialize dataset portion to something unique for each process */
- memset(buf,mpi_rank,(size_t)buf_size);
-
- for(u=0; u<num_iter; u++) {
- /* Create file creation property list */
- fcpl=create_fcpl();
- assert(fcpl>0);
-
- /* Create file access property list */
- fapl=create_fapl(MPI_COMM_WORLD,MPI_INFO_NULL,vfl_type);
- assert(fapl>0);
-
- /* Get file start time */
- start_file_time = MPI_Wtime();
-
- /* Create file */
- fid=H5Fcreate(file_name,H5F_ACC_TRUNC,fcpl,fapl);
- assert(fid>0);
-
- /* Close file creation property list */
- ret=H5Pclose(fcpl);
- assert(ret>=0);
-
- /* Close file access property list */
- ret=H5Pclose(fapl);
- assert(ret>=0);
-
- /* Create dataspace for dataset on disk */
- for(i=0; i<rank; i++)
- dims[i]=dim_size;
-
- file_sid=H5Screate_simple(rank,dims,NULL);
- assert(file_sid>0);
-
- /* Create dataspace for buffer in memory */
- for(i=0; i<rank; i++)
- dims[i]=dim_size;
- dims[slice_dim] /= mpi_size;
-
- mem_sid=H5Screate_simple(rank,dims,NULL);
- assert(mem_sid>0);
-
- /* Create dataset creation property list */
- dcpl=create_dcpl(use_chunks,rank,dims);
- assert(dcpl>0);
-
- /* Create dataset */
- dsid = H5Dcreate2(fid, DEFAULT_DATASET_NAME, DEFAULT_HDF5_DATATYPE, file_sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- assert(dsid > 0);
-
- /* Close dataset creation property list */
- ret=H5Pclose(dcpl);
- assert(ret>=0);
-
- /* Select hyperslab for file dataspace */
- for(i=0; i<rank; i++) {
- start[i]=0;
- count[i]=dim_size;
- } /* end for */
- start[slice_dim]=mpi_rank*(dim_size/mpi_size);
- count[slice_dim]=dim_size/mpi_size;
-
- ret = H5Sselect_hyperslab(file_sid,H5S_SELECT_SET,start,NULL,count,NULL);
- assert(ret>=0);
-
- /* Create dataset transfer property list */
- dxpl=create_dxpl(par_mode);
- assert(dxpl>0);
-
- /* Get raw data start time */
- start_write_time = MPI_Wtime();
-
- /* Write hyperslab to dataset */
- ret = H5Dwrite(dsid, DEFAULT_HDF5_DATATYPE, mem_sid,
- file_sid, dxpl, buf);
- assert(ret>=0);
-
- /* Get stop time for raw data timer */
- end_write_time = MPI_Wtime();
-
- /* Close dataset transfer property list */
- ret=H5Pclose(dxpl);
- assert(ret>=0);
-
- /* Close memory dataspace */
- ret=H5Sclose(mem_sid);
- assert(ret>=0);
-
- /* Close file dataspace */
- ret=H5Sclose(file_sid);
- assert(ret>=0);
-
- /* Close dataset */
- ret=H5Dclose(dsid);
- assert(ret>=0);
-
- /* Close file */
- ret=H5Fclose(fid);
- assert(ret>=0);
-
- /* Get stop time for file timer */
- end_file_time = MPI_Wtime();
-
- /* Compute timing results */
- elap_write_time=end_write_time-start_write_time;
- elap_file_time=end_file_time-start_file_time;
-
- /* Collect the minimum and maximum times by MPI reduces */
- MPI_Allreduce(&elap_write_time, &tmp_max_write_time, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD);
- MPI_Allreduce(&elap_file_time, &tmp_max_file_time, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD);
-
- /* Track the fastest & slowest total runs */
- if(tmp_max_write_time>max_write_time)
- max_write_time=tmp_max_write_time;
- if(tmp_max_write_time<min_write_time)
- min_write_time=tmp_max_write_time;
- if(tmp_max_file_time>max_file_time)
- max_file_time=tmp_max_file_time;
- if(tmp_max_file_time<min_file_time)
- min_file_time=tmp_max_file_time;
- } /* end for */
-
- /* Only print information from one node */
- if(mpi_rank==0) {
- /* Print information about test */
- printf("File driver used: %s\n",vfl_type==FACC_MPIO ? "MPI-I/O" : "Unknown");
- printf("Type of parallel access: %s\n",par_mode==H5FD_MPIO_COLLECTIVE ? "Collective" : "Independent");
- printf("Type of dataset storage: %s\n",use_chunks ? "Chunked" : "Contiguous");
- printf("Number of processes: %d\n",mpi_size);
- printf("Element size: %u\n",(unsigned)sizeof(DEFAULT_C_TYPE));
- printf("# of dimensions: %d\n",rank);
- printf("Dimension size: %ld\n",(long)dim_size);
- printf("Dimension sliced: %u\n",slice_dim);
- printf("Number of elements: %lu\n",(unsigned long)((buf_size/sizeof(DEFAULT_C_TYPE))*mpi_size));
- printf("Total dataset size (bytes): %lu\n",(unsigned long)(buf_size*mpi_size));
- printf("Dataset size per process (bytes): %lu\n",(unsigned long)buf_size);
-
- /* Print timing results */
- printf("# of iterations: %u\n",num_iter);
- printf("Maximum raw data write throughput=%6.2f MB/s (%7.3f s)\n",MB_PER_SEC((buf_size*mpi_size),min_write_time),min_write_time);
- printf("Minimum raw data write throughput=%6.2f MB/s (%7.3f s)\n",MB_PER_SEC((buf_size*mpi_size),max_write_time),max_write_time);
- printf("Maximum file throughput=%6.2f MB/s (%7.3f s)\n",MB_PER_SEC((buf_size*mpi_size),min_file_time),min_file_time);
- printf("Minimum file throughput=%6.2f MB/s (%7.3f s)\n",MB_PER_SEC((buf_size*mpi_size),max_file_time),max_file_time);
- } /* end if */
-
-done:
- /* Free buffers allocated */
- if(file_name)
- free(file_name);
- if(buf)
- free(buf);
-
- /* MPI termination */
- MPI_Finalize();
- return(0);
-} /* end main() */
diff --git a/tools/perform/pio_engine.c b/tools/perform/pio_engine.c
index 3535fb4..96cfcc2 100644
--- a/tools/perform/pio_engine.c
+++ b/tools/perform/pio_engine.c
@@ -38,7 +38,6 @@
#endif /* !MPI_FILE_NULL */
#include "pio_perf.h"
-#include "pio_timer.h"
/* Macro definitions */
@@ -174,15 +173,15 @@ do_pio(parameters param)
switch (iot) {
case MPIO:
fd.mpifd = MPI_FILE_NULL;
- res.timers = pio_time_new(MPI_TIMER);
+ res.timers = io_time_new(MPI_CLOCK);
break;
case POSIXIO:
fd.posixfd = -1;
- res.timers = pio_time_new(MPI_TIMER);
+ res.timers = io_time_new(MPI_CLOCK);
break;
case PHDF5:
fd.h5fd = -1;
- res.timers = pio_time_new(MPI_TIMER);
+ res.timers = io_time_new(MPI_CLOCK);
break;
default:
/* unknown request */
diff --git a/tools/perform/pio_perf.c b/tools/perform/pio_perf.c
index cf41cbe..4db2249 100644
--- a/tools/perform/pio_perf.c
+++ b/tools/perform/pio_perf.c
@@ -664,7 +664,7 @@ run_test(iotype iot, parameters parms, struct options *opts)
}
- pio_time_destroy(res.timers);
+ io_time_destroy(res.timers);
}
/*
@@ -1676,6 +1676,58 @@ usage(const char *prog)
}
}
+void debug_start_stop_time(io_time_t *pt, timer_type t, int start_stop)
+{
+#if 1
+ if (pio_debug_level >= 4) {
+ const char *msg;
+ int myrank;
+
+ MPI_Comm_rank(pio_comm_g, &myrank);
+
+ switch (t) {
+ case HDF5_FILE_OPENCLOSE:
+ msg = "File Open/Close";
+ break;
+ case HDF5_DATASET_CREATE:
+ msg = "Dataset Create";
+ break;
+ case HDF5_MPI_WRITE:
+ msg = "MPI Write";
+ break;
+ case HDF5_MPI_READ:
+ msg = "MPI Read";
+ break;
+ case HDF5_FINE_WRITE_FIXED_DIMS:
+ msg = "Fine Write";
+ break;
+ case HDF5_FINE_READ_FIXED_DIMS:
+ msg = "Fine Read";
+ break;
+ case HDF5_GROSS_WRITE_FIXED_DIMS:
+ msg = "Gross Write";
+ break;
+ case HDF5_GROSS_READ_FIXED_DIMS:
+ msg = "Gross Read";
+ break;
+ case HDF5_RAW_WRITE_FIXED_DIMS:
+ msg = "Raw Write";
+ break;
+ case HDF5_RAW_READ_FIXED_DIMS:
+ msg = "Raw Read";
+ break;
+ default:
+ msg = "Unknown Timer";
+ break;
+ }
+
+ fprintf(output, " Proc %d: %s %s: %.2f\n", myrank, msg,
+ (start_stop == TSTART ? "Start" : "Stop"),
+ pt->total_time[t]);
+ }
+#endif
+} /* debug_start_stop_time */
+
#else /* H5_HAVE_PARALLEL */
/*
diff --git a/tools/perform/pio_perf.h b/tools/perform/pio_perf.h
index 3295e2b..0fff7a3 100644
--- a/tools/perform/pio_perf.h
+++ b/tools/perform/pio_perf.h
@@ -24,7 +24,7 @@
#else
#include "pio_standalone.h"
#endif
-#include "pio_timer.h"
+#include "io_timer.h"
/* setup the dataset no fill option if this is v1.5 or more */
#if H5_VERS_MAJOR > 1 || H5_VERS_MINOR > 4
@@ -59,7 +59,7 @@ typedef struct parameters_ {
typedef struct results_ {
herr_t ret_code;
- pio_time *timers;
+ io_time_t *timers;
} results;
#ifndef SUCCESS
@@ -71,7 +71,7 @@ typedef struct results_ {
#endif /* !FAIL */
extern FILE *output; /* output file */
-extern pio_time *timer_g; /* timer: global for stub functions */
+extern io_time_t *timer_g; /* timer: global for stub functions */
extern int comm_world_rank_g; /* my rank in MPI_COMM_RANK */
extern int comm_world_nprocs_g;/* num. of processes of MPI_COMM_WORLD */
extern MPI_Comm pio_comm_g; /* Communicator to run the PIO */
diff --git a/tools/perform/pio_timer.c b/tools/perform/pio_timer.c
deleted file mode 100644
index aba219e..0000000
--- a/tools/perform/pio_timer.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Purpose:
- *
- * This is a module of useful timing functions for performance testing.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "hdf5.h"
-
-#ifdef H5_HAVE_PARALLEL
-
-#include <mpi.h>
-
-#include "pio_perf.h"
-
-/*
- * The number to divide the tv_usec field with to get a nice decimal to add to
- * the number of seconds.
- */
-#define MICROSECOND 1000000.0
-
-/* global variables */
-pio_time *timer_g; /* timer: global for stub functions */
-
-/*
- * Function: sub_time
- * Purpose: Struct two time values, and return the difference, in microseconds
- *
- * Note that the function assumes that a > b
- * Programmer: Leon Arber, 1/27/06
- */
-static double sub_time(struct timeval* a, struct timeval* b)
-{
- return (((double)a->tv_sec +
- ((double)a->tv_usec) / MICROSECOND) -
- ((double)b->tv_sec +
- ((double)b->tv_usec) / MICROSECOND));
-}
-
-
-/*
- * Function: pio_time_new
- * Purpose: Build us a brand, spankin', new performance time object.
- * The object is a black box to the user. They just tell us
- * what type of timer they want (MPI_TIMER for MPI_Wtime or
- * SYS_TIMER for system time).
- * Return: Pointer to pio_time object
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-pio_time *
-pio_time_new(clock_type type)
-{
- pio_time *pt = (pio_time *)calloc(1, sizeof(struct pio_time_));
-
- /* set global timer variable */
- timer_g = pt;
-
- pt->type = type;
- return pt;
-}
-
-/*
- * Function: pio_time_destroy
- * Purpose: Remove the memory allocated for the pio_time object. Only
- * need to call on a pointer allocated with the ``pio_time_new''
- * function.
- * Return: Nothing
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-void
-pio_time_destroy(pio_time *pt)
-{
- HDfree(pt);
- /* reset the global timer pointer too. */
- timer_g = NULL;
-}
-
-/*
- * Function: set_timer_type
- * Purpose: Set the type of the timer to either MPI_TIMER or SYS_TIMER.
- * This really only needs to be called if you didn't construct a
- * timer with the pio_timer_new function (shame!).
- * Return: Nothing
- * Programmer: Bill Wendling, 04. October 2001
- * Modifications:
- */
-void
-set_timer_type(pio_time *pt, clock_type type)
-{
- pt->type = type;
-}
-
-/*
- * Function: get_timer_type
- * Purpose: Get the type of the timer.
- * Return: MPI_TIMER or SYS_TIMER.
- * Programmer: Bill Wendling, 04. October 2001
- * Modifications:
- */
-clock_type
-get_timer_type(pio_time *pt)
-{
- return pt->type;
-}
-
-/*
- * Function: set_time
- * Purpose: Set the time in a ``pio_time'' object.
- * Return: Pointer to the passed in ``pio_time'' object.
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-pio_time *
-set_time(pio_time *pt, timer_type t, int start_stop)
-{
- if (pt) {
- if (pt->type == MPI_TIMER) {
- if (start_stop == TSTART) {
- pt->mpi_timer[t] = MPI_Wtime();
-
- /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS
- * we compute the time it took to only open the file */
- if(t == HDF5_FINE_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_WRITE_FIXED_DIMS];
- else if(t == HDF5_FINE_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_READ_FIXED_DIMS];
-
- } else {
- pt->total_time[t] += MPI_Wtime() - pt->mpi_timer[t];
- pt->mpi_timer[t] = MPI_Wtime();
-
- /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS
- * we compute the time it took to close the file after the last read/write finished */
- if(t == HDF5_GROSS_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_WRITE_FIXED_DIMS];
- else if(t == HDF5_GROSS_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_READ_FIXED_DIMS];
- }
- } else {
- if (start_stop == TSTART) {
- HDgettimeofday(&pt->sys_timer[t], NULL);
-
- /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS
- * we compute the time it took to only open the file */
- if(t == HDF5_FINE_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS]));
- else if(t == HDF5_FINE_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS]));
-
-
- } else {
- struct timeval sys_t;
-
- HDgettimeofday(&sys_t, NULL);
- pt->total_time[t] += sub_time(&sys_t, &(pt->sys_timer[t]));
-
-/* ((double)sys_t.tv_sec +
- ((double)sys_t.tv_usec) / MICROSECOND) -
- ((double)pt->sys_timer[t].tv_sec +
- ((double)pt->sys_timer[t].tv_usec) / MICROSECOND);*/
-
- /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS
- * we compute the time it took to close the file after the last read/write finished */
- if(t == HDF5_GROSS_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS]));
- else if(t == HDF5_GROSS_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS]));
-
- }
- }
-
- if (pio_debug_level >= 4) {
- const char *msg;
- int myrank;
-
- MPI_Comm_rank(pio_comm_g, &myrank);
-
- switch (t) {
- case HDF5_FILE_OPENCLOSE:
- msg = "File Open/Close";
- break;
- case HDF5_DATASET_CREATE:
- msg = "Dataset Create";
- break;
- case HDF5_MPI_WRITE:
- msg = "MPI Write";
- break;
- case HDF5_MPI_READ:
- msg = "MPI Read";
- break;
- case HDF5_FINE_WRITE_FIXED_DIMS:
- msg = "Fine Write";
- break;
- case HDF5_FINE_READ_FIXED_DIMS:
- msg = "Fine Read";
- break;
- case HDF5_GROSS_WRITE_FIXED_DIMS:
- msg = "Gross Write";
- break;
- case HDF5_GROSS_READ_FIXED_DIMS:
- msg = "Gross Read";
- break;
- case HDF5_RAW_WRITE_FIXED_DIMS:
- msg = "Raw Write";
- break;
- case HDF5_RAW_READ_FIXED_DIMS:
- msg = "Raw Read";
- break;
- default:
- msg = "Unknown Timer";
- break;
- }
-
- fprintf(output, " Proc %d: %s %s: %.2f\n", myrank, msg,
- (start_stop == TSTART ? "Start" : "Stop"),
- pt->total_time[t]);
- }
- }
-
- return pt;
-}
-
-/*
- * Function: get_time
- * Purpose: Get the time from a ``pio_time'' object.
- * Return: The number of seconds as a DOUBLE.
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-double
-get_time(pio_time *pt, timer_type t)
-{
- return pt->total_time[t];
-}
-
-#endif /* H5_HAVE_PARALLEL */
-#ifdef STANDALONE
-#include "pio_standalone.c"
-#endif
diff --git a/tools/perform/sio_engine.c b/tools/perform/sio_engine.c
index 07e6b16c..3b28ea7 100644
--- a/tools/perform/sio_engine.c
+++ b/tools/perform/sio_engine.c
@@ -29,7 +29,6 @@
#include "hdf5.h"
#include "sio_perf.h"
-#include "sio_timer.h"
/* Macro definitions */
@@ -143,11 +142,11 @@ do_sio(parameters param)
switch (iot) {
case POSIXIO:
fd.posixfd = -1;
- res.timers = sio_time_new();
+ res.timers = io_time_new(SYS_CLOCK);
break;
case HDF5:
fd.h5fd = -1;
- res.timers = sio_time_new();
+ res.timers = io_time_new(SYS_CLOCK);
break;
default:
/* unknown request */
diff --git a/tools/perform/sio_perf.c b/tools/perform/sio_perf.c
index 26cec6d..1828d6f 100644
--- a/tools/perform/sio_perf.c
+++ b/tools/perform/sio_perf.c
@@ -547,7 +547,7 @@ run_test(iotype iot, parameters parms, struct options *opts)
read_raw_mm_table[i] = read_gross_mm;
}
- sio_time_destroy(res.timers);
+ io_time_destroy(res.timers);
}
/*
@@ -1407,3 +1407,50 @@ usage(const char *prog)
fflush(stdout);
}
+void debug_start_stop_time(io_time_t *pt, timer_type t, int start_stop)
+{
+ if (sio_debug_level >= 4) {
+ const char *msg;
+
+ switch (t) {
+ case HDF5_FILE_OPENCLOSE:
+ msg = "File Open/Close";
+ break;
+ case HDF5_DATASET_CREATE:
+ msg = "Dataset Create";
+ break;
+ case HDF5_MPI_WRITE:
+ msg = "MPI Write";
+ break;
+ case HDF5_MPI_READ:
+ msg = "MPI Read";
+ break;
+ case HDF5_FINE_WRITE_FIXED_DIMS:
+ msg = "Fine Write";
+ break;
+ case HDF5_FINE_READ_FIXED_DIMS:
+ msg = "Fine Read";
+ break;
+ case HDF5_GROSS_WRITE_FIXED_DIMS:
+ msg = "Gross Write";
+ break;
+ case HDF5_GROSS_READ_FIXED_DIMS:
+ msg = "Gross Read";
+ break;
+ case HDF5_RAW_WRITE_FIXED_DIMS:
+ msg = "Raw Write";
+ break;
+ case HDF5_RAW_READ_FIXED_DIMS:
+ msg = "Raw Read";
+ break;
+ default:
+ msg = "Unknown Timer";
+ break;
+ }
+
+ fprintf(output, " %s %s: %.2f\n", msg,
+ (start_stop == TSTART ? "Start" : "Stop"),
+ pt->total_time[t]);
+ }
+} /* debug_start_stop_time */
+
diff --git a/tools/perform/sio_perf.h b/tools/perform/sio_perf.h
index b40fed3..311d909 100644
--- a/tools/perform/sio_perf.h
+++ b/tools/perform/sio_perf.h
@@ -15,7 +15,7 @@
#ifndef SIO_PERF_H__
#define SIO_PERF_H__
-#include "sio_timer.h"
+#include "io_timer.h"
#ifndef STANDALONE
#include "H5private.h"
#include "h5test.h"
@@ -71,7 +71,7 @@ typedef struct parameters_ {
typedef struct results_ {
herr_t ret_code;
- sio_time *timers;
+ io_time_t *timers;
} results;
#ifndef SUCCESS
@@ -83,7 +83,7 @@ typedef struct results_ {
#endif /* !FAIL */
extern FILE *output; /* output file */
-extern sio_time *timer_g; /* timer: global for stub functions */
+extern io_time_t *timer_g; /* timer: global for stub functions */
extern int sio_debug_level; /* The debug level:
* 0 - Off
* 1 - Minimal
diff --git a/tools/perform/sio_timer.c b/tools/perform/sio_timer.c
deleted file mode 100644
index 4e42ee6..0000000
--- a/tools/perform/sio_timer.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Purpose:
- *
- * This is a module of useful timing functions for performance testing.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "sio_timer.h"
-
-
-#include "sio_perf.h"
-
-/*
- * The number to divide the tv_usec field with to get a nice decimal to add to
- * the number of seconds.
- */
-#define MICROSECOND 1000000.0
-
-/* global variables */
-sio_time *timer_g; /* timer: global for stub functions */
-
-/*
- * Function: sub_time
- * Purpose: Struct two time values, and return the difference, in microseconds
- *
- * Note that the function assumes that a > b
- * Programmer: Leon Arber, 1/27/06
- */
-static double sub_time(struct timeval* a, struct timeval* b)
-{
- return (((double)a->tv_sec +
- ((double)a->tv_usec) / MICROSECOND) -
- ((double)b->tv_sec +
- ((double)b->tv_usec) / MICROSECOND));
-}
-
-
-/*
- * Function: sio_time_new
- * Purpose: Build us a brand, spankin', new performance time object.
- * The object is a black box to the user.
- * Return: Pointer to sio_time object
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-sio_time *
-sio_time_new(void)
-{
- sio_time *pt = (sio_time *)calloc(1, sizeof(struct sio_time_));
-
- /* set global timer variable */
- timer_g = pt;
-
- return pt;
-}
-
-/*
- * Function: sio_time_destroy
- * Purpose: Remove the memory allocated for the sio_time object. Only
- * need to call on a pointer allocated with the ``sio_time_new''
- * function.
- * Return: Nothing
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-void
-sio_time_destroy(sio_time *pt)
-{
- HDfree(pt);
- /* reset the global timer pointer too. */
- timer_g = NULL;
-}
-
-
-
-/*
- * Function: set_time
- * Purpose: Set the time in a ``sio_time'' object.
- * Return: Pointer to the passed in ``sio_time'' object.
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-sio_time *
-set_time(sio_time *pt, timer_type t, int start_stop)
-{
- if (pt) {
- if (start_stop == TSTART) {
- HDgettimeofday(&pt->sys_timer[t], NULL);
-
- /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS
- * we compute the time it took to only open the file */
- if(t == HDF5_FINE_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS]));
- else if(t == HDF5_FINE_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS]));
-
-
- } else {
- struct timeval sys_t;
-
- HDgettimeofday(&sys_t, NULL);
- pt->total_time[t] += sub_time(&sys_t, &(pt->sys_timer[t]));
-
-/* ((double)sys_t.tv_sec +
- ((double)sys_t.tv_usec) / MICROSECOND) -
- ((double)pt->sys_timer[t].tv_sec +
- ((double)pt->sys_timer[t].tv_usec) / MICROSECOND);*/
-
- /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS
- * we compute the time it took to close the file after the last read/write finished */
- if(t == HDF5_GROSS_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS]));
- else if(t == HDF5_GROSS_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS]));
-
- }
-
- if (sio_debug_level >= 4) {
- const char *msg;
-
- switch (t) {
- case HDF5_FILE_OPENCLOSE:
- msg = "File Open/Close";
- break;
- case HDF5_DATASET_CREATE:
- msg = "Dataset Create";
- break;
- case HDF5_MPI_WRITE:
- msg = "MPI Write";
- break;
- case HDF5_MPI_READ:
- msg = "MPI Read";
- break;
- case HDF5_FINE_WRITE_FIXED_DIMS:
- msg = "Fine Write";
- break;
- case HDF5_FINE_READ_FIXED_DIMS:
- msg = "Fine Read";
- break;
- case HDF5_GROSS_WRITE_FIXED_DIMS:
- msg = "Gross Write";
- break;
- case HDF5_GROSS_READ_FIXED_DIMS:
- msg = "Gross Read";
- break;
- case HDF5_RAW_WRITE_FIXED_DIMS:
- msg = "Raw Write";
- break;
- case HDF5_RAW_READ_FIXED_DIMS:
- msg = "Raw Read";
- break;
- default:
- msg = "Unknown Timer";
- break;
- }
-
- fprintf(output, " %s %s: %.2f\n", msg,
- (start_stop == TSTART ? "Start" : "Stop"),
- pt->total_time[t]);
- }
- }
-
- return pt;
-}
-
-/*
- * Function: get_time
- * Purpose: Get the time from a ``sio_time'' object.
- * Return: The number of seconds as a DOUBLE.
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-double
-get_time(sio_time *pt, timer_type t)
-{
- return pt->total_time[t];
-}
-#ifdef STANDALONE
-#include "sio_standalone.c"
-#endif
-
diff --git a/tools/perform/sio_timer.h b/tools/perform/sio_timer.h
deleted file mode 100644
index 46702c3..0000000
--- a/tools/perform/sio_timer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef SIO_TIMER__
-#define SIO_TIMER__
-
-#include "hdf5.h"
-
-#if defined(H5_TIME_WITH_SYS_TIME)
-# include <sys/time.h>
-# include <time.h>
-#elif defined(H5_HAVE_SYS_TIME_H)
-# include <sys/time.h>
-#else
-# include <time.h>
-#endif
-
-#ifdef H5_HAVE_WINSOCK2_H
-# include <winsock2.h>
-#endif /* H5_HAVE_WINSOCK2_H */
-
-/* The different types of timers we can have */
-typedef enum timer_type_ {
- HDF5_FILE_OPENCLOSE,
- HDF5_DATASET_CREATE,
- HDF5_MPI_WRITE,
- HDF5_MPI_READ,
- HDF5_FILE_READ_OPEN,
- HDF5_FILE_READ_CLOSE,
- HDF5_FILE_WRITE_OPEN,
- HDF5_FILE_WRITE_CLOSE,
- HDF5_FINE_WRITE_FIXED_DIMS,
- HDF5_FINE_READ_FIXED_DIMS,
- HDF5_GROSS_WRITE_FIXED_DIMS,
- HDF5_GROSS_READ_FIXED_DIMS,
- HDF5_RAW_WRITE_FIXED_DIMS,
- HDF5_RAW_READ_FIXED_DIMS,
- NUM_TIMERS
-} timer_type;
-
-
-/* Miscellaneous identifiers */
-enum {
- TSTART, /* Start a specified timer */
- TSTOP /* Stop a specified timer */
-};
-
-/* The performance time structure */
-typedef struct sio_time_ {
- double total_time[NUM_TIMERS];
- struct timeval sys_timer[NUM_TIMERS];
-} sio_time;
-
-/* External function declarations */
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-extern sio_time *sio_time_new(void);
-extern void sio_time_destroy(sio_time *pt);
-extern void set_timer_type(sio_time *pt);
-extern sio_time *set_time(sio_time *pt, timer_type t, int start_stop);
-extern double get_time(sio_time *pt, timer_type t);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* SIO_TIMER__ */