Merge branch 'develop' into evict_on_close

This commit is contained in:
Dana Robinson 2016-09-14 17:02:43 -04:00
commit 7f817fea7c
309 changed files with 14881 additions and 10224 deletions

872
.gitattributes vendored Normal file
View File

@ -0,0 +1,872 @@
* text=auto !eol
bin/bbrelease -text
bin/genparser -text
bin/switch_maint_mode -text
c++/src/H5OcreatProp.cpp -text
c++/src/H5OcreatProp.h -text
c++/src/footer.html -text
c++/src/header_files/hdf_logo.jpg -text
c++/src/header_files/help.jpg -text
c++/src/header_files/image001.jpg -text
c++/src/header_files/image002.jpg -text
c++/test/tarray.cpp -text
c++/test/th5s.h5 -text
config/cce-fflags -text
config/cce-flags -text
config/cmake/CMakeFindJavaCommon.cmake -text
config/cmake/CPack.Info.plist.in -text svneol=unset#application/xml
config/cmake/FindHDFJAVA.cmake.in -text
config/cmake/FindJNI.cmake -text
config/cmake/HDF5UseFortran.cmake -text
config/cmake/HDF5_Examples.cmake.in -text
config/cmake/HDF5_Process_Flex_Files.cmake -text
config/cmake/HDFCompilerFlags.cmake -text
config/cmake/UseJava.cmake -text
config/cmake/UseJavaClassFilelist.cmake -text
config/cmake/UseJavaSymlinks.cmake -text
config/cmake/jrunTest.cmake -text
config/cmake/patch.xml -text
config/cmake/scripts/CTestScript.cmake -text
config/cmake/scripts/HDF5config.cmake -text
config/cmake_ext_mod/hdf.bmp -text
config/cmake_ext_mod/hdf.icns -text
config/cmake_ext_mod/hdf.ico -text
config/conclude_fc.am -text
config/gnu-cxxflags -text
examples/h5_vds-eiger.c -text
examples/h5_vds-exc.c -text
examples/h5_vds-exclim.c -text
examples/h5_vds-percival-unlim-maxmin.c -text
examples/h5_vds-percival-unlim.c -text
examples/h5_vds-percival.c -text
examples/h5_vds-simpleIO.c -text
examples/h5_vds.c -text
fortran/src/H5_buildiface.F90 -text
fortran/src/H5config_f.inc.cmake -text
fortran/src/H5config_f.inc.in -text
fortran/src/H5fort_type_defines.h.in -text
fortran/src/H5fortkit.F90 -text
fortran/test/H5_test_buildiface.F90 -text
hl/fortran/src/H5HL_buildiface.F90 -text
hl/fortran/src/hdf5_hl_fortrandll.def.in -text
hl/src/H5LD.c -text
hl/src/H5LDprivate.h -text
hl/src/H5LDpublic.h -text
hl/src/H5LTanalyze.c -text
hl/src/H5LTparse.c -text
hl/src/H5LTparse.h -text
hl/test/gen_test_ds.c svneol=native#text/plain
hl/test/gen_test_ld.c -text
hl/test/test_ds_be.h5 -text
hl/test/test_ds_le.h5 -text
hl/test/test_dset_append.c -text
hl/test/test_ld.c -text
hl/test/test_ld.h5 -text
hl/test/test_packet_vlen.c -text
hl/test/test_table_be.h5 -text
hl/test/test_table_cray.h5 -text
hl/test/test_table_le.h5 -text
hl/tools/gif2h5/CMakeLists.txt -text
hl/tools/gif2h5/CMakeTests.cmake -text
hl/tools/gif2h5/testfiles/README -text
hl/tools/gif2h5/testfiles/ex_image2.h5 -text
hl/tools/gif2h5/testfiles/h52giftst.h5 -text
hl/tools/gif2h5/testfiles/image1.gif -text
java/CMakeLists.txt -text
java/COPYING -text
java/Makefile.am -text
java/examples/CMakeLists.txt -text
java/examples/Makefile.am -text
java/examples/datasets/CMakeLists.txt -text
java/examples/datasets/H5Ex_D_Alloc.java -text
java/examples/datasets/H5Ex_D_Checksum.java -text
java/examples/datasets/H5Ex_D_Chunk.java -text
java/examples/datasets/H5Ex_D_Compact.java -text
java/examples/datasets/H5Ex_D_External.java -text
java/examples/datasets/H5Ex_D_FillValue.java -text
java/examples/datasets/H5Ex_D_Gzip.java -text
java/examples/datasets/H5Ex_D_Hyperslab.java -text
java/examples/datasets/H5Ex_D_Nbit.java -text
java/examples/datasets/H5Ex_D_ReadWrite.java -text
java/examples/datasets/H5Ex_D_Shuffle.java -text
java/examples/datasets/H5Ex_D_Sofloat.java -text
java/examples/datasets/H5Ex_D_Soint.java -text
java/examples/datasets/H5Ex_D_Szip.java -text
java/examples/datasets/H5Ex_D_Transform.java -text
java/examples/datasets/H5Ex_D_UnlimitedAdd.java -text
java/examples/datasets/H5Ex_D_UnlimitedGzip.java -text
java/examples/datasets/H5Ex_D_UnlimitedMod.java -text
java/examples/datasets/Makefile.am -text
java/examples/datasets/runExample.sh.in -text
java/examples/datatypes/CMakeLists.txt -text
java/examples/datatypes/H5Ex_T_Array.java -text
java/examples/datatypes/H5Ex_T_ArrayAttribute.java -text
java/examples/datatypes/H5Ex_T_Bit.java -text
java/examples/datatypes/H5Ex_T_BitAttribute.java -text
java/examples/datatypes/H5Ex_T_Commit.java -text
java/examples/datatypes/H5Ex_T_Compound.java -text
java/examples/datatypes/H5Ex_T_CompoundAttribute.java -text
java/examples/datatypes/H5Ex_T_Float.java -text
java/examples/datatypes/H5Ex_T_FloatAttribute.java -text
java/examples/datatypes/H5Ex_T_Integer.java -text
java/examples/datatypes/H5Ex_T_IntegerAttribute.java -text
java/examples/datatypes/H5Ex_T_ObjectReference.java -text
java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java -text
java/examples/datatypes/H5Ex_T_Opaque.java -text
java/examples/datatypes/H5Ex_T_OpaqueAttribute.java -text
java/examples/datatypes/H5Ex_T_String.java -text
java/examples/datatypes/H5Ex_T_StringAttribute.java -text
java/examples/datatypes/H5Ex_T_VLString.java -text
java/examples/datatypes/Makefile.am -text
java/examples/datatypes/runExample.sh.in -text
java/examples/groups/CMakeLists.txt -text
java/examples/groups/H5Ex_G_Compact.java -text
java/examples/groups/H5Ex_G_Corder.java -text
java/examples/groups/H5Ex_G_Create.java -text
java/examples/groups/H5Ex_G_Intermediate.java -text
java/examples/groups/H5Ex_G_Iterate.java -text
java/examples/groups/H5Ex_G_Phase.java -text
java/examples/groups/H5Ex_G_Traverse.java -text
java/examples/groups/H5Ex_G_Visit.java -text
java/examples/groups/Makefile.am -text
java/examples/groups/h5ex_g_iterate.h5 -text svneol=unset#application/x-hdf
java/examples/groups/h5ex_g_visit.h5 -text svneol=unset#application/x-hdf
java/examples/groups/runExample.sh.in -text
java/examples/intro/CMakeLists.txt -text
java/examples/intro/H5_CreateAttribute.java -text
java/examples/intro/H5_CreateDataset.java -text
java/examples/intro/H5_CreateFile.java -text
java/examples/intro/H5_CreateGroup.java -text
java/examples/intro/H5_CreateGroupAbsoluteRelative.java -text
java/examples/intro/H5_CreateGroupDataset.java -text
java/examples/intro/H5_ReadWrite.java -text
java/examples/intro/Makefile.am -text
java/examples/intro/runExample.sh.in -text
java/examples/testfiles/examples.datasets.H5Ex_D_Alloc.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Checksum.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Chunk.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Compact.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_External.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_FillValue.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Gzip.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Hyperslab.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Nbit.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_ReadWrite.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Shuffle.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Soint.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Szip.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_Transform.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_UnlimitedAdd.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_UnlimitedGzip.txt -text
java/examples/testfiles/examples.datasets.H5Ex_D_UnlimitedMod.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_Array.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_ArrayAttribute.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_Bit.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_BitAttribute.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_Commit.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_Compound.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_CompoundAttribute.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_Float.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_FloatAttribute.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_Integer.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_IntegerAttribute.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_ObjectReference.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_ObjectReferenceAttribute.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_Opaque.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_OpaqueAttribute.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_String.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_StringAttribute.txt -text
java/examples/testfiles/examples.datatypes.H5Ex_T_VLString.txt -text
java/examples/testfiles/examples.groups.H5Ex_G_Compact.txt -text
java/examples/testfiles/examples.groups.H5Ex_G_Corder.txt -text
java/examples/testfiles/examples.groups.H5Ex_G_Create.txt -text
java/examples/testfiles/examples.groups.H5Ex_G_Intermediate.txt -text
java/examples/testfiles/examples.groups.H5Ex_G_Iterate.txt -text
java/examples/testfiles/examples.groups.H5Ex_G_Phase.txt -text
java/examples/testfiles/examples.groups.H5Ex_G_Visit.txt -text
java/examples/testfiles/examples.intro.H5_CreateAttribute.txt -text
java/examples/testfiles/examples.intro.H5_CreateDataset.txt -text
java/examples/testfiles/examples.intro.H5_CreateFile.txt -text
java/examples/testfiles/examples.intro.H5_CreateGroup.txt -text
java/examples/testfiles/examples.intro.H5_CreateGroupAbsoluteRelative.txt -text
java/examples/testfiles/examples.intro.H5_CreateGroupDataset.txt -text
java/examples/testfiles/examples.intro.H5_ReadWrite.txt -text
java/lib/ext/slf4j-nop-1.7.5.jar -text svneol=unset#application/zip
java/lib/ext/slf4j-simple-1.7.5.jar -text svneol=unset#application/zip
java/lib/hamcrest-core.jar -text svneol=unset#application/java-archive
java/lib/junit.jar -text svneol=unset#application/java-archive
java/lib/simplelogger.properties -text
java/lib/slf4j-api-1.7.5.jar -text svneol=unset#application/zip
java/src/CMakeLists.txt -text
java/src/Makefile.am -text
java/src/hdf/CMakeLists.txt -text
java/src/hdf/hdf5lib/CMakeLists.txt -text
java/src/hdf/hdf5lib/H5.java -text
java/src/hdf/hdf5lib/HDF5Constants.java -text
java/src/hdf/hdf5lib/HDF5GroupInfo.java -text
java/src/hdf/hdf5lib/HDFArray.java -text
java/src/hdf/hdf5lib/HDFNativeData.java -text
java/src/hdf/hdf5lib/callbacks/Callbacks.java -text
java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java -text
java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5D_append_t.java -text
java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java -text
java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java -text
java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java -text
java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java -text
java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java -text
java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java -text
java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java -text
java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java -text
java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java -text
java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java -text
java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5Exception.java -text
java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java -text
java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java -text
java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java -text
java/src/hdf/hdf5lib/structs/H5A_info_t.java -text
java/src/hdf/hdf5lib/structs/H5E_error2_t.java -text
java/src/hdf/hdf5lib/structs/H5F_info2_t.java -text
java/src/hdf/hdf5lib/structs/H5G_info_t.java -text
java/src/hdf/hdf5lib/structs/H5L_info_t.java -text
java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java -text
java/src/hdf/hdf5lib/structs/H5O_info_t.java -text
java/src/hdf/hdf5lib/structs/H5_ih_info_t.java -text
java/src/hdf/overview.html -text
java/src/jni/CMakeLists.txt -text
java/src/jni/Makefile.am -text
java/src/jni/exceptionImp.c -text
java/src/jni/exceptionImp.h -text
java/src/jni/h5Constants.c -text
java/src/jni/h5Imp.c -text
java/src/jni/h5Imp.h -text
java/src/jni/h5aImp.c -text
java/src/jni/h5aImp.h -text
java/src/jni/h5dImp.c -text
java/src/jni/h5dImp.h -text
java/src/jni/h5eImp.c -text
java/src/jni/h5eImp.h -text
java/src/jni/h5fImp.c -text
java/src/jni/h5fImp.h -text
java/src/jni/h5gImp.c -text
java/src/jni/h5gImp.h -text
java/src/jni/h5iImp.c -text
java/src/jni/h5iImp.h -text
java/src/jni/h5jni.h -text
java/src/jni/h5lImp.c -text
java/src/jni/h5lImp.h -text
java/src/jni/h5oImp.c -text
java/src/jni/h5oImp.h -text
java/src/jni/h5pImp.c -text
java/src/jni/h5pImp.h -text
java/src/jni/h5plImp.c -text
java/src/jni/h5plImp.h -text
java/src/jni/h5rImp.c -text
java/src/jni/h5rImp.h -text
java/src/jni/h5sImp.c -text
java/src/jni/h5sImp.h -text
java/src/jni/h5tImp.c -text
java/src/jni/h5tImp.h -text
java/src/jni/h5util.c -text
java/src/jni/h5util.h -text
java/src/jni/h5zImp.c -text
java/src/jni/h5zImp.h -text
java/src/jni/nativeData.c -text
java/src/jni/nativeData.h -text
java/test/CMakeLists.txt -text
java/test/JUnit-interface.ert -text
java/test/JUnit-interface.txt -text
java/test/Makefile.am -text
java/test/TestAll.java -text
java/test/TestH5.java -text
java/test/TestH5A.java -text
java/test/TestH5D.java -text
java/test/TestH5Dparams.java -text
java/test/TestH5Dplist.java -text
java/test/TestH5E.java -text
java/test/TestH5Edefault.java -text
java/test/TestH5Eregister.java -text
java/test/TestH5F.java -text
java/test/TestH5Fbasic.java -text
java/test/TestH5Fparams.java -text
java/test/TestH5G.java -text
java/test/TestH5Gbasic.java -text
java/test/TestH5Giterate.java -text
java/test/TestH5Lbasic.java -text
java/test/TestH5Lcreate.java -text
java/test/TestH5Lparams.java -text
java/test/TestH5Obasic.java -text
java/test/TestH5Ocopy.java -text
java/test/TestH5Ocreate.java -text
java/test/TestH5Oparams.java -text
java/test/TestH5P.java -text
java/test/TestH5PData.java -text
java/test/TestH5PL.java -text
java/test/TestH5Pfapl.java -text
java/test/TestH5Plist.java -text
java/test/TestH5Pvirtual.java -text
java/test/TestH5R.java -text
java/test/TestH5S.java -text
java/test/TestH5Sbasic.java -text
java/test/TestH5T.java -text
java/test/TestH5Tbasic.java -text
java/test/TestH5Tparams.java -text
java/test/TestH5Z.java -text
java/test/h5ex_g_iterate.orig -text svneol=unset#application/x-hdf
java/test/junit.sh.in -text
m4/aclocal_cxx.m4 -text
m4/aclocal_fc.f90 -text
m4/aclocal_fc.m4 -text
m4/ax_check_class.m4 -text
m4/ax_check_classpath.m4 -text
m4/ax_check_java_home.m4 -text
m4/ax_check_junit.m4 -text
m4/ax_check_rqrd_class.m4 -text
m4/ax_java_check_class.m4 -text
m4/ax_java_options.m4 -text
m4/ax_jni_include_dir.m4 -text
m4/ax_prog_jar.m4 -text
m4/ax_prog_java.m4 -text
m4/ax_prog_java_cc.m4 -text
m4/ax_prog_java_works.m4 -text
m4/ax_prog_javac.m4 -text
m4/ax_prog_javac_works.m4 -text
m4/ax_prog_javadoc.m4 -text
m4/ax_prog_javah.m4 -text
m4/ax_try_compile_java.m4 -text
m4/ax_try_run_java.m4 -text
src/H5Cepoch.c -text
src/H5Cquery.c -text
src/H5Ctag.c -text
src/H5Ctest.c -text
src/H5Dnone.c -text
src/H5Dsingle.c -text
src/H5Oflush.c -text
test/bad_compound.h5 -text
test/be_data.h5 -text
test/be_extlink1.h5 -text
test/be_extlink2.h5 -text
test/btree_idx_1_6.h5 -text
test/btree_idx_1_8.h5 -text
test/cork.c -text
test/corrupt_stab_msg.h5 -text
test/deflate.h5 -text
test/dynlib4.c -text
test/family_v16_00000.h5 -text
test/family_v16_00001.h5 -text
test/family_v16_00002.h5 -text
test/family_v16_00003.h5 -text
test/file_image_core_test.h5 -text
test/filespace_1_6.h5 -text
test/filespace_1_8.h5 -text
test/fill_old.h5 -text
test/filter_error.h5 -text
test/group_old.h5 -text
test/le_data.h5 -text
test/le_extlink1.h5 -text
test/le_extlink2.h5 -text
test/mergemsg.h5 -text svneol=unset#application/hdf5
test/multi_file_v16-r.h5 -text
test/multi_file_v16-s.h5 -text
test/noencoder.h5 -text
test/specmetaread.h5 -text
test/tarrold.h5 -text
test/tbad_msg_count.h5 -text
test/tbogus.h5 -text
test/test_filters_be.h5 -text
test/test_filters_le.h5 -text
test/testfiles/plist_files/acpl_32be -text
test/testfiles/plist_files/acpl_32le -text
test/testfiles/plist_files/acpl_64be -text
test/testfiles/plist_files/acpl_64le -text
test/testfiles/plist_files/dapl_32be -text
test/testfiles/plist_files/dapl_32le -text
test/testfiles/plist_files/dapl_64be -text
test/testfiles/plist_files/dapl_64le -text
test/testfiles/plist_files/dcpl_32be -text
test/testfiles/plist_files/dcpl_32le -text
test/testfiles/plist_files/dcpl_64be -text
test/testfiles/plist_files/dcpl_64le -text
test/testfiles/plist_files/def_acpl_32be -text
test/testfiles/plist_files/def_acpl_32le -text
test/testfiles/plist_files/def_acpl_64be -text
test/testfiles/plist_files/def_acpl_64le -text
test/testfiles/plist_files/def_dapl_32be -text
test/testfiles/plist_files/def_dapl_32le -text
test/testfiles/plist_files/def_dapl_64be -text
test/testfiles/plist_files/def_dapl_64le -text
test/testfiles/plist_files/def_dcpl_32be -text
test/testfiles/plist_files/def_dcpl_32le -text
test/testfiles/plist_files/def_dcpl_64be -text
test/testfiles/plist_files/def_dcpl_64le -text
test/testfiles/plist_files/def_dxpl_32be -text
test/testfiles/plist_files/def_dxpl_32le -text
test/testfiles/plist_files/def_dxpl_64be -text
test/testfiles/plist_files/def_dxpl_64le -text
test/testfiles/plist_files/def_fapl_32be -text
test/testfiles/plist_files/def_fapl_32le -text
test/testfiles/plist_files/def_fapl_64be -text
test/testfiles/plist_files/def_fapl_64le -text
test/testfiles/plist_files/def_fcpl_32be -text
test/testfiles/plist_files/def_fcpl_32le -text
test/testfiles/plist_files/def_fcpl_64be -text
test/testfiles/plist_files/def_fcpl_64le -text
test/testfiles/plist_files/def_gcpl_32be -text
test/testfiles/plist_files/def_gcpl_32le -text
test/testfiles/plist_files/def_gcpl_64be -text
test/testfiles/plist_files/def_gcpl_64le -text
test/testfiles/plist_files/def_lapl_32be -text
test/testfiles/plist_files/def_lapl_32le -text
test/testfiles/plist_files/def_lapl_64be -text
test/testfiles/plist_files/def_lapl_64le -text
test/testfiles/plist_files/def_lcpl_32be -text
test/testfiles/plist_files/def_lcpl_32le -text
test/testfiles/plist_files/def_lcpl_64be -text
test/testfiles/plist_files/def_lcpl_64le -text
test/testfiles/plist_files/def_ocpl_32be -text
test/testfiles/plist_files/def_ocpl_32le -text
test/testfiles/plist_files/def_ocpl_64be -text
test/testfiles/plist_files/def_ocpl_64le -text
test/testfiles/plist_files/def_ocpypl_32be -text
test/testfiles/plist_files/def_ocpypl_32le -text
test/testfiles/plist_files/def_ocpypl_64be -text
test/testfiles/plist_files/def_ocpypl_64le -text
test/testfiles/plist_files/def_strcpl_32be -text
test/testfiles/plist_files/def_strcpl_32le -text
test/testfiles/plist_files/def_strcpl_64be -text
test/testfiles/plist_files/def_strcpl_64le -text
test/testfiles/plist_files/dxpl_32be -text
test/testfiles/plist_files/dxpl_32le -text
test/testfiles/plist_files/dxpl_64be -text
test/testfiles/plist_files/dxpl_64le -text
test/testfiles/plist_files/fapl_32be -text
test/testfiles/plist_files/fapl_32le -text
test/testfiles/plist_files/fapl_64be -text
test/testfiles/plist_files/fapl_64le -text
test/testfiles/plist_files/fcpl_32be -text
test/testfiles/plist_files/fcpl_32le -text
test/testfiles/plist_files/fcpl_64be -text
test/testfiles/plist_files/fcpl_64le -text
test/testfiles/plist_files/gcpl_32be -text
test/testfiles/plist_files/gcpl_32le -text
test/testfiles/plist_files/gcpl_64be -text
test/testfiles/plist_files/gcpl_64le -text
test/testfiles/plist_files/lapl_32be -text
test/testfiles/plist_files/lapl_32le -text
test/testfiles/plist_files/lapl_64be -text
test/testfiles/plist_files/lapl_64le -text
test/testfiles/plist_files/lcpl_32be -text
test/testfiles/plist_files/lcpl_32le -text
test/testfiles/plist_files/lcpl_64be -text
test/testfiles/plist_files/lcpl_64le -text
test/testfiles/plist_files/ocpl_32be -text
test/testfiles/plist_files/ocpl_32le -text
test/testfiles/plist_files/ocpl_64be -text
test/testfiles/plist_files/ocpl_64le -text
test/testfiles/plist_files/ocpypl_32be -text
test/testfiles/plist_files/ocpypl_32le -text
test/testfiles/plist_files/ocpypl_64be -text
test/testfiles/plist_files/ocpypl_64le -text
test/testfiles/plist_files/strcpl_32be -text
test/testfiles/plist_files/strcpl_32le -text
test/testfiles/plist_files/strcpl_64be -text
test/testfiles/plist_files/strcpl_64le -text
test/th5s.h5 -text
test/tlayouto.h5 -text
test/tmtimen.h5 -text
test/tmtimeo.h5 -text
test/tsizeslheap.h5 -text
testpar/t_init_term.c -text
testpar/t_prestart.c -text
testpar/t_pshutdown.c -text
tools/h5copy/testfiles/h5copy_extlinks_src.h5 -text
tools/h5copy/testfiles/h5copy_extlinks_trg.h5 -text
tools/h5copy/testfiles/h5copy_ref.h5 -text
tools/h5copy/testfiles/h5copytst.h5 -text
tools/h5copy/testfiles/h5copytst_new.h5 -text
tools/h5copy/testfiles/h5copytst_new.out.ls -text
tools/h5diff/testfiles/compounds_array_vlen1.h5 -text
tools/h5diff/testfiles/compounds_array_vlen2.h5 -text
tools/h5diff/testfiles/h5diff_attr1.h5 -text
tools/h5diff/testfiles/h5diff_attr2.h5 -text
tools/h5diff/testfiles/h5diff_attr_v_level1.h5 -text
tools/h5diff/testfiles/h5diff_attr_v_level2.h5 -text
tools/h5diff/testfiles/h5diff_basic1.h5 -text
tools/h5diff/testfiles/h5diff_basic2.h5 -text
tools/h5diff/testfiles/h5diff_comp_vl_strs.h5 -text
tools/h5diff/testfiles/h5diff_danglelinks1.h5 -text
tools/h5diff/testfiles/h5diff_danglelinks2.h5 -text
tools/h5diff/testfiles/h5diff_dset1.h5 -text
tools/h5diff/testfiles/h5diff_dset2.h5 -text
tools/h5diff/testfiles/h5diff_dset_zero_dim_size1.h5 -text
tools/h5diff/testfiles/h5diff_dset_zero_dim_size2.h5 -text
tools/h5diff/testfiles/h5diff_dtypes.h5 -text
tools/h5diff/testfiles/h5diff_empty.h5 -text
tools/h5diff/testfiles/h5diff_enum_invalid_values.h5 -text
tools/h5diff/testfiles/h5diff_exclude1-1.h5 -text
tools/h5diff/testfiles/h5diff_exclude1-2.h5 -text
tools/h5diff/testfiles/h5diff_exclude2-1.h5 -text
tools/h5diff/testfiles/h5diff_exclude2-2.h5 -text
tools/h5diff/testfiles/h5diff_exclude3-1.h5 -text
tools/h5diff/testfiles/h5diff_exclude3-2.h5 -text
tools/h5diff/testfiles/h5diff_ext2softlink_src.h5 -text
tools/h5diff/testfiles/h5diff_ext2softlink_trg.h5 -text
tools/h5diff/testfiles/h5diff_extlink_src.h5 -text
tools/h5diff/testfiles/h5diff_extlink_trg.h5 -text
tools/h5diff/testfiles/h5diff_grp_recurse1.h5 -text
tools/h5diff/testfiles/h5diff_grp_recurse2.h5 -text
tools/h5diff/testfiles/h5diff_grp_recurse_ext1.h5 -text
tools/h5diff/testfiles/h5diff_grp_recurse_ext2-1.h5 -text
tools/h5diff/testfiles/h5diff_grp_recurse_ext2-2.h5 -text
tools/h5diff/testfiles/h5diff_grp_recurse_ext2-3.h5 -text
tools/h5diff/testfiles/h5diff_hyper1.h5 -text
tools/h5diff/testfiles/h5diff_hyper2.h5 -text
tools/h5diff/testfiles/h5diff_linked_softlink.h5 -text
tools/h5diff/testfiles/h5diff_links.h5 -text
tools/h5diff/testfiles/h5diff_softlinks.h5 -text
tools/h5diff/testfiles/h5diff_types.h5 -text
tools/h5diff/testfiles/h5diff_v1.txt -text
tools/h5diff/testfiles/h5diff_v2.txt -text
tools/h5diff/testfiles/h5diff_v3.txt -text
tools/h5diff/testfiles/non_comparables1.h5 -text
tools/h5diff/testfiles/non_comparables2.h5 -text
tools/h5diff/testfiles/tmpSingleSiteBethe.output.h5 -text
tools/h5diff/testfiles/tmpSingleSiteBethe.reference.h5 -text
tools/h5diff/testfiles/tmptest.he5 -text
tools/h5diff/testfiles/tmptest2.he5 -text
tools/h5dump/errfiles/non_existing.err -text
tools/h5format_convert/CMakeLists.txt -text
tools/h5format_convert/CMakeTests.cmake -text
tools/h5format_convert/Makefile.am -text
tools/h5format_convert/h5fc_chk_idx.c -text
tools/h5format_convert/h5fc_gentest.c -text
tools/h5format_convert/h5format_convert.c -text
tools/h5format_convert/testfiles/h5fc_d_file.ddl -text
tools/h5format_convert/testfiles/h5fc_dname.ddl -text
tools/h5format_convert/testfiles/h5fc_edge_v3.h5 -text
tools/h5format_convert/testfiles/h5fc_err_level.h5 -text
tools/h5format_convert/testfiles/h5fc_ext1_f.ddl -text
tools/h5format_convert/testfiles/h5fc_ext1_f.h5 -text
tools/h5format_convert/testfiles/h5fc_ext1_i.ddl -text
tools/h5format_convert/testfiles/h5fc_ext1_i.h5 -text
tools/h5format_convert/testfiles/h5fc_ext1_s.ddl -text
tools/h5format_convert/testfiles/h5fc_ext1_s.h5 -text
tools/h5format_convert/testfiles/h5fc_ext2_if.ddl -text
tools/h5format_convert/testfiles/h5fc_ext2_if.h5 -text
tools/h5format_convert/testfiles/h5fc_ext2_is.ddl -text
tools/h5format_convert/testfiles/h5fc_ext2_is.h5 -text
tools/h5format_convert/testfiles/h5fc_ext2_sf.ddl -text
tools/h5format_convert/testfiles/h5fc_ext2_sf.h5 -text
tools/h5format_convert/testfiles/h5fc_ext3_isf.ddl -text
tools/h5format_convert/testfiles/h5fc_ext3_isf.h5 -text
tools/h5format_convert/testfiles/h5fc_ext_none.h5 -text
tools/h5format_convert/testfiles/h5fc_help.ddl -text
tools/h5format_convert/testfiles/h5fc_non_v3.h5 -text
tools/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl -text
tools/h5format_convert/testfiles/h5fc_nonexistfile.ddl -text
tools/h5format_convert/testfiles/h5fc_nooption.ddl -text
tools/h5format_convert/testfiles/h5fc_v_all.ddl -text
tools/h5format_convert/testfiles/h5fc_v_bt1.ddl -text
tools/h5format_convert/testfiles/h5fc_v_err.ddl -text
tools/h5format_convert/testfiles/h5fc_v_n_1d.ddl -text
tools/h5format_convert/testfiles/h5fc_v_n_all.ddl -text
tools/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl -text
tools/h5format_convert/testfiles/h5fc_v_non_chunked.ddl -text
tools/h5format_convert/testfiles/old_h5fc_ext1_f.ddl -text
tools/h5format_convert/testfiles/old_h5fc_ext1_f.h5 -text
tools/h5format_convert/testfiles/old_h5fc_ext1_i.ddl -text
tools/h5format_convert/testfiles/old_h5fc_ext1_i.h5 -text
tools/h5format_convert/testfiles/old_h5fc_ext1_s.ddl -text
tools/h5format_convert/testfiles/old_h5fc_ext1_s.h5 -text
tools/h5format_convert/testfiles/old_h5fc_ext2_if.ddl -text
tools/h5format_convert/testfiles/old_h5fc_ext2_if.h5 -text
tools/h5format_convert/testfiles/old_h5fc_ext2_is.ddl -text
tools/h5format_convert/testfiles/old_h5fc_ext2_is.h5 -text
tools/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl -text
tools/h5format_convert/testfiles/old_h5fc_ext2_sf.h5 -text
tools/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl -text
tools/h5format_convert/testfiles/old_h5fc_ext3_isf.h5 -text
tools/h5format_convert/testfiles/old_h5fc_ext_none.h5 -text
tools/h5format_convert/testh5fc.sh.in -text
tools/h5import/testfiles/binfp64.h5 -text
tools/h5import/testfiles/binin16.h5 -text
tools/h5import/testfiles/binin32.h5 -text
tools/h5import/testfiles/binin8.h5 -text
tools/h5import/testfiles/binin8w.h5 -text
tools/h5import/testfiles/binuin16.h5 -text
tools/h5import/testfiles/binuin32.h5 -text
tools/h5import/testfiles/textpfe.h5 -text
tools/h5import/testfiles/txtfp32.h5 -text
tools/h5import/testfiles/txtfp64.h5 -text
tools/h5import/testfiles/txtin16.h5 -text
tools/h5import/testfiles/txtin32.h5 -text
tools/h5import/testfiles/txtin8.h5 -text
tools/h5import/testfiles/txtstr.h5 -text
tools/h5import/testfiles/txtuin16.h5 -text
tools/h5import/testfiles/txtuin32.h5 -text
tools/h5jam/testfiles/tall.h5 -text
tools/h5jam/testfiles/twithub.h5 -text
tools/h5jam/testfiles/twithub513.h5 -text
tools/h5repack/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.ddl -text
tools/h5repack/testfiles/2_vds.h5-vds_chunk3x6x9-v.ddl -text
tools/h5repack/testfiles/3_1_vds.h5-vds_chunk2x5x8-v.ddl -text
tools/h5repack/testfiles/4_vds.h5-vds_compa-v.ddl -text
tools/h5repack/testfiles/4_vds.h5-vds_conti-v.ddl -text
tools/h5repack/testfiles/README -text
tools/h5repack/testfiles/h5repack_attr.h5 -text
tools/h5repack/testfiles/h5repack_attr_refs.h5 -text
tools/h5repack/testfiles/h5repack_deflate.h5 -text
tools/h5repack/testfiles/h5repack_early.h5 -text
tools/h5repack/testfiles/h5repack_ext.bin -text
tools/h5repack/testfiles/h5repack_ext.h5 -text
tools/h5repack/testfiles/h5repack_fill.h5 -text
tools/h5repack/testfiles/h5repack_filters.h5 -text
tools/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst -text
tools/h5repack/testfiles/h5repack_fletcher.h5 -text
tools/h5repack/testfiles/h5repack_hlink.h5 -text
tools/h5repack/testfiles/h5repack_layout.UD.h5 -text svneol=unset#application/x-hdf
tools/h5repack/testfiles/h5repack_layout.h5 -text
tools/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst -text
tools/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst -text
tools/h5repack/testfiles/h5repack_layout2.h5 -text
tools/h5repack/testfiles/h5repack_layout3.h5 -text
tools/h5repack/testfiles/h5repack_layouto.h5 -text
tools/h5repack/testfiles/h5repack_named_dtypes.h5 -text
tools/h5repack/testfiles/h5repack_nbit.h5 -text
tools/h5repack/testfiles/h5repack_nested_8bit_enum.h5 -text
tools/h5repack/testfiles/h5repack_nested_8bit_enum_deflated.h5 -text
tools/h5repack/testfiles/h5repack_objs.h5 -text
tools/h5repack/testfiles/h5repack_refs.h5 -text
tools/h5repack/testfiles/h5repack_shuffle.h5 -text
tools/h5repack/testfiles/h5repack_soffset.h5 -text
tools/h5repack/testfiles/h5repack_szip.h5 -text
tools/h5repack/testfiles/ublock.bin -text
tools/h5stat/testfiles/h5stat_filters.h5 -text
tools/h5stat/testfiles/h5stat_idx.ddl -text
tools/h5stat/testfiles/h5stat_idx.h5 -text
tools/h5stat/testfiles/h5stat_newgrat.h5 -text
tools/h5stat/testfiles/h5stat_threshold.h5 -text
tools/h5stat/testfiles/h5stat_tsohm.h5 -text
tools/lib/h5tools_error.h svneol=native#text/plain
tools/testfiles/charsets.h5 -text
tools/testfiles/family_file00000.h5 -text
tools/testfiles/family_file00001.h5 -text
tools/testfiles/family_file00002.h5 -text
tools/testfiles/family_file00003.h5 -text
tools/testfiles/family_file00004.h5 -text
tools/testfiles/family_file00005.h5 -text
tools/testfiles/family_file00006.h5 -text
tools/testfiles/family_file00007.h5 -text
tools/testfiles/family_file00008.h5 -text
tools/testfiles/family_file00009.h5 -text
tools/testfiles/family_file00010.h5 -text
tools/testfiles/family_file00011.h5 -text
tools/testfiles/family_file00012.h5 -text
tools/testfiles/family_file00013.h5 -text
tools/testfiles/family_file00014.h5 -text
tools/testfiles/family_file00015.h5 -text
tools/testfiles/family_file00016.h5 -text
tools/testfiles/family_file00017.h5 -text
tools/testfiles/file_space.h5 -text
tools/testfiles/filter_fail.h5 -text
tools/testfiles/non_existing.ddl -text
tools/testfiles/packedbits.h5 -text
tools/testfiles/taindices.h5 -text
tools/testfiles/tall.h5 -text
tools/testfiles/tarray1.h5 -text
tools/testfiles/tarray1_big.h5 -text
tools/testfiles/tarray2.h5 -text
tools/testfiles/tarray3.h5 -text
tools/testfiles/tarray4.h5 -text
tools/testfiles/tarray5.h5 -text
tools/testfiles/tarray6.h5 -text
tools/testfiles/tarray7.h5 -text
tools/testfiles/tarray8.h5 -text
tools/testfiles/tattr.h5 -text
tools/testfiles/tattr2.h5 -text
tools/testfiles/tattr4_be.h5 -text
tools/testfiles/tattrintsize.h5 -text
tools/testfiles/tattrreg.h5 -text
tools/testfiles/tbigdims.h5 -text
tools/testfiles/tbinary.h5 -text
tools/testfiles/tbitfields.h5 -text
tools/testfiles/tbitnopaque.ddl -text
tools/testfiles/tbitnopaque.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tchar.h5 -text
tools/testfiles/tcmpdattrintsize.h5 -text
tools/testfiles/tcmpdintarray.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tcmpdints.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tcmpdintsize.h5 -text
tools/testfiles/tcompound.h5 -text
tools/testfiles/tcompound2.h5 -text
tools/testfiles/tcompound_complex.h5 -text
tools/testfiles/tcompound_complex2.ddl -text
tools/testfiles/tcompound_complex2.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tdatareg.h5 -text
tools/testfiles/tdset.h5 -text
tools/testfiles/tdset2.h5 -text
tools/testfiles/tdset_idx.h5 -text
tools/testfiles/tdset_idx.ls -text
tools/testfiles/tempty.h5 -text
tools/testfiles/tenum.h5 -text
tools/testfiles/textlink.h5 -text
tools/testfiles/textlinkfar.h5 -text
tools/testfiles/textlinksrc.h5 -text
tools/testfiles/textlinktar.h5 -text
tools/testfiles/tfamily00000.h5 -text
tools/testfiles/tfamily00001.h5 -text
tools/testfiles/tfamily00002.h5 -text
tools/testfiles/tfamily00003.h5 -text
tools/testfiles/tfamily00004.h5 -text
tools/testfiles/tfamily00005.h5 -text
tools/testfiles/tfamily00006.h5 -text
tools/testfiles/tfamily00007.h5 -text
tools/testfiles/tfamily00008.h5 -text
tools/testfiles/tfamily00009.h5 -text
tools/testfiles/tfamily00010.h5 -text
tools/testfiles/tfcontents1.h5 -text
tools/testfiles/tfcontents2.h5 -text
tools/testfiles/tfilters.h5 -text
tools/testfiles/tfpformat.h5 -text
tools/testfiles/tfvalues.h5 -text
tools/testfiles/tgroup.h5 -text
tools/testfiles/tgrp_comments.h5 -text
tools/testfiles/thlink.h5 -text
tools/testfiles/thyperslab.h5 -text
tools/testfiles/tints4dims.ddl -text
tools/testfiles/tints4dims.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tints4dimsBlock2.ddl -text
tools/testfiles/tints4dimsBlockEq.ddl -text
tools/testfiles/tints4dimsCount2.ddl -text
tools/testfiles/tints4dimsCountEq.ddl -text
tools/testfiles/tints4dimsStride2.ddl -text
tools/testfiles/tintsattrs.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tlarge_objname.h5 -text
tools/testfiles/tldouble.h5 -text
tools/testfiles/tlonglinks.h5 -text
tools/testfiles/tloop.h5 -text
tools/testfiles/tloop2.h5 -text
tools/testfiles/tmany.h5 -text
tools/testfiles/tmulti-b.h5 -text
tools/testfiles/tmulti-g.h5 -text svneol=unset#application/octet-stream
tools/testfiles/tmulti-l.h5 -text
tools/testfiles/tmulti-o.h5 -text
tools/testfiles/tmulti-r.h5 -text
tools/testfiles/tmulti-s.h5 -text
tools/testfiles/tname-amp.h5 -text
tools/testfiles/tname-apos.h5 -text
tools/testfiles/tname-gt.h5 -text
tools/testfiles/tname-lt.h5 -text
tools/testfiles/tname-quot.h5 -text
tools/testfiles/tname-sp.h5 -text
tools/testfiles/tnamed_dtype_attr.h5 -text
tools/testfiles/tnestedcmpddt.h5 -text
tools/testfiles/tnestedcomp.h5 -text
tools/testfiles/tno-subset.h5 -text
tools/testfiles/tnodata.h5 -text
tools/testfiles/tnullspace.h5 -text
tools/testfiles/tobjref.h5 -text
tools/testfiles/topaque.h5 -text
tools/testfiles/torderattr.h5 -text
tools/testfiles/tordergr.h5 -text
tools/testfiles/tref-escapes-at.h5 -text
tools/testfiles/tref-escapes.h5 -text
tools/testfiles/tref.h5 -text
tools/testfiles/tsaf.h5 -text
tools/testfiles/tscalarattrintsize.h5 -text
tools/testfiles/tscalarintattrsize.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tscalarintsize.h5 -text
tools/testfiles/tscalarstring.h5 -text
tools/testfiles/tslink.h5 -text
tools/testfiles/tsoftlinks.h5 -text
tools/testfiles/tsplit_file-m.h5 -text
tools/testfiles/tsplit_file-r.h5 -text
tools/testfiles/tstr.h5 -text
tools/testfiles/tstr2.h5 -text
tools/testfiles/tstr3.h5 -text
tools/testfiles/tstring-at.h5 -text
tools/testfiles/tstring.ddl -text svneol=unset#application/octet-stream
tools/testfiles/tstring.h5 -text
tools/testfiles/tudlink.h5 -text
tools/testfiles/tvldtypes1.h5 -text
tools/testfiles/tvldtypes2.h5 -text
tools/testfiles/tvldtypes3.h5 -text
tools/testfiles/tvldtypes4.h5 -text
tools/testfiles/tvldtypes5.h5 -text
tools/testfiles/tvlenstr_array.ddl -text
tools/testfiles/tvlenstr_array.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tvlstr.h5 -text
tools/testfiles/tvms.h5 -text
tools/testfiles/vds/1_a.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/1_b.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/1_c.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/1_d.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/1_e.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/1_f.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/1_vds.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/2_a.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/2_b.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/2_c.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/2_d.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/2_e.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/2_vds.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/3_1_vds.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/3_2_vds.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/4_0.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/4_1.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/4_2.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/4_vds.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/5_a.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/5_b.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/5_c.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/5_vds.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/a.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/b.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/c.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/d.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/f-0.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/f-3.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/vds-eiger.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/vds-first.ddl -text
tools/testfiles/vds/vds-gap1.ddl -text
tools/testfiles/vds/vds-gap2.ddl -text
tools/testfiles/vds/vds-percival-unlim-maxmin.h5 -text svneol=unset#application/x-hdf
tools/testfiles/vds/vds_layout-eiger.ddl -text
tools/testfiles/vds/vds_layout-maxmin.ddl -text
tools/testfiles/zerodim.h5 -text

