From 11fd3c10c53399f5fe710bb627945266708ee5cb Mon Sep 17 00:00:00 2001 From: Marc Howison Date: Thu, 5 May 2011 17:58:05 +0000 Subject: [PATCH] updated h5_lustre.c to user new macros; changed library targets to ../lib/lib*.a to avoid the mv and mkdir hacks in Makefile.am; fixed problem in h5u_test with H5PartSetViewIndices; OPEN BUG with h5u_test for >1 MPI task (strange pthread setfault?) --- configure.ac | 11 ++++--- src/C/H5.c | 14 +++++++-- src/C/H5Part.c | 7 ++++- src/C/Makefile.am | 9 ++---- src/Fortran/H5Part_F.c | 2 +- src/Fortran/H5_F.c | 12 ++++---- src/Fortran/Makefile.am | 15 +++++----- src/h5core/Makefile.am | 23 +++++++-------- src/h5core/h5_errorhandling.c | 2 +- src/h5core/h5_hdf5.c | 4 +-- src/h5core/h5_lustre.c | 54 +++++++++++++++++++--------------- src/h5core/h5_openclose.c | 12 ++++---- src/h5core/h5_readwrite.c | 2 +- src/h5core/h5u_model.c | 16 +++++----- src/include/H5Part.h | 2 +- src/include/h5core/h5u_model.h | 4 +-- test/H5Fed/Makefile.am | 13 +------- test/H5Part/Bench.c | 8 ++--- test/Makefile.am | 11 +++---- test/h5u_read.c | 9 +++--- test/h5u_write.c | 2 +- test/params.h | 1 + 22 files changed, 122 insertions(+), 111 deletions(-) diff --git a/configure.ac b/configure.ac index f9cdda6..f83caa5 100644 --- a/configure.ac +++ b/configure.ac @@ -194,8 +194,8 @@ AC_MSG_CHECKING([if C interface enabled]) if test "X$USE_C" = "Xyes"; then AC_MSG_RESULT([yes]) BINDINGS="$BINDINGS C" - LIB_C="libH5hutC.a" - BUILD_LIBS="$BUILD_LIBS $LIB_C" + LIB_C="../lib/libH5hutC.a" + BUILD_LIBS="$BUILD_LIBS libH5hutC.a" BUILD_TESTS="$BUILD_TESTS h5u_test h5b_test" BUILD_TOOLS="$BUILD_TOOLS h5hutcc" fi @@ -205,8 +205,8 @@ AC_MSG_CHECKING([if fortran interface enabled]) if test "X$USE_FORTRAN" = "Xyes"; then AC_MSG_RESULT([yes]) BINDINGS="$BINDINGS Fortran" - LIB_FORTRAN="libH5hutF.a" - BUILD_LIBS="$BUILD_LIBS $LIB_FORTRAN" + LIB_FORTRAN="../lib/libH5hutF.a" + BUILD_LIBS="$BUILD_LIBS libH5hutF.a" AC_PROG_FC(pgf90 ifort xlf_r pathf90 g95 g90 ftn gfortran) if test -z "$FC" ; then @@ -507,8 +507,7 @@ AC_CONFIG_FILES([ src/h5core/Makefile src/Fortran/Makefile test/Makefile - test/H5Fed/Makefile - test/H5Part/Makefile + test/H5Fed/Makefile tools/Makefile tools/h5hutcc ]) diff --git a/src/C/H5.c b/src/C/H5.c index 1e6d32b..2990406 100644 --- a/src/C/H5.c +++ b/src/C/H5.c @@ -41,6 +41,16 @@ Open file with name \c filbename. This function is available in the parallel and serial version. In the serial case \c comm may have any value. + File mode flags are: + - H5_O_RDONLY: only reading allowed + - H5_O_WRONLY: create new file, dataset must not exist + - H5_O_APPEND: allows to append a new datasets to an existing file + - H5_O_RDWR: dataset may exist + + You can also select a "virtual file driver" in the HDF5 layer using: + - H5_VFD_INDEPENDENT: MPI-IO in independent (asynchronous) mode + - H5_VFD_MPIPOSIX: parallel I/O implemented directly by HDF5, bypassing MPI-IO + \return File handle. \return NULL on error. */ @@ -59,7 +69,7 @@ H5OpenFile ( /*! \ingroup h5hut_file - Close file. + Close file and free all memory associated with the file handle. \return \c H5_SUCCESS or error code */ @@ -74,7 +84,7 @@ H5CloseFile ( /*! \ingroup h5hut_file - Close file. + Verify that the file handle points to a valid H5hut file structure. \return \c H5_SUCCESS or error code */ diff --git a/src/C/H5Part.c b/src/C/H5Part.c index 4ad6ebe..5b4aec3 100644 --- a/src/C/H5Part.c +++ b/src/C/H5Part.c @@ -539,6 +539,11 @@ H5PartSetView ( is set, or the number of particles in a dataset changes, or the view is "unset" by calling \c H5PartSetViewIndices(NULL,0); + When you perform a read or write on a view consisting of indices, it + is assumed that your buffer is \b unpacked, meaning that there is room + for all the intermediate values (which will not be touched by the read + or write). + Before you set a view, the \c H5PartGetNumParticles() will return the total number of particles in the current time-step (even for the parallel reads). However, after you set a view, it will return the number of @@ -549,7 +554,7 @@ H5PartSetView ( h5_err_t H5PartSetViewIndices ( h5_file_t *f, /*!< [in] Handle to open file */ - const h5_id_t *indices, /*!< [in] List of indices */ + const h5_size_t *indices, /*!< [in] List of indices */ h5_size_t nelems /*!< [in] Size of list */ ) { H5_API_ENTER3 (h5_err_t, diff --git a/src/C/Makefile.am b/src/C/Makefile.am index b907c24..049f62c 100644 --- a/src/C/Makefile.am +++ b/src/C/Makefile.am @@ -9,7 +9,7 @@ INCLUDES = -I../include @INCLUDES@ lib_LIBRARIES = @LIB_C@ # Listing of all possible targets that I may build. -EXTRA_LIBRARIES = libH5hutC.a +EXTRA_LIBRARIES = ../lib/libH5hutC.a # Header files that I wish to install in $(prefix)/include include_HEADERS = \ @@ -31,7 +31,7 @@ include_HEADERS = \ EXTRA_HEADERS = # Listing of sources -libH5hutC_a_SOURCES = \ +___lib_libH5hutC_a_SOURCES = \ H5.c \ H5_attribs.c \ H5_attachments.c \ @@ -45,10 +45,7 @@ libH5hutC_a_SOURCES = \ H5Fed_store.c \ H5Fed_tags.c -all: all-am install-libs-local - -install-libs-local: - -cp ${lib_LIBRARIES} ../lib +all: all-am clean: clean-am diff --git a/src/Fortran/H5Part_F.c b/src/Fortran/H5Part_F.c index c8c1d5b..1cab256 100755 --- a/src/Fortran/H5Part_F.c +++ b/src/Fortran/H5Part_F.c @@ -146,7 +146,7 @@ h5pt_setview ( h5_file_t *filehandle = (h5_file_t*)(size_t)*f; h5_set_funcname( filehandle, __func__ ); - return h5u_set_view ( filehandle, *start, *end ); + return h5u_set_view ( filehandle, (*start)-1, (*end)-1 ); } h5_err_t diff --git a/src/Fortran/H5_F.c b/src/Fortran/H5_F.c index a495997..3c1e7eb 100644 --- a/src/Fortran/H5_F.c +++ b/src/Fortran/H5_F.c @@ -78,7 +78,7 @@ h5_openr ( ) { char *file_name2 = h5_strdupfor2c ( file_name, l_file_name ); - h5_file_t* f = h5_open_file ( file_name2, H5_O_RDONLY, 0, __func__ ); + h5_file_t* f = h5_open_file ( file_name2, H5_O_RDONLY, 0 ); free ( file_name2 ); return (h5_int64_t)(size_t)f; } @@ -90,7 +90,7 @@ h5_openw ( ) { char *file_name2 = h5_strdupfor2c ( file_name, l_file_name ); - h5_file_t* f = h5_open_file ( file_name2, H5_O_WRONLY, 0, __func__ ); + h5_file_t* f = h5_open_file ( file_name2, H5_O_WRONLY, 0 ); free ( file_name2 ); return (h5_int64_t)(size_t)f; } @@ -102,7 +102,7 @@ h5pt_opena ( ) { char *file_name2 = h5_strdupfor2c ( file_name, l_file_name ); - h5_file_t* f = h5_open_file ( file_name2, H5_O_APPEND, 0, __func__ ); + h5_file_t* f = h5_open_file ( file_name2, H5_O_APPEND, 0 ); free ( file_name2 ); return (h5_int64_t)(size_t)f; } @@ -123,7 +123,7 @@ h5_openr_par ( h5_int32_t fbits = H5_O_RDONLY | _flagsfor2c ( flags2 ); - h5_file_t* f = h5_open_file ( file_name2, fbits, ccomm, __func__ ); + h5_file_t* f = h5_open_file ( file_name2, fbits, ccomm ); free ( file_name2 ); free ( flags2 ); @@ -145,7 +145,7 @@ h5_openw_par ( h5_int32_t fbits = H5_O_WRONLY | _flagsfor2c ( flags2 ); - h5_file_t* f = h5_open_file ( file_name2, ccomm, fbits, __func__ ); + h5_file_t* f = h5_open_file ( file_name2, ccomm, fbits ); free ( file_name2 ); free ( flags2 ); @@ -168,7 +168,7 @@ h5pt_opena_par_align ( h5_int32_t fbits = H5_O_APPEND | _flagsfor2c ( flags2 ); - h5_file_t* f = h5_open_file( file_name2, ccomm, fbits, __func__ ); + h5_file_t* f = h5_open_file( file_name2, ccomm, fbits ); free ( file_name2 ); free ( flags2 ); diff --git a/src/Fortran/Makefile.am b/src/Fortran/Makefile.am index de7e560..e969554 100644 --- a/src/Fortran/Makefile.am +++ b/src/Fortran/Makefile.am @@ -26,15 +26,16 @@ nodist_include_HEADERS = ../include/H5hutF.h lib_LIBRARIES = @LIB_FORTRAN@ # Listing of all possible targets that I may build. -EXTRA_LIBRARIES = libH5hutF.a +EXTRA_LIBRARIES = ../lib/libH5hutF.a -libH5hutF_a_SOURCES = H5_F.c \ - H5_attribs_F.c \ - H5Part_F.c \ - H5Block_F.c \ - H5Block_readwrite_F.c +___lib_libH5hutF_a_SOURCES = \ + H5_F.c \ + H5_attribs_F.c \ + H5Part_F.c \ + H5Block_F.c \ + H5Block_readwrite_F.c -libH5hutF_a_DEPENDENCIES = ../include/H5hutF.h +___lib_libH5hutF_a_DEPENDENCIES = ../include/H5hutF.h ../include/H5hutF.h: $(F90_FILES) awk '/INTEGER\*8 FUNCTION/{print "\t" $$1 " " $$3}' $^ >$@ diff --git a/src/h5core/Makefile.am b/src/h5core/Makefile.am index eb94a30..cf946bb 100644 --- a/src/h5core/Makefile.am +++ b/src/h5core/Makefile.am @@ -32,19 +32,22 @@ EXTRA_HEADERS = \ ../include/h5core/h5t_retrieve.h \ ../include/h5core/h5t_storemesh.h \ ../include/h5core/h5t_tags.h \ - h5b_errorhandling_private.h \ - h5b_model_private.h \ - h5b_types_private.h \ + h5_attribs_private.h \ h5_core_private.h \ h5_errorhandling_private.h \ h5_fcmp_private.h \ h5_hdf5_private.h \ h5_hsearch_private.h \ h5_lustre_private.h \ + h5_maps_private.h \ h5_mpi_private.h \ h5_qsort_private.h \ h5_readwrite_private.h \ h5_syscall_private.h \ + h5_types_private.h \ + h5b_errorhandling_private.h \ + h5b_model_private.h \ + h5b_types_private.h \ h5t_access_private.h \ h5t_adjacencies_private.h \ h5t_consts_private.h \ @@ -60,7 +63,6 @@ EXTRA_HEADERS = \ h5t_store_trim_private.h \ h5t_tags_private.h \ h5t_types_private.h \ - h5_types_private.h \ h5u_errorhandling_private.h \ h5u_types_private.h @@ -68,13 +70,13 @@ EXTRA_HEADERS = \ EXTRA_DIST = $(EXTRA_HEADERS) # What to build... Will be determined by configure script. -lib_LIBRARIES = libH5hut.a +lib_LIBRARIES = ../lib/libH5hut.a # Listing of all possible targets that I may build. -EXTRA_LIBRARIES = libH5hut.a +EXTRA_LIBRARIES = ../lib/libH5hut.a # Listing of sources -libH5hut_a_SOURCES = \ +___lib_libH5hut_a_SOURCES = \ h5_attach.c \ h5_attribs.c \ h5_errorhandling.c \ @@ -117,12 +119,9 @@ libH5hut_a_SOURCES = \ h5t_store_trim.c \ h5t_tags.c -libH5hut_a_DEPENDENCIES = $(EXTRA_HEADERS) +___lib_libH5hut_a_DEPENDENCIES = $(EXTRA_HEADERS) -all: all-am install-libs-local - -install-libs-local: - -cp ${lib_LIBRARIES} ../lib +all: all-am install-exec-local: @$(INSTALL) -d $(DESTDIR)$(includedir)/h5core diff --git a/src/h5core/h5_errorhandling.c b/src/h5core/h5_errorhandling.c index aa3d26d..68bcb98 100644 --- a/src/h5core/h5_errorhandling.c +++ b/src/h5core/h5_errorhandling.c @@ -83,7 +83,7 @@ h5_set_debuglevel ( \return current debug level */ -h5_id_t +h5_err_t h5_get_debuglevel ( void ) { diff --git a/src/h5core/h5_hdf5.c b/src/h5core/h5_hdf5.c index 0cfa6be..b9442c6 100644 --- a/src/h5core/h5_hdf5.c +++ b/src/h5core/h5_hdf5.c @@ -262,7 +262,7 @@ hdf5_close_dataset ( "dataset_id=%d (%s)", dataset_id, hdf5_get_objname (dataset_id)); - if (dataset_id == 0 || dataset_id == -1) + if (dataset_id < 0) HDF5_WRAPPER_LEAVE (H5_SUCCESS); if (H5Dclose (dataset_id) < 0) { @@ -537,7 +537,7 @@ hdf5_select_elements_of_dataspace ( herr = H5Sselect_elements ( space_id, op, - nelems, + (size_t)nelems, indices); } else { herr = H5Sselect_none ( space_id ); diff --git a/src/h5core/h5_lustre.c b/src/h5core/h5_lustre.c index 375ef45..cea5f26 100644 --- a/src/h5core/h5_lustre.c +++ b/src/h5core/h5_lustre.c @@ -8,6 +8,7 @@ #define __USE_GNU #include #undef __USE_GNU +#include #include #include "h5core/h5_core.h" @@ -32,25 +33,29 @@ _get_lustre_stripe_size(h5_file_t *const f, const char *path ) { size_t nbytes = sizeof(struct lov_user_md) + INIT_ALLOC_NUM_OSTS * sizeof(struct lov_user_ost_data); - struct lov_user_md *lum; - TRY( lum = h5_calloc (1, nbytes) ); + struct lov_user_md *lum = h5_calloc(1, nbytes); + if (!lum) { + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "cannot allocate lustre struct"); + return -1; + } lum->lmm_magic = LOV_USER_MAGIC; - int fd = open64(path, O_RDONLY); + int fd = open(path, O_RDONLY); if (fd < 0) { extern int errno; if (errno == EINVAL) - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER - "open64: a flag is invalid!"); + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "open: a flag is invalid!"); else if (errno == EACCES) - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER - "open64: access denied or file does not exist!"); + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "open: access denied or file does not exist!"); else if (errno == ENAMETOOLONG) - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER - "open64: path is too long!"); + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "open: path is too long!"); else - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER - "open64: unspecific error!"); + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "open: unspecific error!"); return -1; } @@ -58,22 +63,22 @@ _get_lustre_stripe_size(h5_file_t *const f, const char *path ) if (ret == -1) { extern int errno; if (errno == EBADF) - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER + h5_error(H5_ERR_INTERNAL, MSG_HEADER "ioctl: bad file handle!"); else if (errno == EINVAL) - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER + h5_error(H5_ERR_INTERNAL, MSG_HEADER "ioctl: invalid argument!"); else if (errno == EIO) - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER + h5_error(H5_ERR_INTERNAL, MSG_HEADER "ioctl: physical I/O problem!"); else if (errno == ENOTTY) - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER + h5_error(H5_ERR_INTERNAL, MSG_HEADER "ioctl: file handle does not accept control functions!"); else if (errno == ENODEV) - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER + h5_error(H5_ERR_INTERNAL, MSG_HEADER "ioctl: driver doesn't support control functions!"); else - h5_error(f, H5_ERR_INTERNAL, MSG_HEADER + h5_error(H5_ERR_INTERNAL, MSG_HEADER "ioctl: unspecific error!"); return -1; } @@ -95,6 +100,7 @@ h5_optimize_for_lustre ( const char *filename ) { + H5_CORE_API_ENTER2 (h5_err_t, "f=0x%p, filename=\"%s\"", f, filename); ssize_t stripe_size; if ( f->myproc == 0 ) { @@ -119,23 +125,23 @@ h5_optimize_for_lustre ( h5_free(path); } - TRY( h5priv_mpi_bcast(f, &stripe_size, 1, MPI_LONG_LONG, 0, f->comm) ); - h5_info(f, MSG_HEADER + TRY( h5priv_mpi_bcast(&stripe_size, 1, MPI_LONG_LONG, 0, f->comm) ); + h5_info(MSG_HEADER "Found lustre stripe size of %lld bytes", (long long)stripe_size); hsize_t btree_ik = (stripe_size - 4096) / 96; hsize_t btree_bytes = 64 + 96*btree_ik; - h5_info(f, MSG_HEADER + h5_info(MSG_HEADER "Setting HDF5 btree ik to %lld (= %lld bytes at rank 3)", (long long)btree_ik, (long long)btree_bytes); - TRY( hdf5_set_btree_ik_property(f, f->create_prop, btree_ik) ); + TRY( hdf5_set_btree_ik_property(f->create_prop, btree_ik) ); /* set alignment to lustre stripe size */ - TRY( hdf5_set_alignment_property(f, + TRY( hdf5_set_alignment_property( f->access_prop, 0, stripe_size) ); - h5_info(f, MSG_HEADER "Disabling metadata cache flushes."); + h5_info(MSG_HEADER "Disabling metadata cache flushes."); /* disable metadata cache flushes */ /* defer metadata writes */ H5AC_cache_config_t config; @@ -149,7 +155,7 @@ h5_optimize_for_lustre ( config.flash_incr_mode = H5C_flash_incr__off; TRY( H5Pset_mdc_config( f->access_prop, &config ) ); - return H5_SUCCESS; + H5_CORE_API_RETURN (H5_SUCCESS); } #endif // H5_USE_LUSTRE diff --git a/src/h5core/h5_openclose.c b/src/h5core/h5_openclose.c index d164607..1e03745 100644 --- a/src/h5core/h5_openclose.c +++ b/src/h5core/h5_openclose.c @@ -348,7 +348,8 @@ h5_set_stepname_fmt ( strncpy ( f->prefix_step_name, name, - H5_STEPNAME_LEN - 1); + //H5_STEPNAME_LEN - 1); + 63); f->width_step_idx = width; H5_CORE_API_RETURN (H5_SUCCESS); @@ -474,10 +475,11 @@ h5_strdupfor2c ( char *dup = (char*)malloc ( len + 1 ); strncpy ( dup, s, len ); - char *p = dup + len; - do { - *p-- = '\0'; - } while ( *p == ' ' ); + dup[len] = '\0'; + for (int i=len-1; i>=0; i--) { + if (dup[i] == ' ') dup[i] = '\0'; + else break; + } return dup; } diff --git a/src/h5core/h5_readwrite.c b/src/h5core/h5_readwrite.c index 9513bad..6c26c64 100644 --- a/src/h5core/h5_readwrite.c +++ b/src/h5core/h5_readwrite.c @@ -269,7 +269,7 @@ h5_normalize_dataset_name ( H5_CORE_API_ENTER2 (h5_err_t, "name=\"%s\", name2=\"%s\"", name, name2); - if ( strlen(name) > H5_DATANAME_LEN ) { + if ( strlen(name) > H5_DATANAME_LEN-1 ) { strncpy ( name2, name, H5_DATANAME_LEN-1 ); name2[H5_DATANAME_LEN-1] = '\0'; h5_warn ("Truncated name '%s' to '%s'.", name, name2); diff --git a/src/h5core/h5u_model.c b/src/h5core/h5u_model.c index 1c48300..91fa98e 100644 --- a/src/h5core/h5u_model.c +++ b/src/h5core/h5u_model.c @@ -275,8 +275,8 @@ h5u_set_view ( h5_err_t h5u_set_view_indices ( h5_file_t *const f, /*!< [in] Handle to open file */ - const h5_id_t *const indices, /*!< [in] List of indices */ - const h5_size_t nelems /*!< [in] Size of list */ + const h5_size_t *const indices, /*!< [in] List of indices */ + h5_size_t nelems /*!< [in] Size of list */ ) { H5_CORE_API_ENTER3 (h5_err_t, "f=0x%p, indices=0x%p, nelems=%llu", @@ -299,7 +299,7 @@ h5u_set_view_indices ( For now, we interpret start=-1 to mean 0 and end==-1 to mean end of file */ - TRY ( total = (hsize_t) h5u_get_num_particles ( f ) ); + TRY ( total = h5u_get_num_particles ( f ) ); if ( total == 0 ) { /* No datasets have been created yet and no veiws are set. * We have to leave the view empty because we don't know how @@ -309,19 +309,19 @@ h5u_set_view_indices ( if ( total == 0 ) return H5_SUCCESS; - u->nparticles = (hsize_t) nelems; + u->nparticles = nelems; h5_debug ("This view selected %lld particles.", (long long)u->nparticles ); /* declare overall data size but then will select a subset */ TRY (u->diskshape = hdf5_create_dataspace (1, &total, NULL)); /* declare local memory datasize */ - total = (size_t)u->nparticles; + total = u->nparticles; TRY (u->memshape = hdf5_create_dataspace (1, &total, &dmax)); TRY (hdf5_select_elements_of_dataspace ( - u->diskshape, - H5S_SELECT_SET, - nelems, (hsize_t*)indices ) ); + u->diskshape, + H5S_SELECT_SET, + nelems, indices ) ); u->viewindexed = 1; diff --git a/src/include/H5Part.h b/src/include/H5Part.h index 9c0632f..d36e5fd 100644 --- a/src/include/H5Part.h +++ b/src/include/H5Part.h @@ -129,7 +129,7 @@ H5PartSetView ( h5_err_t H5PartSetViewIndices ( h5_file_t *f, /*!< [in] Handle to open file */ - const h5_id_t *indices, /*!< [in] List of indices */ + const h5_size_t *indices, /*!< [in] List of indices */ h5_size_t nelems /*!< [in] Size of list */ ); diff --git a/src/include/h5core/h5u_model.h b/src/include/h5core/h5u_model.h index b14f198..606e712 100644 --- a/src/include/h5core/h5u_model.h +++ b/src/include/h5core/h5u_model.h @@ -33,8 +33,8 @@ h5u_set_view ( h5_err_t h5u_set_view_indices ( h5_file_t *const f, - const h5_id_t *const indices, - const h5_size_t nelems + const h5_size_t *const indices, + h5_size_t nelems ); h5_err_t diff --git a/test/H5Fed/Makefile.am b/test/H5Fed/Makefile.am index 8db8eed..bddded1 100644 --- a/test/H5Fed/Makefile.am +++ b/test/H5Fed/Makefile.am @@ -2,15 +2,6 @@ OBJEXT = o -# COMPILER SETTING -CC = @CC@ -CXX = @CXX@ -FC = @FC@ - -# COMPILER FLAG SETTING -AM_CFLAGS = @CFLAGS@ -FFLAGS = @FFLAGS@ - AM_LDFLAGS = -L../../src/lib @LDFLAGS@ LIBS = -lH5hutC -lH5hut @LIBS@ INCLUDES = -I../../src/include @INCLUDES@ @@ -35,7 +26,7 @@ EXTRA_DIST = \ tetmesh_adjacencies.c \ tetmesh_read.c \ tetmesh_read_tags.c \ -g tetmesh_write.c \ + tetmesh_write.c \ tetmesh_write2.c \ tetmesh_write_tags.c \ trimesh_adjacencies.c \ @@ -47,8 +38,6 @@ g tetmesh_write.c \ # map_triangle2globalid.c \ # $(bin_SCRIPTS) -all: $(noinst_PROGRAMS) - clean: clean-am rm -f *.h5 diff --git a/test/H5Part/Bench.c b/test/H5Part/Bench.c index bae0021..2d7903b 100644 --- a/test/H5Part/Bench.c +++ b/test/H5Part/Bench.c @@ -10,7 +10,7 @@ #endif #ifndef DISABLE_H5PART -#include "H5Part.h" +#include "H5hut.h" #endif #define FILENAME "testio" @@ -217,7 +217,7 @@ int main(int argc,char *argv[]){ if(rank==0) unlink(filename); MPI_Barrier(MPI_COMM_WORLD); /* to prevent unlink from interfering with file open */ - f = H5PartOpenFileParallel(filename,H5PART_WRITE,MPI_COMM_WORLD); + f = H5OpenFile(filename,H5_O_WRONLY,MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD); /* to prevent unlink from interfering with file open */ /* start the timer */ starttime=endtime=MPI_Wtime(); @@ -228,7 +228,7 @@ int main(int argc,char *argv[]){ for(n=0;n