From 72e454515478a4176c59e3001e2e5c428f3fa406 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 14 Aug 2001 17:37:24 -0500 Subject: [svn-r4357] Purpose: new feature Description: Added perform programs to test the HDF5 library performance. Programs are installed in directory perform/. Platforms tested: eirene --- Makefile.in | 8 ++++---- configure | 2 ++ configure.in | 1 + perform/mpi-perf.c | 1 + perform/overhead.c | 40 ++++++++++++++++------------------------ perform/perf.c | 2 +- 6 files changed, 25 insertions(+), 29 deletions(-) diff --git a/Makefile.in b/Makefile.in index ea31dbf..afe3573 100644 --- a/Makefile.in +++ b/Makefile.in @@ -61,7 +61,7 @@ lib progs check test _test uninstall: done tests TAGS dep depend: - @@SETX@; for d in $(SUBDIRS) examples; do \ + @@SETX@; for d in $(SUBDIRS) perform examples; do \ (cd $$d && $(MAKE) $@) || exit 1; \ done @@ -88,13 +88,13 @@ H5Tinit.c: mostlyclean distclean maintainer-clean clean mostlyclean: - @@SETX@; for d in $(SUBDIRS) examples pablo; do \ + @@SETX@; for d in $(SUBDIRS) perform examples pablo; do \ (cd $$d && $(MAKE) $@); \ done -$(RM) conftest conftest.c distclean: - @@SETX@; for d in $(SUBDIRS) examples pablo; do \ + @@SETX@; for d in $(SUBDIRS) perform examples pablo; do \ (cd $$d && $(MAKE) $@); \ done -$(RM) config/commence config/conclude @@ -106,7 +106,7 @@ distclean: maintainer-clean: @echo "This target is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." - @@SETX@; for d in $(SUBDIRS) examples pablo; do \ + @@SETX@; for d in $(SUBDIRS) perform examples pablo; do \ (cd $$d && $(MAKE) $@); \ done -$(RM) config.cache config.log config.status src/H5config.h diff --git a/configure b/configure index 6607b6e..f8479b2 100755 --- a/configure +++ b/configure @@ -10019,6 +10019,7 @@ trap 'rm -fr `echo "src/libhdf5.settings pablo/Makefile test/Makefile $PARALLEL_MAKE + perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5ls/Makefile @@ -10187,6 +10188,7 @@ CONFIG_FILES=\${CONFIG_FILES-"src/libhdf5.settings pablo/Makefile test/Makefile $PARALLEL_MAKE + perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5ls/Makefile diff --git a/configure.in b/configure.in index 8aa0144..f5fb6c7 100644 --- a/configure.in +++ b/configure.in @@ -1636,6 +1636,7 @@ AC_OUTPUT(src/libhdf5.settings pablo/Makefile test/Makefile $PARALLEL_MAKE + perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5ls/Makefile diff --git a/perform/mpi-perf.c b/perform/mpi-perf.c index 09a134b..bf7c5be 100644 --- a/perform/mpi-perf.c +++ b/perform/mpi-perf.c @@ -7,6 +7,7 @@ * and was called mpi-io-test.c */ +#include "hdf5.h" #ifdef H5_HAVE_PARALLEL /* mpi-perf.c * diff --git a/perform/overhead.c b/perform/overhead.c index 8be9ae2..98dd2f2 100644 --- a/perform/overhead.c +++ b/perform/overhead.c @@ -199,7 +199,7 @@ test(fill_t fill_style, const double splits[], } if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error; if (H5Pset_chunk(dcpl, 1, ch_size)<0) goto error; - if ((xfer=H5Pcreate_list(H5P_DATASET_XFER_NEW))<0) goto error; + if ((xfer=H5Pcreate(H5P_DATASET_XFER))<0) goto error; if (H5Pset_btree_ratios(xfer, splits[0], splits[1], splits[2])<0) { goto error; } @@ -208,14 +208,13 @@ test(fill_t fill_style, const double splits[], if ((dset=H5Dcreate(file, "chunked", H5T_NATIVE_INT, fspace, dcpl))<0) goto error; -#if !defined( __MWERKS__) - +#if !defined( __MWERKS__) /* workaround for a bug in the Metrowerks open function pvn */ if ((fd=open(FILE_NAME_1, O_RDONLY))<0) goto error; -#endif +#endif for (i=1; i<=cur_size[0]; i++) { @@ -250,32 +249,23 @@ test(fill_t fill_style, const double splits[], goto error; } - -#if !defined( __MWERKS__) - /* Determine overhead */ +#if !defined( __MWERKS__) if (verbose) { if (H5Fflush(file, H5F_SCOPE_LOCAL)<0) goto error; if (fstat(fd, &sb)<0) goto error; - /* - * The extra cast in the following statement is a bug workaround - * for the Win32 version 5.0 compiler. - * 1998-11-06 ptl - */ + printf("%4lu %8.3f ***\n", (unsigned long)i, (double)(hssize_t)(sb.st_size-i*sizeof(int))/(hssize_t)i); } -#endif - - +#endif } H5Dclose(dset); H5Sclose(mspace); H5Sclose(fspace); H5Pclose(dcpl); - H5Pclose_list(xfer); H5Fclose(file); if (!verbose) { @@ -298,17 +288,16 @@ test(fill_t fill_style, const double splits[], case FILL_ALL: abort(); } - + #if !defined( __MWERKS__) - if (fstat(fd, &sb)<0) goto error; - printf("%-7s %8.3f\n", sname, + + printf("%-7s %8.3f\n", sname, (double)(hssize_t)(sb.st_size-cur_size[0]*sizeof(int))/ (hssize_t)cur_size[0]); #endif - - } + } #if !defined( __MWERKS__) close(fd); @@ -321,10 +310,13 @@ test(fill_t fill_style, const double splits[], H5Sclose(mspace); H5Sclose(fspace); H5Pclose(dcpl); - H5Pclose_list(xfer); H5Fclose(file); free(had); + +#if !defined( __MWERKS__) close(fd); +#endif + return 1; } @@ -356,11 +348,11 @@ main(int argc, char *argv[]) /* Default split ratios */ H5Eset_auto(display_error_cb, NULL); - if ((xfer=H5Pcreate_list(H5P_DATASET_XFER_NEW))<0) goto error; + if ((xfer=H5Pcreate(H5P_DATASET_XFER))<0) goto error; if (H5Pget_btree_ratios(xfer, splits+0, splits+1, splits+2)<0) { goto error; } - if (H5Pclose_list(xfer)<0) goto error; + if (H5Pclose(xfer)<0) goto error; /* Parse command-line options */ for (i=1, j=0; i #include @@ -21,7 +22,6 @@ #endif -#include "hdf5.h" /* Macro definitions */ /* Verify: * if val is false (0), print mesg and if fatal is true (non-zero), die. -- cgit v0.12