From 12e8b52917ad7ecb027506b5f6231c2f4e8a164e Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Fri, 12 Apr 2013 18:11:16 -0500 Subject: [svn-r23583] update the encoding/decoding part of the IOD plugin - complete overhaul to use FS proc macros - remove dead code Rename FS routines to HG and update configure magic and makefiles Many bug fixes --- Makefile.in | 2 +- c++/Makefile.in | 2 +- c++/examples/Makefile.in | 2 +- c++/src/Makefile.in | 2 +- c++/test/Makefile.in | 2 +- configure | 427 ++++--------- configure.ac | 124 ++-- examples/Makefile.am | 2 +- examples/Makefile.in | 4 +- examples/test_client.c | 56 +- fortran/Makefile.in | 2 +- fortran/examples/Makefile.in | 2 +- fortran/src/Makefile.in | 2 +- fortran/test/Makefile.in | 2 +- fortran/testpar/Makefile.in | 2 +- hl/Makefile.in | 2 +- hl/c++/Makefile.in | 2 +- hl/c++/examples/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/c++/test/Makefile.in | 2 +- hl/examples/Makefile.in | 2 +- hl/fortran/Makefile.in | 2 +- hl/fortran/examples/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/fortran/test/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- hl/test/Makefile.in | 2 +- hl/tools/Makefile.in | 2 +- hl/tools/gif2h5/Makefile.in | 2 +- perform/Makefile.in | 2 +- src/H5FF.c | 12 +- src/H5FFprivate.h | 1 - src/H5VLint.c | 37 +- src/H5VLiod.c | 426 +++++++------ src/H5VLiod.h | 13 +- src/H5VLiod_client.c | 109 ++-- src/H5VLiod_client.h | 57 +- src/H5VLiod_client_encdec.c | 1273 --------------------------------------- src/H5VLiod_common.h | 257 ++++---- src/H5VLiod_server.c | 559 ++++++++--------- src/H5VLiod_server.h | 59 +- src/H5VLiod_server_encdec.c | 1174 ------------------------------------ src/H5config.h.in | 30 +- src/Makefile.am | 2 +- src/Makefile.in | 80 ++- test/Makefile.in | 2 +- testpar/Makefile.in | 2 +- tools/Makefile.in | 2 +- tools/h5copy/Makefile.in | 2 +- tools/h5diff/Makefile.in | 2 +- tools/h5dump/Makefile.in | 2 +- tools/h5import/Makefile.in | 2 +- tools/h5jam/Makefile.in | 2 +- tools/h5ls/Makefile.in | 2 +- tools/h5repack/Makefile.in | 2 +- tools/h5stat/Makefile.in | 2 +- tools/lib/Makefile.in | 2 +- tools/misc/Makefile.in | 2 +- 58 files changed, 956 insertions(+), 3822 deletions(-) delete mode 100644 src/H5VLiod_client_encdec.c delete mode 100644 src/H5VLiod_server_encdec.c diff --git a/Makefile.in b/Makefile.in index 4f4e6bb..cf8c85a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -295,7 +295,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/c++/Makefile.in b/c++/Makefile.in index d225875..ebb2214 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -260,7 +260,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index ad240a4..bdbd0c0 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -227,7 +227,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 0ba836f..1812bee 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -299,7 +299,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 58a04b9..3fa23b0 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -260,7 +260,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/configure b/configure index f0127b4..81a672f 100755 --- a/configure +++ b/configure @@ -690,7 +690,7 @@ LL_PATH USE_FILTER_SZIP USE_FILTER_DEFLATE MYIOD_LIBS -MYSHIPPER_LIBS +MYMERCURY_LIBS MYAXE_LIBS AM_MAKEFLAGS LT_STATIC_EXEC @@ -909,7 +909,7 @@ enable_largefile with_fnord with_dmalloc with_axe -with_shipper +with_mercury with_iod with_zlib with_szlib @@ -1669,7 +1669,7 @@ Optional Packages: --with-dmalloc=DIR Use dmalloc memory debugging aid [default=no] --with-axe=DIR Use axe [default=no] - --with-shipper=DIR Use shipper [default=no] + --with-mercury=DIR Use mercury [default=no] --with-iod=DIR Use iod [default=no] --with-zlib=DIR Use zlib library for external deflate I/O filter [default=yes] @@ -25690,15 +25690,12 @@ fi esac ## ---------------------------------------------------------------------- -## Is the shipper present? It has a header file `SHIPPER.h' and a library -## `-lshipper' and their locations might be specified with the `--with-shipper' -## command-line switch. The value is an include path and/or a library path. -## If the library path is specified then it must be preceded by a comma. +## Is the mercury library present? ## -# Check whether --with-shipper was given. -if test "${with_shipper+set}" = set; then : - withval=$with_shipper; +# Check whether --with-mercury was given. +if test "${with_mercury+set}" = set; then : + withval=$with_mercury; else withval=no fi @@ -25706,150 +25703,74 @@ fi case $withval in yes) - HAVE_SHIPPER="yes" - for ac_header in function_shipper.h + HAVE_MERCURY="yes" + for ac_header in mercury.h do : - ac_fn_c_check_header_mongrel "$LINENO" "function_shipper.h" "ac_cv_header_function_shipper_h" "$ac_includes_default" -if test "x$ac_cv_header_function_shipper_h" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "mercury.h" "ac_cv_header_mercury_h" "$ac_includes_default" +if test "x$ac_cv_header_mercury_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_FUNCTION_SHIPPER_H 1 +#define HAVE_MERCURY_H 1 _ACEOF fi done - for ac_header in function_shipper_handler.h + for ac_header in mercury_handler.h do : - ac_fn_c_check_header_mongrel "$LINENO" "function_shipper_handler.h" "ac_cv_header_function_shipper_handler_h" "$ac_includes_default" -if test "x$ac_cv_header_function_shipper_handler_h" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "mercury_handler.h" "ac_cv_header_mercury_handler_h" "$ac_includes_default" +if test "x$ac_cv_header_mercury_handler_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_FUNCTION_SHIPPER_HANDLER_H 1 +#define HAVE_MERCURY_HANDLER_H 1 _ACEOF fi done - for ac_header in network_abstraction.h + for ac_header in mercury_proc.h do : - ac_fn_c_check_header_mongrel "$LINENO" "network_abstraction.h" "ac_cv_header_network_abstraction_h" "$ac_includes_default" -if test "x$ac_cv_header_network_abstraction_h" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "mercury_proc.h" "ac_cv_header_mercury_proc_h" "$ac_includes_default" +if test "x$ac_cv_header_mercury_proc_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_NETWORK_ABSTRACTION_H 1 +#define HAVE_MERCURY_PROC_H 1 _ACEOF fi done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for na_finalize in -liofsl_shipper_na" >&5 -$as_echo_n "checking for na_finalize in -liofsl_shipper_na... " >&6; } -if ${ac_cv_lib_iofsl_shipper_na_na_finalize+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-liofsl_shipper_na $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char na_finalize (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return na_finalize (); - ; - return 0; -} + for ac_header in mercury_bulk.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "mercury_bulk.h" "ac_cv_header_mercury_bulk_h" "$ac_includes_default" +if test "x$ac_cv_header_mercury_bulk_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MERCURY_BULK_H 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_iofsl_shipper_na_na_finalize=yes -else - ac_cv_lib_iofsl_shipper_na_na_finalize=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iofsl_shipper_na_na_finalize" >&5 -$as_echo "$ac_cv_lib_iofsl_shipper_na_na_finalize" >&6; } -if test "x$ac_cv_lib_iofsl_shipper_na_na_finalize" = xyes; then : - MYSHIPPER_LIBS="-liofsl_shipper_fs -liofsl_shipper_na -liofsl_shipper_bds" -else - unset HAVE_SHIPPER + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bds_init in -liofsl_shipper_bds" >&5 -$as_echo_n "checking for bds_init in -liofsl_shipper_bds... " >&6; } -if ${ac_cv_lib_iofsl_shipper_bds_bds_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-liofsl_shipper_bds $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +done -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char bds_init (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return bds_init (); - ; - return 0; -} + for ac_header in na.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "na.h" "ac_cv_header_na_h" "$ac_includes_default" +if test "x$ac_cv_header_na_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NA_H 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_iofsl_shipper_bds_bds_init=yes -else - ac_cv_lib_iofsl_shipper_bds_bds_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iofsl_shipper_bds_bds_init" >&5 -$as_echo "$ac_cv_lib_iofsl_shipper_bds_bds_init" >&6; } -if test "x$ac_cv_lib_iofsl_shipper_bds_bds_init" = xyes; then : - MYSHIPPER_LIBS="-liofsl_shipper_fs -liofsl_shipper_na -liofsl_shipper_bds" -else - unset HAVE_SHIPPER + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fs_init in -liofsl_shipper_fs" >&5 -$as_echo_n "checking for fs_init in -liofsl_shipper_fs... " >&6; } -if ${ac_cv_lib_iofsl_shipper_fs_fs_init+:} false; then : +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG_Init in -lmercury" >&5 +$as_echo_n "checking for HG_Init in -lmercury... " >&6; } +if ${ac_cv_lib_mercury_HG_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-liofsl_shipper_fs $LIBS" +LIBS="-lmercury $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -25859,7 +25780,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char fs_init (); +char HG_Init (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -25871,62 +25792,62 @@ char fs_init (); int main () { -return fs_init (); +return HG_Init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_iofsl_shipper_fs_fs_init=yes + ac_cv_lib_mercury_HG_Init=yes else - ac_cv_lib_iofsl_shipper_fs_fs_init=no + ac_cv_lib_mercury_HG_Init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iofsl_shipper_fs_fs_init" >&5 -$as_echo "$ac_cv_lib_iofsl_shipper_fs_fs_init" >&6; } -if test "x$ac_cv_lib_iofsl_shipper_fs_fs_init" = xyes; then : - MYSHIPPER_LIBS="-liofsl_shipper_fs -liofsl_shipper_na -liofsl_shipper_bds" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mercury_HG_Init" >&5 +$as_echo "$ac_cv_lib_mercury_HG_Init" >&6; } +if test "x$ac_cv_lib_mercury_HG_Init" = xyes; then : + MYMERCURY_LIBS='-lmercury' else - unset HAVE_SHIPPER + unset HAVE_MERCURY fi - if test -z "$HAVE_SHIPPER" -a -n "$HDF5_CONFIG_ABORT"; then - as_fn_error $? "couldn't find shipper library" "$LINENO" 5 + if test -z "$HAVE_MERCURY" -a -n "$HDF5_CONFIG_ABORT"; then + as_fn_error $? "couldn't find mercury library" "$LINENO" 5 fi ;; no) - HAVE_SHIPPER="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shipper library" >&5 -$as_echo_n "checking for shipper library... " >&6; } + HAVE_MERCURY="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mercury library" >&5 +$as_echo_n "checking for mercury library... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 $as_echo "suppressed" >&6; } ;; *) - HAVE_SHIPPER="yes" + HAVE_MERCURY="yes" case "$withval" in *,*) - shipper_inc="`echo $withval |cut -f1 -d,`" - shipper_lib="`echo $withval |cut -f2 -d, -s`" + mercury_inc="`echo $withval |cut -f1 -d,`" + mercury_lib="`echo $withval |cut -f2 -d, -s`" ;; *) if test -n "$withval"; then - shipper_inc="$withval/include" - shipper_lib="$withval/lib" + mercury_inc="$withval/include" + mercury_lib="$withval/lib" fi ;; esac ## Trying to include -I/usr/include and -L/usr/lib is redundant and ## can mess some compilers up. - if test "X$shipper_inc" = "X/usr/include"; then - shipper_inc="" + if test "X$mercury_inc" = "X/usr/include"; then + mercury_inc="" fi - if test "X$shipper_lib" = "X/usr/lib"; then - shipper_lib="" + if test "X$mercury_lib" = "X/usr/lib"; then + mercury_lib="" fi saved_CPPFLAGS="$CPPFLAGS" @@ -25934,17 +25855,17 @@ $as_echo "suppressed" >&6; } saved_LDFLAGS="$LDFLAGS" saved_AM_LDFLAGS="$AM_LDFLAGS" - if test -n "$shipper_inc"; then - CPPFLAGS="$CPPFLAGS -I$shipper_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$shipper_inc" + if test -n "$mercury_inc"; then + CPPFLAGS="$CPPFLAGS -I$mercury_inc" + AM_CPPFLAGS="$AM_CPPFLAGS -I$mercury_inc" fi - for ac_header in function_shipper.h + for ac_header in mercury.h do : - ac_fn_c_check_header_mongrel "$LINENO" "function_shipper.h" "ac_cv_header_function_shipper_h" "$ac_includes_default" -if test "x$ac_cv_header_function_shipper_h" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "mercury.h" "ac_cv_header_mercury_h" "$ac_includes_default" +if test "x$ac_cv_header_mercury_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_FUNCTION_SHIPPER_H 1 +#define HAVE_MERCURY_H 1 _ACEOF else @@ -25953,12 +25874,12 @@ fi done - for ac_header in function_shipper_handler.h + for ac_header in mercury_handler.h do : - ac_fn_c_check_header_mongrel "$LINENO" "function_shipper_handler.h" "ac_cv_header_function_shipper_handler_h" "$ac_includes_default" -if test "x$ac_cv_header_function_shipper_handler_h" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "mercury_handler.h" "ac_cv_header_mercury_handler_h" "$ac_includes_default" +if test "x$ac_cv_header_mercury_handler_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_FUNCTION_SHIPPER_HANDLER_H 1 +#define HAVE_MERCURY_HANDLER_H 1 _ACEOF else @@ -25967,12 +25888,12 @@ fi done - for ac_header in network_abstraction.h + for ac_header in mercury_proc.h do : - ac_fn_c_check_header_mongrel "$LINENO" "network_abstraction.h" "ac_cv_header_network_abstraction_h" "$ac_includes_default" -if test "x$ac_cv_header_network_abstraction_h" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "mercury_proc.h" "ac_cv_header_mercury_proc_h" "$ac_includes_default" +if test "x$ac_cv_header_mercury_proc_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_NETWORK_ABSTRACTION_H 1 +#define HAVE_MERCURY_PROC_H 1 _ACEOF else @@ -25981,129 +25902,47 @@ fi done - - if test -n "$shipper_lib"; then - LDFLAGS="$LDFLAGS -L$shipper_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$shipper_lib" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for na_finalize in -liofsl_shipper_na" >&5 -$as_echo_n "checking for na_finalize in -liofsl_shipper_na... " >&6; } -if ${ac_cv_lib_iofsl_shipper_na_na_finalize+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-liofsl_shipper_na -liofsl_shipper_fs -liofsl_shipper_bds $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char na_finalize (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return na_finalize (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_iofsl_shipper_na_na_finalize=yes -else - ac_cv_lib_iofsl_shipper_na_na_finalize=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iofsl_shipper_na_na_finalize" >&5 -$as_echo "$ac_cv_lib_iofsl_shipper_na_na_finalize" >&6; } -if test "x$ac_cv_lib_iofsl_shipper_na_na_finalize" = xyes; then : + for ac_header in mercury_bulk.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "mercury_bulk.h" "ac_cv_header_mercury_bulk_h" "$ac_includes_default" +if test "x$ac_cv_header_mercury_bulk_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LIBIOFSL_SHIPPER_NA 1 +#define HAVE_MERCURY_BULK_H 1 _ACEOF - LIBS="-liofsl_shipper_na $LIBS" - else - LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SHIPPER + CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bds_init in -liofsl_shipper_bds" >&5 -$as_echo_n "checking for bds_init in -liofsl_shipper_bds... " >&6; } -if ${ac_cv_lib_iofsl_shipper_bds_bds_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-liofsl_shipper_bds -liofsl_shipper_fs -liofsl_shipper_na $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +done -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char bds_init (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return bds_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_iofsl_shipper_bds_bds_init=yes -else - ac_cv_lib_iofsl_shipper_bds_bds_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iofsl_shipper_bds_bds_init" >&5 -$as_echo "$ac_cv_lib_iofsl_shipper_bds_bds_init" >&6; } -if test "x$ac_cv_lib_iofsl_shipper_bds_bds_init" = xyes; then : + for ac_header in na.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "na.h" "ac_cv_header_na_h" "$ac_includes_default" +if test "x$ac_cv_header_na_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LIBIOFSL_SHIPPER_BDS 1 +#define HAVE_NA_H 1 _ACEOF - LIBS="-liofsl_shipper_bds $LIBS" - else - LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SHIPPER + CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fs_init in -liofsl_shipper_fs" >&5 -$as_echo_n "checking for fs_init in -liofsl_shipper_fs... " >&6; } -if ${ac_cv_lib_iofsl_shipper_fs_fs_init+:} false; then : +done + + + if test -n "$mercury_lib"; then + LDFLAGS="$LDFLAGS -L$mercury_lib" + AM_LDFLAGS="$AM_LDFLAGS -L$mercury_lib" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG_Init in -lmercury" >&5 +$as_echo_n "checking for HG_Init in -lmercury... " >&6; } +if ${ac_cv_lib_mercury_HG_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-liofsl_shipper_fs -liofsl_shipper_na -liofsl_shipper_bds $LIBS" +LIBS="-lmercury $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -26113,7 +25952,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char fs_init (); +char HG_Init (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -26125,36 +25964,36 @@ char fs_init (); int main () { -return fs_init (); +return HG_Init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_iofsl_shipper_fs_fs_init=yes + ac_cv_lib_mercury_HG_Init=yes else - ac_cv_lib_iofsl_shipper_fs_fs_init=no + ac_cv_lib_mercury_HG_Init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iofsl_shipper_fs_fs_init" >&5 -$as_echo "$ac_cv_lib_iofsl_shipper_fs_fs_init" >&6; } -if test "x$ac_cv_lib_iofsl_shipper_fs_fs_init" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mercury_HG_Init" >&5 +$as_echo "$ac_cv_lib_mercury_HG_Init" >&6; } +if test "x$ac_cv_lib_mercury_HG_Init" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LIBIOFSL_SHIPPER_FS 1 +#define HAVE_LIBMERCURY 1 _ACEOF - LIBS="-liofsl_shipper_fs $LIBS" + LIBS="-lmercury $LIBS" else - LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SHIPPER + LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_MERCURY fi - if test -z "$HAVE_SHIPPER" -a -n "$HDF5_CONFIG_ABORT"; then - as_fn_error $? "couldn't find shipper library" "$LINENO" 5 + if test -z "$HAVE_MERCURY" -a -n "$HDF5_CONFIG_ABORT"; then + as_fn_error $? "couldn't find mercury library" "$LINENO" 5 fi ;; esac @@ -28801,8 +28640,8 @@ $as_echo_n "checking for EFF support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include - #include #include - #include + #include #include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -28814,8 +28653,8 @@ $as_echo_n "checking for EFF support... " >&6; } int main () { -AXEend_try(); iod_finalize(NULL, NULL); bds_finalize(); - fs_handler_finalize(); +AXEend_try(); iod_finalize(NULL, NULL); HG_Bulk_finalize(); + HG_Handler_finalize(); ; return 0; } @@ -28838,9 +28677,6 @@ fi done -# AC_MSG_RESULT([yes]) -# AC_DEFINE([HAVE_EFF], [1], -# [Define if we have IOD VOL plugin support.]) ;; X-no|*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -28856,29 +28692,6 @@ else fi -#AC_SUBST([EFF]) -#AC_MSG_CHECKING([whether to build the IOD VOL plugin]) -#AC_ARG_ENABLE([eff], -# [AS_HELP_STRING([--enable-eff], -# [Build the IOD VOL plugin. Default=no.])], -# [EFF=$enableval], -# [EFF=NO]) -#AM_CONDITIONAL([BUILD_EFF_CONDITIONAL], [test -n "$EFF"]) -# -#case "X-$EFF" in -# *) -# EFF=yes -# AC_MSG_RESULT([yes]) -# AC_DEFINE([HAVE_EFF], [1], -# [Define if we have IOD VOL plugin support.]) -# ;; -# X-no) -# EFF=no -# AC_MSG_RESULT([no]) -# ;; -# -#esac - ## ---------------------------------------------------------------------- ## Check if they would like to use a memory checking tool (like valgrind's ## 'memcheck' tool, or Rational Purify, etc) and the library should be diff --git a/configure.ac b/configure.ac index 3f8ee38..464e739 100644 --- a/configure.ac +++ b/configure.ac @@ -1758,57 +1758,54 @@ case $withval in esac ## ---------------------------------------------------------------------- -## Is the shipper present? It has a header file `SHIPPER.h' and a library -## `-lshipper' and their locations might be specified with the `--with-shipper' -## command-line switch. The value is an include path and/or a library path. -## If the library path is specified then it must be preceded by a comma. +## Is the mercury library present? ## -AC_ARG_WITH([shipper], - [AS_HELP_STRING([--with-shipper=DIR], - [Use shipper [default=no]])],, +AC_ARG_WITH([mercury], + [AS_HELP_STRING([--with-mercury=DIR], + [Use mercury [default=no]])],, [withval=no]) case $withval in yes) - HAVE_SHIPPER="yes" - AC_CHECK_HEADERS([function_shipper.h]) - AC_CHECK_HEADERS([function_shipper_handler.h]) - AC_CHECK_HEADERS([network_abstraction.h]) - AC_CHECK_LIB([iofsl_shipper_na], [na_finalize], [MYSHIPPER_LIBS="-liofsl_shipper_fs -liofsl_shipper_na -liofsl_shipper_bds"], [unset HAVE_SHIPPER]) - AC_CHECK_LIB([iofsl_shipper_bds], [bds_init], [MYSHIPPER_LIBS="-liofsl_shipper_fs -liofsl_shipper_na -liofsl_shipper_bds"], [unset HAVE_SHIPPER]) - AC_CHECK_LIB([iofsl_shipper_fs], [fs_init], [MYSHIPPER_LIBS="-liofsl_shipper_fs -liofsl_shipper_na -liofsl_shipper_bds"], [unset HAVE_SHIPPER]) - AC_SUBST([MYSHIPPER_LIBS]) - if test -z "$HAVE_SHIPPER" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR([couldn't find shipper library]) + HAVE_MERCURY="yes" + AC_CHECK_HEADERS([mercury.h]) + AC_CHECK_HEADERS([mercury_handler.h]) + AC_CHECK_HEADERS([mercury_proc.h]) + AC_CHECK_HEADERS([mercury_bulk.h]) + AC_CHECK_HEADERS([na.h]) + AC_CHECK_LIB([mercury], [HG_Init], [MYMERCURY_LIBS='-lmercury'], [unset HAVE_MERCURY]) + AC_SUBST([MYMERCURY_LIBS]) + if test -z "$HAVE_MERCURY" -a -n "$HDF5_CONFIG_ABORT"; then + AC_MSG_ERROR([couldn't find mercury library]) fi ;; no) - HAVE_SHIPPER="no" - AC_MSG_CHECKING([for shipper library]) + HAVE_MERCURY="no" + AC_MSG_CHECKING([for mercury library]) AC_MSG_RESULT([suppressed]) ;; *) - HAVE_SHIPPER="yes" + HAVE_MERCURY="yes" case "$withval" in *,*) - shipper_inc="`echo $withval |cut -f1 -d,`" - shipper_lib="`echo $withval |cut -f2 -d, -s`" + mercury_inc="`echo $withval |cut -f1 -d,`" + mercury_lib="`echo $withval |cut -f2 -d, -s`" ;; *) if test -n "$withval"; then - shipper_inc="$withval/include" - shipper_lib="$withval/lib" + mercury_inc="$withval/include" + mercury_lib="$withval/lib" fi ;; esac ## Trying to include -I/usr/include and -L/usr/lib is redundant and ## can mess some compilers up. - if test "X$shipper_inc" = "X/usr/include"; then - shipper_inc="" + if test "X$mercury_inc" = "X/usr/include"; then + mercury_inc="" fi - if test "X$shipper_lib" = "X/usr/lib"; then - shipper_lib="" + if test "X$mercury_lib" = "X/usr/lib"; then + mercury_lib="" fi saved_CPPFLAGS="$CPPFLAGS" @@ -1816,32 +1813,27 @@ case $withval in saved_LDFLAGS="$LDFLAGS" saved_AM_LDFLAGS="$AM_LDFLAGS" - if test -n "$shipper_inc"; then - CPPFLAGS="$CPPFLAGS -I$shipper_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$shipper_inc" + if test -n "$mercury_inc"; then + CPPFLAGS="$CPPFLAGS -I$mercury_inc" + AM_CPPFLAGS="$AM_CPPFLAGS -I$mercury_inc" fi - AC_CHECK_HEADERS([function_shipper.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) - AC_CHECK_HEADERS([function_shipper_handler.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) - AC_CHECK_HEADERS([network_abstraction.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) + AC_CHECK_HEADERS([mercury.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) + AC_CHECK_HEADERS([mercury_handler.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) + AC_CHECK_HEADERS([mercury_proc.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) + AC_CHECK_HEADERS([mercury_bulk.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) + AC_CHECK_HEADERS([na.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) - if test -n "$shipper_lib"; then - LDFLAGS="$LDFLAGS -L$shipper_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$shipper_lib" + if test -n "$mercury_lib"; then + LDFLAGS="$LDFLAGS -L$mercury_lib" + AM_LDFLAGS="$AM_LDFLAGS -L$mercury_lib" fi - AC_CHECK_LIB([iofsl_shipper_na], [na_finalize],, - [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SHIPPER], - [-liofsl_shipper_fs -liofsl_shipper_bds]) - AC_CHECK_LIB([iofsl_shipper_bds], [bds_init],, - [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SHIPPER], - [-liofsl_shipper_fs -liofsl_shipper_na]) - AC_CHECK_LIB([iofsl_shipper_fs], [fs_init],, - [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SHIPPER], - [-liofsl_shipper_na -liofsl_shipper_bds]) - - if test -z "$HAVE_SHIPPER" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR([couldn't find shipper library]) + AC_CHECK_LIB([mercury], [HG_Init],, + [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_MERCURY]) + + if test -z "$HAVE_MERCURY" -a -n "$HDF5_CONFIG_ABORT"; then + AC_MSG_ERROR([couldn't find mercury library]) fi ;; esac @@ -2853,10 +2845,10 @@ case "X-$enableval" in AC_CHECK_HEADERS([AXE.h iod_api.h iod_types.h function_shipper.h function_shipper_handler.h network_abstraction.h], [AC_MSG_CHECKING([for EFF support]) AC_TRY_COMPILE([#include #include #include - #include #include - #include ], - [AXEend_try(); iod_finalize(NULL, NULL); bds_finalize(); - fs_handler_finalize();], + #include #include + #include ], + [AXEend_try(); iod_finalize(NULL, NULL); HG_Bulk_finalize(); + HG_Handler_finalize();], [AC_DEFINE([HAVE_EFF], [1], [Define if we have EFF VOL plugins support]) AC_MSG_RESULT([yes]) @@ -2864,9 +2856,6 @@ case "X-$enableval" in [AC_MSG_RESULT([no]) EFF="no"])]) -# AC_MSG_RESULT([yes]) -# AC_DEFINE([HAVE_EFF], [1], -# [Define if we have IOD VOL plugin support.]) ;; X-no|*) AC_MSG_RESULT([no]) @@ -2874,29 +2863,6 @@ case "X-$enableval" in esac AM_CONDITIONAL([BUILD_EFF_CONDITIONAL], [test "X-$EFF" = "X-yes"]) -#AC_SUBST([EFF]) -#AC_MSG_CHECKING([whether to build the IOD VOL plugin]) -#AC_ARG_ENABLE([eff], -# [AS_HELP_STRING([--enable-eff], -# [Build the IOD VOL plugin. Default=no.])], -# [EFF=$enableval], -# [EFF=NO]) -#AM_CONDITIONAL([BUILD_EFF_CONDITIONAL], [test -n "$EFF"]) -# -#case "X-$EFF" in -# *) -# EFF=yes -# AC_MSG_RESULT([yes]) -# AC_DEFINE([HAVE_EFF], [1], -# [Define if we have IOD VOL plugin support.]) -# ;; -# X-no) -# EFF=no -# AC_MSG_RESULT([no]) -# ;; -# -#esac - ## ---------------------------------------------------------------------- ## Check if they would like to use a memory checking tool (like valgrind's ## 'memcheck' tool, or Rational Purify, etc) and the library should be diff --git a/examples/Makefile.am b/examples/Makefile.am index bbcc690..290e89f 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -29,7 +29,7 @@ endif if BUILD_EFF_CONDITIONAL INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/test - LDADD = $(LIBH5TEST) $(LIBHDF5) $(MYAXE_LIBS) $(MYIOD_LIBS) $(MYSHIPPER_LIBS) + LDADD = $(LIBH5TEST) $(LIBHDF5) $(MYAXE_LIBS) $(MYIOD_LIBS) $(MYMERCURY_LIBS) EXAMPLE_PROG_EFF = test_server test_client endif diff --git a/examples/Makefile.in b/examples/Makefile.in index 358ab99..246926b 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -227,7 +227,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -389,7 +389,7 @@ TRACE = perl $(top_srcdir)/bin/trace CHECK_CLEANFILES = *.chkexe *.chklog *.clog $(EXTLINK_DIRS) *.h5 @BUILD_EFF_CONDITIONAL_TRUE@INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test @BUILD_PARALLEL_CONDITIONAL_TRUE@INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -@BUILD_EFF_CONDITIONAL_TRUE@LDADD = $(LIBH5TEST) $(LIBHDF5) $(MYAXE_LIBS) $(MYIOD_LIBS) $(MYSHIPPER_LIBS) +@BUILD_EFF_CONDITIONAL_TRUE@LDADD = $(LIBH5TEST) $(LIBHDF5) $(MYAXE_LIBS) $(MYIOD_LIBS) $(MYMERCURY_LIBS) @BUILD_PARALLEL_CONDITIONAL_TRUE@LDADD = $(LIBH5TEST) $(LIBHDF5) @BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example @BUILD_EFF_CONDITIONAL_TRUE@EXAMPLE_PROG_EFF = test_server test_client diff --git a/examples/test_client.c b/examples/test_client.c index 4a8f93e..76eee63 100644 --- a/examples/test_client.c +++ b/examples/test_client.c @@ -27,8 +27,9 @@ int main(int argc, char **argv) { hid_t event_q; H5_status_t *status = NULL; int num_requests = 0; - H5_request_t req1, req2, req3, req4, req5, req6, req7, req8; - H5_status_t status1, status2, status3, status4, status5, status6, status7, status8; + hsize_t extent = 20; + H5_request_t req1; + H5_status_t status1; MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); if(MPI_THREAD_MULTIPLE != provided) { @@ -183,7 +184,7 @@ int main(int argc, char **argv) { /* Pop head request from the event queue to test it next. This is the request that belongs to the previous H5Dread_ff call. */ if(H5EQpop(event_q, &req1) < 0) - exit(1); + exit(1); /* Test if the Read operation has completed. Since it is asynchronous, It is most likely that the operation is pending */ @@ -210,15 +211,12 @@ int main(int argc, char **argv) { 0, event_q); H5Pclose(dxpl_id); - H5Sclose(dataspaceId); - /* Issue other operations to query certain metadata values or update previously created objects */ { unsigned intent; char temp_name[50]; hid_t plist_id; - hsize_t temp = 20; H5Fget_intent(file_id, &intent); fprintf(stderr, "Intent %d %d\n", intent, H5F_ACC_RDWR); @@ -236,30 +234,44 @@ int main(int argc, char **argv) { /* change the dataset dimensions for Dataset D1. This is asynchronous, but internally there is a built in "wait_some" on operations pending on that dataset */ - H5Dset_extent_ff(did1, &temp, event_q); + assert(H5Dset_extent_ff(did1, &extent, event_q) == 0); } /* closing did1 acts as a wait_some on all pending requests that are issued on did1 (the H5Dwrite and 2 H5Dreads above). This is asynchronous. */ - H5Dclose_ff(did1, event_q); + assert(H5Dclose_ff(did1, event_q) == 0); /* closing did2 acts as a wait_some on all pending requests that are issued on did2 (the H5Dwrite above). This is asynchronous. */ - H5Dclose_ff(did2, event_q); + assert(H5Dclose_ff(did2, event_q) == 0); /* closing did3 acts as a wait_some on all pending requests that are issued on did3 (the H5Dwrite above). This is asynchronous. */ - H5Dclose_ff(did3, event_q); + assert(H5Dclose_ff(did3, event_q) == 0); - H5Gclose_ff(gid1, event_q); + H5Sclose(dataspaceId); + + assert(H5Gclose_ff(gid1, event_q) == 0); + if(my_rank == 4) + sleep(5); /* flush all the contents of file to disk. This is asynchronous. */ - H5Fflush_ff(file_id, H5F_SCOPE_GLOBAL, event_q); + assert(H5Fflush_ff(file_id, H5F_SCOPE_GLOBAL, event_q) == 0); + + /* If the read request did no complete earlier when we tested it, Wait on it now. + We have to do this since we popped it earlier from the event queue */ + if(H5AO_PENDING == status1) { + assert(H5AOwait(req1, &status1) == 0); + assert (status1); + } + else + assert(H5AO_SUCCEEDED == status1); + /* closing the container also acts as a wait all on all pending requests on the container. */ - H5Fclose_ff(file_id, event_q); - + assert(H5Fclose_ff(file_id, event_q) == 0); + fprintf(stderr, "%d: done fclose\n", my_rank); H5EQwait(event_q, &num_requests, &status); fprintf(stderr, "%d requests in event queue. Expecting 14. Completions: ", num_requests); for(i=0 ; inext = NULL; request->vol_plugin = vol_plugin; } - - /* if the VOL class does not implement a specific dataset close - callback, try the object close */ - if(NULL == vol_plugin->cls->dataset_cls.close){ - ; -#if 0 - if(H5VL_object_close(id, dxpl_id, dxpl_id, event_q) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close object") -#endif - } - else { - if((ret_value = (vol_plugin->cls->dataset_cls.close)(dset, dxpl_id, req)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "close failed") - } + if((ret_value = (vol_plugin->cls->dataset_cls.close)(dset, dxpl_id, req)) < 0) + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "close failed") if(request && *req) { if(H5EQinsert(eq_id, request) < 0) @@ -1597,7 +1585,7 @@ H5VL_file_close(void *file, H5VL_t *vol_plugin, hid_t dxpl_id, hid_t eq_id) void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_NOINIT if(eq_id != H5_EVENT_QUEUE_NULL) { /* create the private request */ @@ -1800,7 +1788,7 @@ H5VL_group_close(void *grp, H5VL_t *vol_plugin, hid_t dxpl_id, hid_t eq_id) void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_NOINIT if(eq_id != H5_EVENT_QUEUE_NULL) { /* create the private request */ @@ -1812,19 +1800,8 @@ H5VL_group_close(void *grp, H5VL_t *vol_plugin, hid_t dxpl_id, hid_t eq_id) request->vol_plugin = vol_plugin; } - /* if the VOL class does not implement a specific group close - callback, try the object close */ - if(NULL == vol_plugin->cls->group_cls.close) { - ; -#if 0 - if(H5VL_object_close(id, dxpl_id, event_q) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close object") -#endif - } - else { - if((ret_value = (vol_plugin->cls->group_cls.close)(grp, dxpl_id, req)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "close failed") - } + if((ret_value = (vol_plugin->cls->group_cls.close)(grp, dxpl_id, req)) < 0) + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "close failed") if(request && *req) { if(H5EQinsert(eq_id, request) < 0) diff --git a/src/H5VLiod.c b/src/H5VLiod.c index fc5ff01..6870795 100644 --- a/src/H5VLiod.c +++ b/src/H5VLiod.c @@ -38,21 +38,21 @@ #ifdef H5_HAVE_EFF /* function shipper IDs for different routines */ -static fs_id_t H5VL_EFF_INIT_ID; -static fs_id_t H5VL_EFF_FINALIZE_ID; -static fs_id_t H5VL_FILE_CREATE_ID; -static fs_id_t H5VL_FILE_OPEN_ID; -static fs_id_t H5VL_FILE_FLUSH_ID; -static fs_id_t H5VL_FILE_CLOSE_ID; -static fs_id_t H5VL_GROUP_CREATE_ID; -static fs_id_t H5VL_GROUP_OPEN_ID; -static fs_id_t H5VL_GROUP_CLOSE_ID; -static fs_id_t H5VL_DSET_CREATE_ID; -static fs_id_t H5VL_DSET_OPEN_ID; -static fs_id_t H5VL_DSET_READ_ID; -static fs_id_t H5VL_DSET_WRITE_ID; -static fs_id_t H5VL_DSET_SET_EXTENT_ID; -static fs_id_t H5VL_DSET_CLOSE_ID; +static hg_id_t H5VL_EFF_INIT_ID; +static hg_id_t H5VL_EFF_FINALIZE_ID; +static hg_id_t H5VL_FILE_CREATE_ID; +static hg_id_t H5VL_FILE_OPEN_ID; +static hg_id_t H5VL_FILE_FLUSH_ID; +static hg_id_t H5VL_FILE_CLOSE_ID; +static hg_id_t H5VL_GROUP_CREATE_ID; +static hg_id_t H5VL_GROUP_OPEN_ID; +static hg_id_t H5VL_GROUP_CLOSE_ID; +static hg_id_t H5VL_DSET_CREATE_ID; +static hg_id_t H5VL_DSET_OPEN_ID; +static hg_id_t H5VL_DSET_READ_ID; +static hg_id_t H5VL_DSET_WRITE_ID; +static hg_id_t H5VL_DSET_SET_EXTENT_ID; +static hg_id_t H5VL_DSET_CLOSE_ID; /* Prototypes */ static void *H5VL_iod_fapl_copy(const void *_old_fa); @@ -117,8 +117,6 @@ static herr_t H5VL_iod_object_copy(void *src_obj, H5VL_loc_params_t loc_params1, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req); static herr_t H5VL_iod_object_visit(void *obj, H5VL_loc_params_t loc_params, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t dxpl_id, void **req); -//static herr_t H5VL_iod_object_lookup(hid_t loc_id, H5VL_loc_type_t lookup_type, void **location, hid_t dxpl_id, void **req, va_list arguments); -//static herr_t H5VL_iod_object_free_loc(void *location, hid_t dxpl_id, void **req); static herr_t H5VL_iod_object_get(void *obj, H5VL_loc_params_t loc_params, H5VL_object_get_t get_type, hid_t dxpl_id, void **req, va_list arguments); static herr_t H5VL_iod_object_misc(void *obj, H5VL_loc_params_t loc_params, H5VL_object_misc_t misc_type, hid_t dxpl_id, void **req, va_list arguments); static herr_t H5VL_iod_object_optional(void *obj, H5VL_loc_params_t loc_params, H5VL_object_optional_t optional_type, hid_t dxpl_id, void **req, va_list arguments); @@ -139,7 +137,7 @@ H5FL_DEFINE(H5VL_iod_dset_t); static na_addr_t PEER; uint32_t write_checksum; -static na_network_class_t *network_class = NULL; +static na_class_t *network_class = NULL; static H5VL_class_t H5VL_iod_g = { IOD, @@ -279,7 +277,7 @@ EFF_init(MPI_Comm comm, MPI_Info info) { char mpi_port_name[MPI_MAX_PORT_NAME]; FILE *config; - fs_request_t fs_req; + hg_request_t hg_req; int num_procs; na_addr_t ion_target; herr_t ret_value = SUCCEED; @@ -292,54 +290,42 @@ EFF_init(MPI_Comm comm, MPI_Info info) fclose(config); } - network_class = na_mpi_init(NULL, 0); - if (S_SUCCESS != fs_init(network_class)) + network_class = NA_MPI_Init(NULL, 0); + if (HG_SUCCESS != HG_Init(network_class)) return FAIL; - if (S_SUCCESS != bds_init(network_class)) + if (HG_SUCCESS != HG_Bulk_init(network_class)) return FAIL; - if (S_SUCCESS != na_addr_lookup(network_class, mpi_port_name, &ion_target)) + if (HG_SUCCESS != NA_Addr_lookup(network_class, mpi_port_name, &ion_target)) return FAIL; PEER = ion_target; /* Register function and encoding/decoding functions */ - H5VL_EFF_INIT_ID = fs_register("eff_init", H5VL_iod_client_encode_eff_init, - H5VL_iod_client_decode_eff_init); - H5VL_EFF_FINALIZE_ID = fs_register("eff_finalize", NULL, - H5VL_iod_client_decode_eff_init); - H5VL_FILE_CREATE_ID = fs_register("file_create", H5VL_iod_client_encode_file_create, - H5VL_iod_client_decode_file_create); - H5VL_FILE_OPEN_ID = fs_register("file_open", H5VL_iod_client_encode_file_open, - H5VL_iod_client_decode_file_open); - H5VL_FILE_FLUSH_ID = fs_register("file_flush", H5VL_iod_client_encode_file_flush, - H5VL_iod_client_decode_file_flush); - H5VL_FILE_CLOSE_ID = fs_register("file_close", H5VL_iod_client_encode_file_close, - H5VL_iod_client_decode_file_close); - H5VL_GROUP_CREATE_ID = fs_register("group_create", H5VL_iod_client_encode_group_create, - H5VL_iod_client_decode_group_create); - H5VL_GROUP_OPEN_ID = fs_register("group_open", H5VL_iod_client_encode_group_open, - H5VL_iod_client_decode_group_open); - H5VL_GROUP_CLOSE_ID = fs_register("group_close", H5VL_iod_client_encode_group_close, - H5VL_iod_client_decode_group_close); - H5VL_DSET_CREATE_ID = fs_register("dset_create", H5VL_iod_client_encode_dset_create, - H5VL_iod_client_decode_dset_create); - H5VL_DSET_OPEN_ID = fs_register("dset_open", H5VL_iod_client_encode_dset_open, - H5VL_iod_client_decode_dset_open); - H5VL_DSET_READ_ID = fs_register("dset_read", H5VL_iod_client_encode_dset_io, - H5VL_iod_client_decode_dset_read); - H5VL_DSET_WRITE_ID = fs_register("dset_write", H5VL_iod_client_encode_dset_io, - H5VL_iod_client_decode_dset_write); - H5VL_DSET_SET_EXTENT_ID = fs_register("dset_set_extent", H5VL_iod_client_encode_dset_set_extent, - H5VL_iod_client_decode_dset_set_extent); - H5VL_DSET_CLOSE_ID = fs_register("dset_close", H5VL_iod_client_encode_dset_close, - H5VL_iod_client_decode_dset_close); + H5VL_EFF_INIT_ID = MERCURY_REGISTER("eff_init", eff_init_in_t, ret_t); + H5VL_EFF_FINALIZE_ID = MERCURY_REGISTER("eff_finalize", ret_t, ret_t); + + H5VL_FILE_CREATE_ID = MERCURY_REGISTER("file_create", file_create_in_t, file_create_out_t); + H5VL_FILE_OPEN_ID = MERCURY_REGISTER("file_open", file_open_in_t, file_open_out_t); + H5VL_FILE_FLUSH_ID = MERCURY_REGISTER("file_flush", file_flush_in_t, ret_t); + H5VL_FILE_CLOSE_ID = MERCURY_REGISTER("file_close", file_close_in_t, ret_t); + + H5VL_GROUP_CREATE_ID = MERCURY_REGISTER("group_create", group_create_in_t, group_create_out_t); + H5VL_GROUP_OPEN_ID = MERCURY_REGISTER("group_open", group_open_in_t, group_open_out_t); + H5VL_GROUP_CLOSE_ID = MERCURY_REGISTER("group_close", group_close_in_t, ret_t); + + H5VL_DSET_CREATE_ID = MERCURY_REGISTER("dset_create", dset_create_in_t, dset_create_out_t); + H5VL_DSET_OPEN_ID = MERCURY_REGISTER("dset_open", dset_open_in_t, dset_open_out_t); + H5VL_DSET_READ_ID = MERCURY_REGISTER("dset_read", dset_io_in_t, dset_read_out_t); + H5VL_DSET_WRITE_ID = MERCURY_REGISTER("dset_write", dset_io_in_t, ret_t); + H5VL_DSET_SET_EXTENT_ID = MERCURY_REGISTER("dset_set_extent", + dset_set_extent_in_t, ret_t); + H5VL_DSET_CLOSE_ID = MERCURY_REGISTER("dset_close", dset_close_in_t, ret_t); /* forward the init call to the IONs */ - if(fs_forward(PEER, H5VL_EFF_INIT_ID, &num_procs, &ret_value, &fs_req) < 0) + if(HG_Forward(PEER, H5VL_EFF_INIT_ID, &num_procs, &ret_value, &hg_req) < 0) return FAIL; - fs_wait(fs_req, FS_MAX_IDLE_TIME, FS_STATUS_IGNORE); - + HG_Wait(hg_req, HG_MAX_IDLE_TIME, HG_STATUS_IGNORE); return ret_value; } /* end EFF_init() */ @@ -359,23 +345,23 @@ EFF_init(MPI_Comm comm, MPI_Info info) herr_t EFF_finalize(void) { - fs_request_t fs_req; + hg_request_t hg_req; herr_t ret_value = SUCCEED; /* forward the finalize call to the IONs */ - if(fs_forward(PEER, H5VL_EFF_FINALIZE_ID, NULL, &ret_value, &fs_req) < 0) + if(HG_Forward(PEER, H5VL_EFF_FINALIZE_ID, &ret_value, &ret_value, &hg_req) < 0) return FAIL; - fs_wait(fs_req, FS_MAX_IDLE_TIME, FS_STATUS_IGNORE); + HG_Wait(hg_req, HG_MAX_IDLE_TIME, HG_STATUS_IGNORE); /* Free addr id */ - if (S_SUCCESS != na_addr_free(network_class, PEER)) + if (HG_SUCCESS != NA_Addr_free(network_class, PEER)) return FAIL; /* Finalize interface */ - if (S_SUCCESS != bds_finalize()) + if (HG_SUCCESS != HG_Bulk_finalize()) return FAIL; - if (S_SUCCESS != fs_finalize()) + if (HG_SUCCESS != HG_Finalize()) return FAIL; return ret_value; @@ -569,8 +555,8 @@ H5VL_iod_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl H5P_genplist_t *plist; /* Property list pointer */ int my_rank, my_size; H5VL_iod_file_t *file = NULL; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; H5VL_iod_file_create_input_t input; @@ -600,7 +586,7 @@ H5VL_iod_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl if(NULL == (file = H5FL_CALLOC(H5VL_iod_file_t))) HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate IOD file struct"); - /* set the input structure for the FS encode routine */ + /* set the input structure for the HG encode routine */ input.name = name; input.flags = flags; input.fcpl_id = fcpl_id; @@ -608,14 +594,14 @@ H5VL_iod_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the ION */ - if(fs_forward(PEER, H5VL_FILE_CREATE_ID, &input, &file->remote_file, fs_req) < 0) + if(HG_Forward(PEER, H5VL_FILE_CREATE_ID, &input, &file->remote_file, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "failed to ship file create"); /* create the file object that is passed to the API layer */ @@ -647,9 +633,9 @@ H5VL_iod_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_FILE_CREATE; + request->type = HG_FILE_CREATE; request->data = file; - request->req = fs_req; + request->req = hg_req; request->obj = file; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -668,7 +654,7 @@ H5VL_iod_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(file, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on FS request"); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on HG request"); /* Sanity check */ HDassert(request == &_request); @@ -704,8 +690,8 @@ H5VL_iod_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_i H5P_genplist_t *plist; /* Property list pointer */ int my_rank, my_size; H5VL_iod_file_t *file = NULL; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; H5VL_iod_file_open_input_t input; @@ -733,14 +719,14 @@ H5VL_iod_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_i /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the server */ - if(fs_forward(PEER, H5VL_FILE_OPEN_ID, &input, &file->remote_file, fs_req) < 0) + if(HG_Forward(PEER, H5VL_FILE_OPEN_ID, &input, &file->remote_file, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "failed to ship file create"); /* create the file object that is passed to the API layer */ @@ -770,9 +756,9 @@ H5VL_iod_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_i /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_FILE_OPEN; + request->type = HG_FILE_OPEN; request->data = file; - request->req = fs_req; + request->req = hg_req; request->obj = file; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -791,7 +777,7 @@ H5VL_iod_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_i else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(file, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on FS request"); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on HG request"); /* Sanity check */ HDassert(request == &_request); @@ -826,8 +812,8 @@ H5VL_iod_file_flush(void *_obj, H5VL_loc_params_t loc_params, H5F_scope_t scope, { H5VL_iod_object_t *obj = (H5VL_iod_object_t *)_obj; H5VL_iod_file_t *file = obj->file; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; int *status; H5VL_iod_file_flush_input_t input; H5VL_iod_request_t _request; /* Local request, for sync. operations */ @@ -839,9 +825,9 @@ H5VL_iod_file_flush(void *_obj, H5VL_loc_params_t loc_params, H5F_scope_t scope, /* wait for all pending requests before closing the file */ if(H5VL_iod_request_wait_all(file) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS requests"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG requests"); - /* set the input structure for the FS encode routine */ + /* set the input structure for the HG encode routine */ input.coh = file->remote_file.coh; input.scope = scope; @@ -850,29 +836,29 @@ H5VL_iod_file_flush(void *_obj, H5VL_loc_params_t loc_params, H5F_scope_t scope, /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the ION */ - if(fs_forward(PEER, H5VL_FILE_FLUSH_ID, &input, status, fs_req) < 0) + if(HG_Forward(PEER, H5VL_FILE_FLUSH_ID, &input, status, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "failed to ship file close"); /* Get async request for operation */ if(do_async) { if(NULL == (request = (H5VL_iod_request_t *)H5MM_malloc(sizeof(H5VL_iod_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate IOD VOL request struct"); + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate IOD VOL request struct"); } /* end if */ else request = &_request; /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_FILE_FLUSH; + request->type = HG_FILE_FLUSH; request->data = status; - request->req = fs_req; + request->req = hg_req; request->obj = file; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -891,7 +877,7 @@ H5VL_iod_file_flush(void *_obj, H5VL_loc_params_t loc_params, H5F_scope_t scope, else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(file, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on FS request"); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on HG request"); /* Sanity check */ HDassert(request == &_request); } /* end else */ @@ -919,7 +905,7 @@ H5VL_iod_file_get(void *_obj, H5VL_file_get_t get_type, hid_t dxpl_id, void **re { H5VL_iod_object_t *obj = (H5VL_iod_object_t *)_obj; H5VL_iod_file_t *file = obj->file; - fs_request_t *fs_req; + hg_request_t *hg_req; int *status; H5VL_iod_request_t *request; hbool_t do_async = (req == NULL) ? FALSE : TRUE; /* Whether we're performing async. I/O */ @@ -1122,8 +1108,8 @@ static herr_t H5VL_iod_file_close(void *_file, hid_t dxpl_id, void **req) { H5VL_iod_file_t *file = (H5VL_iod_file_t *)_file; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; int *status; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; @@ -1134,36 +1120,36 @@ H5VL_iod_file_close(void *_file, hid_t dxpl_id, void **req) /* wait for all pending requests before closing the file */ if(H5VL_iod_request_wait_all(file) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS requests"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG requests"); /* allocate an integer to receive the return value if the file close succeeded or not */ status = (int *)malloc(sizeof(int)); /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the ION */ - if(fs_forward(PEER, H5VL_FILE_CLOSE_ID, &file->remote_file, status, fs_req) < 0) + if(HG_Forward(PEER, H5VL_FILE_CLOSE_ID, &file->remote_file, status, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "failed to ship file close"); /* Get async request for operation */ if(do_async) { if(NULL == (request = (H5VL_iod_request_t *)H5MM_malloc(sizeof(H5VL_iod_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate IOD VOL request struct"); + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate IOD VOL request struct"); } /* end if */ else request = &_request; /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_FILE_CLOSE; + request->type = HG_FILE_CLOSE; request->data = status; - request->req = fs_req; + request->req = hg_req; request->obj = file; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -1182,7 +1168,7 @@ H5VL_iod_file_close(void *_file, hid_t dxpl_id, void **req) else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(file, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on FS request"); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't wait on HG request"); /* Sanity check */ HDassert(request == &_request); } /* end else */ @@ -1217,8 +1203,8 @@ H5VL_iod_group_create(void *_obj, H5VL_loc_params_t loc_params, const char *name iod_obj_id_t iod_id; iod_handle_t iod_oh; char *new_name; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; hbool_t do_async = (req == NULL) ? FALSE : TRUE; /* Whether we're performing async. I/O */ @@ -1244,7 +1230,7 @@ H5VL_iod_group_create(void *_obj, H5VL_loc_params_t loc_params, const char *name if(NULL == (grp = H5FL_CALLOC(H5VL_iod_group_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate object struct"); - /* set the input structure for the FS encode routine */ + /* set the input structure for the HG encode routine */ input.coh = obj->file->remote_file.coh; input.loc_id = iod_id; input.loc_oh = iod_oh; @@ -1259,14 +1245,14 @@ H5VL_iod_group_create(void *_obj, H5VL_loc_params_t loc_params, const char *name /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, NULL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the IONs */ - if(fs_forward(PEER, H5VL_GROUP_CREATE_ID, &input, &grp->remote_group, fs_req) < 0) + if(HG_Forward(PEER, H5VL_GROUP_CREATE_ID, &input, &grp->remote_group, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "failed to ship group create"); /* setup the local group struct */ @@ -1298,9 +1284,9 @@ H5VL_iod_group_create(void *_obj, H5VL_loc_params_t loc_params, const char *name /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_GROUP_CREATE; + request->type = HG_GROUP_CREATE; request->data = grp; - request->req = fs_req; + request->req = hg_req; request->obj = grp; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -1319,7 +1305,7 @@ H5VL_iod_group_create(void *_obj, H5VL_loc_params_t loc_params, const char *name else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(obj->file, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't wait on FS request") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't wait on HG request") /* Sanity check */ HDassert(request == &_request); @@ -1359,8 +1345,8 @@ H5VL_iod_group_open(void *_obj, H5VL_loc_params_t loc_params, const char *name, iod_obj_id_t iod_id; iod_handle_t iod_oh; char *new_name; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; hbool_t do_async = (req == NULL) ? FALSE : TRUE; /* Whether we're performing async. I/O */ @@ -1379,7 +1365,7 @@ H5VL_iod_group_open(void *_obj, H5VL_loc_params_t loc_params, const char *name, if(NULL == (grp = H5FL_CALLOC(H5VL_iod_group_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate object struct"); - /* set the input structure for the FS encode routine */ + /* set the input structure for the HG encode routine */ input.coh = obj->file->remote_file.coh; input.loc_id = iod_id; input.loc_oh = iod_oh; @@ -1392,14 +1378,14 @@ H5VL_iod_group_open(void *_obj, H5VL_loc_params_t loc_params, const char *name, /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, NULL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the IONs */ - if(fs_forward(PEER, H5VL_GROUP_OPEN_ID, &input, &grp->remote_group, fs_req) < 0) + if(HG_Forward(PEER, H5VL_GROUP_OPEN_ID, &input, &grp->remote_group, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "failed to ship group open"); /* setup the local group struct */ @@ -1429,9 +1415,9 @@ H5VL_iod_group_open(void *_obj, H5VL_loc_params_t loc_params, const char *name, /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_GROUP_OPEN; + request->type = HG_GROUP_OPEN; request->data = grp; - request->req = fs_req; + request->req = hg_req; request->obj = grp; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -1450,7 +1436,7 @@ H5VL_iod_group_open(void *_obj, H5VL_loc_params_t loc_params, const char *name, else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(obj->file, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't wait on FS request") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't wait on HG request") /* Sanity check */ HDassert(request == &_request); @@ -1532,8 +1518,8 @@ H5VL_iod_group_close(void *_grp, hid_t dxpl_id, void **req) { H5VL_iod_group_t *grp = (H5VL_iod_group_t *)_grp; int *status; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; hbool_t do_async = (req == NULL) ? FALSE : TRUE; /* Whether we're performing async. I/O */ @@ -1544,7 +1530,7 @@ H5VL_iod_group_close(void *_grp, hid_t dxpl_id, void **req) /* wait for the actual create or open operation on the group to complete */ if(NULL != grp->common.request) { if(H5VL_iod_request_wait(grp->common.file, grp->common.request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS request"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG request"); /* Reset object's pointer to request */ /* (Request is owned by the request object and will be freed when the @@ -1558,29 +1544,29 @@ H5VL_iod_group_close(void *_grp, hid_t dxpl_id, void **req) /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the IONs */ - if(fs_forward(PEER, H5VL_GROUP_CLOSE_ID, &grp->remote_group, status, fs_req) < 0) + if(HG_Forward(PEER, H5VL_GROUP_CLOSE_ID, &grp->remote_group, status, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "failed to ship group close"); /* Get async request for operation */ if(do_async) { if(NULL == (request = (H5VL_iod_request_t *)H5MM_malloc(sizeof(H5VL_iod_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate IOD VOL request struct"); + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate IOD VOL request struct"); } /* end if */ else request = &_request; /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_GROUP_CLOSE; + request->type = HG_GROUP_CLOSE; request->data = status; - request->req = fs_req; + request->req = hg_req; request->obj = grp; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -1599,7 +1585,7 @@ H5VL_iod_group_close(void *_grp, hid_t dxpl_id, void **req) else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(grp->common.file, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on FS request"); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't wait on HG request"); /* Sanity check */ HDassert(request == &_request); } /* end else */ @@ -1633,8 +1619,8 @@ H5VL_iod_dataset_create(void *_obj, H5VL_loc_params_t loc_params, const char *na iod_obj_id_t iod_id; iod_handle_t iod_oh; char *new_name; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; hid_t type_id, space_id, lcpl_id; @@ -1665,7 +1651,7 @@ H5VL_iod_dataset_create(void *_obj, H5VL_loc_params_t loc_params, const char *na if(NULL == (dset = H5FL_CALLOC(H5VL_iod_dset_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate object struct"); - /* set the input structure for the FS encode routine */ + /* set the input structure for the HG encode routine */ input.coh = obj->file->remote_file.coh; input.loc_id = iod_id; input.loc_oh = iod_oh; @@ -1682,14 +1668,14 @@ H5VL_iod_dataset_create(void *_obj, H5VL_loc_params_t loc_params, const char *na /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, NULL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the IONs */ - if(fs_forward(PEER, H5VL_DSET_CREATE_ID, &input, &dset->remote_dset, fs_req) < 0) + if(HG_Forward(PEER, H5VL_DSET_CREATE_ID, &input, &dset->remote_dset, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "failed to ship dataset create"); /* setup the local dataset struct */ @@ -1726,9 +1712,9 @@ H5VL_iod_dataset_create(void *_obj, H5VL_loc_params_t loc_params, const char *na /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_DSET_CREATE; + request->type = HG_DSET_CREATE; request->data = dset; - request->req = fs_req; + request->req = hg_req; request->obj = dset; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -1747,7 +1733,7 @@ H5VL_iod_dataset_create(void *_obj, H5VL_loc_params_t loc_params, const char *na else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(obj->file, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on FS request"); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on HG request"); /* Sanity check */ HDassert(request == &_request); @@ -1788,8 +1774,8 @@ H5VL_iod_dataset_open(void *_obj, H5VL_loc_params_t loc_params, const char *name iod_obj_id_t iod_id; iod_handle_t iod_oh; char *new_name; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; hbool_t do_async = (req == NULL) ? FALSE : TRUE; /* Whether we're performing async. I/O */ @@ -1807,7 +1793,7 @@ H5VL_iod_dataset_open(void *_obj, H5VL_loc_params_t loc_params, const char *name if(NULL == (dset = H5FL_CALLOC(H5VL_iod_dset_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate object struct"); - /* set the input structure for the FS encode routine */ + /* set the input structure for the HG encode routine */ input.coh = obj->file->remote_file.coh; input.loc_id = iod_id; input.loc_oh = iod_oh; @@ -1820,14 +1806,14 @@ H5VL_iod_dataset_open(void *_obj, H5VL_loc_params_t loc_params, const char *name /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, NULL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the IONs */ - if(fs_forward(PEER, H5VL_DSET_OPEN_ID, &input, &dset->remote_dset, fs_req) < 0) + if(HG_Forward(PEER, H5VL_DSET_OPEN_ID, &input, &dset->remote_dset, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "failed to ship dataset open"); /* setup the local dataset struct */ @@ -1857,9 +1843,9 @@ H5VL_iod_dataset_open(void *_obj, H5VL_loc_params_t loc_params, const char *name /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_DSET_OPEN; + request->type = HG_DSET_OPEN; request->data = dset; - request->req = fs_req; + request->req = hg_req; request->obj = dset; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -1878,7 +1864,7 @@ H5VL_iod_dataset_open(void *_obj, H5VL_loc_params_t loc_params, const char *name else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(obj->file, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on FS request"); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on HG request"); /* Sanity check */ HDassert(request == &_request); @@ -1915,9 +1901,9 @@ H5VL_iod_dataset_read(void *_dset, hid_t mem_type_id, hid_t mem_space_id, H5VL_iod_dset_t *dset = (H5VL_iod_dset_t *)_dset; H5VL_iod_dset_io_input_t input; H5P_genplist_t *plist; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; - bds_handle_t *bds_handle = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; + hg_bulk_t *bulk_handle = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; H5VL_iod_read_status_t *status = NULL; @@ -1962,7 +1948,7 @@ H5VL_iod_dataset_read(void *_dset, hid_t mem_type_id, hid_t mem_space_id, /* wait for the dataset create or open to complete */ if(NULL != dset->common.request && H5VL_IOD_PENDING == dset->common.request->state) { if(H5VL_iod_request_wait(dset->common.file, dset->common.request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS request"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG request"); /* Reset object's pointer to request */ /* (Request is owned by the request object and will be freed when the @@ -1975,17 +1961,17 @@ H5VL_iod_dataset_read(void *_dset, hid_t mem_type_id, hid_t mem_space_id, size = H5Sget_simple_extent_npoints(mem_space_id) * H5Tget_size(mem_type_id); /* allocate a bulk data transfer handle */ - if(NULL == (bds_handle = (bds_handle_t *)H5MM_malloc(sizeof(bds_handle_t)))) + if(NULL == (bulk_handle = (hg_bulk_t *)H5MM_malloc(sizeof(hg_bulk_t)))) HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate a buld data transfer handle"); - /* Register memory with bds_handle */ - if(S_SUCCESS != bds_handle_create(buf, size, BDS_READWRITE, bds_handle)) + /* Register memory with bulk_handle */ + if(HG_SUCCESS != HG_Bulk_handle_create(buf, size, HG_BULK_READWRITE, bulk_handle)) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't create Bulk Data Handle"); /* Fill input structure */ input.iod_oh = dset->remote_dset.iod_oh; input.scratch_oh = dset->remote_dset.scratch_oh; - input.bds_handle = *bds_handle; + input.bulk_handle = *bulk_handle; input.checksum = 0; input.dxpl_id = dxpl_id; input.space_id = file_space_id; @@ -1999,14 +1985,14 @@ H5VL_iod_dataset_read(void *_dset, hid_t mem_type_id, hid_t mem_space_id, /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the IONs */ - if(fs_forward(PEER, H5VL_DSET_READ_ID, &input, status, fs_req) < 0) + if(HG_Forward(PEER, H5VL_DSET_READ_ID, &input, status, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to ship dataset read"); /* setup info struct for I/O request. @@ -2014,7 +2000,7 @@ H5VL_iod_dataset_read(void *_dset, hid_t mem_type_id, hid_t mem_space_id, if(NULL == (info = (H5VL_iod_io_info_t *)H5MM_malloc(sizeof(H5VL_iod_io_info_t)))) HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate a request"); info->status = status; - info->bds_handle = bds_handle; + info->bulk_handle = bulk_handle; info->checksum = write_checksum; /* Get async request for operation */ @@ -2027,9 +2013,9 @@ H5VL_iod_dataset_read(void *_dset, hid_t mem_type_id, hid_t mem_space_id, /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_DSET_READ; + request->type = HG_DSET_READ; request->data = info; - request->req = fs_req; + request->req = hg_req; request->obj = dset; request->status = 0; request->state = 0; @@ -2050,7 +2036,7 @@ H5VL_iod_dataset_read(void *_dset, hid_t mem_type_id, hid_t mem_space_id, /* Synchronously wait on the request */ if(H5VL_iod_request_wait(dset->common.file, request) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on FS request"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on HG request"); } /* end else */ done: @@ -2078,9 +2064,9 @@ H5VL_iod_dataset_write(void *_dset, hid_t mem_type_id, hid_t mem_space_id, H5VL_iod_dset_t *dset = (H5VL_iod_dset_t *)_dset; H5VL_iod_dset_io_input_t input; H5P_genplist_t *plist; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; - bds_handle_t *bds_handle = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; + hg_bulk_t *bulk_handle = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; const H5S_t *mem_space = NULL; @@ -2125,7 +2111,7 @@ H5VL_iod_dataset_write(void *_dset, hid_t mem_type_id, hid_t mem_space_id, if(NULL != dset->common.request && H5VL_IOD_PENDING == dset->common.request->state) { if(H5VL_iod_request_wait(dset->common.file, dset->common.request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS request"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG request"); /* Reset object's pointer to request */ /* (Request is owned by the request object and will be freed when the @@ -2144,17 +2130,17 @@ H5VL_iod_dataset_write(void *_dset, hid_t mem_type_id, hid_t mem_space_id, printf("Checksum Generated for data at client: %u\n", cs); /* allocate a bulk data transfer handle */ - if(NULL == (bds_handle = (bds_handle_t *)H5MM_malloc(sizeof(bds_handle_t)))) + if(NULL == (bulk_handle = (hg_bulk_t *)H5MM_malloc(sizeof(hg_bulk_t)))) HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate a bulk data transfer handle"); /* Register memory */ - if(S_SUCCESS != bds_handle_create(buf, size, BDS_READ_ONLY, bds_handle)) + if(HG_SUCCESS != HG_Bulk_handle_create(buf, size, HG_BULK_READ_ONLY, bulk_handle)) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't create Bulk Data Handle"); /* Fill input structure */ input.iod_oh = dset->remote_dset.iod_oh; input.scratch_oh = dset->remote_dset.scratch_oh; - input.bds_handle = *bds_handle; + input.bulk_handle = *bulk_handle; input.checksum = cs; input.dxpl_id = dxpl_id; input.space_id = file_space_id; @@ -2167,14 +2153,14 @@ H5VL_iod_dataset_write(void *_dset, hid_t mem_type_id, hid_t mem_space_id, /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the IONs */ - if(fs_forward(PEER, H5VL_DSET_WRITE_ID, &input, status, fs_req) < 0) + if(HG_Forward(PEER, H5VL_DSET_WRITE_ID, &input, status, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to ship dataset write"); /* setup info struct for I/O request @@ -2182,7 +2168,7 @@ H5VL_iod_dataset_write(void *_dset, hid_t mem_type_id, hid_t mem_space_id, if(NULL == (info = (H5VL_iod_io_info_t *)H5MM_malloc(sizeof(H5VL_iod_io_info_t)))) HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate a request"); info->status = status; - info->bds_handle = bds_handle; + info->bulk_handle = bulk_handle; info->checksum = cs; /* Get async request for operation */ @@ -2195,9 +2181,9 @@ H5VL_iod_dataset_write(void *_dset, hid_t mem_type_id, hid_t mem_space_id, /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_DSET_WRITE; + request->type = HG_DSET_WRITE; request->data = info; - request->req = fs_req; + request->req = hg_req; request->obj = dset; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -2216,7 +2202,7 @@ H5VL_iod_dataset_write(void *_dset, hid_t mem_type_id, hid_t mem_space_id, /* Synchronously wait on the request */ if(H5VL_iod_request_wait(dset->common.file, request) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on FS request"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't wait on HG request"); } /* end else */ done: @@ -2244,8 +2230,8 @@ H5VL_iod_dataset_set_extent(void *_dset, const hsize_t size[], hid_t dxpl_id, vo H5VL_iod_dset_set_extent_input_t input; iod_obj_id_t iod_id; iod_handle_t iod_oh; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; hbool_t do_async = (req == NULL) ? FALSE : TRUE; /* Whether we're performing async. I/O */ @@ -2257,7 +2243,7 @@ H5VL_iod_dataset_set_extent(void *_dset, const hsize_t size[], hid_t dxpl_id, vo /* wait for the dataset create or open to complete */ if(NULL != dset->common.request && H5VL_IOD_PENDING == dset->common.request->state) { if(H5VL_iod_request_wait(dset->common.file, dset->common.request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS request"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG request"); /* Reset object's pointer to request */ /* (Request is owned by the request object and will be freed when the @@ -2268,40 +2254,40 @@ H5VL_iod_dataset_set_extent(void *_dset, const hsize_t size[], hid_t dxpl_id, vo /* wait for pending I/O requests on the dataset */ if(H5VL_iod_request_wait_some(dset->common.file, dset) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS requests"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG requests"); /* Fill input structure */ input.iod_oh = dset->remote_dset.iod_oh; - input.rank = H5Sget_simple_extent_ndims(dset->remote_dset.space_id); - input.size = size; + input.dims.rank = H5Sget_simple_extent_ndims(dset->remote_dset.space_id); + input.dims.size = size; status = (int *)malloc(sizeof(int)); /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the IONs */ - if(fs_forward(PEER, H5VL_DSET_SET_EXTENT_ID, &input, status, fs_req) < 0) + if(HG_Forward(PEER, H5VL_DSET_SET_EXTENT_ID, &input, status, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to ship dataset write"); /* Get async request for operation */ if(do_async) { if(NULL == (request = (H5VL_iod_request_t *)H5MM_malloc(sizeof(H5VL_iod_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate IOD VOL request struct"); + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate IOD VOL request struct"); } /* end if */ else request = &_request; /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_DSET_SET_EXTENT; + request->type = HG_DSET_SET_EXTENT; request->data = status; - request->req = fs_req; + request->req = hg_req; request->obj = dset; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -2320,7 +2306,7 @@ H5VL_iod_dataset_set_extent(void *_dset, const hsize_t size[], hid_t dxpl_id, vo else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(dset->common.file, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on FS request"); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't wait on HG request"); /* Sanity check */ HDassert(request == &_request); } /* end else */ @@ -2424,8 +2410,8 @@ H5VL_iod_dataset_close(void *_dset, hid_t dxpl_id, void **req) { H5VL_iod_dset_t *dset = (H5VL_iod_dset_t *)_dset; int *status; - fs_request_t _fs_req; /* Local function shipper request, for sync. operations */ - fs_request_t *fs_req = NULL; + hg_request_t _hg_req; /* Local function shipper request, for sync. operations */ + hg_request_t *hg_req = NULL; H5VL_iod_request_t _request; /* Local request, for sync. operations */ H5VL_iod_request_t *request = NULL; hbool_t do_async = (req == NULL) ? FALSE : TRUE; /* Whether we're performing async. I/O */ @@ -2435,7 +2421,7 @@ H5VL_iod_dataset_close(void *_dset, hid_t dxpl_id, void **req) if(NULL != dset->common.request && H5VL_IOD_PENDING == dset->common.request->state) { if(H5VL_iod_request_wait(dset->common.file, dset->common.request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS request"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG request"); /* Reset object's pointer to request */ /* (Request is owned by the request object and will be freed when the @@ -2445,35 +2431,35 @@ H5VL_iod_dataset_close(void *_dset, hid_t dxpl_id, void **req) } if(H5VL_iod_request_wait_some(dset->common.file, dset) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS requests"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG requests"); status = (int *)malloc(sizeof(int)); /* get a function shipper request */ if(do_async) { - if(NULL == (fs_req = (fs_request_t *)H5MM_malloc(sizeof(fs_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate a FS request"); + if(NULL == (hg_req = (hg_request_t *)H5MM_malloc(sizeof(hg_request_t)))) + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate a HG request"); } /* end if */ else - fs_req = &_fs_req; + hg_req = &_hg_req; /* forward the call to the IONs */ - if(fs_forward(PEER, H5VL_DSET_CLOSE_ID, &dset->remote_dset, status, fs_req) < 0) + if(HG_Forward(PEER, H5VL_DSET_CLOSE_ID, &dset->remote_dset, status, hg_req) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "failed to ship dset close"); /* Get async request for operation */ if(do_async) { if(NULL == (request = (H5VL_iod_request_t *)H5MM_malloc(sizeof(H5VL_iod_request_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate IOD VOL request struct"); + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't allocate IOD VOL request struct"); } /* end if */ else request = &_request; /* Set up request */ HDmemset(request, 0, sizeof(*request)); - request->type = FS_DSET_CLOSE; + request->type = HG_DSET_CLOSE; request->data = status; - request->req = fs_req; + request->req = hg_req; request->obj = dset; request->next = request->prev = NULL; /* add request to container's linked list */ @@ -2492,7 +2478,7 @@ H5VL_iod_dataset_close(void *_dset, hid_t dxpl_id, void **req) else { /* Synchronously wait on the request */ if(H5VL_iod_request_wait(dset->common.file, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't wait on FS request"); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't wait on HG request"); /* Sanity check */ HDassert(request == &_request); } /* end else */ @@ -2519,25 +2505,25 @@ static herr_t H5VL_iod_test(void **req, H5_status_t *status) { H5VL_iod_request_t *request = *((H5VL_iod_request_t **)req); - fs_status_t fs_status; + hg_status_t hg_status; int ret; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT - ret = fs_wait(*((fs_request_t *)request->req), 0, &fs_status); - if(S_FAIL == ret) { + ret = HG_Wait(*((hg_request_t *)request->req), 0, &hg_status); + if(HG_FAIL == ret) { fprintf(stderr, "failed to wait on request\n"); request->status = H5AO_FAILED; request->state = H5VL_IOD_COMPLETED; H5VL_iod_request_delete(request->obj->file, request); } else { - if(fs_status) { + if(hg_status) { request->status = H5AO_SUCCEEDED; request->state = H5VL_IOD_COMPLETED; - if(H5VL_iod_request_wait(request->obj->file, request) < 0) - HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to wait for request"); + if(H5VL_iod_request_complete(request->obj->file, request) < 0) + fprintf(stderr, "Operation Failed!\n"); *status = request->status; request->req = H5MM_xfree(request->req); request = H5MM_xfree(request); @@ -2576,8 +2562,8 @@ H5VL_iod_wait(void **req, H5_status_t *status) if(H5VL_iod_request_wait(request->obj->file, request) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to wait for request") } - *status = request->status; + *status = request->status; request->req = H5MM_xfree(request->req); request = H5MM_xfree(request); diff --git a/src/H5VLiod.h b/src/H5VLiod.h index 617f8cd..ed987ce 100644 --- a/src/H5VLiod.h +++ b/src/H5VLiod.h @@ -27,9 +27,16 @@ #include "AXE.h" #include "iod_api.h" #include "iod_types.h" -#include "function_shipper.h" -#include "function_shipper_handler.h" -#include "network_mpi.h" +#include "mercury.h" +#include "mercury_handler.h" +#include "mercury_macros.h" +#include "mercury_proc.h" +#include "mercury_error.h" +#include "mercury_bulk.h" +#include "mercury_config.h" +#include "na_mpi.h" +#include "na.h" + #define H5VL_IOD (H5VL_iod_init()) #else diff --git a/src/H5VLiod_client.c b/src/H5VLiod_client.c index 661c5e3..51e008d 100644 --- a/src/H5VLiod_client.c +++ b/src/H5VLiod_client.c @@ -105,7 +105,7 @@ H5VL_iod_request_wait(H5VL_iod_file_t *file, H5VL_iod_request_t *request) { H5VL_iod_request_t *cur_req = file->request_list_head; int ret; - fs_status_t status; + hg_status_t status; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -115,9 +115,10 @@ H5VL_iod_request_wait(H5VL_iod_file_t *file, H5VL_iod_request_t *request) /* Loop to complete the request while poking through other requests on the container to avoid deadlock. */ while(1) { + HDassert(request->state == H5VL_IOD_PENDING); /* test the operation status */ - ret = fs_wait(*((fs_request_t *)request->req), 0, &status); - if(S_FAIL == ret) { + ret = HG_Wait(*((hg_request_t *)request->req), 0, &status); + if(HG_FAIL == ret) { fprintf(stderr, "failed to wait on request\n"); request->status = H5AO_FAILED; request->state = H5VL_IOD_COMPLETED; @@ -137,23 +138,26 @@ H5VL_iod_request_wait(H5VL_iod_file_t *file, H5VL_iod_request_t *request) H5VL_iod_request_t *tmp_req = NULL; if(cur_req) { - fs_status_t tmp_status; + if(cur_req->req != request->req) { + hg_status_t tmp_status; - tmp_req = cur_req->next; + tmp_req = cur_req->next; - ret = fs_wait(*((fs_request_t *)cur_req->req), 0, &tmp_status); - if(S_FAIL == ret) { - fprintf(stderr, "failed to wait on request\n"); - cur_req->status = H5AO_FAILED; - cur_req->state = H5VL_IOD_COMPLETED; - H5VL_iod_request_delete(file, cur_req); - } - else { - if(tmp_status) { - cur_req->status = H5AO_SUCCEEDED; + HDassert(cur_req->state == H5VL_IOD_PENDING); + ret = HG_Wait(*((hg_request_t *)cur_req->req), 0, &tmp_status); + if(HG_FAIL == ret) { + fprintf(stderr, "failed to wait on request\n"); + cur_req->status = H5AO_FAILED; cur_req->state = H5VL_IOD_COMPLETED; - if(H5VL_iod_request_complete(file, cur_req) < 0) - fprintf(stderr, "Operation Failed!\n"); + H5VL_iod_request_delete(file, cur_req); + } + else { + if(tmp_status) { + cur_req->status = H5AO_SUCCEEDED; + cur_req->state = H5VL_IOD_COMPLETED; + if(H5VL_iod_request_complete(file, cur_req) < 0) + fprintf(stderr, "Operation Failed!\n"); + } } } /* next time, test the next request in the list */ @@ -174,7 +178,7 @@ herr_t H5VL_iod_request_wait_all(H5VL_iod_file_t *file) { H5VL_iod_request_t *cur_req = file->request_list_head; - fs_status_t status; + hg_status_t status; int ret; herr_t ret_value = SUCCEED; @@ -186,8 +190,10 @@ H5VL_iod_request_wait_all(H5VL_iod_file_t *file) tmp_req = cur_req->next; - ret = fs_wait(*((fs_request_t *)cur_req->req), FS_MAX_IDLE_TIME, &status); - if(S_FAIL == ret) { + HDassert(cur_req->state == H5VL_IOD_PENDING); + ret = HG_Wait(*((hg_request_t *)cur_req->req), HG_MAX_IDLE_TIME, &status); + if(HG_FAIL == ret) { + fprintf(stderr, "failed to wait on request\n"); cur_req->status = H5AO_FAILED; cur_req->state = H5VL_IOD_COMPLETED; } @@ -211,7 +217,7 @@ herr_t H5VL_iod_request_wait_some(H5VL_iod_file_t *file, const void *object) { H5VL_iod_request_t *cur_req = file->request_list_head; - fs_status_t status; + hg_status_t status; int ret; herr_t ret_value = SUCCEED; @@ -223,11 +229,12 @@ H5VL_iod_request_wait_some(H5VL_iod_file_t *file, const void *object) tmp_req = cur_req->next; + /* If the request is pending on the object we want, complete it */ if(cur_req->obj == object) { - - ret = fs_wait(*((fs_request_t *)cur_req->req), FS_MAX_IDLE_TIME, + HDassert(cur_req->state == H5VL_IOD_PENDING); + ret = HG_Wait(*((hg_request_t *)cur_req->req), HG_MAX_IDLE_TIME, &status); - if(S_FAIL == ret) { + if(HG_FAIL == ret) { fprintf(stderr, "failed to wait on request\n"); cur_req->status = H5AO_FAILED; cur_req->state = H5VL_IOD_COMPLETED; @@ -255,32 +262,34 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req) FUNC_ENTER_NOAPI_NOINIT + HDassert(req->state == H5VL_IOD_COMPLETED); + switch(req->type) { - case FS_FILE_CREATE: - case FS_FILE_OPEN: - case FS_GROUP_CREATE: - case FS_GROUP_OPEN: - case FS_DSET_CREATE: - case FS_DSET_OPEN: + case HG_FILE_CREATE: + case HG_FILE_OPEN: + case HG_GROUP_CREATE: + case HG_GROUP_OPEN: + case HG_DSET_CREATE: + case HG_DSET_OPEN: H5VL_iod_request_delete(file, req); break; - case FS_DSET_WRITE: - case FS_DSET_READ: + case HG_DSET_WRITE: + case HG_DSET_READ: { H5VL_iod_io_info_t *info = (H5VL_iod_io_info_t *)req->data; /* Free memory handle */ - if(S_SUCCESS != bds_handle_free(*info->bds_handle)) { - fprintf(stderr, "failed to free bds handle\n"); + if(HG_SUCCESS != HG_Bulk_handle_free(*info->bulk_handle)) { + fprintf(stderr, "failed to free bulk handle\n"); req->status = H5AO_FAILED; req->state = H5VL_IOD_COMPLETED; } - if(FS_DSET_WRITE == req->type && SUCCEED != *((int *)info->status)) { - fprintf(stderr, "write failed\n"); + if(HG_DSET_WRITE == req->type && SUCCEED != *((int *)info->status)) { + fprintf(stderr, "write failed %d\n", *((int *)info->status)); req->status = H5AO_FAILED; req->state = H5VL_IOD_COMPLETED; } - else if(FS_DSET_READ == req->type) { + else if(HG_DSET_READ == req->type) { H5VL_iod_read_status_t *read_status = (H5VL_iod_read_status_t *)info->status; if(SUCCEED != read_status->ret) { @@ -291,7 +300,7 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req) if(info->checksum && info->checksum != read_status->cs) { //free(info->status); //info->status = NULL; - //info->bds_handle = (bds_handle_t *)H5MM_xfree(info->bds_handle); + //info->bulk_handle = (hg_bulk_t *)H5MM_xfree(info->bulk_handle); //HDfree(req->obj_name); //info = (H5VL_iod_io_info_t *)H5MM_xfree(info); /* MSC not returning an error because we injected this failure */ @@ -302,13 +311,13 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req) free(info->status); info->status = NULL; - info->bds_handle = (bds_handle_t *)H5MM_xfree(info->bds_handle); + info->bulk_handle = (hg_bulk_t *)H5MM_xfree(info->bulk_handle); info = (H5VL_iod_io_info_t *)H5MM_xfree(info); req->data = NULL; H5VL_iod_request_delete(file, req); break; } - case FS_FILE_FLUSH: + case HG_FILE_FLUSH: { int *status = (int *)req->data; @@ -321,12 +330,12 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req) H5VL_iod_request_delete(file, req); break; } - case FS_FILE_CLOSE: + case HG_FILE_CLOSE: { int *status = (int *)req->data; if(SUCCEED != *status) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "file close failed at the server"); + HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "file close failed at the server"); free(status); req->data = NULL; @@ -344,13 +353,13 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req) file = H5FL_FREE(H5VL_iod_file_t, file); break; } - case FS_GROUP_CLOSE: + case HG_GROUP_CLOSE: { int *status = (int *)req->data; H5VL_iod_group_t *grp = (H5VL_iod_group_t *)req->obj; if(SUCCEED != *status) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "group close failed at the server"); + HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "group close failed at the server"); free(status); req->data = NULL; @@ -367,13 +376,13 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req) grp = H5FL_FREE(H5VL_iod_group_t, grp); break; } - case FS_DSET_SET_EXTENT: + case HG_DSET_SET_EXTENT: { int *status = (int *)req->data; H5VL_iod_dset_t *dset = (H5VL_iod_dset_t *)req->obj; if(SUCCEED != *status) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "Dataset set extent failed at the server"); + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "Dataset set extent failed at the server"); free(status); req->data = NULL; @@ -381,13 +390,13 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req) H5VL_iod_request_delete(file, req); break; } - case FS_DSET_CLOSE: + case HG_DSET_CLOSE: { int *status = (int *)req->data; H5VL_iod_dset_t *dset = (H5VL_iod_dset_t *)req->obj; if(SUCCEED != *status) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "dset close failed at the server"); + HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "dset close failed at the server"); free(status); req->data = NULL; @@ -442,7 +451,7 @@ H5VL_iod_local_traverse(H5VL_iod_object_t *obj, H5VL_loc_params_t UNUSED loc_par if(NULL != obj->request) { if(H5VL_iod_request_wait(obj->file, obj->request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS request"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG request"); /* Reset object's pointer to request */ /* (Request is owned by the request object and will be freed when the @@ -503,7 +512,7 @@ H5VL_iod_local_traverse(H5VL_iod_object_t *obj, H5VL_loc_params_t UNUSED loc_par if(NULL != cur_grp->common.request) { if(H5VL_iod_request_wait(obj->file, cur_grp->common.request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on FS request"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wait on HG request"); /* Reset object's pointer to request */ /* (Request is owned by the request object and will be freed when the diff --git a/src/H5VLiod_client.h b/src/H5VLiod_client.h index a992574..28a79af 100644 --- a/src/H5VLiod_client.h +++ b/src/H5VLiod_client.h @@ -20,7 +20,6 @@ #define _H5VLiod_client_H #include "H5FFprivate.h" /* FastForward wrappers */ -#include "H5VLiod.h" /* Iod VOL plugin */ #include "H5VLiod_common.h" #ifdef H5_HAVE_EFF @@ -31,19 +30,19 @@ struct H5VL_iod_object_t; /* types for requests */ typedef enum H5RQ_type_t { - FS_FILE_CREATE, - FS_FILE_OPEN, - FS_FILE_FLUSH, - FS_FILE_CLOSE, - FS_GROUP_CREATE, - FS_GROUP_OPEN, - FS_GROUP_CLOSE, - FS_DSET_CREATE, - FS_DSET_OPEN, - FS_DSET_READ, - FS_DSET_WRITE, - FS_DSET_SET_EXTENT, - FS_DSET_CLOSE + HG_FILE_CREATE, + HG_FILE_OPEN, + HG_FILE_FLUSH, + HG_FILE_CLOSE, + HG_GROUP_CREATE, + HG_GROUP_OPEN, + HG_GROUP_CLOSE, + HG_DSET_CREATE, + HG_DSET_OPEN, + HG_DSET_READ, + HG_DSET_WRITE, + HG_DSET_SET_EXTENT, + HG_DSET_CLOSE } H5RQ_type_t; typedef enum H5VL_iod_state_t { @@ -100,7 +99,7 @@ typedef struct H5VL_iod_dset_t { /* information about a dataset read/write request */ typedef struct H5VL_iod_io_info_t { void *status; - bds_handle_t *bds_handle; + hg_bulk_t *bulk_handle; uint32_t checksum; } H5VL_iod_io_info_t; @@ -114,33 +113,5 @@ H5_DLL herr_t H5VL_iod_local_traverse(H5VL_iod_object_t *obj, H5VL_loc_params_t const char *name, iod_obj_id_t *id, iod_handle_t *oh, char **new_name); -H5_DLL herr_t H5VL_iod_client_encode_eff_init(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_eff_init(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_file_create(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_file_create(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_file_open(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_file_open(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_file_flush(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_file_flush(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_file_close(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_file_close(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_group_create(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_group_create(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_group_open(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_group_open(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_group_close(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_group_close(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_dset_create(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_dset_create(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_dset_open(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_dset_open(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_dset_io(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_dset_read(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_decode_dset_write(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_dset_set_extent(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_dset_set_extent(fs_proc_t proc, void *_output); -H5_DLL herr_t H5VL_iod_client_encode_dset_close(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_client_decode_dset_close(fs_proc_t proc, void *_output); - #endif /* H5_HAVE_EFF */ #endif /* _H5VLiod_client_H */ diff --git a/src/H5VLiod_client_encdec.c b/src/H5VLiod_client_encdec.c deleted file mode 100644 index fdb92e6..0000000 --- a/src/H5VLiod_client_encdec.c +++ /dev/null @@ -1,1273 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* Programmer: Mohamad Chaarawi - * - * Purpose: IOD plugin client encode/decode code - */ - -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5VLprivate.h" /* VOL plugins */ -#include "H5VLiod.h" /* Iod VOL plugin */ -#include "H5VLiod_common.h" -#include "H5VLiod_client.h" - -#ifdef H5_HAVE_EFF - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_eff_init - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_eff_init(fs_proc_t proc, void *_input) -{ - int *input = (int *)_input; - size_t size, nalloc; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = sizeof(int); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - INT32ENCODE(p, *input); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_eff_init() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_eff_init - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_eff_init(fs_proc_t proc, void *_output) -{ - herr_t *output = (herr_t *)_output; - void *buf=NULL; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - INT32DECODE(p, *output); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_eff_init() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_file_create - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_file_create(fs_proc_t proc, void *_input) -{ - H5VL_iod_file_create_input_t *input = (H5VL_iod_file_create_input_t *)_input; - size_t size, nalloc; - size_t len = 0, fcpl_size = 0, fapl_size = 0; - hid_t fcpl_id = input->fcpl_id; - hid_t fapl_id = input->fapl_id; - unsigned flags = input->flags; - const char *name = input->name; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - /* get property list sizes */ - if(H5P_FILE_CREATE_DEFAULT != fcpl_id) { - if((ret_value = H5Pencode(fcpl_id, NULL, &fcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - if(H5P_FILE_ACCESS_DEFAULT != fapl_id) { - if((ret_value = H5Pencode(fapl_id, NULL, &fapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - len = HDstrlen(name) + 1; - - size = sizeof(unsigned) + - 1 + H5V_limit_enc_size((uint64_t)len) + len + - 1 + H5V_limit_enc_size((uint64_t)fapl_size) + fapl_size + - 1 + H5V_limit_enc_size((uint64_t)fcpl_size) + fcpl_size; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode length of name and name */ - UINT64ENCODE_VARLEN(p, len); - - HDstrcpy((char *)p, name); - p += len; - - /* encode create flags */ - H5_ENCODE_UNSIGNED(p, flags); - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, fcpl_size); - /* encode property lists if they are not default*/ - if(fcpl_size) { - if((ret_value = H5Pencode(fcpl_id, p, &fcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += fcpl_size; - } - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, fapl_size); - /* encode property lists if they are not default*/ - if(fapl_size) { - if((ret_value = H5Pencode(fapl_id, p, &fapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += fapl_size; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_file_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_file_create - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_file_create(fs_proc_t proc, void *_output) -{ - H5VL_iod_remote_file_t *output = (H5VL_iod_remote_file_t *)_output; - void *buf=NULL; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, output->coh.cookie); - UINT64DECODE_VARLEN(p, output->root_id.oid_hi); - UINT64DECODE_VARLEN(p, output->root_id.oid_lo); - UINT64DECODE_VARLEN(p, output->root_oh.cookie); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64DECODE_VARLEN(p, output->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_file_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_file_open - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_file_open(fs_proc_t proc, void *_input) -{ - H5VL_iod_file_open_input_t *input = (H5VL_iod_file_open_input_t *)_input; - size_t size, nalloc; - size_t len = 0, fapl_size = 0; - hid_t fapl_id = input->fapl_id; - unsigned flags = input->flags; - const char *name = input->name; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - /* get property list sizes */ - if(H5P_FILE_ACCESS_DEFAULT != fapl_id) { - if((ret_value = H5Pencode(fapl_id, NULL, &fapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - len = HDstrlen(name) + 1; - size = sizeof(unsigned) + - 1 + H5V_limit_enc_size((uint64_t)len) + len + - 1 + H5V_limit_enc_size((uint64_t)fapl_size) + fapl_size; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode length of name and name */ - UINT64ENCODE_VARLEN(p, len); - HDstrcpy((char *)p, name); - p += len; - - /* encode open flags */ - H5_ENCODE_UNSIGNED(p, flags); - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, fapl_size); - /* encode property lists if they are not default*/ - if(fapl_size) { - if((ret_value = H5Pencode(fapl_id, p, &fapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += fapl_size; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_file_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_file_open - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_file_open(fs_proc_t proc, void *_output) -{ - H5VL_iod_remote_file_t *output = (H5VL_iod_remote_file_t *)_output; - void *buf=NULL; - size_t fcpl_size = 0; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, output->coh.cookie); - UINT64DECODE_VARLEN(p, output->root_id.oid_hi); - UINT64DECODE_VARLEN(p, output->root_id.oid_lo); - UINT64DECODE_VARLEN(p, output->root_oh.cookie); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64DECODE_VARLEN(p, output->scratch_oh.cookie); - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, fcpl_size); - /* decode property lists if they are not default*/ - if(fcpl_size) { - if((output->fcpl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += fcpl_size; - } - else { - output->fcpl_id = H5P_FILE_CREATE_DEFAULT; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_file_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_file_flush - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_file_flush(fs_proc_t proc, void *_input) -{ - H5VL_iod_file_flush_input_t *input = (H5VL_iod_file_flush_input_t *)_input; - size_t size, nalloc; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + 1 + H5V_limit_enc_size((uint64_t)input->coh.cookie); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* encode scope */ - *p++ = (uint8_t)input->scope; - UINT64ENCODE_VARLEN(p, input->coh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_file_flush() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_file_flush - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_file_flush(fs_proc_t proc, void *_output) -{ - int *output = (int *)_output; - void *buf=NULL; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - INT32DECODE(p, *output); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_file_flush() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_file_close - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_file_close(fs_proc_t proc, void *_input) -{ - H5VL_iod_remote_file_t *input = (H5VL_iod_remote_file_t *)_input; - size_t size, nalloc; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)input->coh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)input->root_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->root_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->root_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_oh.cookie); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* encode the location with the container handle & iod object IDs and opened handles */ - UINT64ENCODE_VARLEN(p, input->coh.cookie); - UINT64ENCODE_VARLEN(p, input->root_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->root_id.oid_lo); - UINT64ENCODE_VARLEN(p, input->root_oh.cookie); - UINT64ENCODE_VARLEN(p, input->scratch_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->scratch_id.oid_lo); - UINT64ENCODE_VARLEN(p, input->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_file_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_file_close - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_file_close(fs_proc_t proc, void *_output) -{ - int *output = (int *)_output; - void *buf=NULL; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - INT32DECODE(p, *output); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_file_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_group_create - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_group_create(fs_proc_t proc, void *_input) -{ - H5VL_iod_group_create_input_t *input = (H5VL_iod_group_create_input_t *)_input; - size_t size, nalloc; - size_t len = 0, gcpl_size = 0, gapl_size = 0, lcpl_size = 0; - const char *name = input->name; - hid_t gcpl_id = input->gcpl_id; - hid_t gapl_id = input->gapl_id; - hid_t lcpl_id = input->lcpl_id; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - /* get size for property lists to encode */ - if(H5P_GROUP_CREATE_DEFAULT != gcpl_id) { - if((ret_value = H5Pencode(gcpl_id, NULL, &gcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - if(H5P_GROUP_ACCESS_DEFAULT != gapl_id) { - if((ret_value = H5Pencode(gapl_id, NULL, &gapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - if(H5P_LINK_CREATE_DEFAULT != lcpl_id) { - if((ret_value = H5Pencode(lcpl_id, NULL, &lcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - - /* get name size to encode */ - if(NULL != name) - len = HDstrlen(name) + 1; - - size = 1 + H5V_limit_enc_size((uint64_t)input->coh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)len) + len + - 1 + H5V_limit_enc_size((uint64_t)gapl_size) + gapl_size + - 1 + H5V_limit_enc_size((uint64_t)gcpl_size) + gcpl_size + - 1 + H5V_limit_enc_size((uint64_t)lcpl_size) + lcpl_size; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode the location with the container handle & iod object IDs and opened handles */ - UINT64ENCODE_VARLEN(p, input->coh.cookie); - UINT64ENCODE_VARLEN(p, input->loc_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->loc_id.oid_lo); - UINT64ENCODE_VARLEN(p, input->loc_oh.cookie); - - /* encode length of the group name and the actual group name */ - UINT64ENCODE_VARLEN(p, len); - if(NULL != name) - HDstrcpy((char *)p, name); - p += len; - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, gcpl_size); - /* encode property lists if they are not default*/ - if(gcpl_size) { - if((ret_value = H5Pencode(gcpl_id, p, &gcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += gcpl_size; - } - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, gapl_size); - /* encode property lists if they are not default*/ - if(gapl_size) { - if((ret_value = H5Pencode(gapl_id, p, &gapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += gapl_size; - } - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, lcpl_size); - /* encode property lists if they are not default*/ - if(H5P_LINK_CREATE_DEFAULT != lcpl_id) { - if((ret_value = H5Pencode(lcpl_id, p, &lcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += lcpl_size; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_group_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_group_create - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_group_create(fs_proc_t proc, void *_output) -{ - H5VL_iod_remote_group_t *output = (H5VL_iod_remote_group_t *)_output; - void *buf=NULL; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, output->iod_id.oid_hi); - UINT64DECODE_VARLEN(p, output->iod_id.oid_lo); - UINT64DECODE_VARLEN(p, output->iod_oh.cookie); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64DECODE_VARLEN(p, output->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_group_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_group_open - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_group_open(fs_proc_t proc, void *_input) -{ - H5VL_iod_group_open_input_t *input = (H5VL_iod_group_open_input_t *)_input; - size_t size, nalloc; - size_t len = 0, gapl_size = 0; - const char *name = input->name; - hid_t gapl_id = input->gapl_id; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - /* get size for property lists to encode */ - if(H5P_GROUP_ACCESS_DEFAULT != gapl_id) { - if((ret_value = H5Pencode(gapl_id, NULL, &gapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - - /* get name size to encode */ - if(NULL != name) - len = HDstrlen(name) + 1; - - size = 1 + H5V_limit_enc_size((uint64_t)input->coh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)len) + len + - 1 + H5V_limit_enc_size((uint64_t)gapl_size) + gapl_size; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode the location with the container handle & iod object IDs and opened handles */ - UINT64ENCODE_VARLEN(p, input->coh.cookie); - UINT64ENCODE_VARLEN(p, input->loc_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->loc_id.oid_lo); - UINT64ENCODE_VARLEN(p, input->loc_oh.cookie); - - /* encode length of the group name and the actual group name */ - UINT64ENCODE_VARLEN(p, len); - if(NULL != name) - HDstrcpy((char *)p, name); - p += len; - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, gapl_size); - /* encode property lists if they are not default*/ - if(gapl_size) { - if((ret_value = H5Pencode(gapl_id, p, &gapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += gapl_size; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_group_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_group_open - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_group_open(fs_proc_t proc, void *_output) -{ - H5VL_iod_remote_group_t *output = (H5VL_iod_remote_group_t *)_output; - void *buf=NULL; - size_t gcpl_size = 0; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, output->iod_id.oid_hi); - UINT64DECODE_VARLEN(p, output->iod_id.oid_lo); - UINT64DECODE_VARLEN(p, output->iod_oh.cookie); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64DECODE_VARLEN(p, output->scratch_oh.cookie); - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, gcpl_size); - /* decode property lists if they are not default*/ - if(gcpl_size) { - if((output->gcpl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += gcpl_size; - } - else { - output->gcpl_id = H5P_GROUP_CREATE_DEFAULT; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_group_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_group_close - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_group_close(fs_proc_t proc, void *_input) -{ - H5VL_iod_remote_group_t *input = (H5VL_iod_remote_group_t *)_input; - size_t size, nalloc; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)input->iod_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->iod_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->iod_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_oh.cookie); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode the location with the container handle & iod object IDs and opened handles */ - UINT64ENCODE_VARLEN(p, input->iod_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->iod_id.oid_lo) - UINT64ENCODE_VARLEN(p, input->iod_oh.cookie); - UINT64ENCODE_VARLEN(p, input->scratch_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->scratch_id.oid_lo); - UINT64ENCODE_VARLEN(p, input->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_group_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_group_close - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_group_close(fs_proc_t proc, void *_output) -{ - int *output = (int *)_output; - void *buf=NULL; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - INT32DECODE(p, *output); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_group_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_dset_create - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_dset_create(fs_proc_t proc, void *_input) -{ - H5VL_iod_dset_create_input_t *input = (H5VL_iod_dset_create_input_t *)_input; - size_t size, nalloc; - size_t len = 0, dcpl_size = 0, dapl_size = 0, lcpl_size = 0; - size_t type_size = 0, space_size = 0; - const char *name = input->name; - hid_t dcpl_id = input->dcpl_id; - hid_t dapl_id = input->dapl_id; - hid_t lcpl_id = input->lcpl_id; - hid_t type_id = input->type_id; - hid_t space_id = input->space_id; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - /* get size for property lists to encode */ - if(H5P_DATASET_CREATE_DEFAULT != dcpl_id) { - if((ret_value = H5Pencode(dcpl_id, NULL, &dcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - if(H5P_DATASET_ACCESS_DEFAULT != dapl_id) { - if((ret_value = H5Pencode(dapl_id, NULL, &dapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - if(H5P_LINK_CREATE_DEFAULT != lcpl_id) { - if((ret_value = H5Pencode(lcpl_id, NULL, &lcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - - /* get Type size to encode */ - if(H5Tencode(type_id, NULL, &type_size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype"); - - /* get Dataspace size to encode */ - if(H5Sencode(space_id, NULL, &space_size)<0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") - - /* get name size to encode */ - if(NULL != name) - len = HDstrlen(name) + 1; - - size = 1 + H5V_limit_enc_size((uint64_t)input->coh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)len) + len + - 1 + H5V_limit_enc_size((uint64_t)dapl_size) + dapl_size + - 1 + H5V_limit_enc_size((uint64_t)dcpl_size) + dcpl_size + - 1 + H5V_limit_enc_size((uint64_t)lcpl_size) + lcpl_size + - 1 + H5V_limit_enc_size((uint64_t)type_size) + type_size + - 1 + H5V_limit_enc_size((uint64_t)space_size) + space_size; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode the location with the container handle & iod object IDs and opened handles */ - UINT64ENCODE_VARLEN(p, input->coh.cookie); - UINT64ENCODE_VARLEN(p, input->loc_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->loc_id.oid_lo); - UINT64ENCODE_VARLEN(p, input->loc_oh.cookie); - - /* encode length of the dataset name and the actual dataset name */ - UINT64ENCODE_VARLEN(p, len); - if(NULL != name) - HDstrcpy((char *)p, name); - p += len; - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, dcpl_size); - /* encode property lists if they are not default*/ - if(dcpl_size) { - if((ret_value = H5Pencode(dcpl_id, p, &dcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += dcpl_size; - } - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, dapl_size); - /* encode property lists if they are not default*/ - if(dapl_size) { - if((ret_value = H5Pencode(dapl_id, p, &dapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += dapl_size; - } - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, lcpl_size); - /* encode property lists if they are not default*/ - if(lcpl_size) { - if((ret_value = H5Pencode(lcpl_id, p, &lcpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += lcpl_size; - } - - /* encode the datatype size */ - UINT64ENCODE_VARLEN(p, type_size); - /* encode datatype */ - if((ret_value = H5Tencode(type_id, p, &type_size)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode datatype"); - p += type_size; - - /* encode the dataspace size */ - UINT64ENCODE_VARLEN(p, space_size); - /* encode datatspace */ - if((ret_value = H5Sencode(space_id, p, &space_size)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "unable to encode datatspace"); - p += space_size; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_dset_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_dset_create - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_dset_create(fs_proc_t proc, void *_output) -{ - H5VL_iod_remote_dset_t *output = (H5VL_iod_remote_dset_t *)_output; - void *buf=NULL; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, output->iod_id.oid_hi); - UINT64DECODE_VARLEN(p, output->iod_id.oid_lo); - UINT64DECODE_VARLEN(p, output->iod_oh.cookie); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64DECODE_VARLEN(p, output->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_dset_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_dset_open - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_dset_open(fs_proc_t proc, void *_input) -{ - H5VL_iod_dset_open_input_t *input = (H5VL_iod_dset_open_input_t *)_input; - size_t size, nalloc; - size_t len = 0, dapl_size = 0; - const char *name = input->name; - hid_t dapl_id = input->dapl_id; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - /* get size for property lists to encode */ - if(H5P_DATASET_ACCESS_DEFAULT != dapl_id) { - if((ret_value = H5Pencode(dapl_id, NULL, &dapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - - /* get name size to encode */ - if(NULL != name) - len = HDstrlen(name) + 1; - - size = 1 + H5V_limit_enc_size((uint64_t)input->coh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->loc_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)len) + len + - 1 + H5V_limit_enc_size((uint64_t)dapl_size) + dapl_size; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode the location with the container handle & iod object IDs and opened handles */ - UINT64ENCODE_VARLEN(p, input->coh.cookie); - UINT64ENCODE_VARLEN(p, input->loc_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->loc_id.oid_lo); - UINT64ENCODE_VARLEN(p, input->loc_oh.cookie); - - /* encode length of the dataset name and the actual dataset name */ - UINT64ENCODE_VARLEN(p, len); - if(NULL != name) - HDstrcpy((char *)p, name); - p += len; - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, dapl_size); - /* encode property lists if they are not default*/ - if(dapl_size) { - if((ret_value = H5Pencode(dapl_id, p, &dapl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += dapl_size; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_dset_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_dset_open - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_dset_open(fs_proc_t proc, void *_output) -{ - H5VL_iod_remote_dset_t *output = (H5VL_iod_remote_dset_t *)_output; - void *buf=NULL; - size_t dcpl_size = 0, type_size = 0, space_size = 0; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, output->iod_id.oid_hi); - UINT64DECODE_VARLEN(p, output->iod_id.oid_lo); - UINT64DECODE_VARLEN(p, output->iod_oh.cookie); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64DECODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64DECODE_VARLEN(p, output->scratch_oh.cookie); - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, dcpl_size); - /* decode property lists if they are not default*/ - if(dcpl_size) { - if((output->dcpl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += dcpl_size; - } - else { - output->dcpl_id = H5P_FILE_CREATE_DEFAULT; - } - - /* decode the type size */ - UINT64DECODE_VARLEN(p, type_size); - /* decode the datatype */ - /* Create datatype by decoding buffer */ - if(FAIL == (output->type_id = H5Tdecode((const void *)p))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object"); - p += type_size; - - /* decode the space size */ - UINT64DECODE_VARLEN(p, space_size); - /* decode the dataspace */ - if((output->space_id = H5Sdecode((const void *)p)) == FAIL) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, FAIL, "can't decode object"); - p += space_size; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_dset_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_dset_io - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_dset_io(fs_proc_t proc, void *_input) -{ - H5VL_iod_dset_io_input_t *input = (H5VL_iod_dset_io_input_t *)_input; - size_t size, nalloc; - void *buf; - uint8_t *p; - hid_t dxpl_id = input->dxpl_id; - hid_t space_id = input->space_id; - size_t space_size = 0, dxpl_size = 0; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - /* get size for property lists to encode */ - if(H5P_DATASET_XFER_DEFAULT != dxpl_id) { - if((ret_value = H5Pencode(dxpl_id, NULL, &dxpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - } - - /* get Dataspace size to encode */ - if(H5Sencode(space_id, NULL, &space_size)<0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype"); - - size = BDS_MAX_HANDLE_SIZE + sizeof(uint32_t) + - 1 + H5V_limit_enc_size((uint64_t)input->iod_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)dxpl_size) + dxpl_size + - 1 + H5V_limit_enc_size((uint64_t)space_size) + space_size; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode the location with the container handle & iod object IDs and opened handles */ - UINT64ENCODE_VARLEN(p, input->iod_oh.cookie); - UINT64ENCODE_VARLEN(p, input->scratch_oh.cookie); - UINT32ENCODE(p, input->checksum); - - /* encode the plist size */ - UINT64ENCODE_VARLEN(p, dxpl_size); - /* encode property lists if they are not default*/ - if(dxpl_size) { - if((ret_value = H5Pencode(dxpl_id, p, &dxpl_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - p += dxpl_size; - } - - /* encode the dataspace size */ - UINT64ENCODE_VARLEN(p, space_size); - /* encode datatspace */ - if(H5Sencode(space_id, p, &space_size) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "unable to encode datatspace"); - p += space_size; - - if(S_FAIL == bds_handle_serialize(p, BDS_MAX_HANDLE_SIZE, input->bds_handle)) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "unable to serialize bds handle"); - - p += BDS_MAX_HANDLE_SIZE; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_dset_io() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_dset_read - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_dset_read(fs_proc_t proc, void *_output) -{ - H5VL_iod_read_status_t *output = (H5VL_iod_read_status_t *)_output; - void *buf=NULL; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - INT32DECODE(p, output->ret); - UINT32DECODE(p, output->cs); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_dset_read() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_dset_write - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_dset_write(fs_proc_t proc, void *_output) -{ - int *output = (int *)_output; - void *buf=NULL; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - INT32DECODE(p, *output); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_dset_write() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_dset_set_extent - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_dset_set_extent(fs_proc_t proc, void *_input) -{ - H5VL_iod_dset_set_extent_input_t *input = (H5VL_iod_dset_set_extent_input_t *)_input; - size_t size, nalloc; - void *buf; - uint8_t *p; - int i; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)input->iod_oh.cookie) + sizeof(int32_t); - for(i=0 ; irank ; i++) - size += 1 + H5V_limit_enc_size((uint64_t)(input->size[i])); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode the location with the container handle & iod object IDs and opened handles */ - UINT64ENCODE_VARLEN(p, input->iod_oh.cookie); - /* encode the rank */ - INT32ENCODE(p, input->rank); - for(i=0 ; irank ; i++) - UINT64ENCODE_VARLEN(p, input->size[i]) - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_dset_set_extent() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_dset_set_extent - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_dset_set_extent(fs_proc_t proc, void *_output) -{ - int *output = (int *)_output; - void *buf=NULL; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - INT32DECODE(p, *output); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_dset_set_extent() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_encode_dset_close - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_encode_dset_close(fs_proc_t proc, void *_input) -{ - H5VL_iod_remote_dset_t *input = (H5VL_iod_remote_dset_t *)_input; - size_t size, nalloc; - void *buf; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)input->iod_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->iod_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->iod_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)input->scratch_oh.cookie); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ - - /* encode the location with the container handle & iod object IDs and opened handles */ - UINT64ENCODE_VARLEN(p, input->iod_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->iod_id.oid_lo); - UINT64ENCODE_VARLEN(p, input->iod_oh.cookie); - UINT64ENCODE_VARLEN(p, input->scratch_id.oid_hi); - UINT64ENCODE_VARLEN(p, input->scratch_id.oid_lo); - UINT64ENCODE_VARLEN(p, input->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_encode_dset_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_client_decode_dset_close - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_client_decode_dset_close(fs_proc_t proc, void *_output) -{ - int *output = (int *)_output; - void *buf=NULL; - uint8_t *p; - - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to decode from does not exist"); - - p = (uint8_t *)buf; - INT32DECODE(p, *output); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_client_decode_dset_close() */ - -#endif /* H5_HAVE_EFF */ diff --git a/src/H5VLiod_common.h b/src/H5VLiod_common.h index 43ab208..dbfa0e1 100644 --- a/src/H5VLiod_common.h +++ b/src/H5VLiod_common.h @@ -19,8 +19,9 @@ #ifndef _H5VLiod_common_H #define _H5VLiod_common_H +#include "H5Pprivate.h" /* Property lists */ #include "H5VLpublic.h" -#include "H5VLiod.h" /* Iod VOL plugin */ +#include "H5VLiod.h" /* Iod VOL plugin */ #ifdef H5_HAVE_EFF @@ -34,7 +35,7 @@ typedef struct H5VL_iod_remote_file_t { iod_handle_t scratch_oh; iod_obj_id_t scratch_id; hid_t fcpl_id; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_remote_file_t; /* struct that contains the information about the IOD group */ @@ -44,7 +45,7 @@ typedef struct H5VL_iod_remote_group_t { iod_handle_t scratch_oh; iod_obj_id_t scratch_id; hid_t gcpl_id; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_remote_group_t; /* struct that contains the information about the IOD dset */ @@ -56,7 +57,7 @@ typedef struct H5VL_iod_remote_dset_t { hid_t dcpl_id; hid_t space_id; hid_t type_id; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_remote_dset_t; typedef struct H5VL_iod_file_create_input_t { @@ -64,20 +65,20 @@ typedef struct H5VL_iod_file_create_input_t { unsigned flags; hid_t fcpl_id; hid_t fapl_id; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_file_create_input_t; typedef struct H5VL_iod_file_open_input_t { const char *name; unsigned flags; hid_t fapl_id; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_file_open_input_t; typedef struct H5VL_iod_file_flush_input_t { iod_handle_t coh; H5F_scope_t scope; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_file_flush_input_t; typedef struct H5VL_iod_group_create_input_t { @@ -88,7 +89,7 @@ typedef struct H5VL_iod_group_create_input_t { hid_t gcpl_id; hid_t gapl_id; hid_t lcpl_id; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_group_create_input_t; typedef struct H5VL_iod_group_open_input_t { @@ -97,7 +98,7 @@ typedef struct H5VL_iod_group_open_input_t { iod_obj_id_t loc_id; const char *name; hid_t gapl_id; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_group_open_input_t; typedef struct H5VL_iod_dset_create_input_t { @@ -110,7 +111,7 @@ typedef struct H5VL_iod_dset_create_input_t { hid_t lcpl_id; hid_t type_id; hid_t space_id; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_dset_create_input_t; typedef struct H5VL_iod_dset_open_input_t { @@ -119,7 +120,7 @@ typedef struct H5VL_iod_dset_open_input_t { iod_obj_id_t loc_id; const char *name; hid_t dapl_id; - fs_handle_t fs_handle; + hg_handle_t hg_handle; } H5VL_iod_dset_open_input_t; typedef struct H5VL_iod_dset_io_input_t { @@ -128,15 +129,21 @@ typedef struct H5VL_iod_dset_io_input_t { hid_t space_id; hid_t dxpl_id; uint32_t checksum; - bds_handle_t bds_handle; - fs_handle_t fs_handle; + hg_bulk_t bulk_handle; + hg_handle_t hg_handle; } H5VL_iod_dset_io_input_t; -typedef struct H5VL_iod_dset_set_extent_input_t { - iod_handle_t iod_oh; +typedef struct dims_t { int rank; hsize_t *size; - fs_handle_t fs_handle; +} dims_t; + +typedef struct H5VL_iod_dset_set_extent_input_t { + iod_handle_t iod_oh; + //int rank; + //hsize_t *size; + dims_t dims; + hg_handle_t hg_handle; } H5VL_iod_dset_set_extent_input_t; typedef struct H5VL_iod_read_status_t { @@ -144,143 +151,89 @@ typedef struct H5VL_iod_read_status_t { uint32_t cs; } H5VL_iod_read_status_t; -#if 0 -/* Define fs_proc_iod_handle_t */ -static inline int fs_proc_iod_handle_t(fs_proc_t proc, void *data) -{ - int ret = S_SUCCESS; - iod_handle_t *struct_data = (iod_handle_t *)data; - - ret = fs_proc_uint64_t(proc, &struct_data->cookie); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - return ret; -} - -/* Define fs_proc_iod_obj_id_t */ -static inline int fs_proc_iod_obj_id_t(fs_proc_t proc, void *data) -{ - int ret = S_SUCCESS; - iod_obj_id_t *struct_data = (iod_obj_id_t *)data; - - ret = fs_proc_uint64_t(proc, &struct_data->oid_hi); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - - ret = fs_proc_uint64_t(proc, &struct_data->oid_lo); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } +H5_DLL int hg_proc_ret_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_hid_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_iod_obj_id_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_iod_handle_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_dims_t(hg_proc_t proc, void *data); + + +MERCURY_GEN_PROC(eff_init_in_t, ((uint32_t)(proc_num))) + +MERCURY_GEN_PROC(file_create_in_t, ((hg_string_t)(name)) ((uint32_t)(flags)) + ((hid_t)(fapl_id)) ((hid_t)(fcpl_id))) +MERCURY_GEN_PROC(file_create_out_t, ((iod_handle_t)(coh)) ((iod_handle_t)(root_oh)) + ((iod_obj_id_t)(root_id)) ((iod_handle_t)(scratch_oh)) + ((iod_obj_id_t)(scratch_id))) +MERCURY_GEN_PROC(file_open_in_t, ((hg_string_t)(name)) ((uint32_t)(flags)) + ((hid_t)(fapl_id))) +MERCURY_GEN_PROC(file_open_out_t, ((iod_handle_t)(coh)) ((iod_handle_t)(root_oh)) + ((iod_obj_id_t)(root_id)) ((iod_handle_t)(scratch_oh)) + ((iod_obj_id_t)(scratch_id)) ((hid_t)(fcpl_id))) +MERCURY_GEN_PROC(file_flush_in_t, ((uint8_t)(scope)) ((iod_handle_t)(coh))) +MERCURY_GEN_PROC(file_close_in_t, ((iod_handle_t)(coh)) ((iod_handle_t)(root_oh)) + ((iod_obj_id_t)(root_id)) ((iod_handle_t)(scratch_oh)) + ((iod_obj_id_t)(scratch_id))) + +MERCURY_GEN_PROC(group_create_in_t, ((iod_handle_t)(coh)) ((iod_handle_t)(loc_oh)) + ((iod_obj_id_t)(loc_id)) ((hg_string_t)(name)) + ((hid_t)(gapl_id)) ((hid_t)(gcpl_id)) ((hid_t)(lcpl_id))) +MERCURY_GEN_PROC(group_create_out_t, ((iod_handle_t)(iod_oh)) ((iod_obj_id_t)(iod_id)) + ((iod_handle_t)(scratch_oh)) ((iod_obj_id_t)(scratch_id))) +MERCURY_GEN_PROC(group_open_in_t, ((iod_handle_t)(coh)) ((iod_handle_t)(loc_oh)) + ((iod_obj_id_t)(loc_id)) ((hg_string_t)(name)) + ((hid_t)(gapl_id))) +MERCURY_GEN_PROC(group_open_out_t, ((iod_handle_t)(iod_oh)) ((iod_obj_id_t)(iod_id)) + ((iod_handle_t)(scratch_oh)) ((iod_obj_id_t)(scratch_id)) + ((hid_t)(gcpl_id))) +MERCURY_GEN_PROC(group_close_in_t, ((iod_handle_t)(iod_oh)) ((iod_obj_id_t)(iod_id)) + ((iod_handle_t)(scratch_oh)) ((iod_obj_id_t)(scratch_id))) + +MERCURY_GEN_PROC(dset_create_in_t, ((iod_handle_t)(coh)) ((iod_handle_t)(loc_oh)) + ((iod_obj_id_t)(loc_id)) ((hg_string_t)(name)) + ((hid_t)(dapl_id)) ((hid_t)(dcpl_id)) ((hid_t)(lcpl_id)) + ((hid_t)(type_id)) ((hid_t)(space_id))) +MERCURY_GEN_PROC(dset_create_out_t, ((iod_handle_t)(iod_oh)) ((iod_obj_id_t)(iod_id)) + ((iod_handle_t)(scratch_oh)) ((iod_obj_id_t)(scratch_id))) +MERCURY_GEN_PROC(dset_open_in_t, ((iod_handle_t)(coh)) ((iod_handle_t)(loc_oh)) + ((iod_obj_id_t)(loc_id)) ((hg_string_t)(name)) + ((hid_t)(dapl_id))) +MERCURY_GEN_PROC(dset_open_out_t, ((iod_handle_t)(iod_oh)) ((iod_obj_id_t)(iod_id)) + ((iod_handle_t)(scratch_oh)) ((iod_obj_id_t)(scratch_id)) + ((hid_t)(dcpl_id)) ((hid_t)(type_id)) ((hid_t)(space_id))) +MERCURY_GEN_PROC(dset_set_extent_in_t, ((iod_handle_t)(iod_oh)) ((dims_t)(dims))) +MERCURY_GEN_PROC(dset_io_in_t, ((iod_handle_t)(iod_oh)) ((iod_handle_t)(scratch_oh)) + ((hid_t)(space_id)) ((hid_t)(dxpl_id)) ((uint32_t)(checksum)) + ((hg_bulk_t)(bulk_handle))) +MERCURY_GEN_PROC(dset_read_out_t, ((int32_t)(ret)) ((uint32_t)(cs))) +MERCURY_GEN_PROC(dset_close_in_t, ((iod_handle_t)(iod_oh)) ((iod_obj_id_t)(iod_id)) + ((iod_handle_t)(scratch_oh)) ((iod_obj_id_t)(scratch_id))) - return ret; -} - -/* Define fs_proc_iod_handle_t */ -static inline int fs_proc_plist_t(fs_proc_t proc, void *data) -{ - int ret = S_SUCCESS; - size_t plist_size = 0; - H5P_genplist_t *plist = NULL; - void *buf = NULL; - hid_t plist_id = *((hid_t *)data); - - if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); - if((ret = H5P__encode(plist, FALSE, NULL, &plist_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - buf = H5MM_malloc(plist_size); - if((ret = H5P__encode(plist, FALSE, buf, &plist_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); - - - ret = fs_proc_memcpy(proc, buf, plist_size); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - - H5MM_xfree(buf); - return ret; -} - -static inline int fs_proc_remote_file_t(fs_proc_t proc, void *data) -{ - int ret = S_SUCCESS; - H5VL_iod_remote_file_t *struct_data = (H5VL_iod_remote_file_t *) data; - - ret = fs_proc_iod_handle_t(proc, &struct_data->coh); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - ret = fs_proc_iod_handle_t(proc, &struct_data->root_oh); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - ret = fs_proc_iod_obj_id_t(proc, &struct_data->root_id); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - ret = fs_proc_iod_handle_t(proc, &struct_data->scratch_oh); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - ret = fs_proc_iod_obj_id_t(proc, &struct_data->scratch_id); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - return ret; -} - -static inline int fs_proc_remote_object_t(fs_proc_t proc, void *data) -{ - int ret = S_SUCCESS; - H5VL_iod_remote_group_t *struct_data = (H5VL_iod_remote_group_t *) data; - - ret = fs_proc_iod_handle_t(proc, &struct_data->iod_oh); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - ret = fs_proc_iod_handle_t(proc, &struct_data->iod_id); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - ret = fs_proc_iod_handle_t(proc, &struct_data->scratch_oh); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - ret = fs_proc_iod_obj_id_t(proc, &struct_data->scratch_id); - if (ret != S_SUCCESS) { - S_ERROR_DEFAULT("Proc error"); - ret = S_FAIL; - return ret; - } - return ret; -} +#if 0 +H5_DLL int hg_proc_eff_init_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_eff_fin_in_t(hg_proc_t proc, void *data); + +H5_DLL int hg_proc_file_create_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_file_create_out_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_file_open_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_file_open_out_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_file_flush_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_file_close_in_t(hg_proc_t proc, void *data); + +H5_DLL int hg_proc_group_create_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_group_create_out_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_group_open_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_group_open_out_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_group_close_in_t(hg_proc_t proc, void *data); + +H5_DLL int hg_proc_dset_create_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_dset_create_out_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_dset_open_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_dset_open_out_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_dset_set_extent_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_dset_io_in_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_dset_read_out_t(hg_proc_t proc, void *data); +H5_DLL int hg_proc_dset_close_in_t(hg_proc_t proc, void *data); #endif #endif /* H5_HAVE_EFF */ diff --git a/src/H5VLiod_server.c b/src/H5VLiod_server.c index e20ef36..ef18712 100644 --- a/src/H5VLiod_server.c +++ b/src/H5VLiod_server.c @@ -25,8 +25,6 @@ #include "H5Sprivate.h" /* Dataspaces */ #include "H5Tprivate.h" /* Datatypes */ #include "H5VLprivate.h" /* VOL plugins */ -#include "H5VLiod.h" /* Iod VOL plugin */ -#include "H5VLiod_common.h" #include "H5VLiod_server.h" #include "H5WBprivate.h" /* Wrapped Buffers */ @@ -91,7 +89,7 @@ static herr_t H5VL_iod_server_dset_close_cb(size_t num_necessary_parents, AXE_ta herr_t H5VLiod_start_handler(MPI_Comm comm, MPI_Info UNUSED info) { - na_network_class_t *network_class = NULL; + na_class_t *network_class = NULL; int num_procs; herr_t ret_value = SUCCEED; @@ -100,89 +98,60 @@ H5VLiod_start_handler(MPI_Comm comm, MPI_Info UNUSED info) iod_comm = comm; /* initialize the netwrok class */ - network_class = na_mpi_init(NULL, MPI_INIT_SERVER); - if(S_SUCCESS != fs_handler_init(network_class)) + network_class = NA_MPI_Init(NULL, MPI_INIT_SERVER); + if(HG_SUCCESS != HG_Handler_init(network_class)) return FAIL; - if(S_SUCCESS != fs_handler_use_manual_proc()) - return FAIL; - if(S_SUCCESS != bds_init(network_class)) + if(HG_SUCCESS != HG_Bulk_init(network_class)) return FAIL; /* Register function and encoding/decoding functions */ - fs_handler_register("eff_init", - H5VL_iod_server_eff_init, - H5VL_iod_server_decode_eff_init, - H5VL_iod_server_encode_eff_init); - fs_handler_register("eff_finalize", - H5VL_iod_server_eff_finalize, - NULL, - H5VL_iod_server_encode_eff_init); - fs_handler_register("file_create", - H5VL_iod_server_file_create, - H5VL_iod_server_decode_file_create, - H5VL_iod_server_encode_file_create); - fs_handler_register("file_open", - H5VL_iod_server_file_open, - H5VL_iod_server_decode_file_open, - H5VL_iod_server_encode_file_open); - fs_handler_register("file_flush", - H5VL_iod_server_file_flush, - H5VL_iod_server_decode_file_flush, - H5VL_iod_server_encode_file_flush); - fs_handler_register("file_close", - H5VL_iod_server_file_close, - H5VL_iod_server_decode_file_close, - H5VL_iod_server_encode_file_close); - fs_handler_register("group_create", - H5VL_iod_server_group_create, - H5VL_iod_server_decode_group_create, - H5VL_iod_server_encode_group_create); - fs_handler_register("group_open", - H5VL_iod_server_group_open, - H5VL_iod_server_decode_group_open, - H5VL_iod_server_encode_group_open); - fs_handler_register("group_close", - H5VL_iod_server_group_close, - H5VL_iod_server_decode_group_close, - H5VL_iod_server_encode_group_close); - fs_handler_register("dset_create", - H5VL_iod_server_dset_create, - H5VL_iod_server_decode_dset_create, - H5VL_iod_server_encode_dset_create); - fs_handler_register("dset_open", - H5VL_iod_server_dset_open, - H5VL_iod_server_decode_dset_open, - H5VL_iod_server_encode_dset_open); - fs_handler_register("dset_read", - H5VL_iod_server_dset_read, - H5VL_iod_server_decode_dset_io, - H5VL_iod_server_encode_dset_read); - fs_handler_register("dset_write", - H5VL_iod_server_dset_write, - H5VL_iod_server_decode_dset_io, - H5VL_iod_server_encode_dset_write); - fs_handler_register("dset_set_extent", - H5VL_iod_server_dset_set_extent, - H5VL_iod_server_decode_dset_set_extent, - H5VL_iod_server_encode_dset_set_extent); - fs_handler_register("dset_close", - H5VL_iod_server_dset_close, - H5VL_iod_server_decode_dset_close, - H5VL_iod_server_encode_dset_close); + MERCURY_HANDLER_REGISTER("eff_init", H5VL_iod_server_eff_init, + eff_init_in_t, ret_t); + MERCURY_HANDLER_REGISTER("eff_finalize", H5VL_iod_server_eff_finalize, + ret_t, ret_t); + + MERCURY_HANDLER_REGISTER("file_create", H5VL_iod_server_file_create, + file_create_in_t, file_create_out_t); + MERCURY_HANDLER_REGISTER("file_open", H5VL_iod_server_file_open, + file_open_in_t, file_open_out_t); + MERCURY_HANDLER_REGISTER("file_flush", H5VL_iod_server_file_flush, + file_flush_in_t, ret_t); + MERCURY_HANDLER_REGISTER("file_close", H5VL_iod_server_file_close, + file_close_in_t, ret_t); + + MERCURY_HANDLER_REGISTER("group_create", H5VL_iod_server_group_create, + group_create_in_t, group_create_out_t); + MERCURY_HANDLER_REGISTER("group_open", H5VL_iod_server_group_open, + group_open_in_t, group_open_out_t); + MERCURY_HANDLER_REGISTER("group_close", H5VL_iod_server_group_close, + group_close_in_t, ret_t); + + MERCURY_HANDLER_REGISTER("dset_create", H5VL_iod_server_dset_create, + dset_create_in_t, dset_create_out_t); + MERCURY_HANDLER_REGISTER("dset_open", H5VL_iod_server_dset_open, + dset_open_in_t, dset_open_out_t); + MERCURY_HANDLER_REGISTER("dset_read", H5VL_iod_server_dset_read, + dset_io_in_t, dset_read_out_t); + MERCURY_HANDLER_REGISTER("dset_write", H5VL_iod_server_dset_write, + dset_io_in_t, ret_t); + MERCURY_HANDLER_REGISTER("dset_set_extent", H5VL_iod_server_dset_set_extent, + dset_set_extent_in_t, ret_t); + MERCURY_HANDLER_REGISTER("dset_close", H5VL_iod_server_dset_close, + dset_close_in_t, ret_t); /* Loop tp receive requests from clients */ while(1) { fprintf(stderr, "Server In Loop\n"); /* Receive new function calls */ - if(S_SUCCESS != fs_handler_process(FS_HANDLER_MAX_IDLE_TIME)) + if(HG_SUCCESS != HG_Handler_process(HG_HANDLER_MAX_IDLE_TIME)) return FAIL; if(shutdown) break; } - if(S_SUCCESS != bds_finalize()) + if(HG_SUCCESS != HG_Bulk_finalize()) return FAIL; - if(S_SUCCESS != fs_handler_finalize()) + if(HG_SUCCESS != HG_Handler_finalize()) return FAIL; return ret_value; @@ -195,7 +164,7 @@ H5VLiod_start_handler(MPI_Comm comm, MPI_Info UNUSED info) * Purpose: Function shipper registered call for initializing the eff stack. * this will initialize the IOD library * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -204,27 +173,27 @@ H5VLiod_start_handler(MPI_Comm comm, MPI_Info UNUSED info) *------------------------------------------------------------------------- */ int -H5VL_iod_server_eff_init(fs_handle_t handle) +H5VL_iod_server_eff_init(hg_handle_t handle) { int num_procs; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT - if(S_FAIL == fs_handler_get_input(handle, &num_procs)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, &num_procs)) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(iod_initialize(iod_comm, NULL, num_procs, num_procs, NULL) < 0 ) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, S_FAIL, "can't initialize"); + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, HG_FAIL, "can't initialize"); /* MSC - this needs to be changed to be the number of peers connecting to this server */ num_peers = num_procs; if(AXE_SUCCEED != AXEcreate_engine(4, &engine)) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, S_FAIL, "can't start AXE engine"); + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, HG_FAIL, "can't start AXE engine"); done: - fs_handler_complete(handle, &ret_value); + HG_Handler_start_output(handle, &ret_value); FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_server_eff_init() */ @@ -234,7 +203,7 @@ done: * * Purpose: Function to shutdown server * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -243,9 +212,9 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_eff_finalize(fs_handle_t handle) +H5VL_iod_server_eff_finalize(hg_handle_t handle) { - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT @@ -253,14 +222,14 @@ H5VL_iod_server_eff_finalize(fs_handle_t handle) if(terminate_requests == num_peers) { if(iod_finalize(NULL, NULL) < 0 ) - HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, S_FAIL, "can't finalize IOD"); + HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, HG_FAIL, "can't finalize IOD"); if(AXE_SUCCEED != AXEterminate_engine(engine, TRUE)) - HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, S_FAIL, "can't shutdown AXE engine"); + HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, HG_FAIL, "can't shutdown AXE engine"); shutdown = TRUE; } done: - fs_handler_complete(handle, &ret_value); + HG_Handler_start_output(handle, &ret_value); FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_server_eff_finalize() */ @@ -271,7 +240,7 @@ done: * Purpose: Function shipper registered call for File Create. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -280,28 +249,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_file_create(fs_handle_t handle) +H5VL_iod_server_file_create(hg_handle_t handle) { H5VL_iod_file_create_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_file_create_input_t *) H5MM_malloc(sizeof(H5VL_iod_file_create_input_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_file_create_cb, input, NULL)) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -314,7 +283,7 @@ done: * Purpose: Function shipper registered call for File Open. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -323,28 +292,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_file_open(fs_handle_t handle) +H5VL_iod_server_file_open(hg_handle_t handle) { H5VL_iod_file_open_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_file_open_input_t *) H5MM_malloc(sizeof(H5VL_iod_file_open_input_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_file_open_cb, input, NULL)) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -357,7 +326,7 @@ done: * Purpose: Function shipper registered call for File Flush. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -366,28 +335,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_file_flush(fs_handle_t handle) +H5VL_iod_server_file_flush(hg_handle_t handle) { H5VL_iod_file_flush_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_file_flush_input_t *) H5MM_malloc(sizeof(H5VL_iod_file_flush_input_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_file_flush_cb, input, NULL)) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -400,7 +369,7 @@ done: * Purpose: Function shipper registered call for File Close. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -409,28 +378,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_file_close(fs_handle_t handle) +H5VL_iod_server_file_close(hg_handle_t handle) { H5VL_iod_remote_file_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_remote_file_t *) H5MM_malloc(sizeof(H5VL_iod_remote_file_t)))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_file_close_cb, input, NULL)) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -443,7 +412,7 @@ done: * Purpose: Function shipper registered call for Group Create. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -452,28 +421,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_group_create(fs_handle_t handle) +H5VL_iod_server_group_create(hg_handle_t handle) { H5VL_iod_group_create_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_group_create_input_t *) H5MM_malloc(sizeof(H5VL_iod_group_create_input_t)))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_group_create_cb, input, NULL)) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -486,7 +455,7 @@ done: * Purpose: Function shipper registered call for Group Open. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -495,28 +464,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_group_open(fs_handle_t handle) +H5VL_iod_server_group_open(hg_handle_t handle) { H5VL_iod_group_open_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_group_open_input_t *) H5MM_malloc(sizeof(H5VL_iod_group_open_input_t)))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_group_open_cb, input, NULL)) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -529,7 +498,7 @@ done: * Purpose: Function shipper registered call for Group Close. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -538,28 +507,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_group_close(fs_handle_t handle) +H5VL_iod_server_group_close(hg_handle_t handle) { H5VL_iod_remote_group_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_remote_group_t *) H5MM_malloc(sizeof(H5VL_iod_remote_group_t)))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_group_close_cb, input, NULL)) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -572,7 +541,7 @@ done: * Purpose: Function shipper registered call for Dset Create. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -581,28 +550,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_dset_create(fs_handle_t handle) +H5VL_iod_server_dset_create(hg_handle_t handle) { H5VL_iod_dset_create_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_dset_create_input_t *) H5MM_malloc(sizeof(H5VL_iod_dset_create_input_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_dset_create_cb, input, NULL)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -615,7 +584,7 @@ done: * Purpose: Function shipper registered call for Dset Open. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -624,28 +593,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_dset_open(fs_handle_t handle) +H5VL_iod_server_dset_open(hg_handle_t handle) { H5VL_iod_dset_open_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_dset_open_input_t *) H5MM_malloc(sizeof(H5VL_iod_dset_open_input_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_dset_open_cb, input, NULL)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -658,7 +627,7 @@ done: * Purpose: Function shipper registered call for Dset Read. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -667,28 +636,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_dset_read(fs_handle_t handle) +H5VL_iod_server_dset_read(hg_handle_t handle) { H5VL_iod_dset_io_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_dset_io_input_t *) H5MM_malloc(sizeof(H5VL_iod_dset_io_input_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_dset_read_cb, input, NULL)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -701,7 +670,7 @@ done: * Purpose: Function shipper registered call for Dset Write. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -710,28 +679,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_dset_write(fs_handle_t handle) +H5VL_iod_server_dset_write(hg_handle_t handle) { H5VL_iod_dset_io_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_dset_io_input_t *) H5MM_malloc(sizeof(H5VL_iod_dset_io_input_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_dset_write_cb, input, NULL)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -744,7 +713,7 @@ done: * Purpose: Function shipper registered call for Dset Set_Extent. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -753,29 +722,29 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_dset_set_extent(fs_handle_t handle) +H5VL_iod_server_dset_set_extent(hg_handle_t handle) { H5VL_iod_dset_set_extent_input_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_dset_set_extent_input_t *) H5MM_malloc(sizeof(H5VL_iod_dset_set_extent_input_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_dset_set_extent_cb, input, NULL)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -788,7 +757,7 @@ done: * Purpose: Function shipper registered call for Dset Close. * Inserts the real worker routine into the Async Engine. * - * Return: Success: S_SUCCESS + * Return: Success: HG_SUCCESS * Failure: Negative * * Programmer: Mohamad Chaarawi @@ -797,28 +766,28 @@ done: *------------------------------------------------------------------------- */ int -H5VL_iod_server_dset_close(fs_handle_t handle) +H5VL_iod_server_dset_close(hg_handle_t handle) { H5VL_iod_remote_dset_t *input = NULL; AXE_task_t task; - int ret_value = S_SUCCESS; + int ret_value = HG_SUCCESS; FUNC_ENTER_NOAPI_NOINIT if(NULL == (input = (H5VL_iod_remote_dset_t *) H5MM_malloc(sizeof(H5VL_iod_remote_dset_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, S_FAIL, "can't allocate input struct for decoding"); + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding"); - if(S_FAIL == fs_handler_get_input(handle, input)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, S_FAIL, "can't get input parameters"); + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HG_FAIL, "can't get input parameters"); if(NULL == engine) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, S_FAIL, "AXE engine not started"); + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); - input->fs_handle = handle; + input->hg_handle = handle; if (AXE_SUCCEED != AXEcreate_task(engine, &task, 0, NULL, 0, NULL, H5VL_iod_server_dset_close_cb, input, NULL)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, S_FAIL, "can't insert task into async engine"); + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -844,7 +813,7 @@ H5VL_iod_server_file_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U void *op_data) { H5VL_iod_file_create_input_t *input = (H5VL_iod_file_create_input_t *)op_data; - H5VL_iod_server_remote_file_t output; + H5VL_iod_remote_file_t output; unsigned int mode; iod_handle_t coh; iod_handle_t root_handle, scratch_handle; @@ -854,7 +823,7 @@ H5VL_iod_server_file_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U FUNC_ENTER_NOAPI_NOINIT - fprintf(stderr, "Start file create\n"); + fprintf(stderr, "Start file create %s %d %d\n", input->name, input->fapl_id, input->fcpl_id); /* convert HDF5 flags to IOD flags */ mode = (input->flags&H5F_ACC_RDWR) ? IOD_CONT_RW : IOD_CONT_RO; @@ -919,18 +888,14 @@ H5VL_iod_server_file_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U output.scratch_oh = scratch_handle; fprintf(stderr, "Done with file create, sending response to client\n"); - fs_handler_complete(input->fs_handle, &output); + HG_Handler_start_output(input->hg_handle, &output); done: if(ret_value < 0) - fs_handler_complete(input->fs_handle, &ret_value); + HG_Handler_start_output(input->hg_handle, &ret_value); - if(H5P_FILE_CREATE_DEFAULT != input->fcpl_id) - H5Pclose(input->fcpl_id); - if(H5P_FILE_ACCESS_DEFAULT != input->fapl_id) - H5Pclose(input->fapl_id); - H5MM_free(input->name); input = H5MM_xfree(input); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_server_file_create_cb() */ @@ -954,8 +919,8 @@ H5VL_iod_server_file_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU void *op_data) { H5VL_iod_file_open_input_t *input = (H5VL_iod_file_open_input_t *)op_data; - H5VL_iod_server_remote_file_t output; - unsigned int mode; + H5VL_iod_remote_file_t output; + unsigned int mode = input->flags; iod_handle_t coh; iod_handle_t root_handle, scratch_handle; iod_obj_id_t scratch_pad; @@ -964,7 +929,7 @@ H5VL_iod_server_file_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU FUNC_ENTER_NOAPI_NOINIT - fprintf(stderr, "Start file open\n"); + fprintf(stderr, "Start file open %s %d %d\n", input->name, input->flags, input->fapl_id); if((status = iod_container_open(input->name, NULL /*hints*/, mode, &coh, NULL /*event*/)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open file"); @@ -987,20 +952,17 @@ H5VL_iod_server_file_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU output.root_oh = root_handle; output.scratch_id = scratch_pad; output.scratch_oh = scratch_handle; - output.fcpl_size = 0; + output.fcpl_id = H5P_FILE_CREATE_DEFAULT; fprintf(stderr, "Done with file open, sending response to client\n"); - fs_handler_complete(input->fs_handle, &output); + HG_Handler_start_output(input->hg_handle, &output); done: if(ret_value < 0) - fs_handler_complete(input->fs_handle, &ret_value); - - if(H5P_FILE_ACCESS_DEFAULT != input->fapl_id) - H5Pclose(input->fapl_id); - H5MM_free(input->name); + HG_Handler_start_output(input->hg_handle, &ret_value); input = H5MM_xfree(input); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_server_file_open_cb() */ @@ -1033,8 +995,8 @@ H5VL_iod_server_file_flush_cb(size_t UNUSED num_necessary_parents, AXE_task_t UN fprintf(stderr, "Start file flush with scope %d\n", scope); done: - fprintf(stderr, "Done with file flush, sending response %d to client\n", ret_value); - if(S_SUCCESS != fs_handler_complete(input->fs_handle, &ret_value)) + fprintf(stderr, "Done with file flush, sending response to client\n"); + if(HG_SUCCESS != HG_Handler_start_output(input->hg_handle, &ret_value)) HDONE_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't send result of file flush to client"); input = H5MM_xfree(input); @@ -1078,8 +1040,8 @@ H5VL_iod_server_file_close_cb(size_t UNUSED num_necessary_parents, AXE_task_t UN HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "can't close container"); done: - fprintf(stderr, "Done with file close, sending response %d to client\n", ret_value); - if(S_SUCCESS != fs_handler_complete(input->fs_handle, &ret_value)) + fprintf(stderr, "Done with file close, sending response to client\n"); + if(HG_SUCCESS != HG_Handler_start_output(input->hg_handle, &ret_value)) HDONE_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't send result of file close to client"); input = H5MM_xfree(input); @@ -1106,7 +1068,7 @@ H5VL_iod_server_group_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t void *op_data) { H5VL_iod_group_create_input_t *input = (H5VL_iod_group_create_input_t *)op_data; - H5VL_iod_server_remote_group_t output; + H5VL_iod_remote_group_t output; iod_handle_t coh = input->coh; iod_handle_t loc_handle = input->loc_oh; iod_handle_t cur_oh, scratch_handle; @@ -1230,20 +1192,13 @@ H5VL_iod_server_group_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t output.scratch_oh = scratch_handle; fprintf(stderr, "Done with group create, sending response to client\n"); - fs_handler_complete(input->fs_handle, &output); + HG_Handler_start_output(input->hg_handle, &output); done: if(ret_value < 0) - fs_handler_complete(input->fs_handle, &ret_value); - - if(H5P_GROUP_CREATE_DEFAULT != input->gcpl_id) - H5Pclose(input->gcpl_id); - if(H5P_GROUP_ACCESS_DEFAULT != input->gapl_id) - H5Pclose(input->gapl_id); - if(H5P_LINK_CREATE_DEFAULT != input->lcpl_id) - H5Pclose(input->lcpl_id); - H5MM_free(input->name); + HG_Handler_start_output(input->hg_handle, &ret_value); input = H5MM_xfree(input); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_server_group_create_cb() */ @@ -1267,7 +1222,7 @@ H5VL_iod_server_group_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UN void *op_data) { H5VL_iod_group_open_input_t *input = (H5VL_iod_group_open_input_t *)op_data; - H5VL_iod_server_remote_group_t output; + H5VL_iod_remote_group_t output; iod_handle_t coh = input->coh; iod_handle_t loc_handle = input->loc_oh; iod_handle_t cur_oh, scratch_handle; @@ -1340,9 +1295,6 @@ H5VL_iod_server_group_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UN if (iod_obj_open_write(coh, scratch_pad, NULL /*hints*/, &scratch_handle, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); - /* MSC - need to store the gcpl in create */ - output.gcpl_size = 0; - output.gcpl = NULL; #if 0 if(iod_kv_get_value(scratch_handle, IOD_TID_UNKNOWN, "dataset_gcpl", NULL, &output.gcpl_size, NULL, NULL) < 0) @@ -1362,19 +1314,14 @@ H5VL_iod_server_group_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UN output.iod_oh = cur_oh; output.scratch_id = scratch_pad; output.scratch_oh = scratch_handle; + output.gcpl_id = H5P_GROUP_CREATE_DEFAULT; fprintf(stderr, "Done with group open, sending response to client\n"); - fs_handler_complete(input->fs_handle, &output); + HG_Handler_start_output(input->hg_handle, &output); done: if(ret_value < 0) - fs_handler_complete(input->fs_handle, &ret_value); - - - H5MM_xfree(output.gcpl); - if(H5P_GROUP_ACCESS_DEFAULT != input->gapl_id) - H5Pclose(input->gapl_id); - H5MM_free(input->name); + HG_Handler_start_output(input->hg_handle, &ret_value); input = H5MM_xfree(input); FUNC_LEAVE_NOAPI(ret_value) @@ -1415,7 +1362,7 @@ H5VL_iod_server_group_close_cb(size_t UNUSED num_necessary_parents, AXE_task_t U done: fprintf(stderr, "Done with group close, sending response to client\n"); - fs_handler_complete(input->fs_handle, &ret_value); + HG_Handler_start_output(input->hg_handle, &ret_value); input = H5MM_xfree(input); FUNC_LEAVE_NOAPI(ret_value) @@ -1441,7 +1388,7 @@ H5VL_iod_server_dset_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U void *op_data) { H5VL_iod_dset_create_input_t *input = (H5VL_iod_dset_create_input_t *)op_data; - H5VL_iod_server_remote_dset_t output; + H5VL_iod_remote_dset_t output; iod_handle_t coh = input->coh; iod_handle_t loc_handle = input->loc_oh; iod_handle_t cur_oh, scratch_handle; @@ -1578,10 +1525,10 @@ H5VL_iod_server_dset_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U kv.key = HDstrdup(comp); kv.value = &cur_id; kv.value_len = sizeof(iod_obj_id_t); - /* insert new dataset in kv store of current group */ if (iod_kv_set(cur_oh, IOD_TID_UNKNOWN, NULL, &kv, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent"); + HDfree(kv.key); /* create scratch pad for dataset */ if (iod_obj_create(coh, IOD_TID_UNKNOWN, NULL/*hints*/, IOD_OBJ_KV, NULL, NULL, @@ -1602,7 +1549,6 @@ H5VL_iod_server_dset_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U /* insert layout metadata into scratch pad */ kv.key = HDstrdup("dataset_dcpl"); - /* determine the buffer size needed to store the encoded dcpl of the dataset */ if(H5Pencode(input->dcpl_id, NULL, &buf_size) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "failed to encode dataset dcpl"); @@ -1617,8 +1563,6 @@ H5VL_iod_server_dset_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent"); HDfree(kv.key); free(kv.value); - if(H5P_DATASET_CREATE_DEFAULT != input->dcpl_id) - H5Pclose(input->dcpl_id); /* insert datatyoe metadata into scratch pad */ kv.key = HDstrdup("dataset_dtype"); @@ -1636,7 +1580,6 @@ H5VL_iod_server_dset_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent"); HDfree(kv.key); free(kv.value); - H5Tclose(input->type_id); kv.key = HDstrdup("dataset_dspace"); /* determine the buffer size needed to store the encoded space of the dataset */ @@ -1653,7 +1596,6 @@ H5VL_iod_server_dset_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent"); HDfree(kv.key); free(kv.value); - H5Sclose(input->space_id); /* Release temporary component buffer */ if(wb && H5WB_unwrap(wb) < 0) @@ -1668,19 +1610,13 @@ H5VL_iod_server_dset_create_cb(size_t UNUSED num_necessary_parents, AXE_task_t U free(array.current_dims); fprintf(stderr, "Done with dset create, sending response to client\n"); - fs_handler_complete(input->fs_handle, &output); + HG_Handler_start_output(input->hg_handle, &output); done: if(ret_value < 0) - fs_handler_complete(input->fs_handle, &ret_value); - - if(H5P_DATASET_ACCESS_DEFAULT != input->dapl_id) - H5Pclose(input->dapl_id); - if(H5P_LINK_CREATE_DEFAULT != input->lcpl_id) - H5Pclose(input->lcpl_id); - H5MM_free(input->name); - + HG_Handler_start_output(input->hg_handle, &ret_value); input = H5MM_xfree(input); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_server_dset_create_cb() */ @@ -1704,7 +1640,7 @@ H5VL_iod_server_dset_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU void *op_data) { H5VL_iod_dset_open_input_t *input = (H5VL_iod_dset_open_input_t *)op_data; - H5VL_iod_server_remote_dset_t output; + H5VL_iod_remote_dset_t output; iod_handle_t coh = input->coh; iod_handle_t loc_handle = input->loc_oh; iod_handle_t cur_oh, scratch_handle; @@ -1779,7 +1715,6 @@ H5VL_iod_server_dset_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU #if 0 /*retrieve all metadata from scratch pad */ - output.dcpl_size = 0; if(iod_kv_get_value(scratch_handle, IOD_TID_UNKNOWN, "dataset_dcpl", NULL, &output.dcpl_size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "dataset dcpl lookup failed"); @@ -1789,7 +1724,6 @@ H5VL_iod_server_dset_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU &output.dcpl_size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "dataset dcpl lookup failed"); - output.dtype_size = 0; if(iod_kv_get_value(scratch_handle, IOD_TID_UNKNOWN, "dataset_dtype", NULL, &output.dtype_size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "dataset dtype lookup failed"); @@ -1799,7 +1733,6 @@ H5VL_iod_server_dset_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU &output.dtype_size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "dataset dtype lookup failed"); - output.dspace_size = 0; if(iod_kv_get_value(scratch_handle, IOD_TID_UNKNOWN, "dataset_dspace", NULL, &output.dspace_size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "dataset dspace lookup failed"); @@ -1809,16 +1742,18 @@ H5VL_iod_server_dset_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU &output.dspace_size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "dataset dspace lookup failed"); #endif -#if 1 + /* fake a dataspace, type, and dcpl */ { hsize_t dims[1]; - hid_t space_id, type_id; + //hid_t space_id, type_id; dims [0] = 60; - space_id = H5Screate_simple(1, dims, NULL); - type_id = H5T_NATIVE_INT; + output.space_id = H5Screate_simple(1, dims, NULL); + output.type_id = H5Tcopy(H5T_NATIVE_INT); + output.dcpl_id = H5P_DATASET_CREATE_DEFAULT; +#if 0 output.dcpl_size = 0; output.dcpl = NULL; @@ -1839,9 +1774,10 @@ H5VL_iod_server_dset_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace"); H5Sclose(space_id); - } #endif + } + /* Release temporary component buffer */ if(wb && H5WB_unwrap(wb) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't release wrapped buffer"); @@ -1852,19 +1788,11 @@ H5VL_iod_server_dset_open_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU output.scratch_oh = scratch_handle; fprintf(stderr, "Done with dset open, sending response to client\n"); - fs_handler_complete(input->fs_handle, &output); + HG_Handler_start_output(input->hg_handle, &output); done: if(ret_value < 0) - fs_handler_complete(input->fs_handle, &ret_value); - - H5MM_xfree(output.dcpl); - H5MM_xfree(output.dtype); - H5MM_xfree(output.dspace); - - if(H5P_DATASET_ACCESS_DEFAULT != input->dapl_id) - H5Pclose(input->dapl_id); - H5MM_free(input->name); + HG_Handler_start_output(input->hg_handle, &ret_value); input = H5MM_xfree(input); FUNC_LEAVE_NOAPI(ret_value) @@ -1893,21 +1821,21 @@ H5VL_iod_server_dset_read_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU H5VL_iod_read_status_t output; iod_handle_t iod_oh = input->iod_oh; iod_handle_t scratch_oh = input->scratch_oh; - bds_handle_t bds_handle = input->bds_handle; + hg_bulk_t bulk_handle = input->bulk_handle; hid_t space_id = input->space_id; hid_t dxpl_id = input->dxpl_id; - bds_block_handle_t bds_block_handle; + hg_bulk_block_t bulk_block_handle; iod_mem_desc_t mem_desc; iod_array_iodesc_t file_desc; size_t size; void *buf; uint32_t cs = 0; - na_addr_t dest = fs_handler_get_addr(input->fs_handle); + na_addr_t dest = HG_Handler_get_addr(input->hg_handle); herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT - size = bds_handle_get_size(bds_handle); + size = HG_Bulk_handle_get_size(bulk_handle); fprintf(stderr, "Start dataset Read of size %d\n", size); if(NULL == (buf = malloc(size))) HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate read buffer"); @@ -1940,13 +1868,13 @@ H5VL_iod_server_dset_read_cb(size_t UNUSED num_necessary_parents, AXE_task_t UNU } /* Create a new block handle to write the data */ - bds_block_handle_create(buf, size, BDS_READ_ONLY, &bds_block_handle); + HG_Bulk_block_handle_create(buf, size, HG_BULK_READ_ONLY, &bulk_block_handle); /* Write bulk data here and wait for the data to be there */ - if(S_SUCCESS != bds_write(bds_handle, dest, bds_block_handle)) + if(HG_SUCCESS != HG_Bulk_write(bulk_handle, dest, bulk_block_handle)) HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object"); /* wait for it to complete */ - if(S_SUCCESS != bds_wait(bds_block_handle, BDS_MAX_IDLE_TIME)) + if(HG_SUCCESS != HG_Bulk_wait(bulk_block_handle, HG_BULK_MAX_IDLE_TIME)) HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object"); done: @@ -1955,16 +1883,10 @@ done: fprintf(stderr, "Done with dset read, sending response to client\n"); - if(S_SUCCESS != fs_handler_complete(input->fs_handle, &output)) + if(HG_SUCCESS != HG_Handler_start_output(input->hg_handle, &output)) HDONE_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't send result of write to client"); - if(S_SUCCESS != bds_handle_free(input->bds_handle)) + if(HG_SUCCESS != HG_Bulk_block_handle_free(bulk_block_handle)) HDONE_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't free bds block handle"); - if(S_SUCCESS != bds_block_handle_free(bds_block_handle)) - HDONE_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't free bds block handle"); - - if(H5P_DATASET_XFER_DEFAULT != input->dxpl_id) - H5Pclose(input->dxpl_id); - H5Sclose(input->space_id); input = H5MM_xfree(input); free(buf); @@ -1994,17 +1916,17 @@ H5VL_iod_server_dset_write_cb(size_t UNUSED num_necessary_parents, AXE_task_t UN H5VL_iod_dset_io_input_t *input = (H5VL_iod_dset_io_input_t *)op_data; iod_handle_t iod_oh = input->iod_oh; iod_handle_t scratch_oh = input->scratch_oh; - bds_handle_t bds_handle = input->bds_handle; + hg_bulk_t bulk_handle = input->bulk_handle; hid_t space_id = input->space_id; hid_t dxpl_id = input->dxpl_id; uint32_t cs = input->checksum; - bds_block_handle_t bds_block_handle; + hg_bulk_block_t bulk_block_handle; iod_mem_desc_t mem_desc; iod_array_iodesc_t file_desc; size_t size; void *buf; ssize_t ret; - na_addr_t source = fs_handler_get_addr(input->fs_handle); + na_addr_t source = HG_Handler_get_addr(input->hg_handle); herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -2012,21 +1934,21 @@ H5VL_iod_server_dset_write_cb(size_t UNUSED num_necessary_parents, AXE_task_t UN fprintf(stderr, "Start dataset Write with checksum %u\n", cs); /* Read bulk data here and wait for the data to be here */ - size = bds_handle_get_size(bds_handle); + size = HG_Bulk_handle_get_size(bulk_handle); if(NULL == (buf = malloc(size))) HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate read buffer"); - bds_block_handle_create(buf, size, BDS_READWRITE, &bds_block_handle); + HG_Bulk_block_handle_create(buf, size, HG_BULK_READWRITE, &bulk_block_handle); /* Write bulk data here and wait for the data to be there */ - if(S_SUCCESS != bds_read(bds_handle, source, bds_block_handle)) + if(HG_SUCCESS != HG_Bulk_read(bulk_handle, source, bulk_block_handle)) HGOTO_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't get data from function shipper"); /* wait for it to complete */ - if(S_SUCCESS != bds_wait(bds_block_handle, BDS_MAX_IDLE_TIME)) + if(HG_SUCCESS != HG_Bulk_wait(bulk_block_handle, HG_BULK_MAX_IDLE_TIME)) HGOTO_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't get data from function shipper"); /* free the bds block handle */ - if(S_SUCCESS != bds_block_handle_free(bds_block_handle)) + if(HG_SUCCESS != HG_Bulk_block_handle_free(bulk_block_handle)) HGOTO_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't free bds block handle"); { @@ -2050,15 +1972,9 @@ H5VL_iod_server_dset_write_cb(size_t UNUSED num_necessary_parents, AXE_task_t UN HGOTO_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't write to array object"); done: - fprintf(stderr, "Done with dset write, sending response to client\n"); - if(S_SUCCESS != fs_handler_complete(input->fs_handle, &ret_value)) + fprintf(stderr, "Done with dset write, sending %d response to client\n", ret_value); + if(HG_SUCCESS != HG_Handler_start_output(input->hg_handle, &ret_value)) HDONE_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't send result of write to client"); - if(S_SUCCESS != bds_handle_free(input->bds_handle)) - HDONE_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't free bds block handle"); - - if(H5P_DATASET_XFER_DEFAULT != input->dxpl_id) - H5Pclose(input->dxpl_id); - H5Sclose(input->space_id); input = H5MM_xfree(input); free(buf); @@ -2087,22 +2003,21 @@ H5VL_iod_server_dset_set_extent_cb(size_t UNUSED num_necessary_parents, AXE_task { H5VL_iod_dset_set_extent_input_t *input = (H5VL_iod_dset_set_extent_input_t *)op_data; iod_handle_t iod_oh = input->iod_oh; - int rank = input->rank; + int rank = input->dims.rank; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT - fprintf(stderr, "Start dataset Extend on the first dimension to %d\n", input->size[0]); + fprintf(stderr, "Start dataset Extend on the first dimension to %d\n", input->dims.size[0]); - if(iod_array_extend(iod_oh, IOD_TID_UNKNOWN, (iod_size_t)input->size[0], NULL) < 0) + if(iod_array_extend(iod_oh, IOD_TID_UNKNOWN, (iod_size_t)input->dims.size[0], NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't extend dataset"); done: fprintf(stderr, "Done with dset set_extent, sending response to client\n"); - fs_handler_complete(input->fs_handle, &ret_value); - - free(input->size); + HG_Handler_start_output(input->hg_handle, &ret_value); input = H5MM_xfree(input); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_server_dset_set_extent_cb() */ @@ -2141,7 +2056,7 @@ H5VL_iod_server_dset_close_cb(size_t UNUSED num_necessary_parents, AXE_task_t UN done: fprintf(stderr, "Done with dset close, sending response to client\n"); - fs_handler_complete(input->fs_handle, &ret_value); + HG_Handler_start_output(input->hg_handle, &ret_value); input = H5MM_xfree(input); FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VLiod_server.h b/src/H5VLiod_server.h index 7b2256b..6d2d15d 100644 --- a/src/H5VLiod_server.h +++ b/src/H5VLiod_server.h @@ -19,7 +19,6 @@ #ifndef _H5VLiod_server_H #define _H5VLiod_server_H -#include "H5VLiod.h" /* Iod VOL plugin */ #include "H5VLiod_common.h" #ifdef H5_HAVE_EFF @@ -59,49 +58,21 @@ typedef struct H5VL_iod_server_remote_dset_t { void *dspace; } H5VL_iod_server_remote_dset_t; -H5_DLL int H5VL_iod_server_eff_init(fs_handle_t handle); -H5_DLL int H5VL_iod_server_eff_finalize(fs_handle_t handle); -H5_DLL int H5VL_iod_server_file_create(fs_handle_t handle); -H5_DLL int H5VL_iod_server_file_open(fs_handle_t handle); -H5_DLL int H5VL_iod_server_file_flush(fs_handle_t handle); -H5_DLL int H5VL_iod_server_file_close(fs_handle_t handle); -H5_DLL int H5VL_iod_server_group_create(fs_handle_t handle); -H5_DLL int H5VL_iod_server_group_open(fs_handle_t handle); -H5_DLL int H5VL_iod_server_group_close(fs_handle_t handle); -H5_DLL int H5VL_iod_server_dset_create(fs_handle_t handle); -H5_DLL int H5VL_iod_server_dset_open(fs_handle_t handle); -H5_DLL int H5VL_iod_server_dset_read(fs_handle_t handle); -H5_DLL int H5VL_iod_server_dset_write(fs_handle_t handle); -H5_DLL int H5VL_iod_server_dset_set_extent(fs_handle_t handle); -H5_DLL int H5VL_iod_server_dset_close(fs_handle_t handle); - -H5_DLL herr_t H5VL_iod_server_encode_eff_init(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_eff_init(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_file_create(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_file_create(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_file_open(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_file_open(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_file_flush(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_file_flush(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_file_close(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_file_close(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_group_create(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_group_create(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_group_open(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_group_open(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_group_close(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_group_close(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_dset_create(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_dset_create(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_dset_open(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_dset_open(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_dset_read(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_dset_write(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_dset_io(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_dset_set_extent(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_dset_set_extent(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_encode_dset_close(fs_proc_t proc, void *_input); -H5_DLL herr_t H5VL_iod_server_decode_dset_close(fs_proc_t proc, void *_input); +H5_DLL int H5VL_iod_server_eff_init(hg_handle_t handle); +H5_DLL int H5VL_iod_server_eff_finalize(hg_handle_t handle); +H5_DLL int H5VL_iod_server_file_create(hg_handle_t handle); +H5_DLL int H5VL_iod_server_file_open(hg_handle_t handle); +H5_DLL int H5VL_iod_server_file_flush(hg_handle_t handle); +H5_DLL int H5VL_iod_server_file_close(hg_handle_t handle); +H5_DLL int H5VL_iod_server_group_create(hg_handle_t handle); +H5_DLL int H5VL_iod_server_group_open(hg_handle_t handle); +H5_DLL int H5VL_iod_server_group_close(hg_handle_t handle); +H5_DLL int H5VL_iod_server_dset_create(hg_handle_t handle); +H5_DLL int H5VL_iod_server_dset_open(hg_handle_t handle); +H5_DLL int H5VL_iod_server_dset_read(hg_handle_t handle); +H5_DLL int H5VL_iod_server_dset_write(hg_handle_t handle); +H5_DLL int H5VL_iod_server_dset_set_extent(hg_handle_t handle); +H5_DLL int H5VL_iod_server_dset_close(hg_handle_t handle); #endif /* H5_HAVE_EFF */ #endif /* _H5VLiod_server_H */ diff --git a/src/H5VLiod_server_encdec.c b/src/H5VLiod_server_encdec.c deleted file mode 100644 index 2c03554..0000000 --- a/src/H5VLiod_server_encdec.c +++ /dev/null @@ -1,1174 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#define H5P_PACKAGE /*suppress error about including H5Ppkg */ - -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5VLprivate.h" /* VOL plugins */ -#include "H5VLiod.h" /* Iod VOL plugin */ -#include "H5VLiod_common.h" -#include "H5VLiod_server.h" - -#ifdef H5_HAVE_EFF - -/* - * Programmer: Mohamad Chaarawi - * February, 2012 - * - * Purpose: The IOD plugin server encode/decode code - */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_eff_init_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_eff_init(fs_proc_t proc, void *_input) -{ - int *input = (int *)_input; - void *buf=NULL; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - INT32DECODE(p, *input); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_eff_init() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_eff_init_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_eff_init(fs_proc_t proc, void *_output) -{ - herr_t *output = (herr_t *)_output; - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = sizeof(herr_t); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - INT32ENCODE(p, output); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_eff_init() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_file_create_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_file_create(fs_proc_t proc, void *_input) -{ - H5VL_iod_file_create_input_t *input = (H5VL_iod_file_create_input_t *)_input; - void *buf=NULL; - uint8_t *p; - size_t len = 0; /* length of name (decoded) */ - size_t fcpl_size = 0, fapl_size = 0; /* plist sizes */ - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode length of name and name */ - UINT64DECODE_VARLEN(p, len); - input->name = H5MM_xstrdup((const char *)(p)); - p += len; - - /* deocde create flags */ - H5_DECODE_UNSIGNED(p, input->flags); - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, fcpl_size); - /* decode property lists if they are not default*/ - if(fcpl_size) { - if((input->fcpl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += fcpl_size; - } - else { - input->fcpl_id = H5P_FILE_CREATE_DEFAULT; - } - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, fapl_size); - /* decode property lists if they are not default*/ - if(fapl_size) { - if((input->fapl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += fapl_size; - } - else { - input->fapl_id = H5P_FILE_ACCESS_DEFAULT; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_file_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_file_create_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_file_create(fs_proc_t proc, void *_output) -{ - H5VL_iod_remote_file_t *output = (H5VL_iod_remote_file_t *)_output; - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)output->coh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)output->root_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->root_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->root_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_oh.cookie); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - UINT64ENCODE_VARLEN(p, output->coh.cookie); - UINT64ENCODE_VARLEN(p, output->root_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->root_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->root_oh.cookie); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_file_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_file_open_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_file_open(fs_proc_t proc, void *_input) -{ - H5VL_iod_file_open_input_t *input = (H5VL_iod_file_open_input_t *)_input; - void *buf=NULL; - uint8_t *p; - size_t len = 0; /* length of name (decoded) */ - size_t fapl_size = 0; /* plist sizes */ - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode length of name and name */ - UINT64DECODE_VARLEN(p, len); - input->name = H5MM_xstrdup((const char *)(p)); - p += len; - - /* deocde open flags */ - H5_DECODE_UNSIGNED(p, input->flags); - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, fapl_size); - /* decode property lists if they are not default*/ - if(fapl_size) { - if((input->fapl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += fapl_size; - } - else { - input->fapl_id = H5P_FILE_ACCESS_DEFAULT; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_file_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_file_open_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_file_open(fs_proc_t proc, void *_output) -{ - H5VL_iod_server_remote_file_t *output = (H5VL_iod_server_remote_file_t *)_output; - void *buf = NULL; - size_t fcpl_size = output->fcpl_size; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)output->coh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)output->root_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->root_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->root_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)fcpl_size) + fcpl_size; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - UINT64ENCODE_VARLEN(p, output->coh.cookie); - UINT64ENCODE_VARLEN(p, output->root_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->root_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->root_oh.cookie); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->scratch_oh.cookie); - - /* encode the length of plist and the plist buffer (already encoded) */ - UINT64ENCODE_VARLEN(p, fcpl_size); - if(0 != fcpl_size) { - HDmemcpy(p, output->fcpl, fcpl_size); - p += fcpl_size; - } - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_file_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_file_flush_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_file_flush(fs_proc_t proc, void *_input) -{ - H5VL_iod_file_flush_input_t *input = (H5VL_iod_file_flush_input_t *)_input; - void *buf=NULL; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - input->scope = (H5F_scope_t)*p++; - UINT64DECODE_VARLEN(p, input->coh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_file_flush() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_file_flush_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_file_flush(fs_proc_t proc, void *_output) -{ - int output = *((int *)_output); - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = sizeof(int32_t); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - INT32ENCODE(p, output); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_file_flush() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_file_close_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_file_close(fs_proc_t proc, void *_input) -{ - H5VL_iod_remote_file_t *input = (H5VL_iod_remote_file_t *)_input; - void *buf=NULL; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, input->coh.cookie); - UINT64DECODE_VARLEN(p, input->root_id.oid_hi); - UINT64DECODE_VARLEN(p, input->root_id.oid_lo); - UINT64DECODE_VARLEN(p, input->root_oh.cookie); - UINT64DECODE_VARLEN(p, input->scratch_id.oid_hi); - UINT64DECODE_VARLEN(p, input->scratch_id.oid_lo); - UINT64DECODE_VARLEN(p, input->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_file_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_file_close_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_file_close(fs_proc_t proc, void *_output) -{ - int output = *((int *)_output); - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = sizeof(int32_t); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - INT32ENCODE(p, output); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_file_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_group_create_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_group_create(fs_proc_t proc, void *_input) -{ - H5VL_iod_group_create_input_t *input = (H5VL_iod_group_create_input_t *)_input; - void *buf=NULL; - uint8_t *p; - size_t len = 0; /* len of group name */ - size_t gcpl_size = 0, gapl_size = 0, lcpl_size = 0; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, input->coh.cookie); - UINT64DECODE_VARLEN(p, input->loc_id.oid_hi); - UINT64DECODE_VARLEN(p, input->loc_id.oid_lo); - UINT64DECODE_VARLEN(p, input->loc_oh.cookie); - - /* decode length of the group name and the actual group name */ - UINT64DECODE_VARLEN(p, len); - if(0 != len) { - input->name = H5MM_xstrdup((const char *)(p)); - p += len; - } - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, gcpl_size); - /* decode property lists if they are not default*/ - if(gcpl_size) { - if((input->gcpl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += gcpl_size; - } - else { - input->gcpl_id = H5P_GROUP_CREATE_DEFAULT; - } - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, gapl_size); - /* decode property lists if they are not default*/ - if(gapl_size) { - if((input->gapl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += gapl_size; - } - else { - input->gapl_id = H5P_GROUP_ACCESS_DEFAULT; - } - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, lcpl_size); - /* decode property lists if they are not default*/ - if(lcpl_size) { - if((input->lcpl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += lcpl_size; - } - else { - input->lcpl_id = H5P_LINK_CREATE_DEFAULT; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_group_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_group_create_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_group_create(fs_proc_t proc, void *_output) -{ - H5VL_iod_remote_group_t *output = (H5VL_iod_remote_group_t *)_output; - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)output->iod_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->iod_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->iod_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_oh.cookie); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - UINT64ENCODE_VARLEN(p, output->iod_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->iod_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->iod_oh.cookie); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_group_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_group_open_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_group_open(fs_proc_t proc, void *_input) -{ - H5VL_iod_group_open_input_t *input = (H5VL_iod_group_open_input_t *)_input; - void *buf=NULL; - uint8_t *p; - size_t len = 0; /* len of group name */ - size_t gapl_size = 0; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, input->coh.cookie); - UINT64DECODE_VARLEN(p, input->loc_id.oid_hi); - UINT64DECODE_VARLEN(p, input->loc_id.oid_lo); - UINT64DECODE_VARLEN(p, input->loc_oh.cookie); - - /* decode length of the group name and the actual group name */ - UINT64DECODE_VARLEN(p, len); - if(0 != len) { - input->name = H5MM_xstrdup((const char *)(p)); - p += len; - } - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, gapl_size); - /* decode property lists if they are not default*/ - if(gapl_size) { - if((input->gapl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += gapl_size; - } - else { - input->gapl_id = H5P_GROUP_ACCESS_DEFAULT; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_group_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_group_open_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_group_open(fs_proc_t proc, void *_output) -{ - H5VL_iod_server_remote_group_t *output = (H5VL_iod_server_remote_group_t *)_output; - size_t gcpl_size = output->gcpl_size; - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)output->iod_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->iod_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->iod_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)gcpl_size) + gcpl_size;; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - UINT64ENCODE_VARLEN(p, output->iod_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->iod_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->iod_oh.cookie); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->scratch_oh.cookie); - - /* encode the length of plist and the plist buffer (already encoded) */ - UINT64ENCODE_VARLEN(p, gcpl_size); - if(0 != gcpl_size) { - HDmemcpy(p, output->gcpl, gcpl_size); - p += gcpl_size; - } - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_group_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_group_close_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_group_close(fs_proc_t proc, void *_input) -{ - H5VL_iod_remote_group_t *input = (H5VL_iod_remote_group_t *)_input; - void *buf=NULL; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, input->iod_id.oid_hi); - UINT64DECODE_VARLEN(p, input->iod_id.oid_lo); - UINT64DECODE_VARLEN(p, input->iod_oh.cookie); - UINT64DECODE_VARLEN(p, input->scratch_id.oid_hi); - UINT64DECODE_VARLEN(p, input->scratch_id.oid_lo); - UINT64DECODE_VARLEN(p, input->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_group_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_group_close_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_group_close(fs_proc_t proc, void *_output) -{ - int output = *((int *)_output); - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = sizeof(int32_t); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - INT32ENCODE(p, output); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_group_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_dset_create_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_dset_create(fs_proc_t proc, void *_input) -{ - H5VL_iod_dset_create_input_t *input = (H5VL_iod_dset_create_input_t *)_input; - void *buf=NULL; - uint8_t *p; - size_t len = 0; /* len of dset name */ - size_t dcpl_size = 0, dapl_size = 0, lcpl_size = 0; - size_t space_size = 0, type_size = 0; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, input->coh.cookie); - UINT64DECODE_VARLEN(p, input->loc_id.oid_hi); - UINT64DECODE_VARLEN(p, input->loc_id.oid_lo); - UINT64DECODE_VARLEN(p, input->loc_oh.cookie); - - /* decode length of the dset name and the actual dset name */ - UINT64DECODE_VARLEN(p, len); - if(0 != len) { - input->name = H5MM_xstrdup((const char *)(p)); - p += len; - } - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, dcpl_size); - /* decode property lists if they are not default*/ - if(dcpl_size) { - if((input->dcpl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += dcpl_size; - } - else { - input->dcpl_id = H5P_DATASET_CREATE_DEFAULT; - } - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, dapl_size); - /* decode property lists if they are not default*/ - if(dapl_size) { - if((input->dapl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += dapl_size; - } - else { - input->dapl_id = H5P_DATASET_ACCESS_DEFAULT; - } - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, lcpl_size); - /* decode property lists if they are not default*/ - if(lcpl_size) { - if((input->lcpl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += lcpl_size; - } - else { - input->lcpl_id = H5P_LINK_CREATE_DEFAULT; - } - - /* decode the type size */ - UINT64DECODE_VARLEN(p, type_size); - if((input->type_id = H5Tdecode((const void *)p)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object"); - p += type_size; - - /* decode the space size */ - UINT64DECODE_VARLEN(p, space_size); - if((input->space_id = H5Sdecode((const void *)p)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, FAIL, "can't decode object"); - p += space_size; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_dset_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_dset_create_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_dset_create(fs_proc_t proc, void *_output) -{ - H5VL_iod_remote_dset_t *output = (H5VL_iod_remote_dset_t *)_output; - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)output->iod_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->iod_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->iod_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_oh.cookie); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - UINT64ENCODE_VARLEN(p, output->iod_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->iod_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->iod_oh.cookie); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_dset_create() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_dset_open_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_dset_open(fs_proc_t proc, void *_input) -{ - H5VL_iod_dset_open_input_t *input = (H5VL_iod_dset_open_input_t *)_input; - void *buf=NULL; - uint8_t *p; - size_t len = 0; /* len of dset name */ - size_t dapl_size = 0; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, input->coh.cookie); - UINT64DECODE_VARLEN(p, input->loc_id.oid_hi); - UINT64DECODE_VARLEN(p, input->loc_id.oid_lo); - UINT64DECODE_VARLEN(p, input->loc_oh.cookie); - - /* decode length of the dset name and the actual dset name */ - UINT64DECODE_VARLEN(p, len); - if(0 != len) { - input->name = H5MM_xstrdup((const char *)(p)); - p += len; - } - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, dapl_size); - /* decode property lists if they are not default*/ - if(dapl_size) { - if((input->dapl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += dapl_size; - } - else { - input->dapl_id = H5P_DATASET_ACCESS_DEFAULT; - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_dset_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_dset_open_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_dset_open(fs_proc_t proc, void *_output) -{ - H5VL_iod_server_remote_dset_t *output = (H5VL_iod_server_remote_dset_t *)_output; - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - size_t type_size = output->dtype_size; - size_t space_size = output->dspace_size; - size_t dcpl_size = output->dcpl_size; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = 1 + H5V_limit_enc_size((uint64_t)output->iod_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->iod_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->iod_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_hi) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_id.oid_lo) + - 1 + H5V_limit_enc_size((uint64_t)output->scratch_oh.cookie) + - 1 + H5V_limit_enc_size((uint64_t)type_size) + type_size + - 1 + H5V_limit_enc_size((uint64_t)space_size) + space_size + - 1 + H5V_limit_enc_size((uint64_t)dcpl_size) + dcpl_size; - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - UINT64ENCODE_VARLEN(p, output->iod_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->iod_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->iod_oh.cookie); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_hi); - UINT64ENCODE_VARLEN(p, output->scratch_id.oid_lo); - UINT64ENCODE_VARLEN(p, output->scratch_oh.cookie); - - /* encode the length of plist and the plist buffer (already encoded) */ - UINT64ENCODE_VARLEN(p, dcpl_size); - if(0 != dcpl_size) { - HDmemcpy(p, output->dcpl, dcpl_size); - p += dcpl_size; - } - - /* encode the length of the type and the type buffer (already encoded) */ - UINT64ENCODE_VARLEN(p, type_size); - if(0 != type_size) { - HDmemcpy(p, output->dtype, type_size); - p += type_size; - } - - /* encode the length of the spacs and the space buffer (already encoded) */ - UINT64ENCODE_VARLEN(p, space_size); - if(0 != space_size) { - HDmemcpy(p, output->dspace, space_size); - p += space_size; - } - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_dset_open() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_dset_io_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_dset_io(fs_proc_t proc, void *_input) -{ - H5VL_iod_dset_io_input_t *input = (H5VL_iod_dset_io_input_t *)_input; - void *buf=NULL; - uint8_t *p; - size_t dxpl_size = 0; - size_t space_size = 0; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, input->iod_oh.cookie); - UINT64DECODE_VARLEN(p, input->scratch_oh.cookie); - UINT32DECODE(p, input->checksum); - - /* decode the plist size */ - UINT64DECODE_VARLEN(p, dxpl_size); - /* decode property lists if they are not default*/ - if(dxpl_size) { - if((input->dxpl_id = H5Pdecode(p)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to decode property list"); - p += dxpl_size; - } - else { - input->dxpl_id = H5P_DATASET_XFER_DEFAULT; - } - - /* decode the space size & dataspace */ - UINT64DECODE_VARLEN(p, space_size); - if((input->space_id = H5Sdecode((const void *)p)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, FAIL, "can't decode object"); - p += space_size; - - if(S_FAIL == bds_handle_deserialize(&input->bds_handle, p, BDS_MAX_HANDLE_SIZE)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "unable to desrialize bds handle"); - p += BDS_MAX_HANDLE_SIZE; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_dset_io() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_dset_read - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_dset_read(fs_proc_t proc, void *_output) -{ - H5VL_iod_read_status_t *output = (H5VL_iod_read_status_t *)_output; - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = sizeof(uint32_t) + sizeof(int32_t); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - INT32ENCODE(p, output->ret); - UINT32ENCODE(p, output->cs); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_dset_read() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_dset_write - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_dset_write(fs_proc_t proc, void *_output) -{ - int output = *((int *)_output); - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = sizeof(int); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - INT32ENCODE(p, output); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_dset_io() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_dset_set_extent_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_dset_set_extent(fs_proc_t proc, void *_input) -{ - H5VL_iod_dset_set_extent_input_t *input = (H5VL_iod_dset_set_extent_input_t *)_input; - void *buf=NULL; - uint8_t *p; - int i; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, input->iod_oh.cookie); - - /* decode the rank */ - INT32DECODE(p, input->rank); - - input->size = malloc (sizeof(hsize_t) * input->rank); - for(i=0 ; irank ; i++) - UINT64DECODE_VARLEN(p, input->size[i]) - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_dset_set_extent() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_dset_set_extent_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_dset_set_extent(fs_proc_t proc, void *_output) -{ - int output = *((int *)_output); - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = sizeof(int32_t); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - INT32ENCODE(p, output); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_dset_set_extent() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_decode_dset_close_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_decode_dset_close(fs_proc_t proc, void *_input) -{ - H5VL_iod_remote_dset_t *input = (H5VL_iod_remote_dset_t *)_input; - void *buf=NULL; - uint8_t *p; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - /* decode the location with the container handle & iod object IDs and opened handles */ - UINT64DECODE_VARLEN(p, input->iod_id.oid_hi); - UINT64DECODE_VARLEN(p, input->iod_id.oid_lo); - UINT64DECODE_VARLEN(p, input->iod_oh.cookie); - UINT64DECODE_VARLEN(p, input->scratch_id.oid_hi); - UINT64DECODE_VARLEN(p, input->scratch_id.oid_lo); - UINT64DECODE_VARLEN(p, input->scratch_oh.cookie); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_server_decode_dset_close() */ - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_server_encode_dset_close_params - *------------------------------------------------------------------------- */ -herr_t -H5VL_iod_server_encode_dset_close(fs_proc_t proc, void *_output) -{ - int output = *((int *)_output); - void *buf = NULL; - uint8_t *p; - size_t size, nalloc; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - size = sizeof(int32_t); - - nalloc = fs_proc_get_size(proc); - - if(nalloc < size) - fs_proc_set_size(proc, size); - - if(NULL == (buf = fs_proc_get_buf_ptr(proc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "buffer to encode in does not exist"); - - p = (uint8_t *)buf; - - INT32ENCODE(p, output); - -done: - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_server_encode_dset_close() */ - -#endif /* H5_HAVE_EFF */ diff --git a/src/H5config.h.in b/src/H5config.h.in index 82bd721..6da3d88 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -214,24 +214,15 @@ /* Define to 1 if you have the `iod' library (-liod). */ #undef HAVE_LIBIOD -/* Define to 1 if you have the `iofsl_shipper_bds' library - (-liofsl_shipper_bds). */ -#undef HAVE_LIBIOFSL_SHIPPER_BDS - -/* Define to 1 if you have the `iofsl_shipper_fs' library - (-liofsl_shipper_fs). */ -#undef HAVE_LIBIOFSL_SHIPPER_FS - -/* Define to 1 if you have the `iofsl_shipper_na' library - (-liofsl_shipper_na). */ -#undef HAVE_LIBIOFSL_SHIPPER_NA - /* Define to 1 if you have the `lmpe' library (-llmpe). */ #undef HAVE_LIBLMPE /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM +/* Define to 1 if you have the `mercury' library (-lmercury). */ +#undef HAVE_LIBMERCURY + /* Define to 1 if you have the `mpe' library (-lmpe). */ #undef HAVE_LIBMPE @@ -277,6 +268,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MERCURY_BULK_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MERCURY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MERCURY_HANDLER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MERCURY_PROC_H + /* Define if we have MPE support */ #undef HAVE_MPE @@ -292,6 +295,9 @@ /* Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists */ #undef HAVE_MPI_MULTI_LANG_Info +/* Define to 1 if you have the header file. */ +#undef HAVE_NA_H + /* Define to 1 if you have the header file. */ #undef HAVE_NETWORK_ABSTRACTION_H diff --git a/src/Makefile.am b/src/Makefile.am index dcd8881..2bc926d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -60,7 +60,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \ H5FAstat.c H5FAtest.c \ H5VL.c H5VLint.c H5VLnative.c \ - H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_client_encdec.c H5VLiod_server_encdec.c \ + H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c \ H5FD.c H5FDcore.c \ H5FDdirect.c H5FDfamily.c H5FDint.c H5FDlog.c H5FDmpi.c H5FDmpio.c \ H5FDmpiposix.c H5FDmulti.c H5FDsec2.c H5FDspace.c H5FDstdio.c \ diff --git a/src/Makefile.in b/src/Makefile.in index e8146f3..75e4dfa 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -137,43 +137,42 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo H5FAdblock.lo \ H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo H5FAtest.lo H5VL.lo \ H5VLint.lo H5VLnative.lo H5VLiod.lo H5VLiod_client.lo \ - H5VLiod_server.lo H5VLiod_client_encdec.lo \ - H5VLiod_server_encdec.lo H5FD.lo H5FDcore.lo H5FDdirect.lo \ - H5FDfamily.lo H5FDint.lo H5FDlog.lo H5FDmpi.lo H5FDmpio.lo \ - H5FDmpiposix.lo H5FDmulti.lo H5FDsec2.lo H5FDspace.lo \ - H5FDstdio.lo H5FF.lo H5EQ.lo H5FL.lo H5FO.lo H5FS.lo \ - H5FScache.lo H5FSdbg.lo H5FSsection.lo H5FSstat.lo H5FStest.lo \ - H5G.lo H5Gbtree2.lo H5Gcache.lo H5Gcompact.lo H5Gdense.lo \ - H5Gdeprec.lo H5Gent.lo H5Gint.lo H5Glink.lo H5Gloc.lo \ - H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo H5Groot.lo H5Gstab.lo \ - H5Gtest.lo H5Gtraverse.lo H5HF.lo H5HFbtree2.lo H5HFcache.lo \ - H5HFdbg.lo H5HFdblock.lo H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo \ - H5HFiblock.lo H5HFiter.lo H5HFman.lo H5HFsection.lo \ - H5HFspace.lo H5HFstat.lo H5HFtest.lo H5HFtiny.lo H5HG.lo \ - H5HGcache.lo H5HGdbg.lo H5HGquery.lo H5HL.lo H5HLcache.lo \ - H5HLdbg.lo H5HLint.lo H5HP.lo H5I.lo H5Itest.lo H5L.lo \ - H5Lexternal.lo H5lib_settings.lo H5MF.lo H5MFaggr.lo \ - H5MFdbg.lo H5MFsection.lo H5MM.lo H5MP.lo H5MPtest.lo H5O.lo \ - H5Oainfo.lo H5Oalloc.lo H5Oattr.lo H5Oattribute.lo H5Obogus.lo \ - H5Obtreek.lo H5Ocache.lo H5Ochunk.lo H5Ocont.lo H5Ocopy.lo \ - H5Odbg.lo H5Odrvinfo.lo H5Odtype.lo H5Oefl.lo H5Ofill.lo \ - H5Ofsinfo.lo H5Oginfo.lo H5Olayout.lo H5Olinfo.lo H5Olink.lo \ - H5Omessage.lo H5Omtime.lo H5Oname.lo H5Onull.lo H5Opline.lo \ - H5Orefcount.lo H5Osdspace.lo H5Oshared.lo H5Ostab.lo \ - H5Oshmesg.lo H5Otest.lo H5Ounknown.lo H5P.lo H5Pacpl.lo \ - H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo H5Pencdec.lo \ - H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo H5Pint.lo \ - H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo H5Pstrcpl.lo \ - H5Ptest.lo H5R.lo H5Rdeprec.lo H5RC.lo H5RS.lo H5S.lo \ - H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \ - H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \ - H5SMbtree2.lo H5SMcache.lo H5SMmessage.lo H5SMtest.lo H5ST.lo \ - H5T.lo H5Tarray.lo H5Tbit.lo H5Tcommit.lo H5Tcompound.lo \ - H5Tconv.lo H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo \ - H5Tfields.lo H5Tfixed.lo H5Tfloat.lo H5Tinit.lo H5Tnative.lo \ - H5Toffset.lo H5Toh.lo H5Topaque.lo H5Torder.lo H5Tpad.lo \ - H5Tprecis.lo H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo H5TS.lo \ - H5V.lo H5WB.lo H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo \ + H5VLiod_server.lo H5VLiod_encdec.lo H5FD.lo H5FDcore.lo \ + H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo H5FDmpi.lo \ + H5FDmpio.lo H5FDmpiposix.lo H5FDmulti.lo H5FDsec2.lo \ + H5FDspace.lo H5FDstdio.lo H5FF.lo H5EQ.lo H5FL.lo H5FO.lo \ + H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo H5FSstat.lo \ + H5FStest.lo H5G.lo H5Gbtree2.lo H5Gcache.lo H5Gcompact.lo \ + H5Gdense.lo H5Gdeprec.lo H5Gent.lo H5Gint.lo H5Glink.lo \ + H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo H5Groot.lo \ + H5Gstab.lo H5Gtest.lo H5Gtraverse.lo H5HF.lo H5HFbtree2.lo \ + H5HFcache.lo H5HFdbg.lo H5HFdblock.lo H5HFdtable.lo H5HFhdr.lo \ + H5HFhuge.lo H5HFiblock.lo H5HFiter.lo H5HFman.lo \ + H5HFsection.lo H5HFspace.lo H5HFstat.lo H5HFtest.lo \ + H5HFtiny.lo H5HG.lo H5HGcache.lo H5HGdbg.lo H5HGquery.lo \ + H5HL.lo H5HLcache.lo H5HLdbg.lo H5HLint.lo H5HP.lo H5I.lo \ + H5Itest.lo H5L.lo H5Lexternal.lo H5lib_settings.lo H5MF.lo \ + H5MFaggr.lo H5MFdbg.lo H5MFsection.lo H5MM.lo H5MP.lo \ + H5MPtest.lo H5O.lo H5Oainfo.lo H5Oalloc.lo H5Oattr.lo \ + H5Oattribute.lo H5Obogus.lo H5Obtreek.lo H5Ocache.lo \ + H5Ochunk.lo H5Ocont.lo H5Ocopy.lo H5Odbg.lo H5Odrvinfo.lo \ + H5Odtype.lo H5Oefl.lo H5Ofill.lo H5Ofsinfo.lo H5Oginfo.lo \ + H5Olayout.lo H5Olinfo.lo H5Olink.lo H5Omessage.lo H5Omtime.lo \ + H5Oname.lo H5Onull.lo H5Opline.lo H5Orefcount.lo H5Osdspace.lo \ + H5Oshared.lo H5Ostab.lo H5Oshmesg.lo H5Otest.lo H5Ounknown.lo \ + H5P.lo H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo \ + H5Pdxpl.lo H5Pencdec.lo H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo \ + H5Pgcpl.lo H5Pint.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo \ + H5Pocpypl.lo H5Pstrcpl.lo H5Ptest.lo H5R.lo H5Rdeprec.lo \ + H5RC.lo H5RS.lo H5S.lo H5Sall.lo H5Sdbg.lo H5Shyper.lo \ + H5Smpio.lo H5Snone.lo H5Spoint.lo H5Sselect.lo H5Stest.lo \ + H5SL.lo H5SM.lo H5SMbtree2.lo H5SMcache.lo H5SMmessage.lo \ + H5SMtest.lo H5ST.lo H5T.lo H5Tarray.lo H5Tbit.lo H5Tcommit.lo \ + H5Tcompound.lo H5Tconv.lo H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo \ + H5Tenum.lo H5Tfields.lo H5Tfixed.lo H5Tfloat.lo H5Tinit.lo \ + H5Tnative.lo H5Toffset.lo H5Toh.lo H5Topaque.lo H5Torder.lo \ + H5Tpad.lo H5Tprecis.lo H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo \ + H5TS.lo H5V.lo H5WB.lo H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo \ H5Znbit.lo H5Zshuffle.lo H5Zszip.lo H5Zscaleoffset.lo \ H5Ztrans.lo libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS) @@ -357,7 +356,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -556,7 +555,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \ H5FAstat.c H5FAtest.c \ H5VL.c H5VLint.c H5VLnative.c \ - H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_client_encdec.c H5VLiod_server_encdec.c \ + H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c \ H5FD.c H5FDcore.c \ H5FDdirect.c H5FDfamily.c H5FDint.c H5FDlog.c H5FDmpi.c H5FDmpio.c \ H5FDmpiposix.c H5FDmulti.c H5FDsec2.c H5FDspace.c H5FDstdio.c \ @@ -1008,9 +1007,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_client.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_client_encdec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_encdec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_server.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_server_encdec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLnative.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5WB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Z.Plo@am__quote@ diff --git a/test/Makefile.in b/test/Makefile.in index d278cb8..6cfadd7 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -623,7 +623,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 5645a43..49c76bf 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -285,7 +285,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 1d8e4b9..0fe185b 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -261,7 +261,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 5ea8f04..51dc329 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -264,7 +264,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 4ee60e4..bdbe5c9 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -271,7 +271,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 618ccb6..4ddbdfe 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -266,7 +266,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 1db14bc..34e90c4 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -264,7 +264,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 1eddcc1..64866ef 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -278,7 +278,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index dbce58c..d62cf6c 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -258,7 +258,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 475e64f..a69de55 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -278,7 +278,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 814b3cb..38bd193 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -293,7 +293,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 8214ddb..848ead0 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -256,7 +256,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index b40ddd8..37a5cd8 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -318,7 +318,7 @@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ MYAXE_LIBS = @MYAXE_LIBS@ MYIOD_LIBS = @MYIOD_LIBS@ -MYSHIPPER_LIBS = @MYSHIPPER_LIBS@ +MYMERCURY_LIBS = @MYMERCURY_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ -- cgit v0.12