105
.gitignore vendored Normal file
View File

@ -0,0 +1,105 @@
/Makefile.in
/aclocal.m4
/autom4te.cache
bin/Makefile.in
bin/compile
bin/config.guess
bin/config.sub
bin/depcomp
bin/install-sh
bin/ltmain.sh
bin/missing
bin/test-driver
/build*
c++/Makefile.in
c++/examples/Makefile.in
c++/src/Makefile.in
c++/src/header_files/Makefile.in
c++/test/Makefile.in
config/Makefile.in
config/cmake/Makefile.in
config/cmake/UserMacros/Makefile.in
config/cmake/scripts/Makefile.in
config/cmake_ext_mod/Makefile.in
config/site-specific/Makefile.in
/configure
examples/Makefile.in
fortran/Makefile.in
fortran/examples/Makefile.in
fortran/src/Makefile.in
fortran/test/Makefile.in
fortran/testpar/Makefile.in
hl/Makefile.in
hl/c++/Makefile.in
hl/c++/examples/Makefile.in
hl/c++/src/Makefile.in
hl/c++/test/Makefile.in
hl/examples/Makefile.in
hl/fortran/Makefile.in
hl/fortran/examples/Makefile.in
hl/fortran/src/Makefile.in
hl/fortran/test/Makefile.in
hl/src/Makefile.in
hl/test/Makefile.in
hl/tools/Makefile.in
hl/tools/gif2h5/Makefile.in
hl/tools/gif2h5/testfiles/Makefile.in
java/Makefile.in
java/examples/Makefile.in
java/examples/datasets/.classes
java/examples/datasets/Makefile.in
java/examples/datatypes/.classes
java/examples/datatypes/Makefile.in
java/examples/groups/.classes
java/examples/groups/Makefile.in
java/examples/intro/.classes
java/examples/intro/Makefile.in
java/src/.classes
java/src/Makefile.in
java/src/jni/Makefile.in
java/test/.classes
java/test/Makefile.in
m4/Makefile.in
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
release_docs/Makefile.in
src/H5Edefin.h
src/H5Einit.h
src/H5Epubgen.h
src/H5Eterm.h
src/H5config.h.in
src/H5overflow.h
src/H5version.h
src/Makefile.in
test/Makefile.in
test/testfiles/Makefile.in
test/testfiles/plist_files/Makefile.in
testpar/Makefile.in
tools/Makefile.in
tools/h5copy/Makefile.in
tools/h5copy/testfiles/Makefile.in
tools/h5diff/Makefile.in
tools/h5diff/testfiles/Makefile.in
tools/h5dump/Makefile.in
tools/h5dump/errfiles/Makefile.in
tools/h5format_convert/Makefile.in
tools/h5import/Makefile.in
tools/h5import/testfiles/Makefile.in
tools/h5jam/Makefile.in
tools/h5jam/testfiles/Makefile.in
tools/h5ls/Makefile.in
tools/h5repack/Makefile.in
tools/h5repack/testfiles/Makefile.in
tools/h5stat/Makefile.in
tools/h5stat/testfiles/Makefile.in
tools/lib/Makefile.in
tools/misc/Makefile.in
tools/misc/testfiles/Makefile.in
tools/misc/vds/Makefile.in
tools/perform/Makefile.in
tools/testfiles/Makefile.in
tools/testfiles/pbits/Makefile.in
tools/testfiles/vds/Makefile.in

View File

@ -1,12 +1,15 @@
include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT SVN TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT SVN TGZ)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (ZLIB_URL ${ZLIB_GIT_URL} CACHE STRING "Path to zlib git repository")
set (SZIP_URL ${SZIP_GIT_URL} CACHE STRING "Path to szip git repository")
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
set (ZLIB_URL ${ZLIB_SVN_URL} CACHE STRING "Path to zlib Subversion repository")
set (SZIP_URL ${SZIP_SVN_URL} CACHE STRING "Path to szip Subversion repository")
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
@ -15,11 +18,11 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
endif (NOT TGZPATH)
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (ZLIB_USE_EXTERNAL 0)
set (SZIP_USE_EXTERNAL 0)
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
#-----------------------------------------------------------------------------
# Option for ZLib support
@ -45,15 +48,15 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
else (ZLIB_FOUND)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
set (H5_HAVE_FILTER_DEFLATE 1)
set (H5_HAVE_ZLIB_H 1)
set (H5_HAVE_LIBZ 1)
message (STATUS "Filter ZLIB is built")
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (ZLIB_FOUND)
else (NOT H5_ZLIB_HEADER)
# This project is being called from within another and ZLib is already configured
@ -64,9 +67,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (H5_HAVE_FILTER_DEFLATE)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
endif (H5_HAVE_FILTER_DEFLATE)
if (BUILD_SHARED_LIBS)
if (BUILD_SHARED_LIBS)
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY})
endif (BUILD_SHARED_LIBS)
endif (BUILD_SHARED_LIBS)
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
message (STATUS "Filter ZLIB is ON")
@ -95,19 +98,19 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
else (SZIP_FOUND)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING})
set (H5_HAVE_FILTER_SZIP 1)
set (H5_HAVE_SZLIB_H 1)
set (H5_HAVE_LIBSZ 1)
message (STATUS "Filter SZIP is built")
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (SZIP_FOUND)
if (BUILD_SHARED_LIBS)
if (BUILD_SHARED_LIBS)
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_SHARED_LIBRARY})
endif (BUILD_SHARED_LIBS)
endif (BUILD_SHARED_LIBS)
set (LINK_LIBS ${LINK_LIBS} ${SZIP_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
message (STATUS "Filter SZIP is ON")

View File

@ -9,7 +9,7 @@ set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
set (CTEST_DROP_METHOD "http")
if (CDASH_LOCAL)
set (CTEST_DROP_SITE "10.10.10.82")
set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org")
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk")
else (CDASH_LOCAL)
set (CTEST_DROP_SITE "cdash.hdfgroup.org")

View File

@ -20,7 +20,9 @@
# in column one with a '#'.
#------------------------------------------------------------------------------
./.autom4te.cfg _DO_NOT_DISTRIBUTE_
./.gitattributes _DO_NOT_DISTRIBUTE_
./.gitignore _DO_NOT_DISTRIBUTE_
./.autom4te.cfg _DO_NOT_DISTRIBUTE_
./.h5chkright.ini _DO_NOT_DISTRIBUTE_
./ACKNOWLEDGMENTS
./COPYING
@ -34,6 +36,7 @@
./m4/aclocal_cxx.m4
./m4/aclocal_fc.m4
./m4/aclocal_fc.f90
./m4/ax_check_class.m4
./m4/ax_check_classpath.m4
./m4/ax_check_java_home.m4
@ -88,6 +91,10 @@
./bin/timekeeper _DO_NOT_DISTRIBUTE_
./bin/trace
./bin/yodconfigure
./bin/pkgscrpts/h5rmflags _DO_NOT_DISTRIBUTE_
./bin/pkgscrpts/makeHDF5BinaryTarfiles.pl _DO_NOT_DISTRIBUTE_
./bin/pkgscrpts/makeInternalREADME.pl _DO_NOT_DISTRIBUTE_
./bin/pkgscrpts/makeOuterREADME.pl _DO_NOT_DISTRIBUTE_
./config/COPYING
./config/BlankForm
@ -102,8 +109,7 @@
./config/gnu-cxxflags
./config/gnu-fflags
./config/gnu-flags
./config/i386-pc-cygwin32
./config/i686-pc-cygwin
./config/cygwin
./config/ibm-aix
./config/ibm-flags
./config/intel-fflags
@ -117,7 +123,6 @@
./config/pgi-fflags
./config/pgi-flags
./config/solaris
./config/x86_64-pc-cygwin
./config/site-specific/BlankForm
@ -895,6 +900,7 @@
./test/dynlib1.c
./test/dynlib2.c
./test/dynlib3.c
./test/dynlib4.c
./test/earray.c
./test/efc.c
./test/enc_dec_plist.c
@ -1540,6 +1546,8 @@
./tools/testfiles/tcompound.h5
./tools/testfiles/tcompound2.h5
./tools/testfiles/tcompound_complex.h5
./tools/testfiles/tcompound_complex2.h5
./tools/testfiles/tcompound_complex2.ddl
./tools/testfiles/tdatareg.h5
./tools/testfiles/tdatareg.ddl
./tools/testfiles/tdataregR.ddl
@ -1709,6 +1717,8 @@
./tools/testfiles/tvldtypes4.h5
./tools/testfiles/tvldtypes5.ddl
./tools/testfiles/tvldtypes5.h5
./tools/testfiles/tvlenstr_array.ddl
./tools/testfiles/tvlenstr_array.h5
./tools/testfiles/tvlstr.h5
./tools/testfiles/tvlstr.ddl
./tools/testfiles/tvms.ddl
@ -2303,6 +2313,7 @@
./tools/h5repack/testfiles/h5repack_layout.h5.ddl
./tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl
./tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl
./tools/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst
./tools/h5repack/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
./tools/h5repack/testfiles/2_vds.h5-vds_chunk3x6x9-v.ddl
./tools/h5repack/testfiles/3_1_vds.h5-vds_chunk2x5x8-v.ddl

View File

@ -33,6 +33,15 @@
#
# James Laird, 2005-09-07
# Added the md5 method.
#
# Larry Knox, 2016-08-30
# Added the --revision option to create private releases with the
# code revision hash in the version strings. Currently the version
# of this script with the --revision option is named bbrelease. It
# can probably be merged into the original release script in the
# future.
# Commands to get the revision hash have now been converted to git
# to match the source repository change.
# Function definitions
#
@ -265,17 +274,18 @@ fi
if [ X$revmode = Xyes ]; then
VERS_OLD=$VERS
echo "Save old version $VERS_OLD for restoration later."
# Copy old version of config/lt_vers.am, since it's hard to
# "undo" changes to it.
cp config/lt_vers.am $tmpdir
branch=`svn info | grep ^URL: | awk -F/ '{print $NF}'`
revision=`svn info | grep "Revision:" | awk '{print $2}'`
# Set version information to m.n.r-r$revision.
branch=`git branch | grep '*' | awk '{print $NF}'`
revision=`git rev-parse --short HEAD`
# Set version information to m.n.r-r$revision.
# (h5vers does not correctly handle just m.n.r-$today.)
VERS=`echo $VERS | sed -e s/-.*//`-r$revision
VERS=`echo $VERS | sed -e s/-.*//`-$revision
echo Private release of $VERS
bin/h5vers -s $VERS
HDF5_VERS=hdf5-$branch-r$revision
HDF5_VERS=hdf5-$branch-$revision
# use a generic directory name for revision releases
HDF5_IN_VERS=hdfsrc
else
@ -392,6 +402,7 @@ test -f $tmpdir/Makefile.x && mv $tmpdir/Makefile.x Makefile
# Restore OLD version information, then no need for trap.
if [ X$pmode = Xyes ] || [ X$revmode = Xyes ]; then
echo "Restore the original version $VERS_OLD"
RESTORE_VERSION
trap 0
fi

View File

@ -54,8 +54,8 @@ fi
# Do an autogen if generated files (e.g., configure) is not present
if [ ! -f configure ]; then
echo " running $AUTOGEN -p"
$AUTOGEN -p > $AUTOGEN_LOG 2>&1
echo " running $AUTOGEN"
$AUTOGEN > $AUTOGEN_LOG 2>&1
if [ $? -ne 0 ]; then
echo $AUTOGEN encountered error. Abort.
echo output from $AUTOGEN:
@ -93,23 +93,23 @@ done
# Get the list of files under version control and check that they are
# present.
#
# First get a list of all the pending files with svn stat and
# First get a list of all the pending files with git status and
# check those.
svn_stat=`svn stat -q`
for file in $svn_stat; do
git_stat=`git status -s`
for file in $git_stat; do
# Newly added files are not listed by svn ls, which
# Newly added files are not listed by git ls-files, which
# we check later.
# The line listing new files starts with 'A'.
letter=`echo $file | head -c 1`
if [ "$letter" = "A" ]; then
# Convert the seven Subversion status columns to './' so it matches
# Convert the git status columns to './' so it matches
# the manifest file name.
#
# There is a space between the status columns and file name, hence
# the '8' instead of '7'.
path=`echo $file | sed 's/^.\{8\}/\.\//g'`
# the '3'.
path=`echo $file | sed 's/^.\{3\}/\.\//g'`
# Ignore directories
if [ ! -d $path ]; then
if (grep ^$path$ $MANIFEST >/dev/null); then
@ -122,10 +122,10 @@ for file in $svn_stat; do
fi
done
# Next check svn ls, which gets a list of all files that are
# Next check git ls-files, which gets a list of all files that are
# checked in.
svn_ls=`svn ls -R`
for file in $svn_ls; do
git_ls=`git ls-files`
for file in $git_ls; do
path="./${file}"
# Ignore directories
if [ ! -d $path ]; then

View File

@ -381,12 +381,12 @@ sub gen_configure {
$conf =~ /^(.*?)\/?configure.ac$/;
if ($1) {
$rc = system("cd $1 && ./autogen.sh -p >/dev/null 2>/dev/null && rm -rf autom4te.cache");
$rc = system("cd $1 && ./autogen.sh >/dev/null 2>/dev/null && rm -rf autom4te.cache");
} else {
$rc = system("./autogen.sh -p >/dev/null 2>/dev/null && rm -rf autom4te.cache");
$rc = system("./autogen.sh >/dev/null 2>/dev/null && rm -rf autom4te.cache");
}
if ($rc) {
printf("./autogen.sh -p failed with exit code %d. Aborted.\n", $rc);
printf("./autogen.sh failed with exit code %d. Aborted.\n", $rc);
exit 1;
}
}

167
bin/pkgscrpts/h5rmflags Executable file
View File

@ -0,0 +1,167 @@
#! /bin/sh
#
# 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.
#
## Remove paths to libraries used to build HDF5 when packaging HDF5
## binaries.
## For help page, use "h5rmflags -help"
# Constants definitions
EXIT_SUCCESS=0
EXIT_FAILURE=1
# Function definitions
# show help page
usage() {
# A wonderfully informative "usage" message.
echo "usage: $prog_name [OPTIONS]"
echo " OPTIONS:"
echo " -help|help This help message"
echo " -echo Show all the shell commands executed"
echo " -force No prompt, just do it"
echo " -prefix=DIR New directory to find HDF5 lib/ and include/"
echo " subdirectories [default: current directory]"
echo " -tool=TOOL Tool to update. TOOL must be in the current"
echo " directory and writable. [default: $h5tools]"
echo " -show Show the commands without executing them"
echo " "
exit $EXIT_FAILURE
}
# display variable values
dump_vars(){
echo "====Showing all variable values====="
echo prefix=$prefix
echo h5tools=$h5tools
echo "====End Showing====="
}
# show actions to be taken
show_action()
{
echo "Update the following tools because they are now installed at a new directory"
for t in $foundtools; do
echo "${t}:"
echo " current setting=`sed -e '/^prefix=/s/prefix=//p' -e d $t`"
echo " new setting="\""$prefix"\"
done
}
# Report Error message
ERROR()
{
echo "***ERROR***"
echo "$1"
}
# Main
#
# Initialization
h5tools="h5cc h5pcc h5fc h5pfc h5c++" # possible hdf5 tools
foundtools= # tools found and will be modified
fmode= # force mode, default is off
prefix=`(cd ..;pwd)`
# Parse options
for arg in $@ ; do
case "$arg" in
-prefix=*)
prefix="`expr "$arg" : '-prefix=\(.*\)'`"
;;
-echo)
set -x
;;
-show)
SHOW="echo"
;;
-tool=*)
h5tools="`expr "$arg" : '-tool=\(.*\)'`"
;;
-help|help)
usage
;;
-force)
fmode=yes
;;
*)
ERROR "Unknown Option($arg)"
usage
exit $EXIT_FAILURE
;;
esac
done
# Sanity checks
#if [ ! -d $prefix ]; then
# ERROR "prefix($prefix) is not an existing directory"
# exit $EXIT_FAILURE
#fi
for x in $h5tools; do
if [ -f $x ]; then
foundtools="$foundtools $x"
if [ ! -w $x ]; then
ERROR "h5tool($x) is not writable"
exit $EXIT_FAILURE
fi
fi
done
if [ -z "$foundtools" ]; then
ERROR "found no tools to modify"
exit $EXIT_FAILURE
fi
# Show actions to be taken and get consent
show_action
# Update them
if [ "$SHOW" = "echo" ]; then
echo "===Update commands are:===="
# cat $CMDFILE
echo "===End Update commands====="
fi
for t in $foundtools; do
echo Update $t ...
# COMMAND="ed - $t"
# if [ "$SHOW" = "echo" ]; then
# echo $COMMAND
# else
# $COMMAND < $CMDFILE
ed - $t << end
g/^H5BLD_CPPFLAGS/s/-I\/.*include //g
g/^H5BLD_LDFLAGS/s/-L\/.*lib //g
g/^H5BLD_LDFLAGS/s/-L\/.*lib64 //g
.
w
end
# fi
done
# Cleanup
#rm -f $CMDFILE
exit $EXIT_SUCCESS
# Some possible future features to add
# CCBASE - Name of the alternative C compiler
# CLINKERBASE - Name of the alternative linker
# LDFLAGS - Path to different libraries your application will link with
# (this path should include the path to the zlib library)
# LIBS - Libraries your application will link with

View File

@ -0,0 +1,368 @@
#!/usr/bin/perl
# makeTarFiles.pl
# 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.
#
#
#
use warnings;
use strict;
use Cwd;
use File::Basename;
my %destsubdir = ('emu' => 'sunos-5.11-sparc-32-sunc512',
'emu64' => 'sunos-5.11-sparc-64-sunc512',
'ostrich' => 'linux-el6-ppc64-gcc447',
'ostrichxl' => 'linux-el6-ppc64-xl13.1',
'platypus' => 'linux-centos6-x86_64-gcc447',
'platypus32' => 'linux-centos6-x86_64-32-gcc447',
'moohan' => 'linux-centos7-x86_64-gcc485',
'moohan32' => 'linux-centos7-x86_64-32-gcc485',
'kite' => 'osx-10.8-x86_64-clang5.1',
'quail' => 'osx-10.9-x86_64-clang6.0',
'osx1010test' => 'osx-10.10-x86_64-clang6.0');
my %szipdir = ('emu' => '/mnt/hdf/packages/szip/shared/encoder/SunOS-5.10',
'emu-static' => '/mnt/hdf/packages/szip/static/encoder/SunOS-5.10',
'emu64' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64',
'emu64-static' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64',
'kite' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8',
'kite-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8',
'ostrich32' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc',
'ostrich32-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc-32',
'ostrich' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64',
'ostrich-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc',
'ostrichxl' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64',
'ostrichxl-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc',
'osx1010test' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8',
'osx1010test-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8',
'moohan' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc',
'moohan-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc',
'moohan32' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc-m32',
'moohan32-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/Linux2.6-x86_64-gcc-m32',
'platypus32' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc-m32',
'platypus32-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/Linux2.6-x86_64-gcc-m32',
'platypus' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc',
'platypus-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc',
'quail' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8',
'quail-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8');
my %zlibdir = ('emu' => '/mnt/hdf/packages/zlib-125/shared/SunOS-5.10',
'emu-static' => '/mnt/hdf/packages/zlib-125/static/SunOS-5.10',
'emu64' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64',
'emu64-static' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64',
'kite' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
'kite-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64',
'ostrich32' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc',
'ostrich32-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc',
'ostrich' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
'ostrich-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
'ostrichxl' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
'ostrichxl-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
'osx1010test' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
'osx1010test-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64',
'moohan' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc',
'moohan-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc',
'moohan32' => '/mnt/hdf/packages/zlib-128/Linux2.6-x86_64-gcc-m32',
'moohan32-static' => '/mnt/hdf/packages/zlib-128/Linux2.6-x86_64-gcc-m32',
'platypus32' => '/mnt/hdf/packages/zlib-128/Linux2.6-x86_64-gcc-m32',
'platypus32-static' => '/mnt/hdf/packages/zlib-128/Linux2.6-x86_64-gcc-m32',
'platypus' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc',
'platypus-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc',
'quail' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
'quail-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64');
my $indirectory = ".";
$indirectory = shift;
my $outdirectory = ".";
$outdirectory = shift;
my $key = ".";
#$key = shift;
my $scriptdirname = dirname(__FILE__);
unless (-d $outdirectory) {
print "$outdirectory not found. Create it or choose another one and try again.\n";
exit 1;
}
print "Subdirectories of $indirectory will be tarred and stored in $outdirectory.\n";
my $tarfilename;
my $tardirname;
my $output;
my $cmd;
# I'm currently copying system zlibs for at least solaris and FreeBSD machines. Since this script runs on jam it may require scp to get the libs.
#For future reference
# command for getting szlib files and links for shared binaries:
# tar cvf - -C <szipDir>/lib . | tar xvf - -C <libdir> .
# libz.so.1.2.3 and the static files should just be copied because they're in directories
# with other files. Then create the libz.so.1 and libz.so symbolic links.
sub addzandszlibs {
my $dir = shift;
my $indirectory = shift;
my $currentdir = getcwd();
if (-d "$indirectory/$dir" ) {
my $szdir = $szipdir{$dir};
my $zldir = $zlibdir{$dir};
if ($dir =~ /static/ || $dir =~ /ostrich/) {
$cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
} elsif ($dir eq "freedom" || $dir eq "loyalty") {
$cmd = "cp $szdir/lib/libsz.so.2 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.so.5 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
$cmd = "ln -s libsz.so.2 libsz.so";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.so.5 libz.so";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
} elsif ($dir eq "quail" || $dir eq "kite" || $dir eq "osx1010test") {
#we've been using the static libraries for the macs - built with -fPIC
# $cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib";
# $output = `$cmd`;
# print $output;
# $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
# $output = `$cmd`;
# print $output;
$cmd = "cp $szdir/lib/libsz.2.0.0.dylib $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.1.2.5.dylib $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
$cmd = "ln -s libsz.2.0.0.dylib libsz.2.dylib";
$output = `$cmd`;
print $output;
$cmd = "ln -s libsz.2.0.0.dylib libsz.dylib";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.1.2.5.dylib libz.1.dylib";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.1.2.5.dylib libz.dylib";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
} elsif ($dir eq "emu64") {
$cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
$cmd = "ln -s libsz.so.2.0.0 libsz.so.2";
$output = `$cmd`;
print $output;
$cmd = "ln -s libsz.so.2.0.0 libsz.so";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
} elsif ($dir eq "platypus32" || $dir eq "moohan32") {
$cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
# $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
# $output = `$cmd`;
# print $output;
chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
$cmd = "ln -s libsz.so.2.0.0 libsz.so.2";
$output = `$cmd`;
print $output;
$cmd = "ln -s libsz.so.2.0.0 libsz.so";
$output = `$cmd`;
print $output;
# $cmd = "ln -s libz.so.1.2.8 libz.so.1";
# $output = `$cmd`;
# print $output;
# $cmd = "ln -s libz.so.1.2.8 libz.so";
# $output = `$cmd`;
# print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
} else {
$cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.so.1.2.5 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
$cmd = "ln -s libsz.so.2.0.0 libsz.so.2";
$output = `$cmd`;
print $output;
$cmd = "ln -s libsz.so.2.0.0 libsz.so";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.so.1.2.5 libz.so.1";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.so.1.2.5 libz.so";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
}
}
}
sub makeTarFile {
my $directoryname = shift;
my $origdirname = shift;
my $tarfilename = shift;
my $tardirname = shift;
$cmd = "mv $indirectory/$origdirname $indirectory/$tardirname";
$output = `$cmd`;
print $output;
if (-d $indirectory."/".$tardirname."/doc/hdf5/examples") {
$cmd = "mv $indirectory/$tardirname/doc/hdf5/examples $indirectory/$tardirname/examples";
$output = `$cmd`;
print $output;
$cmd = "rm -rf $indirectory/$tardirname/doc";
$output = `$cmd`;
print $output;
}
$cmd = "tar zcvf $outdirectory/$directoryname/$tarfilename -C $indirectory $tardirname";
print "Need to run $cmd.\n";
$output = `$cmd`;
sleep 10;
print "Create $tarfilename: $output\n";
$cmd = "mv $indirectory/$tardirname $indirectory/$origdirname";
$output = `$cmd`;
print $output;
}
foreach $key (keys %destsubdir) {
print "Process ".$key."\n\n";
#skip unless there's a directory by the name of $key or $key-static
next unless -d $indirectory.'/'.$key || -d $indirectory.'/'.$key."-static";
my $version;
# This assumes a static directory. Probably the others should be checked if this
# doesn't exist.
$cmd = "grep \"HDF5 Version\" $indirectory/$key/lib/libhdf5.settings";
$_ = `$cmd`;
print $_, "\n";
s/HDF5 Version://;
s/^\s+//;
chomp;
$version = $_;
#my $directoryname = substr $destsubdir{$key}, 0, rindex($destsubdir{$key}, '-');
my $directoryname = $destsubdir{$key};
mkdir $outdirectory."/".$directoryname, 0755 unless -d $outdirectory."/".$directoryname;
my $staticdir = $key."-static";
print $indirectory."/$key tarfile will be put in " . $outdirectory."/".$directoryname."\n";
if (-e $outdirectory."/".$destsubdir{$key}."/README") {
print $outdirectory."/".$destsubdir{$key}."/README" . " has already been created.\n";
}
else {
print "Make the Outer README file: ";
$cmd = "perl ./makeOuterREADME.pl $indirectory/$key $outdirectory $directoryname";
print $cmd, "\n";
my $output = `$cmd`;
print $output;
}
my $file = "";
my @dirnames = "";
opendir(DIR, $indirectory) or die "can't open .: $!";
while (defined($file = readdir(DIR))) {
next unless ($file eq $key || $file eq "$key-static") && -d $indirectory."/".$file;
push @dirnames, $file;
}
foreach my $dir (@dirnames) {
next if $dir eq "";
print "Make the Inner README files.\n";
$cmd = "perl ./makeInternalREADME.pl $indirectory/$dir";
print $cmd, "\n";
$output = `$cmd`;
print $output;
print "Add the zlib and szip files for $dir.\n";
&addzandszlibs($dir, $indirectory);
my $currentdir = getcwd();
print "Remove all lib*.la files from $dir/lib*.\n";
$cmd = "rm $indirectory/$dir/lib*/lib*.la";
print $cmd, "\n";
$output = `$cmd`;
print $output;
chdir "$indirectory/$dir/bin" or die "Couldn't change directory to $indirectory/$dir/bin, $!";
$cmd = "$scriptdirname/h5rmflags -force";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
print "Tar up the files into the output directory.\n";
if (-d $indirectory."/".$dir) {
if ($dir =~ /static/) {
$tarfilename = "hdf5-$version-$destsubdir{$key}-static.tar.gz";
$tardirname = "hdf5-$version-$destsubdir{$key}-static";
} else {
$tarfilename = "hdf5-$version-$destsubdir{$key}-shared.tar.gz";
$tardirname = "hdf5-$version-$destsubdir{$key}-shared";
}
&makeTarFile($directoryname, $dir, $tarfilename, $tardirname);
}
}
# If this copy is done after h5rmflags is run on all the directories the compile scripts
# in the utilities directory will already have the paths removed.
if (-d $indirectory."/".$staticdir) {
$cmd = "cp -prv $indirectory/$staticdir/bin $outdirectory/$directoryname/utilities";
$output = `$cmd`;
print $output;
}
}

