diff --git a/configure.ac b/configure.ac index 100d178..6c8434a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # Every configure script must call AC_INIT before doing anything else. # AC_INIT (package, version, [bug-report], [tarname]) -AC_INIT([H5hut], [1.99.0], [h5part@lists.psi.ch], H5Part) +AC_INIT([H5hut], [1.99.0], [h5part@lists.psi.ch], H5hut) # Ensure that a recent enough version of Autoconf is being used. @@ -14,9 +14,7 @@ AC_PREREQ(2.59) # The AC_CONFIG_HEADERS macro selects this kind of output. AC_CONFIG_HEADER(config.h) - -BINDINGS='' -BUILD_LIBS='libH5hut' +BUILD_LIBS='libH5hut.a' USE_C='yes' ############################################################################### @@ -53,12 +51,6 @@ AC_ARG_ENABLE( [Compile the MPI/IO interface [default=no]])], [USE_PARALLEL=$enableval]) -AC_ARG_ENABLE( - [tools], - [AC_HELP_STRING([--enable-tools], - [Compile h5part tools [default=no]])], - [USE_TOOLS=$enableval]) - AC_ARG_WITH( [mpi], [AC_HELP_STRING([--with-mpi], @@ -83,12 +75,9 @@ AC_ARG_WITH( SAVE_CC=$CC SAVE_CXX=$CXX -SAVE_FC=$FC SAVE_MPICC=$MPICC SAVE_MPICXX=$MPICXX -SAVE_MPIFC=$MPIFC SAVE_CFLAGS=$CFLAGS -SAVE_FFLAGS=$FFLAGS SAVE_INCLUDES=$INCLUDES SAVE_LDFLAGS=$LDFLAGS SAVE_LIBS=$LIBS @@ -206,7 +195,10 @@ AC_MSG_CHECKING([if C interface enabled]) if test "X$USE_C" = "Xyes"; then AC_MSG_RESULT([yes]) BINDINGS="$BINDINGS C" - BUILD_LIBS="$BUILD_LIBS libH5hutC" + LIB_C="libH5hutC.a" + BUILD_LIBS="$BUILD_LIBS $LIB_C" + BUILD_TESTS="$BUILD_TESTS h5u_test h5b_test" + BUILD_TOOLS="$BUILD_TOOLS h5hutcc" fi ############################ fortran enabled ################################## @@ -214,8 +206,8 @@ AC_MSG_CHECKING([if fortran interface enabled]) if test "X$USE_FORTRAN" = "Xyes"; then AC_MSG_RESULT([yes]) BINDINGS="$BINDINGS Fortran" - BUILD_LIBS="$BUILD_LIBS libH5hutF" - + LIB_FORTRAN="libH5hutF.a" + BUILD_LIBS="$BUILD_LIBS $LIB_FORTRAN" AC_PROG_FC(pgf90 ifort xlf_r pathf90 g95 g90 ftn gfortran) if test -z "$FC" ; then @@ -375,14 +367,6 @@ else # --enable-parallel=no fi fi -AC_MSG_CHECKING([wheter tools are enabled]) -if test "X$USE_TOOLS" = "Xyes"; then - AC_MSG_RESULT([yes]) - BUILD_TOOLS="h5pAttrib h5pToGNUplot # homdynToH5p" -else - AC_MSG_RESULT([no]) -fi - ############################################################################### ######################### PATH CHECKING & SETTING ############################# ############################################################################### @@ -443,8 +427,8 @@ if test -z "$LUSTREROOT"; then AC_MSG_WARN([Couldn't locate the lustre API... building without support for lustre striping!]) else CFLAGS="$CFLAGS -DH5_USE_LUSTRE" - INCLUDES="$INCLUDES -I$LUSTREROOT/include" - LDFLAGS="LDFLAGS -L$LUSTREROOT/lib" + INCLUDES="$INCLUDES -I$LUSTREROOT/usr/include" + LDFLAGS="$LDFLAGS -L$LUSTREROOT/usr/lib" LIBS="$LIBS -llustreapi" fi @@ -532,25 +516,22 @@ AC_SUBST(FFLAGS) AC_SUBST(INCLUDES) AC_SUBST(LDFLAGS) AC_SUBST(LIBS) -AC_SUBST(STDCXX) AC_SUBST(UNDERSCORE_H) -AC_SUBST(BUILD_TOOLS) -AC_SUBST(FORTRAN_LIB) +AC_SUBST(LIB_C) +AC_SUBST(LIB_FORTRAN) AC_SUBST(BINDINGS) +AC_SUBST(BUILD_TESTS) +AC_SUBST(BUILD_TOOLS) # Make AC_OUTPUT create each `file' by copying an input file (by default `file.in'), # substituting the output variable values. AC_CONFIG_FILES([ Makefile - doc/Makefile src/Makefile src/C/Makefile src/h5core/Makefile src/Fortran/Makefile test/Makefile - test/H5Part/Makefile - test/H5Block/Makefile - test/H5Fed/Makefile tools/Makefile tools/h5hutcc ]) diff --git a/doc/Makefile.am b/doc/Makefile.am index 58e3680..2c6a332 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,17 +1,10 @@ -DOXYGROUPS = \ - h5part__attrib \ - h5part__errhandle \ - h5part__openclose \ - h5part__read \ - h5part__write \ - h5block__c__api - EXTRA_DIST = \ - Doxyfile doxyfooter + Doxyfile \ + H5.dox all: -doc: doxydoc +doc: doxydoc: doxygen diff --git a/src/C/H5Fed_retrieve.c b/src/C/H5Fed_retrieve.c index f49868d..7e5bd8e 100644 --- a/src/C/H5Fed_retrieve.c +++ b/src/C/H5Fed_retrieve.c @@ -107,7 +107,7 @@ H5FedGetVertexCoordByID ( h5_float64_t P[3] ) { SET_FNAME (f, __func__); - return h5t_get_vertrex_coords_by_id (f, vertex_id, P); + return h5t_get_vertex_coords_by_id (f, vertex_id, P); } h5_err_t diff --git a/src/C/Makefile.am b/src/C/Makefile.am index 3f178a7..bbf8045 100644 --- a/src/C/Makefile.am +++ b/src/C/Makefile.am @@ -6,7 +6,7 @@ LIBS = @LIBS@ INCLUDES = -I../include @INCLUDES@ # What to build... Will be determined by configure script. -lib_LIBRARIES = libH5hutC.a +lib_LIBRARIES = @LIB_C@ # Listing of all possible targets that I may build. EXTRA_LIBRARIES = libH5hutC.a @@ -20,6 +20,7 @@ include_HEADERS = \ ../include/H5Block.h \ ../include/H5Block_readwrite.h \ ../include/H5Fed.h \ + ../include/H5Fed_adjacency.h \ ../include/H5Fed_inquiry.h \ ../include/H5Fed_retrieve.h \ ../include/H5Fed_store.h \ @@ -42,8 +43,5 @@ libH5hutC_a_SOURCES = \ H5Fed_store.c \ H5Fed_tags.c -all: ../lib/libH5hutC.a - -../lib/libH5hutC.a: libH5hutC.a - -cp $^ $@ +clean: cleam-am diff --git a/src/Fortran/Makefile.am b/src/Fortran/Makefile.am index c3d64d8..de7e560 100644 --- a/src/Fortran/Makefile.am +++ b/src/Fortran/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST = TestUnderscoreC.c \ nodist_include_HEADERS = ../include/H5hutF.h # What to build... Will be determined by configure script. -lib_LIBRARIES = @FORTRAN_LIB@ +lib_LIBRARIES = @LIB_FORTRAN@ # Listing of all possible targets that I may build. EXTRA_LIBRARIES = libH5hutF.a @@ -34,11 +34,11 @@ libH5hutF_a_SOURCES = H5_F.c \ H5Block_F.c \ H5Block_readwrite_F.c -all: ../include/H5hutF.h ../lib/libH5hutF.a +libH5hutF_a_DEPENDENCIES = ../include/H5hutF.h ../include/H5hutF.h: $(F90_FILES) awk '/INTEGER\*8 FUNCTION/{print "\t" $$1 " " $$3}' $^ >$@ -../lib/libH5hutF.a: libH5hutF.a - -cp $^ $@ +clean: clean-am + $(RM) ../include/H5hutF.h diff --git a/src/Makefile.am b/src/Makefile.am index 71e504b..043e75d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,4 @@ # test level Makefile.am SUBDIRS = h5core @BINDINGS@ + diff --git a/src/h5core/Makefile.am b/src/h5core/Makefile.am index f8b65de..a425dbf 100644 --- a/src/h5core/Makefile.am +++ b/src/h5core/Makefile.am @@ -8,6 +8,7 @@ INCLUDES = -I../include @INCLUDES@ EXTRA_HEADERS = \ ../include/h5core/h5_attribs.h \ ../include/h5core/h5_core.h \ + ../include/h5core/h5_errno.h \ ../include/h5core/h5_errorhandling.h \ ../include/h5core/h5_hdf5.h \ ../include/h5core/h5_maps.h \ @@ -20,6 +21,7 @@ EXTRA_HEADERS = \ ../include/h5core/h5b_model.h \ ../include/h5core/h5b_attribs.h \ ../include/h5core/h5t_adjacencies.h \ + ../include/h5core/h5t_core.h \ ../include/h5core/h5t_inquiry.h \ ../include/h5core/h5t_map.h \ ../include/h5core/h5t_openclose.h \ @@ -28,45 +30,46 @@ 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_core_private.h \ h5_errorhandling_private.h \ h5_fcmp_private.h \ h5_hdf5_private.h \ h5_hsearch_private.h \ + h5_lustre_private.h \ h5_mpi_private.h \ h5_qsort_private.h \ h5_readwrite_private.h \ h5_syscall_private.h \ - h5_lustre_private.h \ - h5u_errorhandling_private.h \ - h5b_errorhandling_private.h \ - h5b_model_private.h \ h5t_access_private.h \ h5t_adjacencies_private.h \ h5t_consts_private.h \ + h5t_core_private.h \ h5t_errorhandling_private.h \ h5t_hsearch_private.h \ + h5t_map_private.h \ h5t_openclose_private.h \ h5t_readwrite_private.h \ h5t_retrieve_private.h \ h5t_store_private.h \ - h5t_tags_private.h + 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 # Extra files that I wish to include in the dist tar ball. EXTRA_DIST = $(EXTRA_HEADERS) -# Files that I don't want to include in the dist tar ball -nodist_include_HEADERS = - -#OBJEXT = o # What to build... Will be determined by configure script. lib_LIBRARIES = libH5hut.a # Listing of all possible targets that I may build. EXTRA_LIBRARIES = libH5hut.a -# Header files that I wish to install in $(prefix)/include -include_HEADERS = - # Listing of sources libH5hut_a_SOURCES = \ h5_attribs.c \ @@ -112,10 +115,9 @@ libH5hut_a_SOURCES = \ libH5hut_a_DEPENDENCIES = $(EXTRA_HEADERS) -all: ../lib/libH5hut.a +install-exec-local: + @$(INSTALL) -d $(DESTDIR)$(includedir)/h5core + @$(INSTALL) -m644 ../include/h5core/*.h $(DESTDIR)$(includedir)/h5core/ -../lib/libH5hut.a: libH5hut.a - -cp $^ $@ - -$(libH5hut_a_OBJECTS): $(libH5hut_a_DEPENDENCIES) +clean: clean-am diff --git a/src/h5core/h5_errorhandling.c b/src/h5core/h5_errorhandling.c index 844dda0..43d828d 100644 --- a/src/h5core/h5_errorhandling.c +++ b/src/h5core/h5_errorhandling.c @@ -152,7 +152,11 @@ h5_abort_errorhandler ( if (h5priv_debug_level > 0) { h5_verror (f, fmt, ap); } +#ifdef PARALLEL_IO + MPI_Abort(f->comm, -(int)f->__errno); +#else exit (-(int)f->__errno); +#endif } static void diff --git a/src/h5core/h5_lustre.c b/src/h5core/h5_lustre.c index ff86e78..683e582 100644 --- a/src/h5core/h5_lustre.c +++ b/src/h5core/h5_lustre.c @@ -28,7 +28,7 @@ _print_stripe_info(struct lov_user_md *lum) } static ssize_t -_get_lustre_stripe_size ( const char *path ) +_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); @@ -89,7 +89,7 @@ _get_lustre_stripe_size ( const char *path ) return stripe_size; } -herr_t +h5_err_t h5_optimize_for_lustre ( h5_file_t *const f, const char *filename @@ -114,17 +114,19 @@ h5_optimize_for_lustre ( } else fclose(test); - stripe_size = _get_lustre_stripe_size(path); + stripe_size = _get_lustre_stripe_size(f, path); free(path); } TRY( h5priv_mpi_bcast(f, &stripe_size, 1, MPI_LONG_LONG, 0, f->comm) ); - h5_info(f, "Found lustre stripe size of %lld bytes", (long long)stripe_size); + h5_info(f, 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, + h5_info(f, MSG_HEADER "Setting HDF5 btree ik to %lld (= %lld bytes at rank 3)", (long long)btree_ik, (long long)btree_bytes); TRY( h5priv_set_hdf5_btree_ik_property(f, f->create_prop, btree_ik) ); @@ -133,21 +135,19 @@ h5_optimize_for_lustre ( TRY( h5priv_set_hdf5_alignment_property(f, f->access_prop, 0, stripe_size) ); - if (_verbose) { - fprintf(MSG_STREAM, MSG_HEADER "disabling metadata cache flushes.\n"); - } + h5_info(f, MSG_HEADER "Disabling metadata cache flushes."); /* disable metadata cache flushes */ /* defer metadata writes */ H5AC_cache_config_t config; config.version = H5AC__CURR_CACHE_CONFIG_VERSION; - TRY( H5Pget_mdc_config( fapl_id, &config ) ); + TRY( H5Pget_mdc_config( f->access_prop, &config ) ); config.set_initial_size = 1; config.initial_size = 16 * 1024 * 1024; config.evictions_enabled = 0; config.incr_mode = H5C_incr__off; config.decr_mode = H5C_decr__off; config.flash_incr_mode = H5C_flash_incr__off; - TRY( H5Pset_mdc_config( fapl_id, &config ) ); + TRY( H5Pset_mdc_config( f->access_prop, &config ) ); return H5_SUCCESS; } diff --git a/src/h5core/h5_qsort.c b/src/h5core/h5_qsort.c index 77a6612..e67cb39 100644 --- a/src/h5core/h5_qsort.c +++ b/src/h5core/h5_qsort.c @@ -97,8 +97,6 @@ med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk #ifndef I_AM_QSORT_R #if __GNUC__ __attribute__((unused)) -#else -__unused #endif #endif ) diff --git a/test/H5Fed/Makefile.am b/test/H5Fed/Makefile.am index 21ba065..6f5b990 100644 --- a/test/H5Fed/Makefile.am +++ b/test/H5Fed/Makefile.am @@ -2,9 +2,6 @@ OBJEXT = o -# PATH SETTING -HDF5ROOT = @HDF5ROOT@ - # COMPILER SETTING CXX = @CXX@ FC = @FC@ @@ -13,30 +10,14 @@ MPICXX = @MPICXX@ MPICC = @MPICC@ # COMPILER FLAG SETTING -CFLAGS = @CFLAGS@ -FFLAGS = @FFLAGS@ @MPIINC@ +AM_CFLAGS = @CFLAGS@ +FFLAGS = @FFLAGS@ -# LIBRARIES -SZLIB = @SZLIB@ -HDFLIB = -L$(HDF5ROOT)/lib -lhdf5 -lz $(SZLIB) @LDFLAGS@ -MPILIB = @MPILIB@ -H5LIB = -L${abs_top_builddir}/src/lib -lH5Core -lH5 +AM_LDFLAGS = -L../../src/lib @LDFLAGS@ +LIBS = -lH5hutC -lH5hut @LIBS@ +INCLUDES = -I../../src/include @INCLUDES@ -LIBS = ${H5LIB} $(HDFLIB) $(MPILIB) -lm @STDCXX@ - -# H5Part compiled library location -# H5PLIB = -L@prefix@/lib - -# INCLUDES -HDFINC = -I$(HDF5ROOT)/include -MPIINC = @MPIINC@ -H5INC = -I${abs_top_builddir}/src/include - -INC = $(HDFINC) $(MPIINC) $(H5INC) - - -# What to build... make install will place these files in the $(prefix)/bin directory. -bin_PROGRAMS = \ +noinst_PROGRAMS = \ tetmesh_write \ tetmesh_write2 \ tetmesh_read \ @@ -49,12 +30,6 @@ bin_PROGRAMS = \ # map_tet2globalid \ # map_triangle2globalid -# Some useful scripts that I wish to place in the $(prefix)/bin directory. -bin_SCRIPTS = - -# Listing of all programs that maybe built. (Has to know statically...) -EXTRA_PROGRAMS = - # Extra files that I wish to include in the dist tar ball. EXTRA_DIST = \ tetmesh_write.c \ @@ -70,27 +45,8 @@ EXTRA_DIST = \ # map_triangle2globalid.c \ # $(bin_SCRIPTS) -all: $(bin_PROGRAMS) - -############################################################################### -% : %.o - $(CC) -o $@ $< $(H5LIB) $(LIBS) - -%.o : %.c - $(CC) $(CFLAGS) $(INC) -g -c $< - -%.o : %.f90 - ${FC} $(FFLAGS) -c $(H5INC) $< - -############################################################################### -clean: - ${RM} -f *~ *.o ${bin_PROGRAMS} - -distclean: clean - ${RM} -rf .deps - ${RM} -rf .libs - ${RM} -f parttest.h5 - ${RM} -rf config.status config.log config.h Makefile - +all: $(noinst_PROGRAMS) +clean: clean-am + rm -f *.h5 diff --git a/test/H5Fed/map_tet2globalid.c b/test/H5Fed/map_tet2globalid.c index 4b8b68f..cfaaaa8 100644 --- a/test/H5Fed/map_tet2globalid.c +++ b/test/H5Fed/map_tet2globalid.c @@ -1,8 +1,7 @@ #include #include -#include -#include "H5Part.h" -#include "H5Fed.h" + +#include "H5hut.h" #ifndef PARALLEL_IO #ifndef MPI_COMM_WORLD diff --git a/test/H5Fed/map_triangle2globalid.c b/test/H5Fed/map_triangle2globalid.c index 3877a9e..af6668c 100644 --- a/test/H5Fed/map_triangle2globalid.c +++ b/test/H5Fed/map_triangle2globalid.c @@ -1,8 +1,7 @@ #include #include -#include -#include "H5Part.h" -#include "H5Fed.h" + +#include "H5hut.h" #ifndef PARALLEL_IO #ifndef MPI_COMM_WORLD diff --git a/test/H5Fed/tetmesh_adjacencies.c b/test/H5Fed/tetmesh_adjacencies.c index fdeb5d7..bc1dbdf 100644 --- a/test/H5Fed/tetmesh_adjacencies.c +++ b/test/H5Fed/tetmesh_adjacencies.c @@ -2,8 +2,7 @@ #include #include -#include "H5Part.h" -#include "H5Fed.h" +#include "H5hut.h" #define PRINT_UPADJACENCIES 1 #define PRINT_DOWNADJACENCIES 0 diff --git a/test/H5Fed/tetmesh_read.c b/test/H5Fed/tetmesh_read.c index fa8acb8..610d2fa 100644 --- a/test/H5Fed/tetmesh_read.c +++ b/test/H5Fed/tetmesh_read.c @@ -2,8 +2,7 @@ #include #include -#include "H5Part.h" -#include "H5Fed.h" +#include "H5hut.h" const h5_oid_t MESH_TYPE = H5_TETRAHEDRAL_MESH; const char* FNAME = "simple_tet.h5"; diff --git a/test/H5Fed/tetmesh_read_tags.c b/test/H5Fed/tetmesh_read_tags.c index 2b7b672..6f75d9c 100644 --- a/test/H5Fed/tetmesh_read_tags.c +++ b/test/H5Fed/tetmesh_read_tags.c @@ -1,9 +1,8 @@ #include #include #include -#include -#include "H5Part.h" -#include "H5Fed.h" + +#include "H5hut.h" #ifndef PARALLEL_IO #ifndef MPI_COMM_WORLD diff --git a/test/H5Fed/tetmesh_write.c b/test/H5Fed/tetmesh_write.c index d05dc82..b13b98c 100644 --- a/test/H5Fed/tetmesh_write.c +++ b/test/H5Fed/tetmesh_write.c @@ -2,8 +2,7 @@ #include #include -#include "H5Part.h" -#include "H5Fed.h" +#include "H5hut.h" #ifndef PARALLEL_IO #ifndef MPI_COMM_WORLD diff --git a/test/H5Fed/tetmesh_write2.c b/test/H5Fed/tetmesh_write2.c index bba5386..d6669c8 100644 --- a/test/H5Fed/tetmesh_write2.c +++ b/test/H5Fed/tetmesh_write2.c @@ -2,8 +2,7 @@ #include #include -#include "H5Part.h" -#include "H5Fed.h" +#include "H5hut.h" const h5_oid_t MESH_TYPE = H5_TETRAHEDRAL_MESH; const char* FNAME = "simple_tet.h5"; diff --git a/test/H5Fed/tetmesh_write_tags.c b/test/H5Fed/tetmesh_write_tags.c index fbc5286..a994ca7 100644 --- a/test/H5Fed/tetmesh_write_tags.c +++ b/test/H5Fed/tetmesh_write_tags.c @@ -3,8 +3,7 @@ #include #include -#include "H5Part.h" -#include "H5Fed.h" +#include "H5hut.h" const h5_oid_t MESH_TYPE = H5_TETRAHEDRAL_MESH; const char* FNAME = "simple_tet.h5"; diff --git a/test/H5Fed/trimesh_read.c b/test/H5Fed/trimesh_read.c index 6289e39..79b2578 100644 --- a/test/H5Fed/trimesh_read.c +++ b/test/H5Fed/trimesh_read.c @@ -1,8 +1,7 @@ #include #include -#include "H5Part.h" -#include "H5Fed.h" +#include "H5hut.h" const h5_oid_t MESH_TYPE = H5_TRIANGLE_MESH; const char* FNAME = "simple_triangle.h5"; diff --git a/test/H5Fed/trimesh_write.c b/test/H5Fed/trimesh_write.c index 1aaf058..c5a94d6 100644 --- a/test/H5Fed/trimesh_write.c +++ b/test/H5Fed/trimesh_write.c @@ -1,8 +1,7 @@ #include #include -#include "H5Part.h" -#include "H5Fed.h" +#include "H5hut.h" const h5_oid_t MESH_TYPE = H5_TRIANGLE_MESH; const char* FNAME = "simple_triangle.h5"; diff --git a/test/H5Fed/write_boundary.c b/test/H5Fed/write_boundary.c index c2b84e6..6f002c2 100644 --- a/test/H5Fed/write_boundary.c +++ b/test/H5Fed/write_boundary.c @@ -1,8 +1,7 @@ #include #include -#include -#include "H5Part.h" -#include "H5Fed.h" + +#include "H5hut.h" #ifndef PARALLEL_IO #ifndef MPI_COMM_WORLD diff --git a/test/Makefile.am b/test/Makefile.am index 26e1f60..ba078c2 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -4,15 +4,15 @@ OBJEXT=o -LDFLAGS = -L../src/lib @LDFLAGS@ +AM_LDFLAGS = -L../src/h5core -L../src/C @LDFLAGS@ LIBS = -lH5hutC -lH5hut @LIBS@ INCLUDES = -I../src/include @INCLUDES@ -noinst_PROGRAMS = h5u_test h5b_test +noinst_PROGRAMS = @BUILD_TESTS@ TESTS_ENVIRONMENT = env LD_LIBRARY_PATH=@HDF5ROOT@/lib:$(LD_LIBRARY_PATH) -TESTS = h5u_test h5b_test +TESTS = @BUILD_TESTS@ EXTRA_PROGRAMS = h5u_test h5b_test @@ -25,8 +25,8 @@ h5u_test_SOURCES = \ params.h h5u_test_DEPENDENCIES = \ - ../src/lib/libH5hut.a \ - ../src/lib/libH5hutC.a + ../src/h5core/libH5hut.a \ + ../src/C/libH5hutC.a h5b_test_SOURCES = \ h5b_test.c \ @@ -37,8 +37,8 @@ h5b_test_SOURCES = \ params.h h5b_test_DEPENDENCIES = \ - ../src/lib/libH5hut.a \ - ../src/lib/libH5hutC.a + ../src/h5core/libH5hut.a \ + ../src/C/libH5hutC.a clean: clean-am rm -f *.h5 diff --git a/tools/Makefile.am b/tools/Makefile.am index f0729b6..e57aa5e 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -2,27 +2,26 @@ OBJEXT=o -LDFLAGS = -L../src/lib @LFLAGS@ +AM_LDFLAGS = -L../src/lib @LFLAGS@ LIBS = -lH5hutC -lH5hut @LIBS@ INCLUDES = -I../src/include @INCLUDES@ # What to build... make install will place these files in the $(prefix)/bin directory. -bin_PROGRAMS = @BUILD_TOOLS@ +bin_SCRIPTS = @BUILD_TOOLS@ # Listing of all programs that maybe built. (Has to know statically...) -EXTRA_PROGRAMS = h5pAttrib h5pToGNUplot # homdynToH5p +EXTRA_SCRIPTS = h5hutcc # Extra files that I wish to include in the dist tar ball. -EXTRA_DIST = h5pAttrib.cc h5pToGNUplot.cc## TO BE TAILORED LATER... +#EXTRA_DIST = h5pAttrib.cc h5pToGNUplot.cc## TO BE TAILORED LATER... # Listing of sources -h5pAttrib_SOURCES = h5pAttrib.cc +#h5pAttrib_SOURCES = h5pAttrib.cc -h5pToGNUplot_SOURCES = h5pToGNUplot.cc +#h5pToGNUplot_SOURCES = h5pToGNUplot.cc #homdynToH5p_SOURCES = homdynToH5p.cc -install-exec-local: - @$(INSTALL) h5hutcc $(DESTDIR)$(bindir)/h5hutcc +clean: clean-am diff --git a/tools/h5pAttrib.cc b/tools/h5pAttrib.cc index b690f48..c6c2dfc 100644 --- a/tools/h5pAttrib.cc +++ b/tools/h5pAttrib.cc @@ -8,8 +8,8 @@ #include #include #include -#include -#include "H5Part.h" + +#include "H5hut.h" #define MAX_LEN 100 @@ -17,11 +17,11 @@ int get_option(int argc, const char **argv, const char *opts, const struct long_options *l_opts); static void print_help(); static void free_handler(struct arg_handler *hand, int len); -static void print_all(H5PartFile* file); -static void print_nstep(H5PartFile* file, char * garbage); -static void print_file_attributes(H5PartFile* file, char * garbage); -static void print_step_attributes(H5PartFile* file, char *attr); -static void print_dataset(H5PartFile* file, char *attr); +static void print_all(h5_file_t* file); +static void print_nstep(h5_file_t* file, char * garbage); +static void print_file_attributes(h5_file_t* file, char * garbage); +static void print_step_attributes(h5_file_t* file, char *attr); +static void print_dataset(h5_file_t* file, char *attr); static struct arg_handler* function_assign(int argc, const char *argv[]); /* Global variables */ @@ -66,7 +66,7 @@ static struct long_options l_opts[] = /* a structure for handling the order command-line parameters come in */ struct arg_handler { - void (*func)(H5PartFile *, char *); + void (*func)(h5_file_t *, char *); char *obj; }; @@ -335,27 +335,27 @@ static void print_help() } /* For priting everything (default option when no flags provided.) */ -static void print_all(H5PartFile* file) +static void print_all(h5_file_t* file) { int nt; char file_attrib[MAX_LEN]; - h5part_int64_t type; - h5part_int64_t num_elem; - h5part_int64_t num_attrib; + h5_int64_t type; + h5_int64_t num_elem; + h5_int64_t num_attrib; char step_attrib[MAX_LEN]; - h5part_int64_t i, j, k; - h5part_int64_t count; + h5_int64_t i, j, k; + h5_int64_t count; void* value = NULL; - h5part_int64_t timestep_ctr; + h5_int64_t timestep_ctr; char data_name[MAX_LEN]; - h5part_int64_t num_dataset; - h5part_int64_t nparticles; + h5_int64_t num_dataset; + h5_int64_t nparticles; fprintf(stdout, "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); fprintf(stdout, "\n"); - nt=H5PartGetNumSteps(file); + nt=H5GetNumSteps(file); fprintf(stdout, "There are total %d number of timesteps.\n",nt); fprintf(stdout, "\nDump result for \"%s\"...\n\n", global_fname); @@ -364,25 +364,33 @@ static void print_all(H5PartFile* file) if(print_header) { - num_attrib = H5PartGetNumFileAttribs(file); + num_attrib = H5GetNumFileAttribs(file); for(i=0; i