diff options
-rw-r--r-- | perform/CMakeLists.txt | 102 | ||||
-rw-r--r-- | perform/zip_perf.c | 16 | ||||
-rw-r--r-- | src/H5system.c | 4 | ||||
-rw-r--r-- | src/H5win32defs.h | 4 |
4 files changed, 68 insertions, 58 deletions
diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt index f55888d..15db402 100644 --- a/perform/CMakeLists.txt +++ b/perform/CMakeLists.txt @@ -7,25 +7,9 @@ PROJECT (HDF5_PERFORM ) INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib ) -#----------------------------------------------------------------------------- -# Add Tests -#----------------------------------------------------------------------------- - -# Remove any output file left over from previous test run -ADD_TEST ( - NAME h5perform-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - chunk.h5 - iopipe.h5 - iopipe.raw - x-diag-rd.dat - x-diag-wr.dat - x-rowmaj-rd.dat - x-rowmaj-wr.dat - x-gnuplot -) - +# -------------------------------------------------------------------- +# Add the executables +# -------------------------------------------------------------------- #-- Adding test for h5perf_serial SET (h5perf_serial_SRCS ${HDF5_PERFORM_SOURCE_DIR}/sio_timer.c @@ -36,8 +20,6 @@ ADD_EXECUTABLE (h5perf_serial ${h5perf_serial_SRCS}) TARGET_NAMING (h5perf_serial ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) -ADD_TEST (NAME h5perf_serial COMMAND $<TARGET_FILE:h5perf_serial>) - IF (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for h5perf_serial_alone SET (h5perf_serial_alone_SRCS @@ -51,8 +33,6 @@ IF (HDF5_BUILD_PERFORM_STANDALONE) ) TARGET_NAMING (h5perf_serial_alone ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - - ADD_TEST (NAME h5perf_serial_alone COMMAND $<TARGET_FILE:h5perf_serial_alone>) ENDIF (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for chunk @@ -63,8 +43,6 @@ ADD_EXECUTABLE(chunk ${chunk_SRCS}) TARGET_NAMING (chunk ${LIB_TYPE}) TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) -ADD_TEST (NAME chunk COMMAND $<TARGET_FILE:chunk>) - #-- Adding test for iopipe SET (iopipe_SRCS ${HDF5_PERFORM_SOURCE_DIR}/iopipe.c @@ -73,8 +51,6 @@ ADD_EXECUTABLE (iopipe ${iopipe_SRCS}) TARGET_NAMING (iopipe ${LIB_TYPE}) TARGET_LINK_LIBRARIES (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) -ADD_TEST (NAME iopipe COMMAND $<TARGET_FILE:iopipe>) - #-- Adding test for overhead SET (overhead_SRCS ${HDF5_PERFORM_SOURCE_DIR}/overhead.c @@ -83,8 +59,6 @@ ADD_EXECUTABLE (overhead ${overhead_SRCS}) TARGET_NAMING (overhead ${LIB_TYPE}) TARGET_LINK_LIBRARIES (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) -ADD_TEST (NAME overhead COMMAND $<TARGET_FILE:overhead>) - #-- Adding test for perf_meta SET (perf_meta_SRCS ${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c @@ -93,8 +67,6 @@ ADD_EXECUTABLE (perf_meta ${perf_meta_SRCS}) TARGET_NAMING (perf_meta ${LIB_TYPE}) TARGET_LINK_LIBRARIES (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -ADD_TEST (NAME perf_meta COMMAND $<TARGET_FILE:perf_meta>) - #-- Adding test for zip_perf SET (zip_perf_SRCS ${HDF5_PERFORM_SOURCE_DIR}/zip_perf.c @@ -103,8 +75,6 @@ ADD_EXECUTABLE (zip_perf ${zip_perf_SRCS}) TARGET_NAMING (zip_perf ${LIB_TYPE}) TARGET_LINK_LIBRARIES (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -ADD_TEST (NAME zip_perf COMMAND $<TARGET_FILE:zip_perf> "-h") - IF (H5_HAVE_PARALLEL) #-- Adding test for h5perf SET (h5perf_SRCS @@ -116,8 +86,6 @@ IF (H5_HAVE_PARALLEL) TARGET_NAMING (h5perf ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - ADD_TEST (NAME h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf>) - IF (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for h5perf SET (h5perf_alone_SRCS @@ -131,8 +99,6 @@ IF (H5_HAVE_PARALLEL) ) TARGET_NAMING (h5perf_alone ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - - ADD_TEST (NAME h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf_alone>) ENDIF (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for benchpar @@ -143,8 +109,6 @@ IF (H5_HAVE_PARALLEL) TARGET_NAMING (benchpar ${LIB_TYPE}) TARGET_LINK_LIBRARIES (benchpar ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - ADD_TEST (NAME benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>) - #-- Adding test for mpi-perf SET (mpi-perf_SRCS ${HDF5_PERFORM_SOURCE_DIR}/mpi-perf.c @@ -152,6 +116,66 @@ IF (H5_HAVE_PARALLEL) ADD_EXECUTABLE (mpi-perf ${mpi-perf_SRCS}) TARGET_NAMING (mpi-perf ${LIB_TYPE}) TARGET_LINK_LIBRARIES (mpi-perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +ENDIF (H5_HAVE_PARALLEL) + + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +ADD_CUSTOM_COMMAND ( + TARGET zip_perf + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5 ${PROJECT_BINARY_DIR}/tfilters.h5 +) + +#----------------------------------------------------------------------------- +# Add Tests +#----------------------------------------------------------------------------- + +# Remove any output file left over from previous test run +ADD_TEST ( + NAME h5perform-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + chunk.h5 + iopipe.h5 + iopipe.raw + x-diag-rd.dat + x-diag-wr.dat + x-rowmaj-rd.dat + x-rowmaj-wr.dat + x-gnuplot +) + +ADD_TEST (NAME h5perf_serial COMMAND $<TARGET_FILE:h5perf_serial>) + +IF (HDF5_BUILD_PERFORM_STANDALONE) + ADD_TEST (NAME h5perf_serial_alone COMMAND $<TARGET_FILE:h5perf_serial_alone>) +ENDIF (HDF5_BUILD_PERFORM_STANDALONE) + +ADD_TEST (NAME chunk COMMAND $<TARGET_FILE:chunk>) + +ADD_TEST (NAME iopipe COMMAND $<TARGET_FILE:iopipe>) + +ADD_TEST (NAME overhead COMMAND $<TARGET_FILE:overhead>) + +ADD_TEST (NAME perf_meta COMMAND $<TARGET_FILE:perf_meta>) + +ADD_TEST (NAME zip_perf_help COMMAND $<TARGET_FILE:zip_perf> "-h") +ADD_TEST (NAME zip_perf COMMAND $<TARGET_FILE:zip_perf> tfilters.h5) + +IF (H5_HAVE_PARALLEL) + ADD_TEST (NAME h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf>) + + IF (HDF5_BUILD_PERFORM_STANDALONE) + ADD_TEST (NAME h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf_alone>) + ENDIF (HDF5_BUILD_PERFORM_STANDALONE) + + ADD_TEST (NAME benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>) ADD_TEST (NAME mpi-perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:mpi-perf>) ENDIF (H5_HAVE_PARALLEL) diff --git a/perform/zip_perf.c b/perform/zip_perf.c index 08177d8..5e035f3 100644 --- a/perform/zip_perf.c +++ b/perform/zip_perf.c @@ -21,20 +21,6 @@ * -1 to -9 : compression level */ -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <errno.h> -#include <fcntl.h> -#include <math.h> -#include <sys/types.h> -#include <sys/stat.h> - -#ifdef H5_HAVE_UNISTD_H -# include <unistd.h> -#endif - /* our header files */ #include "h5test.h" #include "h5tools_utils.h" @@ -430,7 +416,7 @@ static void fill_with_random_data(Bytef *src, uLongf src_len) { register unsigned u; - struct stat stat_buf; + h5_stat_t stat_buf; if (stat("/dev/urandom", &stat_buf) == 0) { uLongf len = src_len; diff --git a/src/H5system.c b/src/H5system.c index 7776cbb..02ea625 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -584,7 +584,7 @@ HDremove_all(const char *fname) #endif /*------------------------------------------------------------------------- - * Function: HDgettimeofday + * Function: Wgettimeofday * * Purpose: Wrapper function for gettimeofday on Windows systems * @@ -610,7 +610,7 @@ HDremove_all(const char *fname) #define _W32_FT_OFFSET (116444736000000000ULL) int -HDgettimeofday(struct timeval *tv, void *tz) +Wgettimeofday(struct timeval *tv, void *tz) { union { unsigned long long ns100; /*time since 1 Jan 1601 in 100ns units */ diff --git a/src/H5win32defs.h b/src/H5win32defs.h index fb37059..6ccc86a 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -48,11 +48,11 @@ typedef __int64 h5_stat_size_t; #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - H5_DLL int HDgettimeofday(struct timeval *tv, void *tz); + H5_DLL int Wgettimeofday(struct timeval *tv, void *tz); #ifdef __cplusplus } #endif /* __cplusplus */ - #define HDgettimeofday(V,Z) HDgettimeofday(V,Z) + #define HDgettimeofday(V,Z) Wgettimeofday(V,Z) #endif /* H5_HAVE_GETTIMEOFDAY */ #define HDgetdrive() _getdrive() #define HDlseek(F,O,W) _lseeki64(F,O,W) |