View File

@ -0,0 +1,215 @@
#!/usr/bin/perl
# makeInternalREADME.pl
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF4. The full HDF4 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 HDF4 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdfgroup.org/HDF4/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
#
use warnings;
use strict;
my $section2="For information on compilers and settings used to build these HDF5
libraries, please refer to:
./lib/libhdf5.settings
The contents of this directory are:
COPYING - Copyright notice
README - This file
RELEASE.txt - Detailed information regarding this release
bin/ - Directory containing HDF5 pre-compiled utilities
include/ - Directory containing HDF5 include files
lib/ - Directory containing HDF5 libraries and settings
share/ - Directory containing example code in C, C++, and
Fortran using HDF5 and HDF5 HL library APIs. The
shell scripts provided with these examples will
compile and run them, and will also test the
h5cc, h5c++, and h5fc compile scripts found
in the installed bin directory.
These binaries were built with the ZLIB and SZIP (version 2.1, Encoder
ENABLED) external libraries which are included in the lib directory for
convenience.
We also provide the ZLIB and SZIP source code on our ftp server at:
ftp://ftp.hdfgroup.org/lib-external/
The official ZLIB and SZIP pages are at:
ZLIB: http://www.zlib.net/
SZIP: http://hdfgroup.org/doc_resource/SZIP/
";
my $section3 = "If using the shared libraries, you must add the HDF5 library path
to the LD_LIBRARY_PATH variable.
";
my $section4 = "We provide scripts for compiling applications with the HDF5 libraries:
bin/h5cc - for C
bin/h5fc - for F90 (if Fortran 90 library is included with the binaries)
bin/h5c++ - for C++ (if C++ library is included with the binaries)
After you have installed the binaries to their final destination, you can use
these scripts (h5cc, h5fc, h5c++) to compile. However, you must first run
./h5redeploy in the bin directory to change site specific paths in the scripts.
You may also need to change other variables in the scripts, depending
on how things are set up on your system. Here are some of the variables
to check:
prefix - Path to the HDF5 top level installation directory
CCBASE - Name of the C compiler
CLINKERBASE - Name of the linker
LIBS - Libraries your application will link with
For further details refer to the INSTALL files in
ftp://ftp.hdfgroup.org/HDF5/current/src/unpacked/release_docs/
or in the ./release_docs/ directory of the HDF5 source code, which can be found
on the HDF Group ftp server at ftp://ftp.hdfgroup.org/HDF5/current/src/.
Please send questions, comments, and suggestions to the appropriate
contact address from http://www.hdfgroup.org/about/contact.html
";
my $indirectory = ".";
$indirectory = shift;
my $linktype = "shared";
if ($indirectory =~ /static/) {
$linktype = "static";
}
my $modestring="";
if ($indirectory =~ /32/) {
$modestring = "in 32 bit mode ";
}
my $version;
my $outfile = "$indirectory/README";
open OUTFILE, ">$outfile" or die "$!Couldn't open $outfile - check permissions for $indirectory\n";
my $hostname;
my $cmd = "grep \"HDF5 Version\" $indirectory/lib/libhdf5.settings";
$_ = `$cmd`;
#print OUTFILE $_, "\n";
s/HDF5 Version://;
s/^\s+//;
chomp;
$version = $_;
#print OUTFILE $_, "\n";
my $versionstring= "This directory contains the $linktype binary distribution of HDF5-".$version;
$cmd = "grep \"Uname information:\" $indirectory/lib/libhdf5.settings";
$_ = `$cmd`;
s/Uname information://;
s/^\s+//;
#print OUTFILE $_;
chomp;
#s/(^\w+)(\s)(\S+)/$1/;
#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/;
#my $platformstring = "\nthat was compiled on:" . $_ . " ";
my $platformstring = "";
my $hostnamestring = $_;
my @hostnamestring = split / /, $hostnamestring;
#print OUTFILE "Size of hostnamestring is ", scalar @hostnamestring, "\n";
#print OUTFILE $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n";
$hostname = $hostnamestring[1];
#my $size = scalar @hostnamestring;
if ($hostname =~ /loyalty/) {
$platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " ";
}
elsif ($hostname =~ /freedom/) {
$platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " ";
} elsif ($hostname =~ /emu/) {
$platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0]." " . $hostnamestring[2] . " " . $hostnamestring[-2] . " ";
} elsif ($hostname =~ /fred/) {
$platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0]." " . $hostnamestring[2] . " " . $hostnamestring[-1] . " ";
} else {
$_ = $hostnamestring[2];
my $pos = index $_, '-';
my $os = substr $_, 0, $pos;
$platformstring = "\nthat was compiled " . $modestring . "on: " . $hostnamestring[0] . " " . $os . " " . $hostnamestring[-2] . " ";
}
my $mappingstring = "";
#no mappingstring for 1.6. Put it back for 1.8.
#$cmd = "grep \"Default API Mapping:\" $indirectory/lib/libhdf5.settings";
#$_ = `$cmd`;
#s/Default API Mapping://;
#s/^\s+//;
#chomp;
#if (/v\d+/) {
# s/v//;
# s/(\d)(\d)/$1\.$2/g;
# $mappingstring = "using the default\nAPI mapping for VERSION ".$_.".";
#
#}
print OUTFILE $versionstring;
print OUTFILE $platformstring."\n\n";
#print OUTFILE $mappingstring;
#if ($hostname eq "loyalty.hdfgroup.uiuc.edu" || $hostname eq "freedom.hdfgroup.uiuc.edu") {
# print OUTFILE " It includes the C APIs,\nbuilt using the following ";
# print OUTFILE "compilers:\n\n";
#}
#else {
if ($linktype eq "shared" && !($hostname =~ /32/)) {
print OUTFILE "\n\nIt includes the C, C++, F90 and Java APIs, built using the following\n";
} else {
print OUTFILE "\n\nIt includes the C, C++, and F90 APIs, built using the following\n";
}
print OUTFILE "compilers:\n\n";
#}
# Only the gcc compiler version is in libhdf5.settings, so for now I looked
# up the versions and hardcoded them here. We will put them in libhdf5.settings
# for the next release.
if ($indirectory =~ /gnu484/) {
print OUTFILE "\tgcc, g++, and gfortran 4.8.4\n\n";
} elsif ($hostname =~ /jam/ || $hostname =~ /koala/) {
print OUTFILE "\tgcc, g++, and gfortran 4.1.2\n\n";
} elsif ($hostname =~ /platypus/) {
print OUTFILE "\tgcc, g++, and gfortran 4.4.7\n\n";
if ($linktype eq "shared" && !($hostname =~ /32/)) {
print OUTFILE "\tjava 1.8.0_51\n\n";
}
} elsif ($hostname =~ /moohan/) {
print OUTFILE "\tgcc, g++, and gfortran 4.8.5\n\n";
if ($linktype eq "shared" && !($hostname =~ /32/)) {
print OUTFILE "\tjava 1.8.0_51\n\n";
}
} elsif ($hostname =~ /emu/) {
print OUTFILE "\tSun C and C++ 5.12, Sun Fortran 95 8.6\n\n";
} elsif ($hostname =~ /loyalty/ || $hostname =~ /freedom/) {
print OUTFILE "\tgcc, g++, and gfortran 4.6.1\n\n";
} elsif ($hostname =~ /duck/) {
print OUTFILE "\tApple clang/clang++ 3.0 from Xcode 4.6.1 and gfortran 4.8.2\n\n";
} elsif ($hostname =~ /kite/) {
print OUTFILE "\tApple clang/clang++ 5.1 from Xcode 5.0.2 and gfortran 4.8.2\n\n";
} elsif ($hostname =~ /quail/) {
print OUTFILE "\tgcc, g++ 5.1 from Xcode 5.1 and gfortran 4.8.2\n\n";
} elsif ($hostname =~ /osx1010test/) {
print OUTFILE "\tgcc, g++ 5.1 from Xcode 5.1 and gfortran 4.8.2\n\n";
}
print OUTFILE $section2;
print OUTFILE $section3;
print OUTFILE $section4;

182
bin/pkgscrpts/makeOuterREADME.pl Executable file
View File

@ -0,0 +1,182 @@
#!/usr/bin/perl
# makeOuterREADME.pl
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF4. The full HDF4 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 HDF4 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdfgroup.org/HDF4/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
#
use warnings;
use strict;
my $indirectory = ".";
$indirectory = shift;
my $outdirectory = ".";
$outdirectory = shift;
my $outsubdir = shift;
my $version;
my $outfile = "$outdirectory/$outsubdir/README";
open OUTFILE, ">$outfile";
my $hostname="";
my $cmd = "grep \"HDF5 Version\" $indirectory-static/lib/libhdf5.settings";
$_ = `$cmd`;
print OUTFILE $_, "\n";
s/HDF5 Version://;
s/^\s+//;
chomp;
$version = $_;
#print OUTFILE $_, "\n";
my $versionstring= "This directory contains the precompiled HDF5 $version binary distribution\n(include files, libraries, utilities) for";
$cmd = "grep \"Uname information:\" $indirectory-static/lib/libhdf5.settings";
$_ = `$cmd`;
s/Uname information://;
s/^\s+//;
chomp;
print "String to work with is $_\n";
my $platformstring = "";
my $hostnamestring = $_;
my @hostnamestring = split / /, $hostnamestring;
$platformstring = "$hostnamestring[0] ";
if ($indirectory =~ /jam/ || $indirectory =~ /koala/) {
$hostnamestring = $hostnamestring[2];
my $pos = index $hostnamestring, "-";
if ($pos > 0) {
$platformstring .= substr $hostnamestring, 0, $pos;
} else {
$platformstring .= $hostnamestring[2];
}
$platformstring .= " ".$hostnamestring[-3];
} elsif ($indirectory =~ /linew/) {
$platformstring .= "$hostnamestring[2] $hostnamestring[-2]";
} else {
$platformstring .= "$hostnamestring[2] $hostnamestring[-1]";
}
print OUTFILE $versionstring." ".$platformstring.":\n\n";
my $line1;
my $line3;
my $line5;
my $compilerstring="";
my $compilerstring1="";
my $compilerstring2="";
print $indirectory, "\n";
if ($indirectory =~ /ostrich/) {
# $line1 = " hdf5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
$line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
$line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
$compilerstring = " gcc, g++, and gfortran 4.4.7)";
}
elsif ($indirectory =~ /platypus/) {
# $line1 = " hdf5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
$line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
$compilerstring1 = " gcc, g++, and gfortran 4.4.7)\n";
if ($indirectory =~ /32/) {
$line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 and Java APIs (using";
$compilerstring2 = " gcc, g++, and gfortran 4.4.7)\n";
} else {
$line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 and Java APIs (using";
$compilerstring2 = " gcc, g++, and gfortran 4.4.7 and java 1.8.0_51)\n";
}
}
elsif ($indirectory =~ /moohan/) {
# $line1 = " hdf5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
$line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
$compilerstring1 = " gcc, g++, and gfortran 4.8.5)\n";
if ($indirectory =~ /32/) {
$line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 and Java APIs (using";
$compilerstring2 = " gcc, g++, and gfortran 4.4.7)\n";
} else {
$line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 and Java APIs (using";
$compilerstring2 = " gcc, g++, and gfortran 4.8.5 and java 1.8.0_51)\n";
}
}
elsif ($indirectory =~ /emu/) {
# $line1 = " hdf5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
$line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
$line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
$compilerstring = " Sun C and C++ 5.12, Sun Fortran 95 8.6)\n";
}
elsif ($indirectory =~ /kite/) {
$line3 = " hfd5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
$line5 = " hfd5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
$compilerstring = " Apple clang/clang++ 5.1 from Xcode 5.0.2,
gfortran 4.8.2)\n";
}
elsif ($indirectory =~ /quail/) {
$line3 = " hfd5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
$line5 = " hfd5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
$compilerstring = " Apple clang/clang++ 6.0 from Xcode 5.1,
gfortran 4.9.2)\n";
}
elsif ($indirectory =~ /osx1010test/) {
$line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
$line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
$compilerstring = " Apple clang/clang++ 6.1 from Xcode 6.1,
gfortran 4.9.2)\n";
}
elsif ($indirectory =~ /osx1011test/) {
$line3 = " hdf5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using";
$line5 = " hdf5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using";
$compilerstring = " Apple clang/clang++ 7.0.2 from Xcode 7.0,
gfortran 5.2.0)\n";
}
print OUTFILE $line3;
print OUTFILE $compilerstring1."\n";
if ($line5 ne "") {
print OUTFILE $line5;
print OUTFILE $compilerstring2."\n";
}
#elsif ($indirectory =~ /-16API/) {
# print OUTFILE $line1;
# print OUTFILE $compilerstring;
# print OUTFILE " USES THE VERSION 1.6 DEFAULT API\n";
# print OUTFILE " MAPPING.\n\n";
#}
print OUTFILE " utilities/ - Directory containing the compiled HDF5 utilities.\n";
print OUTFILE " These utilities are STATICALLY linked and will run as is.\n\n";
#print OUTFILE " The tools can be downloaded separately, or ALL in one\n";
#print OUTFILE " compressed file (5-$version-$outsubdir-static-util.tar.gz).\n\n";
print OUTFILE "\n";
print OUTFILE "To obtain the HDF5 distribution, 'unzip' and 'untar' the distribution\n";
print OUTFILE "file:\n\n";
print OUTFILE " gzip -cd <gz file from above> | tar xvf -\n";
#$cmd = "grep \"Configured by:\" $indirectory/$key-static/lib/libhdf5.settings";
#$_ = `$cmd`;
#s/Configured by://;
#s/^\s+//;
#print OUTFILE $_;
#chomp;
#my $hostnamestring = $_;
#s/(^\w+)(\s)(\S+)/$1/;
#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/;
#my $platformstring = $_ . ":\n\n";
#my @hostnamestring = split /@/, $hostnamestring;
#print "Size of hostnamestring is ", scalar @hostnamestring, "\n";
#print $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n";
#my $platformstring = $hostnamestring[1].":\n\n";
#$hostnamestring = $hostnamestring[1];
#my $pos = index $hostnamestring, ".";
#if ($pos > 0) {
# @hostnamestring = split /\./, $hostnamestring;
# $platformstring = $hostnamestring[0].":\n\n";
#}

View File

@ -19,12 +19,12 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5AbstractDs.h"
#include "H5DataSpace.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5Alltypes.h"
#ifndef H5_NO_NAMESPACE

View File

@ -24,6 +24,6 @@
#include "H5IntType.h"
#include "H5FloatType.h"
#include "H5StrType.h"
#include "H5CompType.h"
#include "H5ArrayType.h"
#include "H5VarLenType.h"
#include "H5CompType.h"

View File

