diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-08-02 17:56:37 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-08-02 17:56:37 (GMT) |
commit | 34cbb564af98b82c9b9f392fa33787094be4c74f (patch) | |
tree | d86ac0112734470cec82b4b26eacf2d798f61a3d | |
parent | af7def1357e2e8fa43e6abe1adc768219c2df620 (diff) | |
download | hdf5-34cbb564af98b82c9b9f392fa33787094be4c74f.zip hdf5-34cbb564af98b82c9b9f392fa33787094be4c74f.tar.gz hdf5-34cbb564af98b82c9b9f392fa33787094be4c74f.tar.bz2 |
[svn-r8989] Purpose:
Backport feature
Description:
Backport Kent's collective chunk I/O work to date into the release branch.
Also, minor code cleanups, etc.
Platforms tested:
FreeBSD 4.10 (sleipnir) w/parallel
IRIX64 6.5 (modi4)
h5committested
-rw-r--r-- | MANIFEST | 108 | ||||
-rwxr-xr-x | configure | 70 | ||||
-rw-r--r-- | configure.in | 363 | ||||
-rw-r--r-- | src/Dependencies | 92 | ||||
-rw-r--r-- | src/H5Dio.c | 57 | ||||
-rw-r--r-- | src/H5Distore.c | 4 | ||||
-rw-r--r-- | src/H5Dmpio.c | 10 | ||||
-rw-r--r-- | src/H5Dpkg.h | 2 | ||||
-rw-r--r-- | src/H5Dprivate.h | 31 | ||||
-rw-r--r-- | src/H5S.c | 50 | ||||
-rw-r--r-- | src/H5Shyper.c | 62 | ||||
-rw-r--r-- | src/H5Smpio.c | 355 | ||||
-rw-r--r-- | src/H5Spkg.h | 18 | ||||
-rw-r--r-- | src/H5Sprivate.h | 14 | ||||
-rw-r--r-- | src/H5config.h.in | 10 | ||||
-rw-r--r-- | src/Makefile.in | 26 | ||||
-rw-r--r-- | testpar/Dependencies | 75 | ||||
-rw-r--r-- | testpar/Makefile.in | 2 | ||||
-rw-r--r-- | testpar/t_coll_chunk.c | 10 | ||||
-rw-r--r-- | testpar/testphdf5.c | 17 | ||||
-rw-r--r-- | testpar/testphdf5.h | 12 |
21 files changed, 758 insertions, 630 deletions
@@ -6,7 +6,7 @@ # in column one with a '#'. #------------------------------------------------------------------------------ -./.autom4te.cfg _DO_NOT_DISTRIBUTE_ +./.autom4te.cfg _DO_NOT_DISTRIBUTE_ ./COPYING ./MANIFEST ./Makefile.dist @@ -27,7 +27,7 @@ ./bin/debug-ohdr _DO_NOT_DISTRIBUTE_ ./bin/dependencies ./bin/distdep -./bin/errors _DO_NOT_DISTRIBUTE_ +./bin/errors _DO_NOT_DISTRIBUTE_ ./bin/h5vers ./bin/install-sh ./bin/iostats @@ -850,6 +850,7 @@ ./src/H5Dcompact.c ./src/H5Dio.c ./src/H5Distore.c +./src/H5Dmpio.c ./src/H5Dprivate.h ./src/H5Dpublic.h ./src/H5Dpkg.h @@ -1042,8 +1043,8 @@ ./test/links.c ./test/mount.c ./test/mtime.c -./test/ntypes.c ./test/noencoder.h5 +./test/ntypes.c ./test/ohdr.c ./test/reserved.c ./test/space_overflow.c _DO_NOT_DISTRIBUTE_ @@ -1109,6 +1110,7 @@ ./testpar/t_mdset.c ./testpar/t_mpi.c ./testpar/t_ph5basic.c +./testpar/t_coll_chunk.c ./testpar/testphdf5.c ./testpar/testphdf5.h ./testpar/testph5.sh.in @@ -1175,14 +1177,36 @@ ./tools/h5diff/Dependencies ./tools/h5diff/Makefile.in -./tools/h5diff/testh5diff.sh +./tools/h5diff/h5diff_main.c ./tools/h5diff/testh5diff_attr.c +./tools/h5diff/testh5diff_basic.c ./tools/h5diff/testh5diff_dset.c ./tools/h5diff/testh5diff_main.c ./tools/h5diff/testh5diff_util.c -./tools/h5diff/h5diff_main.c -./tools/h5diff/testh5diff_basic.c ./tools/h5diff/testh5diff.h +./tools/h5diff/testh5diff.sh + + +# h5repack sources +./tools/h5repack/Dependencies +./tools/h5repack/Makefile.in +./tools/h5repack/h5repack.sh.in +./tools/h5repack/h5repack.c +./tools/h5repack/h5repack.h +./tools/h5repack/h5repack_copy.c +./tools/h5repack/h5repack_filters.c +./tools/h5repack/h5repack_layout.c +./tools/h5repack/h5repack_list.c +./tools/h5repack/h5repack_main.c +./tools/h5repack/h5repack_opttable.c +./tools/h5repack/h5repack_parse.c +./tools/h5repack/h5repack_refs.c +./tools/h5repack/h5repack_verify.c +./tools/h5repack/testh5repack_attr.c +./tools/h5repack/testh5repack_dset.c +./tools/h5repack/testh5repack_main.c +./tools/h5repack/testh5repack_make.c +./tools/h5repack/testh5repack_util.c ./tools/h5ls/Dependencies ./tools/h5ls/Makefile.in @@ -1191,26 +1215,25 @@ ./tools/lib/Dependencies ./tools/lib/Makefile.in +./tools/lib/h5diff.c +./tools/lib/h5diff.h +./tools/lib/h5diff_array.c +./tools/lib/h5diff_attr.c +./tools/lib/h5diff_dset.c +./tools/lib/h5diff_util.c +./tools/lib/h5trav.c +./tools/lib/h5trav.h +./tools/lib/h5trav_table.c ./tools/lib/h5tools.c ./tools/lib/h5tools.h +./tools/lib/h5tools_filters.c ./tools/lib/h5tools_str.c ./tools/lib/h5tools_str.h ./tools/lib/h5tools_utils.c ./tools/lib/h5tools_utils.h -./tools/lib/h5tools_ref.h ./tools/lib/h5tools_ref.c +./tools/lib/h5tools_ref.h ./tools/lib/talign.c -./tools/lib/h5diff_attr.c -./tools/lib/h5diff.h -./tools/lib/h5tools_filters.c -./tools/lib/h5trav.c -./tools/lib/h5diff.c -./tools/lib/h5diff_util.c -./tools/lib/h5trav.h -./tools/lib/h5diff_array.c -./tools/lib/h5diff_dset.c -./tools/lib/h5trav_table.c - ./tools/misc/Dependencies ./tools/misc/Makefile.in @@ -1339,7 +1362,6 @@ ./tools/testfiles/tvlstr.h5 ./tools/testfiles/tvlstr.ddl ./tools/testfiles/tattr2.h5 -./tools/testfiles/tattr2.h5 ./tools/testfiles/tall-2A.ddl ./tools/testfiles/tcontents.ddl ./tools/testfiles/tfilters.h5 @@ -1352,8 +1374,8 @@ ./tools/testfiles/treference.ddl ./tools/testfiles/tshuffle.ddl ./tools/testfiles/tstring.ddl -./tools/testfiles/tuserfilter.ddl ./tools/testfiles/tszip.ddl +./tools/testfiles/tuserfilter.ddl ./tools/testfiles/tallfilters.ddl ./tools/testfiles/tstringe.ddl ./tools/testfiles/tindicesyes.ddl @@ -1416,27 +1438,39 @@ ./tools/testfiles/tloop.h5.xml ./tools/testfiles/tloop2.h5.xml ./tools/testfiles/tmany.h5.xml +./tools/testfiles/tname-amp.h5 ./tools/testfiles/tname-amp.h5.xml +./tools/testfiles/tname-apos.h5 ./tools/testfiles/tname-apos.h5.xml +./tools/testfiles/tname-gt.h5 ./tools/testfiles/tname-gt.h5.xml +./tools/testfiles/tname-lt.h5 ./tools/testfiles/tname-lt.h5.xml +./tools/testfiles/tname-quot.h5 ./tools/testfiles/tname-quot.h5.xml +./tools/testfiles/tname-sp.h5 ./tools/testfiles/tname-sp.h5.xml ./tools/testfiles/tnamed_dtype_attr.ddl ./tools/testfiles/tnamed_dtype_attr.h5 ./tools/testfiles/tnamed_dtype_attr.h5.xml ./tools/testfiles/tnestedcomp.h5.xml +./tools/testfiles/tnodata.h5 ./tools/testfiles/tnodata.h5.xml ./tools/testfiles/tobjref.h5.xml ./tools/testfiles/topaque.h5.xml +./tools/testfiles/tref-escapes-at.h5 ./tools/testfiles/tref-escapes-at.h5.xml +./tools/testfiles/tref-escapes.h5 ./tools/testfiles/tref-escapes.h5.xml +./tools/testfiles/tref.h5 ./tools/testfiles/tref.h5.xml ./tools/testfiles/tsaf.h5.xml ./tools/testfiles/tslink.h5.xml ./tools/testfiles/tstr.h5.xml ./tools/testfiles/tstr2.h5.xml +./tools/testfiles/tstring-at.h5 ./tools/testfiles/tstring-at.h5.xml +./tools/testfiles/tstring.h5 ./tools/testfiles/tstring.h5.xml ./tools/testfiles/tvldtypes1.h5.xml ./tools/testfiles/tvldtypes2.h5.xml @@ -1453,18 +1487,6 @@ ./tools/testfiles/tempty-nons-2.h5.xml ./tools/testfiles/tempty-ns-2.h5.xml ./tools/testfiles/tall-2A.h5.xml -./tools/testfiles/tname-amp.h5 -./tools/testfiles/tname-apos.h5 -./tools/testfiles/tname-gt.h5 -./tools/testfiles/tname-lt.h5 -./tools/testfiles/tname-quot.h5 -./tools/testfiles/tname-sp.h5 -./tools/testfiles/tnodata.h5 -./tools/testfiles/tref-escapes-at.h5 -./tools/testfiles/tref-escapes.h5 -./tools/testfiles/tref.h5 -./tools/testfiles/tstring-at.h5 -./tools/testfiles/tstring.h5 #test files for h5diff ./tools/testfiles/file1.h5 @@ -1531,28 +1553,6 @@ ./tools/testfiles/h5diff_70.txt ./tools/testfiles/h5diff_80.txt - -# h5repack sources -./tools/h5repack/Dependencies -./tools/h5repack/h5repack_opttable.c -./tools/h5repack/h5repack_verify.c -./tools/h5repack/testh5repack_dset.c -./tools/h5repack/testh5repack_make.c -./tools/h5repack/h5repack.c -./tools/h5repack/h5repack_layout.c -./tools/h5repack/h5repack_parse.c -./tools/h5repack/testh5repack_util.c -./tools/h5repack/h5repack_copy.c -./tools/h5repack/h5repack_list.c -./tools/h5repack/h5repack_refs.c -./tools/h5repack/Makefile.in -./tools/h5repack/h5repack_filters.c -./tools/h5repack/h5repack_main.c -./tools/h5repack/h5repack.sh.in -./tools/h5repack/testh5repack_attr.c -./tools/h5repack/testh5repack_main.c -./tools/h5repack/h5repack.h - # h5repack test files ./tools/testfiles/test1.h5 ./tools/testfiles/test3.h5 @@ -1022,6 +1022,8 @@ Optional Features: debug is disabled. --enable-trace Enable API tracing capability. Default=no if debug is disabled. + --enable-instrument Enable library instrumentation of optimization + tracing. Default=no if debug is disabled. --enable-parallel Search for MPI-IO and MPI support files --enable-filters=all Turn on all internal I/O filters. One may also specify a comma-separated list of filters or the @@ -4152,7 +4154,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4155 "configure"' > conftest.$ac_ext + echo '#line 4157 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4693,7 +4695,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6500,7 +6502,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 6503 "configure" +#line 6505 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -6598,7 +6600,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 6601 "configure" +#line 6603 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -27936,7 +27938,6 @@ rm -f confcache PTHREAD=yes - # Check whether --with-pthread or --without-pthread was given. if test "${with_pthread+set}" = set; then withval="$with_pthread" @@ -29615,8 +29616,8 @@ echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for TIOCGGETD" >&5 -echo $ECHO_N "checking for TIOCGGETD... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for TIOCGETD" >&5 +echo $ECHO_N "checking for TIOCGETD... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" @@ -30256,7 +30257,7 @@ else LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" export LD_LIBRARY_PATH -for hdf5_cv_printf_ll in l L q ll unknown; do +for hdf5_cv_printf_ll in l L ll q unknown; do if test "$cross_compiling" = yes; then continue else @@ -30628,6 +30629,7 @@ echo "${ECHO_T}no" >&6 ;; esac + echo "$as_me:$LINENO: checking for API tracing" >&5 echo $ECHO_N "checking for API tracing... $ECHO_C" >&6; # Check whether --enable-trace or --disable-trace was given. @@ -30636,7 +30638,6 @@ if test "${enable_trace+set}" = set; then TRACE=$enableval fi; - if test "X-$TRACE" = X- ; then if test -z "$DEBUG_PKG" ; then TRACE=no @@ -30659,6 +30660,41 @@ echo "${ECHO_T}no" >&6 ;; esac + +echo "$as_me:$LINENO: checking for instrumented library" >&5 +echo $ECHO_N "checking for instrumented library... $ECHO_C" >&6; +# Check whether --enable-instrument or --disable-instrument was given. +if test "${enable_instrument+set}" = set; then + enableval="$enable_instrument" + INSTRUMENT=$enableval +fi; + +if test "X-$INSTRUMENT" = X- ; then + if test -z "$DEBUG_PKG" ; then + INSTRUMENT=no + else + INSTRUMENT=yes + fi +fi + +case "X-$INSTRUMENT" in + X-yes) + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + INSTRUMENT_LIBRARY=yes + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INSTRUMENTED_LIBRARY 1 +_ACEOF + + ;; + X-no|*) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + INSTRUMENT_LIBRARY=no + ;; +esac + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -31070,7 +31106,7 @@ echo $ECHO_N "checking whether a simple MPI-IO program can be linked... $ECHO_C" int main () { -MPI_Init();MPI_File_open(); +MPI_Init(); MPI_File_open(); ; return 0; } @@ -31094,8 +31130,8 @@ else cat conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: 'unable to link a simple MPI-IO application'" >&5 -echo "$as_me: error: 'unable to link a simple MPI-IO application'" >&2;} + { { echo "$as_me:$LINENO: error: unable to link a simple MPI-IO application" >&5 +echo "$as_me: error: unable to link a simple MPI-IO application" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -32096,7 +32132,8 @@ else fi ROOT="`$pwd`" -DYNAMIC_DIRS="" + DYNAMIC_DIRS="" + if test -n "$LDFLAGS"; then for d in $LDFLAGS ; do case "$d" in @@ -32113,7 +32150,6 @@ if test -n "$LDFLAGS"; then done fi - if test -n "$CPPFLAGS"; then TEMP_CPPFLAGS="" for d in $CPPFLAGS ; do @@ -32163,7 +32199,7 @@ PABLO_MAKE="" PARALLEL_PABLO="" -if test "$HAVE_PABLO" = "yes"; then +if test "X$HAVE_PABLO" = "Xyes"; then PABLO_MAKE="pablo/Makefile" if test -n "$TESTPARALLEL"; then @@ -32829,6 +32865,7 @@ s,@PDB2HDF@,$PDB2HDF,;t t s,@PTHREAD@,$PTHREAD,;t t s,@DEBUG_PKG@,$DEBUG_PKG,;t t s,@TRACE_API@,$TRACE_API,;t t +s,@INSTRUMENT_LIBRARY@,$INSTRUMENT_LIBRARY,;t t s,@PARALLEL@,$PARALLEL,;t t s,@RUNSERIAL@,$RUNSERIAL,;t t s,@RUNPARALLEL@,$RUNPARALLEL,;t t @@ -33625,6 +33662,9 @@ IF_YES_NO "$STATIC_EXEC" PRINT_N " Tracing" IF_YES_NO "$TRACE_API" +PRINT_N " Optimization Instrumentation" +IF_YES_NO "$INSTRUMENT" + PRINT "Languages:" PRINT_N " C++" diff --git a/configure.in b/configure.in index ed7d296..d6fddf6 100644 --- a/configure.in +++ b/configure.in @@ -538,7 +538,7 @@ dnl Check for these two functions before <sys/time.h> is checked for, otherwise dnl they are not detected correctly on Solaris [2.6]. dnl AC_CHECK_FUNCS(difftime) -AC_CHECK_FUNCS([gettimeofday], [have_gettime="yes"], [have_gettime="no"]) +AC_CHECK_FUNCS(gettimeofday, [have_gettime="yes"], [have_gettime="no"]) dnl Unix AC_CHECK_HEADERS([sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h]) @@ -1086,9 +1086,11 @@ case "$withval" in ;; esac -dnl Is SSL library present? It is needed by GLOBUS-GASS and Grid Storage -dnl driver. SSL must be tested before them. -AC_SUBST(SSL) SSL=yes +dnl ---------------------------------------------------------------------- +dnl Is SSL library present? It is needed by GLOBUS-GASS and Grid Storage +dnl driver. SSL must be tested before them. +dnl +AC_SUBST([SSL]) SSL=yes AC_ARG_WITH([ssl], [AC_HELP_STRING([--with-ssl=LIB], [Use the SSL library [default=no]])],, @@ -1096,12 +1098,12 @@ AC_ARG_WITH([ssl], case "$withval" in yes) - AC_CHECK_LIB(crypto,main,,unset SSL) - AC_CHECK_LIB(ssl,SSL_get_version,,unset SSL) + AC_CHECK_LIB([crypto], [main],, [unset SSL]) + AC_CHECK_LIB([ssl], [SSL_get_version],, [unset SSL]) ;; no) - AC_MSG_CHECKING(for SSL) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for SSL]) + AC_MSG_RESULT([suppressed]) unset SSL ;; *) @@ -1109,8 +1111,8 @@ case "$withval" in if test "X$with_ssl" != "X/usr/lib"; then LDFLAGS="$LDFLAGS -L$with_ssl" fi - AC_CHECK_LIB(crypto,main,, LDFLAGS="$saved_LDFLAGS"; unset SSL) - AC_CHECK_LIB(ssl,SSL_get_version,, LDFLAGS="$saved_LDFLAGS"; unset SSL) + AC_CHECK_LIB([crypto], [main],, [LDFLAGS="$saved_LDFLAGS"; unset SSL]) + AC_CHECK_LIB([ssl], [SSL_get_version],, [LDFLAGS="$saved_LDFLAGS"; unset SSL]) ;; esac @@ -1118,8 +1120,8 @@ dnl ---------------------------------------------------------------------- dnl Is GLOBUS-GASS(1.1.0 or 1.1.1) Library present? It is also needed by dnl the Grid Storage driver. dnl -AC_SUBST(GASS) GASS="yes" -AC_SUBST(TESTGASS) TESTGASS='$(srcdir)/testgass' +AC_SUBST([GASS]) GASS="yes" +AC_SUBST([TESTGASS]) TESTGASS='$(srcdir)/testgass' AC_ARG_WITH([gass], [AC_HELP_STRING([--with-gass=DIR], [Use the GASS library [default=no]])],, @@ -1140,8 +1142,8 @@ case "$withval" in ;; no) - AC_MSG_CHECKING(for GASS) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for GASS]) + AC_MSG_RESULT([suppressed]) unset GASS TESTGASS ;; @@ -1171,11 +1173,11 @@ case "$withval" in if test -n "$gass_inc"; then saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$gass_inc" - AC_CHECK_HEADERS(globus_common.h,, + AC_CHECK_HEADERS([globus_common.h],, CPPFLAGS="$saved_CPPFLAGS" unset GASS TESTGASS) else - AC_CHECK_HEADERS(globus_common.h) + AC_CHECK_HEADERS([globus_common.h]) fi if test -n "$gass_lib"; then @@ -1205,15 +1207,14 @@ case "$withval" in esac if test -n "$GASS"; then - AC_DEFINE([HAVE_GASS], [1], - [Define if the Globus GASS is defined]) + AC_DEFINE([HAVE_GASS], [1], [Define if the Globus GASS is defined]) fi dnl ---------------------------------------------------------------------- dnl Are SRB Client and other system libraries(socket, elf) present? dnl -AC_SUBST(SRB) SRB="yes" -AC_SUBST(TESTSRB) TESTSRB='$(srcdir)/testsrb' +AC_SUBST([SRB]) SRB="yes" +AC_SUBST([TESTSRB]) TESTSRB='$(srcdir)/testsrb' AC_ARG_WITH([srb], [AC_HELP_STRING([--with-srb=DIR], [Use the SRB library [default=no]])],, @@ -1221,14 +1222,14 @@ AC_ARG_WITH([srb], case "$withval" in yes) - AC_CHECK_HEADERS(srbClient.h,,unset SRB TESTSRB) - AC_CHECK_LIB(elf,main,,unset SRB TESTSRB) - AC_CHECK_LIB(socket,main,,unset SRB TESTSRB) - AC_CHECK_LIB(SrbClient,clConnect,,unset SRB TESTSRB) + AC_CHECK_HEADERS([srbClient.h],, [unset SRB TESTSRB]) + AC_CHECK_LIB([elf], [main],, [unset SRB TESTSRB]) + AC_CHECK_LIB([socket], [main],, [unset SRB TESTSRB]) + AC_CHECK_LIB([SrbClient], [clConnect],, [unset SRB TESTSRB]) ;; no) - AC_MSG_CHECKING(for SRB) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for SRB]) + AC_MSG_RESULT([suppressed]) unset SRB TESTSRB ;; *) @@ -1279,18 +1280,17 @@ case "$withval" in esac if test -n "$SRB"; then - AC_DEFINE(HAVE_SRB, 1, - [Define if the SRB is defined]) + AC_DEFINE([HAVE_SRB], [1], [Define if the SRB is defined]) fi dnl ---------------------------------------------------------------------- dnl Is LLNL's PDB present? If so then we'll compile the PDB-to-HDF5 dnl translator. dnl -AC_SUBST(PDB2HDF) -AC_CHECK_LIB(pdb, PD_open) -AC_CHECK_LIB(silo, lite_PD_open) -AC_CHECK_HEADERS(pdb.h, PDB2HDF=pdb2hdf) +AC_SUBST([PDB2HDF]) +AC_CHECK_LIB([pdb], [PD_open]) +AC_CHECK_LIB([silo], [lite_PD_open]) +AC_CHECK_HEADERS([pdb.h], [PDB2HDF=pdb2hdf]) dnl Checkpoint the cache AC_CACHE_SAVE @@ -1302,8 +1302,7 @@ dnl `--with-pthread' command-line switch. The value is an include path dnl and/or a library path. If the library path is specified then it must dnl be preceded by a comma. dnl -AC_SUBST(PTHREAD) PTHREAD=yes - +AC_SUBST([PTHREAD]) PTHREAD=yes AC_ARG_WITH([pthread], [AC_HELP_STRING([--with-pthread=DIR], [Use the Pthreads library [default=no]])],, @@ -1311,12 +1310,12 @@ AC_ARG_WITH([pthread], case "$withval" in yes) - AC_CHECK_HEADERS(pthread.h) - AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD) + AC_CHECK_HEADERS([pthread.h]) + AC_CHECK_LIB([pthread], [pthread_create],, [unset PTHREAD]) ;; no) - AC_MSG_CHECKING(for pthread) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for pthread]) + AC_MSG_RESULT([suppressed]) unset PTHREAD ;; *) @@ -1345,18 +1344,18 @@ case "$withval" in if test -n "$pthread_inc"; then saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$pthread_inc" - AC_CHECK_HEADERS(pthread.h,,CPPFLAGS="$saved_CPPFLAGS"; unset PTHREAD) + AC_CHECK_HEADERS([pthread.h],, [CPPFLAGS="$saved_CPPFLAGS"; unset PTHREAD]) else - AC_CHECK_HEADERS(pthread.h,,unset PTHREAD) + AC_CHECK_HEADERS([pthread.h],, [unset PTHREAD]) fi if test -n "$pthread_lib"; then saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$pthread_lib" - AC_CHECK_LIB(pthread, pthread_create,, - LDFLAGS="$saved_LDFLAGS"; unset PTHREAD) + AC_CHECK_LIB([pthread], [pthread_create],, + [LDFLAGS="$saved_LDFLAGS"; unset PTHREAD]) else - AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD) + AC_CHECK_LIB([pthread], [pthread_create],, [unset PTHREAD]) fi ;; esac @@ -1364,7 +1363,7 @@ esac dnl ---------------------------------------------------------------------- dnl Enable thread-safe version of library. It requires Pthreads support. dnl -AC_MSG_CHECKING(for thread safe support) +AC_MSG_CHECKING([for thread safe support]) AC_ARG_ENABLE([threadsafe], [AC_HELP_STRING([--enable-threadsafe], [Enable thread safe capability])], @@ -1372,23 +1371,22 @@ AC_ARG_ENABLE([threadsafe], case "X-$THREADSAFE" in X-|X-no) - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) ;; X-yes) dnl Check that we can link a simple Pthread program. - AC_TRY_LINK(,pthread_create(), - AC_MSG_RESULT(yes); THREADSAFE=yes, - AC_MSG_ERROR(needed pthread library not available)) + AC_TRY_LINK(, [pthread_create()], + [AC_MSG_RESULT([yes]); THREADSAFE=yes], + [AC_MSG_ERROR([needed pthread library not available])]) ;; *) - AC_MSG_RESULT(error) - AC_MSG_ERROR(\'$enableval\' is not a valid threadsafe type) + AC_MSG_RESULT([error]) + AC_MSG_ERROR([\'$enableval\' is not a valid threadsafe type]) ;; esac if test "X$THREADSAFE" = "Xyes"; then - AC_DEFINE([HAVE_THREADSAFE], [1], - [Define if we have thread safe support]) + AC_DEFINE([HAVE_THREADSAFE], [1], [Define if we have thread safe support]) fi dnl ---------------------------------------------------------------------- @@ -1443,8 +1441,7 @@ if test "$STREAM_VFD" = "yes"; then #endif ], [socklen_t foo; return 0;], - AC_DEFINE([HAVE_SOCKLEN_T], 1, - [Define if \`socklen_t' is defined]) + AC_DEFINE([HAVE_SOCKLEN_T], 1, [Define if \`socklen_t' is defined]) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) ) @@ -1458,47 +1455,47 @@ dnl Posix way to do this? dnl dnl First check if `struct tm' has a `tm_gmtoff' member. -AC_MSG_CHECKING(for tm_gmtoff in struct tm) +AC_MSG_CHECKING([for tm_gmtoff in struct tm]) AC_TRY_COMPILE([ #include <sys/time.h> -#include <time.h>],[struct tm tm; tm.tm_gmtoff=0;], -AC_DEFINE(HAVE_TM_GMTOFF, 1, +#include <time.h>], [struct tm tm; tm.tm_gmtoff=0;], +AC_DEFINE([HAVE_TM_GMTOFF], [1], [Define if \`tm_gmtoff' is a member of \`struct tm']) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl check if `struct tm' has a `__tm_gmtoff' member. -AC_MSG_CHECKING(for __tm_gmtoff in struct tm) +AC_MSG_CHECKING([for __tm_gmtoff in struct tm]) AC_TRY_COMPILE([ #include <sys/time.h> -#include <time.h>],[struct tm tm; tm.__tm_gmtoff=0;], -AC_DEFINE(HAVE___TM_GMTOFF, 1, +#include <time.h>], [struct tm tm; tm.__tm_gmtoff=0;], +AC_DEFINE([HAVE___TM_GMTOFF], [1], [Define if \`__tm_gmtoff' is a member of \`struct tm']) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl Check whether the global variable `timezone' is defined. -AC_MSG_CHECKING(for global timezone variable) +AC_MSG_CHECKING([for global timezone variable]) AC_TRY_LINK([ #include <sys/time.h> #include <time.h>], [timezone=0;], -AC_DEFINE(HAVE_TIMEZONE, 1, +AC_DEFINE([HAVE_TIMEZONE], [1], [Define if \`timezone' is a global variable]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl Check whether `struct timezone' is defined. AC_STRUCT_TIMEZONE -AC_MSG_CHECKING(for struct timezone) +AC_MSG_CHECKING([for struct timezone]) AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/time.h> -#include <time.h>],[struct timezone tz; tz.tz_minuteswest=0;], -AC_DEFINE(HAVE_STRUCT_TIMEZONE, 1, +#include <time.h>], [struct timezone tz; tz.tz_minuteswest=0;], +AC_DEFINE([HAVE_STRUCT_TIMEZONE], [1], [Define if \`struct timezone' is defined]) have_struct_tz="yes" -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl If gettimeofday() is going to be used, make sure it uses the timezone struct @@ -1532,13 +1529,13 @@ fi dnl ---------------------------------------------------------------------- dnl Does the struct stat have the st_blocks field? This field is not Posix. dnl -AC_MSG_CHECKING(for st_blocks in struct stat) +AC_MSG_CHECKING([for st_blocks in struct stat]) AC_TRY_COMPILE([ #include <sys/stat.h>],[struct stat sb; sb.st_blocks=0;], -AC_DEFINE(HAVE_STAT_ST_BLOCKS, 1, +AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], [Define if \`struct stat' has the \`st_blocks' field]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl ---------------------------------------------------------------------- dnl How do we figure out the width of a tty in characters? @@ -1546,33 +1543,33 @@ dnl AC_CHECK_FUNCS(_getvideoconfig gettextinfo GetConsoleScreenBufferInfo) AC_CHECK_FUNCS(_scrsize ioctl) -AC_MSG_CHECKING(for struct videoconfig) +AC_MSG_CHECKING([for struct videoconfig]) AC_TRY_COMPILE(,[struct videoconfig w; w.numtextcols=0;], -AC_DEFINE(HAVE_STRUCT_VIDEOCONFIG, 1, +AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1], [Define if \`struct videoconfig' is defined]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) -AC_MSG_CHECKING(for struct text_info) -AC_TRY_COMPILE(,[struct text_info w; w.screenwidth=0;], -AC_DEFINE(HAVE_STRUCT_TEXT_INFO, 1, +AC_MSG_CHECKING([for struct text_info]) +AC_TRY_COMPILE(, [struct text_info w; w.screenwidth=0;], +AC_DEFINE([HAVE_STRUCT_TEXT_INFO], [1], [Define if \`struct text_info' is defined]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) -AC_MSG_CHECKING(for TIOCGWINSZ) +AC_MSG_CHECKING([for TIOCGWINSZ]) AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGWINSZ;], -AC_DEFINE(HAVE_TIOCGWINSZ, 1, +AC_DEFINE([HAVE_TIOCGWINSZ], [1], [Define if the ioctl TIOGWINSZ is defined]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) -AC_MSG_CHECKING(for TIOCGGETD) +AC_MSG_CHECKING([for TIOCGETD]) AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGETD;], -AC_DEFINE(HAVE_TIOCGETD, 1, +AC_DEFINE([HAVE_TIOCGETD], [1], [Define if the ioctl TIOCGETD is defined]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl ---------------------------------------------------------------------- @@ -1590,17 +1587,17 @@ AC_C_INLINE AC_MSG_CHECKING([for __attribute__ extension]) AC_TRY_COMPILE(,[int __attribute__((unused)) x], - AC_DEFINE(HAVE_ATTRIBUTE, 1, + AC_DEFINE([HAVE_ATTRIBUTE], [1], [Define if the __attribute__(()) extension is present]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no)) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no])) AC_MSG_CHECKING([for __FUNCTION__ extension]) AC_TRY_COMPILE(,[(void)__FUNCTION__], - AC_DEFINE(HAVE_FUNCTION, 1, + AC_DEFINE([HAVE_FUNCTION], [1], [Define if the compiler understand the __FUNCTION__ keyword]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no)) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no])) dnl ---------------------------------------------------------------------- dnl Try to figure out how to print `long long'. Some machines use `%lld' @@ -1610,12 +1607,12 @@ dnl Need to patch up LD_LIBRARY_PATH so that the execution can find all dnl the dynamic library. The correct way to do it should be updating dnl LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro. dnl -AC_MSG_CHECKING(how to print long long) +AC_MSG_CHECKING([how to print long long]) AC_CACHE_VAL([hdf5_cv_printf_ll], LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" export LD_LIBRARY_PATH -for hdf5_cv_printf_ll in l L q ll unknown; do +for hdf5_cv_printf_ll in l L ll q unknown; do AC_TRY_RUN([ #include <stdio.h> #include <stdlib.h> @@ -1631,8 +1628,8 @@ int main(void) ], break,,continue) done)dnl -AC_MSG_RESULT(%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u) -AC_DEFINE_UNQUOTED(PRINTF_LL_WIDTH, "$hdf5_cv_printf_ll", +AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u]) +AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"], [Width for printf() for type \`long long' or \`__int64', use \`ll']) dnl ---------------------------------------------------------------------- @@ -1640,8 +1637,8 @@ dnl Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) dnl is supported on this system dnl AC_MSG_CHECKING([Threads support system scope]) -AC_CACHE_VAL(hdf5_cv_system_scope_threads, -AC_TRY_RUN([ +AC_CACHE_VAL([hdf5_cv_system_scope_threads], +[AC_TRY_RUN([ #if STDC_HEADERS #include <stdlib.h> #include <pthread.h> @@ -1656,14 +1653,14 @@ int main(void) ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); exit(ret==0 ? 0 : 1); } -], hdf5_cv_system_scope_threads=yes, hdf5_cv_system_scope_threads=no,)) +], [hdf5_cv_system_scope_threads=yes], [hdf5_cv_system_scope_threads=no],)]) if test ${hdf5_cv_system_scope_threads} = "yes"; then - AC_DEFINE(SYSTEM_SCOPE_THREADS, 1, + AC_DEFINE([SYSTEM_SCOPE_THREADS], [1], [Define if your system supports pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) call.]) - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) fi dnl ---------------------------------------------------------------------- @@ -1683,10 +1680,10 @@ case "X-$enableval" in [int fd = 0; gpfs_fcntl(fd, (void *)0);], AC_DEFINE(HAVE_GPFS, 1, [Define if we have GPFS support]) - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) LIBS="$LIBS -lgpfs" GPFS="yes", - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) GPFS="no")) ;; X-no|*) @@ -1714,20 +1711,20 @@ case "X-$DEBUG_PKG" in X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" CPPFLAGS="$CPPFLAGS -UNDEBUG" - AC_MSG_RESULT(default ($DEBUG_PKG)) + AC_MSG_RESULT([default ($DEBUG_PKG)]) ;; X-all) DEBUG_PKG=$all_packages CPPFLAGS="$CPPFLAGS -UNDEBUG" - AC_MSG_RESULT(all ($DEBUG_PKG)) + AC_MSG_RESULT([all ($DEBUG_PKG)]) ;; X-|X-no|X-none) - AC_MSG_RESULT(none) + AC_MSG_RESULT([none]) DEBUG_PKG= CPPFLAGS="$CPPFLAGS -DNDEBUG" ;; *) - AC_MSG_RESULT($DEBUG_PKG) + AC_MSG_RESULT([$DEBUG_PKG]) ;; esac @@ -1771,14 +1768,14 @@ dnl ---------------------------------------------------------------------- dnl Enable tracing of the API dnl This must come after the enable-debug since it depends on debug. dnl -AC_MSG_CHECKING(for API tracing); +AC_SUBST([TRACE_API]) +AC_MSG_CHECKING([for API tracing]); AC_ARG_ENABLE([trace], [AC_HELP_STRING([--enable-trace], - [Enable API tracing capability. - Default=no if debug is disabled.])], + [Enable API tracing capability. Default=no + if debug is disabled.])], TRACE=$enableval) -AC_SUBST(TRACE_API) dnl Default to no if debug is disabled if test "X-$TRACE" = X- ; then if test -z "$DEBUG_PKG" ; then @@ -1789,17 +1786,51 @@ if test "X-$TRACE" = X- ; then fi case "X-$TRACE" in X-yes) - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) TRACE_API=yes CPPFLAGS="$CPPFLAGS -DH5_DEBUG_API" ;; X-no|*) - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) TRACE_API=no CPPFLAGS="$CPPFLAGS -UH5_DEBUG_API" ;; esac +dnl ---------------------------------------------------------------------- +dnl Enable instrumenting of the library's internal operations +dnl This must come after the enable-debug since it depends on debug. +dnl +AC_SUBST([INSTRUMENT_LIBRARY]) +AC_MSG_CHECKING([for instrumented library]); +AC_ARG_ENABLE([instrument], + [AC_HELP_STRING([--enable-instrument], + [Enable library instrumentation of optimization + tracing. Default=no if debug is disabled.])], + INSTRUMENT=$enableval) + +dnl Default to no if debug is disabled +if test "X-$INSTRUMENT" = X- ; then + if test -z "$DEBUG_PKG" ; then + INSTRUMENT=no + else + INSTRUMENT=yes + fi +fi + +case "X-$INSTRUMENT" in + X-yes) + AC_MSG_RESULT([yes]) + INSTRUMENT_LIBRARY=yes + AC_DEFINE([HAVE_INSTRUMENTED_LIBRARY], [1], + [Define if library will contain instrumentation to detect correct optimization operation]) + ;; + X-no|*) + AC_MSG_RESULT([no]) + INSTRUMENT_LIBRARY=no + ;; +esac + dnl Checkpoint the cache AC_CACHE_SAVE @@ -1840,10 +1871,10 @@ dnl protect the expansion until make executes the dnl command). The value of this variable is dnl substituted in *.in files. dnl -AC_SUBST(PARALLEL) -AC_SUBST(RUNSERIAL) -AC_SUBST(RUNPARALLEL) -AC_SUBST(TESTPARALLEL) +AC_SUBST([PARALLEL]) +AC_SUBST([RUNSERIAL]) +AC_SUBST([RUNPARALLEL]) +AC_SUBST([TESTPARALLEL]) dnl ---------------------------------------------------------------------- dnl If the compiler is obviously a parallel compiler then we're building @@ -1948,23 +1979,23 @@ case "X-$enable_parallel" in dnl Either we are not compiling for parallel or the header and dnl library files and locations are known to the compiler (this is dnl the case for a correct installation of mpicc for instance). - AC_MSG_RESULT(skipped) + AC_MSG_RESULT([skipped]) ;; X-yes) dnl We want to compile a parallel library with a compiler that dnl may already know how to link with MPI and MPI-IO. - AC_MSG_RESULT(provided by compiler) + AC_MSG_RESULT([provided by compiler]) PARALLEL=yes dnl Try link a simple MPI program. If fail, try again with -lmpi. - AC_TRY_LINK(,MPI_Init(),,AC_CHECK_LIB(mpi,MPI_Init,,PARALLEL=no)) + AC_TRY_LINK(, MPI_Init(),, AC_CHECK_LIB(mpi, MPI_Init,, PARALLEL=no)) dnl Then try link a simple MPI-IO program. If fail, try again with dnl -lmpio. if test "X$PARALLEL" = "Xyes"; then - AC_TRY_LINK(,MPI_File_open(),, - AC_CHECK_LIB(mpio,MPI_File_open,,PARALLEL=no)) + AC_TRY_LINK(, [MPI_File_open()],, + [AC_CHECK_LIB([mpio], [MPI_File_open],, [PARALLEL=no])]) fi dnl Set RUNPARALLEL to mpirun if not set yet. @@ -1974,8 +2005,8 @@ case "X-$enable_parallel" in ;; *) - AC_MSG_RESULT(error) - AC_MSG_ERROR(\'$enable_parallel\' is not a valid parallel search type) + AC_MSG_RESULT([error]) + AC_MSG_ERROR([\'$enable_parallel\' is not a valid parallel search type]) ;; esac @@ -1991,26 +2022,25 @@ dnl Print some other parallel information and do some sanity checks. dnl if test -n "$PARALLEL"; then dnl We are building a parallel library - AC_DEFINE(HAVE_PARALLEL, 1, - [Define if we have parallel support]) + AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support]) dnl Display what we found about running programs - AC_MSG_CHECKING(prefix for running on one processor) - AC_MSG_RESULT($RUNSERIAL) - AC_MSG_CHECKING(prefix for running in parallel) - AC_MSG_RESULT($RUNPARALLEL) + AC_MSG_CHECKING([prefix for running on one processor]) + AC_MSG_RESULT([$RUNSERIAL]) + AC_MSG_CHECKING([prefix for running in parallel]) + AC_MSG_RESULT([$RUNPARALLEL]) dnl Check that we can link a simple MPI and MPI-IO application - AC_MSG_CHECKING(whether a simple MPI-IO program can be linked) - AC_TRY_LINK(,[MPI_Init();MPI_File_open();], - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - AC_MSG_ERROR('unable to link a simple MPI-IO application')) + AC_MSG_CHECKING([whether a simple MPI-IO program can be linked]) + AC_TRY_LINK(, [MPI_Init(); MPI_File_open();], + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) + AC_MSG_ERROR([unable to link a simple MPI-IO application])) dnl There *must* be some way to run in parallel even if it's just the dnl word `none'. if test -z "$RUNPARALLEL"; then - AC_MSG_ERROR(no way to run a parallel program) + AC_MSG_ERROR([no way to run a parallel program]) fi dnl If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with @@ -2028,7 +2058,7 @@ if test -n "$PARALLEL"; then dnl This must be done after enable-parallel is checked since it depends dnl on a mpich compiler. dnl - AC_SUBST(MPE) MPE=yes + AC_SUBST([MPE]) MPE=yes AC_ARG_WITH([mpe], [AC_HELP_STRING([--with-mpe=DIR], [Use MPE instrumentation [default=no]])],, @@ -2173,7 +2203,7 @@ dnl This is defined only when we're using CodeWarrior, since it has a dnl broken "open()" call. dnl if test 1 = 2; then - AC_DEFINE(NO_SHARED_WRITING, 1, + AC_DEFINE([NO_SHARED_WRITING], [1], [Define if shared writing must be disabled (CodeWarrior only)]) fi @@ -2201,22 +2231,22 @@ dnl dnl HDF5 version from the first line of the README.txt file. H5_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`" -AC_SUBST(H5_VERSION) +AC_SUBST([H5_VERSION]) dnl Configuration date -AC_SUBST(CONFIG_DATE) CONFIG_DATE="`date`" +AC_SUBST([CONFIG_DATE]) CONFIG_DATE="`date`" dnl User doing the configuration -AC_SUBST(CONFIG_USER) CONFIG_USER="`whoami`@`hostname`" +AC_SUBST([CONFIG_USER]) CONFIG_USER="`whoami`@`hostname`" if test -n "$ORGANIZATION"; then CONFIG_USER="$CONFIG_USER at $ORGANIZATION" fi dnl Configuration mode (production, development, profile, etc) saved above. -AC_SUBST(CONFIG_MODE) +AC_SUBST([CONFIG_MODE]) dnl Byte sex from the AC_C_BIGENDIAN macro. -AC_SUBST(BYTESEX) +AC_SUBST([BYTESEX]) if test "X$ac_cv_c_bigendian" = "Xyes"; then BYTESEX="big-endian" else @@ -2230,7 +2260,7 @@ dnl might have decided that one or the other is simply not possible. dnl Therefore we have to look in the generated `libtool' shell script for dnl lines that set the value of `build_libtool_libs' (shared) and dnl `build_old_libs' (static). -AC_SUBST(STATIC_SHARED) +AC_SUBST([STATIC_SHARED]) if (grep '^build_libtool_libs=yes' libtool >/dev/null); then enable_shared=yes else @@ -2256,7 +2286,7 @@ PARALLEL=${PARALLEL:-no} dnl Compiler with version information. This consists of the full path dnl name of the compiler and the reported version number. -AC_SUBST(CC_VERSION) +AC_SUBST([CC_VERSION]) if `echo $CC | grep / 2>&1 /dev/null`; then CC_VERSION="$CC" else @@ -2283,14 +2313,15 @@ if test -x /bin/pwd; then else pwd=pwd fi -AC_SUBST(ROOT) ROOT="`$pwd`" +AC_SUBST([ROOT]) ROOT="`$pwd`" dnl ---------------------------------------------------------------------- dnl Determine the runtime libraries we may need to include in the dnl libtools command so that executables will find the correct dynamic dnl libraries. dnl -DYNAMIC_DIRS="" +AC_SUBST([DYNAMIC_DIRS]) DYNAMIC_DIRS="" + if test -n "$LDFLAGS"; then for d in $LDFLAGS ; do case "$d" in @@ -2308,7 +2339,6 @@ if test -n "$LDFLAGS"; then esac done fi -AC_SUBST(DYNAMIC_DIRS) if test -n "$CPPFLAGS"; then TEMP_CPPFLAGS="" @@ -2331,21 +2361,21 @@ dnl Build the Makefiles. Almost every Makefile.in will begin with the line dnl `@COMMENCE@' and end with the line `@CONCLUDE@'. These lines insert dnl various files from the config directory into the Makefile. dnl -AC_SUBST_FILE(COMMENCE) COMMENCE=config/commence -AC_SUBST_FILE(CONCLUDE) CONCLUDE=config/conclude +AC_SUBST_FILE([COMMENCE]) COMMENCE=config/commence +AC_SUBST_FILE([CONCLUDE]) CONCLUDE=config/conclude dnl The directory search list -AC_SUBST(SEARCH) SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' +AC_SUBST([SEARCH]) SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' cmd='echo $SEARCH |sed "s/ /'$SEARCH_SEP'/g"' SEARCH="$SEARCH_RULE`eval $cmd`" export SEARCH dnl We don't need to say when we're entering directories if we're using -dnl GNU make becuase make does it for us. +dnl GNU make because make does it for us. if test "X$GMAKE" = "Xyes"; then - AC_SUBST(SETX) SETX=":" + AC_SUBST([SETX]) SETX=":" else - AC_SUBST(SETX) SETX="set -x" + AC_SUBST([SETX]) SETX="set -x" fi dnl Some cleanup stuff @@ -2372,9 +2402,9 @@ fi PABLO_MAKE="" -AC_SUBST(PARALLEL_PABLO) PARALLEL_PABLO="" +AC_SUBST([PARALLEL_PABLO]) PARALLEL_PABLO="" -if test "$HAVE_PABLO" = "yes"; then +if test "X$HAVE_PABLO" = "Xyes"; then PABLO_MAKE="pablo/Makefile" if test -n "$TESTPARALLEL"; then @@ -2551,6 +2581,9 @@ IF_YES_NO "$STATIC_EXEC" PRINT_N " Tracing" IF_YES_NO "$TRACE_API" +PRINT_N " Optimization Instrumentation" +IF_YES_NO "$INSTRUMENT" + PRINT "Languages:" PRINT_N " C++" diff --git a/src/Dependencies b/src/Dependencies index 80d76d4..0d4a162 100644 --- a/src/Dependencies +++ b/src/Dependencies @@ -430,6 +430,49 @@ H5Distore.lo: \ $(srcdir)/H5MFprivate.h \ $(srcdir)/H5MMprivate.h \ $(srcdir)/H5Vprivate.h +H5Dmpio.lo: \ + $(srcdir)/H5Dmpio.c \ + $(srcdir)/H5private.h \ + $(srcdir)/H5public.h \ + H5pubconf.h \ + $(srcdir)/H5api_adpt.h \ + $(srcdir)/H5MPprivate.h \ + $(srcdir)/H5Dpkg.h \ + $(srcdir)/H5Dprivate.h \ + $(srcdir)/H5Dpublic.h \ + $(srcdir)/H5Ipublic.h \ + $(srcdir)/H5FDprivate.h \ + $(srcdir)/H5FDpublic.h \ + $(srcdir)/H5Fpublic.h \ + $(srcdir)/H5FDmpi.h \ + $(srcdir)/H5FDmpio.h \ + $(srcdir)/H5FDmpiposix.h \ + $(srcdir)/H5Oprivate.h \ + $(srcdir)/H5Opublic.h \ + $(srcdir)/H5Spublic.h \ + $(srcdir)/H5HGprivate.h \ + $(srcdir)/H5HGpublic.h \ + $(srcdir)/H5Fprivate.h \ + $(srcdir)/H5RCprivate.h \ + $(srcdir)/H5Tprivate.h \ + $(srcdir)/H5Tpublic.h \ + $(srcdir)/H5MMpublic.h \ + $(srcdir)/H5Gprivate.h \ + $(srcdir)/H5Gpublic.h \ + $(srcdir)/H5Bprivate.h \ + $(srcdir)/H5Bpublic.h \ + $(srcdir)/H5ACprivate.h \ + $(srcdir)/H5ACpublic.h \ + $(srcdir)/H5RSprivate.h \ + $(srcdir)/H5Rprivate.h \ + $(srcdir)/H5Rpublic.h \ + $(srcdir)/H5Zprivate.h \ + $(srcdir)/H5Zpublic.h \ + $(srcdir)/H5Sprivate.h \ + $(srcdir)/H5Pprivate.h \ + $(srcdir)/H5Ppublic.h \ + $(srcdir)/H5Eprivate.h \ + $(srcdir)/H5Epublic.h H5Dseq.lo: \ $(srcdir)/H5Dseq.c \ $(srcdir)/H5private.h \ @@ -2468,8 +2511,8 @@ H5S.lo: \ $(srcdir)/H5Eprivate.h \ $(srcdir)/H5Epublic.h \ $(srcdir)/H5Ipublic.h \ - $(srcdir)/H5Iprivate.h \ $(srcdir)/H5FLprivate.h \ + $(srcdir)/H5Iprivate.h \ $(srcdir)/H5MMprivate.h \ $(srcdir)/H5MMpublic.h \ $(srcdir)/H5Oprivate.h \ @@ -2602,46 +2645,43 @@ H5Smpio.lo: \ H5pubconf.h \ $(srcdir)/H5api_adpt.h \ $(srcdir)/H5MPprivate.h \ - $(srcdir)/H5Eprivate.h \ - $(srcdir)/H5Epublic.h \ + $(srcdir)/H5Dprivate.h \ + $(srcdir)/H5Dpublic.h \ $(srcdir)/H5Ipublic.h \ - $(srcdir)/H5Fpkg.h \ - $(srcdir)/H5Fprivate.h \ - $(srcdir)/H5Fpublic.h \ - $(srcdir)/H5FDpublic.h \ - $(srcdir)/H5Bpublic.h \ - $(srcdir)/H5FOprivate.h \ - $(srcdir)/H5TBprivate.h \ - $(srcdir)/H5Gprivate.h \ - $(srcdir)/H5Gpublic.h \ - $(srcdir)/H5Opublic.h \ - $(srcdir)/H5Bprivate.h \ - $(srcdir)/H5ACprivate.h \ - $(srcdir)/H5ACpublic.h \ - $(srcdir)/H5RCprivate.h \ - $(srcdir)/H5RSprivate.h \ $(srcdir)/H5FDprivate.h \ + $(srcdir)/H5FDpublic.h \ + $(srcdir)/H5Fpublic.h \ $(srcdir)/H5FDmpi.h \ $(srcdir)/H5FDmpio.h \ $(srcdir)/H5FDmpiposix.h \ - $(srcdir)/H5Iprivate.h \ - $(srcdir)/H5Pprivate.h \ - $(srcdir)/H5Ppublic.h \ - $(srcdir)/H5Dpublic.h \ - $(srcdir)/H5MMpublic.h \ - $(srcdir)/H5Zpublic.h \ $(srcdir)/H5Oprivate.h \ + $(srcdir)/H5Opublic.h \ $(srcdir)/H5Spublic.h \ $(srcdir)/H5HGprivate.h \ $(srcdir)/H5HGpublic.h \ + $(srcdir)/H5Fprivate.h \ + $(srcdir)/H5RCprivate.h \ $(srcdir)/H5Tprivate.h \ $(srcdir)/H5Tpublic.h \ + $(srcdir)/H5MMpublic.h \ + $(srcdir)/H5Gprivate.h \ + $(srcdir)/H5Gpublic.h \ + $(srcdir)/H5Bprivate.h \ + $(srcdir)/H5Bpublic.h \ + $(srcdir)/H5ACprivate.h \ + $(srcdir)/H5ACpublic.h \ + $(srcdir)/H5RSprivate.h \ $(srcdir)/H5Rprivate.h \ $(srcdir)/H5Rpublic.h \ $(srcdir)/H5Zprivate.h \ + $(srcdir)/H5Zpublic.h \ + $(srcdir)/H5Eprivate.h \ + $(srcdir)/H5Epublic.h \ + $(srcdir)/H5Iprivate.h \ + $(srcdir)/H5Pprivate.h \ + $(srcdir)/H5Ppublic.h \ $(srcdir)/H5Spkg.h \ - $(srcdir)/H5Sprivate.h \ - $(srcdir)/H5Dprivate.h + $(srcdir)/H5Sprivate.h H5Snone.lo: \ $(srcdir)/H5Snone.c \ $(srcdir)/H5private.h \ diff --git a/src/H5Dio.c b/src/H5Dio.c index 32e6a28..b59a11f 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -21,7 +21,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Dpkg.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5FDprivate.h" /* File drivers */ #include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ @@ -644,6 +643,8 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, hbool_t use_par_opt_io=FALSE; /* Whether the 'optimized' I/O routines with be parallel */ #ifdef H5_HAVE_PARALLEL hbool_t xfer_mode_changed=FALSE; /* Whether the transfer mode was changed */ + int prop_value,new_value; + htri_t check_prop; #endif /*H5_HAVE_PARALLEL*/ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */ H5D_dxpl_cache_t *dxpl_cache=&_dxpl_cache; /* Data transfer property cache */ @@ -756,10 +757,33 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, } /* end switch */ /* Get dataspace functions */ - if (NULL==(sconv=H5S_find(mem_space, file_space, sconv_flags, &use_par_opt_io))) + if (NULL==(sconv=H5S_find(dataset->ent.file, mem_space, file_space, sconv_flags, &use_par_opt_io, &dataset->layout))) HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from file to memory data space") #ifdef H5_HAVE_PARALLEL +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY + /**** Test for collective chunk IO + notice the following code should be removed after + a more general collective chunk IO algorithm is applied. + */ + + if(dataset->layout.type == H5D_CHUNKED) { /*only check for chunking storage */ + check_prop = H5Pexist(dxpl_id,H5D_XFER_COLL_CHUNK_NAME); + if(check_prop < 0) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to check property list"); + if(check_prop > 0) { + if(H5Pget(dxpl_id,H5D_XFER_COLL_CHUNK_NAME,&prop_value)<0) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to get property value"); + if(!use_par_opt_io) { + new_value = 0; + if(H5Pset(dxpl_id,H5D_XFER_COLL_CHUNK_NAME,&new_value)<0) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value"); + } + } + } + /* end Test for collective chunk IO */ +#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ + /* Don't reset the transfer mode if we can't or won't use it */ if(!use_par_opt_io || !H5T_path_noop(tpath)) H5D_io_assist_mpio(dxpl_id, dxpl_cache, &xfer_mode_changed); @@ -846,6 +870,8 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, hbool_t use_par_opt_io=FALSE; /* Whether the 'optimized' I/O routines with be parallel */ #ifdef H5_HAVE_PARALLEL hbool_t xfer_mode_changed=FALSE; /* Whether the transfer mode was changed */ + int prop_value,new_value; + htri_t check_prop; #endif /*H5_HAVE_PARALLEL*/ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */ H5D_dxpl_cache_t *dxpl_cache=&_dxpl_cache; /* Data transfer property cache */ @@ -978,10 +1004,33 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, } /* end switch */ /* Get dataspace functions */ - if (NULL==(sconv=H5S_find(mem_space, file_space, sconv_flags, &use_par_opt_io))) + if (NULL==(sconv=H5S_find(dataset->ent.file, mem_space, file_space, sconv_flags, &use_par_opt_io, &dataset->layout))) HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from memory to file data space") #ifdef H5_HAVE_PARALLEL +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY + /**** Test for collective chunk IO + notice the following code should be removed after + a more general collective chunk IO algorithm is applied. + */ + + if(dataset->layout.type == H5D_CHUNKED) { /*only check for chunking storage */ + + check_prop = H5Pexist(dxpl_id,H5D_XFER_COLL_CHUNK_NAME); + if(check_prop < 0) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to check property list"); + if(check_prop > 0) { + if(H5Pget(dxpl_id,H5D_XFER_COLL_CHUNK_NAME,&prop_value)<0) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to get property value"); + if(!use_par_opt_io) { + new_value = 0; + if(H5Pset(dxpl_id,H5D_XFER_COLL_CHUNK_NAME,&new_value)<0) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value"); + } + } + } +#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ + /* Don't reset the transfer mode if we can't or won't use it */ if(!use_par_opt_io || !H5T_path_noop(tpath)) H5D_io_assist_mpio(dxpl_id, dxpl_cache, &xfer_mode_changed); @@ -2494,7 +2543,7 @@ H5D_create_chunk_map(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *file_sp } /* end if */ } /* end else */ -#ifdef QAK +#ifdef QAK { int mpi_rank; double time; diff --git a/src/H5Distore.c b/src/H5Distore.c index 136ed69..daa2582 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -146,8 +146,6 @@ typedef struct H5D_istore_ud1_t { #define H5D_HASH(D,ADDR) H5F_addr_hash(ADDR,(D)->cache.chunk.nslots) /* Private prototypes */ -static haddr_t H5D_istore_get_addr(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, - const hssize_t offset[], H5D_istore_ud1_t *_udata); static void *H5D_istore_chunk_alloc(size_t size, const H5O_pline_t *pline); static void *H5D_istore_chunk_xfree(void *chk, const H5O_pline_t *pline); static herr_t H5D_istore_shared_free (void *page); @@ -2164,7 +2162,7 @@ done: * *------------------------------------------------------------------------- */ -static haddr_t +haddr_t H5D_istore_get_addr(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, const hssize_t offset[], H5D_istore_ud1_t *_udata) { diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 581a20a..e8da931 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -39,6 +39,10 @@ #ifdef H5_HAVE_PARALLEL +/* Interface initialization */ +#define INTERFACE_INIT NULL +static int interface_initialize_g = 0; + static herr_t H5D_mpio_spaces_xfer(H5F_t *f, const H5D_t *dset, size_t elmt_size, const H5S_t *file_space, const H5S_t *mem_space, @@ -219,11 +223,12 @@ H5D_mpio_spaces_read(H5F_t *f, const H5D_dxpl_cache_t UNUSED *dxpl_cache, hid_t { herr_t ret_value; - FUNC_ENTER_NOAPI_NOFUNC(H5D_mpio_spaces_read); + FUNC_ENTER_NOAPI(H5D_mpio_spaces_read, FAIL); ret_value = H5D_mpio_spaces_xfer(f, dset, elmt_size, file_space, mem_space, dxpl_id, buf, store, 0/*read*/); +done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5D_mpio_spaces_read() */ @@ -257,12 +262,13 @@ H5D_mpio_spaces_write(H5F_t *f, const H5D_dxpl_cache_t UNUSED *dxpl_cache, hid_t { herr_t ret_value; - FUNC_ENTER_NOAPI_NOFUNC(H5D_mpio_spaces_write); + FUNC_ENTER_NOAPI(H5D_mpio_spaces_write, FAIL); /*OKAY: CAST DISCARDS CONST QUALIFIER*/ ret_value = H5D_mpio_spaces_xfer(f, dset, elmt_size, file_space, mem_space, dxpl_id, (void*)buf, store, 1/*write*/); +done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5D_mpio_spaces_write() */ #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index e1d4b71..30183c3 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -33,7 +33,7 @@ /* Other private headers needed by this file */ #include "H5Gprivate.h" /* Groups */ #include "H5Oprivate.h" /* Object headers */ -#include "H5Sprivate.h" /* Dataspace functions */ +#include "H5Sprivate.h" /* Dataspaces */ #include "H5Tprivate.h" /* Datatype functions */ /**************************/ diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 163c1a6..f8fef09 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -154,6 +154,12 @@ #define H5D_XFER_FILTER_CB_NAME "filter_cb" #define H5D_XFER_FILTER_CB_SIZE sizeof(H5Z_cb_t) #define H5D_XFER_FILTER_CB_DEF {NULL,NULL} +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY +/* Definitions for collective chunk I/O property */ +#define H5D_XFER_COLL_CHUNK_NAME "coll_chunk" +#define H5D_XFER_COLL_CHUNK_SIZE sizeof(unsigned) +#define H5D_XFER_COLL_CHUNK_DEF 1 +#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ /****************************/ /* Library Private Typedefs */ @@ -247,6 +253,9 @@ H5_DLL ssize_t H5D_compact_writevv(H5F_t *f, hid_t dxpl_id, H5D_t *dset, size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[], const void *buf); +/* forward reference for collective-chunk IO use */ +struct H5D_istore_ud1_t; /*define at H5Distore.c*/ + /* Functions that operate on indexed storage */ H5_DLL herr_t H5D_istore_delete(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout); @@ -260,7 +269,29 @@ H5_DLL ssize_t H5D_istore_writevv(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, size_t chunk_max_nseq, size_t *chunk_curr_seq, size_t chunk_len_arr[], hsize_t chunk_offset_arr[], size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[], const void *buf); +H5_DLL haddr_t H5D_istore_get_addr(H5F_t *f, hid_t dxpl_id, + const H5O_layout_t *layout, const hssize_t offset[], + struct H5D_istore_ud1_t *_udata); H5_DLL herr_t H5D_istore_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int fwidth, int ndims); +#ifdef H5_HAVE_PARALLEL +/* Forward references */ +struct H5S_t; + +/* MPI-IO function to read directly from app buffer to file rky980813 */ +H5_DLL herr_t H5D_mpio_spaces_read(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, + H5D_t *dset, const H5D_storage_t *store, + size_t nelmts, size_t elmt_size, + const struct H5S_t *file_space, const struct H5S_t *mem_space, + void *buf/*out*/); + +/* MPI-IO function to write directly from app buffer to file rky980813 */ +H5_DLL herr_t H5D_mpio_spaces_write(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, + H5D_t *dset, const H5D_storage_t *store, + size_t nelmts, size_t elmt_size, + const struct H5S_t *file_space, const struct H5S_t *mem_space, + const void *buf); +#endif /* H5_HAVE_PARALLEL */ + #endif @@ -14,14 +14,18 @@ #define H5S_PACKAGE /*suppress error about including H5Spkg */ +/* Pablo information */ +/* (Put before include files to avoid problems with inline functions) */ +#define PABLO_MASK H5S_mask + #define _H5S_IN_H5S_C -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* ID Functions */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5MMprivate.h" /* Memory Management functions */ -#include "H5Oprivate.h" /* object headers */ -#include "H5Spkg.h" /* Dataspace functions */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free lists */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Oprivate.h" /* Object headers */ +#include "H5Spkg.h" /* Dataspaces */ /* Local static function prototypes */ static H5S_t * H5S_create(H5S_class_t type); @@ -30,7 +34,6 @@ static herr_t H5S_set_extent_simple (H5S_t *space, unsigned rank, static htri_t H5S_is_simple(const H5S_t *sdim); /* Interface initialization */ -#define PABLO_MASK H5S_mask #define INTERFACE_INIT H5S_init_interface static int interface_initialize_g = 0; static herr_t H5S_init_interface(void); @@ -1403,7 +1406,12 @@ done: *------------------------------------------------------------------------- */ H5S_conv_t * -H5S_find (const H5S_t *mem_space, const H5S_t *file_space, unsigned +H5S_find (const H5F_t +#ifndef H5_HAVE_PARALLEL +UNUSED +#endif/* H5_HAVE_PARALLEL*/ +*file, +const H5S_t *mem_space, const H5S_t *file_space, unsigned #ifndef H5_HAVE_PARALLEL UNUSED #endif /* H5_HAVE_PARALLEL */ @@ -1411,7 +1419,13 @@ flags, hbool_t #ifndef H5_HAVE_PARALLEL UNUSED #endif /* H5_HAVE_PARALLEL */ -*use_par_opt_io) +*use_par_opt_io, +#ifndef H5_HAVE_PARALLEL +UNUSED +#endif +const H5O_layout_t *layout + +) { H5S_conv_t *path=NULL; /* Space conversion path */ #ifdef H5_HAVE_PARALLEL @@ -1441,15 +1455,15 @@ UNUSED /* * Check if we can set direct MPI-IO read/write functions */ - opt=H5S_mpio_opt_possible(mem_space,file_space,flags); + opt=H5S_mpio_opt_possible(file,mem_space,file_space,flags,layout); if(opt==FAIL) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, NULL, "invalid check for contiguous dataspace "); + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, NULL, "invalid check for direct IO dataspace "); /* Check if we can use the optimized parallel I/O routines */ if(opt==TRUE) { /* Set the pointers to the MPI-specific routines */ - H5S_conv_g[i]->read = H5S_mpio_spaces_read; - H5S_conv_g[i]->write = H5S_mpio_spaces_write; + H5S_conv_g[i]->read = H5D_mpio_spaces_read; + H5S_conv_g[i]->write = H5D_mpio_spaces_write; /* Indicate that the I/O will be parallel */ *use_par_opt_io=TRUE; @@ -1483,15 +1497,15 @@ UNUSED /* * Check if we can set direct MPI-IO read/write functions */ - opt=H5S_mpio_opt_possible(mem_space,file_space,flags); + opt=H5S_mpio_opt_possible(file,mem_space,file_space,flags,layout); if(opt==FAIL) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, NULL, "invalid check for contiguous dataspace "); + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, NULL, "invalid check for direct IO dataspace "); /* Check if we can use the optimized parallel I/O routines */ if(opt==TRUE) { /* Set the pointers to the MPI-specific routines */ - path->read = H5S_mpio_spaces_read; - path->write = H5S_mpio_spaces_write; + path->read = H5D_mpio_spaces_read; + path->write = H5D_mpio_spaces_write; /* Indicate that the I/O will be parallel */ *use_par_opt_io=TRUE; diff --git a/src/H5Shyper.c b/src/H5Shyper.c index f468db0..735a339 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2295,7 +2295,7 @@ H5S_hyper_span_blocklist(H5S_hyper_span_info_t *spans, hssize_t start[], hssize_ hsize_t u; /* Index variable */ herr_t ret_value=SUCCEED; /* return value */ - FUNC_ENTER_NOAPI(H5S_hyper_span_blocklist, FAIL); + FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_span_blocklist); /* Sanity checks */ assert(spans); @@ -2389,7 +2389,7 @@ done: EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -herr_t +static herr_t H5S_get_select_hyper_blocklist(H5S_t *space, hbool_t internal, hsize_t startblock, hsize_t numblocks, hsize_t *buf) { H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */ @@ -2621,16 +2621,15 @@ H5S_hyper_bounds_helper (const H5S_hyper_span_info_t *spans, const hssize_t *off /* Recurse if this node has down spans */ if(curr->down!=NULL) { - if(H5S_hyper_bounds_helper(curr->down,offset,rank+1,start,end)<0) { - ret_value=FAIL; - break; - } /* end if */ + if(H5S_hyper_bounds_helper(curr->down,offset,rank+1,start,end)<0) + HGOTO_DONE(FAIL) } /* end if */ /* Advance to next node */ curr=curr->next; } /* end while */ +done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5S_hyper_bounds_helper() */ @@ -2913,7 +2912,7 @@ H5S_hyper_is_single(const H5S_t *space) H5S_hyper_span_info_t *spans; /* Hyperslab span info node */ H5S_hyper_span_t *span; /* Hyperslab span node */ unsigned u; /* index variable */ - htri_t ret_value=FALSE; /* return value */ + htri_t ret_value=TRUE; /* return value */ FUNC_ENTER_NOAPI(H5S_hyper_is_single, FAIL); @@ -2926,24 +2925,16 @@ H5S_hyper_is_single(const H5S_t *space) * block (i.e. count==1 in all dimensions) */ - /* Initialize flags */ - ret_value=TRUE; /* assume true and reset if the dimensions don't match */ - /* Check for a single block */ for(u=0; u<space->extent.rank; u++) { - if(space->select.sel_info.hslab->opt_diminfo[u].count>1) { - ret_value=FALSE; - break; - } /* end if */ + if(space->select.sel_info.hslab->opt_diminfo[u].count>1) + HGOTO_DONE(FALSE) } /* end for */ } /* end if */ else { /* * For a region to be single, it must have only one block */ - /* Initialize flags */ - ret_value=TRUE; /* assume true and reset if the dimensions don't match */ - /* Get information for slowest changing information */ spans=space->select.sel_info.hslab->span_lst; @@ -2952,14 +2943,11 @@ H5S_hyper_is_single(const H5S_t *space) span=spans->head; /* Check that this is the only span and it spans the entire dimension */ - if(span->next!=NULL) { - ret_value=FALSE; - break; - } /* end if */ - else { + if(span->next!=NULL) + HGOTO_DONE(FALSE) + else /* Walk down to the next span */ spans=span->down; - } /* end else */ } /* end while */ } /* end else */ @@ -3809,7 +3797,6 @@ static herr_t H5S_hyper_adjust_helper (H5S_hyper_span_info_t *spans, const hssize_t *offset) { H5S_hyper_span_t *span; /* Pointer to current span in span tree */ - herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_adjust_helper); @@ -3834,18 +3821,15 @@ H5S_hyper_adjust_helper (H5S_hyper_span_info_t *spans, const hssize_t *offset) assert(span->high>=0); /* Recursively adjust spans in next dimension down */ - if(span->down!=NULL) { - if(H5S_hyper_adjust_helper(span->down,offset+1)<0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab adjustment"); - } /* end if */ + if(span->down!=NULL) + H5S_hyper_adjust_helper(span->down,offset+1); /* Advance to next span in this dimension */ span=span->next; } /* end while */ } /* end if */ -done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(SUCCEED); } /* H5S_hyper_adjust_helper() */ @@ -3924,7 +3908,6 @@ static herr_t H5S_hyper_move_helper (H5S_hyper_span_info_t *spans, const hssize_t *offset) { H5S_hyper_span_t *span; /* Pointer to current span in span tree */ - herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_move_helper); @@ -3949,18 +3932,15 @@ H5S_hyper_move_helper (H5S_hyper_span_info_t *spans, const hssize_t *offset) assert(span->low>=0); /* Recursively move spans in next dimension down */ - if(span->down!=NULL) { - if(H5S_hyper_move_helper(span->down,offset+1)<0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab movement"); - } /* end if */ + if(span->down!=NULL) + H5S_hyper_move_helper(span->down,offset+1); /* Advance to next span in this dimension */ span=span->next; } /* end while */ } /* end if */ -done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(SUCCEED); } /* H5S_hyper_move_helper() */ @@ -5280,7 +5260,6 @@ H5S_hyper_rebuild (H5S_t *space) H5S_hyper_dim_t *app_diminfo; /* "Application view" per-dimension for the selection */ H5S_hyper_span_t *span; /* Current hyperslab span */ unsigned curr_dim; /* Current dimension being worked on */ - herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_rebuild); @@ -5321,7 +5300,7 @@ H5S_hyper_rebuild (H5S_t *space) space->select.sel_info.hslab->diminfo_valid=TRUE; } /* end if */ - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(SUCCEED); } /* H5S_hyper_rebuild() */ @@ -6828,14 +6807,14 @@ H5S_hyper_get_seq_list_opt(const H5S_t *space,H5S_sel_iter_t *iter, EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -herr_t +static herr_t H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem, size_t *nseq, size_t *nelem, hsize_t *off, size_t *len) { herr_t ret_value; /* return value */ - FUNC_ENTER_NOAPI (H5S_hyper_get_seq_list, FAIL); + FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_get_seq_list); /* Check args */ assert(space); @@ -6855,7 +6834,6 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t /* Call the general sequence generator routine */ ret_value=H5S_hyper_get_seq_list_gen(space,iter,maxseq,maxelem,nseq,nelem,off,len); -done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5S_hyper_get_seq_list() */ diff --git a/src/H5Smpio.c b/src/H5Smpio.c index c8aab2d..bf8f717 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -21,7 +21,6 @@ * I didn't make them portable. */ -#define H5F_PACKAGE /*suppress error about including H5Fpkg */ #define H5S_PACKAGE /*suppress error about including H5Spkg */ /* Pablo information */ @@ -29,10 +28,12 @@ #define PABLO_MASK H5S_mpio_mask #include "H5private.h" /* Generic Functions */ +#include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* Files */ +#include "H5Fprivate.h" /* File access */ #include "H5FDprivate.h" /* File drivers */ #include "H5Iprivate.h" /* IDs */ +#include "H5Oprivate.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ #include "H5Spkg.h" /* Dataspaces */ @@ -63,17 +64,6 @@ H5S_mpio_hyper_type( const H5S_t *space, size_t elmt_size, size_t *count, hsize_t *extra_offset, hbool_t *is_derived_type ); -static herr_t -H5S_mpio_space_type( const H5S_t *space, size_t elmt_size, - /* out: */ - MPI_Datatype *new_type, - size_t *count, - hsize_t *extra_offset, - hbool_t *is_derived_type ); -static herr_t -H5S_mpio_spaces_xfer(H5F_t *f, const H5D_t *dset, size_t elmt_size, - const H5S_t *file_space, const H5S_t *mem_space, - hid_t dxpl_id, void *buf/*out*/, hbool_t do_write); /*------------------------------------------------------------------------- @@ -522,7 +512,7 @@ done: * *------------------------------------------------------------------------- */ -static herr_t +herr_t H5S_mpio_space_type( const H5S_t *space, size_t elmt_size, /* out: */ MPI_Datatype *new_type, @@ -586,221 +576,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5S_mpio_spaces_xfer - * - * Purpose: Use MPI-IO to transfer data efficiently - * directly between app buffer and file. - * - * Return: non-negative on success, negative on failure. - * - * Programmer: rky 980813 - * - * Notes: - * For collective data transfer only since this would eventually call - * H5FD_mpio_setup to do setup to eveually call MPI_File_set_view in - * H5FD_mpio_read or H5FD_mpio_write. MPI_File_set_view is a collective - * call. Letting independent data transfer use this route would result in - * hanging. - * - * The preconditions for calling this routine are located in the - * H5S_mpio_opt_possible() routine, which determines whether this routine - * can be called for a given dataset transfer. - * - * Modifications: - * rky 980918 - * Added must_convert parameter to let caller know we can't optimize - * the xfer. - * - * Albert Cheng, 001123 - * Include the MPI_type freeing as part of cleanup code. - * - * QAK - 2002/04/02 - * Removed the must_convert parameter and move preconditions to - * H5S_mpio_opt_possible() routine - * - * QAK - 2002/06/17 - * Removed 'disp' parameter from H5FD_mpio_setup routine and use the - * address of the dataset in MPI_File_set_view() calls, as necessary. - * - * QAK - 2002/06/18 - * Removed 'dc_plist' parameter, since it was not used. Also, switch to - * getting the 'extra_offset' setting for each selection. - * - *------------------------------------------------------------------------- - */ -static herr_t -H5S_mpio_spaces_xfer(H5F_t *f, const H5D_t *dset, size_t elmt_size, - const H5S_t *file_space, const H5S_t *mem_space, - hid_t dxpl_id, void *_buf /*out*/, - hbool_t do_write ) -{ - haddr_t addr; /* Address of dataset (or selection) within file */ - size_t mpi_buf_count, mpi_file_count; /* Number of "objects" to transfer */ - hsize_t mpi_buf_offset, mpi_file_offset; /* Offset within dataset where selection (ie. MPI type) begins */ - MPI_Datatype mpi_buf_type, mpi_file_type; /* MPI types for buffer (memory) and file */ - hbool_t mbt_is_derived=0, /* Whether the buffer (memory) type is derived and needs to be free'd */ - mft_is_derived=0; /* Whether the file type is derived and needs to be free'd */ - hbool_t plist_is_setup=0; /* Whether the dxpl has been customized */ - uint8_t *buf=(uint8_t *)_buf; /* Alias for pointer arithmetic */ - int mpi_code; /* MPI return code */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT(H5S_mpio_spaces_xfer); - - /* Check args */ - assert (f); - assert (dset); - assert (file_space); - assert (mem_space); - assert (buf); - assert (IS_H5FD_MPIO(f)); - /* Make certain we have the correct type of property list */ - assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER)); - - /* create the MPI buffer type */ - if (H5S_mpio_space_type( mem_space, elmt_size, - /* out: */ - &mpi_buf_type, - &mpi_buf_count, - &mpi_buf_offset, - &mbt_is_derived )<0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL,"couldn't create MPI buf type"); - - /* create the MPI file type */ - if ( H5S_mpio_space_type( file_space, elmt_size, - /* out: */ - &mpi_file_type, - &mpi_file_count, - &mpi_file_offset, - &mft_is_derived )<0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL,"couldn't create MPI file type"); - - addr = H5D_contig_get_addr(dset) + mpi_file_offset; -#ifdef H5Smpi_DEBUG - HDfprintf(stderr, "spaces_xfer: relative addr=%a\n", addr ); -#endif - - /* - * Pass buf type, file type to the file driver. Request an MPI type - * transfer (instead of an elementary byteblock transfer). - */ - if(H5FD_mpi_setup_collective(dxpl_id, mpi_buf_type, mpi_file_type)<0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI-I/O properties"); - plist_is_setup=1; - - /* Adjust the buffer pointer to the beginning of the selection */ - buf+=mpi_buf_offset; - - /* transfer the data */ - if (do_write) { - if (H5F_block_write(f, H5FD_MEM_DRAW, addr, mpi_buf_count, dxpl_id, buf) <0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,"MPI write failed"); - } else { - if (H5F_block_read (f, H5FD_MEM_DRAW, addr, mpi_buf_count, dxpl_id, buf) <0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL,"MPI read failed"); - } - -done: - /* Reset the dxpl settings */ - if(plist_is_setup) { - if(H5FD_mpi_teardown_collective(dxpl_id)<0) - HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to reset dxpl values"); - } /* end if */ - - /* free the MPI buf and file types */ - if (mbt_is_derived) { - if (MPI_SUCCESS != (mpi_code= MPI_Type_free( &mpi_buf_type ))) - HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code); - } - if (mft_is_derived) { - if (MPI_SUCCESS != (mpi_code= MPI_Type_free( &mpi_file_type ))) - HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code); - } - - FUNC_LEAVE_NOAPI(ret_value); -} /* end H5S_mpio_spaces_xfer() */ - - -/*------------------------------------------------------------------------- - * Function: H5S_mpio_spaces_read - * - * Purpose: MPI-IO function to read directly from app buffer to file. - * - * Return: non-negative on success, negative on failure. - * - * Programmer: rky 980813 - * - * Modifications: - * - * rky 980918 - * Added must_convert parameter to let caller know we can't optimize the xfer. - * - * QAK - 2002/04/02 - * Removed the must_convert parameter and move preconditions to - * H5S_mpio_opt_possible() routine - * - *------------------------------------------------------------------------- - */ -herr_t -H5S_mpio_spaces_read(H5F_t *f, const H5D_dxpl_cache_t UNUSED *dxpl_cache, hid_t dxpl_id, - H5D_t *dset, const H5D_storage_t UNUSED *store, - size_t UNUSED nelmts, size_t elmt_size, - const H5S_t *file_space, const H5S_t *mem_space, - void *buf/*out*/) -{ - herr_t ret_value; - - FUNC_ENTER_NOAPI(H5S_mpio_spaces_read, FAIL); - - ret_value = H5S_mpio_spaces_xfer(f, dset, elmt_size, file_space, - mem_space, dxpl_id, buf, 0/*read*/); - -done: - FUNC_LEAVE_NOAPI(ret_value); -} /* end H5S_mpio_spaces_read() */ - - -/*------------------------------------------------------------------------- - * Function: H5S_mpio_spaces_write - * - * Purpose: MPI-IO function to write directly from app buffer to file. - * - * Return: non-negative on success, negative on failure. - * - * Programmer: rky 980813 - * - * Modifications: - * - * rky 980918 - * Added must_convert parameter to let caller know we can't optimize the xfer. - * - * QAK - 2002/04/02 - * Removed the must_convert parameter and move preconditions to - * H5S_mpio_opt_possible() routine - * - *------------------------------------------------------------------------- - */ -herr_t -H5S_mpio_spaces_write(H5F_t *f, const H5D_dxpl_cache_t UNUSED *dxpl_cache, hid_t dxpl_id, - H5D_t *dset, const H5D_storage_t UNUSED *store, - size_t UNUSED nelmts, size_t elmt_size, - const H5S_t *file_space, const H5S_t *mem_space, - const void *buf) -{ - herr_t ret_value; - - FUNC_ENTER_NOAPI(H5S_mpio_spaces_write, FAIL); - - /*OKAY: CAST DISCARDS CONST QUALIFIER*/ - ret_value = H5S_mpio_spaces_xfer(f, dset, elmt_size, file_space, - mem_space, dxpl_id, (void*)buf, 1/*write*/); - -done: - FUNC_LEAVE_NOAPI(ret_value); -} /* end H5S_mpio_spaces_write() */ - - -/*------------------------------------------------------------------------- * Function: H5S_mpio_opt_possible * * Purpose: Checks if an direct I/O transfer is possible between memory and @@ -817,7 +592,7 @@ done: *------------------------------------------------------------------------- */ htri_t -H5S_mpio_opt_possible( const H5S_t *mem_space, const H5S_t *file_space, const unsigned flags) +H5S_mpio_opt_possible( const H5F_t *file, const H5S_t *mem_space, const H5S_t *file_space, const unsigned flags,const H5O_layout_t *layout) { htri_t c1,c2; /* Flags whether a selection is optimizable */ htri_t ret_value=TRUE; @@ -849,12 +624,126 @@ H5S_mpio_opt_possible( const H5S_t *mem_space, const H5S_t *file_space, const un if (H5S_SEL_POINTS==H5S_GET_SELECT_TYPE(mem_space) || H5S_SEL_POINTS==H5S_GET_SELECT_TYPE(file_space)) HGOTO_DONE(FALSE); - /* Dataset storage must be contiguous currently */ - if ((flags&H5S_CONV_STORAGE_MASK)!=H5S_CONV_STORAGE_CONTIGUOUS) + /* Dataset storage must be contiguous or chunked */ + if ((flags&H5S_CONV_STORAGE_MASK)!=H5S_CONV_STORAGE_CONTIGUOUS && + (flags&H5S_CONV_STORAGE_MASK)!=H5S_CONV_STORAGE_CHUNKED) HGOTO_DONE(FALSE); + if ((flags&H5S_CONV_STORAGE_MASK)==H5S_CONV_STORAGE_CHUNKED) { + hsize_t chunk_dim[H5O_LAYOUT_NDIMS]; /* Chunk dimensions */ + hssize_t startf[H5S_MAX_RANK], /* Selection start bounds */ + endf[H5S_MAX_RANK]; /* Selection end bounds */ + unsigned dim_rankf; /* Number of dimensions of file dataspace */ + int pcheck_hyper,check_hyper, /* Flags for checking if selection is in one chunk */ + tnum_chunkf, /* Number of chunks selection overlaps */ + max_chunkf, /* Maximum number of chunks selection overlaps */ + min_chunkf, /* Minimum number of chunks selection overlaps */ + num_chunks_same; /* Flag indicating whether all processes have the same # of chunks to operate on */ + unsigned dim_chunks; /* Temporary number of chunks in a dimension */ + MPI_Comm comm; /* MPI communicator for file */ + int mpi_rank; /* Rank in MPI communicator */ + int mpi_code; /* MPI return code */ + unsigned u; /* Local index variable */ + + /* Getting MPI communicator and rank */ + if((comm = H5F_mpi_get_comm(file))==MPI_COMM_NULL) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator") + if((mpi_rank = H5F_mpi_get_rank(file))<0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI rank") + + /* Currently collective chunking storage + inside HDF5 is supported for either one of the following two cases: + 1. All the hyperslabs for one process is inside one chunk. + 2. For single hyperslab selection, the number of chunks that covered + the single selection for all processes should be equal. + KY, 2004/7/14 + */ + + /* Quincey, please read. + This is maybe redundant, I think only when both memory and file space be SCALAR + space, the collective IO can work. Otherwise, SELECT_POINT will be reached,collective + IO shouldn't work. + Please clarify and correct the code on the following, + Quincey said that it was probably okay if only one data space is SCALAR, + Still keep the code here until we added more tests later. + Kent */ + if(H5S_SCALAR==mem_space->extent.type || H5S_SCALAR ==file_space->extent.type) { + if(!(H5S_SCALAR==mem_space->extent.type && H5S_SCALAR ==file_space->extent.type)) + HGOTO_DONE(FALSE) + else + HGOTO_DONE(TRUE) + } /* end if */ + + dim_rankf = file_space->extent.rank; + + if(H5S_SELECT_BOUNDS(file_space,startf,endf)==FAIL) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE,FAIL, "invalid check for single selection blocks"); + + for(u=0; u < layout->u.chunk.ndims; u++) + chunk_dim[u] = layout->u.chunk.dim[u]; + + /* Case 1: check whether all hyperslab in this process is inside one chunk. + Note: we don't handle when starting point is less than zero since that may cover + two chunks. */ + + /*for file space checking*/ + pcheck_hyper = 1; + for (u=0; u<dim_rankf; u++) + if(endf[u]/chunk_dim[u]!=startf[u]/chunk_dim[u]) { + pcheck_hyper = 0; + break; + } + + if (MPI_SUCCESS != (mpi_code= MPI_Reduce(&pcheck_hyper,&check_hyper,1,MPI_INT,MPI_LAND,0,comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Reduce failed", mpi_code) + if (MPI_SUCCESS != (mpi_code= MPI_Bcast(&check_hyper,1,MPI_INT,0,comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_code) + + /*if check_hyper is true, condition for collective IO case is fulfilled, no + need to do further test. */ + if(check_hyper) + HGOTO_DONE(TRUE); + + /* Case 2:Check whether the number of chunks that covered the single hyperslab is the same. + If not,no collective chunk IO. + KY, 2004/7/14 + */ + + c1 = H5S_SELECT_IS_SINGLE(file_space); + c2 = H5S_SELECT_IS_SINGLE(mem_space); + + if(c1==FAIL || c2 ==FAIL) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for single selection blocks"); + if(c1==FALSE || c2 ==FALSE) + HGOTO_DONE(FALSE); + + /* Compute the number of chunks covered by the selection on this process */ + tnum_chunkf = 1; + for (u=0; u<dim_rankf; u++) { + dim_chunks = (endf[u]/chunk_dim[u]-startf[u]/chunk_dim[u])+1; + tnum_chunkf = dim_chunks*tnum_chunkf; + } + + /* Determine the minimum and maximum # of chunks for all processes */ + if (MPI_SUCCESS != (mpi_code= MPI_Reduce(&tnum_chunkf,&max_chunkf,1,MPI_INT,MPI_MAX,0,comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Reduce failed", mpi_code) + if (MPI_SUCCESS != (mpi_code= MPI_Reduce(&tnum_chunkf,&min_chunkf,1,MPI_INT,MPI_MIN,0,comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Reduce failed", mpi_code) + + /* Let the rank==0 process determine if the same number of chunks will be operated on by all processes */ + if(mpi_rank == 0) + num_chunks_same = (max_chunkf==min_chunkf); + + /* Broadcast the flag indicating the number of chunks are the same */ + if (MPI_SUCCESS != (mpi_code= MPI_Bcast(&num_chunks_same,1,MPI_INT,0,comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_code) + + /* Can't handle case when number of chunks is different (yet) */ + if(!num_chunks_same) + HGOTO_DONE(FALSE); + } + done: FUNC_LEAVE_NOAPI(ret_value); } /* H5S_mpio_opt_possible() */ - #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 82bfec2..ce93770 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -224,24 +224,10 @@ H5_DLL herr_t H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src); /* Operations on selections */ #ifdef H5_HAVE_PARALLEL -/* MPI-IO function to read directly from app buffer to file rky980813 */ -H5_DLL herr_t H5S_mpio_spaces_read(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, - H5D_t *dset, const H5D_storage_t *store, - size_t nelmts, size_t elmt_size, - const H5S_t *file_space, const H5S_t *mem_space, - void *buf/*out*/); - -/* MPI-IO function to write directly from app buffer to file rky980813 */ -H5_DLL herr_t H5S_mpio_spaces_write(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, - H5D_t *dset, const H5D_storage_t *store, - size_t nelmts, size_t elmt_size, - const H5S_t *file_space, const H5S_t *mem_space, - const void *buf); - /* MPI-IO function to check if a direct I/O transfer is possible between * memory and the file */ -H5_DLL htri_t H5S_mpio_opt_possible(const H5S_t *mem_space, - const H5S_t *file_space, const unsigned flags); +H5_DLL htri_t H5S_mpio_opt_possible(const H5F_t *file, const H5S_t *mem_space, + const H5S_t *file_space, const unsigned flags, const H5O_layout_t *layout); #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 7de895a..efa9b30 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -206,8 +206,8 @@ typedef struct H5S_conv_t { /* Operations on dataspaces */ H5_DLL H5S_t *H5S_copy(const H5S_t *src, hbool_t share_selection); H5_DLL herr_t H5S_close(H5S_t *ds); -H5_DLL H5S_conv_t *H5S_find(const H5S_t *mem_space, const H5S_t *file_space, - unsigned flags, hbool_t *use_par_opt_io); +H5_DLL H5S_conv_t *H5S_find(const H5F_t *file,const H5S_t *mem_space, const H5S_t *file_space, + unsigned flags, hbool_t *use_par_opt_io,const H5O_layout_t *layout ); H5_DLL H5S_class_t H5S_get_simple_extent_type(const H5S_t *ds); H5_DLL hssize_t H5S_get_simple_extent_npoints(const H5S_t *ds); H5_DLL hsize_t H5S_get_npoints_max(const H5S_t *ds); @@ -287,8 +287,6 @@ H5_DLL herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op, /* Operations on hyperslab selections */ H5_DLL herr_t H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, const hssize_t start[], const hsize_t *stride, const hsize_t count[], const hsize_t *block); -H5_DLL herr_t H5S_get_select_hyper_blocklist(H5S_t *space, hbool_t internal, - hsize_t startblock, hsize_t numblocks, hsize_t *buf); H5_DLL herr_t H5S_hyper_add_span_element(H5S_t *space, unsigned rank, hssize_t *coords); H5_DLL herr_t H5S_hyper_reset_scratch(H5S_t *space); @@ -314,6 +312,14 @@ H5_DLL herr_t H5S_select_iter_release(H5S_sel_iter_t *sel_iter); /* (Defined in H5S.c) */ H5_DLLVAR hbool_t H5S_mpi_opt_types_g; #endif /* _H5S_IN_H5S_C */ + +H5_DLL herr_t +H5S_mpio_space_type( const H5S_t *space, size_t elmt_size, + /* out: */ + MPI_Datatype *new_type, + size_t *count, + hsize_t *extra_offset, + hbool_t *is_derived_type ); #endif /* H5_HAVE_PARALLEL */ #endif /* _H5Sprivate_H */ diff --git a/src/H5config.h.in b/src/H5config.h.in index f91986b..365122d 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -7,6 +7,9 @@ /* Define if `dev_t' is a scalar */ #undef DEV_T_IS_SCALAR +/* Define if gettimeofday() populates the tz pointer passed in */ +#undef GETTIMEOFDAY_GIVES_TZ + /* Define if the __attribute__(()) extension is present */ #undef HAVE_ATTRIBUTE @@ -88,6 +91,10 @@ /* Define to 1 if you have the <gpfs.h> header file. */ #undef HAVE_GPFS_H +/* Define if library will contain instrumentation to detect correct + optimization operation */ +#undef HAVE_INSTRUMENTED_LIBRARY + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H @@ -356,9 +363,6 @@ /* Define if `__tm_gmtoff' is a member of `struct tm' */ #undef HAVE___TM_GMTOFF -/* Define if gettimeofday() populates the tz pointer passed in */ -#undef GETTIMEOFDAY_GIVES_TZ - /* Define if your system's `MPI_File_set_size' function works for files over 2GB. */ #undef MPI_FILE_SET_SIZE_BIG diff --git a/src/Makefile.in b/src/Makefile.in index 96fe515..0458936 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -31,19 +31,19 @@ DISTCLEAN=libhdf5.settings ## Source and object files for the library (lexicographically)... LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5D.c H5Dcontig.c H5Dcompact.c H5Dio.c \ - H5Distore.c H5Dseq.c H5Dtest.c H5E.c H5F.c H5FD.c H5FDcore.c \ - H5FDfamily.c H5FDgass.c H5FDlog.c H5FDmpi.c H5FDmpio.c H5FDmpiposix.c \ - H5FDmulti.c H5FDsec2.c H5FDsrb.c H5FDstdio.c H5FDstream.c H5FL.c \ - H5FO.c H5FS.c H5G.c H5Gent.c H5Gnode.c H5Gstab.c H5HG.c H5HL.c H5HP.c \ - H5I.c H5MF.c H5MM.c H5O.c H5Oattr.c H5Obogus.c H5Ocont.c H5Odtype.c \ - H5Oefl.c H5Ofill.c H5Olayout.c H5Omtime.c H5Oname.c H5Onull.c \ - H5Opline.c H5Osdspace.c H5Oshared.c H5Ostab.c H5P.c H5Pdcpl.c \ - H5Pdxpl.c H5Pfapl.c H5Pfcpl.c H5Ptest.c H5R.c H5RC.c H5RS.c H5S.c \ - H5Sall.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c H5Sselect.c \ - H5Stest.c H5ST.c H5T.c H5Tarray.c H5Tbit.c H5Tcommit.c H5Tcompound.c \ - H5Tconv.c H5Tcset.c H5Tenum.c H5Tfields.c H5Tfixed.c H5Tfloat.c \ - H5Tinit.c H5Tnative.c H5Toffset.c H5Topaque.c H5Torder.c H5Tpad.c \ - H5Tprecis.c H5Tstrpad.c H5Tvlen.c H5TB.c H5TS.c H5V.c H5Z.c \ + H5Distore.c H5Dmpio.c H5Dseq.c H5Dtest.c H5E.c H5F.c H5FD.c \ + H5FDcore.c H5FDfamily.c H5FDgass.c H5FDlog.c H5FDmpi.c H5FDmpio.c \ + H5FDmpiposix.c H5FDmulti.c H5FDsec2.c H5FDsrb.c H5FDstdio.c \ + H5FDstream.c H5FL.c H5FO.c H5FS.c H5G.c H5Gent.c H5Gnode.c H5Gstab.c \ + H5HG.c H5HL.c H5HP.c H5I.c H5MF.c H5MM.c H5O.c H5Oattr.c H5Obogus.c \ + H5Ocont.c H5Odtype.c H5Oefl.c H5Ofill.c H5Olayout.c H5Omtime.c \ + H5Oname.c H5Onull.c H5Opline.c H5Osdspace.c H5Oshared.c H5Ostab.c \ + H5P.c H5Pdcpl.c H5Pdxpl.c H5Pfapl.c H5Pfcpl.c H5Ptest.c H5R.c H5RC.c \ + H5RS.c H5S.c H5Sall.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c \ + H5Sselect.c H5Stest.c H5ST.c H5T.c H5Tarray.c H5Tbit.c H5Tcommit.c \ + H5Tcompound.c H5Tconv.c H5Tcset.c H5Tenum.c H5Tfields.c H5Tfixed.c \ + H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c H5Topaque.c H5Torder.c \ + H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvlen.c H5TB.c H5TS.c H5V.c H5Z.c \ H5Zdeflate.c H5Zfletcher32.c H5Zshuffle.c H5Zszip.c LIB_OBJ=$(LIB_SRC:.c=.lo) diff --git a/testpar/Dependencies b/testpar/Dependencies index 87e7af2..aab346b 100644 --- a/testpar/Dependencies +++ b/testpar/Dependencies @@ -40,9 +40,7 @@ t_mpi.lo: \ $(top_srcdir)/src/H5FDstdio.h \ $(top_srcdir)/src/H5FDstream.h \ $(top_srcdir)/src/H5private.h \ - $(top_srcdir)/src/H5MPprivate.h \ - $(top_srcdir)/test/testhdf5.h \ - $(top_srcdir)/src/H5Eprivate.h + $(top_srcdir)/src/H5MPprivate.h testphdf5.lo: \ $(srcdir)/testphdf5.c \ $(srcdir)/testphdf5.h \ @@ -82,9 +80,7 @@ testphdf5.lo: \ $(top_srcdir)/src/H5FDstdio.h \ $(top_srcdir)/src/H5FDstream.h \ $(top_srcdir)/src/H5private.h \ - $(top_srcdir)/src/H5MPprivate.h \ - $(top_srcdir)/test/testhdf5.h \ - $(top_srcdir)/src/H5Eprivate.h + $(top_srcdir)/src/H5MPprivate.h t_dset.lo: \ $(srcdir)/t_dset.c \ $(srcdir)/testphdf5.h \ @@ -124,9 +120,7 @@ t_dset.lo: \ $(top_srcdir)/src/H5FDstdio.h \ $(top_srcdir)/src/H5FDstream.h \ $(top_srcdir)/src/H5private.h \ - $(top_srcdir)/src/H5MPprivate.h \ - $(top_srcdir)/test/testhdf5.h \ - $(top_srcdir)/src/H5Eprivate.h + $(top_srcdir)/src/H5MPprivate.h t_file.lo: \ $(srcdir)/t_file.c \ $(srcdir)/testphdf5.h \ @@ -166,9 +160,7 @@ t_file.lo: \ $(top_srcdir)/src/H5FDstdio.h \ $(top_srcdir)/src/H5FDstream.h \ $(top_srcdir)/src/H5private.h \ - $(top_srcdir)/src/H5MPprivate.h \ - $(top_srcdir)/test/testhdf5.h \ - $(top_srcdir)/src/H5Eprivate.h + $(top_srcdir)/src/H5MPprivate.h t_mdset.lo: \ $(srcdir)/t_mdset.c \ $(srcdir)/testphdf5.h \ @@ -208,9 +200,7 @@ t_mdset.lo: \ $(top_srcdir)/src/H5FDstdio.h \ $(top_srcdir)/src/H5FDstream.h \ $(top_srcdir)/src/H5private.h \ - $(top_srcdir)/src/H5MPprivate.h \ - $(top_srcdir)/test/testhdf5.h \ - $(top_srcdir)/src/H5Eprivate.h + $(top_srcdir)/src/H5MPprivate.h t_ph5basic.lo: \ $(srcdir)/t_ph5basic.c \ $(srcdir)/testphdf5.h \ @@ -250,6 +240,57 @@ t_ph5basic.lo: \ $(top_srcdir)/src/H5FDstdio.h \ $(top_srcdir)/src/H5FDstream.h \ $(top_srcdir)/src/H5private.h \ + $(top_srcdir)/src/H5MPprivate.h +t_coll_chunk.lo: \ + $(srcdir)/t_coll_chunk.c \ + $(srcdir)/testphdf5.h \ + $(top_srcdir)/test/h5test.h \ + $(top_srcdir)/src/hdf5.h \ + $(top_srcdir)/src/H5public.h \ + $(top_builddir)/src/H5pubconf.h \ + $(top_srcdir)/src/H5api_adpt.h \ + $(top_srcdir)/src/H5Apublic.h \ + $(top_srcdir)/src/H5Ipublic.h \ + $(top_srcdir)/src/H5ACpublic.h \ + $(top_srcdir)/src/H5Bpublic.h \ + $(top_srcdir)/src/H5Dpublic.h \ + $(top_srcdir)/src/H5Epublic.h \ + $(top_srcdir)/src/H5Fpublic.h \ + $(top_srcdir)/src/H5FDpublic.h \ + $(top_srcdir)/src/H5Gpublic.h \ + $(top_srcdir)/src/H5Opublic.h \ + $(top_srcdir)/src/H5HGpublic.h \ + $(top_srcdir)/src/H5HLpublic.h \ + $(top_srcdir)/src/H5MMpublic.h \ + $(top_srcdir)/src/H5Ppublic.h \ + $(top_srcdir)/src/H5Zpublic.h \ + $(top_srcdir)/src/H5Rpublic.h \ + $(top_srcdir)/src/H5Spublic.h \ + $(top_srcdir)/src/H5Tpublic.h \ + $(top_srcdir)/src/H5FDcore.h \ + $(top_srcdir)/src/H5FDfamily.h \ + $(top_srcdir)/src/H5FDgass.h \ + $(top_srcdir)/src/H5FDlog.h \ + $(top_srcdir)/src/H5FDmpi.h \ + $(top_srcdir)/src/H5FDmpio.h \ + $(top_srcdir)/src/H5FDmpiposix.h \ + $(top_srcdir)/src/H5FDmulti.h \ + $(top_srcdir)/src/H5FDsec2.h \ + $(top_srcdir)/src/H5FDsrb.h \ + $(top_srcdir)/src/H5FDstdio.h \ + $(top_srcdir)/src/H5FDstream.h \ + $(top_srcdir)/src/H5private.h \ $(top_srcdir)/src/H5MPprivate.h \ - $(top_srcdir)/test/testhdf5.h \ - $(top_srcdir)/src/H5Eprivate.h + $(top_srcdir)/src/H5Dprivate.h \ + $(top_srcdir)/src/H5FDprivate.h \ + $(top_srcdir)/src/H5Oprivate.h \ + $(top_srcdir)/src/H5HGprivate.h \ + $(top_srcdir)/src/H5Fprivate.h \ + $(top_srcdir)/src/H5RCprivate.h \ + $(top_srcdir)/src/H5Tprivate.h \ + $(top_srcdir)/src/H5Gprivate.h \ + $(top_srcdir)/src/H5Bprivate.h \ + $(top_srcdir)/src/H5ACprivate.h \ + $(top_srcdir)/src/H5RSprivate.h \ + $(top_srcdir)/src/H5Rprivate.h \ + $(top_srcdir)/src/H5Zprivate.h diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 9c9c4f1..20fbb5d 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -43,7 +43,7 @@ MOSTLYCLEAN=MPItest.h5 Para*.h5 *.clog DISTCLEAN=go Makefile testph5.sh ## Test source files -TEST_PHDF5_SRC=testphdf5.c t_dset.c t_file.c t_mdset.c t_ph5basic.c +TEST_PHDF5_SRC=testphdf5.c t_dset.c t_file.c t_mdset.c t_ph5basic.c t_coll_chunk.c TEST_PHDF5_OBJ=$(TEST_PHDF5_SRC:.c=.lo) TEST_SRC=t_mpi.c $(TEST_PHDF5_SRC) TEST_OBJ=$(TEST_SRC:.c=.lo) diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c index 8c2373b..4b32bfa 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -189,13 +189,8 @@ coll_chunktest(char* filename,int chunk_factor,int select_factor) { VRFY((status>= 0),"MPIO collective transfer property succeeded"); #ifdef H5_HAVE_INSTRUMENTED_LIBRARY prop_value = H5D_XFER_COLL_CHUNK_DEF; -#ifdef H5_WANT_H5_V1_6_COMPAT status = H5Pinsert(xfer_plist,H5D_XFER_COLL_CHUNK_NAME,H5D_XFER_COLL_CHUNK_SIZE,&prop_value, NULL,NULL,NULL,NULL,NULL); -#else /* H5_WANT_H5_V1_6_COMPAT */ - status = H5Pinsert(xfer_plist,H5D_XFER_COLL_CHUNK_NAME,H5D_XFER_COLL_CHUNK_SIZE,&prop_value, - NULL,NULL,NULL,NULL,NULL,NULL); -#endif /* H5_WANT_H5_V1_6_COMPAT */ VRFY((status >= 0),"testing property list inserted succeeded"); #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ @@ -275,13 +270,8 @@ coll_chunktest(char* filename,int chunk_factor,int select_factor) { VRFY((status>= 0),"MPIO collective transfer property succeeded"); #ifdef H5_HAVE_INSTRUMENTED_LIBRARY prop_value = H5D_XFER_COLL_CHUNK_DEF; -#ifdef H5_WANT_H5_V1_6_COMPAT status = H5Pinsert(xfer_plist,H5D_XFER_COLL_CHUNK_NAME,H5D_XFER_COLL_CHUNK_SIZE,&prop_value, NULL,NULL,NULL,NULL,NULL); -#else /* H5_WANT_H5_V1_6_COMPAT */ - status = H5Pinsert(xfer_plist,H5D_XFER_COLL_CHUNK_NAME,H5D_XFER_COLL_CHUNK_SIZE,&prop_value, - NULL,NULL,NULL,NULL,NULL,NULL); -#endif /* H5_WANT_H5_V1_6_COMPAT */ VRFY((status >= 0),"testing property list inserted succeeded"); #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, file_dataspace, diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index 8c533aa..2eee9e8 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -44,7 +44,7 @@ int doindependent=1; /* independent test */ unsigned dobig=0; /* "big" dataset tests */ /* FILENAME and filenames must have the same number of names */ -const char *FILENAME[10]={ +const char *FILENAME[14]={ "ParaEg1", "ParaEg2", "ParaEg3", @@ -54,8 +54,12 @@ const char *FILENAME[10]={ "ParaIndividual", "ParaBig", "ParaFill", + "ParaCC1", + "ParaCC2", + "ParaCC3", + "ParaCC4", NULL}; -char filenames[10][PATH_MAX]; +char filenames[14][PATH_MAX]; hid_t fapl; /* file access property list */ #ifdef USE_PAUSE @@ -462,6 +466,15 @@ int main(int argc, char **argv) AddTest("fillvalue", dataset_fillvalue, NULL, "dataset fill value", filenames[8]); + AddTest("coll. chunked 1", coll_chunk1,NULL, + "simple collective chunk io",filenames[9]); + AddTest("coll. chunked 2", coll_chunk2,NULL, + "noncontiguous collective chunk io",filenames[10]); + AddTest("coll. chunked 3", coll_chunk3,NULL, + "multi-chunk collective chunk io",filenames[11]); + AddTest("coll. chunked 4", coll_chunk4,NULL, + "collective to independent chunk io",filenames[12]); + /* Display testing information */ TestInfo(argv[0]); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 405f002..359eb958 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -16,7 +16,6 @@ #define PHDF5TEST_H #include "h5test.h" -#include "testhdf5.h" #ifndef TRUE #define TRUE 1 @@ -113,6 +112,13 @@ #define FACC_MULTI 0x4 /* Multi File */ #define FACC_MPIPOSIX 0x8 /* MPIPOSIX */ +/*Constants for collective chunk definitions */ +#define SPACE_DIM1 24 +#define SPACE_DIM2 24 +#define BYROW_CONT 1 +#define BYROW_DISCONT 2 +#define DSET_COLLECTIVE_CHUNK_NAME "coll_chunk_name" + /* type definitions */ typedef struct H5Ptest_param_t /* holds extra test parameters */ { @@ -152,6 +158,10 @@ void extend_readAll(void); void compact_dataset(void); void big_dataset(void); void dataset_fillvalue(void); +void coll_chunk1(void); +void coll_chunk2(void); +void coll_chunk3(void); +void coll_chunk4(void); /* commonly used prototypes */ hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type, hbool_t use_gpfs); |