@ -19,10 +19,10 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5ArrayType.h"
@ -80,10 +80,9 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
///\param rhs - IN: Reference to the existing array datatype
///\return Reference to ArrayType instance
///\exception H5::DataTypeIException
/// std::bad_alloc
// Description
// Closes the id on the lhs object first with setId, then copies
// each data member from the rhs object.
// each data member from the rhs object. (Issue HDFFV-9562)
// Programmer Binh-Minh Ribler - Mar 2016
// Modification
//--------------------------------------------------------------------------
@ -120,24 +119,7 @@ int ArrayType::getArrayNDims() const
int ndims = H5Tget_array_ndims(id);
if (ndims < 0)
{
throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_ndims failed");
}
return(ndims);
}
//---------------------------- Deprecated ----------------------------------
// Function: ArrayType::getArrayNDims
// This non-const version of the above method is here for compatibility
// purposes and may be removed in the future.
// -BMR, Apr 2016
//--------------------------------------------------------------------------
int ArrayType::getArrayNDims()
{
// Get the rank of the array type specified by id from the C API
int ndims = H5Tget_array_ndims(id);
if (ndims < 0)
{
throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_ndims failed");
throw DataTypeIException("ArrayType::getArrayNDims", "H5Tget_array_ndims failed");
}
return(ndims);
@ -159,23 +141,7 @@ int ArrayType::getArrayDims(hsize_t* dims) const
// Get the dimensions
int ndims = H5Tget_array_dims2(id, dims);
if (ndims < 0)
throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_dims2 failed");
// Return the number of dimensions
return(ndims);
}
//---------------------------- Deprecated ----------------------------------
// Function: ArrayType::getArrayDims
// This non-const version of the above method is here for compatibility
// purposes and may be removed in the future.
// -BMR, Apr 2016
//--------------------------------------------------------------------------
int ArrayType::getArrayDims(hsize_t* dims)
{
// Get the dimensions
int ndims = H5Tget_array_dims2(id, dims);
if (ndims < 0)
throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_dims2 failed");
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
// Return the number of dimensions
return(ndims);

View File

@ -36,11 +36,11 @@ class H5_DLLCPP ArrayType : public DataType {
// Returns the number of dimensions of this array datatype.
int getArrayNDims() const;
int getArrayNDims(); // deprecated
//int getArrayNDims(); // removed 1.8.18 and 1.10.1
// Returns the sizes of dimensions of this array datatype.
int getArrayDims(hsize_t* dims) const;
int getArrayDims(hsize_t* dims); // deprecated
//int getArrayDims(hsize_t* dims); // removed 1.8.18 and 1.10.1
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("ArrayType"); }

View File

@ -19,10 +19,10 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AtomType.h"

View File

@ -24,15 +24,16 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5AbstractDs.h"
#include "H5FaccProp.h"
#include "H5FcreatProp.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSpace.h"
#include "H5Group.h"
#include "H5File.h"
#include "H5Attribute.h"
#include "H5private.h" // for HDfree
@ -52,7 +53,7 @@ class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
///\brief Default constructor: Creates a stub attribute
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
Attribute::Attribute() : AbstractDs(), IdComponent(), id(H5I_INVALID_HID) {}
Attribute::Attribute() : AbstractDs(), H5Location(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: Attribute copy constructor
@ -60,7 +61,7 @@ Attribute::Attribute() : AbstractDs(), IdComponent(), id(H5I_INVALID_HID) {}
///\param original - IN: Original Attribute object to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute::Attribute(const Attribute& original) : AbstractDs(), IdComponent(), id(original.id)
Attribute::Attribute(const Attribute& original) : AbstractDs(), H5Location(), id(original.id)
{
incRefCount(); // increment number of references to this id
}
@ -73,7 +74,7 @@ Attribute::Attribute(const Attribute& original) : AbstractDs(), IdComponent(), i
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute::Attribute(const hid_t existing_id) : AbstractDs(), IdComponent(), id(existing_id)
Attribute::Attribute(const hid_t existing_id) : AbstractDs(), H5Location(), id(existing_id)
{
incRefCount(); // increment number of references to this id
}
@ -281,23 +282,6 @@ DataSpace Attribute::getSpace() const
}
}
//--------------------------------------------------------------------------
// Function: Attribute::getFileName
///\brief Gets the name of the file, in which this attribute belongs.
///\return File name
///\exception H5::IdComponentException
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
H5std_string Attribute::getFileName() const
{
try {
return(p_get_file_name());
}
catch (IdComponentException& E) {
throw FileIException("Attribute::getFileName", E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief Gets the name of this attribute, returning its length.
@ -462,12 +446,13 @@ ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
// Programmer Binh-Minh Ribler - Nov, 2001
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
ssize_t Attribute::getName( size_t len, H5std_string& attr_name ) const
{
return (getName(attr_name, len));
}
//ssize_t Attribute::getName( size_t len, H5std_string& attr_name ) const
//{
// return (getName(attr_name, len));
//}
//--------------------------------------------------------------------------
// Function: Attribute::getStorageSize
@ -484,31 +469,6 @@ hsize_t Attribute::getStorageSize() const
return (storage_size);
}
//--------------------------------------------------------------------------
// Function: Attribute::flush
///\brief Flushes all buffers associated with a file specified by
/// this attribute, to disk.
///\param scope - IN: Specifies the scope of the flushing action,
/// which can be either of these values:
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
///\exception H5::AttributeIException
///\par Description
/// This attribute is used to identify the file to be flushed.
// Programmer Binh-Minh Ribler - 2012
// Modification
// Sep 2012 - BMR
// Duplicated from H5Location
//--------------------------------------------------------------------------
void Attribute::flush(H5F_scope_t scope) const
{
herr_t ret_value = H5Fflush(getId(), scope);
if( ret_value < 0 )
{
throw AttributeIException("Attribute::flush", "H5Fflush failed");
}
}
//--------------------------------------------------------------------------
// Function: Attribute::getId
///\brief Get the id of this attribute
@ -519,6 +479,11 @@ void Attribute::flush(H5F_scope_t scope) const
// addition, member IdComponent::id is moved into subclasses, and
// IdComponent::getId now becomes pure virtual function.
// Programmer Binh-Minh Ribler - May, 2008
// Modification
// Aug 2016 - BMR
// Note that Attribute is now inheriting from H5Location, because
// an attribute id can be used to specify a location in HDF5
// library.
//--------------------------------------------------------------------------
hid_t Attribute::getId() const
{

View File

@ -26,10 +26,10 @@ namespace H5 {
An attribute has many characteristics similar to a dataset, thus both
Attribute and DataSet are derivatives of AbstractDs. Attribute also
inherits from IdComponent because an attribute is an HDF5 component that
is identified by an identifier.
inherits from H5Location because an attribute can be used to specify
a location.
*/
class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
public:
// Copy constructor: makes a copy of an existing Attribute object.
@ -44,9 +44,6 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
// Closes this attribute.
virtual void close();
// Gets the name of the file, in which this attribute belongs.
H5std_string getFileName() const;
// Gets the name of this attribute.
ssize_t getName(char* attr_name, size_t buf_size = 0) const;
H5std_string getName(size_t len) const;
@ -73,10 +70,6 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
void write(const DataType& mem_type, const void *buf ) const;
void write(const DataType& mem_type, const H5std_string& strg ) const;
// Flushes all buffers associated with the file specified by this
// attribute to disk.
void flush( H5F_scope_t scope ) const;
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("Attribute"); }
@ -105,12 +98,6 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
void p_read_variable_len(const DataType& mem_type, H5std_string& strg) const;
void p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const;
// do not inherit H5Object::iterateAttrs
int iterateAttrs() { return 0; }
// do not inherit H5Object::renameAttr
void renameAttr() {}
// Friend function to set Attribute id. For library use only.
friend void f_Attribute_setId(Attribute* attr, hid_t new_id);

File diff suppressed because it is too large Load Diff

View File

@ -21,145 +21,16 @@
namespace H5 {
#endif
// Class forwarding
class Group;
class H5File;
class ArrayType;
class VarLenType;
/*! \class CommonFG
\brief \a CommonFG is an abstract base class of H5File and H5Group.
\brief \a CommonFG was an abstract base class of H5File and H5Group.
It provides common operations of H5File and H5Group.
It provided common operations of H5File and H5Group.
In release 1.10.1, the class structure is modified.
As a result, member functions of CommonFG are moved to Group.
*/
class H5_DLLCPP CommonFG {
public:
// Creates a new group at this location which can be a file
// or another group.
Group createGroup(const char* name, size_t size_hint = 0) const;
Group createGroup(const H5std_string& name, size_t size_hint = 0) const;
// Opens an existing group in a location which can be a file
// or another group.
Group openGroup(const char* name) const;
Group openGroup(const H5std_string& name) const;
// Creates a new dataset at this location.
DataSet createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
DataSet createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
// Opens an existing dataset at this location.
DataSet openDataSet(const char* name) const;
DataSet openDataSet(const H5std_string& name) const;
// Returns the value of a symbolic link.
H5std_string getLinkval(const char* link_name, size_t size=0) const;
H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
// Returns the number of objects in this group.
hsize_t getNumObjs() const;
// Retrieves the name of an object in this group, given the
// object's index.
H5std_string getObjnameByIdx(hsize_t idx) const;
ssize_t getObjnameByIdx(hsize_t idx, char* name, size_t size) const;
ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
// Retrieves the type of an object in this file or group, given the
// object's name
H5O_type_t childObjType(const H5std_string& objname) const;
H5O_type_t childObjType(const char* objname) const;
H5O_type_t childObjType(hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char* objname=".") const;
// Returns the object header version of an object in this file or group,
// given the object's name.
unsigned childObjVersion(const char* objname) const;
unsigned childObjVersion(const H5std_string& objname) const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Returns the type of an object in this group, given the
// object's index.
H5G_obj_t getObjTypeByIdx(hsize_t idx) const;
H5G_obj_t getObjTypeByIdx(hsize_t idx, char* type_name) const;
H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const;
// Returns information about an HDF5 object, given by its name,
// at this location.
void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const;
void getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const;
void getObjinfo(const char* name, H5G_stat_t& statbuf) const;
void getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const;
// Iterates over the elements of this group - not implemented in
// C++ style yet.
int iterateElems(const char* name, int *idx, H5G_iterate_t op, void *op_data);
int iterateElems(const H5std_string& name, int *idx, H5G_iterate_t op, void *op_data);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Creates a link of the specified type from new_name to current_name;
// both names are interpreted relative to the specified location id.
void link(H5L_type_t link_type, const char* curr_name, const char* new_name) const;
void link(H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name) const;
// Removes the specified name at this location.
void unlink(const char* name) const;
void unlink(const H5std_string& name) const;
// Mounts the file 'child' onto this location.
void mount(const char* name, const H5File& child, const PropList& plist) const;
void mount(const char* name, H5File& child, PropList& plist) const; // backward compatibility
void mount(const H5std_string& name, const H5File& child, const PropList& plist) const;
void mount(const H5std_string& name, H5File& child, PropList& plist) const; // backward compatibility
// Unmounts the file named 'name' from this parent location.
void unmount(const char* name) const;
void unmount(const H5std_string& name) const;
// Renames an object at this location.
void move(const char* src, const char* dst) const;
void move(const H5std_string& src, const H5std_string& dst) const;
// Opens a generic named datatype in this location.
DataType openDataType(const char* name) const;
DataType openDataType(const H5std_string& name) const;
// Opens a named array datatype in this location.
ArrayType openArrayType(const char* name) const;
ArrayType openArrayType(const H5std_string& name) const;
// Opens a named compound datatype in this location.
CompType openCompType(const char* name) const;
CompType openCompType(const H5std_string& name) const;
// Opens a named enumeration datatype in this location.
EnumType openEnumType(const char* name) const;
EnumType openEnumType(const H5std_string& name) const;
// Opens a named integer datatype in this location.
IntType openIntType(const char* name) const;
IntType openIntType(const H5std_string& name) const;
// Opens a named floating-point datatype in this location.
FloatType openFloatType(const char* name) const;
FloatType openFloatType(const H5std_string& name) const;
// Opens a named string datatype in this location.
StrType openStrType(const char* name) const;
StrType openStrType(const H5std_string& name) const;
// Opens a named variable length datatype in this location.
VarLenType openVarLenType(const char* name) const;
VarLenType openVarLenType(const H5std_string& name) const;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
/// For subclasses, H5File and Group, to return the correct
/// object id, i.e. file or group id.
virtual hid_t getLocId() const = 0;
/// For subclasses, H5File and Group, to throw appropriate exception.
virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const = 0;
// Default constructor.
CommonFG();

View File

@ -19,10 +19,10 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5Alltypes.h"
#include "H5AbstractDs.h"
#include "H5DxferProp.h"

View File

@ -24,6 +24,7 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5PropList.h"
#include "H5OcreatProp.h"
@ -31,10 +32,10 @@
#include "H5DcreatProp.h"
#include "H5FaccProp.h"
#include "H5FcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSpace.h"
#include "H5AbstractDs.h"
#include "H5Group.h"
#include "H5File.h"
#include "H5Attribute.h"
#include "H5DataSet.h"
@ -301,6 +302,8 @@ void DataSet::getSpaceStatus(H5D_space_status_t& status) const
//--------------------------------------------------------------------------
// Function: DataSet::getVlenBufSize
///\brief Returns the number of bytes required to store VL data.
///\param type - IN: Datatype, which is the datatype for the buffer
///\param space - IN: Selection for the memory buffer
///\return Amount of storage
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
@ -331,12 +334,13 @@ hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) c
// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
{
return(getVlenBufSize(type, space));
}
//hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
//{
// return(getVlenBufSize(type, space));
//}
//--------------------------------------------------------------------------
// Function: DataSet::vlenReclaim
@ -605,7 +609,6 @@ void DataSet::extend( const hsize_t* size ) const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2014
// Modification
// Used the non-const version.
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const
{
@ -633,12 +636,13 @@ void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf,
// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
{
fillMemBuf(fill, (const DataType)fill_type, buf, (const DataType)buf_type, (const DataSpace)space);
}
//void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
//{
// fillMemBuf(fill, (const DataType)fill_type, buf, (const DataType)buf_type, (const DataSpace)space);
//}
//--------------------------------------------------------------------------
// Function: DataSet::fillMemBuf
@ -672,12 +676,13 @@ void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& s
// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
{
fillMemBuf(buf, (const DataType)buf_type, (const DataSpace)space);
}
//void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
//{
// fillMemBuf(buf, (const DataType)buf_type, (const DataSpace)space);
//}
//--------------------------------------------------------------------------
// Function: DataSet::getId

View File

@ -39,11 +39,11 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// Fills a selection in memory with a value
void fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const;
void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
//void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space); // removed from 1.8.18 and 1.10.1
// Fills a selection in memory with zero
void fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const;
void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
//void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space); // removed from 1.8.18 and 1.10.1
// Gets the creation property list of this dataset.
DSetCreatPropList getCreatePlist() const;
@ -65,7 +65,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// Returns the number of bytes required to store VL data.
hsize_t getVlenBufSize(const DataType& type, const DataSpace& space ) const;
hsize_t getVlenBufSize(DataType& type, DataSpace& space) const; // kept for backward compatibility
//hsize_t getVlenBufSize(DataType& type, DataSpace& space) const; // removed from 1.8.18 and 1.10.1
// Reclaims VL datatype memory buffers.
static void vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf );

View File

@ -348,12 +348,13 @@ void DataSpace::extentCopy (const DataSpace& dest_space) const
// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
void DataSpace::extentCopy( DataSpace& dest_space ) const
{
extentCopy(dest_space);
}
//void DataSpace::extentCopy( DataSpace& dest_space ) const
//{
// extentCopy(dest_space);
//}
//--------------------------------------------------------------------------
// Function: DataSpace::setExtentSimple

View File

@ -50,8 +50,8 @@ class H5_DLLCPP DataSpace : public IdComponent {
// Copies the extent of this dataspace.
void extentCopy(const DataSpace& dest_space) const;
// Kept for backward compatibility only.
void extentCopy(DataSpace& dest_space) const;
// removed from 1.8.18 and 1.10.1
//void extentCopy(DataSpace& dest_space) const;
// Gets the bounding box containing the current selection.
void getSelectBounds( hsize_t* start, hsize_t* end ) const;

View File

@ -25,19 +25,20 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5DataSpace.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5FaccProp.h"
#include "H5FcreatProp.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AtomType.h"
#include "H5PredType.h"
#include "H5private.h"
#include "H5AbstractDs.h"
#include "H5DataSet.h"
#include "H5Group.h"
#include "H5File.h"
#include "H5Attribute.h"
@ -313,12 +314,13 @@ void DataType::commit(const H5Location& loc, const char* name)
// Programmer Binh-Minh Ribler - Jan, 2007
// Modification
// Planned for removal. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
void DataType::commit(H5Location& loc, const char* name)
{
p_commit(loc.getId(), name);
}
//void DataType::commit(H5Location& loc, const char* name)
//{
// p_commit(loc.getId(), name);
//}
//--------------------------------------------------------------------------
// Function: DataType::commit
@ -343,12 +345,13 @@ void DataType::commit(const H5Location& loc, const H5std_string& name)
// Programmer Binh-Minh Ribler - Jan, 2007
// Modification
// Planned for removal. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
void DataType::commit(H5Location& loc, const H5std_string& name)
{
p_commit(loc.getId(), name.c_str());
}
//void DataType::commit(H5Location& loc, const H5std_string& name)
//{
// p_commit(loc.getId(), name.c_str());
//}
//--------------------------------------------------------------------------
// Function: DataType::committed

View File

@ -63,9 +63,9 @@ class H5_DLLCPP DataType : public H5Object {
void commit(const H5Location& loc, const char* name);
void commit(const H5Location& loc, const H5std_string& name);
// These two overloaded functions are kept for backward compatibility
// only; they missed the const.
void commit(H5Location& loc, const char* name);
void commit(H5Location& loc, const H5std_string& name);
// only; they missed the const - removed from 1.8.18 and 1.10.1
//void commit(H5Location& loc, const char* name);
//void commit(H5Location& loc, const H5std_string& name);
// Determines whether this datatype is a named datatype or
// a transient datatype.

View File

@ -20,9 +20,9 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5OcreatProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#ifndef H5_NO_NAMESPACE
@ -333,7 +333,7 @@ void DSetCreatPropList::getFillValue( const DataType& fvalue_type, void* value )
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_fill_value_t DSetCreatPropList::isFillValueDefined()
H5D_fill_value_t DSetCreatPropList::isFillValueDefined() const
{
H5D_fill_value_t status;
herr_t ret_value = H5Pfill_value_defined(id, &status);
@ -517,7 +517,7 @@ void DSetCreatPropList::modifyFilter( H5Z_filter_t filter_id, unsigned int
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DSetCreatPropList::allFiltersAvail()
bool DSetCreatPropList::allFiltersAvail() const
{
htri_t ret_value = H5Pall_filters_avail(id);
if( ret_value > 0 )
@ -565,7 +565,7 @@ void DSetCreatPropList::setShuffle() const
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_alloc_time_t DSetCreatPropList::getAllocTime()
H5D_alloc_time_t DSetCreatPropList::getAllocTime() const
{
H5D_alloc_time_t alloc_time;
herr_t ret_value = H5Pget_alloc_time(id, &alloc_time);
@ -589,7 +589,7 @@ H5D_alloc_time_t DSetCreatPropList::getAllocTime()
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_fill_time_t DSetCreatPropList::getFillTime()
H5D_fill_time_t DSetCreatPropList::getFillTime() const
{
H5D_fill_time_t fill_time;
herr_t ret_value = H5Pget_fill_time(id, &fill_time);
@ -615,7 +615,7 @@ H5D_fill_time_t DSetCreatPropList::getFillTime()
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)
void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
{
herr_t ret_value = H5Pset_alloc_time(id, alloc_time);
if( ret_value < 0 )
@ -636,7 +636,7 @@ void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time)
void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
{
herr_t ret_value = H5Pset_fill_time(id, fill_time);
if( ret_value < 0 )

View File

@ -38,13 +38,13 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
// Queries whether all the filters set in this property list are
// available currently.
bool allFiltersAvail();
bool allFiltersAvail() const;
// Get space allocation time for this property.
H5D_alloc_time_t getAllocTime();
H5D_alloc_time_t getAllocTime() const;
// Set space allocation time for dataset during creation.
void setAllocTime(H5D_alloc_time_t alloc_time);
void setAllocTime(H5D_alloc_time_t alloc_time) const;
// Retrieves the size of the chunks used to store a chunked layout dataset.
int getChunk( int max_ndims, hsize_t* dim ) const;
@ -59,10 +59,10 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
int getExternalCount() const;
// Gets fill value writing time.
H5D_fill_time_t getFillTime();
H5D_fill_time_t getFillTime() const;
// Sets fill value writing time for dataset.
void setFillTime(H5D_fill_time_t fill_time);
void setFillTime(H5D_fill_time_t fill_time) const;
// Retrieves a dataset fill value.
void getFillValue( const DataType& fvalue_type, void* value ) const;
@ -88,7 +88,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
int getNfilters() const;
// Checks if fill value has been defined for this property.
H5D_fill_value_t isFillValueDefined();
H5D_fill_value_t isFillValueDefined() const;
// Modifies the specified filter.
void modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;

View File

@ -145,13 +145,12 @@ void DSetMemXferPropList::setBuffer( size_t size, void* tconv, void* bkg ) const
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getBuffer
///\brief Reads buffer settings.
///\param tconv - IN: Pointer to application-allocated type conversion buffer
///\param bkg - IN: Pointer to application-allocated background buffer
///\param tconv - OUT: Pointer to application-allocated type conversion buf
///\param bkg - OUT: Pointer to application-allocated background buffer
///\return Buffer size, in bytes
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t DSetMemXferPropList::getBuffer( void** tconv, void** bkg ) const
{
size_t buffer_size = H5Pget_buffer( id, tconv, bkg );
@ -443,7 +442,7 @@ void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void**
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSmallData
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size)
void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size) const
{
herr_t ret_value = H5Pset_small_data_block_size(id, size);
if (ret_value < 0)
@ -460,7 +459,7 @@ void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size)
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t DSetMemXferPropList::getSmallDataBlockSize()
hsize_t DSetMemXferPropList::getSmallDataBlockSize() const
{
hsize_t size;
herr_t ret_value = H5Pget_small_data_block_size(id, &size);
@ -483,7 +482,7 @@ hsize_t DSetMemXferPropList::getSmallDataBlockSize()
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetHyperVectorSize
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::setHyperVectorSize(size_t vector_size)
void DSetMemXferPropList::setHyperVectorSize(size_t vector_size) const
{
herr_t ret_value = H5Pset_hyper_vector_size(id, vector_size);
if (ret_value < 0)
@ -501,7 +500,7 @@ void DSetMemXferPropList::setHyperVectorSize(size_t vector_size)
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t DSetMemXferPropList::getHyperVectorSize()
size_t DSetMemXferPropList::getHyperVectorSize() const
{
size_t vector_size;
herr_t ret_value = H5Pget_hyper_vector_size(id, &vector_size);
@ -531,7 +530,7 @@ size_t DSetMemXferPropList::getHyperVectorSize()
/// \li \c H5Z_DISABLE_EDC
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check)
void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check) const
{
herr_t ret_value = H5Pset_edc_check(id, check);
if (ret_value < 0)
@ -548,7 +547,7 @@ void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check)
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5Z_EDC_t DSetMemXferPropList::getEDCCheck()
H5Z_EDC_t DSetMemXferPropList::getEDCCheck() const
{
H5Z_EDC_t check = H5Pget_edc_check(id);
if (check < 0)

View File

@ -86,24 +86,24 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
H5MM_free_t& free, void** free_info ) const;
// Sets the size of a contiguous block reserved for small data.
void setSmallDataBlockSize(hsize_t size);
void setSmallDataBlockSize(hsize_t size) const;
// Returns the current small data block size setting.
hsize_t getSmallDataBlockSize();
hsize_t getSmallDataBlockSize() const;
// Sets number of I/O vectors to be read/written in hyperslab I/O.
void setHyperVectorSize(size_t vector_size);
void setHyperVectorSize(size_t vector_size) const;
// Returns the number of I/O vectors to be read/written in
// hyperslab I/O.
size_t getHyperVectorSize();
size_t getHyperVectorSize() const;
// Enables or disables error-detecting for a dataset reading
// process.
void setEDCCheck(H5Z_EDC_t check);
void setEDCCheck(H5Z_EDC_t check) const;
// Determines whether error-detection is enabled for dataset reads.
H5Z_EDC_t getEDCCheck();
H5Z_EDC_t getEDCCheck() const;
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("DSetMemXferPropList"); }

View File

@ -19,13 +19,13 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5AbstractDs.h"
#include "H5DxferProp.h"
#include "H5DataSpace.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSet.h"
#include "H5AtomType.h"

View File

@ -328,26 +328,6 @@ void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccP
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
// Purpose This is an overloaded member function, kept for backward
// compatibility. It differs from the above function in that it
// misses const's. This wrapper will be removed in future release.
// Param meta_plist - IN: File access plist for the metadata file
// Param raw_plist - IN: File access plist for the raw data file
// Param meta_ext - IN: Metadata filename extension as \c char*
// Param raw_ext - IN: Raw data filename extension as \c char*
// Exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
// Modification
// Planned for removal. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
{
setSplit(meta_plist, raw_plist, meta_ext, raw_ext);
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
///\brief This is an overloaded member function, provided for convenience.
@ -364,25 +344,6 @@ void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccP
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
// Purpose This is an overloaded member function, kept for backward
// compatibility. It differs from the above function in that it
// misses const's. This wrapper will be removed in future release.
// Param meta_plist - IN: File access plist for the metadata file
// Param raw_plist - IN: File access plist for the raw data file
// Param meta_ext - IN: Metadata filename extension as \c char*
// Param raw_ext - IN: Raw data filename extension as \c char*
// Exception H5::PropListIException
// Modification
// Planned for removal. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
{
setSplit(meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
// Stream Virtual File Driver had been removed from the main library.
// FileAccPropList::[s,g]etStream are now removed from the C++ API.
// -BMR, March, 2012
@ -652,7 +613,7 @@ void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rd
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree)
void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) const
{
herr_t ret_value = H5Pset_fclose_degree(id, degree);
if( ret_value < 0 )
@ -668,7 +629,7 @@ void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree)
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5F_close_degree_t FileAccPropList::getFcloseDegree()
H5F_close_degree_t FileAccPropList::getFcloseDegree() const
{
H5F_close_degree_t degree;
herr_t ret_value = H5Pget_fclose_degree(id, &degree);

View File

@ -74,13 +74,6 @@ class H5_DLLCPP FileAccPropList : public PropList {
const FileAccPropList& raw_plist,
const H5std_string& meta_ext = ".meta",
const H5std_string& raw_ext = ".raw") const;
// These two overloaded functions are kept for backward compatibility
// only; they missed the const's and will be removed in future release.
void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
const char* meta_ext=".meta", const char* raw_ext=".raw") const;
void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
const H5std_string& meta_ext=".meta",
const H5std_string& raw_ext=".raw") const;
// Sets the maximum size of the data sieve buffer.
void setSieveBufSize(size_t bufsize) const;
@ -119,10 +112,10 @@ class H5_DLLCPP FileAccPropList : public PropList {
void getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const;
// Sets the degree for the file close behavior.
void setFcloseDegree(H5F_close_degree_t degree);
void setFcloseDegree(H5F_close_degree_t degree) const;
// Returns the degree for the file close behavior.
H5F_close_degree_t getFcloseDegree();
H5F_close_degree_t getFcloseDegree() const;
// Sets garbage collecting references flag.
void setGcReferences( unsigned gc_ref = 0 ) const;

View File

@ -24,13 +24,13 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5FaccProp.h"
#include "H5FcreatProp.h"
#include "H5OcreatProp.h"
#include "H5DxferProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5Group.h"
#include "H5AbstractDs.h"
#include "H5DataSpace.h"
@ -51,7 +51,7 @@ namespace H5 {
///\brief Default constructor: creates a stub H5File object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File() : H5Location(), CommonFG(), id(H5I_INVALID_HID) {}
H5File::H5File() : Group(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: H5File overloaded constructor
@ -84,7 +84,7 @@ H5File::H5File() : H5Location(), CommonFG(), id(H5I_INVALID_HID) {}
// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), CommonFG(), id(H5I_INVALID_HID)
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : Group(), id(H5I_INVALID_HID)
{
try {
p_get_file(name, flags, create_plist, access_plist);
@ -109,7 +109,7 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), CommonFG(), id(H5I_INVALID_HID)
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : Group(), id(H5I_INVALID_HID)
{
try {
p_get_file(name.c_str(), flags, create_plist, access_plist);
@ -166,7 +166,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
// constructor is needed by the library in order to return
// an object, H5File doesn't need it. -BMR (HDFFV-8766 partially)
//--------------------------------------------------------------------------
H5File::H5File(hid_t existing_id) : H5Location(), CommonFG()
H5File::H5File(hid_t existing_id) : Group()
{
id = existing_id;
incRefCount(); // increment number of references to this id
@ -181,7 +181,7 @@ H5File::H5File(hid_t existing_id) : H5Location(), CommonFG()
///\param original - IN: H5File instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File(const H5File& original) : H5Location(), CommonFG()
H5File::H5File(const H5File& original) : Group()
{
id = original.getId();
incRefCount(); // increment number of references to this id
@ -477,12 +477,13 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
// Programmer Binh-Minh Ribler - May 2004
// Modification
// Planned for removal. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
{
getVFDHandle((const FileAccPropList)fapl, file_handle);
}
//void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
//{
// getVFDHandle((const FileAccPropList)fapl, file_handle);
//}
//--------------------------------------------------------------------------
// Function: H5File::getVFDHandle

View File

@ -17,6 +17,7 @@
#ifndef __H5File_H
#define __H5File_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
@ -26,7 +27,7 @@ namespace H5 {
It inherits from H5Location and CommonFG.
*/
class H5_DLLCPP H5File : public H5Location, public CommonFG {
class H5_DLLCPP H5File : public Group {
public:
// Creates or opens an HDF5 file.
H5File( const char* name, unsigned int flags,
@ -68,7 +69,7 @@ class H5_DLLCPP H5File : public H5Location, public CommonFG {
// Returns the pointer to the file handle of the low-level file driver.
void getVFDHandle(void **file_handle) const;
void getVFDHandle(const FileAccPropList& fapl, void **file_handle) const;
void getVFDHandle(FileAccPropList& fapl, void **file_handle) const; // kept for backward compatibility
//void getVFDHandle(FileAccPropList& fapl, void **file_handle) const; // removed from 1.8.18 and 1.10.1
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const char* name );
@ -80,9 +81,6 @@ class H5_DLLCPP H5File : public H5Location, public CommonFG {
#ifndef DOXYGEN_SHOULD_SKIP_THIS
void reopen(); // obsolete in favor of reOpen()
// Gets the file id
virtual hid_t getLocId() const;
// Creates an H5File using an existing file id. Not recommended
// in applications.
H5File(hid_t existing_id);
@ -95,6 +93,9 @@ class H5_DLLCPP H5File : public H5Location, public CommonFG {
// Throw file exception.
virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
// for CommonFG to get the file id.
virtual hid_t getLocId() const;
// Default constructor
H5File();
@ -125,3 +126,4 @@ class H5_DLLCPP H5File : public H5Location, public CommonFG {
}
#endif
#endif // __H5File_H

View File

@ -19,10 +19,10 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AbstractDs.h"
#include "H5DxferProp.h"

File diff suppressed because it is too large Load Diff

View File

@ -14,8 +14,8 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef __H5Group_H
#define __H5Group_H
#ifndef __Group_H
#define __Group_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
@ -26,8 +26,147 @@ namespace H5 {
It inherits many operations from H5Location and CommonFG.
*/
class H5_DLLCPP Group : public H5Object, public CommonFG {
// Class forwarding
//class Group;
//class H5File;
class ArrayType;
class VarLenType;
/*! \class CommonFG
\brief \a CommonFG is an abstract base class of H5File and Group.
It provides common operations of H5File and Group.
*/
class H5_DLLCPP Group : public H5Object {
public:
// Group constructor to create a group or file (aka root group).
Group(const char* name, size_t size_hint = 0);
Group(const H5std_string& name, size_t size_hint = 0);
// Group constructor to open a group or file (aka root group).
Group(const char* name);
Group(const H5std_string& name);
// From CommonFG
// Creates a new group at this location which can be a file
// or another group.
Group createGroup(const char* name, size_t size_hint = 0) const;
Group createGroup(const H5std_string& name, size_t size_hint = 0) const;
// Opens an existing group in a location which can be a file
// or another group.
Group openGroup(const char* name) const;
Group openGroup(const H5std_string& name) const;
// Creates a new dataset in this group.
DataSet createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
DataSet createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
// Opens an existing dataset at this location.
DataSet openDataSet(const char* name) const;
DataSet openDataSet(const H5std_string& name) const;
// Returns the value of a symbolic link.
H5std_string getLinkval(const char* link_name, size_t size=0) const;
H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
// Returns the number of objects in this group.
hsize_t getNumObjs() const;
// Retrieves the name of an object in this group, given the
// object's index.
H5std_string getObjnameByIdx(hsize_t idx) const;
ssize_t getObjnameByIdx(hsize_t idx, char* name, size_t size) const;
ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
// Retrieves the type of an object in this file or group, given the
// object's name
H5O_type_t childObjType(const H5std_string& objname) const;
H5O_type_t childObjType(const char* objname) const;
H5O_type_t childObjType(hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char* objname=".") const;
// Returns the object header version of an object in this file or group,
// given the object's name.
unsigned childObjVersion(const char* objname) const;
unsigned childObjVersion(const H5std_string& objname) const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Returns the type of an object in this group, given the
// object's index.
H5G_obj_t getObjTypeByIdx(hsize_t idx) const;
H5G_obj_t getObjTypeByIdx(hsize_t idx, char* type_name) const;
H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const;
// Returns information about an HDF5 object, given by its name,
// at this location.
void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const;
void getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const;
void getObjinfo(const char* name, H5G_stat_t& statbuf) const;
void getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const;
// Iterates over the elements of this group - not implemented in
// C++ style yet.
int iterateElems(const char* name, int *idx, H5G_iterate_t op, void *op_data);
int iterateElems(const H5std_string& name, int *idx, H5G_iterate_t op, void *op_data);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Creates a link of the specified type from new_name to current_name;
// both names are interpreted relative to the specified location id.
void link(H5L_type_t link_type, const char* curr_name, const char* new_name) const;
void link(H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name) const;
// Removes the specified name at this location.
void unlink(const char* name) const;
void unlink(const H5std_string& name) const;
// Mounts the file 'child' onto this location.
void mount(const char* name, const H5File& child, const PropList& plist) const;
//void mount(const char* name, H5File& child, PropList& plist) const; // removed from 1.8.18 and 1.10.1
void mount(const H5std_string& name, const H5File& child, const PropList& plist) const;
//void mount(const H5std_string& name, H5File& child, PropList& plist) const; // removed from 1.8.18 and 1.10.1
// Unmounts the file named 'name' from this parent location.
void unmount(const char* name) const;
void unmount(const H5std_string& name) const;
// Renames an object at this location.
void move(const char* src, const char* dst) const;
void move(const H5std_string& src, const H5std_string& dst) const;
// Opens a generic named datatype in this location.
DataType openDataType(const char* name) const;
DataType openDataType(const H5std_string& name) const;
// Opens a named array datatype in this location.
ArrayType openArrayType(const char* name) const;
ArrayType openArrayType(const H5std_string& name) const;
// Opens a named compound datatype in this location.
CompType openCompType(const char* name) const;
CompType openCompType(const H5std_string& name) const;
// Opens a named enumeration datatype in this location.
EnumType openEnumType(const char* name) const;
EnumType openEnumType(const H5std_string& name) const;
// Opens a named integer datatype in this location.
IntType openIntType(const char* name) const;
IntType openIntType(const H5std_string& name) const;
// Opens a named floating-point datatype in this location.
FloatType openFloatType(const char* name) const;
FloatType openFloatType(const H5std_string& name) const;
// Opens a named string datatype in this location.
StrType openStrType(const char* name) const;
StrType openStrType(const H5std_string& name) const;
// Opens a named variable length datatype in this location.
VarLenType openVarLenType(const char* name) const;
VarLenType openVarLenType(const H5std_string& name) const;
// end from CommonFG
// Close this group.
virtual void close();
@ -68,7 +207,8 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
private:
hid_t id; // HDF5 group id
};
#ifndef H5_NO_NAMESPACE
}
#endif
#endif // __H5Group_H
#endif // __Group_H

View File

@ -19,10 +19,10 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AbstractDs.h"
#include "H5DxferProp.h"

View File

@ -25,6 +25,7 @@
#include "H5FcreatProp.h"
#include "H5OcreatProp.h"
#include "H5DxferProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
#include "H5DcreatProp.h"

View File

@ -26,10 +26,10 @@
#include "H5DxferProp.h"
#include "H5FaccProp.h"
#include "H5FcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSpace.h"
#include "H5AbstractDs.h"
#include "H5Group.h"
#include "H5File.h"
#include "H5DataSet.h"
#include "H5Attribute.h"
@ -40,21 +40,6 @@ namespace H5 {
#endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// userAttrOpWrpr simply interfaces between the user's function and the
// C library function H5Aiterate2; used to resolve the different prototype
// problem. May be moved to Iterator later.
extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
const H5A_info_t *ainfo, void *op_data)
{
H5std_string s_attr_name = H5std_string( attr_name );
#ifdef NO_STATIC_CAST
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
#else
UserData4Aiterate* myData = reinterpret_cast<UserData4Aiterate *> (op_data);
#endif
myData->op( *myData->location, s_attr_name, myData->opData );
return 0;
}
//--------------------------------------------------------------------------
// Function: H5Location default constructor (protected)
@ -74,8 +59,9 @@ H5Location::H5Location() : IdComponent() {}
// been moved to the sub-classes. It will be removed in 1.10 release. If its
// removal does not raise any problems in 1.10, it will be removed from 1.8 in
// subsequent releases.
// Removed in 1.10.1 - Aug 2016
//--------------------------------------------------------------------------
H5Location::H5Location(const hid_t object_id) : IdComponent() {}
// H5Location::H5Location(const hid_t object_id) : IdComponent() {}
//--------------------------------------------------------------------------
// Function: H5Location copy constructor
@ -93,264 +79,6 @@ H5Location::H5Location(const hid_t object_id) : IdComponent() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::createAttribute
///\brief Creates an attribute for a group, dataset, or named datatype.
///\param name - IN: Name of the attribute
///\param data_type - IN: Datatype for the attribute
///\param data_space - IN: Dataspace for the attribute - only simple
/// dataspaces are allowed at this time
///\param create_plist - IN: Creation property list - default to
/// PropList::DEFAULT
///\return Attribute instance
///\exception H5::AttributeIException
///\par Description
/// The attribute name specified in \a name must be unique.
/// Attempting to create an attribute with the same name as an
/// existing attribute will raise an exception, leaving the
/// pre-existing attribute intact. To overwrite an existing
/// attribute with a new attribute of the same name, first
/// delete the existing one with \c H5Location::removeAttr, then
/// recreate it with this function.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::createAttribute( const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
hid_t type_id = data_type.getId();
hid_t space_id = data_space.getId();
hid_t plist_id = create_plist.getId();
hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT );
// If the attribute id is valid, create and return the Attribute object
if( attr_id > 0 )
{
Attribute attr;
f_Attribute_setId(&attr, attr_id);
return( attr );
}
else
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::createAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::createAttribute( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
return( createAttribute( name.c_str(), data_type, data_space, create_plist ));
}
//--------------------------------------------------------------------------
// Function: H5Location::openAttribute
///\brief Opens an attribute given its name.
///\param name - IN: Name of the attribute
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::openAttribute( const char* name ) const
{
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
if( attr_id > 0 )
{
Attribute attr;
f_Attribute_setId(&attr, attr_id);
return( attr );
}
else
{
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Location::openAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::openAttribute( const H5std_string& name ) const
{
return( openAttribute( name.c_str()) );
}
//--------------------------------------------------------------------------
// Function: H5Location::openAttribute
///\brief Opens an attribute given its index.
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::openAttribute( const unsigned int idx ) const
{
hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
H5_ITER_INC, static_cast<hsize_t>(idx), H5P_DEFAULT, H5P_DEFAULT);
if( attr_id > 0 )
{
Attribute attr;
f_Attribute_setId(&attr, attr_id);
return(attr);
}
else
{
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Location::iterateAttrs
///\brief Iterates a user's function over all the attributes of an H5
/// object, which may be a group, dataset or named datatype.
///\param user_op - IN: User's function to operate on each attribute
///\param _idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
///\param op_data - IN: User's data to pass to user's operator function
///\return Returned value of the last operator if it was non-zero, or
/// zero if all attributes were processed
///\exception H5::AttributeIException
///\par Description
/// The signature of user_op is
/// void (*)(H5::H5Location&, H5std_string, void*).
/// For information, please refer to the C layer Reference Manual
/// at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Iterate
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Location::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
{
// store the user's function and data
UserData4Aiterate* userData = new UserData4Aiterate;
userData->opData = op_data;
userData->op = user_op;
userData->location = this;
// call the C library routine H5Aiterate2 to iterate the attributes
hsize_t idx = _idx ? static_cast<hsize_t>(*_idx) : 0;
int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
userAttrOpWrpr, reinterpret_cast<void *>(userData));
// release memory
delete userData;
if( ret_value >= 0 ) {
/* Pass back update index value to calling code */
if (_idx)
*_idx = static_cast<unsigned>(idx);
return( ret_value );
}
else // raise exception when H5Aiterate returns a negative value
throw AttributeIException(inMemFunc("iterateAttrs"), "H5Aiterate2 failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::getNumAttrs
///\brief Returns the number of attributes attached to this HDF5 object.
///\return Number of attributes
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Location::getNumAttrs() const
{
H5O_info_t oinfo; /* Object info */
if(H5Oget_info(getId(), &oinfo) < 0)
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
else
return(static_cast<int>(oinfo.num_attrs));
}
//--------------------------------------------------------------------------
// Function: H5Location::attrExists
///\brief Checks whether the named attribute exists at this location.
///\param name - IN: Name of the attribute to be queried
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2013
//--------------------------------------------------------------------------
bool H5Location::attrExists(const char* name) const
{
// Call C routine H5Aexists to determine whether an attribute exists
// at this location, which could be specified by a file, group, dataset,
// or named datatype.
herr_t ret_value = H5Aexists(getId(), name);
if( ret_value > 0 )
return true;
else if(ret_value == 0)
return false;
else // Raise exception when H5Aexists returns a negative value
throw AttributeIException(inMemFunc("attrExists"), "H5Aexists failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::attrExists
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool H5Location::attrExists(const H5std_string& name) const
{
return(attrExists(name.c_str()));
}
//--------------------------------------------------------------------------
// Function: H5Location::removeAttr
///\brief Removes the named attribute from this object.
///\param name - IN: Name of the attribute to be removed
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Location::removeAttr( const char* name ) const
{
herr_t ret_value = H5Adelete(getId(), name);
if( ret_value < 0 )
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::removeAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Location::removeAttr( const H5std_string& name ) const
{
removeAttr( name.c_str() );
}
//--------------------------------------------------------------------------
// Function: H5Location::renameAttr
///\brief Renames the named attribute from this object.
///\param oldname - IN: Name of the attribute to be renamed
///\param newname - IN: New name ame of the attribute
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void H5Location::renameAttr(const char* oldname, const char* newname) const
{
herr_t ret_value = H5Arename(getId(), oldname, newname);
if (ret_value < 0)
throw AttributeIException(inMemFunc("renameAttr"), "H5Arename failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::renameAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for the names.
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void H5Location::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
{
renameAttr (oldname.c_str(), newname.c_str());
}
//--------------------------------------------------------------------------
// Function: H5Location::flush
///\brief Flushes all buffers associated with a location to disk.
@ -563,8 +291,8 @@ H5std_string H5Location::getComment(const char* name, size_t buf_size) const
HDmemset(comment_C, 0, tmp_len+1); // clear buffer
// Used overloaded function
ssize_t comment_len = getComment(name, tmp_len+1, comment_C);
if (comment_len < 0)
ssize_t temp_len = getComment(name, tmp_len+1, comment_C);
if (temp_len < 0)
{
delete []comment_C;
throw LocationException("H5Location::getComment", "H5Oget_comment_by_name failed");

View File

@ -23,20 +23,21 @@
namespace H5 {
#endif
class H5_DLLCPP H5Location; // forward declaration for UserData4Aiterate
//class H5_DLLCPP H5Location; // forward declaration for UserData4Aiterate
// Define the operator function pointer for H5Aiterate().
typedef void (*attr_operator_t)( H5Location& loc/*in*/,
const H5std_string attr_name/*in*/,
void *operator_data/*in,out*/);
//typedef void (*attr_operator_t)( H5Location& loc/*in*/,
//const H5std_string attr_name/*in*/,
//void *operator_data/*in,out*/);
//! User data for attribute iteration
class UserData4Aiterate {
/* class UserData4Aiterate {
public:
attr_operator_t op;
void* opData;
H5Location* location;
};
*/
/*! \class H5Location
\brief H5Location is an abstract base class, added in version 1.8.12.
@ -49,29 +50,12 @@ class UserData4Aiterate {
// a location can be a file, group, dataset, or named datatype. -BMR, 2013-10-1
class H5_DLLCPP H5Location : public IdComponent {
public:
// Creates an attribute for the specified object at this location
// PropList is currently not used, so always be default.
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
// Given its name, opens the attribute that belongs to an object at
// this location.
Attribute openAttribute( const char* name ) const;
Attribute openAttribute( const H5std_string& name ) const;
// Given its index, opens the attribute that belongs to an object at
// this location.
Attribute openAttribute( const unsigned int idx ) const;
// Flushes all buffers associated with this location to disk.
void flush( H5F_scope_t scope ) const;
// Gets the name of the file, specified by this location.
H5std_string getFileName() const;
// Determines the number of attributes at this location.
int getNumAttrs() const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
@ -82,21 +66,6 @@ class H5_DLLCPP H5Location : public IdComponent {
// Note: getRefObjType deprecates getObjType, but getObjType's name is
// misleading, so getRefObjType is used in the new function instead.
// Iterate user's function over the attributes at this location.
int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL);
// Checks whether the named attribute exists at this location.
bool attrExists(const char* name) const;
bool attrExists(const H5std_string& name) const;
// Renames the named attribute to a new name.
void renameAttr(const char* oldname, const char* newname) const;
void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
// Removes the named attribute from this location.
void removeAttr(const char* name) const;
void removeAttr(const H5std_string& name) const;
// Sets the comment for an HDF5 object specified by its name.
void setComment(const char* name, const char* comment) const;
void setComment(const H5std_string& name, const H5std_string& comment) const;

View File

@ -19,16 +19,17 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
#include "H5FaccProp.h"
#include "H5FcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSpace.h"
#include "H5AbstractDs.h"
#include "H5Group.h"
#include "H5File.h"
#include "H5DataSet.h"
#include "H5Attribute.h"
@ -39,6 +40,19 @@ namespace H5 {
#endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// userAttrOpWrpr simply interfaces between the user's function and the
// C library function H5Aiterate2; used to resolve the different prototype
// problem. May be moved to Iterator later.
extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
const H5A_info_t *ainfo, void *op_data)
{
H5std_string s_attr_name = H5std_string( attr_name );
UserData4Aiterate* myData = reinterpret_cast<UserData4Aiterate *> (op_data);
myData->op( *myData->location, s_attr_name, myData->opData );
return 0;
}
#endif
//--------------------------------------------------------------------------
// Function: H5Object default constructor (protected)
// Programmer Binh-Minh Ribler - 2000
@ -56,8 +70,9 @@ H5Object::H5Object() : H5Location() {}
// been moved to the sub-classes. It will be removed in 1.10 release. If its
// removal does not raise any problems in 1.10, it will be removed from 1.8 in
// subsequent releases.
// Removed in 1.10.1 - Aug 2016
//--------------------------------------------------------------------------
H5Object::H5Object(const hid_t object_id) : H5Location() {}
//H5Object::H5Object(const hid_t object_id) : H5Location() {}
//--------------------------------------------------------------------------
// Function: H5Object copy constructor
@ -72,6 +87,264 @@ H5Object::H5Object(const hid_t object_id) : H5Location() {}
//--------------------------------------------------------------------------
// H5Object::H5Object(const H5Object& original) : H5Location() {}
//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
///\brief Creates an attribute for a group, dataset, or named datatype.
///\param name - IN: Name of the attribute
///\param data_type - IN: Datatype for the attribute
///\param data_space - IN: Dataspace for the attribute - only simple
/// dataspaces are allowed at this time
///\param create_plist - IN: Creation property list - default to
/// PropList::DEFAULT
///\return Attribute instance
///\exception H5::AttributeIException
///\par Description
/// The attribute name specified in \a name must be unique.
/// Attempting to create an attribute with the same name as an
/// existing attribute will raise an exception, leaving the
/// pre-existing attribute intact. To overwrite an existing
/// attribute with a new attribute of the same name, first
/// delete the existing one with \c H5Object::removeAttr, then
/// recreate it with this function.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::createAttribute( const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
hid_t type_id = data_type.getId();
hid_t space_id = data_space.getId();
hid_t plist_id = create_plist.getId();
hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT );
// If the attribute id is valid, create and return the Attribute object
if( attr_id > 0 )
{
Attribute attr;
f_Attribute_setId(&attr, attr_id);
return( attr );
}
else
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
}
//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::createAttribute( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
return( createAttribute( name.c_str(), data_type, data_space, create_plist ));
}
//--------------------------------------------------------------------------
// Function: H5Object::openAttribute
///\brief Opens an attribute given its name.
///\param name - IN: Name of the attribute
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const char* name ) const
{
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
if( attr_id > 0 )
{
Attribute attr;
f_Attribute_setId(&attr, attr_id);
return( attr );
}
else
{
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Object::openAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const H5std_string& name ) const
{
return( openAttribute( name.c_str()) );
}
//--------------------------------------------------------------------------
// Function: H5Object::openAttribute
///\brief Opens an attribute given its index.
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const unsigned int idx ) const
{
hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
H5_ITER_INC, static_cast<hsize_t>(idx), H5P_DEFAULT, H5P_DEFAULT);
if( attr_id > 0 )
{
Attribute attr;
f_Attribute_setId(&attr, attr_id);
return(attr);
}
else
{
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Object::iterateAttrs
///\brief Iterates a user's function over all the attributes of an H5
/// object, which may be a group, dataset or named datatype.
///\param user_op - IN: User's function to operate on each attribute
///\param _idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
///\param op_data - IN: User's data to pass to user's operator function
///\return Returned value of the last operator if it was non-zero, or
/// zero if all attributes were processed
///\exception H5::AttributeIException
///\par Description
/// The signature of user_op is
/// void (*)(H5::H5Location&, H5std_string, void*).
/// For information, please refer to the C layer Reference Manual
/// at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Iterate
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
{
// store the user's function and data
UserData4Aiterate* userData = new UserData4Aiterate;
userData->opData = op_data;
userData->op = user_op;
userData->location = this;
// call the C library routine H5Aiterate2 to iterate the attributes
hsize_t idx = _idx ? static_cast<hsize_t>(*_idx) : 0;
int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
userAttrOpWrpr, reinterpret_cast<void *>(userData));
// release memory
delete userData;
if( ret_value >= 0 ) {
/* Pass back update index value to calling code */
if (_idx)
*_idx = static_cast<unsigned>(idx);
return( ret_value );
}
else // raise exception when H5Aiterate returns a negative value
throw AttributeIException(inMemFunc("iterateAttrs"), "H5Aiterate2 failed");
}
//--------------------------------------------------------------------------
// Function: H5Object::getNumAttrs
///\brief Returns the number of attributes attached to this HDF5 object.
///\return Number of attributes
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Object::getNumAttrs() const
{
H5O_info_t oinfo; /* Object info */
if(H5Oget_info(getId(), &oinfo) < 0)
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
else
return(static_cast<int>(oinfo.num_attrs));
}
//--------------------------------------------------------------------------
// Function: H5Object::attrExists
///\brief Checks whether the named attribute exists at this location.
///\param name - IN: Name of the attribute to be queried
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2013
//--------------------------------------------------------------------------
bool H5Object::attrExists(const char* name) const
{
// Call C routine H5Aexists to determine whether an attribute exists
// at this location, which could be specified by a file, group, dataset,
// or named datatype.
herr_t ret_value = H5Aexists(getId(), name);
if( ret_value > 0 )
return true;
else if(ret_value == 0)
return false;
else // Raise exception when H5Aexists returns a negative value
throw AttributeIException(inMemFunc("attrExists"), "H5Aexists failed");
}
//--------------------------------------------------------------------------
// Function: H5Object::attrExists
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool H5Object::attrExists(const H5std_string& name) const
{
return(attrExists(name.c_str()));
}
//--------------------------------------------------------------------------
// Function: H5Object::removeAttr
///\brief Removes the named attribute from this object.
///\param name - IN: Name of the attribute to be removed
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Object::removeAttr( const char* name ) const
{
herr_t ret_value = H5Adelete(getId(), name);
if( ret_value < 0 )
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
}
//--------------------------------------------------------------------------
// Function: H5Object::removeAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Object::removeAttr( const H5std_string& name ) const
{
removeAttr( name.c_str() );
}
//--------------------------------------------------------------------------
// Function: H5Object::renameAttr
///\brief Renames the named attribute from this object.
///\param oldname - IN: Name of the attribute to be renamed
///\param newname - IN: New name ame of the attribute
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void H5Object::renameAttr(const char* oldname, const char* newname) const
{
herr_t ret_value = H5Arename(getId(), oldname, newname);
if (ret_value < 0)
throw AttributeIException(inMemFunc("renameAttr"), "H5Arename failed");
}
//--------------------------------------------------------------------------
// Function: H5Object::renameAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for the names.
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
{
renameAttr (oldname.c_str(), newname.c_str());
}
//--------------------------------------------------------------------------
// Function: getObjName
///\brief Given an id, returns the type of the object.
@ -183,6 +456,7 @@ ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const
return(name_size);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Object destructor
///\brief Noop destructor.

View File

@ -17,8 +17,8 @@
#ifndef __H5Object_H
#define __H5Object_H
#include "H5Location.h"
#include "H5Classes.h" // constains forward class declarations
//#include "H5Location.h"
//#include "H5Classes.h" // constains forward class declarations
// H5Object is a baseclass. It has these subclasses:
// Group, DataSet, and DataType.
@ -38,6 +38,21 @@
namespace H5 {
#endif
class H5_DLLCPP H5Object;
// Define the operator function pointer for H5Aiterate().
typedef void (*attr_operator_t)( H5Object& loc/*in*/,
const H5std_string attr_name/*in*/,
void *operator_data/*in,out*/);
// User data for attribute iteration
class UserData4Aiterate {
public:
attr_operator_t op;
void* opData;
H5Object* location;
};
/*! \class H5Object
\brief Class H5Object is a bridge between H5Location and DataSet, DataType,
and Group.
@ -46,16 +61,52 @@ namespace H5 {
*/
class H5_DLLCPP H5Object : public H5Location {
public:
// Rearranging classes (HDFFV-9920) moved H5A wrappers back into H5Object.
// That way, C functions that takes attribute id can be in
// H5Location and those that cannot take attribute id can be in H5Object.
// Creates an attribute for the specified object
// PropList is currently not used, so always be default.
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
// Given its name, opens the attribute that belongs to an object at
// this location.
Attribute openAttribute( const char* name ) const;
Attribute openAttribute( const H5std_string& name ) const;
// Given its index, opens the attribute that belongs to an object at
// this location.
Attribute openAttribute( const unsigned int idx ) const;
// Iterate user's function over the attributes of this object.
int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL);
// Determines the number of attributes belong to this object.
int getNumAttrs() const;
// Checks whether the named attribute exists for this object.
bool attrExists(const char* name) const;
bool attrExists(const H5std_string& name) const;
// Renames the named attribute to a new name.
void renameAttr(const char* oldname, const char* newname) const;
void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
// Removes the named attribute from this object.
void removeAttr(const char* name) const;
void removeAttr(const H5std_string& name) const;
// Returns an identifier.
virtual hid_t getId() const = 0;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Gets the name of this HDF5 object, i.e., Group, DataSet, or
// DataType.
// DataType. These should have const but are retiring anyway.
ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
H5std_string getObjName() const;
// Noop destructor.
virtual ~H5Object();
protected:
// Default constructor
H5Object();
@ -73,6 +124,13 @@ class H5_DLLCPP H5Object : public H5Location {
// Copy constructor: makes copy of an H5Object object.
// H5Object(const H5Object& original);
// Sets the identifier of this object to a new value. - this one
// doesn't increment reference count
virtual void p_setId(const hid_t new_id) = 0;
// Noop destructor.
virtual ~H5Object();
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; /* end class H5Object */

View File

@ -19,6 +19,7 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
#include "H5AtomType.h"

View File

@ -19,10 +19,10 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AtomType.h"
#include "H5AbstractDs.h"

View File

@ -19,10 +19,10 @@
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5VarLenType.h"

View File

@ -48,11 +48,4 @@ set_target_properties (cpp_testhdf5 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
add_custom_command (
TARGET cpp_testhdf5
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5 ${PROJECT_BINARY_DIR}/th5s.h5
)
include (CMakeTests.cmake)

View File

@ -1,3 +1,5 @@
HDFTEST_COPY_FILE("${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5" "${PROJECT_BINARY_DIR}/th5s.h5" "cpp_testhdf5_files")
add_custom_target(cpp_testhdf5_files ALL COMMENT "Copying files needed by cpp_testhdf5 tests" DEPENDS ${cpp_testhdf5_files_list})
##############################################################################
##############################################################################
@ -8,7 +10,7 @@
add_test (
NAME CPP_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
-E remove
tattr_basic.h5
tattr_compound.h5
tattr_dtype.h5
@ -30,17 +32,18 @@ if (HDF5_TEST_VFD)
multi
family
)
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
add_test (
NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
-E remove
tattr_basic.h5
tattr_compound.h5
tattr_dtype.h5
@ -49,21 +52,21 @@ if (HDF5_TEST_VFD)
tfattrs.h5
)
add_test (
NAME CPP_VFD-${vfdname}-cpp_testhdf5
NAME CPP_VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=cpp_testhdf5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects)
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT 30)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
# Run test with different Virtual File Driver
foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)

View File

@ -89,7 +89,7 @@ template <class Type1, class Type2>
{
cerr << endl;
cerr << "*** UNEXPECTED VALUE: " << file_name << ":line " << line
<< ":" << msg << " different: " << x << ", should be " << value
<< ": " << msg << " different: " << x << ", should be " << value
<< endl;
IncTestNumErrs();
throw TestFailedException(file_name, msg);
@ -127,6 +127,19 @@ template <class Type1, class Type2>
}
}
template <class Type1, class Type2>
void verify_val(Type1 x, Type2 value, float epsilon, const char* msg, int line, const char* file_name)
{
if (x == value)
{
cerr << endl;
cerr << "*** UNEXPECTED FLOAT VALUE: " << file_name << ":line " << line
<< ": " << msg << " different: " << x << ", should be " << value
<< " (epsilon=" << epsilon << ")" << endl;
IncTestNumErrs();
throw TestFailedException(file_name, msg);
}
}
/* Prototypes for the test routines */
#ifdef __cplusplus

View File

@ -830,6 +830,9 @@ static void test_attr_scalar_write()
** test_attr_scalar_read(): Test scalar attribute reading functionality.
**
****************************************************************/
/* Epsilon for floating-point comparisons */
#define FP_EPSILON 0.000001F
static void test_attr_scalar_read()
{
// Output message about test being performed
@ -852,7 +855,8 @@ static void test_attr_scalar_read()
// Read attribute information
float read_data2=0.0; // Buffer for reading 1st attribute
ds_attr.read(PredType::NATIVE_FLOAT,&read_data2);
verify_val(read_data2, attr_data5, "Attribute::read", __LINE__, __FILE__);
if (HDfabs(read_data2 - attr_data5) > FP_EPSILON)
verify_val(read_data2, attr_data5, FP_EPSILON, "Attribute::read", __LINE__, __FILE__);
// Get the dataspace of the attribute
DataSpace att_space = ds_attr.getSpace();
@ -1714,7 +1718,7 @@ static void test_attr_corder_create_basic(FileCreatPropList& fcpl,
// Get creation order indexing on object
unsigned crt_order_flags = 0;
crt_order_flags = dcpl.getAttrCrtOrder();
verify_val(crt_order_flags, 0, "DSetCreatPropList::getAttrCrtOrder",__LINE__,__FILE__);
verify_val(crt_order_flags, (unsigned)0, "DSetCreatPropList::getAttrCrtOrder",__LINE__,__FILE__);
// Setting invalid combination of a attribute order creation order
// indexing on should fail
@ -1731,7 +1735,7 @@ static void test_attr_corder_create_basic(FileCreatPropList& fcpl,
// verify them
dcpl.setAttrCrtOrder(H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED);
crt_order_flags = dcpl.getAttrCrtOrder();
verify_val(crt_order_flags, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED), "DSetCreatPropList::getAttrCrtOrder",__LINE__,__FILE__);
verify_val(crt_order_flags, (unsigned)(H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED), "DSetCreatPropList::getAttrCrtOrder",__LINE__,__FILE__);
// Create dataspace for dataset
DataSpace ds_space(H5S_SCALAR);
@ -1766,7 +1770,7 @@ static void test_attr_corder_create_basic(FileCreatPropList& fcpl,
// Query the attribute creation properties
crt_order_flags = dcpl.getAttrCrtOrder();
verify_val(crt_order_flags, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED), "DSetCreatPropList::getAttrCrtOrder",__LINE__,__FILE__);
verify_val(crt_order_flags, (unsigned)(H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED), "DSetCreatPropList::getAttrCrtOrder",__LINE__,__FILE__);
PASSED();
} // end try block

View File

@ -132,6 +132,9 @@ Comment out tests that are not done yet */
if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP"))
TestCleanup();
/* Release test infrastructure */
TestShutdown();
return (GetTestNumErrs());
}

View File

@ -515,8 +515,6 @@ static void test_file_name()
} // test_file_name()
#define NUM_OBJS 4
#define NUM_ATTRS 3
const int RANK1 = 1;
const int ATTR1_DIM1 = 3;
const H5std_string FILE5("tfattrs.h5");
@ -741,6 +739,70 @@ static void test_libver_bounds()
PASSED();
} /* end test_libver_bounds() */
/*-------------------------------------------------------------------------
* Function: test_commonfg
*
* Purpose: Verify that a file created and modified with the
* specified libver bounds has the specified object header
* versions for the right objects.
*
* Return: None
*
* Programmer: Binh-Minh Ribler (use C version)
* March, 2015
*
*-------------------------------------------------------------------------
*/
static void test_commonfg()
{
// Output message about test being performed
SUBTEST("Root group");
try {
// Create a file using default properties.
H5File file4(FILE4, H5F_ACC_TRUNC);
// Try opening the root group.
Group rootgroup(file4.openGroup(ROOTGROUP));
// Create a group in the root group.
Group group(rootgroup.createGroup(GROUPNAME, 0));
// Create the data space.
hsize_t dims[RANK] = {NX, NY};
DataSpace space(RANK, dims);
// Create a new dataset.
DataSet dataset(group.createDataSet (DSETNAME, PredType::NATIVE_INT, space));
// Get and verify file name via a dataset.
H5std_string file_name = dataset.getFileName();
verify_val(file_name, FILE4, "DataSet::getFileName", __LINE__, __FILE__);
// Create an attribute for the dataset.
Attribute attr(dataset.createAttribute(DATTRNAME, PredType::NATIVE_INT, space));
// Get and verify file name via an attribute.
file_name = attr.getFileName();
verify_val(file_name, FILE4, "Attribute::getFileName", __LINE__, __FILE__);
// Create an attribute for the file via root group.
Attribute rootg_attr(rootgroup.createAttribute(FATTRNAME, PredType::NATIVE_INT, space));
// Get and verify file name via an attribute.
file_name = attr.getFileName();
verify_val(file_name, FILE4, "Attribute::getFileName", __LINE__, __FILE__);
PASSED();
} // end of try block
catch (Exception& E)
{
issue_fail_msg("test_commonfg()", __LINE__, __FILE__, E.getCDetailMsg());
}
} /* end test_commonfg() */
/*-------------------------------------------------------------------------
* Function: test_file
*
@ -769,6 +831,7 @@ void test_file()
test_file_name(); // Test getting file's name
test_file_attribute(); // Test file attribute feature
test_libver_bounds(); // Test format version
test_commonfg();
} // test_file()
@ -793,7 +856,7 @@ void cleanup_file()
HDremove(FILE1.c_str());
HDremove(FILE2.c_str());
HDremove(FILE3.c_str());
HDremove(FILE4.c_str());
// HDremove(FILE4.c_str());
HDremove(FILE5.c_str());
HDremove(FILE6.c_str());
} // cleanup_file

View File

@ -199,9 +199,21 @@
/* Define to 1 if you have the `z' library (-lz). */
#cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@
/* Define to 1 if you have the `llround' function. */
#cmakedefine H5_HAVE_LLROUND @H5_HAVE_LLROUND@
/* Define to 1 if you have the `llroundf' function. */
#cmakedefine H5_HAVE_LLROUNDF @H5_HAVE_LLROUNDF@
/* Define to 1 if you have the `longjmp' function. */
#cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@
/* Define to 1 if you have the `lround' function. */
#cmakedefine H5_HAVE_LROUND @H5_HAVE_LROUND@
/* Define to 1 if you have the `lroundf' function. */
#cmakedefine H5_HAVE_LROUNDF @H5_HAVE_LROUNDF@
/* Define to 1 if you have the `lseek64' function. */
#cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@
@ -241,6 +253,12 @@
/* Define to 1 if you have the `rand_r' function. */
#cmakedefine H5_HAVE_RAND_R @H5_HAVE_RAND_R@
/* Define to 1 if you have the `round' function. */
#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@
/* Define to 1 if you have the `roundf' function. */
#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@
/* Define to 1 if you have the `setjmp' function. */
#cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@

View File

@ -10,7 +10,7 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
# handle input parameters to script.
#INSTALLDIR - HDF5-1.8 root folder
#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
#STATIC_LIBRARIES - Default is YES
#FORTRAN_LIBRARIES - Default is NO
@ -29,8 +29,8 @@ endif()
if(NOT DEFINED INSTALLDIR)
set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
endif()
if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
set(CTEST_BUILD_CONFIGURATION "Release")
if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
set(CTEST_CONFIGURATION_TYPE "Release")
endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "HDF5Examples")
@ -143,7 +143,7 @@ if(NOT N EQUAL 0)
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
set (CTEST_CONFIGURE_COMMAND
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
#-----------------------------------------------------------------------------

View File

@ -19,7 +19,7 @@ ENABLE_LANGUAGE (Fortran)
# so this one is used.
#-----------------------------------------------------------------------------
MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN)
# MSB CHECK WHY THIS CHECK?
#
# if (NOT DEFINED ${RUN_RESULT_VAR})
message (STATUS "Detecting Fortran ${FUNCTION}")
if (CMAKE_REQUIRED_LIBRARIES)
@ -39,8 +39,6 @@ MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN)
RUN_OUTPUT_VARIABLE OUTPUT
)
set(${RETURN} ${OUTPUT})
#message ( "Test result1 ${RETURN} ")
@ -70,17 +68,22 @@ MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN)
# endif (NOT DEFINED ${RUN_RESULT_VAR})
ENDMACRO (FORTRAN_RUN)
# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END"
MACRO (READ_SOURCE START END RETURN)
file(READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" CODE)
string(REGEX MATCH "${START}[\\\t\\\n\\\r[].+]*${END}" CODE ${CODE})
set(RETURN "${CODE}")
ENDMACRO (READ_SOURCE START END RETURN)
#-----------------------------------------------------------------------------
# Check to see C_LONG_DOUBLE is available
READ_SOURCE("PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" "END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" CODE)
CHECK_FORTRAN_FEATURE(c_long_double
"
PROGRAM main
USE ISO_C_BINDING
REAL(KIND=C_LONG_DOUBLE) :: d
END PROGRAM
"
"${CODE}"
FORTRAN_HAVE_C_LONG_DOUBLE
)
if (${FORTRAN_HAVE_C_LONG_DOUBLE})
set(FORTRAN_HAVE_C_LONG_DOUBLE 1)
else ()
@ -89,31 +92,9 @@ endif()
# Check to see C_LONG_DOUBLE is different from C_DOUBLE
READ_SOURCE("MODULE type_mod" "END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE" CODE)
CHECK_FORTRAN_FEATURE(c_long_double
"
MODULE type_mod
USE ISO_C_BINDING
INTERFACE h5t
MODULE PROCEDURE h5t_c_double
MODULE PROCEDURE h5t_c_long_double
END INTERFACE
CONTAINS
SUBROUTINE h5t_c_double(r)
REAL(KIND=C_DOUBLE) :: r
END SUBROUTINE h5t_c_double
SUBROUTINE h5t_c_long_double(d)
REAL(KIND=C_LONG_DOUBLE) :: d
END SUBROUTINE h5t_c_long_double
END MODULE type_mod
PROGRAM main
USE ISO_C_BINDING
USE type_mod
REAL(KIND=C_DOUBLE) :: r
REAL(KIND=C_LONG_DOUBLE) :: d
CALL h5t(r)
CALL h5t(d)
END PROGRAM main
"
"${CODE}"
FORTRAN_C_LONG_DOUBLE_IS_UNIQUE
)
if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE})
@ -139,66 +120,9 @@ endif(FORTRAN_HAVE_STORAGE_SIZE)
# Determine the available KINDs for REALs and INTEGERs
#-----------------------------------------------------------------------------
READ_SOURCE("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" CODE)
FORTRAN_RUN("REAL and INTEGER KINDs"
"
PROGRAM main
IMPLICIT NONE
INTEGER :: ik, jk, k, max_decimal_prec
INTEGER :: num_rkinds = 1, num_ikinds = 1
INTEGER, DIMENSION(1:10) :: list_ikinds = -1
INTEGER, DIMENSION(1:10) :: list_rkinds = -1
! Find integer KINDs
list_ikinds(num_ikinds)=SELECTED_INT_KIND(1)
DO ik = 2, 36
k = SELECTED_INT_KIND(ik)
IF(k.LT.0) EXIT
IF(k.GT.list_ikinds(num_ikinds))THEN
num_ikinds = num_ikinds + 1
list_ikinds(num_ikinds) = k
ENDIF
ENDDO
DO k = 1, num_ikinds
WRITE(*,'(I0)', ADVANCE='NO') list_ikinds(k)
IF(k.NE.num_ikinds)THEN
WRITE(*,'(A)',ADVANCE='NO') ','
ELSE
WRITE(*,'()')
ENDIF
ENDDO
! Find real KINDs
list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1)
max_decimal_prec = 1
prec: DO ik = 2, 36
exp: DO jk = 1, 17000
k = SELECTED_REAL_KIND(ik,jk)
IF(k.LT.0) EXIT exp
IF(k.GT.list_rkinds(num_rkinds))THEN
num_rkinds = num_rkinds + 1
list_rkinds(num_rkinds) = k
ENDIF
max_decimal_prec = ik
ENDDO exp
ENDDO prec
DO k = 1, num_rkinds
WRITE(*,'(I0)', ADVANCE='NO') list_rkinds(k)
IF(k.NE.num_rkinds)THEN
WRITE(*,'(A)',ADVANCE='NO') ','
ELSE
WRITE(*,'()')
ENDIF
ENDDO
WRITE(*,'(I0)') max_decimal_prec
WRITE(*,'(I0)') num_ikinds
WRITE(*,'(I0)') num_rkinds
END PROGRAM main
"
"${CODE}"
XX
YY
PROG_OUTPUT
@ -210,6 +134,7 @@ FORTRAN_RUN("REAL and INTEGER KINDs"
# dnl -- LINE 4 -- number of valid integer kinds
# dnl -- LINE 5 -- number of valid real kinds
file(READ "${CMAKE_BINARY_DIR}/pac_fconftest.out" PROG_OUTPUT)
# Convert the string to a list of strings by replacing the carriage return with a semicolon
string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}")

View File

@ -10,7 +10,7 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
# handle input parameters to script.
#INSTALLDIR - HDF5 root folder
#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
#STATIC_LIBRARIES - Default is YES
#FORTRAN_LIBRARIES - Default is NO
@ -30,8 +30,8 @@ endif()
if(NOT DEFINED INSTALLDIR)
set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
endif()
if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
set(CTEST_BUILD_CONFIGURATION "Release")
if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
set(CTEST_CONFIGURATION_TYPE "Release")
endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "HDF5Examples")
@ -154,7 +154,7 @@ if(NOT N EQUAL 0)
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
set (CTEST_CONFIGURE_COMMAND
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
#-----------------------------------------------------------------------------

View File

@ -40,7 +40,7 @@ To test the installation with the examples;
The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
It can be changed with the INSTALLDIR script option.
The default ctest configuration is defined as "Release". It can be changed
with the CTEST_BUILD_CONFIGURATION script option. Note that this must
with the CTEST_CONFIGURATION_TYPE script option. Note that this must
be the same as the value used with the -C command line option.
The default build configuration is defined to build and use static libraries.
Shared libraries can be used with the STATICLIBRARIES script option set to "NO".

View File

@ -22,7 +22,7 @@ set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
set (ALLOW_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
@ -56,7 +56,7 @@ set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libr
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT SVN TGZ)" FORCE)
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)

View File

@ -34,7 +34,7 @@ set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
set (ALLOW_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
@ -75,7 +75,7 @@ set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FO
set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
set (CTEST_BUILD_CONFIGURATION "Debug" CACHE STRING "Build Debug" FORCE)
set (CTEST_CONFIGURATION_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)

View File

@ -208,14 +208,14 @@ else(USE_AUTOTOOLS)
if(LOCAL_MEMCHECK_TEST)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set (CTEST_CONFIGURE_COMMAND
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
else()
if(LOCAL_COVERAGE_TEST)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
endif()
set (CTEST_CONFIGURE_COMMAND
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
endif()
endif()
@ -231,7 +231,7 @@ foreach(v
CTEST_SOURCE_DIRECTORY
CTEST_BINARY_DIRECTORY
CTEST_CMAKE_GENERATOR
CTEST_BUILD_CONFIGURATION
CTEST_CONFIGURATION_TYPE
CTEST_GIT_COMMAND
CTEST_CHECKOUT_COMMAND
CTEST_CONFIGURE_COMMAND
@ -294,7 +294,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n")
##-----------------------------------------------
## Package the product
##-----------------------------------------------
execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
execute_process(COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
RESULT_VARIABLE cpackResult
OUTPUT_VARIABLE cpackLog

View File

@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# VS201264 * Visual Studio 11 2012 Win64
#
# INSTALLDIR - root folder where hdf5 is installed
# CTEST_BUILD_CONFIGURATION - Release, Debug, etc
# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
# CTEST_SOURCE_NAME - source folder
# STATIC_LIBRARIES - Build/use static libraries
# FORTRAN_LIBRARIES - Build/use fortran libraries
@ -34,7 +34,7 @@ set(CTEST_SOURCE_VERSEXT "")
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF5-1.10.0 root folder
#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.0
#STATIC_LIBRARIES - Default is YES
#FORTRAN_LIBRARIES - Default is NO
@ -82,8 +82,8 @@ if(NOT DEFINED INSTALLDIR)
set(INSTALLDIR "/usr/local/myhdf5")
endif()
endif()
if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
set(CTEST_BUILD_CONFIGURATION "Release")
if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
set(CTEST_CONFIGURATION_TYPE "Release")
endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")

View File

@ -484,6 +484,13 @@ if (NOT WINDOWS)
endif (NOT CYGWIN AND NOT MINGW)
CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ)
CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGETD)
# ----------------------------------------------------------------------
# cygwin user credentials are different then on linux
#
if (NOT CYGWIN AND NOT MINGW)
CHECK_FUNCTION_EXISTS (getpwuid ${HDF_PREFIX}_HAVE_GETPWUID)
endif (NOT CYGWIN AND NOT MINGW)
endif (NOT WINDOWS)
#-----------------------------------------------------------------------------
@ -497,12 +504,17 @@ CHECK_FUNCTION_EXISTS (frexpf ${HDF_PREFIX}_HAVE_FREXPF)
CHECK_FUNCTION_EXISTS (frexpl ${HDF_PREFIX}_HAVE_FREXPL)
CHECK_FUNCTION_EXISTS (gethostname ${HDF_PREFIX}_HAVE_GETHOSTNAME)
CHECK_FUNCTION_EXISTS (getpwuid ${HDF_PREFIX}_HAVE_GETPWUID)
CHECK_FUNCTION_EXISTS (getrusage ${HDF_PREFIX}_HAVE_GETRUSAGE)
CHECK_FUNCTION_EXISTS (llround ${HDF_PREFIX}_HAVE_LLROUND)
CHECK_FUNCTION_EXISTS (llroundf ${HDF_PREFIX}_HAVE_LLROUNDF)
CHECK_FUNCTION_EXISTS (lround ${HDF_PREFIX}_HAVE_LROUND)
CHECK_FUNCTION_EXISTS (lroundf ${HDF_PREFIX}_HAVE_LROUNDF)
CHECK_FUNCTION_EXISTS (lstat ${HDF_PREFIX}_HAVE_LSTAT)
CHECK_FUNCTION_EXISTS (rand_r ${HDF_PREFIX}_HAVE_RAND_R)
CHECK_FUNCTION_EXISTS (random ${HDF_PREFIX}_HAVE_RANDOM)
CHECK_FUNCTION_EXISTS (round ${HDF_PREFIX}_HAVE_ROUND)
CHECK_FUNCTION_EXISTS (roundf ${HDF_PREFIX}_HAVE_ROUNDF)
CHECK_FUNCTION_EXISTS (setsysinfo ${HDF_PREFIX}_HAVE_SETSYSINFO)
CHECK_FUNCTION_EXISTS (signal ${HDF_PREFIX}_HAVE_SIGNAL)
@ -554,7 +566,6 @@ if (NOT WINDOWS)
HAVE_C99_DESIGNATED_INITIALIZER
SYSTEM_SCOPE_THREADS
HAVE_SOCKLEN_T
CXX_HAVE_OFFSETOF
)
HDF_FUNCTION_TEST (${test})
endforeach (test)
@ -618,6 +629,7 @@ if (CMAKE_CXX_COMPILER_LOADED)
${HDF_PREFIX}_NO_STD
BOOL_NOTDEFINED
NO_STATIC_CAST
CXX_HAVE_OFFSETOF
)
HDF_CXX_FUNCTION_TEST (${test})
endforeach (test)

View File

@ -54,3 +54,38 @@ int main(void) {
}
#endif
#ifdef CXX_HAVE_OFFSETOF
#include <stdio.h>
#include <stddef.h>
#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 ()
{
struct index_st
{
unsigned char type;
unsigned char num;
unsigned int len;
};
typedef struct index_st index_t;
int x,y;
x = offsetof(struct index_st, len);
y = offsetof(index_t, num)
;
return 0;
}
#endif

View File

@ -279,3 +279,13 @@ macro (HDF_README_PROPERTIES target_fortran)
${CMAKE_BINARY_DIR}/README.txt @ONLY
)
endmacro (HDF_README_PROPERTIES)
macro (HDFTEST_COPY_FILE src dest target)
add_custom_command(
OUTPUT "${dest}"
COMMAND "${CMAKE_COMMAND}"
ARGS -E copy_if_different "${src}" "${dest}"
DEPENDS "${src}"
)
list (APPEND ${target}_list "${dest}")
endmacro ()

View File

@ -389,55 +389,20 @@ int main(void)
}
#endif
#ifdef CXX_HAVE_OFFSETOF
#include <stdio.h>
#include <stddef.h>
#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 ()
{
struct index_st
{
unsigned char type;
unsigned char num;
unsigned int len;
};
typedef struct index_st index_t;
int x,y;
x = offsetof(struct index_st, len);
y = offsetof(index_t, num)
;
return 0;
}
#endif
#ifdef HAVE_IOEO
#include <windows.h>
typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
int main ()
{
PGNSI pGNSI;
pGNSI = (PGNSI) GetProcAddress(
GetModuleHandle(TEXT("kernel32.dll")),
PGNSI pGNSI;
pGNSI = (PGNSI) GetProcAddress(
GetModuleHandle(TEXT("kernel32.dll")),
"InitOnceExecuteOnce");
if(NULL == pGNSI)
return 1;
else
return 0;
if(NULL == pGNSI)
return 1;
else
return 0;
}
#endif /* HAVE_IOEO */

View File

@ -1,4 +1,4 @@
# -*- shell-script -*-
# -*- shell-script -*-
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@ -20,12 +20,5 @@
#
# See BlankForm in this directory for details.
# The default compiler is `gcc'.
if test "X-" = "X-$CC"; then
CC=gcc
CC_BASENAME=gcc
LD=ld
fi
# Figure out compiler flags
. $srcdir/config/gnu-flags
# Use the linux-gnulibc1 file.
. $srcdir/config/linux-gnulibc1

View File

@ -1,137 +0,0 @@
# -*- shell-script -*-
#
# 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.
# This file is part of the HDF5 build script. It is processed shortly
# after configure starts and defines, among other things, flags for
# the various compile modes.
#
# See BlankForm in this directory for details.
# The default compiler is `gcc'.
if test -z "$CC"; then
CC=gcc
CC_BASENAME=gcc
fi
# Figure out GNU C compiler flags
. $srcdir/config/gnu-flags
# Figure out PGI C compiler flags
. $srcdir/config/pgi-flags
# Figure out Intel C compiler flags
. $srcdir/config/intel-flags
# The default Fortran 90 compiler
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
gcc*)
FC=gfortran
FCLIBS=-lgcc
FC_BASENAME=gfortran
;;
pgcc*)
FC=pgf90
FC_BASENAME=pgf90
;;
icc*)
FC=ifort
FC_BASENAME=ifort
;;
mpicc*)
FC=mpif90
FC_BASENAME=mpif90
;;
esac
else
case $FC in
# The PGI and Intel compilers are automatically detected below
ifc*|ifort*|pgf90*)
;;
gfortran)
FCLIBS=-lgcc
;;
g95)
FCLIBS=-lgcc
;;
*)
# Figure out which compiler we are using: pgf90 or Absoft f95
RM='rm -f'
tmpfile=/tmp/cmpver.$$
$FC -V >$tmpfile
if test -s "$tmpfile"; then
if( grep -s 'Absoft' $tmpfile > /dev/null) then
FC_BASENAME=f95
fi
if( grep -s 'pgf90' $tmpfile > /dev/null) then
FC_BASENAME=pgf90
fi
fi
$RM $tmpfile
;;
esac
fi
# Figure out PGI F90 compiler flags
. $srcdir/config/pgi-fflags
# Figure out Intel F90 compiler flags
. $srcdir/config/intel-fflags
case $FC_BASENAME in
#
# Absoft compiler
#
f95)
# Set required flag for compiling C stubs
H5_CFLAGS="$H5_CFLAGS -DH5_ABSOFT"
F9XSUFFIXFLAG=""
# We force compiler to use upper case for external names
# (just in case since this should be a default EIP)
H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS"
FSEARCH_DIRS=""
# Production
PROD_FCFLAGS=
# Debug
DEBUG_FCFLAGS=
# Symbols
SYMBOLS_FCFLAGS="-g"
NO_SYMBOLS_FCFLAGS="-s"
# Profiling
PROFILE_FCFLAGS="-pg"
# Optimization
HIGH_OPT_FCFLAGS="-O"
DEBUG_OPT_FCFLAGS=
NO_OPT_FCFLAGS=
f9x_flags_set=yes
;;
esac
# The default C++ compiler
# The default compiler is `g++'.
if test -z "$CXX"; then
CXX=g++
CXX_BASENAME=g++
fi

View File

@ -1,138 +0,0 @@
# -*- shell-script -*-
#
# 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.
# This file is part of the HDF5 build script. It is processed shortly
# after configure starts and defines, among other things, flags for
# the various compile modes.
#
# See BlankForm in this directory for details.
# The default compiler is `gcc'.
if test -z "$CC"; then
CC=gcc
CC_BASENAME=gcc
fi
# Figure out GNU C compiler flags
. $srcdir/config/gnu-flags
# Figure out PGI C compiler flags
. $srcdir/config/pgi-flags
# Figure out Intel C compiler flags
. $srcdir/config/intel-flags
# The default Fortran 90 compiler
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
gcc*)
FC=gfortran
FCLIBS=-lgcc
FC_BASENAME=gfortran
;;
pgcc*)
FC=pgf90
FC_BASENAME=pgf90
;;
icc*)
FC=ifort
FC_BASENAME=ifort
;;
mpicc*)
FC=mpif90
FC_BASENAME=mpif90
;;
esac
else
case $FC in
# The PGI and Intel compilers are automatically detected below
ifc*|ifort*|pgf90*)
;;
gfortran)
FCLIBS=-lgcc
;;
g95)
FCLIBS=-lgcc
;;
*)
# Figure out which compiler we are using: pgf90 or Absoft f95
RM='rm -f'
tmpfile=/tmp/cmpver.$$
$FC -V >$tmpfile
if test -s "$tmpfile"; then
if( grep -s 'Absoft' $tmpfile > /dev/null) then
FC_BASENAME=f95
fi
if( grep -s 'pgf90' $tmpfile > /dev/null) then
FC_BASENAME=pgf90
fi
fi
$RM $tmpfile
;;
esac
fi
# Figure out PGI F90 compiler flags
. $srcdir/config/pgi-fflags
# Figure out Intel F90 compiler flags
. $srcdir/config/intel-fflags
case $FC_BASENAME in
#
# Absoft compiler
#
f95)
# Set required flag for compiling C stubs
H5_CFLAGS="$H5_CFLAGS -DH5_ABSOFT"
F9XSUFFIXFLAG=""
# We force compiler to use upper case for external names
# (just in case since this should be a default EIP)
H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS"
FSEARCH_DIRS=""
# Production
PROD_FCFLAGS=
# Debug
DEBUG_FCFLAGS=
# Symbols
SYMBOLS_FCFLAGS="-g"
NO_SYMBOLS_FCFLAGS="-s"
# Profiling
PROFILE_FCFLAGS="-pg"
# Optimization
HIGH_OPT_FCFLAGS="-O"
DEBUG_OPT_FCFLAGS=
NO_OPT_FCFLAGS=
f9x_flags_set=yes
;;
esac
# The default C++ compiler
# The default compiler is `g++'.
if test -z "$CXX"; then
CXX=g++
CXX_BASENAME=g++
fi

View File

@ -281,6 +281,7 @@ while test -n "$hname"; do
test "$hname_tmp" = "$hname" && break
done
## ----------------------------------------------------------------------
## Determine build mode (debug, production, clean).
## This has to be done early since the build mode is referred to
@ -694,12 +695,14 @@ if test "X$HDF_CXX" = "Xyes"; then
## Checking if C++ can handle namespaces
PAC_PROG_CXX_NAMESPACE
## Checking if C++ has offsetof extension
PAC_PROG_CXX_OFFSETOF
## if C++ can handle static cast
PAC_PROG_CXX_STATIC_CAST
## Checking if C++ has offsetof extension,
## note: this test has to be the last of the C++ tests because it sets a definition
## which would be used in the other tests, causing them to fail.
PAC_PROG_CXX_OFFSETOF
else
AC_MSG_RESULT([no])
CXX="no"
@ -1798,7 +1801,7 @@ case "`uname`" in
CYGWIN*)
;;
*)
AC_CHECK_FUNCS([GetConsoleScreenBufferInfo])
AC_CHECK_FUNCS([GetConsoleScreenBufferInfo getpwuid])
;;
esac
AC_CHECK_FUNCS([_scrsize ioctl])
@ -1843,11 +1846,12 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
## so we'll search for it before calling AC_CHECK_FUNCS.
AC_SEARCH_LIBS([clock_gettime], [rt posix4])
AC_CHECK_FUNCS([alarm clock_gettime difftime fcntl flock fork frexpf])
AC_CHECK_FUNCS([frexpl gethostname getpwuid getrusage gettimeofday])
AC_CHECK_FUNCS([frexpl gethostname getrusage gettimeofday])
AC_CHECK_FUNCS([lstat rand_r random setsysinfo])
AC_CHECK_FUNCS([signal longjmp setjmp siglongjmp sigsetjmp sigprocmask])
AC_CHECK_FUNCS([snprintf srandom strdup symlink system])
AC_CHECK_FUNCS([tmpfile asprintf vasprintf vsnprintf waitpid])
AC_CHECK_FUNCS([roundf lroundf llroundf round lround llround])
## ----------------------------------------------------------------------
## Check compiler characteristics
@ -2793,63 +2797,18 @@ esac
##
AC_MSG_CHECKING([if using special algorithm to convert long double to (unsigned) long values])
## NOTE: Place all configure test programs into cmake's source file, then use a preprocessor directive
## to select the proper test program. This is done by echoing the #define and cat'ing the cmake
## source file. (HDFFV-9467)
TEST_SRC="`(echo \"#define H5_LDOUBLE_TO_LONG_SPECIAL_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
if test ${ac_cv_sizeof_long_double} = 0; then
hdf5_cv_ldouble_to_long_special=${hdf5_cv_ldouble_to_long_special=no}
else
AC_CACHE_VAL([hdf5_cv_ldouble_to_long_special],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM([
#include <string.h>
],[[
long double ld = 20041683600089727.779961L;
long ll;
unsigned long ull;
unsigned char s[16];
unsigned char s2[8];
int ret = 1;
if(sizeof(long double) == 16 && sizeof(long) == 8) {
/*make sure the long double type has 16 bytes in size and
* 11 bits of exponent. If it is,
*the bit sequence should be like below. It's not
*a decent way to check but this info isn't available. */
memcpy(s, &ld, 16);
if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
/* Assign the hexadecimal value of long double type. */
s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
memcpy(&ld, s, 16);
ll = (long)ld;
memcpy(s2, &ll, 8);
/* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82
* and gets wrong value 20041683600089730 on the IBM Power6 Linux.
* But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f
* and gets the correct value 20041683600089727. It uses some special
* algorithm. We're going to define the macro and skip the test until
* we can figure out how they do it. */
if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
ret = 0;
ull = (unsigned long)ld;
memcpy(s2, &ull, 8);
/* The unsigned long is the same as signed long. */
if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
ret = 0;
}
}
exit(ret);
]])]
[AC_LANG_SOURCE([$TEST_SRC])]
, [hdf5_cv_ldouble_to_long_special=yes], [hdf5_cv_ldouble_to_long_special=no],)])
fi
@ -2871,66 +2830,14 @@ fi
##
AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values])
TEST_SRC="`(echo \"#define H5_LONG_TO_LDOUBLE_SPECIAL_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
if test ${ac_cv_sizeof_long_double} = 0; then
hdf5_cv_long_to_ldouble_special=${hdf5_cv_long_to_ldouble_special=no}
else
AC_CACHE_VAL([hdf5_cv_long_to_ldouble_special],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM([
#include <string.h>
],[[
long double ld;
long ll;
unsigned long ull;
unsigned char s[16];
int flag=0, ret=1;
/*Determine if long double has 16 byte in size, 11 bit exponent, and
*the bias is 0x3ff */
if(sizeof(long double) == 16) {
ld = 1.0L;
memcpy(s, &ld, 16);
if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
flag = 1;
}
if(flag==1 && sizeof(long)==8) {
ll = 0x003fffffffffffffL;
ld = (long double)ll;
memcpy(s, &ld, 16);
/* The library converts the value to 0x434fffffffffffff8000000000000000.
* In decimal it is 18014398509481982.000000, one value short of the original.
* The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000.
* The value is correct in decimal. It uses some special
* algorithm. We're going to define the macro and skip the test until
* we can figure out how they do it. */
if(s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 &&
s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
ret = 0;
}
if(flag==1 && sizeof(unsigned long)==8) {
ull = 0xffffffffffffffffUL;
ld = (long double)ull;
memcpy(s, &ld, 16);
/* Use a different value from signed long to test. The problem is the same
* for both long and unsigned long. The value is 18446744073709551615.
* The library converts the value to 0x43effffffffffffffe000000000000000.
* In decimal it's 18446744073709548544.000000, very different from the original.
* The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000.
* The value is correct in decimal. It uses some special
* algorithm. We're going to define the macro and skip the test until
* we can figure out how they do it. */
if(s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
ret = 0;
}
exit(ret);
]])]
[AC_LANG_SOURCE([$TEST_SRC])]
, [hdf5_cv_long_to_ldouble_special=yes], [hdf5_cv_long_to_ldouble_special=no],)])
fi
@ -2955,48 +2862,14 @@ fi
##
AC_MSG_CHECKING([if correctly converting long double to (unsigned) long long values])
TEST_SRC="`(echo \"#define H5_LDOUBLE_TO_LLONG_ACCURATE_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
if test ${ac_cv_sizeof_long_double} = 0; then
hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no}
else
AC_CACHE_VAL([hdf5_cv_ldouble_to_llong_accurate],
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
int main(void)
{
long double ld = 20041683600089727.779961L;
long long ll;
unsigned long long ull;
unsigned char s[16];
int ret = 0;
if(sizeof(long double) == 16) {
/*make sure the long double type is the same as the failing type
*which has 16 bytes in size and 11 bits of exponent. If it is,
*the bit sequence should be like below. It's not
*a decent way to check but this info isn't available. */
memcpy(s, &ld, 16);
if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
/*slightly adjust the bit sequence (s[8]=0xdf). The converted
*values will go wild on Mac OS 10.4 and IRIX64 6.5.*/
s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
memcpy(&ld, s, 16);
ll = (long long)ld;
ull = (unsigned long long)ld;
if(ll != 20041683600089728 || ull != 20041683600089728)
ret = 1;
}
}
done:
exit(ret);
}
]])], [hdf5_cv_ldouble_to_llong_accurate=yes], [hdf5_cv_ldouble_to_llong_accurate=no],[])])
[AC_RUN_IFELSE([AC_LANG_SOURCE([$TEST_SRC])],
[hdf5_cv_ldouble_to_llong_accurate=yes], [hdf5_cv_ldouble_to_llong_accurate=no],[])])
fi
if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then
@ -3018,52 +2891,14 @@ fi
##
AC_MSG_CHECKING([if correctly converting (unsigned) long long to long double values])
TEST_SRC="`(echo \"#define H5_LLONG_TO_LDOUBLE_CORRECT_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
if test ${ac_cv_sizeof_long_double} = 0; then
hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no}
else
AC_CACHE_VAL([hdf5_cv_llong_to_ldouble_correct],
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
int main(void)
{
long double ld;
long long ll;
unsigned long long ull;
unsigned char s[16];
int flag=0, ret=0;
/*Determine if long double has 16 byte in size, 11 bit exponent, and
*the bias is 0x3ff */
if(sizeof(long double) == 16) {
ld = 1.0L;
memcpy(s, &ld, 16);
if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
flag = 1;
}
if(flag==1 && sizeof(long long)==8) {
ll = 0x01ffffffffffffffLL;
ld = (long double)ll;
memcpy(s, &ld, 16);
/*Check if the bit sequence is as supposed to be*/
if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
ret = 1;
}
if(flag==1 && sizeof(unsigned long long)==8) {
ull = 0x01ffffffffffffffULL;
ld = (long double)ull;
memcpy(s, &ld, 16);
if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
ret = 1;
}
done:
exit(ret);
}
]])],[hdf5_cv_llong_to_ldouble_correct=yes], [hdf5_cv_llong_to_ldouble_correct=no],[])])
[AC_RUN_IFELSE([AC_LANG_SOURCE([$TEST_SRC])],
[hdf5_cv_llong_to_ldouble_correct=yes], [hdf5_cv_llong_to_ldouble_correct=no],[])])
fi
if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then
@ -3357,40 +3192,11 @@ AC_ARG_ENABLE([embedded-libinfo],
## Check if pointer alignments are enforced
##
AC_MSG_CHECKING([if alignment restrictions are strictly enforced])
TEST_SRC="`(echo \"#define H5_NO_ALIGNMENT_RESTRICTIONS_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
AC_RUN_IFELSE([
AC_LANG_PROGRAM([
#include <stdlib.h>
#include <string.h>
typedef struct {
size_t len;
void *p;
} hvl_t;
], [
char *chp = "beefs";
char **chpp = malloc (2 * sizeof (char *));
char **chpp2;
hvl_t vl = { 12345, (void *) chp };
hvl_t *vlp;
hvl_t *vlp2;
memcpy ((void *) ((char *) chpp + 1), &chp, sizeof (char *));
chpp2 = (char **) ((char *) chpp + 1);
if (strcmp (*chpp2, chp)) {
free (chpp);
return 1;
}
free (chpp);
vlp = malloc (2 * sizeof (hvl_t));
memcpy ((void *) ((char *) vlp + 1), &vl, sizeof (hvl_t));
vlp2 = (hvl_t *) ((char *) vlp + 1);
if (vlp2->len != vl.len || vlp2->p != vl.p) {
free (vlp);
return 1;
}
free (vlp);
])
AC_LANG_SOURCE([$TEST_SRC])
], [
AC_DEFINE([NO_ALIGNMENT_RESTRICTIONS], [1], [Define if we can violate pointer alignment restrictions])
AC_MSG_RESULT([no])

View File

@ -2,7 +2,7 @@
This directory contains example programs for the installed APIs and scripts to
compile and run them. Examples in the c and hl/c subdirectories are always
installed, and those in fortan, hl/fortran, c++ and hl/c++ will be installed
installed, and those in fortran, hl/fortran, c++ and hl/c++ will be installed
when fortran or c++ are enabled.
Running the run-all-ex.sh script in this directory will run the scripts and in

View File

@ -339,7 +339,11 @@ CONTAINS
#ifdef H5_FORTRAN_HAVE_C_SIZEOF
H5_SIZEOF_CMPD = C_SIZEOF(a)
#else
H5_SIZEOF_CMPD = SIZEOF(a)
# ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
H5_SIZEOF_CMPD = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
# else
H5_SIZEOF_CMPD = SIZEOF(a)
# endif
#endif
END FUNCTION H5_SIZEOF_CMPD

View File

@ -11,21 +11,15 @@ set (HDF5_TEST_FILES
)
foreach (h5_file ${HDF5_TEST_FILES})
set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
#message (STATUS " Copying ${h5_file}")
add_custom_command (
TARGET hl_ex_ex_ds1
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest}
)
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "hl_ex_ex_ds1_files")
endforeach (h5_file ${HDF5_TEST_FILES})
add_custom_target(hl_ex_ex_ds1_files ALL COMMENT "Copying files needed by hl_ex_ex_ds1 tests" DEPENDS ${hl_ex_ex_ds1_files_list})
# Remove any output file left over from previous test run
add_test (
NAME HL_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
-E remove
ex_lite1.h5
ex_lite2.h5
ex_lite3.h5
@ -48,13 +42,13 @@ endforeach (h5_file ${HDF5_TEST_FILES})
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (HL_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
endif ()
set (last_test "HL_ex-clear-objects")
foreach (example ${examples})
add_test (NAME HL_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (HL_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
endif ()
set (last_test "HL_ex_${example}")
endforeach (example ${examples})

View File

@ -31,7 +31,7 @@ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tstlite tstlite.F90)
TARGET_NAMING (hl_f90_tstlite STATIC)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ")
target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
@ -39,7 +39,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tstlite-shared tstlite.F90)
TARGET_NAMING (hl_f90_tstlite-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ")
target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_target_properties (hl_f90_tstlite-shared PROPERTIES
LINKER_LANGUAGE Fortran
@ -73,7 +73,7 @@ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tsttable tsttable.F90)
TARGET_NAMING (hl_f90_tsttable STATIC)
TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ")
target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
@ -81,7 +81,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tsttable-shared tsttable.F90)
TARGET_NAMING (hl_f90_tsttable-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ")
target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_target_properties (hl_f90_tsttable-shared PROPERTIES
LINKER_LANGUAGE Fortran

View File

@ -22,7 +22,7 @@
include $(top_srcdir)/config/commence.am
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/hl/src
AM_FCFLAGS+=-I$(top_builddir)/fortran/src -I$(top_builddir)/hl/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/hl/fortran/src
AM_FCFLAGS+=-I$(top_builddir)/fortran/src -I$(top_builddir)/hl/fortran/src -I$(top_builddir)/fortran/test $(F9XMODFLAG)$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/test $(F9XMODFLAG)$(top_builddir)/hl/fortran/src
# Some Fortran compilers can't build shared libraries, so sometimes we
# need to make sure the Fortran programs link against the static version
@ -36,7 +36,9 @@ endif
TEST_PROG=tstds tstlite tstimage tsttable
check_PROGRAMS=$(TEST_PROG)
LDADD= $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5)
LIBOBJS=$(top_builddir)/fortran/test/tf_gen.o
LDADD=$(LIBOBJS) $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5)
# Source files for the programs
tstds_SOURCES=tstds.F90
@ -47,6 +49,29 @@ tsttable_SOURCES=tsttable.F90
# Temporary files.
CHECK_CLEANFILES+=dsetf[1-5].h5 f1img.h5 f[1-2]tab.h5 tstds.h5
# Fortran module files can have different extensions and different names
# (e.g., different capitalizations) on different platforms. Write rules
# for them explicitly rather than trying to teach automake about them.
# They should be installed as headers and removed during clean.
maintainer-clean-local: clean-local
distclean-local: clean-local
clean-local:
@if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \
$(RM) *.$(F9XMODEXT); \
fi
install-data-local:
@if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \
$(CP) $(top_builddir)/$(subdir)/*.$(F9XMODEXT) $(DESTDIR)$(includedir)/. ; \
fi
uninstall-local:
@if test -n "$(F9XMODEXT)" -a "X$(F9XMODEXT)" != "Xo"; then \
if test -f "$(includedir)/hdf5.$(F9XMODEXT)" -o -f "$(DESTDIR)$(includedir)/HDF5.$(F9XMODEXT)"; then \
set -x; $(RM) $(includedir)/*.$(F9XMODEXT); \
fi; \
fi
# Mark this directory as part of the Fortran API (this affects output
# from tests in conclude.am)
FORTRAN_API=yes

File diff suppressed because it is too large Load Diff

View File

@ -44,6 +44,9 @@ END MODULE TSTTABLE
MODULE TSTTABLE_TESTS
USE TH5_MISC_GEN
IMPLICIT NONE
CONTAINS
!-------------------------------------------------------------------------
@ -283,7 +286,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
IF ( bufrr(i) .NE. bufr(i) ) THEN
CALL VERIFY("h5tbread_field_name_f", bufrr(i), bufr(i), errcode)
IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@ -298,7 +302,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
IF ( bufdr(i) .NE. bufd(i) ) THEN
CALL VERIFY("h5tbread_field_name_f", bufdr(i), bufd(i), errcode)
IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufdr(i), ' and ', bufd(i)
STOP
@ -315,7 +320,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
IF ( bufrr(i) .NE. bufr(i) ) THEN
CALL VERIFY("h5tbread_field_name_f", bufrr(i), bufr(i), errcode)
IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@ -362,7 +368,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
IF ( bufsr(i) .NE. bufs(i) ) THEN
CALL VERIFY("h5tbread_field_index_f", bufsr(i), bufs(i), errcode)
IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufsr(i), ' and ', bufs(i)
STOP
@ -376,7 +383,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
IF ( bufir(i) .NE. bufi(i) ) THEN
CALL VERIFY("h5tbread_field_index_f", bufir(i), bufi(i), errcode)
IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufir(i), ' and ', bufi(i)
STOP
@ -390,7 +398,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
IF ( bufrr(i) .NE. bufr(i) ) THEN
CALL VERIFY("h5tbread_field_index_f", bufrr(i), bufr(i), errcode)
IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@ -404,7 +413,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
IF ( bufdr(i) .NE. bufd(i) ) THEN
CALL VERIFY("h5tbread_field_index_f", bufdr(i), bufd(i), errcode)
IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufdr(i), ' and ', bufd(i)
STOP
@ -419,7 +429,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
IF ( bufrr(i) .NE. bufr(i) ) THEN
CALL VERIFY("h5tbread_field_index_f", bufrr(i), bufr(i), errcode)
IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@ -444,7 +455,8 @@ SUBROUTINE test_table1()
! compare read and write buffers.
!
DO i = 1, nrecords
IF ( bufrr(i) .NE. bufr(i) ) THEN
CALL VERIFY("h5tbread_field_index_f", bufrr(i), bufr(i), errcode)
IF (errcode .NE.0 ) THEN
PRINT *, 'read buffer differs from write buffer'
PRINT *, bufrr(i), ' and ', bufr(i)
STOP
@ -670,11 +682,12 @@ SUBROUTINE test_table2()
CALL h5tbread_table_f(file_id, table_name_fill, nfields, dst_size, dst_offset, dst_sizes, f_ptr3, errcode)
DO i = 1, nfields
IF(r_data(i)%name.NE.fill_data(i)%name.OR. &
r_data(i)%lati.NE.fill_data(i)%lati.OR. &
r_data(i)%long.NE.fill_data(i)%long.OR. &
r_data(i)%pressure.NE.fill_data(i)%pressure.OR. &
r_data(i)%temperature.NE.fill_data(i)%temperature)THEN
CALL VERIFY("h5tbread_table_f", r_data(i)%name, fill_data(i)%name, errcode)
CALL VERIFY("h5tbread_table_f", r_data(i)%lati, fill_data(i)%lati, errcode)
CALL VERIFY("h5tbread_table_f", r_data(i)%long, fill_data(i)%long, errcode)
CALL VERIFY("h5tbread_table_f", r_data(i)%pressure, fill_data(i)%pressure, errcode)
CALL VERIFY("h5tbread_table_f", r_data(i)%temperature, fill_data(i)%temperature, errcode)
IF (errcode .NE.0 ) THEN
PRINT*,'H5TBmake/read_table_f --filled-- FAILED'
STOP
ENDIF
@ -693,11 +706,12 @@ SUBROUTINE test_table2()
CALL h5tbread_table_f(file_id, table_name, nfields, dst_size, dst_offset, dst_sizes, f_ptr3, errcode)
DO i = 1, nfields
IF(r_data(i)%name.NE.p_data(i)%name.OR. &
r_data(i)%lati.NE.p_data(i)%lati.OR. &
r_data(i)%long.NE.p_data(i)%long.OR. &
r_data(i)%pressure.NE.p_data(i)%pressure.OR. &
r_data(i)%temperature.NE.p_data(i)%temperature)THEN
CALL VERIFY("h5tbread_table_f", r_data(i)%name, p_data(i)%name, errcode)
CALL VERIFY("h5tbread_table_f", r_data(i)%lati, p_data(i)%lati, errcode)
CALL VERIFY("h5tbread_table_f", r_data(i)%long, p_data(i)%long, errcode)
CALL VERIFY("h5tbread_table_f", r_data(i)%pressure, p_data(i)%pressure, errcode)
CALL VERIFY("h5tbread_table_f", r_data(i)%temperature, p_data(i)%temperature, errcode)
IF (errcode .NE.0 ) THEN
PRINT*,'H5TBmake/read_table_f FAILED'
STOP
ENDIF

View File

@ -165,7 +165,7 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
created_dxpl = TRUE;
} /* end if */
else if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER))
goto done;
goto done;
/* Get the dataspace of the dataset */
if(FAIL == (space_id = H5Dget_space(dset_id)))
@ -219,7 +219,8 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
nelmts = (hsize_t)snelmts;
/* create a memory space */
mem_space_id = H5Screate_simple(1, &nelmts, NULL);
if(FAIL == (mem_space_id = H5Screate_simple(1, &nelmts, NULL)))
goto done;
/* Write the data */
if(H5Dwrite(dset_id, memtype, mem_space_id, new_space_id, dxpl_id, buf) < 0)
@ -237,24 +238,24 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
goto done;
/* No boundary for this axis */
if(boundary[axis] == 0)
goto done;
if(boundary[axis] != 0) {
/* Determine whether a boundary is hit or not */
for(k = start[axis]; k < size[axis]; k++)
if(!((k + 1) % boundary[axis])) {
hit = TRUE;
break;
}
/* Determine whether a boundary is hit or not */
for(k = start[axis]; k < size[axis]; k++)
if(!((k + 1) % boundary[axis])) {
hit = TRUE;
break;
}
if(hit) { /* Hit the boundary */
/* Invoke callback if there is one */
if(append_cb && append_cb(dset_id, size, udata) < 0)
goto done;
if(hit) { /* Hit the boundary */
/* Invoke callback if there is one */
if(append_cb && append_cb(dset_id, size, udata) < 0)
goto done;
/* Do a dataset flush */
if(H5Dflush(dset_id) < 0)
goto done;
/* Do a dataset flush */
if(H5Dflush(dset_id) < 0)
goto done;
} /* end if */
} /* end if */
/* Indicate success */

View File

@ -894,8 +894,8 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
/* set allocation increment to a percentage of the supplied buffer size, or
* a pre-defined minimum increment value, whichever is larger
*/
if ((buf_prcnt * buf_size) > min_incr)
alloc_incr = (size_t)(buf_prcnt * buf_size);
if ((size_t)(buf_prcnt * (double)buf_size) > min_incr)
alloc_incr = (size_t)(buf_prcnt * (double)buf_size);
else
alloc_incr = min_incr;

View File

@ -5,32 +5,44 @@
##############################################################################
##############################################################################
set (HL_REFERENCE_TEST_FILES
dtype_file.txt
image8.txt
sepia.pal
earth.pal
image24pixel.txt
image24plane.txt
usa.wri
test_table_be.h5
test_table_cray.h5
test_table_le.h5
dsdata.txt
dslat.txt
dslon.txt
test_ds_be.h5
test_ds_le.h5
test_ld.h5
)
# --------------------------------------------------------------------
#-- Copy the necessary files.
# --------------------------------------------------------------------
foreach (h5_file ${HL_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_HL_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}" "hl_test_files")
endforeach (h5_file ${HL_REFERENCE_TEST_FILES})
add_custom_target(hl_test_files ALL COMMENT "Copying files needed by hl_test tests" DEPENDS ${hl_test_files_list})
# --------------------------------------------------------------------
# Macro used to add a unit test
# --------------------------------------------------------------------
MACRO (HL_ADD_TEST hl_name files)
MACRO (HL_ADD_TEST hl_name)
add_test (NAME HL_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (HL_${hl_name} PROPERTIES DEPENDS ${last_test}
ENVIRONMENT "srcdir=${HDF5_HL_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
)
endif (NOT "${last_test}" STREQUAL "")
# --------------------------------------------------------------------
#-- Copy the necessary files.
# --------------------------------------------------------------------
foreach (h5_file ${files})
set (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}")
#message (STATUS " Copying HL Test File ${h5_file} to ${dest}")
add_custom_command (
TARGET hl_${hl_name}
PRE_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_HL_TEST_SOURCE_DIR}/${h5_file} ${dest}
)
endforeach (h5_file ${HL_REFERENCE_TEST_FILES})
endif ()
ENDMACRO (HL_ADD_TEST)
# Remove any output file left over from previous test run
@ -73,13 +85,13 @@ if (NOT "${last_test}" STREQUAL "")
endif (NOT "${last_test}" STREQUAL "")
set (last_test "HL_test-clear-objects")
HL_add_test (test_lite "dtype_file.txt")
HL_add_test (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri")
HL_add_test (test_file_image "")
HL_add_test (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5")
HL_add_test (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
HL_add_test (test_packet "")
HL_add_test (test_dset_opt "")
HL_add_test (test_ld "test_ld.h5")
HL_add_test (test_dset_append "")
HL_add_test (test_lite )
HL_add_test (test_image)
HL_add_test (test_file_image)
HL_add_test (test_table)
HL_add_test (test_ds)
HL_add_test (test_packet)
HL_add_test (test_dset_opt)
HL_add_test (test_ld)
HL_add_test (test_dset_append)

View File

@ -1,9 +1,5 @@
#include "hdf5.h"
#include "H5LDprivate.h"
#include <time.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <stdlib.h>
/*
* WATCH.h5: file with various types of datasets for testing--

View File

@ -16,7 +16,6 @@
#include <stdlib.h>
#include <string.h>
#include "h5hltest.h"
#include "H5srcdir.h"
#include "H5DOpublic.h"
#include <math.h>
@ -28,6 +27,7 @@
#endif
#define FILE "test_append.h5"
#define DNAME_NOTSET "dataset_notset"
#define DNAME_UNLIM "dataset_unlim"
#define DNAME_LESS "dataset_less"
#define DNAME_VARY "dataset_vary"
@ -36,6 +36,101 @@
#define DBUGNAME1 "dataset_bug1"
#define DBUGNAME2 "dataset_bug2"
/*-------------------------------------------------------------------------
* Function: test_dataset_append_notset
*
* Purpose: Verify that H5DOappend works properly with default dapl.
* That is, H5Pset_append_flush() is not used to set boundary
* and callback in dapl.
*
* Return: Success: 0
* Failure: 1
*
* Programmer: Vailin Choi; Aug 2016
*
*-------------------------------------------------------------------------
*/
static int
test_dataset_append_notset(hid_t fid)
{
hid_t did = -1; /* Dataset ID */
hid_t sid = -1; /* Dataspace ID */
hid_t dcpl = -1; /* A copy of dataset creation property */
hid_t ffapl = -1; /* The file's file access property list */
hsize_t dims[2] = {0, 10}; /* Current dimension sizes */
hsize_t maxdims[2] = {H5S_UNLIMITED, 20}; /* Maximum dimension sizes */
hsize_t chunk_dims[2] = {2,5}; /* Chunk dimension sizes */
int lbuf[10]; /* The data buffers */
int i, j; /* Local index variables */
h5_stat_t sb1, sb2; /* File info */
TESTING("Append flush with H5DOappend()--append rows with default dapl");
/* Get the file's file access property list */
if((ffapl = H5Fget_access_plist(fid)) < 0)
FAIL_STACK_ERROR;
/* Set to create a chunked dataset with extendible dimensions */
if((sid = H5Screate_simple(2, dims, maxdims)) < 0)
FAIL_STACK_ERROR;
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
FAIL_STACK_ERROR;
/* Create the dataset */
if((did = H5Dcreate2(fid, DNAME_NOTSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Append 6 rows to the dataset */
for(i = 0; i < 6; i++) {
for(j = 0; j < 10; j++)
lbuf[j] = (i * 10) + (j + 1);
/* Append without boundary, callback and flush */
if(H5DOappend(did, H5P_DEFAULT, 0, (size_t)1, H5T_NATIVE_INT, lbuf) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* File size when not flushed */
if(HDstat(FILE, &sb1) < 0)
TEST_ERROR;
/* Close the dataset */
if(H5Dclose(did) < 0)
FAIL_STACK_ERROR;
/* File size after flushing */
if(HDstat(FILE, &sb2) < 0)
TEST_ERROR;
/* File size before flushing should be less */
if(sb1.st_size > sb2.st_size)
TEST_ERROR;
/* Closing */
if(H5Sclose(sid) < 0)
FAIL_STACK_ERROR;
if(H5Pclose(dcpl) < 0)
FAIL_STACK_ERROR;
if(H5Pclose(ffapl) < 0)
FAIL_STACK_ERROR;
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
H5Pclose(sid);
H5Dclose(did);
H5Pclose(ffapl);
} H5E_END_TRY;
return 1;
} /* test_dataset_append_notset() */
/* The callback function for the object flush property */
static herr_t
flush_func(hid_t H5_ATTR_UNUSED obj_id, void *_udata)
@ -1151,6 +1246,8 @@ int main(void)
if((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
FAIL_STACK_ERROR;
nerrors += test_dataset_append_notset(fid);
nerrors += test_dataset_append_rows(fid);
flush_ct = 0; /* Reset flush counter */

View File

@ -16,7 +16,6 @@
#include <stdlib.h>
#include <string.h>
#include "h5hltest.h"
#include "H5srcdir.h"
#include "H5DOpublic.h"
#include <math.h>

View File

@ -60,7 +60,7 @@ static int test_VLof_atomic(void)
hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
hid_t vltype=H5I_INVALID_HID; /* Variable length datatype */
hsize_t count; /* Number of records in the table */
int ii, jj; /* Loop variables */
unsigned uu, vv; /* Loop variables */
hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
char msg[80]; /* For error message */
@ -69,15 +69,15 @@ static int test_VLof_atomic(void)
TESTING3(" with vlen of atomic");
/* Allocate and initialize VL data to write (copied from C test) */
for (ii=0; ii<NRECORDS; ii++) {
writeBuf[ii].p = HDmalloc((ii+1)*sizeof(unsigned int));
if (writeBuf[ii].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%u\n",ii);
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[ii].len = ii+1;
for (jj=0; jj<(ii+1); jj++)
((unsigned int *)writeBuf[ii].p)[jj] = ii * 10 + jj;
writeBuf[uu].len = uu + 1;
for (vv = 0; vv < (uu + 1); vv++)
((unsigned int *)writeBuf[uu].p)[vv] = uu * 10 + vv;
} /* end for */
/* Open the file */
@ -119,12 +119,12 @@ static int test_VLof_atomic(void)
if (ret < 0)
goto error;
for (ii = 0; ii < NRECORDS; ii++)
for (jj=0; jj<(ii+1); jj++)
for (uu = 0; uu < NRECORDS; uu++)
for (vv = 0; vv < (uu + 1); vv++)
{
if (((unsigned int *)readBuf[ii].p)[jj] != ((unsigned int *)writeBuf[ii].p)[jj]) {
printf("Packet %d's value should be %d\n", ii, ((unsigned int *)writeBuf[ii].p)[jj]);
printf("Packet %d's value in readBuf is %d\n", ii, ((unsigned int *)readBuf[ii].p)[jj]);
if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
printf("Packet %u's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
printf("Packet %u's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
}
}
@ -168,7 +168,7 @@ static int test_VLof_comptype(void)
{
/* Struct that the VL sequences are composed of */
typedef struct {
int i;
unsigned u;
float f;
} VLcomp_t;
hid_t fid=H5I_INVALID_HID; /* Test file identifier */
@ -178,23 +178,23 @@ static int test_VLof_comptype(void)
hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
hsize_t count; /* Number of records in the table */
int ii, jj; /* Loop variables */
unsigned uu, vv; /* Loop variables */
char msg[80]; /* For error message */
herr_t ret;
TESTING3(" with vlen of compound datatypes");
/* Allocate and initialize VL data to write (copied from C test) */
for (ii=0; ii<NRECORDS; ii++) {
writeBuf[ii].p = HDmalloc((ii+1)*sizeof(VLcomp_t));
if(writeBuf[ii].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%u\n",ii);
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
if(writeBuf[uu].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[ii].len = ii+1;
for (jj=0; jj<(ii+1); jj++) {
((VLcomp_t *)writeBuf[ii].p)[jj].i = ii+jj;
((VLcomp_t *)writeBuf[ii].p)[jj].f = (float)((ii+jj)/3.0F);
writeBuf[uu].len = uu + 1;
for (vv = 0; vv < (uu + 1); vv++) {
((VLcomp_t *)writeBuf[uu].p)[vv].u = uu + vv;
((VLcomp_t *)writeBuf[uu].p)[vv].f = (float)(uu + vv) / 3.0F;
} /* end for */
} /* end for */
@ -209,7 +209,7 @@ static int test_VLof_comptype(void)
goto error;
/* Insert fields */
ret = H5Tinsert(cmptype, "i", HOFFSET(VLcomp_t, i), H5T_NATIVE_INT);
ret = H5Tinsert(cmptype, "u", HOFFSET(VLcomp_t, u), H5T_NATIVE_UINT);
if (ret < 0)
goto error;
ret = H5Tinsert(cmptype, "f", HOFFSET(VLcomp_t, f), H5T_NATIVE_FLOAT);
@ -251,15 +251,15 @@ static int test_VLof_comptype(void)
goto error;
/* Compare data read in */
for (ii = 0; ii < NRECORDS; ii++) {
if (writeBuf[ii].len != readBuf[ii].len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].len=%d, readBuf[%d].len=%d\n",__LINE__,(int)ii,(int)writeBuf[ii].len,(int)ii,(int)readBuf[ii].len);
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n", __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
continue;
} /* write len != read len */
for (jj=0; jj<(ii+1); jj++) {
if (((unsigned int *)writeBuf[ii].p)[jj] != ((unsigned int *)readBuf[ii].p)[jj] ) {
fprintf(stderr, "VL data values don't match!, writeBuf[ii].p[%d]=%d, readBuf[ii].p[%d]=%d\n",(int)jj, (int)((unsigned int *)writeBuf[ii].p)[jj], (int)jj, (int)((unsigned int *)readBuf[ii].p)[jj]);
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv] ) {
fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n", vv, (int)((unsigned int *)writeBuf[uu].p)[vv], vv, (int)((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@ -306,7 +306,7 @@ static int test_compound_VL_VLtype(void)
{
/* Struct that the VL sequences are composed of */
typedef struct {
int i;
unsigned u;
float f;
hvl_t v;
} compVLVL_t;
@ -322,32 +322,32 @@ static int test_compound_VL_VLtype(void)
compVLVL_t writeBuf[NRECORDS];/* Buffer to hold data to be written */
compVLVL_t readBuf[NRECORDS]; /* Buffer to hold read data */
hvl_t *t1, *t2;
int ii, jj, kk; /* Loop variables */
unsigned uu, vv, ww; /* Loop variables */
char msg[80]; /* For error message */
herr_t ret; /* Returned status from a callee */
TESTING3(" with compound datatype containing vlen datatype");
/* Allocate and initialize VL data to write (copied from C test) */
for (ii=0; ii<NRECORDS; ii++) {
writeBuf[ii].i = ii*10;
writeBuf[ii].f = (float)((ii*20)/3.0F);
writeBuf[ii].v.p = HDmalloc((ii+L1_INCM)*sizeof(hvl_t));
if (writeBuf[ii].v.p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%d\n",ii);
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].u = uu * 10;
writeBuf[uu].f = (float)(uu * 20) / 3.0F;
writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[ii].v.len=ii+L1_INCM;
for (t1=(hvl_t *)((writeBuf[ii].v).p), jj=0; jj<(ii+L1_INCM); jj++, t1++)
writeBuf[uu].v.len = uu + L1_INCM;
for (t1 = (hvl_t *)((writeBuf[uu].v).p), vv = 0; vv < (uu + L1_INCM); vv++, t1++)
{
t1->p = HDmalloc((jj+L2_INCM)*sizeof(unsigned int));
t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
if (t1->p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%d\n",ii);
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = jj+L2_INCM;
for (kk=0; kk<jj+L2_INCM; kk++)
((unsigned int*)t1->p)[kk] = ii*100 + jj*10 + kk;
t1->len = vv + L2_INCM;
for (ww = 0; ww < vv + L2_INCM; ww++)
((unsigned int *)t1->p)[ww] = uu * 100 + vv * 10 + ww;
}
} /* end for */
@ -377,7 +377,7 @@ static int test_compound_VL_VLtype(void)
goto error;
/* Insert fields: atomic, atomic, vlen */
ret = H5Tinsert(comp_vlvl, "i", HOFFSET(compVLVL_t, i), H5T_NATIVE_INT);
ret = H5Tinsert(comp_vlvl, "u", HOFFSET(compVLVL_t, u), H5T_NATIVE_UINT);
if (ret < 0)
goto error;
ret = H5Tinsert(comp_vlvl, "f", HOFFSET(compVLVL_t, f), H5T_NATIVE_FLOAT);
@ -417,29 +417,29 @@ static int test_compound_VL_VLtype(void)
goto error;
/* Compare data read in */
for (ii = 0; ii < NRECORDS; ii++) {
if (writeBuf[ii].i != readBuf[ii].i) {
fprintf(stderr, "Integer components don't match!, writeBuf[%d].i=%d, readBuf[%d].i=%d\n",(int)ii,(int)writeBuf[ii].i,(int)ii,(int)readBuf[ii].i);
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[ii].f,readBuf[ii].f)) {
fprintf(stderr, "Float components don't match!, writeBuf[%d].f=%f, readBuf[%d].f=%f\n",(int)ii,(double)writeBuf[ii].f,(int)ii,(double)readBuf[ii].f);
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f,readBuf[uu].f)) {
fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[ii].v.len != readBuf[ii].v.len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].v.len=%d, readBuf[%d].v.len=%d\n",__LINE__,(int)ii,(int)writeBuf[ii].v.len,(int)ii,(int)readBuf[ii].v.len);
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
for (t1=(hvl_t *)(writeBuf[ii].v.p), t2=(hvl_t *)(readBuf[ii].v.p), jj=0; (size_t)jj<readBuf[ii].v.len; jj++, t1++, t2++) {
for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0; (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
fprintf(stderr, "%d: VL data length don't match!, ii=%d, jj=%d, t1->len=%d, t2->len=%d\n",__LINE__,(int)ii,(int)jj,(int)t1->len,(int)t2->len);
fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (kk=0; (size_t)kk<t2->len; kk++) {
if (((unsigned int *)t1->p)[kk] != ((unsigned int *)t2->p)[kk] ) {
fprintf(stderr, "VL data values don't match!, t1->p[%d]=%d, t2->p[%d]=%d\n",(int)kk, (int)((unsigned int *)t1->p)[kk], (int)kk, (int)((unsigned int *)t2->p)[kk]);
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww] ) {
fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
@ -497,7 +497,7 @@ static int test_VLof_VLtype(void)
hid_t vlofvl=H5I_INVALID_HID; /* VL datatype of VL datatypes */
hsize_t count; /* Number of records in the table */
hvl_t *t1; /* pointer to advance */
int ii, jj, kk; /* Loop variables */
unsigned uu, vv, ww; /* Loop variables */
hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
char msg[80]; /* For error message */
@ -506,23 +506,23 @@ static int test_VLof_VLtype(void)
TESTING3(" with vlen datatype of vlen datatype");
/* Allocate and initialize VL data to write (copied from C test) */
for (ii=0; ii< NRECORDS; ii++) {
writeBuf[ii].p = HDmalloc((ii+1)*sizeof(hvl_t));
if (writeBuf[ii].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%u\n",ii);
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[ii].len = ii+1;
for (t1=(hvl_t *)(writeBuf[ii].p), jj=0; jj<(ii+1); jj++, t1++)
writeBuf[uu].len = uu + 1;
for (t1=(hvl_t *)(writeBuf[uu].p), vv = 0; vv < (uu + 1); vv++, t1++)
{
t1->p = HDmalloc((jj+1)*sizeof(unsigned int));
t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%u\n",ii);
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = jj+1;
for (kk=0; kk<(jj+1); kk++)
((unsigned int *)t1->p)[kk] = ii*100+jj*10+kk;
t1->len = vv * 1;
for (ww = 0; ww < (vv * 1); ww++)
((unsigned int *)t1->p)[ww] = uu * 100 + vv * 10 + ww;
} /* end for */
} /* end for */
@ -958,6 +958,8 @@ static herr_t verify_accessors(const char *table_name, herr_t expected_value)
/* Check if the packet table's name matches its associated dataset's. */
*buf = '\0';
name_size = H5Iget_name(dset_id, (char*)buf, NAME_BUF_SIZE);
if (name_size < 0)
goto error;
VERIFY(HDstrcmp(buf, table_name), "Names of dataset and packet table don't match");
/* Get the packet table's datatype ID */
@ -1059,7 +1061,7 @@ static int testfl_VLof_atomic(void)
hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
hid_t vltype=H5I_INVALID_HID; /* Variable length datatype */
hsize_t count; /* Number of records in the table */
int ii, jj; /* Loop variables */
unsigned uu, vv; /* Loop variables */
hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
char msg[80]; /* For error message */
@ -1068,15 +1070,15 @@ static int testfl_VLof_atomic(void)
TESTING3(" with vlen of atomic");
/* Allocate and initialize VL data to write (copied from C test) */
for (ii=0; ii<NRECORDS; ii++) {
writeBuf[ii].p = HDmalloc((ii+1)*sizeof(unsigned int));
if (writeBuf[ii].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%u\n",ii);
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[ii].len = ii+1;
for (jj=0; jj<(ii+1); jj++)
((unsigned int *)writeBuf[ii].p)[jj] = ii * 10 + jj;
writeBuf[uu].len = uu + 1;
for (vv = 0; vv < (uu + 1); vv++)
((unsigned int *)writeBuf[uu].p)[vv] = uu * 10 + vv;
} /* end for */
/* Open the file */
@ -1118,12 +1120,12 @@ static int testfl_VLof_atomic(void)
if (ret < 0)
goto error;
for (ii = 0; ii < NRECORDS; ii++)
for (jj=0; jj<(ii+1); jj++)
for (uu = 0; uu < NRECORDS; uu++)
for (vv = 0; vv < (uu + 1); vv++)
{
if (((unsigned int *)readBuf[ii].p)[jj] != ((unsigned int *)writeBuf[ii].p)[jj]) {
printf("Packet %d's value should be %d\n", ii, ((unsigned int *)writeBuf[ii].p)[jj]);
printf("Packet %d's value in readBuf is %d\n", ii, ((unsigned int *)readBuf[ii].p)[jj]);
if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
printf("Packet %d's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
printf("Packet %d's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
}
}
@ -1167,7 +1169,7 @@ static int testfl_VLof_comptype(void)
{
/* Struct that the VL sequences are composed of */
typedef struct {
int i;
unsigned u;
float f;
} VLcomp_t;
hid_t fid=H5I_INVALID_HID; /* Test file identifier */
@ -1177,23 +1179,23 @@ static int testfl_VLof_comptype(void)
hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
hsize_t count; /* Number of records in the table */
int ii, jj; /* Loop variables */
unsigned uu, vv; /* Loop variables */
char msg[80]; /* For error message */
herr_t ret;
TESTING3(" with vlen of compound datatypes");
/* Allocate and initialize VL data to write (copied from C test) */
for (ii=0; ii<NRECORDS; ii++) {
writeBuf[ii].p = HDmalloc((ii+1)*sizeof(VLcomp_t));
if(writeBuf[ii].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%u\n",ii);
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
if(writeBuf[uu].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[ii].len = ii+1;
for (jj=0; jj<(ii+1); jj++) {
((VLcomp_t *)writeBuf[ii].p)[jj].i = ii+jj;
((VLcomp_t *)writeBuf[ii].p)[jj].f = (float)((ii+jj)/3.0F);
writeBuf[uu].len = uu + 1;
for (vv = 0; vv < (uu + 1); vv++) {
((VLcomp_t *)writeBuf[uu].p)[vv].u = uu + vv;
((VLcomp_t *)writeBuf[uu].p)[vv].f = (float)(uu + vv) / 3.0F;
} /* end for */
} /* end for */
@ -1208,7 +1210,7 @@ static int testfl_VLof_comptype(void)
goto error;
/* Insert fields */
ret = H5Tinsert(cmptype, "i", HOFFSET(VLcomp_t, i), H5T_NATIVE_INT);
ret = H5Tinsert(cmptype, "u", HOFFSET(VLcomp_t, u), H5T_NATIVE_UINT);
if (ret < 0)
goto error;
ret = H5Tinsert(cmptype, "f", HOFFSET(VLcomp_t, f), H5T_NATIVE_FLOAT);
@ -1250,15 +1252,15 @@ static int testfl_VLof_comptype(void)
goto error;
/* Compare data read in */
for (ii = 0; ii < NRECORDS; ii++) {
if (writeBuf[ii].len != readBuf[ii].len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].len=%d, readBuf[%d].len=%d\n",__LINE__,(int)ii,(int)writeBuf[ii].len,(int)ii,(int)readBuf[ii].len);
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",__LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
continue;
} /* write len != read len */
for (jj=0; jj<(ii+1); jj++) {
if (((unsigned int *)writeBuf[ii].p)[jj] != ((unsigned int *)readBuf[ii].p)[jj] ) {
fprintf(stderr, "VL data values don't match!, writeBuf[ii].p[%d]=%d, readBuf[ii].p[%d]=%d\n",(int)jj, (int)((unsigned int *)writeBuf[ii].p)[jj], (int)jj, (int)((unsigned int *)readBuf[ii].p)[jj]);
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv] ) {
fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n", vv, ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@ -1305,7 +1307,7 @@ static int testfl_compound_VL_VLtype(void)
{
/* Struct that the VL sequences are composed of */
typedef struct {
int i;
unsigned u;
float f;
hvl_t v;
} compVLVL_t;
@ -1321,32 +1323,32 @@ static int testfl_compound_VL_VLtype(void)
compVLVL_t writeBuf[NRECORDS];/* Buffer to hold data to be written */
compVLVL_t readBuf[NRECORDS]; /* Buffer to hold read data */
hvl_t *t1, *t2;
int ii, jj, kk; /* Loop variables */
unsigned uu, vv, ww; /* Loop variables */
char msg[80]; /* For error message */
herr_t ret; /* Returned status from a callee */
TESTING3(" with compound datatype containing vlen datatype");
/* Allocate and initialize VL data to write (copied from C test) */
for (ii=0; ii<NRECORDS; ii++) {
writeBuf[ii].i = ii*10;
writeBuf[ii].f = (float)((ii*20)/3.0F);
writeBuf[ii].v.p = HDmalloc((ii+L1_INCM)*sizeof(hvl_t));
if (writeBuf[ii].v.p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%d\n",ii);
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].u = uu * 10;
writeBuf[uu].f = (float)(uu * 20) / 3.0F;
writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[ii].v.len=ii+L1_INCM;
for (t1=(hvl_t *)((writeBuf[ii].v).p), jj=0; jj<(ii+L1_INCM); jj++, t1++)
writeBuf[uu].v.len = uu + L1_INCM;
for (t1 = (hvl_t *)((writeBuf[uu].v).p), vv = 0; vv < (uu + L1_INCM); vv++, t1++)
{
t1->p = HDmalloc((jj+L2_INCM)*sizeof(unsigned int));
t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
if (t1->p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%d\n",ii);
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = jj+L2_INCM;
for (kk=0; kk<jj+L2_INCM; kk++)
((unsigned int*)t1->p)[kk] = ii*100 + jj*10 + kk;
t1->len = vv + L2_INCM;
for (ww = 0; ww < vv + L2_INCM; ww++)
((unsigned int*)t1->p)[ww] = uu * 100 + vv * 10 + ww;
}
} /* end for */
@ -1376,7 +1378,7 @@ static int testfl_compound_VL_VLtype(void)
goto error;
/* Insert fields: atomic, atomic, vlen */
ret = H5Tinsert(comp_vlvl, "i", HOFFSET(compVLVL_t, i), H5T_NATIVE_INT);
ret = H5Tinsert(comp_vlvl, "u", HOFFSET(compVLVL_t, u), H5T_NATIVE_UINT);
if (ret < 0)
goto error;
ret = H5Tinsert(comp_vlvl, "f", HOFFSET(compVLVL_t, f), H5T_NATIVE_FLOAT);
@ -1416,29 +1418,29 @@ static int testfl_compound_VL_VLtype(void)
goto error;
/* Compare data read in */
for (ii = 0; ii < NRECORDS; ii++) {
if (writeBuf[ii].i != readBuf[ii].i) {
fprintf(stderr, "Integer components don't match!, writeBuf[%d].i=%d, readBuf[%d].i=%d\n",(int)ii,(int)writeBuf[ii].i,(int)ii,(int)readBuf[ii].i);
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[ii].f,readBuf[ii].f)) {
fprintf(stderr, "Float components don't match!, writeBuf[%d].f=%f, readBuf[%d].f=%f\n",(int)ii,(double)writeBuf[ii].f,(int)ii,(double)readBuf[ii].f);
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f, readBuf[uu].f)) {
fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[ii].v.len != readBuf[ii].v.len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].v.len=%d, readBuf[%d].v.len=%d\n",__LINE__,(int)ii,(int)writeBuf[ii].v.len,(int)ii,(int)readBuf[ii].v.len);
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
for (t1=(hvl_t *)(writeBuf[ii].v.p), t2=(hvl_t *)(readBuf[ii].v.p), jj=0; (size_t)jj<readBuf[ii].v.len; jj++, t1++, t2++) {
for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0; (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
fprintf(stderr, "%d: VL data length don't match!, ii=%d, jj=%d, t1->len=%d, t2->len=%d\n",__LINE__,(int)ii,(int)jj,(int)t1->len,(int)t2->len);
fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (kk=0; (size_t)kk<t2->len; kk++) {
if (((unsigned int *)t1->p)[kk] != ((unsigned int *)t2->p)[kk] ) {
fprintf(stderr, "VL data values don't match!, t1->p[%d]=%d, t2->p[%d]=%d\n",(int)kk, (int)((unsigned int *)t1->p)[kk], (int)kk, (int)((unsigned int *)t2->p)[kk]);
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww] ) {
fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
@ -1496,7 +1498,7 @@ static int testfl_VLof_VLtype(void)
hid_t vlofvl=H5I_INVALID_HID; /* VL datatype of VL datatypes */
hsize_t count; /* Number of records in the table */
hvl_t *t1; /* pointer to advance */
int ii, jj, kk; /* Loop variables */
unsigned uu, vv, ww; /* Loop variables */
hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
char msg[80]; /* For error message */
@ -1505,23 +1507,23 @@ static int testfl_VLof_VLtype(void)
TESTING3(" with vlen datatype of vlen datatype");
/* Allocate and initialize VL data to write (copied from C test) */
for (ii=0; ii< NRECORDS; ii++) {
writeBuf[ii].p = HDmalloc((ii+1)*sizeof(hvl_t));
if (writeBuf[ii].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%u\n",ii);
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[ii].len = ii+1;
for (t1=(hvl_t *)(writeBuf[ii].p), jj=0; jj<(ii+1); jj++, t1++)
writeBuf[uu].len = uu + 1;
for (t1 = (hvl_t *)(writeBuf[uu].p), vv = 0; vv < (uu + 1); vv++, t1++)
{
t1->p = HDmalloc((jj+1)*sizeof(unsigned int));
t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
fprintf(stderr, "Cannot allocate memory for VL data! ii=%u\n",ii);
fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = jj+1;
for (kk=0; kk<(jj+1); kk++)
((unsigned int *)t1->p)[kk] = ii*100+jj*10+kk;
t1->len = vv + 1;
for (ww = 0; ww < (vv + 1); ww++)
((unsigned int *)t1->p)[ww] = uu * 100 + vv * 10 + ww;
} /* end for */
} /* end for */

View File

@ -11,27 +11,10 @@ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
#
# copy test files from source to build dir
#
add_custom_command (
TARGET gif2h5
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/image1.gif ${PROJECT_BINARY_DIR}/testfiles/image1.gif
)
add_custom_command (
TARGET h52gif
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/h52giftst.h5 ${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5
)
add_custom_command (
TARGET h52gif
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/ex_image2.h5 ${PROJECT_BINARY_DIR}/testfiles/ex_image2.h5
)
HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/image1.gif" "${PROJECT_BINARY_DIR}/testfiles/image1.gif" "gif2h5_files")
HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/h52giftst.h5" "${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5" "gif2h5_files")
HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/ex_image2.h5" "${PROJECT_BINARY_DIR}/testfiles/ex_image2.h5" "gif2h5_files")
add_custom_target(gif2h5_files ALL COMMENT "Copying files needed by gif2h5 tests" DEPENDS ${gif2h5_files_list})
# Remove any output file left over from previous test run
add_test (

View File

@ -13,6 +13,12 @@ find_package (JNI)
INCLUDE_DIRECTORIES ( ${JNI_INCLUDE_DIRS} )
if (WIN32)
set (HDF_JRE_DIRECTORY "C:/Program Files/Java/jre8")
else (WIN32)
set (HDF_JRE_DIRECTORY "/usr/lib/jvm/jre")
endif (WIN32)
#-----------------------------------------------------------------------------
# Include the main src and config directories
#-----------------------------------------------------------------------------
@ -61,17 +67,9 @@ install (
#-----------------------------------------------------------------------------
option (HDF5_JAVA_PACK_JRE "Package a JRE installer directory" OFF)
if (HDF5_JAVA_PACK_JRE)
if (WIN32)
install (
DIRECTORY "C:/Program Files/Java/jre8"
DESTINATION ${HDF5_INSTALL_BIN_DIR}
USE_SOURCE_PERMISSIONS
)
else (WIN32)
install (
DIRECTORY "/usr/lib/jvm/jre"
DESTINATION ${HDF5_INSTALL_BIN_DIR}
USE_SOURCE_PERMISSIONS
)
endif (WIN32)
install (
DIRECTORY ${HDF_JRE_DIRECTORY}
DESTINATION ${HDF5_INSTALL_BIN_DIR}
USE_SOURCE_PERMISSIONS
)
endif (HDF5_JAVA_PACK_JRE)

View File

@ -63,7 +63,11 @@ endforeach (HDFJAVA_JAR)
MACRO (ADD_H5_TEST resultfile resultcode)
if (CMAKE_BUILD_TYPE MATCHES Debug)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;")
if (WIN32)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;")
else()
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;")
endif()
endif(CMAKE_BUILD_TYPE MATCHES Debug)
add_test (
NAME JAVA_datasets-${resultfile}

View File

@ -63,7 +63,11 @@ endforeach (HDFJAVA_JAR)
MACRO (ADD_H5_TEST resultfile resultcode)
if (CMAKE_BUILD_TYPE MATCHES Debug)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;")
if (WIN32)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;")
else()
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;")
endif()
endif(CMAKE_BUILD_TYPE MATCHES Debug)
add_test (
NAME JAVA_datatypes-${resultfile}

View File

@ -256,11 +256,10 @@ public class H5Ex_T_ObjectReference {
object_id = H5.H5Rdereference(dataset_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, dset_data[indx]);
object_type = H5.H5Rget_obj_type(dataset_id, HDF5Constants.H5R_OBJECT, dset_data[indx]);
}
String[] obj_name = new String[1];
long name_size = 1;
String obj_name = null;
if (object_type >= 0) {
// Get the length of the name and retrieve the name.
name_size = 1 + H5.H5Iget_name(object_id, obj_name, name_size);
obj_name = H5.H5Iget_name(object_id);
}
if ((object_id >= 0) && (object_type >= -1)) {
switch (H5G_obj.get(object_type)) {
@ -299,8 +298,7 @@ public class H5Ex_T_ObjectReference {
}
}
// Print the name.
if (name_size > 1)
System.out.println(": " + obj_name[0]);
System.out.println(": " + obj_name);
}
catch (Exception e) {
e.printStackTrace();

View File

@ -289,11 +289,10 @@ public class H5Ex_T_ObjectReferenceAttribute {
object_id = H5.H5Rdereference(dataset_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, dset_data[indx]);
object_type = H5.H5Rget_obj_type(dataset_id, HDF5Constants.H5R_OBJECT, dset_data[indx]);
}
String[] obj_name = new String[1];
long name_size = 1;
String obj_name = null;
if (object_type >= 0) {
// Get the length of the name and retrieve the name.
name_size = 1 + H5.H5Iget_name(object_id, obj_name, name_size);
obj_name = H5.H5Iget_name(object_id);
}
if ((object_id >= 0) && (object_type >= -1)) {
switch (H5G_obj.get(object_type)) {
@ -332,8 +331,7 @@ public class H5Ex_T_ObjectReferenceAttribute {
}
}
// Print the name.
if (name_size > 1)
System.out.println(": " + obj_name[0]);
System.out.println(": " + obj_name);
}
catch (Exception e) {
e.printStackTrace();

View File

@ -56,19 +56,17 @@ set (HDF_JAVA_TEST_FILES
)
foreach (h5_file ${HDF_JAVA_TEST_FILES})
set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
#message (STATUS " Copying ${h5_file}")
add_custom_command (
TARGET H5Ex_G_Visit
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest}
)
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "H5Ex_G_Visit_files")
endforeach (h5_file ${HDF_JAVA_TEST_FILES})
add_custom_target(H5Ex_G_Visit_files ALL COMMENT "Copying files needed by H5Ex_G_Visit tests" DEPENDS ${H5Ex_G_Visit_files_list})
MACRO (ADD_H5_TEST resultfile resultcode)
if (CMAKE_BUILD_TYPE MATCHES Debug)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;")
if (WIN32)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;")
else()
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;")
endif()
endif(CMAKE_BUILD_TYPE MATCHES Debug)
add_test (
NAME JAVA_groups-${resultfile}

View File

@ -64,7 +64,11 @@ endforeach (example ${HDF_JAVA_OBJECT_EXAMPLES})
MACRO (ADD_H5_TEST resultfile resultcode)
if (CMAKE_BUILD_TYPE MATCHES Debug)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;")
if (WIN32)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;")
else()
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;")
endif()
endif(CMAKE_BUILD_TYPE MATCHES Debug)
add_test (
NAME JAVA_intro-${resultfile}

View File

@ -1,4 +1,4 @@
DS1[0]:
->H5G_GROUP:
->H5G_GROUP: /G1
DS1[1]:
->H5G_DATASET:
->H5G_DATASET: /DS2

View File

@ -1,4 +1,4 @@
A1[0]:
->H5G_GROUP:
->H5G_GROUP: /G1
A1[1]:
->H5G_DATASET:
->H5G_DATASET: /DS2

View File

@ -1061,6 +1061,9 @@ public class H5 implements java.io.Serializable {
public synchronized static native int H5AreadVL(long attr_id, long mem_type_id, String[] buf)
throws HDF5LibraryException, NullPointerException;
public synchronized static native int H5AreadComplex(long attr_id, long mem_type_id, String[] buf)
throws HDF5LibraryException, NullPointerException;
/**
* H5Arename changes the name of attribute that is attached to the object specified by loc_id. The attribute named
* old_attr_name is renamed new_attr_name.
@ -3348,8 +3351,22 @@ public class H5 implements java.io.Serializable {
public synchronized static native long H5Iget_file_id(long obj_id) throws HDF5LibraryException;
public synchronized static native long H5Iget_name(long obj_id, String[] name, long size)
@Deprecated
public synchronized static native long H5Iget_name_long(long obj_id, String[] name, long size)
throws HDF5LibraryException, NullPointerException;
/**
* H5Iget_name_str retrieves the name of an object specified by the identifier, obj_id.
*
* @param obj_id
* IN: Identifier of the object.
*
* @return String for Attribute name.
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
public synchronized static native String H5Iget_name(long obj_id)
throws HDF5LibraryException;
public synchronized static native int H5Iget_ref(long obj_id) throws HDF5LibraryException, NullPointerException;

View File

@ -57,6 +57,9 @@ SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF
H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED ${HDF5_JAVA_PACKAGE_SOVERSION})
if (WIN32)
get_filename_component (HDF5_JAVA_JNI_DLL_NAME ${HDF5_JAVA_JNI_LIB_TARGET} NAME_WE)
if (CMAKE_BUILD_TYPE MATCHES Debug)
set (HDF5_JAVA_JNI_DLL_NAME "${HDF5_JAVA_JNI_DLL_NAME}_D")
endif ()
# message (STATUS "HDF5_JAVA_JNI_DLL_NAME: ${HDF5_JAVA_JNI_DLL_NAME}")
if (BUILD_TESTING)
add_custom_target (HDF5_JAVA_JNI-Test-Copy ALL

View File

@ -67,14 +67,15 @@ Java_hdf_hdf5lib_H5__1H5Acreate
hid_t attr_id = -1;
const char *aName;
PIN_JAVA_STRING(name, aName, -1);
PIN_JAVA_STRING(name, aName);
if (aName != NULL) {
attr_id = H5Acreate2((hid_t)loc_id, aName, (hid_t)type_id, (hid_t)space_id, (hid_t)create_plist, (hid_t)H5P_DEFAULT);
attr_id = H5Acreate2((hid_t)loc_id, aName, (hid_t)type_id, (hid_t)space_id, (hid_t)create_plist, (hid_t)H5P_DEFAULT);
UNPIN_JAVA_STRING(name, aName);
UNPIN_JAVA_STRING(name, aName);
if (attr_id < 0)
h5libraryError(env);
if (attr_id < 0)
h5libraryError(env);
}
return (jlong)attr_id;
} /* end Java_hdf_hdf5lib_H5__1H5Acreate */
@ -91,14 +92,15 @@ Java_hdf_hdf5lib_H5__1H5Aopen_1name
hid_t attr_id = -1;
const char *aName;
PIN_JAVA_STRING(name, aName, -1);
PIN_JAVA_STRING(name, aName);
if (aName != NULL) {
attr_id = H5Aopen_name((hid_t)loc_id, aName);
attr_id = H5Aopen_name((hid_t)loc_id, aName);
UNPIN_JAVA_STRING(name,aName);
UNPIN_JAVA_STRING(name,aName);
if (attr_id < 0)
h5libraryError(env);
if (attr_id < 0)
h5libraryError(env);
}
return (jlong)attr_id;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen_1name */
@ -242,8 +244,7 @@ Java_hdf_hdf5lib_H5_H5Aget_1name
ssize_t buf_size;
/* get the length of the name */
buf_size = H5Aget_name((hid_t)attr_id, NULL, 0);
buf_size = H5Aget_name((hid_t)attr_id, 0, NULL);
if (buf_size <= 0) {
h5badArgument(env, "H5Aget_name: buf_size <= 0");
} /* end if */
@ -299,14 +300,15 @@ Java_hdf_hdf5lib_H5_H5Adelete
herr_t status = -1;
const char *aName;
PIN_JAVA_STRING(name, aName, -1);
PIN_JAVA_STRING(name, aName);
if (aName != NULL) {
status = H5Adelete((hid_t)loc_id, aName);
status = H5Adelete((hid_t)loc_id, aName);
UNPIN_JAVA_STRING(name, aName);
UNPIN_JAVA_STRING(name, aName);
if (status < 0)
h5libraryError(env);
if (status < 0)
h5libraryError(env);
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Adelete */
@ -344,15 +346,16 @@ Java_hdf_hdf5lib_H5__1H5Acreate2
hid_t status = -1;
const char *aName;
PIN_JAVA_STRING(name, aName, -1);
PIN_JAVA_STRING(name, aName);
if (aName != NULL) {
status = H5Acreate2((hid_t)loc_id, aName, (hid_t)type_id,
(hid_t)space_id, (hid_t)create_plist, (hid_t)access_plist );
status = H5Acreate2((hid_t)loc_id, aName, (hid_t)type_id,
(hid_t)space_id, (hid_t)create_plist, (hid_t)access_plist );
UNPIN_JAVA_STRING(name, aName);
UNPIN_JAVA_STRING(name, aName);
if (status < 0)
h5libraryError(env);
if (status < 0)
h5libraryError(env);
}
return (jlong)status;
} /* end Java_hdf_hdf5lib_H5__1H5Acreate2 */
@ -371,14 +374,15 @@ Java_hdf_hdf5lib_H5__1H5Aopen
hid_t retVal = -1;
const char *aName;
PIN_JAVA_STRING(name, aName, -1);
PIN_JAVA_STRING(name, aName);
if (aName != NULL) {
retVal = H5Aopen((hid_t)obj_id, aName, (hid_t)access_plist);
retVal = H5Aopen((hid_t)obj_id, aName, (hid_t)access_plist);
UNPIN_JAVA_STRING(name, aName);
UNPIN_JAVA_STRING(name, aName);
if (retVal < 0)
h5libraryError(env);
if (retVal < 0)
h5libraryError(env);
}
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen */
@ -395,15 +399,16 @@ Java_hdf_hdf5lib_H5__1H5Aopen_1by_1idx
hid_t retVal = -1;
const char *aName;
PIN_JAVA_STRING(name, aName, -1);
PIN_JAVA_STRING(name, aName);
if (aName != NULL) {
retVal = H5Aopen_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type,
(H5_iter_order_t)order, (hsize_t)n, (hid_t)aapl_id, (hid_t)lapl_id);
retVal = H5Aopen_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type,
(H5_iter_order_t)order, (hsize_t)n, (hid_t)aapl_id, (hid_t)lapl_id);
UNPIN_JAVA_STRING(name, aName);
UNPIN_JAVA_STRING(name, aName);
if (retVal < 0)
h5libraryError(env);
if (retVal < 0)
h5libraryError(env);
}
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen_1by_1idx */
@ -421,15 +426,16 @@ Java_hdf_hdf5lib_H5__1H5Acreate_1by_1name
const char *aName;
const char *attrName;
PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName, -1);
PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
if (aName != NULL && attrName != NULL) {
retVal = H5Acreate_by_name((hid_t)loc_id, aName, attrName, (hid_t)type_id,
(hid_t)space_id, (hid_t)acpl_id, (hid_t)aapl_id, (hid_t)lapl_id);
retVal = H5Acreate_by_name((hid_t)loc_id, aName, attrName, (hid_t)type_id,
(hid_t)space_id, (hid_t)acpl_id, (hid_t)aapl_id, (hid_t)lapl_id);
UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
if (retVal < 0)
h5libraryError(env);
if (retVal < 0)
h5libraryError(env);
}
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Acreate_1by_1name */
@ -443,20 +449,23 @@ JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Aexists_1by_1name
(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name, jstring attr_name, jlong lapl_id)
{
htri_t retVal = -1;
htri_t bval = JNI_FALSE;
const char *aName;
const char *attrName;
PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName, JNI_FALSE);
PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
if (aName != NULL && attrName != NULL) {
bval = H5Aexists_by_name((hid_t)loc_id, aName, attrName, (hid_t)lapl_id);
retVal = H5Aexists_by_name((hid_t)loc_id, aName, attrName, (hid_t)lapl_id);
UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
if (bval > 0)
bval = JNI_TRUE;
else if (bval < 0)
h5libraryError(env);
}
if (retVal < 0)
h5libraryError(env);
return (jboolean)retVal;
return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Aexists_1by_1name */
/*
@ -472,14 +481,15 @@ Java_hdf_hdf5lib_H5_H5Arename
const char *oName;
const char *nName;
PIN_JAVA_STRING_TWO(old_attr_name, oName, new_attr_name, nName, -1);
PIN_JAVA_STRING_TWO(old_attr_name, oName, new_attr_name, nName);
if (oName != NULL && nName != NULL) {
retVal = H5Arename((hid_t)loc_id, oName, nName);
retVal = H5Arename((hid_t)loc_id, oName, nName);
UNPIN_JAVA_STRING_TWO(old_attr_name, oName, new_attr_name, nName);
UNPIN_JAVA_STRING_TWO(old_attr_name, oName, new_attr_name, nName);
if (retVal < 0)
h5libraryError(env);
if (retVal < 0)
h5libraryError(env);
}
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Arename */
@ -499,14 +509,15 @@ Java_hdf_hdf5lib_H5_H5Arename_1by_1name
const char *oName;
const char *nName;
PIN_JAVA_STRING_THREE(obj_name, aName, old_attr_name, oName, new_attr_name, nName, -1);
PIN_JAVA_STRING_THREE(obj_name, aName, old_attr_name, oName, new_attr_name, nName);
if (aName != NULL && oName != NULL && nName != NULL) {
retVal = H5Arename_by_name((hid_t)loc_id, aName, oName, nName, (hid_t)lapl_id);
retVal = H5Arename_by_name((hid_t)loc_id, aName, oName, nName, (hid_t)lapl_id);
UNPIN_JAVA_STRING_THREE(obj_name, aName, old_attr_name, oName, new_attr_name, nName);
UNPIN_JAVA_STRING_THREE(obj_name, aName, old_attr_name, oName, new_attr_name, nName);
if (retVal < 0)
h5libraryError(env);
if (retVal < 0)
h5libraryError(env);
}
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Arename_1by_1name */
@ -526,44 +537,45 @@ Java_hdf_hdf5lib_H5_H5Aget_1name_1by_1idx
jstring str = NULL;
const char *aName;
PIN_JAVA_STRING(obj_name, aName, NULL);
PIN_JAVA_STRING(obj_name, aName);
if (aName != NULL) {
/* get the length of the attribute name */
status_size = H5Aget_name_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type,
(H5_iter_order_t) order, (hsize_t) n, (char*)NULL, (size_t)0, (hid_t)lapl_id);
/* get the length of the attribute name */
status_size = H5Aget_name_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type,
(H5_iter_order_t) order, (hsize_t) n, (char*)NULL, (size_t)0, (hid_t)lapl_id);
if(status_size < 0) {
UNPIN_JAVA_STRING(obj_name, aName);
h5libraryError(env);
} /* end if */
else {
buf_size = (size_t)status_size + 1;/* add extra space for the null terminator */
aValue = (char*)HDmalloc(sizeof(char) * buf_size);
if (aValue == NULL) {
if(status_size < 0) {
UNPIN_JAVA_STRING(obj_name, aName);
h5outOfMemory(env, "H5Aget_name_by_idx: malloc failed ");
h5libraryError(env);
} /* end if */
else {
status_size = H5Aget_name_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type,
(H5_iter_order_t) order, (hsize_t) n, (char*)aValue, (size_t)buf_size, (hid_t)lapl_id);
buf_size = (size_t)status_size + 1;/* add extra space for the null terminator */
UNPIN_JAVA_STRING(obj_name, aName);
if (status_size < 0) {
HDfree(aValue);
h5libraryError(env);
aValue = (char*)HDmalloc(sizeof(char) * buf_size);
if (aValue == NULL) {
UNPIN_JAVA_STRING(obj_name, aName);
h5outOfMemory(env, "H5Aget_name_by_idx: malloc failed ");
} /* end if */
else {
str = ENVPTR->NewStringUTF(ENVPAR aValue);
HDfree(aValue);
if (str == NULL) {
/* exception -- fatal JNI error */
h5JNIFatalError(env, "H5Aget_name_by_idx: return string not created");
status_size = H5Aget_name_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type,
(H5_iter_order_t) order, (hsize_t) n, (char*)aValue, (size_t)buf_size, (hid_t)lapl_id);
UNPIN_JAVA_STRING(obj_name, aName);
if (status_size < 0) {
HDfree(aValue);
h5libraryError(env);
} /* end if */
else {
str = ENVPTR->NewStringUTF(ENVPAR aValue);
HDfree(aValue);
if (str == NULL) {
/* exception -- fatal JNI error */
h5JNIFatalError(env, "H5Aget_name_by_idx: return string not created");
} /* end if */
} /* end else */
} /* end else */
} /* end else */
} /* end else */
}
return str;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1name_1by_1idx */
@ -628,23 +640,24 @@ Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1idx
jobject ret_obj = NULL;
const char *aName;
PIN_JAVA_STRING(obj_name, aName, NULL);
PIN_JAVA_STRING(obj_name, aName);
if (aName != NULL) {
status = H5Aget_info_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type,
(H5_iter_order_t)order, (hsize_t)n, &ainfo, (hid_t)lapl_id);
status = H5Aget_info_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type,
(H5_iter_order_t)order, (hsize_t)n, &ainfo, (hid_t)lapl_id);
UNPIN_JAVA_STRING(obj_name, aName);
UNPIN_JAVA_STRING(obj_name, aName);
if (status < 0) {
h5libraryError(env);
} /* end if */
else {
args[0].z = ainfo.corder_valid;
args[1].j = ainfo.corder;
args[2].i = ainfo.cset;
args[3].j = (jlong)ainfo.data_size;
CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args);
} /* end else */
if (status < 0) {
h5libraryError(env);
} /* end if */
else {
args[0].z = ainfo.corder_valid;
args[1].j = ainfo.corder;
args[2].i = ainfo.cset;
args[3].j = (jlong)ainfo.data_size;
CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args);
} /* end else */
}
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1idx */
@ -664,22 +677,23 @@ Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name
jvalue args[4];
jobject ret_obj = NULL;
PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName, NULL);
PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
if (aName != NULL && attrName != NULL) {
status = H5Aget_info_by_name((hid_t)loc_id, aName, attrName, &ainfo, (hid_t)lapl_id);
status = H5Aget_info_by_name((hid_t)loc_id, aName, attrName, &ainfo, (hid_t)lapl_id);
UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
if (status < 0) {
h5libraryError(env);
} /* end if */
else {
args[0].z = ainfo.corder_valid;
args[1].j = ainfo.corder;
args[2].i = ainfo.cset;
args[3].j = (jlong)ainfo.data_size;
CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args);
} /* end else */
if (status < 0) {
h5libraryError(env);
} /* end if */
else {
args[0].z = ainfo.corder_valid;
args[1].j = ainfo.corder;
args[2].i = ainfo.cset;
args[3].j = (jlong)ainfo.data_size;
CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args);
} /* end else */
}
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name */
@ -696,14 +710,15 @@ Java_hdf_hdf5lib_H5_H5Adelete_1by_1name
const char *aName;
const char *attrName;
PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName, -1);
PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
if (aName != NULL && attrName != NULL) {
retVal = H5Adelete_by_name((hid_t)loc_id, aName, attrName, (hid_t)lapl_id);
retVal = H5Adelete_by_name((hid_t)loc_id, aName, attrName, (hid_t)lapl_id);
UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName);
if (retVal < 0)
h5libraryError(env);
if (retVal < 0)
h5libraryError(env);
}
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Adelete_1by_1name */
@ -720,16 +735,17 @@ Java_hdf_hdf5lib_H5_H5Aexists
htri_t bval = JNI_FALSE;
const char *aName;
PIN_JAVA_STRING(attr_name, aName, JNI_FALSE);
PIN_JAVA_STRING(attr_name, aName);
if (aName != NULL) {
bval = H5Aexists((hid_t)obj_id, aName);
bval = H5Aexists((hid_t)obj_id, aName);
UNPIN_JAVA_STRING(attr_name, aName);
UNPIN_JAVA_STRING(attr_name, aName);
if (bval > 0)
bval = JNI_TRUE;
else if (bval < 0)
h5libraryError(env);
if (bval > 0)
bval = JNI_TRUE;
else if (bval < 0)
h5libraryError(env);
}
return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Aexists */
@ -746,14 +762,15 @@ Java_hdf_hdf5lib_H5_H5Adelete_1by_1idx
herr_t status = -1;
const char *aName;
PIN_JAVA_STRING0(obj_name, aName);
PIN_JAVA_STRING(obj_name, aName);
if (aName != NULL) {
status = H5Adelete_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type, (H5_iter_order_t)order, (hsize_t)n, (hid_t)lapl_id);
status = H5Adelete_by_idx((hid_t)loc_id, aName, (H5_index_t)idx_type, (H5_iter_order_t)order, (hsize_t)n, (hid_t)lapl_id);
UNPIN_JAVA_STRING(obj_name, aName);
UNPIN_JAVA_STRING(obj_name, aName);
if (status < 0)
h5libraryError(env);
if (status < 0)
h5libraryError(env);
}
} /* end Java_hdf_hdf5lib_H5_H5Adelete_1by_1idx */
/*
@ -770,14 +787,15 @@ Java_hdf_hdf5lib_H5__1H5Aopen_1by_1name
const char *aName;
const char *oName;
PIN_JAVA_STRING_TWO(obj_name, oName, attr_name, aName, -1);
PIN_JAVA_STRING_TWO(obj_name, oName, attr_name, aName);
if (oName != NULL && aName != NULL) {
status = H5Aopen_by_name((hid_t)loc_id, oName, aName, (hid_t)aapl_id, (hid_t)lapl_id);
status = H5Aopen_by_name((hid_t)loc_id, oName, aName, (hid_t)aapl_id, (hid_t)lapl_id);
UNPIN_JAVA_STRING_TWO(obj_name, oName, attr_name, aName);
UNPIN_JAVA_STRING_TWO(obj_name, oName, attr_name, aName);
if (status < 0)
h5libraryError(env);
if (status < 0)
h5libraryError(env);
}
return (jlong)status;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen_1by_1name */
@ -892,14 +910,15 @@ Java_hdf_hdf5lib_H5_H5Aiterate_1by_1name
h5nullArgument(env, "H5Literate_by_name: op_data or callback_op is NULL");
} /* end if */
else {
PIN_JAVA_STRING(name, lName, -1);
PIN_JAVA_STRING(name, lName);
if (lName != NULL) {
status = H5Aiterate_by_name((hid_t)grp_id, lName, (H5_index_t)idx_type, (H5_iter_order_t)order, (hsize_t*)&start_idx, (H5A_operator2_t)H5A_iterate_cb, (void*)op_data, (hid_t)access_id);
status = H5Aiterate_by_name((hid_t)grp_id, lName, (H5_index_t)idx_type, (H5_iter_order_t)order, (hsize_t*)&start_idx, (H5A_operator2_t)H5A_iterate_cb, (void*)op_data, (hid_t)access_id);
UNPIN_JAVA_STRING(name, lName);
UNPIN_JAVA_STRING(name, lName);
if (status < 0)
h5libraryError(env);
if (status < 0)
h5libraryError(env);
}
} /* end else */
return (jint)status;

View File

@ -161,14 +161,15 @@ Java_hdf_hdf5lib_H5__1H5Dcreate
hid_t dset_id = -1;
const char *fileName;
PIN_JAVA_STRING(name, fileName, -1);
PIN_JAVA_STRING(name, fileName);
if (fileName != NULL) {
dset_id = H5Dcreate2((hid_t)loc_id, fileName, (hid_t)type_id, (hid_t)space_id, H5P_DEFAULT, (hid_t)create_plist_id, H5P_DEFAULT);
dset_id = H5Dcreate2((hid_t)loc_id, fileName, (hid_t)type_id, (hid_t)space_id, H5P_DEFAULT, (hid_t)create_plist_id, H5P_DEFAULT);
UNPIN_JAVA_STRING(name, fileName);
UNPIN_JAVA_STRING(name, fileName);
if (dset_id < 0)
h5libraryError(env);
if (dset_id < 0)
h5libraryError(env);
}
return (jlong)dset_id;
} /* end Java_hdf_hdf5lib_H5__1H5Dcreate */
@ -185,13 +186,14 @@ Java_hdf_hdf5lib_H5__1H5Dopen
hid_t dset_id = -1;
const char *fileName;
PIN_JAVA_STRING(name, fileName, -1);
PIN_JAVA_STRING(name, fileName);
if (fileName != NULL) {
dset_id = H5Dopen2((hid_t)loc_id, fileName, H5P_DEFAULT);
dset_id = H5Dopen2((hid_t)loc_id, fileName, H5P_DEFAULT);
UNPIN_JAVA_STRING(name, fileName);
if (dset_id < 0)
h5libraryError(env);
UNPIN_JAVA_STRING(name, fileName);
if (dset_id < 0)
h5libraryError(env);
}
return (jlong)dset_id;
} /* end Java_hdf_hdf5lib_H5__1H5Dopen */
@ -285,7 +287,7 @@ Java_hdf_hdf5lib_H5_H5Dread
(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id, jlong mem_space_id,
jlong file_space_id, jlong xfer_plist_id, jbyteArray buf, jboolean isCriticalPinning)
{
herr_t status;
herr_t status = -1;
jbyte *buffP;
jboolean isCopy;
htri_t data_class;
@ -341,7 +343,7 @@ Java_hdf_hdf5lib_H5_H5Dwrite
(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id, jlong mem_space_id,
jlong file_space_id, jlong xfer_plist_id, jbyteArray buf, jboolean isCriticalPinning)
{
herr_t status;
herr_t status = -1;
jbyte *buffP;
jboolean isCopy;
htri_t data_class;
@ -1151,7 +1153,7 @@ Java_hdf_hdf5lib_H5_H5Dread_1VLStrings
h5nullArgument(env, "H5Dread_VLStrings: buf is NULL");
} /* end if */
else {
isVlenStr = H5Tis_variable_str((hid_t)mem_type_id);
isVlenStr = H5Tdetect_class((hid_t)mem_type_id, H5T_STRING);
if (isVlenStr) {
status = H5DreadVL_str(env, (hid_t)dataset_id, (hid_t)mem_type_id,
@ -1445,13 +1447,14 @@ Java_hdf_hdf5lib_H5__1H5Dcreate2
hid_t dset_id = -1;
const char *fileName;
PIN_JAVA_STRING(name, fileName, -1);
PIN_JAVA_STRING(name, fileName);
if (fileName != NULL) {
dset_id = H5Dcreate2((hid_t)loc_id, fileName, (hid_t)type_id, (hid_t)space_id, (hid_t)link_plist_id, (hid_t)create_plist_id, (hid_t)access_plist_id);
dset_id = H5Dcreate2((hid_t)loc_id, fileName, (hid_t)type_id, (hid_t)space_id, (hid_t)link_plist_id, (hid_t)create_plist_id, (hid_t)access_plist_id);
UNPIN_JAVA_STRING(name, fileName);
if (dset_id < 0)
h5libraryError(env);
UNPIN_JAVA_STRING(name, fileName);
if (dset_id < 0)
h5libraryError(env);
}
return (jlong)dset_id;
} /* end Java_hdf_hdf5lib_H5__1H5Dcreate2 */
@ -1465,16 +1468,17 @@ JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Dopen2
(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_plist)
{
hid_t dset_id;
hid_t dset_id = -1;
const char *fileName;
PIN_JAVA_STRING(name, fileName, -1);
PIN_JAVA_STRING(name, fileName);
if (fileName != NULL) {
dset_id = H5Dopen2((hid_t)loc_id, fileName, (hid_t)access_plist);
dset_id = H5Dopen2((hid_t)loc_id, fileName, (hid_t)access_plist);
UNPIN_JAVA_STRING(name, fileName);
if (dset_id < 0)
h5libraryError(env);
UNPIN_JAVA_STRING(name, fileName);
if (dset_id < 0)
h5libraryError(env);
}
return (jlong)dset_id;
} /* end Java_hdf_hdf5lib_H5__1H5Dopen2 */
@ -1585,39 +1589,40 @@ Java_hdf_hdf5lib_H5_H5Dfill
if (buf == NULL) {
h5nullArgument(env, "H5Dfill: buf is NULL");
return;
} /* end if */
buffP = ENVPTR->GetByteArrayElements(ENVPAR buf, &isCopy2);
if (buffP == NULL) {
h5JNIFatalError(env, "H5Dfill: buf not pinned");
return;
} /* end if */
if(fill) {
fillP = ENVPTR->GetByteArrayElements(ENVPAR fill, &isCopy1);
if (fillP == NULL) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, JNI_ABORT);
h5JNIFatalError( env, "H5Dfill: fill not pinned");
return;
} /* end if */
} /* end if */
else
fillP = NULL;
status = H5Dfill((const void*)fillP, (hid_t)fill_type_id, (void*)buffP, (hid_t)buf_type_id, (hid_t)space_id);
if(fillP) {
/* free the buffer without copying back */
/* end if */ ENVPTR->ReleaseByteArrayElements(ENVPAR fill, fillP, JNI_ABORT);
}
if (status < 0) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, JNI_ABORT);
h5libraryError(env);
} /* end if */
else {
if (isCopy2 == JNI_TRUE) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, 0);
buffP = ENVPTR->GetByteArrayElements(ENVPAR buf, &isCopy2);
if (buffP == NULL) {
h5JNIFatalError(env, "H5Dfill: buf not pinned");
} /* end if */
} /* end else */
else {
if(fill) {
fillP = ENVPTR->GetByteArrayElements(ENVPAR fill, &isCopy1);
if (fillP == NULL) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, JNI_ABORT);
h5JNIFatalError( env, "H5Dfill: fill not pinned");
return;
} /* end if */
} /* end if */
else
fillP = NULL;
status = H5Dfill((const void*)fillP, (hid_t)fill_type_id, (void*)buffP, (hid_t)buf_type_id, (hid_t)space_id);
if(fillP) {
/* free the buffer without copying back */
ENVPTR->ReleaseByteArrayElements(ENVPAR fill, fillP, JNI_ABORT);
} /* end if */
if (status < 0) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, JNI_ABORT);
h5libraryError(env);
} /* end if */
else {
if (isCopy2 == JNI_TRUE) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, 0);
} /* end if */
} /* end else */
}
}
} /* end Java_hdf_hdf5lib_H5_H5Dfill */
/*
@ -1638,35 +1643,35 @@ Java_hdf_hdf5lib_H5_H5Dset_1extent
if (buf == NULL) {
h5nullArgument(env, "H5Dset_extent: buf is NULL");
return;
} /* end if */
rank = ENVPTR->GetArrayLength(ENVPAR buf);
if (rank <= 0) {
h5JNIFatalError(env, "H5Dset_extent: rank <=0");
} /* end if */
else {
buffP = ENVPTR->GetLongArrayElements(ENVPAR buf, &isCopy);
if (buffP == NULL) {
h5JNIFatalError( env, "H5Dset_extent: buf not pinned");
rank = ENVPTR->GetArrayLength(ENVPAR buf);
if (rank <= 0) {
h5JNIFatalError(env, "H5Dset_extent: rank <=0");
} /* end if */
else {
dims = (hsize_t*)HDmalloc((size_t)rank * sizeof(hsize_t));
for (i = 0; i< rank; i++)
dims[i] = (hsize_t)buffP[i];
status = H5Dset_extent((hid_t)loc_id, (hsize_t*)dims);
HDfree (dims);
/* free the buffer without copying back */
ENVPTR->ReleaseLongArrayElements(ENVPAR buf, buffP, JNI_ABORT);
if (status < 0) {
h5libraryError(env);
buffP = ENVPTR->GetLongArrayElements(ENVPAR buf, &isCopy);
if (buffP == NULL) {
h5JNIFatalError( env, "H5Dset_extent: buf not pinned");
} /* end if */
else {
dims = (hsize_t*)HDmalloc((size_t)rank * sizeof(hsize_t));
for (i = 0; i< rank; i++)
dims[i] = (hsize_t)buffP[i];
status = H5Dset_extent((hid_t)loc_id, (hsize_t*)dims);
HDfree (dims);
/* free the buffer without copying back */
ENVPTR->ReleaseLongArrayElements(ENVPAR buf, buffP, JNI_ABORT);
if (status < 0) {
h5libraryError(env);
} /* end if */
} /* end else */
} /* end else */
} /* end else */
}
} /* end Java_hdf_hdf5lib_H5_H5Dset_1extent */
static herr_t
@ -1747,34 +1752,32 @@ Java_hdf_hdf5lib_H5_H5Diterate
if (op_data == NULL) {
h5nullArgument(env, "H5Diterate: op_data is NULL");
return -1;
} /* end if */
if (callback_op == NULL) {
else if (callback_op == NULL) {
h5nullArgument(env, "H5Diterate: callback_op is NULL");
return -1;
} /* end if */
if (buf == NULL) {
else if (buf == NULL) {
h5nullArgument(env, "H5Diterate: buf is NULL");
return -1;
} /* end if */
buffP = ENVPTR->GetByteArrayElements(ENVPAR buf, &isCopy);
if (buffP == NULL) {
h5JNIFatalError(env, "H5Diterate: buf not pinned");
} /* end if */
else {
status = H5Diterate((void*)buffP, (hid_t)buf_type, (hid_t)space, (H5D_operator_t)H5D_iterate_cb, (void*)op_data);
if (status < 0) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, JNI_ABORT);
h5libraryError(env);
buffP = ENVPTR->GetByteArrayElements(ENVPAR buf, &isCopy);
if (buffP == NULL) {
h5JNIFatalError(env, "H5Diterate: buf not pinned");
} /* end if */
else {
if (isCopy == JNI_TRUE) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, 0);
status = H5Diterate((void*)buffP, (hid_t)buf_type, (hid_t)space, (H5D_operator_t)H5D_iterate_cb, (void*)op_data);
if (status < 0) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, JNI_ABORT);
h5libraryError(env);
} /* end if */
else {
if (isCopy == JNI_TRUE) {
ENVPTR->ReleaseByteArrayElements(ENVPAR buf, buffP, 0);
} /* end if */
} /* end else */
} /* end else */
} /* end else */
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Diterate */
@ -1786,7 +1789,7 @@ Java_hdf_hdf5lib_H5_H5Diterate
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Dflush
(JNIEnv *env, jclass clss, jlong loc_id)
(JNIEnv *env, jclass clss, jlong loc_id)
{
if (H5Dflush((hid_t)loc_id) < 0)
h5libraryError(env);
@ -1799,7 +1802,7 @@ Java_hdf_hdf5lib_H5_H5Dflush
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Drefresh
(JNIEnv *env, jclass clss, jlong loc_id)
(JNIEnv *env, jclass clss, jlong loc_id)
{
if (H5Drefresh((hid_t)loc_id) < 0)
h5libraryError(env);

Some files were not shown because too many files have changed in this diff Show More