From 42efc1c2b591e4cd45ec6cb3bdf32044343118d2 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 24 Mar 2010 22:51:41 -0500 Subject: [svn-r18451] Description: Bring r18172:18446 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode --- COPYING | 2 +- MANIFEST | 47 +- Makefile.in | 6 +- README.txt | 2 +- bin/README | 2 + bin/buildhdf5 | 2 +- bin/snapshot | 16 +- c++/src/H5Attribute.cpp | 2 +- c++/src/H5DataSet.cpp | 14 +- c++/src/H5DataType.cpp | 2 +- c++/src/H5Group.cpp | 2 +- c++/src/H5Object.cpp | 2 +- c++/src/Makefile.in | 2 +- c++/test/H5srcdir_str.h.in | 22 + c++/test/Makefile.am | 8 +- c++/test/Makefile.in | 38 +- c++/test/dsets.cpp | 46 +- c++/test/h5cpputil.h | 4 +- c++/test/tattr.cpp | 26 +- c++/test/tcompound.cpp | 2 +- c++/test/testhdf5.cpp | 24 +- c++/test/tfile.cpp | 10 +- c++/test/tfilter.cpp | 2 +- c++/test/th5s.cpp | 23 +- c++/test/tlinks.cpp | 6 +- c++/test/trefer.cpp | 6 +- c++/test/ttypes.cpp | 2 +- c++/test/tvlstr.cpp | 20 +- config/lt_vers.am | 2 +- configure | 27 +- configure.in | 5 +- fortran/examples/attrexample.f90 | 58 +- fortran/examples/compound.f90 | 44 +- fortran/examples/dsetexample.f90 | 30 +- fortran/examples/fileexample.f90 | 16 +- fortran/examples/groupexample.f90 | 22 +- fortran/examples/grpdsetexample.f90 | 32 +- fortran/examples/grpit.f90 | 38 +- fortran/examples/grpsexample.f90 | 32 +- fortran/examples/hyperslab.f90 | 68 +- fortran/examples/mountexample.f90 | 80 +- fortran/examples/ph5example.f90 | 42 +- fortran/examples/refobjexample.f90 | 58 +- fortran/examples/refregexample.f90 | 88 +- fortran/examples/rwdsetexample.f90 | 34 +- fortran/examples/selectele.f90 | 96 +- fortran/src/H5Aff.f90 | 1148 ++++---- fortran/src/H5Df.c | 2 +- fortran/src/H5Dff.f90 | 2362 ++++++++-------- fortran/src/H5Ef.c | 30 +- fortran/src/H5Eff.f90 | 142 +- fortran/src/H5FDmpioff.f90 | 122 +- fortran/src/H5Ff.c | 2 +- fortran/src/H5Fff.f90 | 502 ++-- fortran/src/H5Gff.f90 | 608 ++-- fortran/src/H5If.c | 4 +- fortran/src/H5Iff.f90 | 132 +- fortran/src/H5Lff.f90 | 424 +-- fortran/src/H5Off.f90 | 62 +- fortran/src/H5Pf.c | 12 +- fortran/src/H5Pff.f90 | 2986 ++++++++++---------- fortran/src/H5Rff.f90 | 338 +-- fortran/src/H5Sf.c | 14 +- fortran/src/H5Sff.f90 | 1092 +++---- fortran/src/H5Tff.f90 | 1585 +++++------ fortran/src/H5Zff.f90 | 86 +- fortran/src/H5_DBLE_InterfaceExclude.f90 | 6 +- fortran/src/H5_DBLE_InterfaceInclude.f90 | 742 ++--- fortran/src/H5_ff.f90 | 136 +- fortran/src/H5f90global.f90 | 142 +- fortran/src/H5match_types.c | 12 +- fortran/src/H5test_kind.f90 | 30 +- fortran/src/H5test_kind_SIZEOF.f90 | 18 +- fortran/src/HDF5.f90 | 4 +- fortran/src/HDF5mpio.f90 | 4 +- fortran/src/Makefile.in | 2 +- fortran/test/fflush1.f90 | 48 +- fortran/test/fflush2.f90 | 42 +- fortran/test/fortranlib_test.f90 | 30 +- fortran/test/fortranlib_test_1_8.f90 | 50 +- fortran/test/t.c | 4 +- fortran/test/tH5A.f90 | 150 +- fortran/test/tH5A_1_8.f90 | 298 +- fortran/test/tH5D.f90 | 110 +- fortran/test/tH5E.f90 | 24 +- fortran/test/tH5F.f90 | 178 +- fortran/test/tH5G.f90 | 86 +- fortran/test/tH5G_1_8.f90 | 192 +- fortran/test/tH5I.f90 | 76 +- fortran/test/tH5O.f90 | 56 +- fortran/test/tH5P.f90 | 122 +- fortran/test/tH5R.f90 | 180 +- fortran/test/tH5S.f90 | 92 +- fortran/test/tH5Sselect.f90 | 330 +-- fortran/test/tH5T.f90 | 168 +- fortran/test/tH5VL.f90 | 126 +- fortran/test/tH5Z.f90 | 92 +- fortran/test/tf.f90 | 104 +- fortran/testpar/hyper.f90 | 26 +- fortran/testpar/mdset.f90 | 26 +- fortran/testpar/ptest.f90 | 14 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/examples/exlite.f90 | 18 +- hl/fortran/src/H5IMfc.c | 58 +- hl/fortran/src/H5IMff.f90 | 212 +- hl/fortran/src/H5LTfc.c | 72 +- hl/fortran/src/H5LTff.f90 | 1226 ++++---- hl/fortran/src/H5TBfc.c | 5 +- hl/fortran/src/H5TBff.f90 | 642 ++--- hl/fortran/src/Makefile.in | 2 +- hl/fortran/test/tstimage.f90 | 90 +- hl/fortran/test/tstlite.f90 | 162 +- hl/fortran/test/tsttable.f90 | 44 +- hl/src/H5DS.c | 82 +- hl/src/H5IM.c | 6 +- hl/src/H5LT.c | 2 +- hl/src/H5LTparse.c | 60 +- hl/src/H5PT.c | 4 +- hl/src/H5TB.c | 48 +- hl/src/Makefile.in | 2 +- hl/test/H5srcdir_str.h.in | 22 + hl/test/Makefile.in | 8 +- hl/test/gen_test_ds.c | 126 +- hl/test/test_ds.c | 509 ++-- hl/test/test_image.c | 45 +- hl/test/test_lite.c | 13 +- hl/test/test_table.c | 18 +- perform/perf_meta.c | 4 +- perform/sio_perf.h | 1 - release_docs/INSTALL_Cygwin.txt | 2 + release_docs/INSTALL_Windows.txt | 74 +- release_docs/INSTALL_Windows_From_Command_Line.txt | 26 +- release_docs/INSTALL_Windows_Short_VS2005.TXT | 182 +- release_docs/RELEASE.txt | 21 +- src/H5.c | 2 + src/H5AC.c | 94 +- src/H5Abtree2.c | 16 +- src/H5Aint.c | 29 +- src/H5Apkg.h | 2 +- src/H5Atest.c | 1 + src/H5B.c | 519 ++-- src/H5B2.c | 4 +- src/H5B2hdr.c | 5 +- src/H5B2pkg.h | 6 +- src/H5Bcache.c | 124 +- src/H5Bdbg.c | 7 +- src/H5Bpkg.h | 12 +- src/H5Bprivate.h | 27 +- src/H5C.c | 2707 +----------------- src/H5Cpkg.h | 2612 ++++++++++++++++- src/H5Cpublic.h | 2 +- src/H5D.c | 10 +- src/H5Dbtree.c | 75 +- src/H5Dchunk.c | 290 +- src/H5Dcontig.c | 4 +- src/H5Ddeprec.c | 11 +- src/H5Dint.c | 62 +- src/H5Dio.c | 2 +- src/H5Dlayout.c | 2 +- src/H5Doh.c | 20 +- src/H5Dpkg.h | 6 +- src/H5Dproxy.c | 1 + src/H5EA.c | 2 +- src/H5EAhdr.c | 2 +- src/H5F.c | 83 +- src/H5FA.c | 4 +- src/H5FAcache.c | 6 +- src/H5FAdblkpage.c | 2 +- src/H5FAhdr.c | 6 +- src/H5FApkg.h | 2 +- src/H5FAprivate.h | 4 +- src/H5FAtest.c | 4 +- src/H5FDcore.c | 125 +- src/H5FDfamily.c | 42 +- src/H5FS.c | 8 +- src/H5FSprivate.h | 2 +- src/H5FSsection.c | 2 +- src/H5Fpkg.h | 1 + src/H5Fsuper.c | 11 +- src/H5Fsuper_cache.c | 52 +- src/H5Gdense.c | 18 +- src/H5Gdeprec.c | 2 +- src/H5Glink.c | 96 +- src/H5Gloc.c | 91 +- src/H5Gnode.c | 61 +- src/H5Gpkg.h | 6 +- src/H5Gprivate.h | 2 + src/H5Groot.c | 5 +- src/H5Gtraverse.c | 104 +- src/H5HF.c | 4 +- src/H5HFdblock.c | 2 +- src/H5HFhdr.c | 2 +- src/H5HFhuge.c | 4 +- src/H5HFiblock.c | 4 +- src/H5HFiter.c | 14 +- src/H5HFman.c | 19 +- src/H5HFpkg.h | 3 +- src/H5HFsection.c | 15 +- src/H5HG.c | 13 +- src/H5HLcache.c | 22 +- src/H5I.c | 39 + src/H5Iprivate.h | 1 + src/H5Lexternal.c | 20 +- src/H5MF.c | 5 +- src/H5MFaggr.c | 8 +- src/H5MFsection.c | 2 +- src/H5MM.c | 31 +- src/H5MP.c | 34 +- src/H5O.c | 44 +- src/H5Oainfo.c | 6 +- src/H5Oalloc.c | 2 +- src/H5Oattr.c | 11 +- src/H5Ocopy.c | 33 +- src/H5Odbg.c | 7 +- src/H5Oefl.c | 58 +- src/H5Ofsinfo.c | 2 +- src/H5Olink.c | 8 + src/H5Oname.c | 6 +- src/H5Opkg.h | 3 +- src/H5Oprivate.h | 7 +- src/H5Opublic.h | 1 + src/H5Osdspace.c | 24 +- src/H5Oshared.c | 2 +- src/H5P.c | 72 +- src/H5Pdapl.c | 6 +- src/H5Pdcpl.c | 11 +- src/H5Pdeprec.c | 22 +- src/H5Pdxpl.c | 42 +- src/H5Pfapl.c | 39 +- src/H5Pfcpl.c | 26 +- src/H5Pfmpl.c | 2 +- src/H5Pgcpl.c | 6 +- src/H5Pint.c | 1024 ++++--- src/H5Plapl.c | 14 +- src/H5Plcpl.c | 3 +- src/H5Pocpl.c | 12 +- src/H5Pocpypl.c | 3 +- src/H5Ppkg.h | 25 +- src/H5Pprivate.h | 5 - src/H5Pstrcpl.c | 3 +- src/H5R.c | 1 + src/H5Rdeprec.c | 1 + src/H5SMmessage.c | 6 +- src/H5Shyper.c | 140 +- src/H5Spoint.c | 58 +- src/H5T.c | 9 +- src/H5Tcommit.c | 1 + src/H5Tconv.c | 2 + src/H5Tdeprec.c | 1 + src/H5Tenum.c | 15 +- src/H5Tnative.c | 4 +- src/H5Tvlen.c | 13 +- src/H5Zscaleoffset.c | 1 + src/H5detect.c | 101 +- src/H5make_libsettings.c | 278 ++ src/H5private.h | 3 +- src/H5public.h | 4 +- src/H5system.c | 4 +- src/H5trace.c | 149 +- src/Makefile.am | 18 +- src/Makefile.in | 31 +- test/H5srcdir.h | 74 + test/H5srcdir_str.h.in | 22 + test/Makefile.am | 2 +- test/Makefile.in | 50 +- test/cache.c | 1034 ++++--- test/cache_common.c | 130 +- test/cache_common.h | 25 +- test/cross_read.c | 12 +- test/dsets.c | 344 ++- test/dtransform.c | 451 +-- test/dtypes.c | 588 ++-- test/err_compat.c | 19 +- test/error_test.c | 31 +- test/external.c | 16 +- test/farray.c | 24 +- test/fillval.c | 12 +- test/gen_filespace.c | 8 +- test/h5test.c | 27 +- test/h5test.h | 20 +- test/hyperslab.c | 1715 +++++------ test/links.c | 1130 +++++--- test/mf.c | 70 +- test/mtime.c | 17 +- test/ntypes.c | 12 +- test/objcopy.c | 263 +- test/ohdr.c | 23 +- test/set_extent.c | 2190 +++++++------- test/tarray.c | 10 +- test/tattr.c | 72 +- test/tconfig.c | 2 +- test/testhdf5.h | 33 +- test/tfile.c | 101 +- test/tgenprop.c | 48 +- test/th5s.c | 10 +- test/tmisc.c | 43 +- test/trefstr.c | 1 + test/tselect.c | 465 +-- test/tsohm.c | 16 +- test/tvlstr.c | 82 +- test/vfd.c | 2 +- testpar/t_cache.c | 58 +- testpar/t_chunk_alloc.c | 2 +- tools/h5copy/h5copygentest.c | 537 +++- tools/h5copy/testfiles/h5copy_extlinks_src.h5 | Bin 0 -> 2184 bytes tools/h5copy/testfiles/h5copy_extlinks_src.out.ls | 42 + tools/h5copy/testfiles/h5copy_extlinks_trg.h5 | Bin 0 -> 2168 bytes tools/h5copy/testfiles/h5copy_ref.h5 | Bin 0 -> 9104 bytes tools/h5copy/testfiles/h5copy_ref.out.ls | 34 + tools/h5copy/testfiles/h5copytst.out.ls | 4 +- tools/h5copy/testh5copy.sh | 109 +- tools/h5diff/h5diff_common.c | 124 +- tools/h5diff/h5diff_main.c | 1 + tools/h5diff/h5diffgentest.c | 968 ++++++- tools/h5diff/testfiles/h5diff_10.txt | 99 +- tools/h5diff/testfiles/h5diff_100.txt | 1 + tools/h5diff/testfiles/h5diff_101.txt | 1 + tools/h5diff/testfiles/h5diff_102.txt | 1 + tools/h5diff/testfiles/h5diff_11.txt | 1 + tools/h5diff/testfiles/h5diff_12.txt | 1 + tools/h5diff/testfiles/h5diff_13.txt | 1 + tools/h5diff/testfiles/h5diff_14.txt | 1 + tools/h5diff/testfiles/h5diff_15.txt | 1 + tools/h5diff/testfiles/h5diff_16_1.txt | 1 + tools/h5diff/testfiles/h5diff_16_2.txt | 1 + tools/h5diff/testfiles/h5diff_16_3.txt | 1 + tools/h5diff/testfiles/h5diff_17.txt | 1 + tools/h5diff/testfiles/h5diff_171.txt | 1 + tools/h5diff/testfiles/h5diff_172.txt | 1 + tools/h5diff/testfiles/h5diff_18.txt | 1 + tools/h5diff/testfiles/h5diff_18_1.txt | 2 + tools/h5diff/testfiles/h5diff_19.txt | 1 + tools/h5diff/testfiles/h5diff_20.txt | 1 + tools/h5diff/testfiles/h5diff_200.txt | 1 + tools/h5diff/testfiles/h5diff_201.txt | 1 + tools/h5diff/testfiles/h5diff_202.txt | 1 + tools/h5diff/testfiles/h5diff_203.txt | 1 + tools/h5diff/testfiles/h5diff_204.txt | 1 + tools/h5diff/testfiles/h5diff_205.txt | 1 + tools/h5diff/testfiles/h5diff_206.txt | 1 + tools/h5diff/testfiles/h5diff_207.txt | 1 + tools/h5diff/testfiles/h5diff_21.txt | 1 + tools/h5diff/testfiles/h5diff_22.txt | 1 + tools/h5diff/testfiles/h5diff_23.txt | 1 + tools/h5diff/testfiles/h5diff_24.txt | 1 + tools/h5diff/testfiles/h5diff_25.txt | 1 + tools/h5diff/testfiles/h5diff_26.txt | 1 + tools/h5diff/testfiles/h5diff_27.txt | 1 + tools/h5diff/testfiles/h5diff_28.txt | 1 + tools/h5diff/testfiles/h5diff_300.txt | 1 + tools/h5diff/testfiles/h5diff_400.txt | 20 +- tools/h5diff/testfiles/h5diff_401.txt | 5 +- tools/h5diff/testfiles/h5diff_402.txt | 5 +- tools/h5diff/testfiles/h5diff_403.txt | 5 +- tools/h5diff/testfiles/h5diff_404.txt | 16 +- tools/h5diff/testfiles/h5diff_405.txt | 5 +- tools/h5diff/testfiles/h5diff_406.txt | 5 +- tools/h5diff/testfiles/h5diff_407.txt | 5 +- tools/h5diff/testfiles/h5diff_408.txt | 5 +- tools/h5diff/testfiles/h5diff_409.txt | 5 +- tools/h5diff/testfiles/h5diff_410.txt | 25 +- tools/h5diff/testfiles/h5diff_411.txt | 5 +- tools/h5diff/testfiles/h5diff_412.txt | 5 +- tools/h5diff/testfiles/h5diff_413.txt | 5 +- tools/h5diff/testfiles/h5diff_414.txt | 3 +- tools/h5diff/testfiles/h5diff_415.txt | 3 +- tools/h5diff/testfiles/h5diff_416.txt | 3 +- tools/h5diff/testfiles/h5diff_417.txt | 9 +- tools/h5diff/testfiles/h5diff_418.txt | 9 +- tools/h5diff/testfiles/h5diff_419.txt | 5 +- tools/h5diff/testfiles/h5diff_420.txt | 5 +- tools/h5diff/testfiles/h5diff_421.txt | 5 +- tools/h5diff/testfiles/h5diff_422.txt | 5 +- tools/h5diff/testfiles/h5diff_423.txt | 5 +- tools/h5diff/testfiles/h5diff_424.txt | 5 +- tools/h5diff/testfiles/h5diff_425.txt | 5 +- tools/h5diff/testfiles/h5diff_450.txt | 35 + tools/h5diff/testfiles/h5diff_451.txt | 28 + tools/h5diff/testfiles/h5diff_452.txt | 2 + tools/h5diff/testfiles/h5diff_453.txt | 47 + tools/h5diff/testfiles/h5diff_454.txt | 2 + tools/h5diff/testfiles/h5diff_455.txt | 2 + tools/h5diff/testfiles/h5diff_456.txt | 32 + tools/h5diff/testfiles/h5diff_457.txt | 2 + tools/h5diff/testfiles/h5diff_458.txt | 2 + tools/h5diff/testfiles/h5diff_459.txt | 2 + tools/h5diff/testfiles/h5diff_50.txt | 1 + tools/h5diff/testfiles/h5diff_51.txt | 1 + tools/h5diff/testfiles/h5diff_52.txt | 1 + tools/h5diff/testfiles/h5diff_53.txt | 1 + tools/h5diff/testfiles/h5diff_54.txt | 1 + tools/h5diff/testfiles/h5diff_55.txt | 1 + tools/h5diff/testfiles/h5diff_56.txt | 1 + tools/h5diff/testfiles/h5diff_57.txt | 1 + tools/h5diff/testfiles/h5diff_58.txt | 1 + tools/h5diff/testfiles/h5diff_600.txt | 99 +- tools/h5diff/testfiles/h5diff_603.txt | 99 +- tools/h5diff/testfiles/h5diff_604.txt | 1 + tools/h5diff/testfiles/h5diff_605.txt | 1 + tools/h5diff/testfiles/h5diff_606.txt | 99 +- tools/h5diff/testfiles/h5diff_607.txt | 1 + tools/h5diff/testfiles/h5diff_608.txt | 1 + tools/h5diff/testfiles/h5diff_609.txt | 1 + tools/h5diff/testfiles/h5diff_610.txt | 1 + tools/h5diff/testfiles/h5diff_612.txt | 99 +- tools/h5diff/testfiles/h5diff_613.txt | 1 + tools/h5diff/testfiles/h5diff_614.txt | 1 + tools/h5diff/testfiles/h5diff_615.txt | 99 +- tools/h5diff/testfiles/h5diff_616.txt | 1 + tools/h5diff/testfiles/h5diff_617.txt | 1 + tools/h5diff/testfiles/h5diff_618.txt | 1 + tools/h5diff/testfiles/h5diff_619.txt | 1 + tools/h5diff/testfiles/h5diff_621.txt | 99 +- tools/h5diff/testfiles/h5diff_622.txt | 99 +- tools/h5diff/testfiles/h5diff_623.txt | 99 +- tools/h5diff/testfiles/h5diff_624.txt | 99 +- tools/h5diff/testfiles/h5diff_625.txt | 1 + tools/h5diff/testfiles/h5diff_626.txt | 1 + tools/h5diff/testfiles/h5diff_627.txt | 1 + tools/h5diff/testfiles/h5diff_628.txt | 1 + tools/h5diff/testfiles/h5diff_629.txt | 1 + tools/h5diff/testfiles/h5diff_70.txt | 1 + tools/h5diff/testfiles/h5diff_80.txt | 1 + tools/h5diff/testfiles/h5diff_90.txt | 1 + tools/h5diff/testfiles/h5diff_danglelinks1.h5 | Bin 0 -> 5012 bytes tools/h5diff/testfiles/h5diff_danglelinks2.h5 | Bin 0 -> 5012 bytes tools/h5diff/testfiles/h5diff_idx.txt | 1 + tools/h5diff/testh5diff.sh | 189 +- tools/h5dump/h5dump.c | 132 +- tools/h5dump/h5dumpgentest.c | 2 +- tools/h5import/h5import.c | 20 +- tools/h5import/h5import.h | 2 +- tools/h5jam/h5jamgentest.c | 2 +- tools/h5jam/h5unjam.c | 59 +- tools/h5ls/h5ls.c | 18 +- tools/h5repack/h5repack.c | 22 +- tools/h5repack/h5repack.h | 8 +- tools/h5repack/h5repack.sh.in | 6 +- tools/h5repack/h5repack_copy.c | 234 +- tools/h5repack/h5repack_filters.c | 25 +- tools/h5repack/h5repack_main.c | 36 +- tools/h5repack/h5repack_parse.c | 2 +- tools/h5repack/h5repack_refs.c | 60 +- tools/h5repack/h5repack_verify.c | 28 +- tools/h5repack/h5repacktst.c | 472 +++- tools/h5repack/testfiles/h5repack_refs.h5 | Bin 0 -> 9280 bytes tools/h5repack/testh5repack_detect_szip.c | 2 - tools/h5stat/h5stat.c | 160 +- tools/h5stat/testfiles/h5stat_filters-UD.ddl | 8 + tools/h5stat/testfiles/h5stat_filters-UT.ddl | 13 + tools/h5stat/testfiles/h5stat_help1.ddl | 12 +- tools/h5stat/testfiles/h5stat_help2.ddl | 12 +- tools/h5stat/testfiles/h5stat_newgrat-UA.ddl | 10 + tools/h5stat/testfiles/h5stat_newgrat-UG.ddl | 8 + tools/h5stat/testh5stat.sh.in | 6 +- tools/lib/h5diff.c | 1005 +++---- tools/lib/h5diff.h | 3 +- tools/lib/h5diff_array.c | 81 +- tools/lib/h5diff_dset.c | 250 +- tools/lib/h5diff_util.c | 4 +- tools/lib/h5tools.c | 314 +- tools/lib/h5tools.h | 18 +- tools/lib/h5tools_error.h | 6 +- tools/lib/h5tools_str.c | 36 +- tools/lib/h5tools_str.h | 2 +- tools/lib/h5tools_utils.c | 12 +- tools/lib/h5trav.c | 2 +- tools/misc/h5debug.c | 4 +- vms/c++/test/make.com | 11 +- vms/src/h5pubconf.h | 30 +- vms/src/make.com | 19 +- .../c++/examples/allcppexamples/allcppexamples.sln | 4 +- .../examples/allcppexamples/allcppexamples.vcproj | 15 +- windows/c++/examples/chunkstest/chunkstest.vcproj | 39 +- .../examples/chunkstestdll/chunkstestdll.vcproj | 101 +- .../c++/examples/compoundtest/compoundtest.vcproj | 39 +- .../compoundtestdll/compoundtestdll.vcproj | 101 +- windows/c++/examples/createtest/createtest.vcproj | 39 +- .../examples/createtestdll/createtestdll.vcproj | 101 +- .../examples/extend_dstest/extend_dstest.vcproj | 39 +- .../extend_dstestdll/extend_dstestdll.vcproj | 101 +- .../c++/examples/h5grouptest/h5grouptest.vcproj | 39 +- .../examples/h5grouptestdll/h5grouptestdll.vcproj | 101 +- .../c++/examples/readdatatest/readdatatest.vcproj | 39 +- .../readdatatestdll/readdatatestdll.vcproj | 101 +- .../examples/writedatatest/writedatatest.vcproj | 39 +- .../writedatatestdll/writedatatestdll.vcproj | 101 +- windows/c++/test/H5srcdir_str.h | 22 + windows/c++/test/checkcpptests.bat | 1 - windows/c++/test/dsets_cpp/dsets_cpp.vcproj | 418 --- windows/c++/test/dsets_cppdll/dsets_cppdll.vcproj | 418 --- windows/c++/test/testhdf5_cpp/testhdf5_cpp.vcproj | 43 +- .../test/testhdf5_cppdll/testhdf5_cppdll.vcproj | 43 +- windows/copy_hdf.bat | 3 +- windows/examples/allexamples/allexamples.sln | 4 +- windows/examples/allexamples/allexamples.vcproj | 255 +- .../examples/attributetest/attributetest.vcproj | 39 +- .../attributetestdll/attributetestdll.vcproj | 39 +- windows/examples/chunkread/chunkread.vcproj | 39 +- windows/examples/chunkreaddll/chunkreaddll.vcproj | 39 +- windows/examples/compoundtest/compoundtest.vcproj | 39 +- .../compoundtestdll/compoundtestdll.vcproj | 39 +- .../extendwritetest/extendwritetest.vcproj | 39 +- .../extendwritetestdll/extendwritetestdll.vcproj | 39 +- windows/examples/grouptest/grouptest.vcproj | 39 +- windows/examples/grouptestdll/grouptestdll.vcproj | 39 +- .../intermgrouptest/intermgrouptest.vcproj | 39 +- .../intermgrouptestdll/intermgrouptestdll.vcproj | 39 +- windows/examples/readtest/readtest.vcproj | 39 +- windows/examples/readtestdll/readtestdll.vcproj | 39 +- windows/examples/selectest/selectest.vcproj | 39 +- windows/examples/selectestdll/selectestdll.vcproj | 39 +- windows/examples/writetest/writetest.vcproj | 39 +- windows/examples/writetestdll/writetestdll.vcproj | 39 +- .../examples/allf90examples/allf90examples.sln | 4 +- .../examples/allf90examples/allf90examples.vcproj | 5 +- .../test/libtest_cstubdll/libtest_cstubdll.vcproj | 47 +- .../test/libtest_fortran/libtest_cstub.vcproj | 19 +- windows/hdf5bt.BAT | 29 +- windows/hdf5build.BAT | 130 +- windows/hdf5build_examples.BAT | 96 +- .../hl_test_table_cpp/hl_test_table_cpp.vcproj | 39 +- .../hl_test_table_cppdll.vcproj | 39 +- .../hl/examples/allhlcexamples/allhlcexamples.sln | 4 +- .../examples/allhlcexamples/allhlcexamples.vcproj | 5 +- windows/hl/examples/ex_ds1/ex_ds1.vcproj | 39 +- windows/hl/examples/ex_ds1dll/ex_ds1dll.vcproj | 39 +- windows/hl/examples/ex_image1/ex_image1.vcproj | 39 +- .../hl/examples/ex_image1dll/ex_image1dll.vcproj | 39 +- windows/hl/examples/ex_image2/ex_image2.vcproj | 31 +- .../hl/examples/ex_image2dll/ex_image2dll.vcproj | 31 +- windows/hl/examples/ex_lite1/ex_lite1.vcproj | 39 +- windows/hl/examples/ex_lite1dll/ex_lite1dll.vcproj | 39 +- windows/hl/examples/ex_lite2/ex_lite2.vcproj | 31 +- windows/hl/examples/ex_lite2dll/ex_lite2dll.vcproj | 31 +- windows/hl/examples/ex_lite3/ex_lite3.vcproj | 31 +- windows/hl/examples/ex_lite3dll/ex_lite3dll.vcproj | 31 +- windows/hl/examples/ex_table01/ex_table01.vcproj | 39 +- .../hl/examples/ex_table01dll/ex_table01dll.vcproj | 39 +- windows/hl/examples/ex_table02/ex_table02.vcproj | 31 +- .../hl/examples/ex_table02dll/ex_table02dll.vcproj | 31 +- windows/hl/examples/ex_table03/ex_table03.vcproj | 31 +- .../hl/examples/ex_table03dll/ex_table03dll.vcproj | 31 +- windows/hl/examples/ex_table04/ex_table04.vcproj | 31 +- .../hl/examples/ex_table04dll/ex_table04dll.vcproj | 31 +- windows/hl/examples/ex_table05/ex_table05.vcproj | 31 +- .../hl/examples/ex_table05dll/ex_table05dll.vcproj | 31 +- windows/hl/examples/ex_table06/ex_table06.vcproj | 31 +- .../hl/examples/ex_table06dll/ex_table06dll.vcproj | 31 +- windows/hl/examples/ex_table07/ex_table07.vcproj | 31 +- .../hl/examples/ex_table07dll/ex_table07dll.vcproj | 31 +- windows/hl/examples/ex_table08/ex_table08.vcproj | 31 +- .../hl/examples/ex_table08dll/ex_table08dll.vcproj | 31 +- windows/hl/examples/ex_table09/ex_table09.vcproj | 31 +- .../hl/examples/ex_table09dll/ex_table09dll.vcproj | 31 +- windows/hl/examples/ex_table10/ex_table10.vcproj | 31 +- .../hl/examples/ex_table10dll/ex_table10dll.vcproj | 31 +- windows/hl/examples/ex_table11/ex_table11.vcproj | 31 +- .../hl/examples/ex_table11dll/ex_table11dll.vcproj | 31 +- windows/hl/examples/ex_table12/ex_table12.vcproj | 31 +- .../hl/examples/ex_table12dll/ex_table12dll.vcproj | 31 +- windows/hl/examples/ptExampleFL/ptExampleFL.vcproj | 39 +- .../examples/ptExampleFLdll/ptExampleFLdll.vcproj | 39 +- windows/hl/examples/ptExampleVL/ptExampleVL.vcproj | 31 +- .../examples/ptExampleVLdll/ptExampleVLdll.vcproj | 31 +- .../examples/allhlf90examples/allhlf90examples.sln | 4 +- .../allhlf90examples/allhlf90examples.vcproj | 5 +- windows/hl/test/H5srcdir_str.h | 22 + windows/hl/test/hl_test_ds/hl_test_ds.vcproj | 39 +- windows/hl/test/hl_test_dsdll/hl_test_dsdll.vcproj | 39 +- windows/hl/test/hl_test_image/hl_test_image.vcproj | 39 +- .../test/hl_test_imagedll/hl_test_imagedll.vcproj | 39 +- windows/hl/test/hl_test_lite/hl_test_lite.vcproj | 39 +- .../hl/test/hl_test_litedll/hl_test_litedll.vcproj | 39 +- .../hl/test/hl_test_packet/hl_test_packet.vcproj | 39 +- .../hl_test_packetdll/hl_test_packetdll.vcproj | 39 +- windows/hl/test/hl_test_table/hl_test_table.vcproj | 39 +- .../test/hl_test_tabledll/hl_test_tabledll.vcproj | 39 +- windows/hl/tools/gifconv/gif2h5.vcproj | 39 +- windows/hl/tools/gifconv/h52gif.vcproj | 39 +- windows/hl/tools/gifconvdll/gif2h5dll.vcproj | 39 +- windows/hl/tools/gifconvdll/h52gifdll.vcproj | 39 +- .../typegen/h5libsettings/h5libsettings.vcproj | 399 +++ .../typegen/h5match_types/h5match_types.vcproj | 39 +- windows/misc/typegen/h5tinit/h5tinit.vcproj | 39 +- windows/perform/perf_serial/perf_serial.vcproj | 39 +- .../perform/perf_serialdll/perf_serialdll.vcproj | 39 +- windows/proj/all/all.sln | 98 +- windows/proj/all/all.vcproj | 5 +- windows/proj/all_fortran/all_fortran.sln | 122 +- windows/proj/all_fortran/all_fortran.vcproj | 5 +- windows/proj/hdf5/hdf5.vcproj | 11 +- windows/proj/hdf5_cpp/hdf5_cpp.vcproj | 19 +- windows/proj/hdf5_cppdll/hdf5_cppdll.vcproj | 47 +- windows/proj/hdf5_f90cstub/hdf5_f90cstub.vcproj | 19 +- .../proj/hdf5_f90cstubdll/hdf5_f90cstubdll.vcproj | 47 +- windows/proj/hdf5_hl/hdf5_hl.vcproj | 21 +- windows/proj/hdf5_hl_cpp/hdf5_hl_cpp.vcproj | 19 +- windows/proj/hdf5_hl_cppdll/hdf5_hl_cppdll.vcproj | 47 +- .../hdf5_hl_f90cstubdll/hdf5_hl_f90cstubdll.vcproj | 47 +- .../proj/hdf5_hl_fortran/hdf5_hl_f90cstub.vcproj | 51 +- windows/proj/hdf5_hldll/hdf5_hldll.vcproj | 47 +- windows/proj/hdf5dll/hdf5dll.vcproj | 47 +- windows/src/H5pubconf.h | 8 +- windows/test/H5srcdir_str.h | 22 + windows/test/app_ref/app_ref.vcproj | 31 +- windows/test/app_refdll/app_refdll.vcproj | 31 +- windows/test/big/big.vcproj | 39 +- windows/test/bigdll/bigdll.vcproj | 39 +- windows/test/bittests/bittests.vcproj | 39 +- windows/test/bittestsdll/bittestsdll.vcproj | 39 +- windows/test/btree2/btree2.vcproj | 39 +- windows/test/btree2dll/btree2dll.vcproj | 39 +- windows/test/cache/cache.vcproj | 39 +- windows/test/cache_api/cache_api.vcproj | 39 +- windows/test/cache_apidll/cache_apidll.vcproj | 39 +- windows/test/cachedll/cachedll.vcproj | 39 +- windows/test/chunk/chunk.vcproj | 39 +- windows/test/chunk_info/chunk_info.vcproj | 31 +- windows/test/chunk_infodll/chunk_infodll.vcproj | 31 +- windows/test/chunkdll/chunkdll.vcproj | 39 +- windows/test/cmpd_dset/cmpd_dset.vcproj | 39 +- windows/test/cmpd_dsetdll/cmpd_dsetdll.vcproj | 39 +- windows/test/cross_read/cross_read.vcproj | 39 +- windows/test/cross_readdll/cross_readdll.vcproj | 39 +- windows/test/dangle/dangle.vcproj | 39 +- windows/test/dangledll/dangledll.vcproj | 39 +- windows/test/dsets/dsets.vcproj | 39 +- windows/test/dsetsdll/dsetsdll.vcproj | 39 +- windows/test/dt_arith/dt_arith.vcproj | 39 +- windows/test/dt_arithdll/dt_arithdll.vcproj | 39 +- windows/test/dtransform/dtransform.vcproj | 39 +- windows/test/dtransformdll/dtransformdll.vcproj | 39 +- windows/test/dtypes/dtypes.vcproj | 39 +- windows/test/dtypesdll/dtypesdll.vcproj | 39 +- windows/test/earray/earray.vcproj | 31 +- windows/test/earraydll/earraydll.vcproj | 31 +- windows/test/enum/enum.vcproj | 39 +- windows/test/enumdll/enumdll.vcproj | 39 +- windows/test/err_compat/err_compat.vcproj | 39 +- windows/test/err_compatdll/err_compatdll.vcproj | 39 +- windows/test/error_test/error_test.vcproj | 39 +- windows/test/error_testdll/error_testdll.vcproj | 39 +- windows/test/extend/extend.vcproj | 39 +- windows/test/extenddll/extenddll.vcproj | 39 +- windows/test/external/external.vcproj | 39 +- windows/test/externaldll/externaldll.vcproj | 39 +- windows/test/farray/farray.vcproj | 31 +- windows/test/farraydll/farraydll.vcproj | 31 +- windows/test/fheap/fheap.vcproj | 39 +- windows/test/fheapdll/fheapdll.vcproj | 39 +- windows/test/fillval/fillval.vcproj | 39 +- windows/test/fillvaldll/fillvaldll.vcproj | 39 +- windows/test/flush1/flush1.vcproj | 39 +- windows/test/flush1dll/flush1dll.vcproj | 39 +- windows/test/flush2/flush2.vcproj | 39 +- windows/test/flush2dll/flush2dll.vcproj | 39 +- windows/test/freespace/freespace.vcproj | 61 +- windows/test/freespacedll/freespacedll.vcproj | 61 +- windows/test/getname/getname.vcproj | 39 +- windows/test/getnamedll/getnamedll.vcproj | 39 +- windows/test/getub/getub.vcproj | 39 +- windows/test/gheap/gheap.vcproj | 39 +- windows/test/gheapdll/gheapdll.vcproj | 39 +- windows/test/hyperslab/hyperslab.vcproj | 39 +- windows/test/hyperslabdll/hyperslabdll.vcproj | 39 +- windows/test/iopipe/iopipe.vcproj | 39 +- windows/test/iopipedll/iopipedll.vcproj | 39 +- windows/test/istore/istore.vcproj | 39 +- windows/test/istoredll/istoredll.vcproj | 39 +- windows/test/lheap/lheap.vcproj | 39 +- windows/test/lheapdll/lheapdll.vcproj | 39 +- windows/test/libtest/libtest.vcproj | 19 +- windows/test/libtestdll/libtestdll.vcproj | 47 +- windows/test/links/links.vcproj | 39 +- windows/test/linksdll/linksdll.vcproj | 39 +- windows/test/mf/mf.vcproj | 61 +- windows/test/mfdll/mfdll.vcproj | 61 +- windows/test/mount/mount.vcproj | 39 +- windows/test/mountdll/mountdll.vcproj | 39 +- windows/test/mtime/mtime.vcproj | 39 +- windows/test/mtimedll/mtimedll.vcproj | 39 +- windows/test/ntypes/ntypes.vcproj | 39 +- windows/test/ntypesdll/ntypesdll.vcproj | 39 +- windows/test/objcopy/objcopy.vcproj | 39 +- windows/test/objcopydll/objcopydll.vcproj | 39 +- windows/test/ohdr/ohdr.vcproj | 39 +- windows/test/ohdrdll/ohdrdll.vcproj | 39 +- windows/test/overhead/overhead.vcproj | 39 +- windows/test/overheaddll/overheaddll.vcproj | 39 +- windows/test/pool/pool.vcproj | 39 +- windows/test/pooldll/pooldll.vcproj | 39 +- windows/test/reserved/reserved.vcproj | 39 +- windows/test/reserveddll/reserveddll.vcproj | 39 +- windows/test/set_extent/set_extent.vcproj | 39 +- windows/test/set_extentdll/set_extentdll.vcproj | 39 +- windows/test/stab/stab.vcproj | 39 +- windows/test/stabdll/stabdll.vcproj | 39 +- windows/test/tcheckversion/tcheckversion.vcproj | 39 +- .../test/tcheckversiondll/tcheckversiondll.vcproj | 39 +- windows/test/tellub/tellub.vcproj | 39 +- windows/test/testhdf5/testhdf5.vcproj | 39 +- windows/test/testhdf5dll/testhdf5dll.vcproj | 39 +- windows/test/ttsafedll/ttsafedll.vcproj | 39 +- windows/test/unlink/unlink.vcproj | 39 +- windows/test/unlinkdll/unlinkdll.vcproj | 39 +- windows/test/vfd/vfd.vcproj | 39 +- windows/test/vfddll/vfddll.vcproj | 39 +- windows/tools/h5copy/h5copy.vcproj | 39 +- windows/tools/h5copy/testh5copy.bat | 43 +- windows/tools/h5debug/h5debug.vcproj | 39 +- windows/tools/h5debugdll/h5debugdll.vcproj | 39 +- windows/tools/h5diff/h5diff.vcproj | 39 +- windows/tools/h5diff/testh5diff.bat | 186 +- windows/tools/h5diffdll/h5diffdll.vcproj | 39 +- windows/tools/h5dump/h5dump.vcproj | 39 +- windows/tools/h5dumpdll/h5dumpdll.vcproj | 39 +- windows/tools/h5import/h5import.vcproj | 39 +- windows/tools/h5importdll/h5importdll.vcproj | 39 +- windows/tools/h5jam/h5jam.vcproj | 39 +- windows/tools/h5ls/h5ls.vcproj | 39 +- windows/tools/h5lsdll/h5lsdll.vcproj | 39 +- windows/tools/h5mkgrp/h5mkgrp.vcproj | 39 +- windows/tools/h5repack/h5repack.vcproj | 39 +- windows/tools/h5repackdll/h5repackdll.vcproj | 39 +- windows/tools/h5repart/h5repart.vcproj | 39 +- windows/tools/h5repartdll/h5repartdll.vcproj | 39 +- windows/tools/h5stat/h5stat.vcproj | 39 +- windows/tools/h5stat/testh5stat.bat | 7 + windows/tools/h5statdll/h5statdll.vcproj | 39 +- windows/tools/h5unjam/h5unjam.vcproj | 39 +- windows/tools/talign/talign.vcproj | 39 +- windows/tools/taligndll/taligndll.vcproj | 39 +- windows/tools/testfiles/binread/binread.vcproj | 39 +- windows/tools/testfiles/h5difftst/h5difftst.vcproj | 43 +- windows/tools/testfiles/h5dumptst/h5dumptst.vcproj | 39 +- .../tools/testfiles/h5importtst/h5importtst.vcproj | 39 +- windows/tools/testfiles/h5jamtst/h5jamtst.vcproj | 39 +- .../tools/testfiles/h5repacktst/h5repacktst.vcproj | 39 +- .../h5repart_gentest/h5repart_gentest.vcproj | 39 +- .../tools/testfiles/h5reparttst/h5reparttst.vcproj | 39 +- .../testh5repack_detect_szip.vcproj | 39 +- .../testh5repack_detect_szipdll.vcproj | 39 +- windows/tools/toolslib/toolslib.vcproj | 11 +- windows/tools/toolslibdll/toolslibdll.vcproj | 11 +- 745 files changed, 30922 insertions(+), 27161 deletions(-) create mode 100644 bin/README create mode 100644 c++/test/H5srcdir_str.h.in create mode 100644 hl/test/H5srcdir_str.h.in create mode 100644 src/H5make_libsettings.c create mode 100644 test/H5srcdir.h create mode 100644 test/H5srcdir_str.h.in create mode 100644 tools/h5copy/testfiles/h5copy_extlinks_src.h5 create mode 100644 tools/h5copy/testfiles/h5copy_extlinks_src.out.ls create mode 100644 tools/h5copy/testfiles/h5copy_extlinks_trg.h5 create mode 100644 tools/h5copy/testfiles/h5copy_ref.h5 create mode 100644 tools/h5copy/testfiles/h5copy_ref.out.ls create mode 100644 tools/h5diff/testfiles/h5diff_18_1.txt create mode 100644 tools/h5diff/testfiles/h5diff_450.txt create mode 100644 tools/h5diff/testfiles/h5diff_451.txt create mode 100644 tools/h5diff/testfiles/h5diff_452.txt create mode 100644 tools/h5diff/testfiles/h5diff_453.txt create mode 100644 tools/h5diff/testfiles/h5diff_454.txt create mode 100644 tools/h5diff/testfiles/h5diff_455.txt create mode 100644 tools/h5diff/testfiles/h5diff_456.txt create mode 100644 tools/h5diff/testfiles/h5diff_457.txt create mode 100644 tools/h5diff/testfiles/h5diff_458.txt create mode 100644 tools/h5diff/testfiles/h5diff_459.txt create mode 100644 tools/h5diff/testfiles/h5diff_danglelinks1.h5 create mode 100644 tools/h5diff/testfiles/h5diff_danglelinks2.h5 create mode 100644 tools/h5repack/testfiles/h5repack_refs.h5 create mode 100644 tools/h5stat/testfiles/h5stat_filters-UD.ddl create mode 100644 tools/h5stat/testfiles/h5stat_filters-UT.ddl create mode 100644 tools/h5stat/testfiles/h5stat_newgrat-UA.ddl create mode 100644 tools/h5stat/testfiles/h5stat_newgrat-UG.ddl create mode 100644 windows/c++/test/H5srcdir_str.h delete mode 100644 windows/c++/test/dsets_cpp/dsets_cpp.vcproj delete mode 100644 windows/c++/test/dsets_cppdll/dsets_cppdll.vcproj create mode 100644 windows/hl/test/H5srcdir_str.h create mode 100644 windows/misc/typegen/h5libsettings/h5libsettings.vcproj create mode 100644 windows/test/H5srcdir_str.h diff --git a/COPYING b/COPYING index 5ba610b..db75e16 100644 --- a/COPYING +++ b/COPYING @@ -4,7 +4,7 @@ HDF5 (Hierarchical Data Format 5) Software Library and Utilities ----------------------------------------------------------------------------- HDF5 (Hierarchical Data Format 5) Software Library and Utilities -Copyright 2006-2009 by The HDF Group. +Copyright 2006-2010 by The HDF Group. NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities Copyright 1998-2006 by the Board of Trustees of the University of Illinois. diff --git a/MANIFEST b/MANIFEST index 6d29929..d8208ec 100644 --- a/MANIFEST +++ b/MANIFEST @@ -65,6 +65,7 @@ ./bin/mkinstalldirs ./bin/newer ./bin/reconfigure _DO_NOT_DISTRIBUTE_ +./bin/README _DO_NOT_DISTRIBUTE_ ./bin/release ./bin/runtest _DO_NOT_DISTRIBUTE_ ./bin/snapshot @@ -339,6 +340,7 @@ ./c++/src/header_files/image001.jpg ./c++/src/header_files/image002.jpg +./c++/test/H5srcdir_str.h.in ./c++/test/Makefile.am ./c++/test/Makefile.in ./c++/test/dsets.cpp @@ -417,6 +419,7 @@ ./src/H5err.txt ./src/H5config.h.in ./src/H5detect.c +./src/H5make_libsettings.c ./src/H5overflow.txt ./src/H5overflow.h ./src/H5private.h @@ -790,6 +793,8 @@ ./src/H5win32defs.h ./test/COPYING +./test/H5srcdir.h +./test/H5srcdir_str.h.in ./test/Makefile.am ./test/Makefile.in ./test/app_ref.c @@ -985,7 +990,7 @@ ./tools/h5import/h5importtest.c ./tools/h5import/h5importtestutil.sh -#tesfiles for h5import +# testfiles for h5import ./tools/h5import/testfiles/binin32.h5 ./tools/h5import/testfiles/binin16.h5 ./tools/h5import/testfiles/txtfp32.txt @@ -1053,11 +1058,13 @@ ./tools/h5repack/h5repacktst.c ./tools/h5repack/testh5repack_detect_szip.c +# h5ls sources ./tools/h5ls/Makefile.am ./tools/h5ls/Makefile.in ./tools/h5ls/h5ls.c ./tools/h5ls/testh5ls.sh.in +# h5copy sources ./tools/h5copy/testh5copy.sh ./tools/h5copy/Makefile.in ./tools/h5copy/h5copy.c @@ -1101,28 +1108,35 @@ ./tools/misc/testh5repart.sh.in ./tools/misc/talign.c +# h5stat sources ./tools/h5stat/Makefile.am ./tools/h5stat/Makefile.in ./tools/h5stat/h5stat.c + +# h5stat test files ./tools/h5stat/h5stat_gentest.c ./tools/h5stat/testh5stat.sh.in -./tools/h5stat/testfiles/h5stat_filters-d.ddl ./tools/h5stat/testfiles/h5stat_filters.ddl +./tools/h5stat/testfiles/h5stat_filters-d.ddl ./tools/h5stat/testfiles/h5stat_filters-dT.ddl ./tools/h5stat/testfiles/h5stat_filters-F.ddl ./tools/h5stat/testfiles/h5stat_filters-file.ddl ./tools/h5stat/testfiles/h5stat_filters-g.ddl +./tools/h5stat/testfiles/h5stat_filters-UD.ddl +./tools/h5stat/testfiles/h5stat_filters-UT.ddl ./tools/h5stat/testfiles/h5stat_filters.h5 ./tools/h5stat/testfiles/h5stat_help1.ddl ./tools/h5stat/testfiles/h5stat_help2.ddl ./tools/h5stat/testfiles/h5stat_idx.h5 ./tools/h5stat/testfiles/h5stat_idx.ddl ./tools/h5stat/testfiles/h5stat_newgrat.ddl +./tools/h5stat/testfiles/h5stat_newgrat-UA.ddl +./tools/h5stat/testfiles/h5stat_newgrat-UG.ddl ./tools/h5stat/testfiles/h5stat_newgrat.h5 ./tools/h5stat/testfiles/h5stat_tsohm.ddl ./tools/h5stat/testfiles/h5stat_tsohm.h5 -# h5dump +# h5dump test files ./tools/testfiles/family_file00000.h5 ./tools/testfiles/family_file00001.h5 ./tools/testfiles/family_file00002.h5 @@ -1471,6 +1485,7 @@ ./tools/h5diff/testfiles/h5diff_171.txt ./tools/h5diff/testfiles/h5diff_172.txt ./tools/h5diff/testfiles/h5diff_18.txt +./tools/h5diff/testfiles/h5diff_18_1.txt ./tools/h5diff/testfiles/h5diff_19.txt ./tools/h5diff/testfiles/h5diff_20.txt ./tools/h5diff/testfiles/h5diff_21.txt @@ -1557,6 +1572,16 @@ ./tools/h5diff/testfiles/h5diff_423.txt ./tools/h5diff/testfiles/h5diff_424.txt ./tools/h5diff/testfiles/h5diff_425.txt +./tools/h5diff/testfiles/h5diff_450.txt +./tools/h5diff/testfiles/h5diff_451.txt +./tools/h5diff/testfiles/h5diff_452.txt +./tools/h5diff/testfiles/h5diff_453.txt +./tools/h5diff/testfiles/h5diff_454.txt +./tools/h5diff/testfiles/h5diff_455.txt +./tools/h5diff/testfiles/h5diff_456.txt +./tools/h5diff/testfiles/h5diff_457.txt +./tools/h5diff/testfiles/h5diff_458.txt +./tools/h5diff/testfiles/h5diff_459.txt ./tools/h5diff/testfiles/h5diff_idx.txt @@ -1580,6 +1605,8 @@ ./tools/h5diff/testfiles/h5diff_extlink_trg.h5 ./tools/h5diff/testfiles/h5diff_linked_softlink.h5 ./tools/h5diff/testfiles/h5diff_softlinks.h5 +./tools/h5diff/testfiles/h5diff_danglelinks1.h5 +./tools/h5diff/testfiles/h5diff_danglelinks2.h5 @@ -1603,7 +1630,7 @@ ./tools/h5repack/testfiles/h5repack_ext.h5 ./tools/h5repack/testfiles/ublock.bin ./tools/h5repack/testfiles/h5repack_named_dtypes.h5 - +./tools/h5repack/testfiles/h5repack_refs.h5 # jam utility and tests ./tools/h5jam/h5jam.c @@ -1629,6 +1656,11 @@ # test files for h5copy ./tools/h5copy/testfiles/h5copytst.h5 ./tools/h5copy/testfiles/h5copytst.out.ls +./tools/h5copy/testfiles/h5copy_ref.h5 +./tools/h5copy/testfiles/h5copy_ref.out.ls +./tools/h5copy/testfiles/h5copy_extlinks_src.h5 +./tools/h5copy/testfiles/h5copy_extlinks_trg.h5 +./tools/h5copy/testfiles/h5copy_extlinks_src.out.ls ./tools/h5copy/testfiles/h5copytst_new.h5 ./tools/h5copy/testfiles/h5copytst_new.out.ls @@ -1700,6 +1732,7 @@ ./hl/src/H5TBpublic.h ./hl/src/hdf5_hl.h ./hl/test/COPYING +./hl/test/H5srcdir_str.h.in ./hl/test/Makefile.am ./hl/test/Makefile.in ./hl/test/dsdata.txt @@ -1872,9 +1905,8 @@ ./windows/c++/examples/writedatatestdll/writedatatestdll.vcproj # C++ Tests +./windows/c++/test/H5srcdir_str.h ./windows/c++/test/checkcpptests.bat -./windows/c++/test/dsets_cpp/dsets_cpp.vcproj -./windows/c++/test/dsets_cppdll/dsets_cppdll.vcproj ./windows/c++/test/testhdf5_cpp/testhdf5_cpp.vcproj ./windows/c++/test/testhdf5_cppdll/testhdf5_cppdll.vcproj @@ -2016,6 +2048,7 @@ ./windows/hl/fortran/test/hl_test_table_fortrandll/hl_test_table_fortrandll.vfproj # High-Level Library Tests +./windows/hl/test/H5srcdir_str.h ./windows/hl/test/checkhltests.bat ./windows/hl/test/hl_test_ds/hl_test_ds.vcproj ./windows/hl/test/hl_test_dsdll/hl_test_dsdll.vcproj @@ -2040,6 +2073,7 @@ ./windows/misc/typegen/h5fortran_detect/h5fortran_detect.vfproj ./windows/misc/typegen/h5match_types/h5match_types.vcproj ./windows/misc/typegen/h5tinit/h5tinit.vcproj +./windows/misc/typegen/h5libsettings/h5libsettings.vcproj # Performance Tests ./windows/perform/checkperformtests.bat @@ -2075,6 +2109,7 @@ ./windows/src/H5pubconf.h # Library Test Projects +./windows/test/H5srcdir_str.h ./windows/test/checktests.bat ./windows/test/testerror.bat ./windows/test/app_ref/app_ref.vcproj diff --git a/Makefile.in b/Makefile.in index 8587ac7..3f30707 100644 --- a/Makefile.in +++ b/Makefile.in @@ -68,9 +68,9 @@ build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/config/commence.am \ - $(top_srcdir)/configure COPYING bin/COPYING bin/compile \ - bin/config.guess bin/config.sub bin/depcomp bin/install-sh \ - bin/ltmain.sh bin/missing bin/mkinstalldirs + $(top_srcdir)/configure COPYING bin/COPYING bin/README \ + bin/compile bin/config.guess bin/config.sub bin/depcomp \ + bin/install-sh bin/ltmain.sh bin/missing bin/mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in diff --git a/README.txt b/README.txt index 9e6321b..635e3bc 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.59-FA_a4 currently under development +HDF5 version 1.9.64-FA_a4 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/bin/README b/bin/README new file mode 100644 index 0000000..1c77043 --- /dev/null +++ b/bin/README @@ -0,0 +1,2 @@ +The daily tests run copies of some of the scripts in this directory from another repository, notably snapshot and runtest. The copies in this directory should work, but are not used in daily tests, though they should be tested occasionally. + diff --git a/bin/buildhdf5 b/bin/buildhdf5 index f0dd938..ac73df0 100755 --- a/bin/buildhdf5 +++ b/bin/buildhdf5 @@ -305,7 +305,7 @@ if [ ! -f config.status ]; then CONFIGURE="$CONFIGURE $CONFIG_OP $*" STEP "Configure HDF5..." "$CONFIGURE" "#config" else - STEP "Confiugre Skipped" "echo Confiugre Skipped" "#config" + STEP "Configure Skipped" "echo Configure Skipped" "#config" fi if [ x-$CONFIG_ONLY = x-yes ]; then diff --git a/bin/snapshot b/bin/snapshot index 4235670..bb02595 100755 --- a/bin/snapshot +++ b/bin/snapshot @@ -199,6 +199,9 @@ while [ $# -gt 0 ] ; do check-vfd) CHECKVAL=check-vfd ;; + yodconfigure) + YODCONFIGURE=yes + ;; --*) OP_CONFIGURE="$OP_CONFIGURE $1" ;; @@ -284,7 +287,14 @@ fi # Setup the proper configure option (--with-zlib) to use zlib library # provide ZLIB is non-empty. ZLIB=${ZLIB:+"--with-zlib="$ZLIB} -CONFIGURE="./configure $ZLIB $OP_CONFIGURE" +if [ -n "$YODCONFIGURE" ]; then + cp configure configure.yod + bin/yodconfigure configure.yod + CONFIGURE="./configure.yod" +else + CONFIGURE="./configure" +fi +CONFIGURE="$CONFIGURE $ZLIB $OP_CONFIGURE" # Execute the requests snapshot=yes @@ -460,9 +470,7 @@ if [ "$cmd" = "all" -o -n "$cmdrel" ]; then echo "Making snapshot release ($RELEASE_VERSION) to ${ReleaseDir}..." bin/release -d $ReleaseDir $METHODS perl bin/h5vers -i - echo "Committing snapshot from current/bin/snapshot." - ls - svn -q commit -m "Snapshot $RELEASE_VERSION" . + svn -q commit -m "Snapshot $RELEASE_VERSION" ) errcode=$? fi diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index 6de5e63..5f04865 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -166,7 +166,7 @@ void Attribute::read( const DataType& mem_type, void *buf ) const // Used getInMemDataSize to get attribute data size. - BMR // Jul 2009 // Divided into specific private functions for fixed- and -// variable-len string data: p_read_fixed_len and +// variable-len string data: p_read_fixed_len and // p_read_variable_len. This should improve readability. //-------------------------------------------------------------------------- void Attribute::read(const DataType& mem_type, H5std_string& strg) const diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index 5812890..6b7b130 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -79,7 +79,7 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi //-------------------------------------------------------------------------- // Function: DataSet overload constructor - dereference -///\brief Given a reference, ref, to an hdf5 dataset, creates a +///\brief Given a reference, ref, to an hdf5 dataset, creates a /// DataSet object ///\param obj - IN: Dataset reference object is in or location of /// object that the dataset is located within. @@ -87,7 +87,7 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi ///\param ref_type - IN: Reference type - default to H5R_OBJECT ///\exception H5::DataSetIException ///\par Description -/// \c obj can be DataSet, Group, H5File, or named DataType, that +/// \c obj can be DataSet, Group, H5File, or named DataType, that /// is a datatype that has been named by DataType::commit. // Programmer Binh-Minh Ribler - Oct, 2006 // Modification @@ -99,14 +99,14 @@ DataSet::DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type) : Abstract try { id = p_dereference(obj.getId(), ref, ref_type); } catch (ReferenceException deref_error) { - throw ReferenceException("DataSet constructor - located by object", + throw ReferenceException("DataSet constructor - located by object", deref_error.getDetailMsg()); } } //-------------------------------------------------------------------------- // Function: DataSet overload constructor - dereference -///\brief Given a reference, ref, to an hdf5 dataset, creates a +///\brief Given a reference, ref, to an hdf5 dataset, creates a /// DataSet object ///\param h5file - IN: Location referenced object is in ///\param ref - IN: Reference pointer @@ -122,14 +122,14 @@ DataSet::DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type) : Abstrac try { id = p_dereference(h5file.getId(), ref, ref_type); } catch (ReferenceException deref_error) { - throw ReferenceException("DataSet constructor - located by HDF5 file", + throw ReferenceException("DataSet constructor - located by HDF5 file", deref_error.getDetailMsg()); } } //-------------------------------------------------------------------------- // Function: DataSet overload constructor - dereference -///\brief Given a reference, ref, to an hdf5 dataset, creates a +///\brief Given a reference, ref, to an hdf5 dataset, creates a /// DataSet object ///\param attr - IN: Specifying location where the referenced object is in ///\param ref - IN: Reference pointer @@ -145,7 +145,7 @@ DataSet::DataSet(Attribute& attr, const void* ref, H5R_type_t ref_type) : Abstra try { id = p_dereference(attr.getId(), ref, ref_type); } catch (ReferenceException deref_error) { - throw ReferenceException("DataSet constructor - located by attribute", + throw ReferenceException("DataSet constructor - located by attribute", deref_error.getDetailMsg()); } } diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index 9170dc2..7be7fdc 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -95,7 +95,7 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object() ///\param ref_type - IN: Reference type - default to H5R_OBJECT ///\exception H5::ReferenceException ///\par Description -/// \c obj can be DataSet, Group, or named DataType, that +/// \c obj can be DataSet, Group, or named DataType, that /// is a datatype that has been named by DataType::commit. // Programmer Binh-Minh Ribler - Oct, 2006 // Modification diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index 02d9338..dd64082 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -95,7 +95,7 @@ Group::Group(const hid_t existing_id) : H5Object() ///\param ref_type - IN: Reference type - default to H5R_OBJECT ///\exception H5::ReferenceException ///\par Description -/// \c obj can be DataSet, Group, or named DataType, that +/// \c obj can be DataSet, Group, or named DataType, that /// is a datatype that has been named by DataType::commit. // Programmer Binh-Minh Ribler - Oct, 2006 //-------------------------------------------------------------------------- diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 2643e41..693bb11 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -424,7 +424,7 @@ void H5Object::reference(void* ref, const H5std_string& name) const // Function: H5Object::p_dereference (protected) // Purpose Dereference a ref into an hdf5 object. // Parameters -// loc_id - IN: An hdf5 identifier specifying the location of the +// loc_id - IN: An hdf5 identifier specifying the location of the // referenced object // ref - IN: Reference pointer // ref_type - IN: Reference type diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 15d9add..12fb36a 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -390,7 +390,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 49 +LT_VERS_REVISION = 54 LT_VERS_AGE = 0 # Include src directory diff --git a/c++/test/H5srcdir_str.h.in b/c++/test/H5srcdir_str.h.in new file mode 100644 index 0000000..d472124 --- /dev/null +++ b/c++/test/H5srcdir_str.h.in @@ -0,0 +1,22 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* If you are reading this file and it has a '.h' suffix, it was automatically + * generated from the '.in' version. Make changes there. + */ + +/* Set the 'srcdir' path from configure time */ +static const char *config_srcdir = "@srcdir@"; + diff --git a/c++/test/Makefile.am b/c++/test/Makefile.am index fdfdd61..687f0ca 100644 --- a/c++/test/Makefile.am +++ b/c++/test/Makefile.am @@ -31,15 +31,15 @@ endif # These are our main targets. They should be listed in the order to be # executed, generally most specific tests to least specific tests. -TEST_PROG=dsets testhdf5 +TEST_PROG=testhdf5 check_PROGRAMS=$(TEST_PROG) # The tests depend on the hdf5 library, test library, and the c++ library LDADD=$(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5) -dsets_SOURCES=dsets.cpp h5cpputil.cpp -testhdf5_SOURCES=testhdf5.cpp tattr.cpp tcompound.cpp tfile.cpp tfilter.cpp \ - th5s.cpp tlinks.cpp trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp +testhdf5_SOURCES=testhdf5.cpp dsets.cpp tattr.cpp tcompound.cpp \ + tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp trefer.cpp \ + ttypes.cpp tvlstr.cpp h5cpputil.cpp # Tell conclude.am that these are C++ tests. CXX_API=yes diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index e6d4f70..03c8ff7 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -50,8 +50,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/commence.am \ +DIST_COMMON = $(srcdir)/H5srcdir_str.h.in $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am # Shared C++ libraries aren't universally supported. @@ -65,17 +65,14 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = H5srcdir_str.h CONFIG_CLEAN_VPATH_FILES = -am__EXEEXT_1 = dsets$(EXEEXT) testhdf5$(EXEEXT) -am_dsets_OBJECTS = dsets.$(OBJEXT) h5cpputil.$(OBJEXT) -dsets_OBJECTS = $(am_dsets_OBJECTS) -dsets_LDADD = $(LDADD) -dsets_DEPENDENCIES = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5) -am_testhdf5_OBJECTS = testhdf5.$(OBJEXT) tattr.$(OBJEXT) \ - tcompound.$(OBJEXT) tfile.$(OBJEXT) tfilter.$(OBJEXT) \ - th5s.$(OBJEXT) tlinks.$(OBJEXT) trefer.$(OBJEXT) \ - ttypes.$(OBJEXT) tvlstr.$(OBJEXT) h5cpputil.$(OBJEXT) +am__EXEEXT_1 = testhdf5$(EXEEXT) +am_testhdf5_OBJECTS = testhdf5.$(OBJEXT) dsets.$(OBJEXT) \ + tattr.$(OBJEXT) tcompound.$(OBJEXT) tfile.$(OBJEXT) \ + tfilter.$(OBJEXT) th5s.$(OBJEXT) tlinks.$(OBJEXT) \ + trefer.$(OBJEXT) ttypes.$(OBJEXT) tvlstr.$(OBJEXT) \ + h5cpputil.$(OBJEXT) testhdf5_OBJECTS = $(am_testhdf5_OBJECTS) testhdf5_LDADD = $(LDADD) testhdf5_DEPENDENCIES = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5) @@ -92,8 +89,8 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(dsets_SOURCES) $(testhdf5_SOURCES) -DIST_SOURCES = $(dsets_SOURCES) $(testhdf5_SOURCES) +SOURCES = $(testhdf5_SOURCES) +DIST_SOURCES = $(testhdf5_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -362,13 +359,13 @@ INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/c++/src # These are our main targets. They should be listed in the order to be # executed, generally most specific tests to least specific tests. -TEST_PROG = dsets testhdf5 +TEST_PROG = testhdf5 # The tests depend on the hdf5 library, test library, and the c++ library LDADD = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5) -dsets_SOURCES = dsets.cpp h5cpputil.cpp -testhdf5_SOURCES = testhdf5.cpp tattr.cpp tcompound.cpp tfile.cpp tfilter.cpp \ - th5s.cpp tlinks.cpp trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp +testhdf5_SOURCES = testhdf5.cpp dsets.cpp tattr.cpp tcompound.cpp \ + tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp trefer.cpp \ + ttypes.cpp tvlstr.cpp h5cpputil.cpp # Tell conclude.am that these are C++ tests. @@ -423,6 +420,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +H5srcdir_str.h: $(top_builddir)/config.status $(srcdir)/H5srcdir_str.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ @@ -432,9 +431,6 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -dsets$(EXEEXT): $(dsets_OBJECTS) $(dsets_DEPENDENCIES) - @rm -f dsets$(EXEEXT) - $(CXXLINK) $(dsets_OBJECTS) $(dsets_LDADD) $(LIBS) testhdf5$(EXEEXT): $(testhdf5_OBJECTS) $(testhdf5_DEPENDENCIES) @rm -f testhdf5$(EXEEXT) $(CXXLINK) $(testhdf5_OBJECTS) $(testhdf5_LDADD) $(LIBS) diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 6a5f223..ee1a206 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -39,7 +39,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -82,7 +81,7 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, static herr_t test_create( H5File& file) { - TESTING("create, open, close"); + SUBTEST("create, open, close"); // Setting this to NULL for cleaning up in failure situations DataSet *dataset = NULL; @@ -203,7 +202,7 @@ static herr_t test_simple_io( H5File& file) { - TESTING("simple I/O"); + SUBTEST("simple I/O"); int points[100][200]; int check[100][200]; @@ -294,7 +293,7 @@ test_tconv( H5File& file) in = new char [4*1000000]; //assert (in); - TESTING("data type conversion"); + SUBTEST("data type conversion"); // Initialize the dataset for (int i = 0; i < 1000000; i++) { @@ -449,7 +448,7 @@ test_compression(H5File& file) dscreatplist.setDeflate (6); #ifdef H5_HAVE_FILTER_DEFLATE - TESTING("compression (setup)"); + SUBTEST("Compression (setup)"); // Create the dataset dataset = new DataSet (file.createDataSet @@ -461,7 +460,7 @@ test_compression(H5File& file) * STEP 1: Read uninitialized data. It should be zero. *---------------------------------------------------------------------- */ - TESTING("compression (uninitialized read)"); + SUBTEST("Compression (uninitialized read)"); dataset->read ((void*) check, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer); @@ -483,7 +482,7 @@ test_compression(H5File& file) * to it. *---------------------------------------------------------------------- */ - TESTING("compression (write)"); + SUBTEST("Compression (write)"); for (i=n=0; iread ((void*)check, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer); @@ -524,7 +523,7 @@ test_compression(H5File& file) * dataset although we rewrite the whole thing. *---------------------------------------------------------------------- */ - TESTING("compression (modify)"); + SUBTEST("Compression (modify)"); for (i=0; i(V)) print_func A;} +#define SUBTEST(TEST) {printf(" Subtest: %-52s",TEST); fflush(stdout);} int check_values (hsize_t i, hsize_t j, int apoint, int acheck); int test_report (int, const H5std_string&); @@ -122,6 +123,7 @@ void test_h5s(); void test_reference(); void test_types(); void test_vlstrings(); +void test_dset(); /* Prototypes for the cleanup routines */ void cleanup_attr(); diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index 48a3200..6bb9ca0 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -34,7 +34,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -118,7 +117,7 @@ static void test_attr_basic_write() int i; // Output message about test being performed - SUBTEST("Testing Basic Attribute Writing Functions"); + SUBTEST("Basic Attribute Writing Functions"); try { // Create file @@ -237,7 +236,7 @@ static void test_attr_rename() int i; // Output message about test being performed - SUBTEST("Testing Rename Attribute Function"); + SUBTEST("Rename Attribute Function"); try { // Open file @@ -308,7 +307,7 @@ static void test_attr_basic_read() int i, j; // Output message about test being performed - SUBTEST("Testing Basic Attribute Reading Functions"); + SUBTEST("Basic Attribute Reading Functions"); try { // Open file @@ -375,7 +374,7 @@ static void test_attr_compound_write() { // Output message about test being performed - SUBTEST("Testing Multiple Attribute Functions"); + SUBTEST("Multiple Attribute Functions"); try { // Create file @@ -439,7 +438,7 @@ static void test_attr_compound_read() int i,j; // Output message about test being performed - SUBTEST("Testing Basic Attribute Functions"); + SUBTEST("Basic Attribute Functions"); try { // Open file @@ -568,7 +567,7 @@ static void test_attr_compound_read() static void test_attr_scalar_write() { // Output message about test being performed - SUBTEST("Testing Basic Scalar Attribute Writing Functions"); + SUBTEST("Basic Scalar Attribute Writing Functions"); try { // Create file @@ -622,7 +621,7 @@ static void test_attr_scalar_write() static void test_attr_scalar_read() { // Output message about test being performed - SUBTEST("Testing Basic Scalar Attribute Reading Functions"); + SUBTEST("Basic Scalar Attribute Reading Functions"); try { // Open file @@ -666,7 +665,7 @@ static void test_attr_scalar_read() static void test_attr_mult_write() { // Output message about test being performed - SUBTEST("Testing Multiple Attribute Writing Functions"); + SUBTEST("Multiple Attribute Writing Functions"); try { // Create file @@ -743,7 +742,7 @@ static void test_attr_mult_read() int i,j,k; // Output message about test being performed - SUBTEST("Testing Multiple Attribute Reading Functions"); + SUBTEST("Multiple Attribute Reading Functions"); try { // Open file @@ -932,7 +931,7 @@ static void test_attr_delete() H5std_string attr_name; // Buffer for attribute names // Output message about test being performed - SUBTEST("Testing Removing Attribute Function"); + SUBTEST("Removing Attribute Function"); try { // Open file @@ -1032,7 +1031,7 @@ static void test_attr_dtype_shared() h5_stat_size_t filesize; /* Size of file after modifications */ // Output message about test being performed - SUBTEST("Testing Shared Datatypes with Attributes"); + SUBTEST("Shared Datatypes with Attributes"); try { // Create a file @@ -1189,7 +1188,7 @@ const int ATTR_LEN = 17; static void test_string_attr() { // Output message about test being performed - SUBTEST("Testing I/O on FL and VL String Attributes"); + SUBTEST("I/O on FL and VL String Attributes"); try { // Create file @@ -1308,6 +1307,7 @@ extern "C" void test_attr() { // Output message about test being performed + //MESSAGE("Testing Attributes\n"); MESSAGE(5, ("Testing Attributes\n")); test_attr_basic_write(); // Test basic H5A writing code diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp index 2b1879b..fb8bd17 100644 --- a/c++/test/tcompound.cpp +++ b/c++/test/tcompound.cpp @@ -33,7 +33,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -730,6 +729,7 @@ extern "C" void test_compound() { // Output message about test being performed + //MESSAGE("Testing Compound Data Type operations\n"); MESSAGE(5, ("Testing Compound Data Type operations\n")); test_compound_1(); // various things about compound data types diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp index d61babf..fe08d6d 100644 --- a/c++/test/testhdf5.cpp +++ b/c++/test/testhdf5.cpp @@ -26,8 +26,6 @@ into the list of AddTest() calls in main() below. Functions which depend on other functionality should be placed below the AddTest() call for the base functionality testing. - Each test module should include testhdf5.h and define a unique set of - names for test files they create. EXTERNAL ROUTINES/VARIABLES: TestInit(...) -- Initialize testing framework @@ -57,7 +55,7 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file +#include "h5test.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -73,19 +71,21 @@ main(int argc, char *argv[]) TestInit(argv[0], NULL, NULL); // testing file creation and opening in tfile.cpp - AddTest("file", test_file, cleanup_file, "File I/O Operations", NULL); + AddTest("tfile", test_file, cleanup_file, "File I/O Operations", NULL); + // testing dataset functionalities in dset.cpp + AddTest("dsets", test_dset, cleanup_dsets, "Dataset I/O Operations", NULL); // testing dataspace functionalities in th5s.cpp - AddTest("h5s", test_h5s, cleanup_h5s, "Dataspaces", NULL); + AddTest("th5s", test_h5s, cleanup_h5s, "Dataspaces", NULL); // testing attribute functionalities in tattr.cpp - AddTest("attr", test_attr, cleanup_attr, "Attributes", NULL); + AddTest("tattr", test_attr, cleanup_attr, "Attributes", NULL); // testing reference functionalities in trefer.cpp - AddTest("reference", test_reference, cleanup_reference, "References", NULL); + AddTest("trefer", test_reference, cleanup_reference, "References", NULL); // testing variable-length strings in tvlstr.cpp - AddTest("vlstrings", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL); - AddTest("types", test_types, cleanup_types, "Generic Data Types", NULL); - AddTest("compound", test_compound, cleanup_compound, "Compound Data Types", NULL); - AddTest("filter", test_filters, cleanup_filters, "Various Filters", NULL); - AddTest("links", test_links, cleanup_links, "Various Links", NULL); + AddTest("tvlstr", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL); + AddTest("ttypes", test_types, cleanup_types, "Generic Data Types", NULL); + AddTest("tcompound", test_compound, cleanup_compound, "Compound Data Types", NULL); + AddTest("tfilter", test_filters, cleanup_filters, "Various Filters", NULL); + AddTest("tlinks", test_links, cleanup_links, "Various Links", NULL); /* Comment out tests that are not done yet. - BMR, Feb 2001 AddTest("select", test_select, cleanup_select, "Selections", NULL); AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL); diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 71f0a60..88ffc03 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -37,7 +37,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -94,7 +93,7 @@ const H5std_string FILE4("tfile4.h5"); static void test_file_create() { // Output message about test being performed - SUBTEST("Testing File Creation I/O"); + SUBTEST("File Creation I/O"); // Test create with various sequences of H5F_ACC_EXCL and // H5F_ACC_TRUNC flags @@ -302,7 +301,7 @@ static void test_file_create() static void test_file_open() { // Output message about test being performed - SUBTEST("Testing File Opening I/O"); + SUBTEST("File Opening I/O"); try { @@ -351,7 +350,7 @@ static void test_file_open() static void test_file_size() { // Output message about test being performed - SUBTEST("Testing File Size"); + SUBTEST("File Size"); hid_t fapl_id; fapl_id = h5_fileaccess(); // in h5test.c, returns a file access template @@ -419,7 +418,7 @@ typedef struct s1_t { static void test_file_name() { // Output message about test being performed - SUBTEST("Testing File Name"); + SUBTEST("File Name"); H5std_string file_name; try { @@ -499,6 +498,7 @@ void test_file() { // Output message about test being performed MESSAGE(5, ("Testing File I/O operations\n")); + //MESSAGE("Testing File I/O operations\n"); test_file_create(); // Test file creation (also creation templates) test_file_open(); // Test file opening diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index 1d3cec2..e59707a 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -33,7 +33,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -252,6 +251,7 @@ extern "C" void test_filters() { // Output message about test being performed + //MESSAGE("Testing Various Filters\n"); MESSAGE(5, ("Testing Various Filters\n")); hid_t fapl_id; diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 258e904..e63c9af 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -36,7 +36,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -44,6 +43,7 @@ #endif #include "h5cpputil.h" // C++ utilility header file +#include "H5srcdir.h" // srcdir querying header file const H5std_string TESTFILE("th5s.h5"); const H5std_string DATAFILE("th5s1.h5"); @@ -121,7 +121,7 @@ static void test_h5s_basic() hsize_t tmax[4]; // Output message about test being performed - SUBTEST("Testing Dataspace Manipulation"); + SUBTEST("Dataspace Manipulation"); try { // Create simple dataspace sid1 @@ -185,13 +185,7 @@ static void test_h5s_basic() * If this test fails and the H5S_MAX_RANK variable has changed, follow * the instructions in space_overflow.c for regenating the th5s.h5 file. */ - char testfile[512]=""; - char *srcdir = getenv("srcdir"); - if (srcdir && ((strlen(srcdir) + strlen(TESTFILE.c_str()) + 1) < sizeof(testfile))){ - strcpy(testfile, srcdir); - strcat(testfile, "/"); - } - strcat(testfile, TESTFILE.c_str()); + const char *testfile = H5_get_srcdir_filename(TESTFILE.c_str()); // Create file H5File fid1(testfile, H5F_ACC_RDONLY); @@ -270,7 +264,7 @@ static void test_h5s_basic() static void test_h5s_scalar_write() { // Output message about test being performed - SUBTEST("Testing Scalar Dataspace Writing"); + SUBTEST("Scalar Dataspace Writing"); try { // Create file @@ -336,7 +330,7 @@ static void test_h5s_scalar_read() hsize_t tdims[4]; // Dimension array to test with // Output message about test being performed - SUBTEST("Testing Scalar Dataspace Reading"); + SUBTEST("Scalar Dataspace Reading"); try { // Create file @@ -396,7 +390,7 @@ static void test_h5s_scalar_read() static void test_h5s_null() { // Output message about test being performed - SUBTEST("Testing Null Dataspace Writing"); + SUBTEST("Null Dataspace Writing"); try { // Create file @@ -451,7 +445,7 @@ static void test_h5s_null() static void test_h5s_compound_scalar_write() { // Output message about test being performed - SUBTEST("Testing Compound Dataspace Writing"); + SUBTEST("Compound Dataspace Writing"); try { // Create file @@ -526,7 +520,7 @@ static void test_h5s_compound_scalar_read() hsize_t tdims[4]; // Dimension array to test with // Output message about test being performed - SUBTEST("Testing Compound Dataspace Reading"); + SUBTEST("Compound Dataspace Reading"); try { // Create file H5File fid1(DATAFILE, H5F_ACC_RDWR); @@ -594,6 +588,7 @@ extern "C" void test_h5s() { // Output message about test being performed + //MESSAGE("Testing Dataspaces\n"); MESSAGE(5, ("Testing Dataspaces\n")); test_h5s_basic(); // Test basic H5S code diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp index 83e33e1..53a1c8c 100644 --- a/c++/test/tlinks.cpp +++ b/c++/test/tlinks.cpp @@ -33,7 +33,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -484,7 +483,7 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format) // Verify link existence if(H5Lexists(file.getId(), "dset1", H5P_DEFAULT) != TRUE) throw InvalidActionException("H5Lexists", "dset1 doesn't exist"); - if(H5Lexists(file.getId(), "grp1/soft", H5P_DEFAULT) != TRUE) + if(H5Lexists(file.getId(), "grp1/soft", H5P_DEFAULT) != TRUE) throw InvalidActionException("H5Lexists", "grp1/soft doesn't exist"); // Verify link values @@ -531,6 +530,7 @@ void test_links() fapl_id = h5_fileaccess(); // Output message about test being performed + //MESSAGE("Testing Various Links\n"); MESSAGE(5, ("Testing Various Links\n")); try { @@ -689,7 +689,7 @@ void test_links() * called last so the reset doesn't interfere with the property lists. This * routine will delete its own file. */ /* nerrors += external_reset_register() < 0 ? 1 : 0; - */ + */ } catch (Exception E) { diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp index c4ac93b..3875dfd 100644 --- a/c++/test/trefer.cpp +++ b/c++/test/trefer.cpp @@ -34,7 +34,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -82,7 +81,7 @@ static void test_reference_obj(void) const H5std_string write_comment="Foo!"; // Comments for group // Output message about test being performed - SUBTEST("Testing Object Reference Functions"); + SUBTEST("Object Reference Functions"); H5File* file1 = NULL; try { @@ -205,7 +204,7 @@ static void test_reference_obj(void) dset2.read(tbuf, PredType::NATIVE_UINT); for(tu32=(unsigned *)tbuf,i=0; i. # @@ -699,8 +699,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.59-FA_a4' -PACKAGE_STRING='HDF5 1.9.59-FA_a4' +PACKAGE_VERSION='1.9.64-FA_a4' +PACKAGE_STRING='HDF5 1.9.64-FA_a4' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1571,7 +1571,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.59-FA_a4 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.64-FA_a4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1641,7 +1641,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.59-FA_a4:";; + short | recursive ) echo "Configuration of HDF5 1.9.64-FA_a4:";; esac cat <<\_ACEOF @@ -1828,7 +1828,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.59-FA_a4 +HDF5 configure 1.9.64-FA_a4 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2912,7 +2912,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.59-FA_a4, which was +It was created by HDF5 $as_me 1.9.64-FA_a4, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -3725,7 +3725,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.59-FA_a4' + VERSION='1.9.64-FA_a4' cat >>confdefs.h <<_ACEOF @@ -28266,7 +28266,7 @@ if test -n "$TESTPARALLEL"; then fi fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/testlibinfo.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5diff/Makefile tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/examples/Makefile c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/tools/Makefile hl/tools/gif2h5/Makefile hl/examples/Makefile hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5diff/Makefile tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/examples/Makefile hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile" cat >confcache <<\_ACEOF @@ -28847,7 +28847,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.59-FA_a4, which was +This file was extended by HDF5 $as_me 1.9.64-FA_a4, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -28911,7 +28911,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -HDF5 config.status 1.9.59-FA_a4 +HDF5 config.status 1.9.64-FA_a4 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -29478,6 +29478,7 @@ do "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/testcheck_version.sh") CONFIG_FILES="$CONFIG_FILES test/testcheck_version.sh" ;; "test/testerror.sh") CONFIG_FILES="$CONFIG_FILES test/testerror.sh" ;; + "test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES test/H5srcdir_str.h" ;; "test/testlibinfo.sh") CONFIG_FILES="$CONFIG_FILES test/testlibinfo.sh" ;; "testpar/Makefile") CONFIG_FILES="$CONFIG_FILES testpar/Makefile" ;; "testpar/testph5.sh") CONFIG_FILES="$CONFIG_FILES testpar/testph5.sh" ;; @@ -29507,6 +29508,7 @@ do "c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES c++/src/Makefile" ;; "c++/src/h5c++") CONFIG_FILES="$CONFIG_FILES c++/src/h5c++" ;; "c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES c++/test/Makefile" ;; + "c++/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES c++/test/H5srcdir_str.h" ;; "c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES c++/examples/Makefile" ;; "c++/examples/testh5c++.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/testh5c++.sh" ;; "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;; @@ -29519,6 +29521,7 @@ do "hl/Makefile") CONFIG_FILES="$CONFIG_FILES hl/Makefile" ;; "hl/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/src/Makefile" ;; "hl/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/test/Makefile" ;; + "hl/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES hl/test/H5srcdir_str.h" ;; "hl/tools/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/Makefile" ;; "hl/tools/gif2h5/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/Makefile" ;; "hl/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/examples/Makefile" ;; diff --git a/configure.in b/configure.in index afa3fc8..ffb3ca3 100644 --- a/configure.in +++ b/configure.in @@ -26,7 +26,7 @@ dnl dnl NOTE: Don't forget to change the version number here when we do a dnl release!!! dnl -AC_INIT([HDF5], [1.9.59-FA_a4], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.64-FA_a4], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AM_CONFIG_HEADER([src/H5config.h]) @@ -4051,6 +4051,7 @@ AC_CONFIG_FILES([src/libhdf5.settings test/Makefile test/testcheck_version.sh test/testerror.sh + test/H5srcdir_str.h test/testlibinfo.sh testpar/Makefile testpar/testph5.sh @@ -4080,6 +4081,7 @@ AC_CONFIG_FILES([src/libhdf5.settings c++/src/Makefile c++/src/h5c++ c++/test/Makefile + c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/testh5c++.sh fortran/Makefile @@ -4092,6 +4094,7 @@ AC_CONFIG_FILES([src/libhdf5.settings hl/Makefile hl/src/Makefile hl/test/Makefile + hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/examples/Makefile diff --git a/fortran/examples/attrexample.f90 b/fortran/examples/attrexample.f90 index 9cf96dc..ffbeabe 100644 --- a/fortran/examples/attrexample.f90 +++ b/fortran/examples/attrexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,30 +11,30 @@ ! 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 example shows how to create and write a dataset attribute. +! This example shows how to create and write a dataset attribute. ! It opens the existing file 'dset.h5', obtains the identifier of -! the dataset "/dset", defines attribute's dataspace, +! the dataset "/dset", defines attribute's dataspace, ! creates dataset attribute, writes the attribute, and then closes -! the attribute's dataspace, attribute, dataset, and file. +! the attribute's dataspace, attribute, dataset, and file. PROGRAM ATTREXAMPLE - - USE HDF5 ! This module contains all necessary modules - + + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name CHARACTER(LEN=9), PARAMETER :: aname = "attr_long" ! Attribute name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: attr_id ! Attribute identifier - INTEGER(HID_T) :: aspace_id ! Attribute Dataspace identifier - INTEGER(HID_T) :: atype_id ! Attribute Dataspace identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: attr_id ! Attribute identifier + INTEGER(HID_T) :: aspace_id ! Attribute Dataspace identifier + INTEGER(HID_T) :: atype_id ! Attribute Dataspace identifier INTEGER(HSIZE_T), DIMENSION(1) :: adims = (/2/) ! Attribute dimension INTEGER :: arank = 1 ! Attribure rank INTEGER(SIZE_T) :: attrlen ! Length of the attribute string @@ -43,31 +43,31 @@ INTEGER :: error ! Error flag INTEGER(HSIZE_T), DIMENSION(1) :: data_dims - + ! ! Initialize attribute's data ! attr_data(1) = "Dataset character attribute" attr_data(2) = "Some other string here " - attrlen = 80 + attrlen = 80 ! ! Initialize FORTRAN interface. ! - CALL h5open_f(error) - + CALL h5open_f(error) + ! ! Open an existing file. ! CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error) ! - ! Open an existing dataset. + ! Open an existing dataset. ! CALL h5dopen_f(file_id, dsetname, dset_id, error) ! - ! Create scalar data space for the attribute. + ! Create scalar data space for the attribute. ! CALL h5screate_simple_f(arank, adims, aspace_id, error) ! @@ -75,35 +75,35 @@ ! CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error) CALL h5tset_size_f(atype_id, attrlen, error) - + ! ! Create dataset attribute. ! CALL h5acreate_f(dset_id, aname, atype_id, aspace_id, & attr_id, error) - + ! ! Write the attribute data. ! data_dims(1) = 2 CALL h5awrite_f(attr_id, atype_id, attr_data, data_dims, error) - + ! - ! Close the attribute. + ! Close the attribute. ! CALL h5aclose_f(attr_id, error) - + ! ! Terminate access to the data space. ! CALL h5sclose_f(aspace_id, error) - ! + ! ! End access to the dataset and release resources used by it. - ! + ! CALL h5dclose_f(dset_id, error) - ! + ! ! Close the file. ! CALL h5fclose_f(file_id, error) @@ -113,5 +113,5 @@ ! CALL h5close_f(error) - END PROGRAM ATTREXAMPLE - + END PROGRAM ATTREXAMPLE + diff --git a/fortran/examples/compound.f90 b/fortran/examples/compound.f90 index a315fb0..2005f41 100644 --- a/fortran/examples/compound.f90 +++ b/fortran/examples/compound.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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 program creates a dataset that is one dimensional array of @@ -26,23 +26,23 @@ PROGRAM COMPOUNDEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=11), PARAMETER :: filename = "compound.h5" ! File name CHARACTER(LEN=8), PARAMETER :: dsetname = "Compound" ! Dataset name INTEGER, PARAMETER :: dimsize = 6 ! Size of the dataset - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier INTEGER(HID_T) :: dspace_id ! Dataspace identifier INTEGER(HID_T) :: dtype_id ! Compound datatype identifier INTEGER(HID_T) :: dt1_id ! Memory datatype identifier (for character field) INTEGER(HID_T) :: dt2_id ! Memory datatype identifier (for integer field) INTEGER(HID_T) :: dt3_id ! Memory datatype identifier (for double precision field) INTEGER(HID_T) :: dt4_id ! Memory datatype identifier (for real field) - INTEGER(HID_T) :: dt5_id ! Memory datatype identifier + INTEGER(HID_T) :: dt5_id ! Memory datatype identifier INTEGER(HID_T) :: plist_id ! Dataset trasfer property INTEGER(SIZE_T) :: typesize @@ -52,7 +52,7 @@ INTEGER :: error ! Error flag INTEGER(SIZE_T) :: type_size ! Size of the datatype - INTEGER(SIZE_T) :: type_sizec ! Size of the character datatype + INTEGER(SIZE_T) :: type_sizec ! Size of the character datatype INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype INTEGER(SIZE_T) :: type_sized ! Size of the double precision datatype INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype @@ -63,7 +63,7 @@ DOUBLE PRECISION, DIMENSION(dimsize) :: double_member REAL, DIMENSION(dimsize) :: real_member INTEGER :: i - INTEGER(HSIZE_T), DIMENSION(1) :: data_dims + INTEGER(HSIZE_T), DIMENSION(1) :: data_dims data_dims(1) = dimsize ! ! Initialize data buffer. @@ -71,8 +71,8 @@ do i = 1, dimsize char_member(i)(1:1) = char(65+i) char_member(i)(2:2) = char(65+i) - char_member_out(i)(1:1) = char(65) - char_member_out(i)(2:2) = char(65) + char_member_out(i)(1:1) = char(65) + char_member_out(i)(2:2) = char(65) int_member(i) = i double_member(i) = 2.* i real_member(i) = 3. * i @@ -91,10 +91,10 @@ ! ! Create a new file using default properties. - ! + ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) - ! + ! ! Create the dataspace. ! CALL h5screate_simple_f(rank, dims, dspace_id, error) @@ -141,8 +141,8 @@ CALL h5dcreate_f(file_id, dsetname, dtype_id, dspace_id, & dset_id, error) ! - ! Create memory types. We have to create a compound datatype - ! for each member we want to write. + ! Create memory types. We have to create a compound datatype + ! for each member we want to write. ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizec, dt1_id, error) offset = 0 @@ -167,9 +167,9 @@ CALL h5dwrite_f(dset_id, dt3_id, double_member, data_dims, error, xfer_prp = plist_id) CALL h5dwrite_f(dset_id, dt2_id, int_member, data_dims, error, xfer_prp = plist_id) - ! + ! ! End access to the dataset and release resources used by it. - ! + ! CALL h5dclose_f(dset_id, error) ! @@ -186,11 +186,11 @@ CALL h5tclose_f(dt4_id, error) CALL h5tclose_f(dt5_id, error) - ! + ! ! Close the file. ! CALL h5fclose_f(file_id, error) - + ! ! Open the file. ! @@ -227,6 +227,6 @@ ! CALL h5close_f(error) - END PROGRAM COMPOUNDEXAMPLE - - + END PROGRAM COMPOUNDEXAMPLE + + diff --git a/fortran/examples/dsetexample.f90 b/fortran/examples/dsetexample.f90 index 69609b4..209a516 100644 --- a/fortran/examples/dsetexample.f90 +++ b/fortran/examples/dsetexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,10 +11,10 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! -! The following example shows how to create an empty dataset. +! The following example shows how to create an empty dataset. ! It creates a file called 'dsetf.h5', defines the ! dataset dataspace, creates a dataset which is a 4x6 integer array, ! and then closes the dataspace, the dataset, and the file. @@ -22,15 +22,15 @@ PROGRAM DSETEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier INTEGER(HID_T) :: dspace_id ! Dataspace identifier @@ -46,10 +46,10 @@ ! ! Create a new file using default properties. - ! + ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) - ! + ! ! Create the dataspace. ! CALL h5screate_simple_f(rank, dims, dspace_id, error) @@ -60,9 +60,9 @@ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, & dset_id, error) - ! + ! ! End access to the dataset and release resources used by it. - ! + ! CALL h5dclose_f(dset_id, error) ! @@ -70,7 +70,7 @@ ! CALL h5sclose_f(dspace_id, error) - ! + ! ! Close the file. ! CALL h5fclose_f(file_id, error) @@ -80,6 +80,6 @@ ! CALL h5close_f(error) - END PROGRAM DSETEXAMPLE - - + END PROGRAM DSETEXAMPLE + + diff --git a/fortran/examples/fileexample.f90 b/fortran/examples/fileexample.f90 index c25bfef..87119d2 100644 --- a/fortran/examples/fileexample.f90 +++ b/fortran/examples/fileexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! ! The following example demonstrates how to create and close an HDF5 file. @@ -20,22 +20,22 @@ PROGRAM FILEEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=8), PARAMETER :: filename = "filef.h5" ! File name INTEGER(HID_T) :: file_id ! File identifier - + INTEGER :: error ! Error flag - + ! ! Initialize FORTRAN interface. ! CALL h5open_f (error) ! ! Create a new file using default properties. - ! + ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) ! @@ -46,4 +46,4 @@ ! Close FORTRAN interface. ! CALL h5close_f(error) - END PROGRAM FILEEXAMPLE + END PROGRAM FILEEXAMPLE diff --git a/fortran/examples/groupexample.f90 b/fortran/examples/groupexample.f90 index cb069df..91ebc50 100644 --- a/fortran/examples/groupexample.f90 +++ b/fortran/examples/groupexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,35 +11,35 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! -! The following example shows how to create and close a group. +! The following example shows how to create and close a group. ! It creates a file called 'group.h5', creates a group ! called MyGroup in the root group, and then closes the group and file. -! +! PROGRAM GROUPEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=9), PARAMETER :: filename = "groupf.h5" ! File name CHARACTER(LEN=7), PARAMETER :: groupname = "MyGroup" ! Group name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: group_id ! Group identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: group_id ! Group identifier INTEGER :: error ! Error flag ! ! Initialize FORTRAN interface. ! - CALL h5open_f(error) + CALL h5open_f(error) ! ! Create a new file using default properties. - ! + ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) ! @@ -61,4 +61,4 @@ ! CALL h5close_f(error) - END PROGRAM GROUPEXAMPLE + END PROGRAM GROUPEXAMPLE diff --git a/fortran/examples/grpdsetexample.f90 b/fortran/examples/grpdsetexample.f90 index ce89304..19fc660 100644 --- a/fortran/examples/grpdsetexample.f90 +++ b/fortran/examples/grpdsetexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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 example shows how to create a dataset in a particular group. @@ -22,8 +22,8 @@ PROGRAM GRPDSETEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name @@ -31,17 +31,17 @@ CHARACTER(LEN=13), PARAMETER :: dsetname1 = "MyGroup/dset1" ! Dataset name CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: group_id ! Group identifier - INTEGER(HID_T) :: dataset_id ! Dataset identifier - INTEGER(HID_T) :: dataspace_id ! Data space identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: group_id ! Group identifier + INTEGER(HID_T) :: dataset_id ! Dataset identifier + INTEGER(HID_T) :: dataspace_id ! Data space identifier - INTEGER :: i, j + INTEGER :: i, j INTEGER :: error ! Error flag - INTEGER, DIMENSION(3,3) :: dset1_data ! Data arrays + INTEGER, DIMENSION(3,3) :: dset1_data ! Data arrays INTEGER, DIMENSION(2,10) :: dset2_data ! - + INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/3,3/) ! Datasets dimensions INTEGER(HSIZE_T), DIMENSION(2) :: dims2 = (/2,10/)! INTEGER(HSIZE_T), DIMENSION(2) :: data_dims @@ -70,7 +70,7 @@ ! ! Initialize FORTRAN interface. ! - CALL h5open_f(error) + CALL h5open_f(error) ! ! Open an existing file. @@ -78,7 +78,7 @@ CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error) ! - ! Create the data space for the first dataset. + ! Create the data space for the first dataset. ! CALL h5screate_simple_f(rank, dims1, dataspace_id, error) @@ -111,7 +111,7 @@ CALL h5gopen_f(file_id, groupname, group_id, error) ! - !Create the data space for the second dataset. + !Create the data space for the second dataset. ! CALL h5screate_simple_f(rank, dims2, dataspace_id, error) @@ -125,7 +125,7 @@ ! Write the second dataset. ! data_dims(1) = 2 - data_dims(1) = 10 + data_dims(1) = 10 CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, dset2_data, data_dims, error) ! @@ -153,4 +153,4 @@ ! CALL h5close_f(error) - END PROGRAM GRPDSETEXAMPLE + END PROGRAM GRPDSETEXAMPLE diff --git a/fortran/examples/grpit.f90 b/fortran/examples/grpit.f90 index 86a87b1..9361b17 100644 --- a/fortran/examples/grpit.f90 +++ b/fortran/examples/grpit.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! ! In this example we iterate through the members of the groups. @@ -20,8 +20,8 @@ PROGRAM GRPITEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=11), PARAMETER :: filename = "iteratef.h5" ! File name @@ -34,12 +34,12 @@ INTEGER :: type ! Type of the object INTEGER :: nmembers ! Number of group members - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dataset1_id ! Dataset1 identifier - INTEGER(HID_T) :: dataset2_id ! Dataset2 identifier - INTEGER(HID_T) :: dataspace1_id ! Data space identifier - INTEGER(HID_T) :: dataspace2_id ! Data space identifier - INTEGER(HID_T) :: group1_id, group2_id ! Group identifiers + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dataset1_id ! Dataset1 identifier + INTEGER(HID_T) :: dataset2_id ! Dataset2 identifier + INTEGER(HID_T) :: dataspace1_id ! Data space identifier + INTEGER(HID_T) :: dataspace2_id ! Data space identifier + INTEGER(HID_T) :: group1_id, group2_id ! Group identifiers INTEGER :: i, j @@ -47,11 +47,11 @@ INTEGER, DIMENSION(3,3) :: dset1_data ! Arrays to hold data INTEGER, DIMENSION(2,10) :: dset2_data ! - - + + INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/3,3/) ! Dataset dimensions INTEGER(HSIZE_T), DIMENSION(2) :: dims2 = (/2,10/)! - INTEGER :: rank = 2 ! Datasets rank + INTEGER :: rank = 2 ! Datasets rank INTEGER(HSIZE_T), DIMENSION(2) :: data_dims ! @@ -76,11 +76,11 @@ ! ! Initialize FORTRAN interface. ! - CALL h5open_f(error) + CALL h5open_f(error) ! ! Create a new file using default properties. - ! + ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) ! @@ -94,7 +94,7 @@ CALL h5gcreate_f(group1_id, groupname2, group2_id, error) ! - ! Create the data space for the first dataset. + ! Create the data space for the first dataset. ! CALL h5screate_simple_f(rank, dims1, dataspace1_id, error) @@ -112,7 +112,7 @@ CALL h5dwrite_f(dataset1_id, H5T_NATIVE_INTEGER, dset1_data, data_dims, error) ! - ! Create the data space for the second dataset. + ! Create the data space for the second dataset. ! CALL h5screate_simple_f(rank, dims2, dataspace2_id, error) @@ -206,10 +206,10 @@ ! Close the file. ! CALL h5fclose_f(file_id, error) - + ! ! Close FORTRAN interface. ! CALL h5close_f(error) - END PROGRAM GRPITEXAMPLE + END PROGRAM GRPITEXAMPLE diff --git a/fortran/examples/grpsexample.f90 b/fortran/examples/grpsexample.f90 index 3a6efac..0f694e9 100644 --- a/fortran/examples/grpsexample.f90 +++ b/fortran/examples/grpsexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,41 +11,41 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! -! The following example code shows how to create groups +! The following example code shows how to create groups ! using absolute and relative names. It creates three groups: -! the first two groups are created using the file identifier and -! the group absolute names, and the third group is created using +! the first two groups are created using the file identifier and +! the group absolute names, and the third group is created using ! a group identifier and the name relative to the specified group. ! PROGRAM GRPSEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name CHARACTER(LEN=8), PARAMETER :: groupname1 = "/MyGroup" ! Group name - CHARACTER(LEN=16), PARAMETER :: groupname2 = "/MyGroup/Group_A" + CHARACTER(LEN=16), PARAMETER :: groupname2 = "/MyGroup/Group_A" ! Group name CHARACTER(LEN=7), PARAMETER :: groupname3 = "Group_B" ! Group name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: group1_id, group2_id, group3_id ! Group identifiers + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: group1_id, group2_id, group3_id ! Group identifiers INTEGER :: error ! Error flag ! ! Initialize FORTRAN interface. ! - CALL h5open_f(error) - + CALL h5open_f(error) + ! ! Create a new file using default properties. - ! + ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) ! @@ -62,7 +62,7 @@ ! Create group "Group_B" in group "MyGroup" using relative name. ! CALL h5gcreate_f(group1_id, groupname3, group3_id, error) - + ! ! Close the groups. ! @@ -78,6 +78,6 @@ ! ! Close FORTRAN interface. ! - CALL h5close_f(error) + CALL h5close_f(error) - END PROGRAM GRPSEXAMPLE + END PROGRAM GRPSEXAMPLE diff --git a/fortran/examples/hyperslab.f90 b/fortran/examples/hyperslab.f90 index 151ecf3..ca27f35 100644 --- a/fortran/examples/hyperslab.f90 +++ b/fortran/examples/hyperslab.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,57 +11,57 @@ ! 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 example shows how to write and read a hyperslab. +! This example shows how to write and read a hyperslab. ! PROGRAM SELECTEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=7), PARAMETER :: filename = "sdsf.h5" ! File name CHARACTER(LEN=8), PARAMETER :: dsetname = "IntArray" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: dataspace ! Dataspace identifier - INTEGER(HID_T) :: memspace ! memspace identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: dataspace ! Dataspace identifier + INTEGER(HID_T) :: memspace ! memspace identifier INTEGER(HSIZE_T), DIMENSION(3) :: dimsm = (/7,7,3/) ! Dataset dimensions ! in memory - INTEGER(HSIZE_T), DIMENSION(2) :: dims_out ! Buffer to read in dataset + INTEGER(HSIZE_T), DIMENSION(2) :: dims_out ! Buffer to read in dataset ! dimesions INTEGER(HSIZE_T), DIMENSION(2) :: dimsf = (/5,6/) ! Dataset dimensions. - INTEGER(HSIZE_T), DIMENSION(2) :: count = (/3,4/) + INTEGER(HSIZE_T), DIMENSION(2) :: count = (/3,4/) ! Size of the hyperslab in the file INTEGER(HSIZE_T), DIMENSION(2) :: offset = (/1,2/) - !hyperslab offset in the file + !hyperslab offset in the file INTEGER(HSIZE_T), DIMENSION(3) :: count_out = (/3,4,1/) - !Size of the hyperslab in memory + !Size of the hyperslab in memory INTEGER(HSIZE_T), DIMENSION(3) :: offset_out = (/3,0,0/) - !hyperslab offset in memory + !hyperslab offset in memory INTEGER, DIMENSION(5,6) :: data ! Data to write INTEGER, DIMENSION(7,7,3) :: data_out ! Output buffer INTEGER :: dsetrank = 2 ! Dataset rank ( in file ) INTEGER :: memrank = 3 ! Dataset rank ( in memory ) - INTEGER :: rank - INTEGER :: i, j, k + INTEGER :: rank + INTEGER :: i, j, k INTEGER :: error, error_n ! Error flags INTEGER(HSIZE_T), DIMENSION(3) :: data_dims ! - ! Write data to the HDF5 file. + ! Write data to the HDF5 file. ! ! - ! Data initialization. + ! Data initialization. ! do i = 1, 5 do j = 1, 6 @@ -75,19 +75,19 @@ ! 3, 4, 5, 6, 7, 8 ! 4, 5, 6, 7, 8, 9 ! - + ! - ! Initialize FORTRAN interface. + ! Initialize FORTRAN interface. ! - CALL h5open_f(error) + CALL h5open_f(error) ! ! Create a new file using default properties. - ! + ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) ! - ! Create the data space for the dataset. + ! Create the data space for the dataset. ! CALL h5screate_simple_f(dsetrank, dimsf, dataspace, error) @@ -101,7 +101,7 @@ ! Write the dataset. ! data_dims(1) = 5 - data_dims(2) = 6 + data_dims(2) = 6 CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, data_dims, error) ! @@ -120,14 +120,14 @@ CALL h5fclose_f(file_id, error) ! - ! This part of the code reads the hyperslab from the sds.h5 file just + ! This part of the code reads the hyperslab from the sds.h5 file just ! created, into a 2-dimensional plane of the 3-dimensional dataset. ! ! ! Initialize data_out array. ! - do k = 1, 3 + do k = 1, 3 do j = 1, 7 do i = 1, 7 data_out(i,j,k) = 0; @@ -141,7 +141,7 @@ ! CALL h5fopen_f (filename, H5F_ACC_RDONLY_F, file_id, error) CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error) write(*,*) error - + ! ! Open the dataset. ! @@ -156,7 +156,7 @@ ! Select hyperslab in the dataset. ! CALL h5sselect_hyperslab_f(dataspace, H5S_SELECT_SET_F, & - offset, count, error) + offset, count, error) ! ! Create memory dataspace. ! @@ -166,18 +166,18 @@ ! Select hyperslab in memory. ! CALL h5sselect_hyperslab_f(memspace, H5S_SELECT_SET_F, & - offset_out, count_out, error) + offset_out, count_out, error) ! - ! Read data from hyperslab in the file into the hyperslab in + ! Read data from hyperslab in the file into the hyperslab in ! memory and display. ! data_dims(1) = 7 data_dims(2) = 7 - data_dims(3) = 3 + data_dims(3) = 3 CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, & memspace, dataspace) - + ! ! Display data_out array ! @@ -188,7 +188,7 @@ ! 0 0 0 0 0 0 0 ! 0 0 0 0 0 0 0 ! 0 0 0 0 0 0 0 - ! 3 4 5 6 0 0 0 + ! 3 4 5 6 0 0 0 ! 4 5 6 7 0 0 0 ! 5 6 7 8 0 0 0 ! 0 0 0 0 0 0 0 @@ -219,4 +219,4 @@ ! CALL h5close_f(error) - END PROGRAM SELECTEXAMPLE + END PROGRAM SELECTEXAMPLE diff --git a/fortran/examples/mountexample.f90 b/fortran/examples/mountexample.f90 index fe9eb7e..5bdec2a 100644 --- a/fortran/examples/mountexample.f90 +++ b/fortran/examples/mountexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,19 +11,19 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! -!In the following example we create one file with a group in it, +!In the following example we create one file with a group in it, !and another file with a dataset. Mounting is used to -!access the dataset from the second file as a member of a group -!in the first file. +!access the dataset from the second file as a member of a group +!in the first file. ! PROGRAM MOUNTEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE ! @@ -42,53 +42,53 @@ ! ! File identifiers ! - INTEGER(HID_T) :: file1_id, file2_id - + INTEGER(HID_T) :: file1_id, file2_id + ! ! Group identifier ! - INTEGER(HID_T) :: gid + INTEGER(HID_T) :: gid ! ! Dataset identifier ! INTEGER(HID_T) :: dset_id - + ! ! Data space identifier ! INTEGER(HID_T) :: dataspace - + ! ! Data type identifier ! INTEGER(HID_T) :: dtype_id - ! + ! ! The dimensions for the dataset. ! INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/NX,NY/) ! - ! Flag to check operation success - ! + ! Flag to check operation success + ! INTEGER :: error ! - ! General purpose integer - ! + ! General purpose integer + ! INTEGER :: i, j ! - ! Data buffers - ! + ! Data buffers + ! INTEGER, DIMENSION(NX,NY) :: data_in, data_out INTEGER(HSIZE_T), DIMENSION(2) :: data_dims ! - ! Initialize FORTRAN interface. + ! Initialize FORTRAN interface. ! - CALL h5open_f(error) + CALL h5open_f(error) ! ! Initialize data_in buffer @@ -101,36 +101,36 @@ ! ! Create first file "mount1.h5" using default properties. - ! + ! CALL h5fcreate_f(filename1, H5F_ACC_TRUNC_F, file1_id, error) ! ! Create group "/G" inside file "mount1.h5". - ! + ! CALL h5gcreate_f(file1_id, "/G", gid, error) ! ! Close file and group identifiers. - ! + ! CALL h5gclose_f(gid, error) CALL h5fclose_f(file1_id, error) ! ! Create second file "mount2.h5" using default properties. - ! + ! CALL h5fcreate_f(filename2, H5F_ACC_TRUNC_F, file2_id, error) ! - ! Create data space for the dataset. + ! Create data space for the dataset. ! CALL h5screate_simple_f(RANK, dims, dataspace, error) ! ! Create dataset "/D" inside file "mount2.h5". - ! + ! CALL h5dcreate_f(file2_id, "/D", H5T_NATIVE_INTEGER, dataspace, & dset_id, error) - + ! ! Write data_in to the dataset ! @@ -140,41 +140,41 @@ ! ! Close file, dataset and dataspace identifiers. - ! + ! CALL h5sclose_f(dataspace, error) CALL h5dclose_f(dset_id, error) CALL h5fclose_f(file2_id, error) ! ! Reopen both files. - ! + ! CALL h5fopen_f (filename1, H5F_ACC_RDWR_F, file1_id, error) CALL h5fopen_f (filename2, H5F_ACC_RDWR_F, file2_id, error) ! ! Mount the second file under the first file's "/G" group. - ! + ! CALL h5fmount_f (file1_id, "/G", file2_id, error) ! ! Access dataset D in the first file under /G/D name. - ! + ! CALL h5dopen_f(file1_id, "/G/D", dset_id, error) ! ! Get dataset's data type. - ! + ! CALL h5dget_type_f(dset_id, dtype_id, error) ! ! Read the dataset. - ! + ! CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) ! ! Print out the data. - ! + ! do i = 1, NX print *, (data_out(i,j), j = 1, NY) end do @@ -182,24 +182,24 @@ ! !Close dset_id and dtype_id. - ! + ! CALL h5dclose_f(dset_id, error) CALL h5tclose_f(dtype_id, error) ! ! Unmount the second file. - ! + ! CALL h5funmount_f(file1_id, "/G", error); ! ! Close both files. - ! + ! CALL h5fclose_f(file1_id, error) CALL h5fclose_f(file2_id, error) ! - ! Close FORTRAN interface. + ! Close FORTRAN interface. ! - CALL h5close_f(error) + CALL h5close_f(error) END PROGRAM MOUNTEXAMPLE diff --git a/fortran/examples/ph5example.f90 b/fortran/examples/ph5example.f90 index 208ebc7..a0db200 100644 --- a/fortran/examples/ph5example.f90 +++ b/fortran/examples/ph5example.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,15 +11,15 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! Fortran parallel example. Copied from Tutorial's example program of ! dataset.f90. PROGRAM DATASET - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INCLUDE 'mpif.h' @@ -28,18 +28,18 @@ CHARACTER(LEN=100) :: filename ! File name INTEGER :: fnamelen ! File name length - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: filespace ! Dataspace identifier in file - INTEGER(HID_T) :: plist_id ! Property list identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: filespace ! Dataspace identifier in file + INTEGER(HID_T) :: plist_id ! Property list identifier INTEGER(HSIZE_T), DIMENSION(2) :: dimsf = (/5,8/) ! Dataset dimensions. -! INTEGER, DIMENSION(7) :: dimsfi = (/5,8,0,0,0,0,0/) +! INTEGER, DIMENSION(7) :: dimsfi = (/5,8,0,0,0,0,0/) ! INTEGER(HSIZE_T), DIMENSION(2) :: dimsfi = (/5,8/) INTEGER(HSIZE_T), DIMENSION(2) :: dimsfi INTEGER, ALLOCATABLE :: data(:,:) ! Data to write - INTEGER :: rank = 2 ! Dataset rank + INTEGER :: rank = 2 ! Dataset rank INTEGER :: error, error_n ! Error flags INTEGER :: i, j @@ -53,22 +53,22 @@ info = MPI_INFO_NULL CALL MPI_INIT(mpierror) CALL MPI_COMM_SIZE(comm, mpi_size, mpierror) - CALL MPI_COMM_RANK(comm, mpi_rank, mpierror) - ! + CALL MPI_COMM_RANK(comm, mpi_rank, mpierror) + ! ! Initialize data buffer with trivial data. ! ALLOCATE ( data(dimsf(1),dimsf(2))) do i = 1, dimsf(2) do j = 1, dimsf(1) - data(j,i) = j - 1 + (i-1)*dimsf(1) + data(j,i) = j - 1 + (i-1)*dimsf(1) enddo enddo ! ! Initialize FORTRAN interface ! - CALL h5open_f(error) + CALL h5open_f(error) - ! + ! ! Setup file access property list with parallel I/O access. ! CALL h5pcreate_f(H5P_FILE_ACCESS_F, plist_id, error) @@ -89,11 +89,11 @@ ! ! Create the file collectively. - ! + ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error, access_prp = plist_id) CALL h5pclose_f(plist_id, error) ! - ! Create the data space for the dataset. + ! Create the data space for the dataset. ! CALL h5screate_simple_f(rank, dimsf, filespace, error) @@ -105,15 +105,15 @@ ! ! Create property list for collective dataset write ! - CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error) + CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error) CALL h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_COLLECTIVE_F, error) ! - ! For independent write use + ! For independent write use ! CALL h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_INDEPENDENT_F, error) ! - + ! - ! Write the dataset collectively. + ! Write the dataset collectively. ! CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, & xfer_prp = plist_id) diff --git a/fortran/examples/refobjexample.f90 b/fortran/examples/refobjexample.f90 index 1889b8b..c8622a7 100644 --- a/fortran/examples/refobjexample.f90 +++ b/fortran/examples/refobjexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,49 +11,49 @@ ! 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 program shows how to create and store references to the objects. -! Program creates a file, two groups, a dataset to store integer data and -! a dataset to store references to the objects. +! Program creates a file, two groups, a dataset to store integer data and +! a dataset to store references to the objects. ! Stored references are used to open the objects they are point to. ! Data is written to the dereferenced dataset, and class type is displayed for ! the shared datatype. ! - PROGRAM OBJ_REFERENCES + PROGRAM OBJ_REFERENCES + + USE HDF5 ! This module contains all necessary modules - USE HDF5 ! This module contains all necessary modules - IMPLICIT NONE - CHARACTER(LEN=10), PARAMETER :: filename = "FORTRAN.h5" ! File + CHARACTER(LEN=10), PARAMETER :: filename = "FORTRAN.h5" ! File CHARACTER(LEN=8), PARAMETER :: dsetnamei = "INTEGERS" ! Dataset with the integer data CHARACTER(LEN=17), PARAMETER :: dsetnamer = "OBJECT_REFERENCES" ! Dataset wtih object ! references CHARACTER(LEN=6), PARAMETER :: groupname1 = "GROUP1" ! Groups in the file CHARACTER(LEN=6), PARAMETER :: groupname2 = "GROUP2" ! - - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: grp1_id ! Group identifiers - INTEGER(HID_T) :: grp2_id ! - INTEGER(HID_T) :: dset_id ! Dataset identifiers - INTEGER(HID_T) :: dsetr_id ! - INTEGER(HID_T) :: type_id ! Type identifier - INTEGER(HID_T) :: space_id ! Dataspace identifiers - INTEGER(HID_T) :: spacer_id ! + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: grp1_id ! Group identifiers + INTEGER(HID_T) :: grp2_id ! + INTEGER(HID_T) :: dset_id ! Dataset identifiers + INTEGER(HID_T) :: dsetr_id ! + INTEGER(HID_T) :: type_id ! Type identifier + INTEGER(HID_T) :: space_id ! Dataspace identifiers + INTEGER(HID_T) :: spacer_id ! INTEGER :: error INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/5/) INTEGER(HSIZE_T), DIMENSION(1) :: dimsr= (/4/) INTEGER(HSIZE_T), DIMENSION(1) :: my_maxdims = (/5/) - INTEGER :: rank = 1 - INTEGER :: rankr = 1 + INTEGER :: rank = 1 + INTEGER :: rankr = 1 TYPE(hobj_ref_t_f), DIMENSION(4) :: ref TYPE(hobj_ref_t_f), DIMENSION(4) :: ref_out INTEGER, DIMENSION(5) :: data = (/1, 2, 3, 4, 5/) INTEGER :: class INTEGER(HSIZE_T), DIMENSION(2) :: data_dims, ref_size ! - ! Initialize FORTRAN interface. + ! Initialize FORTRAN interface. ! CALL h5open_f(error) ! @@ -61,17 +61,17 @@ ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) ! Default file access and file creation - ! properties are used. + ! properties are used. ! ! Create a group in the file ! CALL h5gcreate_f(file_id, groupname1, grp1_id, error) ! - ! Create a group inside the created gorup + ! Create a group inside the created gorup ! CALL h5gcreate_f(grp1_id, groupname2, grp2_id, error) - ! - ! Create dataspaces for datasets + ! + ! Create dataspaces for datasets ! CALL h5screate_simple_f(rank, dims, space_id, error, maxdims=my_maxdims) CALL h5screate_simple_f(rankr, dimsr, spacer_id, error) @@ -92,7 +92,7 @@ CALL h5tcommit_f(file_id, "MyType", type_id, error) ! ! Close dataspaces, groups and integer dataset - ! + ! CALL h5sclose_f(space_id, error) CALL h5sclose_f(spacer_id, error) CALL h5tclose_f(type_id, error) @@ -113,7 +113,7 @@ ! Close the dataset ! CALL h5dclose_f(dsetr_id, error) - ! + ! ! Reopen the dataset with object references and read references to the buffer ! CALL h5dopen_f(file_id, dsetnamer,dsetr_id,error) @@ -141,7 +141,7 @@ ! Get datatype class and display it if it is of a FLOAT class. ! CALL h5tget_class_f(type_id, class, error) - if(class .eq. H5T_FLOAT_F) write(*,*) "Stored datatype is of a FLOAT class" + if(class .eq. H5T_FLOAT_F) write(*,*) "Stored datatype is of a FLOAT class" ! ! Close all objects. ! @@ -150,10 +150,10 @@ CALL h5dclose_f(dsetr_id, error) CALL h5fclose_f(file_id, error) ! - ! Close FORTRAN interface. + ! Close FORTRAN interface. ! CALL h5close_f(error) - END PROGRAM OBJ_REFERENCES + END PROGRAM OBJ_REFERENCES diff --git a/fortran/examples/refregexample.f90 b/fortran/examples/refregexample.f90 index e7728bb..68fbd24 100644 --- a/fortran/examples/refregexample.f90 +++ b/fortran/examples/refregexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,43 +11,43 @@ ! 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 program shows how to create, store and dereference references +! This program shows how to create, store and dereference references ! to the dataset regions. ! Program creates a file and writes two dimensional integer dataset ! to it. Then program creates and stores references to the hyperslab -! and 3 points selected in the integer dataset, in the second dataset. +! and 3 points selected in the integer dataset, in the second dataset. ! Program reopens the second dataset, reads and dereferences region -! references, and then reads and displays selected data from the +! references, and then reads and displays selected data from the ! integer dataset. -! +! PROGRAM REG_REFERENCE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=10), PARAMETER :: filename = "FORTRAN.h5" CHARACTER(LEN=6), PARAMETER :: dsetnamev = "MATRIX" CHARACTER(LEN=17), PARAMETER :: dsetnamer = "REGION_REFERENCES" - - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: space_id ! Dataspace identifier - INTEGER(HID_T) :: spacer_id ! Dataspace identifier - INTEGER(HID_T) :: dsetv_id ! Dataset identifier - INTEGER(HID_T) :: dsetr_id ! Dataset identifier + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: space_id ! Dataspace identifier + INTEGER(HID_T) :: spacer_id ! Dataspace identifier + INTEGER(HID_T) :: dsetv_id ! Dataset identifier + INTEGER(HID_T) :: dsetr_id ! Dataset identifier INTEGER :: error TYPE(hdset_reg_ref_t_f) , DIMENSION(2) :: ref ! Buffers to store references TYPE(hdset_reg_ref_t_f) , DIMENSION(2) :: ref_out ! INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/2,9/) ! Datasets dimensions - INTEGER(HSIZE_T), DIMENSION(1) :: dimsr = (/2/) ! + INTEGER(HSIZE_T), DIMENSION(1) :: dimsr = (/2/) ! INTEGER(HSIZE_T), DIMENSION(2) :: start INTEGER(HSIZE_T), DIMENSION(2) :: count - INTEGER :: rankr = 1 + INTEGER :: rankr = 1 INTEGER :: rank = 2 - INTEGER , DIMENSION(2,9) :: data - INTEGER , DIMENSION(2,9) :: data_out = 0 + INTEGER , DIMENSION(2,9) :: data + INTEGER , DIMENSION(2,9) :: data_out = 0 INTEGER(HSIZE_T) , DIMENSION(2,3) :: coord INTEGER(SIZE_T) ::num_points = 3 ! Number of selected points INTEGER :: i, j @@ -64,26 +64,26 @@ ! CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) ! Default file access and file creation - ! properties are used. - ! + ! properties are used. + ! ! Create dataspaces: - ! - ! for dataset with references to dataset regions + ! + ! for dataset with references to dataset regions ! CALL h5screate_simple_f(rankr, dimsr, spacer_id, error) ! - ! for integer dataset + ! for integer dataset ! CALL h5screate_simple_f(rank, dims, space_id, error) ! ! Create and write datasets: ! - ! Integer dataset + ! Integer dataset ! CALL h5dcreate_f(file_id, dsetnamev, H5T_NATIVE_INTEGER, space_id, & dsetv_id, error) data_dims(1) = 2 - data_dims(2) = 9 + data_dims(2) = 9 CALL h5dwrite_f(dsetv_id, H5T_NATIVE_INTEGER, data, data_dims, error) CALL h5dclose_f(dsetv_id, error) ! @@ -94,25 +94,25 @@ ! ! Create a reference to the hyperslab selection. ! - start(1) = 0 - start(2) = 3 + start(1) = 0 + start(2) = 3 count(1) = 2 count(2) = 3 CALL h5sselect_hyperslab_f(space_id, H5S_SELECT_SET_F, & - start, count, error) - CALL h5rcreate_f(file_id, dsetnamev, space_id, ref(1), error) + start, count, error) + CALL h5rcreate_f(file_id, dsetnamev, space_id, ref(1), error) ! ! Create a reference to elements selection. ! CALL h5sselect_none_f(space_id, error) CALL h5sselect_elements_f(space_id, H5S_SELECT_SET_F, rank, num_points,& - coord, error) - CALL h5rcreate_f(file_id, dsetnamev, space_id, ref(2), error) + coord, error) + CALL h5rcreate_f(file_id, dsetnamev, space_id, ref(2), error) ! - ! Write dataset with the references. + ! Write dataset with the references. ! ref_size(1) = size(ref) - CALL h5dwrite_f(dsetr_id, H5T_STD_REF_DSETREG, ref, ref_size, error) + CALL h5dwrite_f(dsetr_id, H5T_STD_REF_DSETREG, ref, ref_size, error) ! ! Close all objects. ! @@ -129,12 +129,12 @@ ! Read references to the dataset regions. ! ref_size(1) = size(ref_out) - CALL h5dread_f(dsetr_id, H5T_STD_REF_DSETREG, ref_out, ref_size, error) - ! + CALL h5dread_f(dsetr_id, H5T_STD_REF_DSETREG, ref_out, ref_size, error) + ! ! Dereference the first reference. - ! + ! CALL H5rdereference_f(dsetr_id, ref_out(1), dsetv_id, error) - CALL H5rget_region_f(dsetr_id, ref_out(1), space_id, error) + CALL H5rget_region_f(dsetr_id, ref_out(1), space_id, error) ! ! Read selected data from the dataset. ! @@ -142,18 +142,18 @@ mem_space_id = space_id, file_space_id = space_id) write(*,*) "Hypeslab selection" write(*,*) - do i = 1,2 + do i = 1,2 write(*,*) (data_out (i,j), j = 1,9) enddo write(*,*) CALL h5sclose_f(space_id, error) CALL h5dclose_f(dsetv_id, error) data_out = 0 - ! + ! ! Dereference the second reference. - ! + ! CALL H5rdereference_f(dsetr_id, ref_out(2), dsetv_id, error) - CALL H5rget_region_f(dsetr_id, ref_out(2), space_id, error) + CALL H5rget_region_f(dsetr_id, ref_out(2), space_id, error) ! ! Read selected data from the dataset. ! @@ -161,7 +161,7 @@ mem_space_id = space_id, file_space_id = space_id) write(*,*) "Point selection" write(*,*) - do i = 1,2 + do i = 1,2 write(*,*) (data_out (i,j), j = 1,9) enddo ! @@ -173,8 +173,8 @@ ! ! Close FORTRAN interface. ! - CALL h5close_f(error) + CALL h5close_f(error) - END PROGRAM REG_REFERENCE + END PROGRAM REG_REFERENCE diff --git a/fortran/examples/rwdsetexample.f90 b/fortran/examples/rwdsetexample.f90 index 37ee282..1e84e23 100644 --- a/fortran/examples/rwdsetexample.f90 +++ b/fortran/examples/rwdsetexample.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,34 +11,34 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! -! The following example shows how to write and read to/from an existing dataset. -! It opens the file created in the previous example, obtains the dataset -! identifier, writes the data to the dataset in the file, -! then reads the dataset to memory. +! The following example shows how to write and read to/from an existing dataset. +! It opens the file created in the previous example, obtains the dataset +! identifier, writes the data to the dataset in the file, +! then reads the dataset to memory. ! PROGRAM RWDSETEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier INTEGER :: error ! Error flag INTEGER :: i, j INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - + ! ! Initialize the dset_data array. ! @@ -51,7 +51,7 @@ ! ! Initialize FORTRAN interface. ! - CALL h5open_f(error) + CALL h5open_f(error) ! ! Open an existing file. @@ -59,7 +59,7 @@ CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error) ! - ! Open an existing dataset. + ! Open an existing dataset. ! CALL h5dopen_f(file_id, dsetname, dset_id, error) @@ -67,7 +67,7 @@ ! Write the dataset. ! data_dims(1) = 4 - data_dims(2) = 6 + data_dims(2) = 6 CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error) ! @@ -84,13 +84,13 @@ ! Close the file. ! CALL h5fclose_f(file_id, error) - + ! ! Close FORTRAN interface. ! CALL h5close_f(error) - END PROGRAM RWDSETEXAMPLE + END PROGRAM RWDSETEXAMPLE + - diff --git a/fortran/examples/selectele.f90 b/fortran/examples/selectele.f90 index 461fd0b..3ab7ebc 100644 --- a/fortran/examples/selectele.f90 +++ b/fortran/examples/selectele.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,25 +11,25 @@ ! 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 program creates two files, copy1.h5, and copy2.h5. -! In copy1.h5, it creates a 3x4 dataset called 'Copy1', -! and write 0's to this dataset. -! In copy2.h5, it create a 3x4 dataset called 'Copy2', -! and write 1's to this dataset. -! It closes both files, reopens both files, selects two -! points in copy1.h5 and writes values to them. Then it -! uses an H5Scopy to write the same selection to copy2.h5. -! Program reopens the files, and reads and prints the contents of -! the two datasets. -! +! This program creates two files, copy1.h5, and copy2.h5. +! In copy1.h5, it creates a 3x4 dataset called 'Copy1', +! and write 0's to this dataset. +! In copy2.h5, it create a 3x4 dataset called 'Copy2', +! and write 1's to this dataset. +! It closes both files, reopens both files, selects two +! points in copy1.h5 and writes values to them. Then it +! uses an H5Scopy to write the same selection to copy2.h5. +! Program reopens the files, and reads and prints the contents of +! the two datasets. +! PROGRAM SELECTEXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=8), PARAMETER :: filename1 = "copy1.h5" ! File name @@ -41,27 +41,27 @@ INTEGER(SIZE_T), PARAMETER :: NUMP = 2 ! Number of points selected - INTEGER(HID_T) :: file1_id ! File1 identifier - INTEGER(HID_T) :: file2_id ! File2 identifier - INTEGER(HID_T) :: dset1_id ! Dataset1 identifier - INTEGER(HID_T) :: dset2_id ! Dataset2 identifier - INTEGER(HID_T) :: dataspace1 ! Dataspace identifier - INTEGER(HID_T) :: dataspace2 ! Dataspace identifier - INTEGER(HID_T) :: memspace ! memspace identifier + INTEGER(HID_T) :: file1_id ! File1 identifier + INTEGER(HID_T) :: file2_id ! File2 identifier + INTEGER(HID_T) :: dset1_id ! Dataset1 identifier + INTEGER(HID_T) :: dset2_id ! Dataset2 identifier + INTEGER(HID_T) :: dataspace1 ! Dataspace identifier + INTEGER(HID_T) :: dataspace2 ! Dataspace identifier + INTEGER(HID_T) :: memspace ! memspace identifier - INTEGER(HSIZE_T), DIMENSION(1) :: dimsm = (/2/) - ! Memory dataspace dimensions + INTEGER(HSIZE_T), DIMENSION(1) :: dimsm = (/2/) + ! Memory dataspace dimensions INTEGER(HSIZE_T), DIMENSION(2) :: dimsf = (/3,4/) ! File dataspace dimensions INTEGER(HSIZE_T), DIMENSION(RANK,NUMP) :: coord ! Elements coordinates - ! in the file + ! in the file INTEGER, DIMENSION(3,4) :: buf1, buf2, bufnew ! Data buffers INTEGER, DIMENSION(2) :: val = (/53, 59/) ! Values to write - + INTEGER :: memrank = 1 ! Rank of the dataset in memory - INTEGER :: i, j + INTEGER :: i, j INTEGER :: error ! Error flag LOGICAL :: status @@ -70,11 +70,11 @@ ! ! Create two files containing identical datasets. Write 0's to one - ! and 1's to the other. + ! and 1's to the other. ! ! - ! Data initialization. + ! Data initialization. ! do i = 1, 3 do j = 1, 4 @@ -87,21 +87,21 @@ buf2(i,j) = 1; end do end do - + ! - ! Initialize FORTRAN interface. + ! Initialize FORTRAN interface. ! - CALL h5open_f(error) + CALL h5open_f(error) ! ! Create file1, file2 using default properties. - ! + ! CALL h5fcreate_f(filename1, H5F_ACC_TRUNC_F, file1_id, error) CALL h5fcreate_f(filename2, H5F_ACC_TRUNC_F, file2_id, error) ! - ! Create the data space for the datasets. + ! Create the data space for the datasets. ! CALL h5screate_simple_f(RANK, dimsf, dataspace1, error) @@ -120,7 +120,7 @@ ! Write the datasets. ! data_dims(1) = 3 - data_dims(2) = 4 + data_dims(2) = 4 CALL h5dwrite_f(dset1_id, H5T_NATIVE_INTEGER, buf1, data_dims, error) CALL h5dwrite_f(dset2_id, H5T_NATIVE_INTEGER, buf2, data_dims, error) @@ -147,8 +147,8 @@ CALL h5fclose_f(file2_id, error) ! - ! Open the two files. Select two points in one file, write values to - ! those point locations, then do H5Scopy and write the values to the + ! Open the two files. Select two points in one file, write values to + ! those point locations, then do H5Scopy and write the values to the ! other file. Close files. ! @@ -156,7 +156,7 @@ ! Open the files. ! CALL h5fopen_f (filename1, H5F_ACC_RDWR_F, file1_id, error) - + CALL h5fopen_f (filename2, H5F_ACC_RDWR_F, file2_id, error) ! @@ -170,19 +170,19 @@ ! Get dataset1's dataspace identifier. ! CALL h5dget_space_f(dset1_id, dataspace1, error) - + ! ! Create memory dataspace. ! CALL h5screate_simple_f(memrank, dimsm, memspace, error) - + ! - ! Set the selected point positions. Because Fortran array index starts + ! Set the selected point positions. Because Fortran array index starts ! from 1, so add one to the actual select points in C. ! - coord(1,1) = 1 - coord(2,1) = 2 - coord(1,2) = 1 + coord(1,1) = 1 + coord(2,1) = 2 + coord(1,2) = 1 coord(2,2) = 4 ! @@ -201,7 +201,7 @@ ! ! Copy the daspace1 into dataspace2. ! - CALL h5scopy_f(dataspace1, dataspace2, error) + CALL h5scopy_f(dataspace1, dataspace2, error) ! ! Write value into the selected points in dataset2. @@ -244,7 +244,7 @@ ! Open the files. ! CALL h5fopen_f (filename1, H5F_ACC_RDWR_F, file1_id, error) - + CALL h5fopen_f (filename2, H5F_ACC_RDWR_F, file2_id, error) ! @@ -257,8 +257,8 @@ ! ! Read dataset from the first file. ! - data_dims(1) = 3 - data_dims(2) = 4 + data_dims(1) = 3 + data_dims(2) = 4 CALL h5dread_f(dset1_id, H5T_NATIVE_INTEGER, bufnew, data_dims, error) ! diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90 index 9eda259..49f3e70 100644 --- a/fortran/src/H5Aff.f90 +++ b/fortran/src/H5Aff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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 contains Fortran90 interfaces for H5A functions. @@ -20,29 +20,29 @@ MODULE H5A USE H5GLOBAL ! -!On Windows there are no big (integer*8) integers, so overloading +!On Windows there are no big (integer*8) integers, so overloading !for bug #670 does not work. I have to use DEC compilation directives to make !Windows DEC Visual Fortran and OSF compilers happy and do right things. ! 05/01/02 EP ! INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_integer_scalar - MODULE PROCEDURE h5awrite_integer_1 - MODULE PROCEDURE h5awrite_integer_2 - MODULE PROCEDURE h5awrite_integer_3 - MODULE PROCEDURE h5awrite_integer_4 - MODULE PROCEDURE h5awrite_integer_5 - MODULE PROCEDURE h5awrite_integer_6 - MODULE PROCEDURE h5awrite_integer_7 - MODULE PROCEDURE h5awrite_char_scalar - MODULE PROCEDURE h5awrite_char_1 - MODULE PROCEDURE h5awrite_char_2 - MODULE PROCEDURE h5awrite_char_3 - MODULE PROCEDURE h5awrite_char_4 - MODULE PROCEDURE h5awrite_char_5 - MODULE PROCEDURE h5awrite_char_6 - MODULE PROCEDURE h5awrite_char_7 + MODULE PROCEDURE h5awrite_integer_scalar + MODULE PROCEDURE h5awrite_integer_1 + MODULE PROCEDURE h5awrite_integer_2 + MODULE PROCEDURE h5awrite_integer_3 + MODULE PROCEDURE h5awrite_integer_4 + MODULE PROCEDURE h5awrite_integer_5 + MODULE PROCEDURE h5awrite_integer_6 + MODULE PROCEDURE h5awrite_integer_7 + MODULE PROCEDURE h5awrite_char_scalar + MODULE PROCEDURE h5awrite_char_1 + MODULE PROCEDURE h5awrite_char_2 + MODULE PROCEDURE h5awrite_char_3 + MODULE PROCEDURE h5awrite_char_4 + MODULE PROCEDURE h5awrite_char_5 + MODULE PROCEDURE h5awrite_char_6 + MODULE PROCEDURE h5awrite_char_7 MODULE PROCEDURE h5awrite_real_scalar MODULE PROCEDURE h5awrite_real_1 MODULE PROCEDURE h5awrite_real_2 @@ -57,21 +57,21 @@ MODULE H5A INTERFACE h5aread_f MODULE PROCEDURE h5aread_integer_scalar - MODULE PROCEDURE h5aread_integer_1 - MODULE PROCEDURE h5aread_integer_2 - MODULE PROCEDURE h5aread_integer_3 - MODULE PROCEDURE h5aread_integer_4 - MODULE PROCEDURE h5aread_integer_5 - MODULE PROCEDURE h5aread_integer_6 - MODULE PROCEDURE h5aread_integer_7 - MODULE PROCEDURE h5aread_char_scalar - MODULE PROCEDURE h5aread_char_1 - MODULE PROCEDURE h5aread_char_2 - MODULE PROCEDURE h5aread_char_3 - MODULE PROCEDURE h5aread_char_4 - MODULE PROCEDURE h5aread_char_5 - MODULE PROCEDURE h5aread_char_6 - MODULE PROCEDURE h5aread_char_7 + MODULE PROCEDURE h5aread_integer_1 + MODULE PROCEDURE h5aread_integer_2 + MODULE PROCEDURE h5aread_integer_3 + MODULE PROCEDURE h5aread_integer_4 + MODULE PROCEDURE h5aread_integer_5 + MODULE PROCEDURE h5aread_integer_6 + MODULE PROCEDURE h5aread_integer_7 + MODULE PROCEDURE h5aread_char_scalar + MODULE PROCEDURE h5aread_char_1 + MODULE PROCEDURE h5aread_char_2 + MODULE PROCEDURE h5aread_char_3 + MODULE PROCEDURE h5aread_char_4 + MODULE PROCEDURE h5aread_char_5 + MODULE PROCEDURE h5aread_char_6 + MODULE PROCEDURE h5aread_char_7 MODULE PROCEDURE h5aread_real_scalar MODULE PROCEDURE h5aread_real_1 MODULE PROCEDURE h5aread_real_2 @@ -82,56 +82,56 @@ MODULE H5A MODULE PROCEDURE h5aread_real_7 END INTERFACE - + CONTAINS !---------------------------------------------------------------------- -! Name: h5acreate_f +! Name: h5acreate_f ! -! Purpose: Creates a dataset as an attribute of a group, dataset, -! or named datatype +! Purpose: Creates a dataset as an attribute of a group, dataset, +! or named datatype ! -! Inputs: +! Inputs: ! loc_id - identifier of an object (group, dataset, ! or named datatype) attribute is attached to ! name - attribute name ! type_id - attribute datatype identifier ! space_id - attribute dataspace identifier ! -! Outputs: +! Outputs: ! attr_id - attribute identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! acpl_id - Attribute creation property list identifier -! appl_id - Attribute access property list identifier +! appl_id - Attribute access property list identifier ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! !---------------------------------------------------------------------- SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & hdferr, acpl_id, aapl_id ) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(IN) :: type_id - ! Attribute datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: type_id + ! Attribute datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: acpl_id ! Attribute creation property list identifier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list identifier - + INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: aapl_id_default INTEGER(SIZE_T) :: namelen ! INTEGER, EXTERNAL :: h5acreate_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -154,7 +154,7 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: attr_id END FUNCTION h5acreate_c END INTERFACE - + acpl_id_default = H5P_DEFAULT_F aapl_id_default = H5P_DEFAULT_F namelen = LEN(NAME) @@ -168,36 +168,36 @@ CONTAINS !---------------------------------------------------------------------- -! Name: h5aopen_name_f +! Name: h5aopen_name_f ! -! Purpose: Opens an attribute specified by name. +! Purpose: Opens an attribute specified by name. ! -! Inputs: -! obj_id - identifier of a group, dataset, or named +! Inputs: +! obj_id - identifier of a group, dataset, or named ! datatype atttribute to be attached to ! name - attribute name -! Outputs: +! Outputs: ! attr_id - attribute identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! !---------------------------------------------------------------------- SUBROUTINE h5aopen_name_f(obj_id, name, attr_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(SIZE_T) :: namelen @@ -217,45 +217,45 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: attr_id END FUNCTION h5aopen_name_c END INTERFACE - + namelen = LEN(name) hdferr = h5aopen_name_c(obj_id, name, namelen, attr_id) END SUBROUTINE h5aopen_name_f !---------------------------------------------------------------------- -! Name: h5aopen_idx_f +! Name: h5aopen_idx_f ! ! Purpose: Opens the attribute specified by its index. ! -! Inputs: +! Inputs: ! obj_id - identifier of a group, dataset, or named ! datatype an attribute to be attached to ! index - index of the attribute to open (zero-based) -! Outputs: +! Outputs: ! attr_id - attribute identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! !---------------------------------------------------------------------- SUBROUTINE h5aopen_idx_f(obj_id, index, attr_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(IN) :: index ! Attribute index - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(IN) :: index ! Attribute index + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier INTEGER, INTENT(OUT) :: hdferr ! Error code - + ! INTEGER, EXTERNAL :: h5aopen_idx_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -270,18 +270,18 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: attr_id END FUNCTION h5aopen_idx_c END INTERFACE - + hdferr = h5aopen_idx_c(obj_id, index, attr_id) END SUBROUTINE h5aopen_idx_f SUBROUTINE h5awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_integer_s_c @@ -293,27 +293,27 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_S_C'::h5awrite_integer_s_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN)::buf END FUNCTION h5awrite_integer_s_c END INTERFACE - + hdferr = h5awrite_integer_s_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5awrite_integer_scalar SUBROUTINE h5awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN) , & DIMENSION(dims(1)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - + ! INTEGER, EXTERNAL :: h5awrite_integer_1_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -323,7 +323,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_1_C'::h5awrite_integer_1_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), DIMENSION(dims(1)) :: buf @@ -337,15 +337,15 @@ CONTAINS SUBROUTINE h5awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN) , & DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - + ! INTEGER, EXTERNAL :: h5awrite_integer_2_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -355,7 +355,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_2_C'::h5awrite_integer_2_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)) :: buf @@ -368,12 +368,12 @@ CONTAINS SUBROUTINE h5awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_integer_3_c @@ -385,26 +385,26 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_3_C'::h5awrite_integer_3_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)) :: buf END FUNCTION h5awrite_integer_3_c END INTERFACE - + hdferr = h5awrite_integer_3_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5awrite_integer_3 SUBROUTINE h5awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_integer_4_c @@ -416,7 +416,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_4_C'::h5awrite_integer_4_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf @@ -429,12 +429,12 @@ CONTAINS SUBROUTINE h5awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_integer_5_c @@ -446,7 +446,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_5_C'::h5awrite_integer_5_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf @@ -459,15 +459,15 @@ CONTAINS SUBROUTINE h5awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - + ! INTEGER, EXTERNAL :: h5awrite_integer_6_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -477,7 +477,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_6_C'::h5awrite_integer_6_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -491,13 +491,13 @@ CONTAINS SUBROUTINE h5awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_integer_7_c @@ -509,7 +509,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_7_C'::h5awrite_integer_7_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -523,11 +523,11 @@ CONTAINS SUBROUTINE h5awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN) :: buf ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_real_s_c @@ -539,7 +539,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_S_C'::h5awrite_real_s_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN)::buf @@ -551,13 +551,13 @@ CONTAINS SUBROUTINE h5awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(IN), & DIMENSION(dims(1)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_real_1_c @@ -569,7 +569,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_1_C'::h5awrite_real_1_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -583,13 +583,13 @@ CONTAINS SUBROUTINE h5awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_real_2_c @@ -601,7 +601,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_2_C'::h5awrite_real_2_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -615,13 +615,13 @@ CONTAINS SUBROUTINE h5awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_real_3_c @@ -633,7 +633,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_3_C'::h5awrite_real_3_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -647,13 +647,13 @@ CONTAINS SUBROUTINE h5awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_real_4_c @@ -665,7 +665,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_4_C'::h5awrite_real_4_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -679,13 +679,13 @@ CONTAINS SUBROUTINE h5awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_real_5_c @@ -697,7 +697,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_5_C'::h5awrite_real_5_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -711,13 +711,13 @@ CONTAINS SUBROUTINE h5awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_real_6_c @@ -729,7 +729,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_6_C'::h5awrite_real_6_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -743,13 +743,13 @@ CONTAINS SUBROUTINE h5awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_real_7_c @@ -761,7 +761,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_7_C'::h5awrite_real_7_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -775,12 +775,12 @@ CONTAINS SUBROUTINE h5awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*),INTENT(IN) :: buf - ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*),INTENT(IN) :: buf + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awritec_s_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -791,7 +791,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_S_C'::h5awritec_s_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -804,13 +804,13 @@ CONTAINS SUBROUTINE h5awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awritec_1_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -822,7 +822,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_1_C'::h5awritec_1_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1))::buf @@ -835,13 +835,13 @@ CONTAINS SUBROUTINE h5awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awritec_2_c @@ -853,7 +853,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_2_C'::h5awritec_2_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -868,13 +868,13 @@ CONTAINS SUBROUTINE h5awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awritec_3_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -886,7 +886,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_3_C'::h5awritec_3_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -900,13 +900,13 @@ CONTAINS SUBROUTINE h5awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awritec_4_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -918,7 +918,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_4_C'::h5awritec_4_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -932,13 +932,13 @@ CONTAINS SUBROUTINE h5awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awritec_5_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -950,7 +950,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_5_C'::h5awritec_5_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -964,13 +964,13 @@ CONTAINS SUBROUTINE h5awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awritec_6_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -982,7 +982,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_6_C'::h5awritec_6_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -996,13 +996,13 @@ CONTAINS SUBROUTINE h5awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awritec_7_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -1014,7 +1014,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_7_C'::h5awritec_7_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -1026,29 +1026,29 @@ CONTAINS END SUBROUTINE h5awrite_char_7 !---------------------------------------------------------------------- -! Name: h5aread_f +! Name: h5aread_f ! ! Purpose: Reads an attribute. ! -! Inputs: +! Inputs: ! attr_id - attribute identifier ! memtype_id - attribute memory type identifier -! dims - 1D array of size 7, stores sizes of the +! dims - 1D array of size 7, stores sizes of the ! - buf array dimensions. -! Outputs: +! Outputs: ! buf - buffer to read attribute data in -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! ! dims parameter was added to make code portable; ! Aprile 4, 2001 @@ -1060,16 +1060,16 @@ CONTAINS ! ! Comment: This function is overloaded to write INTEGER, ! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. +! up to 7 dimensions. !---------------------------------------------------------------------- SUBROUTINE h5aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT) :: buf ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_integer_s_c @@ -1081,7 +1081,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_S_C'::h5aread_integer_s_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(INOUT)::buf @@ -1092,10 +1092,10 @@ CONTAINS SUBROUTINE h5aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1108,7 +1108,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_1_C'::h5aread_integer_1_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf @@ -1121,10 +1121,10 @@ CONTAINS SUBROUTINE h5aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)) :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1137,7 +1137,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_2_C'::h5aread_integer_2_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf @@ -1150,10 +1150,10 @@ CONTAINS SUBROUTINE h5aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1167,7 +1167,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_3_C'::h5aread_integer_3_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(INOUT), & @@ -1181,13 +1181,13 @@ CONTAINS SUBROUTINE h5aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_integer_4_c @@ -1199,7 +1199,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_4_C'::h5aread_integer_4_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(INOUT), & @@ -1213,13 +1213,13 @@ CONTAINS SUBROUTINE h5aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_integer_5_c @@ -1231,7 +1231,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_5_C'::h5aread_integer_5_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(INOUT), & @@ -1245,13 +1245,13 @@ CONTAINS SUBROUTINE h5aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_integer_6_c @@ -1263,7 +1263,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_6_C'::h5aread_integer_6_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(INOUT), & @@ -1277,13 +1277,13 @@ CONTAINS SUBROUTINE h5aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_integer_7_c @@ -1295,7 +1295,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_7_C'::h5aread_integer_7_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(INOUT), & @@ -1309,11 +1309,11 @@ CONTAINS SUBROUTINE h5aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT) :: buf ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_real_s_c @@ -1325,7 +1325,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_S_C'::h5aread_real_s_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(INOUT)::buf @@ -1337,13 +1337,13 @@ CONTAINS SUBROUTINE h5aread_real_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(INOUT), & DIMENSION(dims(1)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_real_1_c @@ -1355,7 +1355,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_1_C'::h5aread_real_1_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(INOUT), & @@ -1369,13 +1369,13 @@ CONTAINS SUBROUTINE h5aread_real_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_real_2_c @@ -1387,7 +1387,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_2_C'::h5aread_real_2_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(INOUT), & @@ -1401,13 +1401,13 @@ CONTAINS SUBROUTINE h5aread_real_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_real_3_c @@ -1419,7 +1419,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_3_C'::h5aread_real_3_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(INOUT), & @@ -1433,13 +1433,13 @@ CONTAINS SUBROUTINE h5aread_real_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_real_4_c @@ -1451,7 +1451,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_4_C'::h5aread_real_4_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(INOUT), & @@ -1465,13 +1465,13 @@ CONTAINS SUBROUTINE h5aread_real_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_real_5_c @@ -1483,7 +1483,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_5_C'::h5aread_real_5_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(INOUT), & @@ -1497,13 +1497,13 @@ CONTAINS SUBROUTINE h5aread_real_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_real_6_c @@ -1515,7 +1515,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_6_C'::h5aread_real_6_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(INOUT), & @@ -1529,13 +1529,13 @@ CONTAINS SUBROUTINE h5aread_real_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_real_7_c @@ -1547,7 +1547,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_7_C'::h5aread_real_7_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(INOUT), & @@ -1560,12 +1560,12 @@ CONTAINS SUBROUTINE h5aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT) :: buf - ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT) :: buf + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5areadc_s_c @@ -1578,7 +1578,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_S_C'::h5areadc_s_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(INOUT) :: buf @@ -1590,13 +1590,13 @@ CONTAINS SUBROUTINE h5aread_char_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5areadc_1_c @@ -1609,7 +1609,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_1_C'::h5areadc_1_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(INOUT), & @@ -1623,13 +1623,13 @@ CONTAINS SUBROUTINE h5aread_char_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5areadc_2_c @@ -1642,7 +1642,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_2_C'::h5areadc_2_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(INOUT), & @@ -1656,13 +1656,13 @@ CONTAINS SUBROUTINE h5aread_char_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5areadc_3_c @@ -1675,7 +1675,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_3_C'::h5areadc_3_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(INOUT), & @@ -1689,13 +1689,13 @@ CONTAINS SUBROUTINE h5aread_char_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5areadc_4_c @@ -1708,7 +1708,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_4_C'::h5areadc_4_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(INOUT), & @@ -1722,13 +1722,13 @@ CONTAINS SUBROUTINE h5aread_char_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5areadc_5_c @@ -1741,7 +1741,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_5_C'::h5areadc_5_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(INOUT), & @@ -1755,13 +1755,13 @@ CONTAINS SUBROUTINE h5aread_char_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5areadc_6_c @@ -1774,7 +1774,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_6_C'::h5areadc_6_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(INOUT), & @@ -1788,13 +1788,13 @@ CONTAINS SUBROUTINE h5aread_char_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5areadc_7_c @@ -1807,7 +1807,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_7_C'::h5areadc_7_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(INOUT), & @@ -1820,33 +1820,33 @@ CONTAINS !---------------------------------------------------------------------- -! Name: h5aget_space_f +! Name: h5aget_space_f ! ! Purpose: Gets a copy of the dataspace for an attribute. ! -! Inputs: +! Inputs: ! attr_id - attribute identifier -! Outputs: +! Outputs: ! space_id - attribite dataspace identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! !---------------------------------------------------------------------- SUBROUTINE h5aget_space_f(attr_id, space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: space_id + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1868,33 +1868,33 @@ CONTAINS END SUBROUTINE h5aget_space_f !---------------------------------------------------------------------- -! Name: h5aget_type_f +! Name: h5aget_type_f ! ! Purpose: Gets an attribute datatype. ! -! Inputs: +! Inputs: ! attr_id - attribute identifier -! Outputs: +! Outputs: ! type_id - attribute datatype identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! !---------------------------------------------------------------------- SUBROUTINE h5aget_type_f(attr_id, type_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1916,36 +1916,36 @@ CONTAINS END SUBROUTINE h5aget_type_f !---------------------------------------------------------------------- -! Name: h5aget_name_f +! Name: h5aget_name_f ! -! Purpose: Gets an attribute name. +! Purpose: Gets an attribute name. ! -! Inputs: +! Inputs: ! attr_id - attribute identifier ! size - size of a buffer to read name in -! Outputs: +! Outputs: ! buf - buffer to read name in -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! !---------------------------------------------------------------------- SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size - CHARACTER(LEN=*), INTENT(INOUT) :: buf + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name INTEGER, INTENT(OUT) :: hdferr ! Error code: ! name length is successful, @@ -1972,9 +1972,9 @@ CONTAINS !---------------------------------------------------------------------- ! Name: h5aget_name_by_idx_f ! -! Purpose: Gets an attribute name, by attribute index position. +! Purpose: Gets an attribute name, by attribute index position. ! -! Inputs: +! Inputs: ! loc_id - Location of object to which attribute is attached ! obj_name - Name of object to which attribute is attached, relative to location ! idx_type - Type of index; Possible values are: @@ -1995,13 +1995,13 @@ CONTAINS ! order - Index traversal order ! n - Attribute’s position in index ! -! Outputs: +! Outputs: ! name - Attribute name -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! lapl_id - Link access property list +! lapl_id - Link access property list ! size - Size, in bytes, of attribute name ! ! Programmer: M.S. Breitenfeld @@ -2030,10 +2030,10 @@ CONTAINS ! H5_ITER_N_F - Number of iteration orders INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - + CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name - + INTEGER, INTENT(OUT) :: hdferr ! Error code: ! Returns attribute name size, ! -1 if fail @@ -2058,7 +2058,7 @@ CONTAINS INTEGER, INTENT(IN) :: idx_type INTEGER, INTENT(IN) :: order INTEGER(HSIZE_T), INTENT(IN) :: n - + CHARACTER(LEN=*), INTENT(OUT) :: name INTEGER(SIZE_T) :: size_default INTEGER(HID_T) :: lapl_id_default @@ -2074,7 +2074,7 @@ CONTAINS hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & n, name, size_default, lapl_id_default) - + IF(PRESENT(size)) size = size_default @@ -2082,33 +2082,33 @@ CONTAINS !---------------------------------------------------------------------- -! Name: h5aget_num_attrs_f +! Name: h5aget_num_attrs_f ! ! Purpose: Determines the number of attributes attached to an object. ! -! Inputs: +! Inputs: ! obj_id - object (group, dataset, or named datatype) ! identifier -! Outputs: +! Outputs: ! attr_num - number of attributes attached to the object -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! !---------------------------------------------------------------------- SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier INTEGER, INTENT(OUT) :: attr_num ! Number of attributes of the ! object INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2126,39 +2126,39 @@ CONTAINS INTEGER, INTENT(OUT) :: attr_num END FUNCTION h5aget_num_attrs_c END INTERFACE - + hdferr = h5aget_num_attrs_c(obj_id, attr_num) END SUBROUTINE h5aget_num_attrs_f !---------------------------------------------------------------------- -! Name: h5adelete_f +! Name: h5adelete_f ! ! Purpose: Deletes an attribute of an object (group, dataset or ! named datatype) ! -! Inputs: +! Inputs: ! obj_id - object identifier ! name - attribute name -! Outputs: +! Outputs: ! -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! !---------------------------------------------------------------------- SUBROUTINE h5adelete_f(obj_id, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(SIZE_T) :: namelen @@ -2167,7 +2167,7 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5adelete_c(obj_id, name, namelen) + INTEGER FUNCTION h5adelete_c(obj_id, name, namelen) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_C'::h5adelete_c @@ -2178,38 +2178,38 @@ CONTAINS INTEGER(SIZE_T) :: namelen END FUNCTION h5adelete_c END INTERFACE - + namelen = LEN(name) hdferr = h5adelete_c(obj_id, name, namelen) END SUBROUTINE h5adelete_f !---------------------------------------------------------------------- -! Name: h5aclose_f +! Name: h5aclose_f ! ! Purpose: Closes the specified attribute. -! -! Inputs: +! +! Inputs: ! attr_id - attribute identifier -! Outputs: +! Outputs: ! -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces are added for +! Modifications: Explicit Fortran interfaces are added for ! called C functions (it is needed for Windows -! port). February 27, 2001 +! port). February 27, 2001 ! !---------------------------------------------------------------------- SUBROUTINE h5aclose_f(attr_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER, INTENT(OUT) :: hdferr ! Error code: ! INTEGER, EXTERNAL :: h5aclose_c @@ -2224,27 +2224,27 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: attr_id END FUNCTION h5aclose_c END INTERFACE - + hdferr = h5aclose_c(attr_id) END SUBROUTINE h5aclose_f !---------------------------------------------------------------------- -! Name: h5aget_storage_size_f +! Name: h5aget_storage_size_f ! ! Purpose: Returns the amount of storage required for an attribute. -! -! Inputs: +! +! Inputs: ! attr_id - attribute identifier -! Outputs: +! Outputs: ! size - attribute storage size -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: M. S. Breitenfeld -! January, 2008 +! January, 2008 ! ! Modifications: N/A ! @@ -2252,7 +2252,7 @@ CONTAINS SUBROUTINE h5aget_storage_size_f(attr_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HSIZE_T), INTENT(OUT) :: size ! Attribute storage requirement INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2268,27 +2268,27 @@ CONTAINS INTEGER(HSIZE_T), INTENT(OUT) :: size END FUNCTION h5aget_storage_size_c END INTERFACE - + hdferr = h5aget_storage_size_c(attr_id, size) END SUBROUTINE h5aget_storage_size_f !---------------------------------------------------------------------- -! Name: h5aget_create_plist_f +! Name: h5aget_create_plist_f ! ! Purpose: Gets an attribute creation property list identifier -! -! Inputs: +! +! Inputs: ! attr_id - Identifier of the attribute -! Outputs: +! Outputs: ! creation_prop_id - Identifier for the attribute’s creation property -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: M. S. Breitenfeld -! January, 2008 +! January, 2008 ! ! Modifications: N/A ! @@ -2296,7 +2296,7 @@ CONTAINS SUBROUTINE h5aget_create_plist_f(attr_id, creation_prop_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute + INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute INTEGER(HID_T), INTENT(OUT) :: creation_prop_id ! Identifier for the attribute’s creation property INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure @@ -2313,30 +2313,30 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: creation_prop_id END FUNCTION h5aget_create_plist_c END INTERFACE - + hdferr = h5aget_create_plist_c(attr_id, creation_prop_id) END SUBROUTINE h5aget_create_plist_f !---------------------------------------------------------------------- -! Name: h5arename_by_name_f +! Name: h5arename_by_name_f ! ! Purpose: Renames an attribute ! -! Inputs: +! Inputs: ! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name of object, relative to location, +! obj_name - Name of object, relative to location, ! whose attribute is to be renamed ! old_attr_name - Prior attribute name ! new_attr_name - New attribute name ! lapl_id - Link access property list identifier ! ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! Programmer: M.S. Breitenfeld -! January, 2008 +! January, 2008 ! ! Modifications: N/A ! @@ -2345,12 +2345,12 @@ CONTAINS SUBROUTINE h5arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, ! whose attribute is to be renamed CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name - + INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier @@ -2359,7 +2359,7 @@ CONTAINS INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: old_attr_namelen INTEGER(SIZE_T) :: new_attr_namelen - + ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -2379,7 +2379,7 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: new_attr_name INTEGER(SIZE_T) :: new_attr_namelen INTEGER(HID_T) :: lapl_id_default - + END FUNCTION h5arename_by_name_c END INTERFACE @@ -2389,45 +2389,45 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default=lapl_id - + hdferr = h5arename_by_name_c(loc_id, obj_name, obj_namelen, & old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & lapl_id_default) - + END SUBROUTINE h5arename_by_name_f !---------------------------------------------------------------------- -! Name: h5aopen_f +! Name: h5aopen_f ! -! Purpose: Opens an attribute for an object specified by object +! Purpose: Opens an attribute for an object specified by object ! identifier and attribute name ! -! Inputs: +! Inputs: ! obj_id - Identifer for object to which attribute is attached ! attr_name - Name of attribute to open -! Outputs: +! Outputs: ! attr_id - attribute identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! aapl_id - Attribute access property list ! ! Programmer: M.S. Breitenfeld ! January, 2008 ! -! Modifications: N/A +! Modifications: N/A ! !---------------------------------------------------------------------- SUBROUTINE h5aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code ! Success: 0 - ! Failure: -1 + ! Failure: -1 INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list INTEGER(HID_T) :: aapl_id_default @@ -2445,7 +2445,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(IN) :: attr_name INTEGER(HID_T) :: aapl_id_default - INTEGER(SIZE_T) :: attr_namelen + INTEGER(SIZE_T) :: attr_namelen INTEGER(HID_T), INTENT(OUT) :: attr_id END FUNCTION h5aopen_c END INTERFACE @@ -2460,11 +2460,11 @@ CONTAINS END SUBROUTINE h5aopen_f !---------------------------------------------------------------------- -! Name: h5adelete_by_idx_f +! Name: h5adelete_by_idx_f ! -! Purpose: Deletes an attribute from an object according to index order +! Purpose: Deletes an attribute from an object according to index order ! -! Inputs: +! Inputs: ! loc_id - Location or object identifier; may be dataset or group ! obj_name - Name of object, relative to location, from which attribute is to be removed ! idx_type - Type of index; Possible values are: @@ -2473,7 +2473,7 @@ CONTAINS ! H5_INDEX_NAME_F - Index on names ! H5_INDEX_CRT_ORDER_F - Index on creation order ! H5_INDEX_N_F - Number of indices defined -! +! ! order - Order in which to iterate over index; Possible values are: ! ! H5_ITER_UNKNOWN_F - Unknown order @@ -2484,22 +2484,22 @@ CONTAINS ! ! n - Offset within index ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lapl_id - Link access property list ! ! Programmer: M.S. Breitenfeld ! January, 2008 ! -! Modifications: N/A +! Modifications: N/A ! !---------------------------------------------------------------------- SUBROUTINE h5adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, ! from which attribute is to be removed INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: ! H5_INDEX_UNKNOWN_F - Unknown index type @@ -2514,14 +2514,14 @@ CONTAINS ! H5_ITER_NATIVE_F - No particular order, whatever is fastest ! H5_ITER_N_F - Number of iteration orders ! - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index + INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(SIZE_T) :: obj_namelen INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list INTEGER(HID_T) :: lapl_id_default - + ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -2535,7 +2535,7 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: obj_name INTEGER, INTENT(IN) :: idx_type INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HSIZE_T), INTENT(IN) :: n INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: obj_namelen END FUNCTION h5adelete_by_idx_c @@ -2543,44 +2543,44 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - + obj_namelen = LEN(obj_name) hdferr = h5adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - + END SUBROUTINE h5adelete_by_idx_f !---------------------------------------------------------------------- -! Name: h5adelete_by_name_f +! Name: h5adelete_by_name_f ! ! Purpose: Removes an attribute from a specified location ! -! Inputs: +! Inputs: ! loc_id - Identifer for object to which attribute is attached ! obj_name - Name of attribute to open ! attr_name - Attribute access property list ! lapl_id - Link access property list ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: M.S. Breitenfeld ! January, 2008 ! -! Modifications: N/A +! Modifications: N/A ! !---------------------------------------------------------------------- SUBROUTINE h5adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, ! from which attribute is to be removed CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list INTEGER(SIZE_T) :: attr_namelen INTEGER(SIZE_T) :: obj_namelen @@ -2603,7 +2603,7 @@ CONTAINS INTEGER(SIZE_T) :: obj_namelen END FUNCTION h5adelete_by_name_c END INTERFACE - + obj_namelen = LEN(obj_name) attr_namelen = LEN(attr_name) @@ -2615,28 +2615,28 @@ CONTAINS END SUBROUTINE h5adelete_by_name_f !---------------------------------------------------------------------- -! Name: h5aopen_by_idx_f +! Name: h5aopen_by_idx_f ! ! Purpose: Opens an existing attribute that is attached to an object specified by location and name ! -! Inputs: +! Inputs: ! loc_id - Location of object to which attribute is attached ! obj_name - Name of object to which attribute is attached, relative to location ! idx_type - Type of index ! order - Index traversal order ! n - Attribute’s position in index ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! aapl_id - Attribute access property list ! lapl_id - Link access property list ! ! Programmer: M.S. Breitenfeld -! January, 2008 +! January, 2008 ! -! Modifications: N/A +! Modifications: N/A ! !---------------------------------------------------------------------- @@ -2654,7 +2654,7 @@ CONTAINS ! H5_ITER_INC_F - Increasing order ! H5_ITER_DEC_F - Decreasing order ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier @@ -2664,7 +2664,7 @@ CONTAINS INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: aapl_id_default INTEGER(HID_T) :: lapl_id_default ! @@ -2706,25 +2706,25 @@ CONTAINS ! Name: h5aget_info_f ! ! Purpose: Retrieves attribute information, by attribute identifier -! -! Inputs: +! +! Inputs: ! attr_id - attribute identifier ! ! Outputs: NOTE: In C it is defined as a structure: H5A_info_t ! ! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name ! data_size - indicates the size, in the number of characters, of the attribute -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: M. S. Breitenfeld -! January, 2008 +! January, 2008 ! ! Modifications: N/A ! @@ -2734,7 +2734,7 @@ CONTAINS IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute @@ -2761,10 +2761,10 @@ CONTAINS END INTERFACE hdferr = h5aget_info_c(attr_id, corder_valid, corder, cset, data_size) - + f_corder_valid =.FALSE. IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - + END SUBROUTINE h5aget_info_f @@ -2773,7 +2773,7 @@ CONTAINS ! Name: h5aget_info_by_idx_f ! ! Purpose: Retrieves attribute information, by attribute index position -! +! ! Inputs: ! loc_id - Location of object to which attribute is attached ! obj_name - Name of object to which attribute is attached, relative to location @@ -2783,17 +2783,17 @@ CONTAINS ! ! Outputs: NOTE: In C it is defined as a structure: H5A_info_t ! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - error code +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! lapl_id - Link access property list +! lapl_id - Link access property list ! ! Programmer: M. S. Breitenfeld -! January, 2008 +! January, 2008 ! ! Modifications: N/A ! @@ -2813,11 +2813,11 @@ CONTAINS ! H5_ITER_INC_F - Increasing order ! H5_ITER_DEC_F - Decreasing order ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute @@ -2844,7 +2844,7 @@ CONTAINS INTEGER, INTENT(IN) :: order INTEGER(HSIZE_T), INTENT(IN) :: n INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder_valid INTEGER, INTENT(OUT) :: corder INTEGER, INTENT(OUT) :: cset INTEGER(HSIZE_T), INTENT(OUT) :: data_size @@ -2863,14 +2863,14 @@ CONTAINS f_corder_valid =.FALSE. IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - + END SUBROUTINE h5aget_info_by_idx_f !---------------------------------------------------------------------- ! Name: h5aget_info_by_name_f ! ! Purpose: Retrieves attribute information, by attribute name -! +! ! Inputs: ! loc_id - Location of object to which attribute is attached ! obj_name - Name of object to which attribute is attached, relative to location @@ -2878,17 +2878,17 @@ CONTAINS ! ! Outputs: NOTE: In C it is defined as a structure: H5A_info_t ! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - error code +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! lapl_id - Link access property list +! lapl_id - Link access property list ! ! Programmer: M. S. Breitenfeld -! January, 2008 +! January, 2008 ! ! Modifications: N/A ! @@ -2901,7 +2901,7 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute @@ -2912,7 +2912,7 @@ CONTAINS INTEGER(SIZE_T) :: attr_namelen INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list INTEGER(HID_T) :: lapl_id_default - + ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -2930,7 +2930,7 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: attr_name INTEGER(SIZE_T), INTENT(IN) :: attr_namelen INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder_valid INTEGER, INTENT(OUT) :: corder INTEGER, INTENT(OUT) :: cset INTEGER(HSIZE_T), INTENT(OUT) :: data_size @@ -2942,21 +2942,21 @@ CONTAINS attr_namelen = LEN(attr_name) lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id hdferr = h5aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & corder_valid, corder, cset, data_size) f_corder_valid =.FALSE. IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - + END SUBROUTINE h5aget_info_by_name_f !---------------------------------------------------------------------- -! Name: H5Acreate_by_name_f +! Name: H5Acreate_by_name_f ! ! Purpose: Creates an attribute attached to a specified object -! +! ! Inputs: ! loc_id - Location or object identifier; may be dataset or group ! obj_name - Name, relative to loc_id, of object that attribute is to be attached to @@ -2966,16 +2966,16 @@ CONTAINS ! ! Outputs: ! attr - an attribute identifier -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! acpl_id - Attribute creation property list identifier (Currently not used.) ! aapl_id - Attribute access property list identifier (Currently not used.) -! lapl_id - Link access property list +! lapl_id - Link access property list ! ! Programmer: M. S. Breitenfeld -! February, 2008 +! February, 2008 ! ! Modifications: N/A ! @@ -3020,7 +3020,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: obj_namelen CHARACTER(LEN=*), INTENT(IN) :: attr_name INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HID_T) :: acpl_id_default INTEGER(HID_T) :: aapl_id_default @@ -3040,30 +3040,30 @@ CONTAINS IF(PRESENT(acpl_id)) acpl_id_default = acpl_id IF(PRESENT(aapl_id)) aapl_id_default = aapl_id IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - + hdferr = h5acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) END SUBROUTINE h5acreate_by_name_f !---------------------------------------------------------------------- -! Name: H5Aexists_f +! Name: H5Aexists_f ! ! Purpose: Determines whether an attribute with a given name exists on an object -! +! ! Inputs: ! obj_id - Object identifier ! attr_name - Attribute name ! ! Outputs: ! attr_exists - attribute exists status -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: M. S. Breitenfeld -! February, 2008 +! February, 2008 ! ! Modifications: N/A ! @@ -3099,15 +3099,15 @@ CONTAINS hdferr = h5aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) attr_exists = .FALSE. - IF(attr_exists_c.GT.0) attr_exists = .TRUE. + IF(attr_exists_c.GT.0) attr_exists = .TRUE. END SUBROUTINE h5aexists_f !---------------------------------------------------------------------- -! Name: H5Aexists_by_name_f +! Name: H5Aexists_by_name_f ! ! Purpose: Determines whether an attribute with a given name exists on an object -! +! ! Inputs: ! loc_id - Location identifier ! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) @@ -3115,14 +3115,14 @@ CONTAINS ! ! Outputs: ! attr_exists - attribute exists status -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! lapl_id - Link access property list identifier +! lapl_id - Link access property list identifier ! ! Programmer: M. S. Breitenfeld -! February, 2008 +! February, 2008 ! ! Modifications: N/A ! @@ -3130,7 +3130,7 @@ CONTAINS SUBROUTINE h5aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, ! absolute from the file’s root group, or '.' CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise @@ -3151,8 +3151,8 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::h5aexists_by_name_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: obj_name INTEGER(SIZE_T), INTENT(IN) :: obj_namelen CHARACTER(LEN=*), INTENT(IN) :: attr_name @@ -3171,30 +3171,30 @@ CONTAINS hdferr = h5aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) attr_exists = .FALSE. - IF(attr_exists_c.GT.0) attr_exists = .TRUE. + IF(attr_exists_c.GT.0) attr_exists = .TRUE. END SUBROUTINE h5aexists_by_name_f !---------------------------------------------------------------------- -! Name: H5Aopen_by_name_f +! Name: H5Aopen_by_name_f ! ! Purpose: Opens an attribute for an object by object name and attribute name. -! +! ! Inputs: -! loc_id - Location from which to find object to which attribute is attached +! loc_id - Location from which to find object to which attribute is attached ! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) ! attr_name - Attribute name ! ! Outputs: ! attr_id - attribute identifier -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) -! lapl_id - Link access property list identifier +! lapl_id - Link access property list identifier ! ! Programmer: M. S. Breitenfeld -! February, 2008 +! February, 2008 ! ! Modifications: N/A ! @@ -3202,16 +3202,16 @@ CONTAINS SUBROUTINE h5aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, ! absolute from the file’s root group, or '.' CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list ! (Currently unused; should be passed in as H5P_DEFAULT_F) INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier - + INTEGER(HID_T) :: aapl_id_default INTEGER(HID_T) :: lapl_id_default @@ -3228,7 +3228,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::h5aopen_by_name_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: obj_name INTEGER(SIZE_T), INTENT(IN) :: obj_namelen CHARACTER(LEN=*), INTENT(IN) :: attr_name @@ -3253,22 +3253,22 @@ CONTAINS END SUBROUTINE h5aopen_by_name_f !---------------------------------------------------------------------- -! Name: h5arename_f +! Name: h5arename_f ! ! Purpose: Renames an attribute ! -! Inputs: +! Inputs: ! loc_id - Location or object identifier; may be dataset or group ! old_attr_name - Prior attribute name ! new_attr_name - New attribute name ! ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! Programmer: M.S. Breitenfeld -! January, 2008 +! January, 2008 ! ! Modifications: N/A ! @@ -3283,7 +3283,7 @@ CONTAINS ! 0 on success and -1 on failure INTEGER(SIZE_T) :: old_attr_namelen INTEGER(SIZE_T) :: new_attr_namelen - + ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -3299,16 +3299,16 @@ CONTAINS INTEGER(SIZE_T) :: old_attr_namelen CHARACTER(LEN=*), INTENT(IN) :: new_attr_name INTEGER(SIZE_T) :: new_attr_namelen - + END FUNCTION h5arename_c END INTERFACE old_attr_namelen = LEN(old_attr_name) new_attr_namelen = LEN(new_attr_name) - + hdferr = h5arename_c(loc_id, & old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - + END SUBROUTINE h5arename_f END MODULE H5A diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index a7c6e75..573315a 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -2015,7 +2015,7 @@ nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) goto DONE; ret_value = 0; - + DONE: return ret_value; } diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90 index f06f5a5..c4810b3 100644 --- a/fortran/src/H5Dff.f90 +++ b/fortran/src/H5Dff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,11 +11,11 @@ ! 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 contains Fortran90 interfaces for H5D functions. -! +! MODULE H5D USE H5GLOBAL @@ -24,21 +24,21 @@ MODULE H5D MODULE PROCEDURE h5dwrite_reference_obj MODULE PROCEDURE h5dwrite_reference_dsetreg MODULE PROCEDURE h5dwrite_integer_scalar - MODULE PROCEDURE h5dwrite_integer_1 - MODULE PROCEDURE h5dwrite_integer_2 - MODULE PROCEDURE h5dwrite_integer_3 - MODULE PROCEDURE h5dwrite_integer_4 - MODULE PROCEDURE h5dwrite_integer_5 - MODULE PROCEDURE h5dwrite_integer_6 - MODULE PROCEDURE h5dwrite_integer_7 + MODULE PROCEDURE h5dwrite_integer_1 + MODULE PROCEDURE h5dwrite_integer_2 + MODULE PROCEDURE h5dwrite_integer_3 + MODULE PROCEDURE h5dwrite_integer_4 + MODULE PROCEDURE h5dwrite_integer_5 + MODULE PROCEDURE h5dwrite_integer_6 + MODULE PROCEDURE h5dwrite_integer_7 MODULE PROCEDURE h5dwrite_char_scalar - MODULE PROCEDURE h5dwrite_char_1 - MODULE PROCEDURE h5dwrite_char_2 - MODULE PROCEDURE h5dwrite_char_3 - MODULE PROCEDURE h5dwrite_char_4 - MODULE PROCEDURE h5dwrite_char_5 - MODULE PROCEDURE h5dwrite_char_6 - MODULE PROCEDURE h5dwrite_char_7 + MODULE PROCEDURE h5dwrite_char_1 + MODULE PROCEDURE h5dwrite_char_2 + MODULE PROCEDURE h5dwrite_char_3 + MODULE PROCEDURE h5dwrite_char_4 + MODULE PROCEDURE h5dwrite_char_5 + MODULE PROCEDURE h5dwrite_char_6 + MODULE PROCEDURE h5dwrite_char_7 MODULE PROCEDURE h5dwrite_real_scalar MODULE PROCEDURE h5dwrite_real_1 MODULE PROCEDURE h5dwrite_real_2 @@ -54,21 +54,21 @@ MODULE H5D MODULE PROCEDURE h5dread_reference_obj MODULE PROCEDURE h5dread_reference_dsetreg MODULE PROCEDURE h5dread_integer_scalar - MODULE PROCEDURE h5dread_integer_1 - MODULE PROCEDURE h5dread_integer_2 - MODULE PROCEDURE h5dread_integer_3 - MODULE PROCEDURE h5dread_integer_4 - MODULE PROCEDURE h5dread_integer_5 - MODULE PROCEDURE h5dread_integer_6 - MODULE PROCEDURE h5dread_integer_7 + MODULE PROCEDURE h5dread_integer_1 + MODULE PROCEDURE h5dread_integer_2 + MODULE PROCEDURE h5dread_integer_3 + MODULE PROCEDURE h5dread_integer_4 + MODULE PROCEDURE h5dread_integer_5 + MODULE PROCEDURE h5dread_integer_6 + MODULE PROCEDURE h5dread_integer_7 MODULE PROCEDURE h5dread_char_scalar - MODULE PROCEDURE h5dread_char_1 - MODULE PROCEDURE h5dread_char_2 - MODULE PROCEDURE h5dread_char_3 - MODULE PROCEDURE h5dread_char_4 - MODULE PROCEDURE h5dread_char_5 - MODULE PROCEDURE h5dread_char_6 - MODULE PROCEDURE h5dread_char_7 + MODULE PROCEDURE h5dread_char_1 + MODULE PROCEDURE h5dread_char_2 + MODULE PROCEDURE h5dread_char_3 + MODULE PROCEDURE h5dread_char_4 + MODULE PROCEDURE h5dread_char_5 + MODULE PROCEDURE h5dread_char_6 + MODULE PROCEDURE h5dread_char_7 MODULE PROCEDURE h5dread_real_scalar MODULE PROCEDURE h5dread_real_1 MODULE PROCEDURE h5dread_real_2 @@ -103,49 +103,49 @@ MODULE H5D CONTAINS - + !---------------------------------------------------------------------- -! Name: h5dcreate_f +! Name: h5dcreate_f ! -! Purpose: Creates a dataset at the specified location +! Purpose: Creates a dataset at the specified location ! -! Inputs: +! Inputs: ! loc_id - file or group identifier ! name - dataset name ! type_id - dataset datatype identifier ! space_id - dataset dataspace identifier -! Outputs: +! Outputs: ! dset_id - dataset identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! creation_prp - Dataset creation property list ! lcpl_id - Link creation property list ! dapl_id - Dataset access property list ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: -! - Explicit Fortran interfaces were added for +! Modifications: +! - Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! ! - Added version's 1.8 new optional parameters ! February, 2008 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - - SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & + + SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & hdferr, dcpl_id, lcpl_id, dapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list @@ -174,14 +174,14 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: dcpl_id_default INTEGER(HID_T) :: dapl_id_default INTEGER(HID_T), INTENT(OUT) :: dset_id END FUNCTION h5dcreate_c END INTERFACE - + lcpl_id_default = H5P_DEFAULT_F dcpl_id_default = H5P_DEFAULT_F dapl_id_default = H5P_DEFAULT_F @@ -191,46 +191,46 @@ CONTAINS IF(PRESENT(dapl_id)) dapl_id_default = dapl_id namelen = LEN(name) - hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & + hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) - + END SUBROUTINE h5dcreate_f - + !---------------------------------------------------------------------- -! Name: h5dopen_f +! Name: h5dopen_f ! -! Purpose: Opens an existing dataset. +! Purpose: Opens an existing dataset. ! -! Inputs: +! Inputs: ! loc_id - file or group identifier ! name - dataset name -! Outputs: +! Outputs: ! dset_id - dataset identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! dapl_id - Dataset access property list +! dapl_id - Dataset access property list ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: -Explicit Fortran interfaces were added for +! Modifications: -Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! ! -Added 1.8 (optional) parameter dapl_id ! February, 2008, M. Scot Breitenfeld ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list INTEGER :: namelen ! Name length @@ -258,32 +258,32 @@ CONTAINS IF(PRESENT(dapl_id)) dapl_id_default = dapl_id namelen = LEN(name) - hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) + hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) END SUBROUTINE h5dopen_f - + !---------------------------------------------------------------------- -! Name: h5dclose_f +! Name: h5dclose_f ! -! Purpose: Closes a dataset. +! Purpose: Closes a dataset. ! -! Inputs: +! Inputs: ! dset_id - dataset identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5dclose_f(dset_id, hdferr) @@ -315,14 +315,14 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -338,26 +338,26 @@ CONTAINS file_space_id_default, xfer_prp_default, ref_buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_OBJ_C'::h5dwrite_ref_obj_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_OBJ_C'::h5dwrite_ref_obj_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default INTEGER(HADDR_T), DIMENSION(*) :: ref_buf INTEGER(HSIZE_T), DIMENSION(*) :: dims END FUNCTION h5dwrite_ref_obj_c - END INTERFACE + END INTERFACE xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + allocate(ref_buf(dims(1)), stat=hdferr) if (hdferr .NE. 0 ) then hdferr = -1 @@ -365,7 +365,7 @@ CONTAINS else do j = 1, dims(1) ref_buf(j) = buf(j)%ref - enddo + enddo endif hdferr = h5dwrite_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, ref_buf, dims(1)) @@ -378,16 +378,16 @@ CONTAINS IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -403,26 +403,26 @@ CONTAINS file_space_id_default, xfer_prp_default, ref_buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default INTEGER, DIMENSION(*) :: ref_buf INTEGER(HSIZE_T), DIMENSION(*) :: dims END FUNCTION h5dwrite_ref_reg_c - END INTERFACE + END INTERFACE xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id allocate(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) if (hdferr .NE. 0 ) then @@ -430,7 +430,7 @@ CONTAINS return else do j = 1, dims(1) - do i = 1, REF_REG_BUF_LEN + do i = 1, REF_REG_BUF_LEN ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) enddo enddo @@ -440,8 +440,8 @@ CONTAINS deallocate(ref_buf) END SUBROUTINE h5dwrite_reference_dsetreg - - + + SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE @@ -449,14 +449,14 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER, INTENT(IN) :: buf ! Data buffer INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -466,7 +466,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwrite_integer_s_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -488,13 +488,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_integer_s_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_integer_scalar SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & @@ -505,24 +505,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(IN), & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_integer_1_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_integer_1_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -545,13 +545,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_integer_1_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_integer_1 SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & @@ -562,24 +562,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_integer_2_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_integer_2_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -602,13 +602,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_integer_2_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dwrite_integer_2 SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & @@ -619,16 +619,16 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_integer_3_c @@ -636,7 +636,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwrite_integer_3_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -659,14 +659,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_integer_3_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dwrite_integer_3 SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & @@ -677,24 +677,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_integer_4_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_integer_4_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -716,14 +716,14 @@ CONTAINS xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_integer_4_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dwrite_integer_4 SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & @@ -734,15 +734,15 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -751,7 +751,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwrite_integer_5_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -775,14 +775,14 @@ CONTAINS file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_integer_5_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dwrite_integer_5 SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & @@ -793,24 +793,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_integer_6_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_integer_6_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -833,14 +833,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_integer_6_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dwrite_integer_6 SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & @@ -851,24 +851,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_integer_7_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_integer_7_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -890,14 +890,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_integer_7_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dwrite_integer_7 @@ -908,15 +908,15 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -925,14 +925,14 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwritec_s_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_S_C'::h5dwritec_s_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -948,13 +948,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwritec_s_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_char_scalar SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & @@ -965,31 +965,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwritec_1_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwritec_1_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_1_C'::h5dwritec_1_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1006,13 +1006,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwritec_1_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_char_1 SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1023,31 +1023,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwritec_2_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwritec_2_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_2_C'::h5dwritec_2_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1064,13 +1064,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwritec_2_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_char_2 SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1081,31 +1081,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwritec_3_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwritec_3_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_3_C'::h5dwritec_3_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1122,13 +1122,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwritec_3_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_char_3 SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1139,31 +1139,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwritec_4_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwritec_4_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_4_C'::h5dwritec_4_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1180,13 +1180,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwritec_4_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_char_4 SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1197,14 +1197,14 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -1214,14 +1214,14 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwritec_5_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_5_C'::h5dwritec_5_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1238,13 +1238,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwritec_5_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_char_5 SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1255,31 +1255,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwritec_6_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwritec_6_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_6_C'::h5dwritec_6_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1296,13 +1296,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwritec_6_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_char_6 SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1313,31 +1313,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwritec_7_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwritec_7_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_7_C'::h5dwritec_7_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1353,13 +1353,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwritec_7_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_char_7 SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1369,15 +1369,15 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_real_s_c @@ -1385,7 +1385,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwrite_real_s_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1406,13 +1406,13 @@ CONTAINS xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_real_s_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_real_scalar SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1423,24 +1423,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(IN), & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_real_1_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_real_1_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1463,13 +1463,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_real_1_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_real_1 SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1480,24 +1480,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_real_2_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_real_2_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1520,13 +1520,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_real_2_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_real_2 SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1537,15 +1537,15 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_real_3_c @@ -1553,7 +1553,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwrite_real_3_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1576,13 +1576,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_real_3_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_real_3 SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1593,23 +1593,23 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_real_4_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_real_4_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1632,13 +1632,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_real_4_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_real_4 SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1649,23 +1649,23 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_real_5_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_real_5_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1688,13 +1688,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_real_5_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_real_5 SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1705,23 +1705,23 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_real_6_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_real_6_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1744,13 +1744,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_real_6_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_real_6 SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1761,23 +1761,23 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_real_7_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_real_7_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1799,43 +1799,43 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_real_7_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dwrite_real_7 !---------------------------------------------------------------------- -! Name: h5dread_f +! Name: h5dread_f ! -! Purpose: Reads raw data from the specified dataset into buf, -! converting from file datatype and dataspace to memory +! Purpose: Reads raw data from the specified dataset into buf, +! converting from file datatype and dataspace to memory ! datatype and dataspace. ! -! Inputs: +! Inputs: ! dset_id - dataset identifier ! mem_type_id - memory type identifier -! dims - 1-dim array of size 7; dims(k) has the size +! dims - 1-dim array of size 7; dims(k) has the size ! - of k-th dimension of the buf array -! Outputs: +! Outputs: ! buf - buffer to read data in -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! mem_space_id - memory dataspace identifier ! file_space_id - file dataspace identifier -! xfer_prp - trasfer property list identifier +! xfer_prp - trasfer property list identifier ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! ! dims parameter was added to make code portable; ! n parameter was replaced with dims parameter in @@ -1846,7 +1846,7 @@ CONTAINS ! REAL, DOUBLE PRECISION and CHARACTER buffers ! up to 7 dimensions, and one dimensional buffers ! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) -! types. +! types. !---------------------------------------------------------------------- SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) @@ -1856,19 +1856,19 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims TYPE(hobj_ref_t_f), INTENT(INOUT) , & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: j + INTEGER :: j ! INTEGER, EXTERNAL :: h5dread_ref_obj_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -1879,38 +1879,38 @@ CONTAINS file_space_id_default, xfer_prp_default, ref_buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_OBJ_C'::h5dread_ref_obj_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_OBJ_C'::h5dread_ref_obj_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER(HADDR_T), DIMENSION(*) :: ref_buf END FUNCTION h5dread_ref_obj_c - END INTERFACE + END INTERFACE allocate(ref_buf(dims(1)), stat=hdferr) if (hdferr .NE. 0) then hdferr = -1 return - endif + endif xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, ref_buf, dims) do j = 1, dims(1) buf(j)%ref = ref_buf(j) - enddo - deallocate(ref_buf) + enddo + deallocate(ref_buf) END SUBROUTINE h5dread_reference_obj SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1919,21 +1919,21 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & + TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i,j + INTEGER :: i,j ! INTEGER, EXTERNAL :: h5dread_ref_reg_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -1944,17 +1944,17 @@ CONTAINS file_space_id_default, xfer_prp_default, ref_buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, DIMENSION(*) :: ref_buf END FUNCTION h5dread_ref_reg_c - END INTERFACE + END INTERFACE allocate(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) if (hdferr .NE. 0) then @@ -1966,18 +1966,18 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, ref_buf, dims) - + do j = 1, dims(1) - do i = 1, REF_REG_BUF_LEN + do i = 1, REF_REG_BUF_LEN buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) enddo - enddo + enddo deallocate(ref_buf) END SUBROUTINE h5dread_reference_dsetreg @@ -1989,15 +1989,15 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -2006,7 +2006,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dread_integer_s_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -2028,13 +2028,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_integer_s_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_integer_scalar SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2045,14 +2045,14 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(INOUT), & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -2062,7 +2062,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dread_integer_1_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -2085,13 +2085,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_integer_1_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_integer_1 SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2102,24 +2102,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_integer_2_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_integer_2_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -2142,14 +2142,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_integer_2_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dread_integer_2 SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2160,24 +2160,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_integer_3_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_integer_3_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -2200,14 +2200,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_integer_3_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dread_integer_3 SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2218,24 +2218,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_integer_4_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_integer_4_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -2258,14 +2258,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_integer_4_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dread_integer_4 SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2276,24 +2276,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_integer_5_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_integer_5_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -2316,14 +2316,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_integer_5_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dread_integer_5 SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2334,16 +2334,16 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_integer_6_c @@ -2351,7 +2351,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dread_integer_6_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -2374,14 +2374,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_integer_6_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dread_integer_6 SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2392,24 +2392,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_integer_7_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_integer_7_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -2431,14 +2431,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_integer_7_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims) - + END SUBROUTINE h5dread_integer_7 SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2448,16 +2448,16 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dreadc_s_c @@ -2465,14 +2465,14 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dreadc_s_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_S_C'::h5dreadc_s_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -2488,13 +2488,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dreadc_s_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_char_scalar SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2505,14 +2505,14 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -2522,14 +2522,14 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dreadc_1_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_1_C'::h5dreadc_1_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -2546,13 +2546,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dreadc_1_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_char_1 SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2563,31 +2563,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dreadc_2_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dreadc_2_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_2_C'::h5dreadc_2_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -2604,13 +2604,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dreadc_2_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_char_2 SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2621,31 +2621,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dreadc_3_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dreadc_3_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_3_C'::h5dreadc_3_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -2662,13 +2662,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dreadc_3_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_char_3 SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2679,31 +2679,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dreadc_4_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dreadc_4_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_4_C'::h5dreadc_4_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -2720,13 +2720,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dreadc_4_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_char_4 SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2737,16 +2737,16 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dreadc_5_c @@ -2754,14 +2754,14 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dreadc_5_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_5_C'::h5dreadc_5_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -2778,13 +2778,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dreadc_5_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_char_5 SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2795,31 +2795,31 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dreadc_6_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dreadc_6_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_6_C'::h5dreadc_6_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -2836,13 +2836,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dreadc_6_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_char_6 SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2853,16 +2853,16 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims CHARACTER(LEN=*), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dreadc_7_c @@ -2870,14 +2870,14 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dreadc_7_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_7_C'::h5dreadc_7_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -2893,13 +2893,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dreadc_7_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_char_7 SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2909,15 +2909,15 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_real_s_c @@ -2925,7 +2925,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dread_real_s_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -2947,13 +2947,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_real_s_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_real_scalar SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & @@ -2964,23 +2964,23 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(INOUT), & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_real_1_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_real_1_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -3003,13 +3003,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_real_1_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_real_1 SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & @@ -3020,15 +3020,15 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_real_2_c @@ -3036,7 +3036,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dread_real_2_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -3059,13 +3059,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_real_2_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_real_2 SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & @@ -3076,23 +3076,23 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_real_3_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_real_3_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -3105,7 +3105,7 @@ CONTAINS INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) :: buf END FUNCTION h5dread_real_3_c END INTERFACE @@ -3115,13 +3115,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_real_3_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_real_3 SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & @@ -3132,23 +3132,23 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_real_4_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_real_4_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -3171,13 +3171,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_real_4_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_real_4 SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & @@ -3188,23 +3188,23 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_real_5_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_real_5_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -3217,7 +3217,7 @@ CONTAINS INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf END FUNCTION h5dread_real_5_c END INTERFACE @@ -3227,13 +3227,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_real_5_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_real_5 SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & @@ -3244,14 +3244,14 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -3260,7 +3260,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dread_real_6_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -3283,13 +3283,13 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_real_6_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_real_6 SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & @@ -3300,24 +3300,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_real_7_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_real_7_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -3339,45 +3339,45 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_real_7_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) - + END SUBROUTINE h5dread_real_7 !---------------------------------------------------------------------- -! Name: h5dget_space_f +! Name: h5dget_space_f ! -! Purpose: Returns an identifier for a copy of the dataspace for a -! dataset. +! Purpose: Returns an identifier for a copy of the dataspace for a +! dataset. ! -! Inputs: +! Inputs: ! dataset_id - dataset identifier -! Outputs: +! Outputs: ! dataspace_id - dataspace identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier INTEGER(HID_T), INTENT(OUT) :: dataspace_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5dget_space_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -3394,39 +3394,39 @@ CONTAINS END INTERFACE hdferr = h5dget_space_c(dataset_id, dataspace_id) - END SUBROUTINE h5dget_space_f + END SUBROUTINE h5dget_space_f !---------------------------------------------------------------------- -! Name: h5dget_type_f +! Name: h5dget_type_f ! -! Purpose: Returns an identifier for a copy of the datatype for a -! dataset. +! Purpose: Returns an identifier for a copy of the datatype for a +! dataset. ! -! Inputs: +! Inputs: ! dataset_id - dataset identifier -! Outputs: +! Outputs: ! datatype_id - dataspace identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier INTEGER(HID_T), INTENT(OUT) :: datatype_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5dget_type_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -3442,47 +3442,47 @@ CONTAINS END INTERFACE hdferr = h5dget_type_c (dataset_id, datatype_id) - END SUBROUTINE h5dget_type_f + END SUBROUTINE h5dget_type_f !---------------------------------------------------------------------- -! Name: h5dset_extent (instead of obsolete name: h5dextend_f) +! Name: h5dset_extent (instead of obsolete name: h5dextend_f) ! -! Purpose: Extends a dataset with unlimited dimension. +! Purpose: Extends a dataset with unlimited dimension. ! -! Inputs: +! Inputs: ! dataset_id - dataset identifier -! size - array containing the new magnitude of +! size - array containing the new magnitude of ! each dimension -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! ! Changed name from the now obsolete h5dextend_f ! to h5dset_extent_f. Provided interface to old name ! for backward compatability. -MSB- March 14, 2008 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - ! Array containing - ! dimensions' sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code - + ! Array containing + ! dimensions' sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -3496,44 +3496,44 @@ CONTAINS INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size END FUNCTION h5dset_extent_c END INTERFACE - + hdferr = H5Dset_extent_c(dataset_id, size) END SUBROUTINE h5dset_extent_f !---------------------------------------------------------------------- -! Name: h5dget_create_plist_f +! Name: h5dget_create_plist_f ! -! Purpose: Returns an identifier for a copy of the dataset creation -! property list for a dataset. +! Purpose: Returns an identifier for a copy of the dataset creation +! property list for a dataset. ! -! Inputs: +! Inputs: ! dataset_id - dataset identifier -! Outputs: +! Outputs: ! plist_id - creation property list identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier INTEGER(HID_T), INTENT(OUT) :: plist_id ! Dataset creation ! property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5dget_create_plist_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -3550,39 +3550,39 @@ CONTAINS END INTERFACE hdferr = h5dget_create_plist_c(dataset_id, plist_id) - END SUBROUTINE h5dget_create_plist_f + END SUBROUTINE h5dget_create_plist_f !---------------------------------------------------------------------- -! Name: h5dget_storage_size_f +! Name: h5dget_storage_size_f ! -! Purpose: Returns the amount of storage requires by a dataset +! Purpose: Returns the amount of storage requires by a dataset ! -! Inputs: +! Inputs: ! dataset_id - dataset identifier -! Outputs: +! Outputs: ! size - datastorage size -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! October 15, 2002 +! October 15, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier INTEGER(HSIZE_T), INTENT(OUT) :: size - ! Amount of storage + ! Amount of storage ! allocated for dataset - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) @@ -3596,41 +3596,41 @@ CONTAINS END INTERFACE hdferr = h5dget_storage_size_c(dataset_id, size) - END SUBROUTINE h5dget_storage_size_f + END SUBROUTINE h5dget_storage_size_f !---------------------------------------------------------------------- -! Name: h5dvlen_get_max_len_f +! Name: h5dvlen_get_max_len_f ! ! Purpose: Returns maximum lenght of the VL array elements ! -! Inputs: +! Inputs: ! dataset_id - dataset identifier ! type_id - datatype identifier ! space_id - dataspace identifier -! Outputs: +! Outputs: ! size - buffer size -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! October 15, 2002 +! October 15, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER(SIZE_T), INTENT(OUT) :: len ! Maximum length of the element - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) @@ -3639,14 +3639,14 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DVLEN_GET_MAX_LEN_C'::h5dvlen_get_max_len_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(SIZE_T), INTENT(OUT) :: len + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(SIZE_T), INTENT(OUT) :: len END FUNCTION h5dvlen_get_max_len_c END INTERFACE hdferr = h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) - END SUBROUTINE h5dvlen_get_max_len_f + END SUBROUTINE h5dvlen_get_max_len_f SUBROUTINE h5dwrite_vl_integer(dset_id, mem_type_id, buf, dims, len, & hdferr, & @@ -3655,26 +3655,26 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store ! the lenght of each ! element INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default INTERFACE INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims, len) USE H5GLOBAL @@ -3687,7 +3687,7 @@ CONTAINS INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf END FUNCTION h5dwrite_vl_integer_c @@ -3698,14 +3698,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims, len) - + END SUBROUTINE h5dwrite_vl_integer SUBROUTINE h5dread_vl_integer(dset_id, mem_type_id, buf, dims, len, & @@ -3715,29 +3715,29 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store ! the lenght of each ! element INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: tmp INTEGER :: error INTERFACE INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims, len) USE H5GLOBAL @@ -3750,25 +3750,25 @@ CONTAINS INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf END FUNCTION h5dread_vl_integer_c END INTERFACE - CALL h5dget_space_f(dset_id, tmp, error) + CALL h5dget_space_f(dset_id, tmp, error) xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = tmp file_space_id_default = tmp - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims, len) - + END SUBROUTINE h5dread_vl_integer SUBROUTINE h5dwrite_vl_real(dset_id, mem_type_id, buf, dims, len, & @@ -3778,26 +3778,26 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store ! the lenght of each ! element REAL, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default INTERFACE INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims, len) USE H5GLOBAL @@ -3810,7 +3810,7 @@ CONTAINS INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len REAL, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf END FUNCTION h5dwrite_vl_real_c @@ -3821,14 +3821,14 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims, len) - + END SUBROUTINE h5dwrite_vl_real SUBROUTINE h5dread_vl_real(dset_id, mem_type_id, buf, dims, len, & @@ -3838,29 +3838,29 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store ! the lenght of each ! element REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: tmp INTEGER :: error INTERFACE INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims, len) USE H5GLOBAL @@ -3873,25 +3873,25 @@ CONTAINS INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf END FUNCTION h5dread_vl_real_c END INTERFACE - CALL h5dget_space_f(dset_id, tmp, error) + CALL h5dget_space_f(dset_id, tmp, error) xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = tmp file_space_id_default = tmp - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims, len) - + END SUBROUTINE h5dread_vl_real SUBROUTINE h5dwrite_vl_string(dset_id, mem_type_id, buf, dims, str_len, & @@ -3901,27 +3901,27 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! number of strings - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store ! the lenght of each ! element CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default ! CHARACTER, DIMENSION(dims(1)*dims(2)) :: tmp_buf INTERFACE INTEGER FUNCTION h5dwrite_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & ! xfer_prp_default, tmp_buf, dims, str_len) xfer_prp_default, buf, dims, str_len) @@ -3936,7 +3936,7 @@ CONTAINS INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! CHARACTER, INTENT(IN), & ! DIMENSION(dims(1)*dims(2)) :: tmp_buf CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf @@ -3948,21 +3948,21 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id ! do i = 1, dims(2) ! do j = 1, dims(1) ! tmp_buf((i-1)*dims(1) +j) = buf(i)(j:j) ! enddo -! enddo +! enddo ! write(*,*) (tmp_buf(j:j), j=1,dims(1)*dims(2)) ! write(*,*) str_len(1), str_len(2), str_len(3), str_len(4) hdferr = h5dwrite_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims, str_len) - + END SUBROUTINE h5dwrite_vl_string SUBROUTINE h5dread_vl_string(dset_id, mem_type_id, buf, dims, str_len, & @@ -3972,28 +3972,28 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! number of strings - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! Array to store + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! Array to store ! the lenght of each ! element CHARACTER(LEN=*), INTENT(OUT), & DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: file_space_id_default ! CHARACTER, DIMENSION(dims(1)*dims(2)) :: tmp_buf ! integer i, j INTERFACE INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & ! xfer_prp_default, tmp_buf, dims, str_len) xfer_prp_default, buf, dims, str_len) @@ -4008,7 +4008,7 @@ CONTAINS INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! CHARACTER, INTENT(IN), & ! DIMENSION(dims(1)*dims(2)) :: tmp_buf CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf @@ -4020,41 +4020,41 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id ! do i = 1, dims(2) ! do j = 1, dims(1) ! tmp_buf((i-1)*dims(1) +j) = buf(i)(j:j) ! enddo -! enddo +! enddo ! write(*,*) (tmp_buf(j:j), j=1,dims(1)*dims(2)) ! write(*,*) str_len(1), str_len(2), str_len(3), str_len(4) hdferr = h5dread_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, & buf, dims, str_len) - RETURN + RETURN END SUBROUTINE h5dread_vl_string !---------------------------------------------------------------------- ! Name: h5dfill_integer ! -! Purpose: Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! Purpose: Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes ! of the fillvalues and buffers are supported. Buffer and fillvalue ! are assumed to have the same datatype. ! Only one-dimesional buffers are supported. ! -! Inputs: +! Inputs: ! fill_value - fill value ! space_id - memory space selection identifier ! buf - data buffer iin memory ro apply selection to ! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! Programmer: Elena Pourmal ! March 12, 2003 @@ -4066,11 +4066,11 @@ CONTAINS INTEGER, INTENT(IN) :: fill_value ! Fill value INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier INTEGER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + ! INTEGER, EXTERNAL :: h5dfill_integer_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -4079,19 +4079,19 @@ CONTAINS buf, mem_type_id) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_INTEGER_C'::h5dfill_integer_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_INTEGER_C'::h5dfill_integer_c !DEC$ENDIF INTEGER, INTENT(IN) :: fill_value ! Fill value INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier INTEGER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier END FUNCTION h5dfill_integer_c - END INTERFACE + END INTERFACE fill_type_id = H5T_NATIVE_INTEGER mem_type_id = H5T_NATIVE_INTEGER - hdferr = h5dfill_integer_c(fill_value, fill_type_id, space_id, & + hdferr = h5dfill_integer_c(fill_value, fill_type_id, space_id, & buf, mem_type_id) END SUBROUTINE h5dfill_integer @@ -4099,21 +4099,21 @@ CONTAINS !---------------------------------------------------------------------- ! Name: h5dfill_real ! -! Purpose: Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! Purpose: Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes ! of the fillvalues and buffers are supported. Buffer and fillvalue ! are assumed to have the same datatype. ! Only one-dimesional buffers are supported. ! -! Inputs: +! Inputs: ! fill_value - fill value ! space_id - memory space selection identifier ! buf - data buffer iin memory ro apply selection to ! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! Programmer: Elena Pourmal ! March 12, 2003 @@ -4125,11 +4125,11 @@ CONTAINS REAL, INTENT(IN) :: fill_valuer ! Fill value INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier REAL, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + ! INTEGER, EXTERNAL :: h5dfill_real_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -4138,40 +4138,40 @@ CONTAINS buf, mem_type_id) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_REAL_C'::h5dfill_real_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_REAL_C'::h5dfill_real_c !DEC$ENDIF REAL, INTENT(IN) :: fill_valuer ! Fill value INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier REAL, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier END FUNCTION h5dfill_real_c - END INTERFACE + END INTERFACE fill_type_id = H5T_NATIVE_REAL mem_type_id = H5T_NATIVE_REAL - hdferr = h5dfill_real_c(fill_valuer, fill_type_id, space_id, & + hdferr = h5dfill_real_c(fill_valuer, fill_type_id, space_id, & buf, mem_type_id) END SUBROUTINE h5dfill_real !---------------------------------------------------------------------- ! Name: h5dfill_char ! -! Purpose: Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! Purpose: Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes ! of the fillvalues and buffers are supported. Buffer and fillvalue ! are assumed to have the same datatype. ! Only one-dimesional buffers are supported. ! -! Inputs: +! Inputs: ! fill_value - fill value ! space_id - memory space selection identifier ! buf - data buffer iin memory ro apply selection to ! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! Programmer: Elena Pourmal ! March 12, 2003 @@ -4183,11 +4183,11 @@ CONTAINS CHARACTER, INTENT(IN) :: fill_value ! Fill value INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier CHARACTER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + ! INTEGER, EXTERNAL :: h5dfillc_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -4196,19 +4196,19 @@ CONTAINS buf, mem_type_id) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILLC_C'::h5dfillc_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILLC_C'::h5dfillc_c !DEC$ENDIF CHARACTER, INTENT(IN) :: fill_value ! Fill value INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier CHARACTER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier END FUNCTION h5dfillc_c - END INTERFACE + END INTERFACE fill_type_id = H5T_NATIVE_CHARACTER mem_type_id = H5T_NATIVE_CHARACTER - hdferr = h5dfillc_c(fill_value, fill_type_id, space_id, & + hdferr = h5dfillc_c(fill_value, fill_type_id, space_id, & buf, mem_type_id) END SUBROUTINE h5dfill_char @@ -4216,19 +4216,19 @@ CONTAINS !---------------------------------------------------------------------- ! Name: h5dget_space_status_f ! -! Purpose: Returns the status of data space allocation. +! Purpose: Returns the status of data space allocation. ! -! Inputs: +! Inputs: ! dset_id - dataset identifier -! Outputs: +! Outputs: ! flag - status; may have one of the following values: ! H5D_SPACE_STS_ERROR_F ! H5D_SPACE_STS_NOT_ALLOCATED_F ! H5D_SPACE_STS_PART_ALLOCATED_F ! H5D_SPACE_STS_ALLOCATED_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! Programmer: Elena Pourmal ! March 12, 2003 @@ -4239,8 +4239,8 @@ CONTAINS IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataspace identifier INTEGER, INTENT(IN) :: flag ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! INTEGER, EXTERNAL :: h5dget_space_status_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -4248,30 +4248,30 @@ CONTAINS INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_STATUS_C'::h5dget_space_status_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_STATUS_C'::h5dget_space_status_c !DEC$ENDIF INTEGER(HID_T) :: dset_id INTEGER :: flag END FUNCTION h5dget_space_status_c - END INTERFACE + END INTERFACE hdferr = h5dget_space_status_c(dset_id, flag) END SUBROUTINE h5dget_space_status_f !---------------------------------------------------------------------- -! Name: h5dcreate_anon_f +! Name: h5dcreate_anon_f ! -! Purpose: Creates a dataset in a file without linking it into the file structure +! Purpose: Creates a dataset in a file without linking it into the file structure ! -! Inputs: +! Inputs: ! loc_id - Identifier of the file or group within which to create the dataset. ! type_id - Identifier of the datatype to use when creating the dataset. ! space_id - Identifier of the dataspace to use when creating the dataset. -! Outputs: +! Outputs: ! dset_id - dataset identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! dcpl_id - Dataset creation property list identifier. ! dapl_id - Dataset access property list identifier. @@ -4281,15 +4281,15 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier. - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier. + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier. + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier. INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier. - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier. + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier. INTEGER, INTENT(OUT) :: hdferr ! Error code. INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list identifier. INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list identifier. @@ -4306,7 +4306,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_ANON_C'::h5dcreate_anon_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: loc_id INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HID_T) :: dcpl_id_default @@ -4320,21 +4320,21 @@ CONTAINS IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - + hdferr = h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) END SUBROUTINE h5dcreate_anon_f !---------------------------------------------------------------------- -! Name: h5dget_access_plist_f +! Name: h5dget_access_plist_f ! ! Purpose: Returns a copy of the dataset creation property list. ! -! Inputs: +! Inputs: ! dset_id - dataset identifier. -! Outputs: +! Outputs: ! plist_id - the dataset access property list identifier. -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! @@ -4343,15 +4343,15 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id + INTEGER(HID_T), INTENT(OUT) :: plist_id INTEGER, INTENT(OUT) :: hdferr ! Error code. - + INTERFACE INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) USE H5GLOBAL @@ -4364,7 +4364,7 @@ CONTAINS END INTERFACE hdferr = h5dget_access_plist_c(dset_id, plist_id) - + END SUBROUTINE h5dget_access_plist_f END MODULE H5D diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index 4f9d652..c6d860c 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -62,7 +62,7 @@ nh5eprint_c1(_fcd name, int_f* namelen) FILE *file = NULL; char *c_name = NULL; int_f ret_value = 0; - + if(NULL == (c_name = (char*)HD5f2cstring(name, (size_t)*namelen))) HGOTO_DONE(FAIL) if(NULL == (file = HDfopen(c_name, "a"))) @@ -128,19 +128,20 @@ nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen) size_t c_namelen = (size_t)*namelen; int_f ret_value = 0; - if(c_namelen) { - if(NULL == (c_name = (char *)HDmalloc(c_namelen + 1))) - HGOTO_DONE(FAIL) - } /* end if */ + if(c_namelen > 0) + c_name = (char *)HDmalloc(c_namelen + 1); + + if(!c_name) + HGOTO_DONE(FAIL) /* * Call H5Eget_major function. */ H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen); HD5packFstring((char*)c_name, _fcdtocp(name), c_namelen); - if(!HDstrcmp(c_name, "Invalid major error number")) + if(!HDstrcmp(c_name, "Invalid major error number")) HGOTO_DONE(FAIL) - + done: if(c_name) HDfree(c_name); @@ -166,23 +167,24 @@ nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen) size_t c_namelen = (size_t)*namelen; int_f ret_value = 0; - if(c_namelen) { - if(NULL == (c_name = (char *)HDmalloc(c_namelen + 1))) - HGOTO_DONE(FAIL) - } /* end if */ + if(c_namelen > 0) + c_name = (char *)HDmalloc(c_namelen + 1); + + if(!c_name) + HGOTO_DONE(FAIL) /* * Call H5Eget_minor function. */ H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen); HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen); - if(!HDstrcmp(c_name, "Invalid minor error number")) + if(!HDstrcmp(c_name, "Invalid minor error number")) HGOTO_DONE(FAIL) - + done: if(c_name) HDfree(c_name); - + return ret_value; } diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90 index b385f39..c33f9c1 100644 --- a/fortran/src/H5Eff.f90 +++ b/fortran/src/H5Eff.f90 @@ -2,7 +2,7 @@ ! ! NAME ! H5E -! +! ! FUNCTION ! This file contains Fortran interfaces for H5E functions. ! @@ -24,47 +24,47 @@ ! ! NOTES ! *** IMPORTANT *** -! If you add a new H5E function you must add the function name to the +! If you add a new H5E function you must add the function name to the ! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory. ! This is needed for Windows based operating systems. ! !***** MODULE H5E - + USE H5GLOBAL !Turn on automatic printing of errors INTEGER, PARAMETER :: PRINTON = 1 - + !Turn off automatic printing of errors INTEGER, PARAMETER :: PRINTOFF = 0 - + CONTAINS !---------------------------------------------------------------------- ! Name: h5eclear_f ! -! Purpose: Clears the error stack for the current thread. +! Purpose: Clears the error stack for the current thread. ! -! Inputs: -! Outputs: -! hdferr: - error code +! Inputs: +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! -! +! +! ! ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). April 6, 2001 +! port). April 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5eclear_f(hdferr) @@ -88,25 +88,25 @@ CONTAINS !---------------------------------------------------------------------- ! Name: h5h5eprint_f ! -! Purpose: Prints the error stack in a default manner. +! Purpose: Prints the error stack in a default manner. ! -! Inputs: -! Outputs: -! hdferr: - error code +! Inputs: +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! name - name of the file that -! contains print output +! contains print output ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). April 6, 2001 +! port). April 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5eprint_f(hdferr, name) @@ -136,36 +136,36 @@ CONTAINS END INTERFACE namelen = LEN(NAME) IF (PRESENT(name)) THEN - hdferr = h5eprint_c1(name, namelen) + hdferr = h5eprint_c1(name, namelen) ELSE - hdferr = h5eprint_c2() + hdferr = h5eprint_c2() ENDIF END SUBROUTINE h5eprint_f !---------------------------------------------------------------------- ! Name: h5eget_major_f ! -! Purpose: Returns a character string describing an error specified -! by a major error number. +! Purpose: Returns a character string describing an error specified +! by a major error number. ! -! Inputs: -! error_no - mojor error number -! Outputs: +! Inputs: +! error_no - mojor error number +! Outputs: ! name - character string describing the error ! namelen - number of characters in the name buffer -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! +! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). April 6, 2001 +! port). April 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) @@ -183,40 +183,40 @@ CONTAINS !DEC$ENDIF !DEC$ATTRIBUTES reference :: name INTEGER :: error_no - CHARACTER(LEN=*) :: name + CHARACTER(LEN=*) :: name INTEGER(SIZE_T), INTENT(IN) :: namelen END FUNCTION h5eget_major_c END INTERFACE - - hdferr = h5eget_major_c(error_no, name, namelen) + + hdferr = h5eget_major_c(error_no, name, namelen) END SUBROUTINE h5eget_major_f !---------------------------------------------------------------------- ! Name: h5eget_minor_f ! -! Purpose: Returns a character string describing an error specified -! by a minor error number. +! Purpose: Returns a character string describing an error specified +! by a minor error number. ! -! Inputs: -! error_no - minor error number -! Outputs: +! Inputs: +! error_no - minor error number +! Outputs: ! name - character string describing the error -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! -! +! +! ! ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). April 6, 2001 +! port). April 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5eget_minor_f(error_no, name, hdferr) @@ -233,38 +233,38 @@ CONTAINS !DEC$ENDIF !DEC$ATTRIBUTES reference :: name INTEGER :: error_no - CHARACTER(LEN=*) :: name + CHARACTER(LEN=*) :: name END FUNCTION h5eget_minor_c END INTERFACE - hdferr = h5eget_minor_c(error_no, name) + hdferr = h5eget_minor_c(error_no, name) END SUBROUTINE h5eget_minor_f !---------------------------------------------------------------------- ! Name: h5eset_auto_f ! ! Purpose: Turns automatic error printing on or off ! -! Inputs: +! Inputs: ! printflag - flag to turn automatic error ! - Possible values are: ! - 1 (on), 0 (off) -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! -! +! +! ! ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). April 6, 2001 +! port). April 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- @@ -286,8 +286,8 @@ CONTAINS END FUNCTION h5eset_auto_c END INTERFACE - hdferr = h5eset_auto_c(printflag) + hdferr = h5eset_auto_c(printflag) END SUBROUTINE h5eset_auto_f - + END MODULE H5E - + diff --git a/fortran/src/H5FDmpioff.f90 b/fortran/src/H5FDmpioff.f90 index f98f654..787f0d5 100644 --- a/fortran/src/H5FDmpioff.f90 +++ b/fortran/src/H5FDmpioff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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 contains Fortran90 interfaces for H5P functions needed by || MPI programs. @@ -21,19 +21,19 @@ CONTAINS !---------------------------------------------------------------------- -! Name: h5pset_fapl_mpio_f +! Name: h5pset_fapl_mpio_f ! -! Purpose: Stores MPI IO communicator information to the file -! access property list. +! Purpose: Stores MPI IO communicator information to the file +! access property list. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier ! comm - MPI-2 communicator ! info - MPI-2 info object -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! @@ -42,9 +42,9 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) + SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open @@ -58,34 +58,34 @@ END SUBROUTINE h5pset_fapl_mpio_f !---------------------------------------------------------------------- -! Name: h5pget_fapl_mpio_f +! Name: h5pget_fapl_mpio_f ! -! Purpose: Returns MPI communicator information. +! Purpose: Returns MPI communicator information. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! Outputs: +! Outputs: ! comm - MPI-2 communicator ! info - MPI-2 info object -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! November, 2000 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) + SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: comm ! buffer to return communicator - INTEGER, INTENT(OUT) :: info ! buffer to return info object + INTEGER, INTENT(OUT) :: comm ! buffer to return communicator + INTEGER, INTENT(OUT) :: info ! buffer to return info object ! as defined in MPI_FILE_OPEN of MPI-2 INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -94,32 +94,32 @@ END SUBROUTINE h5pget_fapl_mpio_f !---------------------------------------------------------------------- -! Name: h5pset_dxpl_mpio_f +! Name: h5pset_dxpl_mpio_f ! -! Purpose: Sets data transfer mode. +! Purpose: Sets data transfer mode. ! -! Inputs: +! Inputs: ! prp_id - data transfer property list identifier ! data_xfer_mode - transfer mode ! Possible values are: ! H5FD_MPIO_INDEPENDENT_F ! H5FD_MPIO_COLLECTIVE_F -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! November, 2000 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: @@ -127,37 +127,37 @@ ! H5FD_MPIO_COLLECTIVE_F INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER, EXTERNAL :: h5pset_dxpl_mpio_c + INTEGER, EXTERNAL :: h5pset_dxpl_mpio_c hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) END SUBROUTINE h5pset_dxpl_mpio_f !---------------------------------------------------------------------- -! Name: h5pget_dxpl_mpio_f +! Name: h5pget_dxpl_mpio_f ! -! Purpose: Returns the data transfer mode. +! Purpose: Returns the data transfer mode. ! -! Inputs: +! Inputs: ! prp_id - data transfer property list identifier -! Outputs: +! Outputs: ! data_xfer_mode - transfer mode ! Possible values are: ! H5FD_MPIO_INDEPENDENT_F ! H5FD_MPIO_COLLECTIVE_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! November, 2000 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: @@ -171,19 +171,19 @@ !---------------------------------------------------------------------- -! Name: h5pset_fapl_mpiposix_f +! Name: h5pset_fapl_mpiposix_f ! -! Purpose: Stores MPI IO communicator information to the file -! access property list. +! Purpose: Stores MPI IO communicator information to the file +! access property list. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier ! comm - MPI-2 communicator ! use_gpfs - logical flag to use the GPFS hints -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! @@ -192,9 +192,9 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5pset_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr) + SUBROUTINE h5pset_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open @@ -205,38 +205,38 @@ INTEGER, EXTERNAL :: h5pset_fapl_mpiposix_c flag = 0 - if(use_gpfs) flag = 1 + if(use_gpfs) flag = 1 hdferr = h5pset_fapl_mpiposix_c(prp_id, comm, flag) END SUBROUTINE h5pset_fapl_mpiposix_f !---------------------------------------------------------------------- -! Name: h5pget_fapl_mpiposix_f +! Name: h5pget_fapl_mpiposix_f ! -! Purpose: Returns MPI communicator information. +! Purpose: Returns MPI communicator information. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! Outputs: +! Outputs: ! comm - MPI-2 communicator ! use_gpfs - flag to use GPFS hints -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! May 6, 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5pget_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr) + SUBROUTINE h5pget_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: comm ! buffer to return communicator + INTEGER, INTENT(OUT) :: comm ! buffer to return communicator LOGICAL, INTENT(OUT) :: use_gpfs INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: flag diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index 674d702..51a53a8 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -440,7 +440,7 @@ nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) * Programmer: Elena Pourmal * Monday, September 30, 2002 * Modifications: - * Changed type of max_obj to size_t_f; added parameter for the + * Changed type of max_obj to size_t_f; added parameter for the * number of open objects * Thursday, September 25, 2008 EIP *---------------------------------------------------------------------------*/ diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90 index 43c7c8f..dcd6ff6 100644 --- a/fortran/src/H5Fff.f90 +++ b/fortran/src/H5Fff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,58 +11,58 @@ ! 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 contains Fortran90 interfaces for H5F functions. -! +! MODULE H5F USE H5GLOBAL - + CONTAINS - + !---------------------------------------------------------------------- -! Name: h5fcreate_f +! Name: h5fcreate_f ! -! Purpose: Creates HDF5 files. +! Purpose: Creates HDF5 files. ! -! Inputs: +! Inputs: ! name - name of the file to create -! access_flags - File access flags. Allowable values are: -! H5F_ACC_TRUNC_F -! H5F_ACC_EXCL_F -! Outputs: +! access_flags - File access flags. Allowable values are: +! H5F_ACC_TRUNC_F +! H5F_ACC_EXCL_F +! Outputs: ! file_id - file identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! creation_prp - file creation property list identifier ! access_prp - file access property list identifier ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, & creation_prp, access_prp) - IMPLICIT NONE + IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp ! File creation propertly - ! list identifier + ! list identifier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp ! File access property list ! identifier - INTEGER(HID_T) :: creation_prp_default + INTEGER(HID_T) :: creation_prp_default INTEGER(HID_T) :: access_prp_default INTEGER :: namelen ! Length of the name character string @@ -76,7 +76,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCREATE_C':: h5fcreate_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: name CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: access_flags INTEGER(HID_T), INTENT(OUT) :: file_id @@ -85,67 +85,67 @@ INTEGER :: namelen END FUNCTION h5fcreate_c END INTERFACE - + creation_prp_default = H5P_DEFAULT_F access_prp_default = H5P_DEFAULT_F - if (present(creation_prp)) creation_prp_default = creation_prp - if (present(access_prp)) access_prp_default = access_prp + if (present(creation_prp)) creation_prp_default = creation_prp + if (present(access_prp)) access_prp_default = access_prp namelen = LEN_TRIM(name) hdferr = h5fcreate_c(name, namelen, access_flags, & - creation_prp_default, access_prp_default, file_id) + creation_prp_default, access_prp_default, file_id) END SUBROUTINE h5fcreate_f - + !---------------------------------------------------------------------- -! Name: h5fflush_f +! Name: h5fflush_f ! -! Purpose: Flushes all buffers associated with a file to disk +! Purpose: Flushes all buffers associated with a file to disk ! -! Inputs: -! object_id - identifier of object used to identify -! the file. -! scope - specifies the scope of the flushing action. +! Inputs: +! object_id - identifier of object used to identify +! the file. +! scope - specifies the scope of the flushing action. ! Possible values are: ! H5F_SCOPE_GLOBAL_F ! H5F_SCOPE_LOCAL_F -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! creation_prp - file creation property list identifier ! access_prp - file access property list identifier ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5fflush_f(object_id, scope, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object - !associate with a file, + !associate with a file, !including the file itself, !a dataset, a group, an !attribute, or a named !data type INTEGER, INTENT(IN) :: scope !scope of the flushing - !action, possible values + !action, possible values !are: H5F_SCOPE_GLOBAL_F ! which flushes the entire - !virtual file, + !virtual file, !and H5F_SCOPE_LOCAL_F - !which flushes only the + !which flushes only the !specified file. - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5fflush_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -161,52 +161,52 @@ END FUNCTION h5fflush_c END INTERFACE - hdferr = h5fflush_c(object_id, scope) + hdferr = h5fflush_c(object_id, scope) END SUBROUTINE h5fflush_f !---------------------------------------------------------------------- -! Name: h5fmount_f +! Name: h5fmount_f ! -! Purpose: Mounts a file. +! Purpose: Mounts a file. ! -! Inputs: -! loc_id - the identifier for of file or group in +! Inputs: +! loc_id - the identifier for of file or group in ! which name is defined -! name - the name of the group onto which the file -! specified by child_id is to be mounted. -! child_id - the identifier of the file to be mounted. -! Outputs: -! hdferr: - error code +! name - the name of the group onto which the file +! specified by child_id is to be mounted. +! child_id - the identifier of the file to be mounted. +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! access_prp - the identifier of the property list to be used ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! in which dsetname is defined + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group + ! in which dsetname is defined CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the - ! file to be mounted - INTEGER, INTENT(OUT) :: hdferr ! Error code + ! file to be mounted + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp ! File access property list ! identifier - INTEGER(HID_T) :: access_prp_default + INTEGER(HID_T) :: access_prp_default INTEGER :: namelen ! Length of the name character string - + ! INTEGER, EXTERNAL :: h5fmount_c ! Interface is needed for MS FORTRAN ! @@ -217,58 +217,58 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FMOUNT_C':: h5fmount_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(IN) :: child_id + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: child_id INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER :: namelen + INTEGER :: namelen END FUNCTION h5fmount_c END INTERFACE access_prp_default = H5P_DEFAULT_F - if (present(access_prp)) access_prp_default = access_prp + if (present(access_prp)) access_prp_default = access_prp namelen = LEN(name) - hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) - + hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) + END SUBROUTINE h5fmount_f !---------------------------------------------------------------------- -! Name: h5funmount_f +! Name: h5funmount_f ! -! Purpose: Unmounts a file. +! Purpose: Unmounts a file. ! -! Inputs: -! loc_id - the identifier for of file or group in +! Inputs: +! loc_id - the identifier for of file or group in ! which name is defined ! name - the name of the mount point -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5funmount_f(loc_id, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! at which the specified file + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group + ! at which the specified file ! is to be unmounted CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the mount point - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: namelen ! Length of the name character string - + ! INTEGER, EXTERNAL :: h5fumount_c ! Interface is needed for MS FORTRAN ! @@ -278,56 +278,56 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FUNMOUNT_C':: h5funmount_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen END FUNCTION h5funmount_c END INTERFACE - + namelen = LEN(name) - hdferr = h5funmount_c(loc_id, name, namelen) - + hdferr = h5funmount_c(loc_id, name, namelen) + END SUBROUTINE h5funmount_f - + !---------------------------------------------------------------------- -! Name: h5fopen_f +! Name: h5fopen_f ! -! Purpose: Opens HDF5 file. +! Purpose: Opens HDF5 file. ! -! Inputs: +! Inputs: ! name - name of the file to acecss -! access_flags - File access flags. Allowable values are: -! H5F_ACC_RDWR_F -! H5F_ACC_RDONLY_F -! Outputs: +! access_flags - File access flags. Allowable values are: +! H5F_ACC_RDWR_F +! H5F_ACC_RDONLY_F +! Outputs: ! file_id - file identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! access_prp - file access property list identifier ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, & access_prp) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp ! File access property list ! identifier - INTEGER(HID_T) :: access_prp_default + INTEGER(HID_T) :: access_prp_default INTEGER :: namelen ! Length of the name character string ! INTEGER, EXTERNAL :: h5fopen_c @@ -348,46 +348,46 @@ INTEGER(HID_T), INTENT(OUT) :: file_id END FUNCTION h5fopen_c END INTERFACE - + access_prp_default = H5P_DEFAULT_F - if (present(access_prp)) access_prp_default = access_prp + if (present(access_prp)) access_prp_default = access_prp namelen = LEN(name) hdferr = h5fopen_c(name, namelen, access_flags, & - access_prp_default, file_id) + access_prp_default, file_id) END SUBROUTINE h5fopen_f - + !---------------------------------------------------------------------- -! Name: h5freopen_f +! Name: h5freopen_f ! -! Purpose: Reopens HDF5 file. +! Purpose: Reopens HDF5 file. ! -! Inputs: -! file_id - identifier of a file for which an +! Inputs: +! file_id - identifier of a file for which an ! additional identifier is required -! Outputs: +! Outputs: ! ret_file_id - new file identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5freopen_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -403,42 +403,42 @@ END FUNCTION h5freopen_c END INTERFACE - hdferr = h5freopen_c(file_id, ret_file_id) - + hdferr = h5freopen_c(file_id, ret_file_id) + END SUBROUTINE h5freopen_f - + !---------------------------------------------------------------------- ! Name: h5fget_create_plist_f ! -! Purpose: Returns a file creation property list identifier. +! Purpose: Returns a file creation property list identifier. ! -! Inputs: -! file_id - identifier of a file to get -! get creation property list of -! Outputs: +! Inputs: +! file_id - identifier of a file to get +! get creation property list of +! Outputs: ! prop_id - creation property list identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier INTEGER(HID_T), INTENT(OUT) :: prop_id ! File creation property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + ! list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5fget_create_plist_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -453,43 +453,43 @@ INTEGER(HID_T), INTENT(OUT) :: prop_id END FUNCTION h5fget_create_plist_c END INTERFACE - - hdferr = h5fget_create_plist_c(file_id, prop_id) + + hdferr = h5fget_create_plist_c(file_id, prop_id) END SUBROUTINE h5fget_create_plist_f - + !---------------------------------------------------------------------- ! Name: h5fget_access_plist_f ! -! Purpose: Returns a file access property list identifier. +! Purpose: Returns a file access property list identifier. ! -! Inputs: -! file_id - identifier of a file to get -! get creation property list of -! Outputs: +! Inputs: +! file_id - identifier of a file to get +! get creation property list of +! Outputs: ! access_id - access property list identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier INTEGER(HID_T), INTENT(OUT) :: access_id ! File access property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + ! list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5fget_access_plist_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -504,46 +504,46 @@ INTEGER(HID_T), INTENT(OUT) :: access_id END FUNCTION h5fget_access_plist_c END INTERFACE - - - hdferr = h5fget_access_plist_c(file_id, access_id) + + + hdferr = h5fget_access_plist_c(file_id, access_id) END SUBROUTINE h5fget_access_plist_f - + !---------------------------------------------------------------------- ! Name: h5fis_hdf5_f ! -! Purpose: Determines whether a file is in the HDF5 format. +! Purpose: Determines whether a file is in the HDF5 format. ! -! Inputs: +! Inputs: ! name - name of the file to check -! Outputs: +! Outputs: ! status - indicates if file is and HDF5 file -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5fis_hdf5_f(name, status, hdferr) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file LOGICAL, INTENT(OUT) :: status ! Indicates if file ! is an HDF5 file - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: namelen ! Length of the name character string INTEGER :: flag ! "TRUE/FALSE" flag from C routine - ! to define status value. + ! to define status value. ! INTEGER, EXTERNAL :: h5fis_hdf5_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -560,38 +560,38 @@ INTEGER :: flag END FUNCTION h5fis_hdf5_c END INTERFACE - + namelen = LEN(name) - hdferr = h5fis_hdf5_c(name, namelen, flag) + hdferr = h5fis_hdf5_c(name, namelen, flag) status = .TRUE. if (flag .EQ. 0) status = .FALSE. END SUBROUTINE h5fis_hdf5_f - + !---------------------------------------------------------------------- ! Name: h5fclose_f ! ! Purpose: Closes HDF5 file. ! -! Inputs: +! Inputs: ! file_id - file identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5fclose_f(file_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier @@ -619,31 +619,31 @@ ! ! Purpose: Gets number of the objects open within a file ! -! Inputs: +! Inputs: ! file_id - file identifier ! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! Outputs: +! H5F_OBJ_FILE_F +! H5F_OBJ_DATASET_F +! H5F_OBJ_GROUP_F +! H5F_OBJ_DATATYPE_F +! H5F_OBJ_ALL_F +! Outputs: ! obj_count - number of open objects -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! September 30, 2002 ! -! Modifications: +! Modifications: ! Changed the type of obj_count to INTEGER(SIZE_T) ! September 25, 2008 EIP -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier @@ -674,34 +674,34 @@ ! ! Purpose: Get list of open objects identifiers within a file ! -! Inputs: +! Inputs: ! file_id - file identifier ! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! Outputs: +! H5F_OBJ_FILE_F +! H5F_OBJ_DATASET_F +! H5F_OBJ_GROUP_F +! H5F_OBJ_DATATYPE_F +! H5F_OBJ_ALL_F +! Outputs: ! obj_ids - array of open object identifiers -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! September 30, 2002 ! -! Modifications: +! Modifications: ! Added optional parameter num_objs for number of open objects -! of the specified type and changed type of max_obj to +! of the specified type and changed type of max_obj to ! INTEGER(SIZE_T) ! September 25, 2008 EIP ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier @@ -710,8 +710,8 @@ INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids ! Array of open objects iidentifiers INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs - INTEGER(SIZE_T) :: c_num_objs + INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs + INTEGER(SIZE_T) :: c_num_objs ! Number of open objects of the specified type INTERFACE @@ -721,10 +721,10 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_IDS_C':: h5fget_obj_ids_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type + INTEGER, INTENT(IN) :: obj_type INTEGER(SIZE_T), INTENT(IN) :: max_objs - INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids - INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs + INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids + INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs END FUNCTION h5fget_obj_ids_c END INTERFACE @@ -738,28 +738,28 @@ ! ! Purpose: Get amount of free space within a file ! -! Inputs: +! Inputs: ! file_id - file identifier -! Outputs: +! Outputs: ! free_space - amount of free space in file -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Quincey Koziol ! October 7, 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space !amount of free space in file INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -770,7 +770,7 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FREESPACE_C':: h5fget_freespace_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space END FUNCTION h5fget_freespace_c END INTERFACE @@ -779,19 +779,19 @@ END SUBROUTINE h5fget_freespace_f !---------------------------------------------------------------------- -! Name: h5fget_name_f +! Name: h5fget_name_f ! ! Purpose: Gets the name of the file from the object identifier ! -! Inputs: +! Inputs: ! obj_id - object identifier ! Inputs/Outputs: ! buf - buffer to read name in -! Outputs: +! Outputs: ! size - actual size of the name -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! ! Programmer: Elena Pourmal @@ -802,8 +802,8 @@ SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(INOUT) :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold file name INTEGER(SIZE_T), INTENT(OUT) :: size ! Size of the file name INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, @@ -830,17 +830,17 @@ END SUBROUTINE h5fget_name_f !---------------------------------------------------------------------- -! Name: h5fget_filesize_f +! Name: h5fget_filesize_f ! ! Purpose: Retrieves the file size of the HDF5 file. ! -! Inputs: +! Inputs: ! file_id - file identifier -! Outputs: -! size - file size -! hdferr: - error code +! Outputs: +! size - file size +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! ! Programmer: Elena Pourmal @@ -852,7 +852,7 @@ SUBROUTINE h5fget_filesize_f(file_id, size, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Size of the file + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Size of the file INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, ! -1 if fail ! INTEGER, EXTERNAL :: h5fget_filesize_c diff --git a/fortran/src/H5Gff.f90 b/fortran/src/H5Gff.f90 index ae120bb..2e769ad 100644 --- a/fortran/src/H5Gff.f90 +++ b/fortran/src/H5Gff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,11 +11,11 @@ ! 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 contains Fortran90 interfaces for H5F functions. -! +! MODULE H5G USE H5GLOBAL @@ -28,53 +28,53 @@ MODULE H5G ! END INTERFACE CONTAINS - + !---------------------------------------------------------------------- -! Name: h5gcreate_f +! Name: h5gcreate_f ! -! Purpose: Creates a new group. +! Purpose: Creates a new group. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - group name at the specified location -! Outputs: +! Outputs: ! grp_id - group identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! size_hint - a parameter indicating the number of bytes -! to reserve for the names that will appear +! size_hint - a parameter indicating the number of bytes +! to reserve for the names that will appear ! in the group ! lcpl_id - Property list for link creation ! gcpl_id - Property list for group creation ! gapl_id - Property list for group access ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! ! Added additional optional paramaters in 1.8 ! MSB - February 27, 2008 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint ! Parameter indicating ! the number of bytes ! to reserve for the ! names that will appear ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F - ! if using any of the optional + ! if using any of the optional ! parameters lcpl_id, gcpl_id, and/or gapl_id when not ! using keywords in specifying the optional parameters INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation @@ -86,7 +86,7 @@ CONTAINS INTEGER(HID_T) :: gapl_id_default INTEGER :: namelen ! Length of the name character string - INTEGER(SIZE_T) :: size_hint_default + INTEGER(SIZE_T) :: size_hint_default ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -109,7 +109,7 @@ CONTAINS END FUNCTION h5gcreate_c END INTERFACE - size_hint_default = OBJECT_NAMELEN_DEFAULT_F + size_hint_default = OBJECT_NAMELEN_DEFAULT_F IF (PRESENT(size_hint)) size_hint_default = size_hint lcpl_id_default = H5P_DEFAULT_F IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id @@ -126,18 +126,18 @@ CONTAINS END SUBROUTINE h5gcreate_f !!$!---------------------------------------------------------------------- -!!$! Name: h5gcreate2_f +!!$! Name: h5gcreate2_f !!$! -!!$! Purpose: Creates a new group. +!!$! Purpose: Creates a new group. !!$! -!!$! Inputs: +!!$! Inputs: !!$! loc_id - location identifier !!$! name - group name at the specified location -!!$! Outputs: +!!$! Outputs: !!$! grp_id - group identifier -!!$! hdferr: - error code +!!$! hdferr: - error code !!$! Success: 0 -!!$! Failure: -1 +!!$! Failure: -1 !!$! Optional parameters: !!$! !!$! lcpl_id - Property list for link creation @@ -147,19 +147,19 @@ CONTAINS !!$! Programmer: M.S. BREITENFELD !!$! February 27, 2008 !!$! -!!$! Modifications: +!!$! Modifications: !!$! !!$! Comment: Needed to switch the first 2 arguments to avoid conflect -!!$! with h5gcreate1_f +!!$! with h5gcreate1_f !!$!---------------------------------------------------------------------- !!$ -!!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & +!!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & !!$ lcpl_id, gcpl_id, gapl_id) -!!$ IMPLICIT NONE +!!$ IMPLICIT NONE !!$ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group !!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier !!$ INTEGER, INTENT(OUT) :: hdferr ! Error code -!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier +!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier !!$ !!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation !!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation @@ -211,44 +211,44 @@ CONTAINS !---------------------------------------------------------------------- -! Name: h5gopen_f +! Name: h5gopen_f ! -! Purpose: Opens an existing group. +! Purpose: Opens an existing group. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - name of the group to open -! Outputs: +! Outputs: ! grp_id - group identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! gapl_id - Group access property list identifier ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). March 5, 2001 -! +! ! Added 1.8 (optional) parameter gapl_id ! February, 2008 M.S. Breitenfeld ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Group access property list identifier - + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(OUT) :: grp_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Group access property list identifier + INTEGER(HID_T) :: gapl_id_default INTEGER :: namelen ! Length of the name character string - + ! INTEGER, EXTERNAL :: h5gopen_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -261,7 +261,7 @@ CONTAINS !DEC$ATTRIBUTES reference :: name INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen + INTEGER :: namelen INTEGER(HID_T), INTENT(IN) :: gapl_id_default INTEGER(HID_T), INTENT(OUT) :: grp_id END FUNCTION h5gopen_c @@ -269,34 +269,34 @@ CONTAINS gapl_id_default = H5P_DEFAULT_F IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - + namelen = LEN(name) - hdferr = h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) - + hdferr = h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) + END SUBROUTINE h5gopen_f !---------------------------------------------------------------------- -! Name: h5gclose_f +! Name: h5gclose_f ! -! Purpose: Closes the specified group. +! Purpose: Closes the specified group. ! -! Inputs: +! Inputs: ! grp_id - group identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gclose_f(grp_id, hdferr) IMPLICIT NONE @@ -322,42 +322,42 @@ CONTAINS !---------------------------------------------------------------------- -! Name: h5gget_obj_info_idx_f +! Name: h5gget_obj_info_idx_f ! -! Purpose: Returns name and type of the group member identified by -! its index. +! Purpose: Returns name and type of the group member identified by +! its index. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - name of the group at the specified location ! idx - object index (zero-based) -! Outputs: +! Outputs: ! obj_name - object name ! obj_type - object type -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, & obj_name, obj_type, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER, INTENT(IN) :: idx ! Index of member object - CHARACTER(LEN=*), INTENT(OUT) :: obj_name ! Name of the object - INTEGER, INTENT(OUT) :: obj_type ! Object type - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER, INTENT(IN) :: idx ! Index of member object + CHARACTER(LEN=*), INTENT(OUT) :: obj_name ! Name of the object + INTEGER, INTENT(OUT) :: obj_type ! Object type + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: namelen ! Length of the name character string INTEGER :: obj_namelen ! Length of the obj_name character string @@ -388,46 +388,46 @@ CONTAINS namelen = LEN(name) obj_namelen = LEN(obj_name) hdferr = h5gget_obj_info_idx_c(loc_id, name, namelen, idx, & - obj_name, obj_namelen, obj_type) + obj_name, obj_namelen, obj_type) END SUBROUTINE h5gget_obj_info_idx_f !---------------------------------------------------------------------- -! Name: h5gn_members_f +! Name: h5gn_members_f ! -! Purpose: Returns the number of group members. +! Purpose: Returns the number of group members. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - name of the group at the specified location -! Outputs: +! Outputs: ! nmembers - number of group members -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group INTEGER, INTENT(OUT) :: nmembers ! Number of members in the - ! group - INTEGER, INTENT(OUT) :: hdferr ! Error code + ! group + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: namelen ! Length of the name character string - + ! INTEGER, EXTERNAL :: h5gn_members_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -446,56 +446,56 @@ CONTAINS END INTERFACE namelen = LEN(name) - hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) + hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) END SUBROUTINE h5gn_members_f !---------------------------------------------------------------------- -! Name: h5glink_f +! Name: h5glink_f ! -! Purpose: Creates a link of the specified type from new_name -! to current_name. +! Purpose: Creates a link of the specified type from new_name +! to current_name. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! link_type - link type ! Possible values are: ! H5G_LINK_HARD_F (0) or -! H5G_LINK_SOFT_F (1) -! current_name - name of the existing object if link is a -! hard link. Can be anything for the soft link. +! H5G_LINK_SOFT_F (1) +! current_name - name of the existing object if link is a +! hard link. Can be anything for the soft link. ! new_name - new name for the object -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5glink_f(loc_id, link_type, current_name, & new_name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier INTEGER, INTENT(IN) :: link_type ! link type ! Possible values are: ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) - - CHARACTER(LEN=*), INTENT(IN) :: current_name - ! Current name of an object + ! H5G_LINK_SOFT_F (1) + + CHARACTER(LEN=*), INTENT(IN) :: current_name + ! Current name of an object CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER :: current_namelen ! Lenghth of the current_name string INTEGER :: new_namelen ! Lenghth of the new_name string @@ -505,14 +505,14 @@ CONTAINS INTERFACE INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & current_namelen, new_name, new_namelen) - + USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK_C'::h5glink_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: current_name !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: loc_id INTEGER, INTENT(IN) :: link_type CHARACTER(LEN=*), INTENT(IN) :: current_name INTEGER :: current_namelen @@ -520,7 +520,7 @@ CONTAINS INTEGER :: new_namelen END FUNCTION h5glink_c END INTERFACE - + current_namelen = LEN(current_name) new_namelen = LEN(new_name) hdferr = h5glink_c(loc_id, link_type, current_name, & @@ -528,50 +528,50 @@ CONTAINS END SUBROUTINE h5glink_f !---------------------------------------------------------------------- -! Name: h5glink2_f +! Name: h5glink2_f ! -! Purpose: Creates a link of the specified type from new_name +! Purpose: Creates a link of the specified type from new_name ! to current_name. current_name and new_name are interpreted -! releative to current and new location identifiers. +! releative to current and new location identifiers. ! -! Inputs: +! Inputs: ! cur_loc_id - location identifier -! cur_name - name of the existing object if link is a -! hard link. Can be anything for the soft link. +! cur_name - name of the existing object if link is a +! hard link. Can be anything for the soft link. ! link_type - link type ! Possible values are: ! H5G_LINK_HARD_F (0) or -! H5G_LINK_SOFT_F (1) +! H5G_LINK_SOFT_F (1) ! new_loc_id - new location identifier ! new_name - new name for the object -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! September 25, 2002 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, & new_name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: cur_name - ! Current name of an object + INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: cur_name + ! Current name of an object INTEGER, INTENT(IN) :: link_type ! link type ! Possible values are: ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) - - INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier + ! H5G_LINK_SOFT_F (1) + + INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER :: cur_namelen ! Lenghth of the current_name string INTEGER :: new_namelen ! Lenghth of the new_name string @@ -579,15 +579,15 @@ CONTAINS INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & link_type, new_loc_id, & new_name, new_namelen) - + USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK2_C'::h5glink2_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: cur_name !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: cur_loc_id - INTEGER(HID_T), INTENT(IN) :: new_loc_id + INTEGER(HID_T), INTENT(IN) :: cur_loc_id + INTEGER(HID_T), INTENT(IN) :: new_loc_id INTEGER, INTENT(IN) :: link_type CHARACTER(LEN=*), INTENT(IN) :: cur_name CHARACTER(LEN=*), INTENT(IN) :: new_name @@ -595,7 +595,7 @@ CONTAINS INTEGER :: new_namelen END FUNCTION h5glink2_c END INTERFACE - + cur_namelen = LEN(cur_name) new_namelen = LEN(new_name) hdferr = h5glink2_c(cur_loc_id, cur_name, cur_namelen, link_type, & @@ -603,40 +603,40 @@ CONTAINS END SUBROUTINE h5glink2_f !---------------------------------------------------------------------- -! Name: h5gunlink_f +! Name: h5gunlink_f ! -! Purpose: Removes the specified name from the group graph and -! decrements the link count for the object to which name -! points +! Purpose: Removes the specified name from the group graph and +! decrements the link count for the object to which name +! points ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - name of the object to unlink -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gunlink_f(loc_id, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an object + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an object INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER :: namelen ! Lenghth of the name character string - + ! INTEGER, EXTERNAL :: h5gunlink_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -652,45 +652,45 @@ CONTAINS INTEGER :: namelen END FUNCTION h5gunlink_c END INTERFACE - + namelen = LEN(name) hdferr = h5gunlink_c(loc_id, name, namelen) END SUBROUTINE h5gunlink_f !---------------------------------------------------------------------- -! Name: h5gmove_f +! Name: h5gmove_f ! -! Purpose: Renames an object within an HDF5 file. +! Purpose: Renames an object within an HDF5 file. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - object's name at specified location ! new_name - object's new name -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER :: namelen ! Lenghth of the current_name string INTEGER :: new_namelen ! Lenghth of the new_name string @@ -712,44 +712,44 @@ CONTAINS INTEGER :: new_namelen END FUNCTION h5gmove_c END INTERFACE - + namelen = LEN(name) new_namelen = LEN(new_name) hdferr = h5gmove_c(loc_id, name, namelen, new_name, new_namelen) END SUBROUTINE h5gmove_f !---------------------------------------------------------------------- -! Name: h5gmove2_f +! Name: h5gmove2_f ! -! Purpose: Renames an object within an HDF5 file. +! Purpose: Renames an object within an HDF5 file. ! -! Inputs: +! Inputs: ! src_loc_id - original location identifier ! src_name - object's name at specified original location ! dst_loc_id - original location identifier ! dst_name - object's new name -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! September 25, 2002 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original name of an object - INTEGER(HID_T), INTENT(IN) :: dst_loc_id ! File or group identifier + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original name of an object + INTEGER(HID_T), INTENT(IN) :: dst_loc_id ! File or group identifier CHARACTER(LEN=*), INTENT(IN) :: dst_name ! New name of an object INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER :: src_namelen ! Length of the current_name string INTEGER :: dst_namelen ! Lenghth of the new_name string @@ -773,7 +773,7 @@ CONTAINS INTEGER :: dst_namelen END FUNCTION h5gmove2_c END INTERFACE - + src_namelen = LEN(src_name) dst_namelen = LEN(dst_name) hdferr = h5gmove2_c(src_loc_id, src_name, src_namelen,& @@ -781,46 +781,46 @@ CONTAINS END SUBROUTINE h5gmove2_f !---------------------------------------------------------------------- -! Name: h5gget_linkval_f +! Name: h5gget_linkval_f ! -! Purpose: Returns the name of the object that the symbolic link -! points to. +! Purpose: Returns the name of the object that the symbolic link +! points to. ! -! Inputs: +! Inputs: ! loc_id - location identifier -! name - symbolic link to the object whose name -! is to be returned. +! name - symbolic link to the object whose name +! is to be returned. ! size - maximum number of characters to be returned -! Outputs: -! buffer - a buffer to hold the name of the object -! being sought -! hdferr: - error code +! Outputs: +! buffer - a buffer to hold the name of the object +! being sought +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer - CHARACTER(LEN=size), INTENT(OUT) :: buffer + CHARACTER(LEN=size), INTENT(OUT) :: buffer ! Buffer to hold a name of ! the object symbolic link ! points to INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER :: namelen ! Lenghth of the current_name string ! INTEGER, EXTERNAL :: h5gget_linkval_c @@ -833,52 +833,52 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_LINKVAL_C'::h5gget_linkval_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: buffer + !DEC$ATTRIBUTES reference :: buffer INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(IN) :: name INTEGER :: namelen INTEGER(SIZE_T), INTENT(IN) :: size CHARACTER(LEN=*), INTENT(OUT) :: buffer END FUNCTION h5gget_linkval_c END INTERFACE - + namelen = LEN(name) hdferr = h5gget_linkval_c(loc_id, name, namelen, size, buffer) END SUBROUTINE h5gget_linkval_f !---------------------------------------------------------------------- -! Name: h5gset_comment_f +! Name: h5gset_comment_f ! -! Purpose: Sets comment for specified object. +! Purpose: Sets comment for specified object. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - name of the object ! comment - comment to set for the object -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER :: namelen ! Lenghth of the current_name string INTEGER :: commentlen ! Lenghth of the comment string @@ -892,8 +892,8 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GSET_COMMENT_C'::h5gset_comment_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: comment + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: comment INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER :: namelen @@ -901,48 +901,48 @@ CONTAINS INTEGER :: commentlen END FUNCTION h5gset_comment_c END INTERFACE - + namelen = LEN(name) commentlen = LEN(comment) hdferr = h5gset_comment_c(loc_id, name, namelen, comment, commentlen) END SUBROUTINE h5gset_comment_f !---------------------------------------------------------------------- -! Name: h5gget_comment_f +! Name: h5gget_comment_f ! -! Purpose: Retrieves comment for specified object. +! Purpose: Retrieves comment for specified object. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - name of the object at specified location ! size - size of the buffer required to hold comment -! Outputs: +! Outputs: ! buffer - buffer to hold object's comment -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer - CHARACTER(LEN=size), INTENT(OUT) :: buffer + CHARACTER(LEN=size), INTENT(OUT) :: buffer ! Buffer to hold a comment INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER :: namelen ! Lenghth of the current_name string ! INTEGER, EXTERNAL :: h5gget_comment_c @@ -963,7 +963,7 @@ CONTAINS CHARACTER(LEN=*), INTENT(OUT) :: buffer END FUNCTION h5gget_comment_c END INTERFACE - + namelen = LEN(name) hdferr = h5gget_comment_c(loc_id, name, namelen, size, buffer) END SUBROUTINE h5gget_comment_f @@ -971,37 +971,37 @@ CONTAINS !---------------------------------------------------------------------- ! Name: H5Gcreate_anon_f ! -! Purpose: Creates a new empty group without linking it into the file structure. +! Purpose: Creates a new empty group without linking it into the file structure. ! -! Inputs: +! Inputs: ! loc_id - Location identifier -! Outputs: +! Outputs: ! grp_id - group identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! gcpl_id - Group creation property list identifier ! gapl_id - Group access property list identifier ! ! Programmer: M.S. Breitenfeld -! February 15, 2008 +! February 15, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access INTEGER(HID_T) :: gcpl_id_default INTEGER(HID_T) :: gapl_id_default - + INTERFACE INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) USE H5GLOBAL @@ -1015,43 +1015,43 @@ CONTAINS END FUNCTION h5gcreate_anon_c END INTERFACE - gcpl_id_default = H5P_DEFAULT_F - gapl_id_default = H5P_DEFAULT_F + gcpl_id_default = H5P_DEFAULT_F + gapl_id_default = H5P_DEFAULT_F IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - + hdferr = h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) - + END SUBROUTINE h5Gcreate_anon_f !---------------------------------------------------------------------- ! Name: H5Gget_create_plist_f ! -! Purpose: Gets a group creation property list identifier. +! Purpose: Gets a group creation property list identifier. ! -! Inputs: +! Inputs: ! grp_id - group identifier -! Outputs: +! Outputs: ! gcpl_id - Group creation property list identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! ! Programmer: M.S. Breitenfeld -! February 15, 2008 +! February 15, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation INTEGER, INTENT(OUT) :: hdferr ! Error code - + ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -1064,17 +1064,17 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: gcpl_id END FUNCTION h5gget_create_plist_c END INTERFACE - + hdferr = h5gget_create_plist_c(grp_id, gcpl_id ) - + END SUBROUTINE h5gget_create_plist_f !---------------------------------------------------------------------- ! Name: h5gget_info_f ! ! Purpose: Retrieves information about a group -! -! Inputs: +! +! Inputs: ! group_id - Group identifier ! ! Outputs: NOTE: In C it is defined as a structure: H5G_info_t @@ -1085,16 +1085,16 @@ CONTAINS ! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure ! nlinks - Number of links in group ! max_corder - Current maximum creation order value for group -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! mounted - Whether group has a file mounted on it +! mounted - Whether group has a file mounted on it ! ! Programmer: M. S. Breitenfeld -! February 15, 2008 +! February 15, 2008 ! -! Modifications: +! Modifications: ! - Added 'mounted' paramater ! M.S. Breitenfeld ! July 16, 2008 @@ -1104,7 +1104,7 @@ CONTAINS SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier - + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage @@ -1136,20 +1136,20 @@ CONTAINS hdferr = h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN + IF(mounted_c.EQ.0) THEN mounted = .FALSE. - ELSE + ELSE mounted = .TRUE. ENDIF ENDIF - + END SUBROUTINE h5gget_info_f !---------------------------------------------------------------------- ! Name: h5gget_info_by_idx_f ! ! Purpose: Retrieves information about a group, according to the group’s position within an index. -! +! ! Inputs: ! loc_id - File or group identifier ! group_name - Name of group containing group for which information is to be retrieved @@ -1165,17 +1165,17 @@ CONTAINS ! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure ! nlinks - Number of links in group ! max_corder - Current maximum creation order value for group -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it +! mounted - Whether group has a file mounted on it ! ! Programmer: M. S. Breitenfeld -! February 18, 2008 +! February 18, 2008 ! -! Modifications: +! Modifications: ! - Added 'mounted' paramater ! M.S. Breitenfeld ! July 16, 2008 @@ -1215,7 +1215,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_IDX_C'::h5gget_info_by_idx_c !DEC$ENDIF - + !DEC$ATTRIBUTES reference :: group_name INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: group_name @@ -1224,7 +1224,7 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN) :: n INTEGER(HID_T) :: lapl_id_default INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: nlinks INTEGER, INTENT(OUT) :: max_corder INTEGER(SIZE_T) :: group_name_len @@ -1243,20 +1243,20 @@ CONTAINS storage_type, nlinks, max_corder, mounted_c) IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN + IF(mounted_c.EQ.0) THEN mounted = .FALSE. - ELSE + ELSE mounted = .TRUE. ENDIF ENDIF - + END SUBROUTINE h5gget_info_by_idx_f - + !---------------------------------------------------------------------- ! Name: h5gget_info_by_name_f ! -! Purpose: Retrieves information about a group. -! +! Purpose: Retrieves information about a group. +! ! Inputs: ! loc_id - File or group identifier ! group_name - Name of group containing group for which information is to be retrieved @@ -1269,17 +1269,17 @@ CONTAINS ! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure ! nlinks - Number of links in group ! max_corder - Current maximum creation order value for group -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it +! mounted - Whether group has a file mounted on it ! ! Programmer: M. S. Breitenfeld -! February 18, 2008 +! February 18, 2008 ! -! Modifications: +! Modifications: ! - Added 'mounted' paramater ! M.S. Breitenfeld ! July 16, 2008 @@ -1303,7 +1303,7 @@ CONTAINS LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it INTEGER :: mounted_c - INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: group_name_len ! length of group name ! MS FORTRAN needs explicit interface for C functions called here. @@ -1320,7 +1320,7 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: group_name INTEGER(HID_T), INTENT(IN) :: lapl_id_default INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: nlinks INTEGER, INTENT(OUT) :: max_corder INTEGER(SIZE_T) :: group_name_len @@ -1330,7 +1330,7 @@ CONTAINS END INTERFACE group_name_len = LEN(group_name) - + lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id @@ -1338,13 +1338,13 @@ CONTAINS storage_type, nlinks, max_corder, mounted_c) IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN + IF(mounted_c.EQ.0) THEN mounted = .FALSE. - ELSE + ELSE mounted = .TRUE. ENDIF ENDIF - + END SUBROUTINE h5gget_info_by_name_f END MODULE H5G diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c index e8b54f0..5f11fde 100644 --- a/fortran/src/H5If.c +++ b/fortran/src/H5If.c @@ -214,7 +214,7 @@ done: /*---------------------------------------------------------------------------- * Name: h5iis_valid_c - * Purpose: Calls H5Iis_valid + * Purpose: Calls H5Iis_valid * Inputs: obj_id - object identifier * Outputs: 0 = false, 1 = true * Returns: 0 on success, -1 on failure @@ -227,7 +227,7 @@ nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid) { int ret_value; htri_t c_ret_value; - + /* * Call H5Iis_valid */ diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90 index 83587ce..a082d5a 100644 --- a/fortran/src/H5Iff.f90 +++ b/fortran/src/H5Iff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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 contains FORTRAN90 interfaces for H5I functions @@ -19,17 +19,17 @@ MODULE H5I USE H5GLOBAL - + CONTAINS !---------------------------------------------------------------------- -! Name: h5iget_type_f +! Name: h5iget_type_f ! -! Purpose: Retrieves the type of an object. +! Purpose: Retrieves the type of an object. ! -! Inputs: obj_id - object identifier -! Outputs: -! type - type of the object, possible values: +! Inputs: obj_id - object identifier +! Outputs: +! type - type of the object, possible values: ! H5I_FILE_F ! H5I_GROUP_F ! H5I_DATATYPE_F @@ -37,25 +37,25 @@ ! H5I_DATASET_F ! H5I_ATTR_F ! H5I_BADID_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 5, 2001 +! port). March 5, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5iget_type_f(obj_id, type, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id !Object identifier - INTEGER, INTENT(OUT) :: type !type of an object. + INTEGER(HID_T), INTENT(IN) :: obj_id !Object identifier + INTEGER, INTENT(OUT) :: type !type of an object. !possible values are: !H5I_FILE_F !H5I_GROUP_F @@ -75,7 +75,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_TYPE_C':: h5iget_type_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: type END FUNCTION h5iget_type_c END INTERFACE @@ -83,35 +83,35 @@ END SUBROUTINE h5iget_type_f !---------------------------------------------------------------------- -! Name: h5iget_name_f +! Name: h5iget_name_f ! -! Purpose: Gets a name of an object specified by its idetifier. +! Purpose: Gets a name of an object specified by its idetifier. ! -! Inputs: +! Inputs: ! obj_id - attribute identifier ! buf_size - size of a buffer to read name in -! Outputs: +! Outputs: ! buf - buffer to read name in, name will be truncated if ! buffer is not big enough ! name_size - name size -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal ! March 12, 2003 ! -! Modifications: +! Modifications: ! !---------------------------------------------------------------------- SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size INTEGER, INTENT(OUT) :: hdferr ! Error code: @@ -142,25 +142,25 @@ ! ! Purpose: Increments the reference count of an ID ! -! Inputs: obj_id - object identifier -! Outputs: +! Inputs: obj_id - object identifier +! Outputs: ! ref_count - Current reference count of the ID -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Quincey Koziol -! December 9, 2003 +! December 9, 2003 ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id !Object identifier + INTEGER(HID_T), INTENT(IN) :: obj_id !Object identifier INTEGER, INTENT(OUT) :: ref_count !Current reference count of ID INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -173,7 +173,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IINC_REF_C':: h5iinc_ref_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: ref_count END FUNCTION h5iinc_ref_c END INTERFACE @@ -185,25 +185,25 @@ ! ! Purpose: Decrements the reference count of an ID ! -! Inputs: obj_id - object identifier -! Outputs: +! Inputs: obj_id - object identifier +! Outputs: ! ref_count - Current reference count of the ID -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Quincey Koziol -! December 9, 2003 +! December 9, 2003 ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id !Object identifier + INTEGER(HID_T), INTENT(IN) :: obj_id !Object identifier INTEGER, INTENT(OUT) :: ref_count !Current reference count of ID INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -216,7 +216,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IDEC_REF_C':: h5idec_ref_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: ref_count END FUNCTION h5idec_ref_c END INTERFACE @@ -228,25 +228,25 @@ ! ! Purpose: Retrieves the reference count of an ID ! -! Inputs: obj_id - object identifier -! Outputs: +! Inputs: obj_id - object identifier +! Outputs: ! ref_count - Current reference count of the ID -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Quincey Koziol -! December 9, 2003 +! December 9, 2003 ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id !Object identifier + INTEGER(HID_T), INTENT(IN) :: obj_id !Object identifier INTEGER, INTENT(OUT) :: ref_count !Current reference count of ID INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -259,7 +259,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_REF_C':: h5iget_ref_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: ref_count END FUNCTION h5iget_ref_c END INTERFACE @@ -271,12 +271,12 @@ ! ! Purpose: Obtains file identifier from the object identifier ! -! Inputs: obj_id - object identifier -! Outputs: +! Inputs: obj_id - object identifier +! Outputs: ! file_id - file identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! @@ -285,11 +285,11 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -299,8 +299,8 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_FILE_ID_C':: h5iget_file_id_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(HID_T), INTENT(OUT) :: file_id + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: file_id END FUNCTION h5iget_file_id_c END INTERFACE hdferr = h5iget_file_id_c(obj_id, file_id) @@ -311,20 +311,20 @@ ! ! Purpose: Check if an ID is valid without producing an error message ! -! Inputs: id - identifier -! Outputs: +! Inputs: id - identifier +! Outputs: ! valid - status of id as a valid identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Programmer: M. Scot Breitenfeld ! April 13, 2009 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5iis_valid_f(id, valid, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER(HID_T), INTENT(IN) :: id ! Identifier LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: c_valid ! 0 = .false, 1 = .true. @@ -335,7 +335,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER(HID_T), INTENT(IN) :: id ! Identifier INTEGER :: c_valid END FUNCTION h5iis_valid_c END INTERFACE @@ -344,7 +344,7 @@ valid = .FALSE. ! Default IF(c_valid.EQ.1) valid = .TRUE. - + END SUBROUTINE h5iis_valid_f diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90 index e38dade..8d30c20 100644 --- a/fortran/src/H5Lff.f90 +++ b/fortran/src/H5Lff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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 contains Fortran90 interfaces for H5L functions. @@ -23,7 +23,7 @@ MODULE H5L CONTAINS !---------------------------------------------------------------------- -! Name: h5lcopy_f +! Name: h5lcopy_f ! ! Purpose: Copies a link from one location to another. ! @@ -34,11 +34,11 @@ CONTAINS ! dest_name - Name to be assigned to the NEW copy ! loc_id - Identifier of the file or group containing the object ! name - Name of the link to delete -! -! Outputs: +! +! Outputs: ! hdferr - error code: ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lcpl_id - Link creation property list identifier ! lapl_id - Link access property list identifier @@ -48,7 +48,7 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, & lcpl_id, lapl_id) @@ -58,17 +58,17 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy - INTEGER, INTENT(OUT) :: hdferr ! Error code: + INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier - + INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: src_namelen INTEGER(SIZE_T) :: dest_namelen - + ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -84,10 +84,10 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: src_name INTEGER(HID_T), INTENT(IN) :: dest_loc_id CHARACTER(LEN=*), INTENT(IN) :: dest_name - + INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default - + INTEGER(SIZE_T) :: src_namelen INTEGER(SIZE_T) :: dest_namelen END FUNCTION h5lcopy_c @@ -107,18 +107,18 @@ CONTAINS END SUBROUTINE h5lcopy_f !---------------------------------------------------------------------- -! Name: h5ldelete_f +! Name: h5ldelete_f ! ! Purpose: Removes a link from a group. ! -! Inputs: +! Inputs: ! loc_id - Identifier of the file or group containing the object ! name - Name of the link to delete -! -! Outputs: -! hdferr: - error code +! +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lapl_id - Link access property list identifier ! @@ -127,18 +127,18 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group containing the object CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the link to delete - INTEGER, INTENT(OUT) :: hdferr ! Error code: + INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: namelen - + ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -163,10 +163,10 @@ CONTAINS hdferr = h5ldelete_c(loc_id, name, namelen, lapl_id_default) - END SUBROUTINE h5ldelete_f + END SUBROUTINE h5ldelete_f !---------------------------------------------------------------------- -! Name: H5Lcreate_soft_f +! Name: H5Lcreate_soft_f ! ! Purpose: Creates a soft link to an object. ! @@ -174,11 +174,11 @@ CONTAINS ! target_path - Path to the target object, which is not required to exist. ! link_loc_id - The file or group identifier for the new link. ! link_name - The name of the new link. -! -! Outputs: -! hdferr: - error code +! +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lcpl_id - Link creation property list identifier. ! lapl_id - Link access property list identifier. @@ -188,20 +188,20 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: target_path ! Path to the target object, which is not required to exist. INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - INTEGER, INTENT(OUT) :: hdferr ! Error code: + INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: target_path_len INTEGER(SIZE_T) :: link_name_len @@ -243,7 +243,7 @@ CONTAINS END SUBROUTINE h5lcreate_soft_f !---------------------------------------------------------------------- -! Name: H5Lcreate_hard_f +! Name: H5Lcreate_hard_f ! ! Purpose: Creates a hard link to an object. ! @@ -253,11 +253,11 @@ CONTAINS ! obj_name - Name of the target object, which must already exist. ! link_loc_id - The file or group identifier for the new link. ! link_name - The name of the new link. -! -! Outputs: -! hdferr: - error code +! +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lcpl_id - Link creation property list identifier. ! lapl_id - Link access property list identifier. @@ -267,7 +267,7 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) IMPLICIT NONE @@ -276,23 +276,23 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - INTEGER, INTENT(OUT) :: hdferr ! Error code: + INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. - INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: obj_namelen + + INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: link_namelen ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) @@ -303,13 +303,13 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: obj_name INTEGER(HID_T), INTENT(IN) :: link_loc_id CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: link_namelen INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default END FUNCTION h5lcreate_hard_c END INTERFACE - obj_namelen = LEN(obj_name) + obj_namelen = LEN(obj_name) link_namelen = LEN(link_name) lcpl_id_default = H5P_DEFAULT_F @@ -323,22 +323,22 @@ CONTAINS END SUBROUTINE h5lcreate_hard_f !---------------------------------------------------------------------- -! Name: H5Lcreate_external_f +! Name: H5Lcreate_external_f ! ! Purpose: Creates a soft link to an object in a different file. ! ! Inputs: ! -! file_name - Name of the file containing the target object. Neither the file nor the target object is +! file_name - Name of the file containing the target object. Neither the file nor the target object is ! required to exist. May be the file the link is being created in. ! obj_name - Path within the target file to the target object. ! link_loc_id - The file or group identifier for the new link. ! link_name - The name of the new link. -! -! Outputs: -! hdferr: - error code +! +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lcpl_id - Link creation property list identifier. ! lapl_id - Link access property list identifier. @@ -348,35 +348,35 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither - ! the file nor the target object is required to exist. + CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither + ! the file nor the target object is required to exist. ! May be the file the link is being created in. CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - INTEGER, INTENT(OUT) :: hdferr ! Error code: + INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. - INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default - + INTEGER(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: link_namelen ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) @@ -387,15 +387,15 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: obj_name INTEGER(HID_T), INTENT(IN) :: link_loc_id CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: file_namelen + INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: link_namelen INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default END FUNCTION h5lcreate_external_c END INTERFACE - file_namelen = LEN(file_name) - obj_namelen = LEN(obj_name) + file_namelen = LEN(file_name) + obj_namelen = LEN(obj_name) link_namelen = LEN(link_name) lcpl_id_default = H5P_DEFAULT_F @@ -409,10 +409,10 @@ CONTAINS END SUBROUTINE h5lcreate_external_f !---------------------------------------------------------------------- -! Name: h5ldelete_by_idx_f +! Name: h5ldelete_by_idx_f ! ! Purpose: Removes the nth link in a group. -! Inputs: +! Inputs: ! loc_id - File or group identifier specifying location of subject group ! group_name - Name of subject group ! index_field - Type of index; Possible values are: @@ -421,7 +421,7 @@ CONTAINS ! H5_INDEX_NAME_F - Index on names ! H5_INDEX_CRT_ORDER_F - Index on creation order ! H5_INDEX_N_F - Number of indices defined -! +! ! order - Order within field or index; Possible values are: ! ! H5_ITER_UNKNOWN_F - Unknown order @@ -432,22 +432,22 @@ CONTAINS ! ! n - Link for which to retrieve information ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lapl_id - Link access property list ! ! Programmer: M.S. Breitenfeld ! February 29, 2008 ! -! Modifications: N/A +! Modifications: N/A ! !---------------------------------------------------------------------- SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location, + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location, ! from which attribute is to be removed INTEGER, INTENT(IN) :: index_field ! Type of index; Possible values are: ! H5_INDEX_UNKNOWN_F - Unknown index type @@ -460,14 +460,14 @@ CONTAINS ! H5_ITER_DEC_F - Decreasing order ! H5_ITER_NATIVE_F - No particular order, whatever is fastest ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index + INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: group_namelen - + ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -481,7 +481,7 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: group_name INTEGER, INTENT(IN) :: index_field INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HSIZE_T), INTENT(IN) :: n INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: group_namelen END FUNCTION h5ldelete_by_idx_c @@ -489,31 +489,31 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - + group_namelen = LEN(group_name) hdferr = h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) - + END SUBROUTINE h5ldelete_by_idx_f !---------------------------------------------------------------------- -! Name: H5Lexists_f +! Name: H5Lexists_f ! ! Purpose: Check if a link with a particular name exists in a group. -! +! ! Inputs: ! loc_id - Identifier of the file or group to query. ! name - Link name to check ! ! Outputs: ! link_exists - link exists status (.TRUE.,.FALSE.) -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! lapl_id - Link access property list identifier. +! lapl_id - Link access property list identifier. ! ! Programmer: M. S. Breitenfeld -! February 29, 2008 +! February 29, 2008 ! ! Modifications: N/A ! @@ -525,7 +525,7 @@ CONTAINS LOGICAL, INTENT(OUT) :: link_exists ! .TRUE. if exists, .FALSE. otherwise INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. INTEGER :: link_exists_c INTEGER(HID_T) :: lapl_id_default @@ -545,7 +545,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: namelen INTEGER, INTENT(OUT) :: link_exists_c INTEGER(HID_T) :: lapl_id_default - + END FUNCTION h5lexists_c END INTERFACE @@ -557,7 +557,7 @@ CONTAINS hdferr = h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) link_exists = .FALSE. - IF(link_exists_c.GT.0) link_exists = .TRUE. + IF(link_exists_c.GT.0) link_exists = .TRUE. END SUBROUTINE h5lexists_f @@ -566,13 +566,13 @@ CONTAINS ! ! Purpose: Returns information about a link. ! -! Inputs: +! Inputs: ! link_loc_id - File or group identifier. -! link_name - Name of the link for which information is being sought +! link_name - Name of the link for which information is being sought ! ! Outputs: NOTE: In C these are contained in the structure H5L_info_t ! -! cset - indicates the character set used for link’s name. +! cset - indicates the character set used for link’s name. ! corder - specifies the link’s creation order position. !f_corder_valid - indicates whether the value in corder is valid. ! link_type - specifies the link class: @@ -581,20 +581,20 @@ CONTAINS ! H5L_TYPE_EXTERNAL_F - External link ! H5L_TYPE_ERROR_F - Error ! address - If the link is a hard link, address specifies the file address that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - error code +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! the length of the name of the pointed-to object with a null terminator. +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! lapl_id - Link access property list +! lapl_id - Link access property list ! ! Programmer: M. S. Breitenfeld -! February 29, 2008 +! February 29, 2008 ! -! Modifications: +! Modifications: ! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F +! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F ! to ! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F ! MSB January 8, 2010. @@ -608,9 +608,9 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought - + ! Outputs: NOTE: In C these are contained in the structure H5L_info_t - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the link’s name. + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the link’s name. INTEGER, INTENT(OUT) :: corder ! Specifies the link’s creation order position. LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid. INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: @@ -619,8 +619,8 @@ CONTAINS ! H5L_TYPE_EXTERNAL_F - External link ! H5L_TYPE_ERROR _F - Error INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list @@ -642,7 +642,7 @@ CONTAINS !DEC$ATTRIBUTES reference :: link_name INTEGER(HID_T), INTENT(IN) :: link_loc_id CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER, INTENT(OUT) :: cset + INTEGER, INTENT(OUT) :: cset INTEGER, INTENT(OUT) :: corder INTEGER, INTENT(OUT) :: link_type INTEGER(HADDR_T), INTENT(OUT) :: address @@ -662,7 +662,7 @@ CONTAINS cset, corder, corder_valid, link_type, & address, val_size, & lapl_id_default) - + f_corder_valid =.FALSE. IF(corder_valid .EQ. 1) f_corder_valid =.TRUE. @@ -672,7 +672,7 @@ CONTAINS ! Name: h5lget_info_by_idx_f ! ! Purpose: Retrieves metadata for a link in a group, according to the order within a field or index. -! +! ! Inputs: ! loc_id - File or group identifier specifying location of subject group ! group_name - Name of subject group @@ -682,23 +682,23 @@ CONTAINS ! ! Outputs: NOTE: In C these are defined as a structure: H5L_info_t ! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name ! address - If the link is a hard link, address specifies the file address that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - error code +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! the length of the name of the pointed-to object with a null terminator. +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! lapl_id - Link access property list +! lapl_id - Link access property list ! ! Programmer: M.S. Breitenfeld -! February 29, 2008 +! February 29, 2008 ! -! Modifications: +! Modifications: ! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F +! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F ! to ! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F ! MSB January 8, 2010. @@ -707,7 +707,7 @@ CONTAINS SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order ! H5_INDEX_UNKNOWN_F - Unknown index type @@ -725,12 +725,12 @@ CONTAINS ! H5L_TYPE_SOFT_F - Soft link ! H5L_TYPE_EXTERNAL_F - External link ! H5L_TYPE_ERROR _F - Error - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list @@ -755,7 +755,7 @@ CONTAINS INTEGER, INTENT(IN) :: order INTEGER(HSIZE_T), INTENT(IN) :: n INTEGER, INTENT(OUT) :: link_type - INTEGER :: corder_valid + INTEGER :: corder_valid INTEGER, INTENT(OUT) :: corder INTEGER, INTENT(OUT) :: cset INTEGER(HADDR_T), INTENT(OUT) :: address @@ -778,24 +778,24 @@ CONTAINS END SUBROUTINE h5lget_info_by_idx_f !---------------------------------------------------------------------- -! Name: h5lis_registered_f +! Name: h5lis_registered_f ! ! Purpose: Determines whether a class of user-defined links is registered. -! +! ! Inputs: ! link_cls_id - User-defined link class identifier ! ! Outputs: ! registered - .TRUE. - if the link class has been registered ! .FALSE. - if it is unregistered -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! None +! None ! ! Programmer: M.S. Breitenfeld -! February 29, 2008 +! February 29, 2008 ! ! Modifications: N/A ! @@ -827,30 +827,30 @@ CONTAINS ELSE IF(hdferr.EQ.0)THEN registered = .FALSE. ENDIF - + END SUBROUTINE h5lis_registered_f !---------------------------------------------------------------------- ! Name: h5lmove_f ! ! Purpose: Renames a link within an HDF5 file. -! +! ! Inputs: ! src_loc_id - Original file or group identifier. ! src_name - Original link name. ! dest_loc_id - Destination file or group identifier. ! dest_name - NEW link name. ! -! Outputs: -! hdferr - Error code +! Outputs: +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lcpl_id - Link creation property list identifier to be associated WITH the NEW link. ! lapl_id - Link access property list identifier to be associated WITH the NEW link. ! ! Programmer: M.S. Breitenfeld -! March 3, 2008 +! March 3, 2008 ! ! Modifications: N/A ! @@ -863,37 +863,37 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name. INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier ! to be associated WITH the NEW link. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier ! to be associated WITH the NEW link. INTEGER(SIZE_T) :: src_namelen INTEGER(SIZE_T) :: dest_namelen - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + ! ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & - dest_name, dest_namelen, lcpl_id_default, lapl_id_default) + dest_name, dest_namelen, lcpl_id_default, lapl_id_default) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LMOVE_C'::h5lmove_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: src_name, dest_name - INTEGER(HID_T), INTENT(IN) :: src_loc_id + INTEGER(HID_T), INTENT(IN) :: src_loc_id CHARACTER(LEN=*), INTENT(IN) :: src_name INTEGER(SIZE_T) :: src_namelen INTEGER(HID_T), INTENT(IN) :: dest_loc_id CHARACTER(LEN=*), INTENT(IN) :: dest_name INTEGER(SIZE_T) :: dest_namelen - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default END FUNCTION h5lmove_c END INTERFACE @@ -916,16 +916,16 @@ CONTAINS ! ! Purpose: Retrieves name of the nth link in a group, according to the order within a specified field or index. ! -! Inputs: +! Inputs: ! loc_id - File or group identifier specifying location of subject group ! group_name - Name of subject group ! index_field - Index or field which determines the order ! order - Order within field or index ! n - Link for which to retrieve information ! -! Outputs: +! Outputs: ! name - Buffer in which link value is returned -! hdferr - error code +! hdferr - error code ! Success: 0 ! Failure: -1 ! @@ -934,7 +934,7 @@ CONTAINS ! size - Maximum number of characters of link value to be returned. ! ! Programmer: M. S. Breitenfeld -! March 10, 2008 +! March 10, 2008 ! ! Modifications: N/A ! @@ -942,7 +942,7 @@ CONTAINS SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, & name, hdferr, size, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order ! H5_INDEX_UNKNOWN_F - Unknown index type @@ -958,12 +958,12 @@ CONTAINS CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure - + INTEGER(SIZE_T) :: group_namelen INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the link - INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: size_default ! MS FORTRAN needs explicit interface for C functions called here. @@ -976,7 +976,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_NAME_BY_IDX_C'::h5lget_name_by_idx_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: group_name, name - INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: group_name INTEGER(SIZE_T) :: group_namelen INTEGER, INTENT(IN) :: index_field @@ -1013,7 +1013,7 @@ CONTAINS !!$! an index. For symbolic links, this is the path to which the !!$! link points, including the null terminator. For user-defined !!$! links, it is the link buffer. -!!$! Inputs: +!!$! Inputs: !!$! loc_id - File or group identifier specifying location of subject group !!$! group_name - Name of subject group !!$! index_field - Index or field which determines the order @@ -1023,17 +1023,17 @@ CONTAINS !!$! !!$! Outputs: NOTE: In C these are defined as a structure: H5L_info_t !!$! corder_valid - indicates whether the creation order data is valid for this attribute -!!$! corder - is a positive integer containing the creation order of the attribute -!!$! cset - indicates the character set used for the attribute’s name -!!$! data_size - indicates the size, in the number of characters, of the attribute -!!$! hdferr - error code +!!$! corder - is a positive integer containing the creation order of the attribute +!!$! cset - indicates the character set used for the attribute’s name +!!$! data_size - indicates the size, in the number of characters, of the attribute +!!$! hdferr - error code !!$! Success: 0 -!!$! Failure: -1 +!!$! Failure: -1 !!$! Optional parameters: !!$! lapl_id - List access property list identifier. !!$! !!$! Programmer: M. S. Breitenfeld -!!$! March 3, 2008 +!!$! March 3, 2008 !!$! !!$! Modifications: N/A !!$! @@ -1041,7 +1041,7 @@ CONTAINS !!$ SUBROUTINE h5lget_val_by_idx_f(loc_id, group_name, index_field, order, n, & !!$ f_corder_valid, corder, cset, data_size, hdferr, lapl_id) !!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group !!$ CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group !!$ INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order !!$ ! H5_INDEX_UNKNOWN_F - Unknown index type @@ -1054,7 +1054,7 @@ CONTAINS !!$ ! H5_ITER_DEC_F - Decreasing order !!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest !!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index -!!$ LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute +!!$ LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute !!$ INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute !!$ INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name !!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute @@ -1074,7 +1074,7 @@ CONTAINS !!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) !!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_BY_IDX_C'::h5lget_val_by_idx_c !!$ !DEC$ENDIF -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id !!$ CHARACTER(LEN=*), INTENT(IN) :: group_name !!$ INTEGER(SIZE_T) :: group_namelen !!$ INTEGER, INTENT(IN) :: index_field @@ -1098,7 +1098,7 @@ CONTAINS !!$ !!$ f_corder_valid =.FALSE. !!$ IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. -!!$ +!!$ !!$ END SUBROUTINE h5lget_val_by_idx_f @@ -1108,21 +1108,21 @@ CONTAINS ! ! Purpose: Returns the value of a symbolic link. ! -! Inputs: +! Inputs: ! link_loc_id - File or group identifier. ! link_name - Link whose value is to be returned. ! size - Maximum number of characters of link value to be returned. ! -! Outputs: +! Outputs: ! linkval_buff - The buffer to hold the returned link value. -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lapl_id - List access property list identifier. ! ! Programmer: M. S. Breitenfeld -! March 3, 2008 +! March 3, 2008 ! ! Modifications: N/A ! @@ -1134,18 +1134,18 @@ CONTAINS !!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. !!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. !!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ +!!$ !!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. !!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: !!$ ! 0 on success and -1 on failure !!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ +!!$ !!$ INTEGER :: link_namelen !!$ INTEGER(HID_T) :: lapl_id_default !!$ INTEGER :: corder_valid !!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default !!$ !!$! MS FORTRAN needs explicit interface for C functions called here. !!$! @@ -1158,9 +1158,9 @@ CONTAINS !!$ !DEC$ENDIF !!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. !!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. -!!$ INTEGER :: link_namelen +!!$ INTEGER :: link_namelen !!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ +!!$ !!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. !!$ !!$ INTEGER :: link_namelen @@ -1182,30 +1182,30 @@ CONTAINS !---------------------------------------------------------------------- -! Name: H5Lregistered_f +! Name: H5Lregistered_f ! ! Purpose: Registers user-defined link class or changes behavior of existing class. -! +! ! Inputs: NOTE: In C the following represents struct H5L_class_t: -! version - Version number of this struct -! class_id - Link class identifier -! comment - Comment for debugging -! create_func - Callback during link creation -! move_func - Callback after moving link -! copy_func - Callback after copying link -! trav_func - The main traversal function -! del_func - Callback for link deletion -! query_func - Callback for queries +! version - Version number of this struct +! class_id - Link class identifier +! comment - Comment for debugging +! create_func - Callback during link creation +! move_func - Callback after moving link +! copy_func - Callback after copying link +! trav_func - The main traversal function +! del_func - Callback for link deletion +! query_func - Callback for queries ! ! Outputs: -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! None +! None ! ! Programmer: M.S. Breitenfeld -! February 29, 2008 +! February 29, 2008 ! ! Modifications: N/A ! @@ -1213,25 +1213,25 @@ CONTAINS !!$ SUBROUTINE H5Lregistered_f(version, class_id, comment, create_func, & !!$ move_func, copy_func, trav_func, del_func, query_func, hdferr) !!$ IMPLICIT NONE -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion +!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct +!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier +!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging +!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation +!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link +!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link +!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function +!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion !!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries !!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: !!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len +!!$ INTEGER :: comment_len !!$ INTEGER :: create_func_len -!!$ INTEGER :: move_func_len -!!$ INTEGER :: copy_func_len -!!$ INTEGER :: trav_func_len +!!$ INTEGER :: move_func_len +!!$ INTEGER :: copy_func_len +!!$ INTEGER :: trav_func_len !!$ INTEGER :: del_func_len !!$ INTEGER :: query_func_len -!!$ +!!$ !!$! !!$! MS FORTRAN needs explicit interface for C functions called here. !!$! @@ -1247,33 +1247,33 @@ CONTAINS !!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) !!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LREGISTERED_C'::H5Lregistered_c !!$ !DEC$ENDIF -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion +!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct +!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier +!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging +!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation +!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link +!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link +!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function +!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion !!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries !!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: !!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len +!!$ INTEGER :: comment_len !!$ INTEGER :: create_func_len -!!$ INTEGER :: move_func_len -!!$ INTEGER :: copy_func_len -!!$ INTEGER :: trav_func_len +!!$ INTEGER :: move_func_len +!!$ INTEGER :: copy_func_len +!!$ INTEGER :: trav_func_len !!$ INTEGER :: del_func_len !!$ INTEGER :: query_func_len -!!$ +!!$ !!$ END FUNCTION H5Lregistered_c !!$ END INTERFACE !!$ !!$ comment_len = LEN(comment) !!$ create_func_len = LEN(create_func) !!$ move_func_len = LEN(move_func) -!!$ copy_func_len = LEN(copy_func) -!!$ trav_func_len = LEN(trav_func) +!!$ copy_func_len = LEN(copy_func) +!!$ trav_func_len = LEN(trav_func) !!$ del_func_len = LEN(del_func) !!$ query_func_len = LEN(query_func) !!$ @@ -1284,7 +1284,7 @@ CONTAINS !!$ trav_func, trav_func_len, & !!$ del_func, del_func_len, & !!$ query_func, query_func_len) -!!$ +!!$ !!$ END SUBROUTINE H5Lregistered_f END MODULE H5L diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90 index 0328fbc..af965e2 100644 --- a/fortran/src/H5Off.f90 +++ b/fortran/src/H5Off.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,30 +11,30 @@ ! 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 contains Fortran90 interfaces for H5O functions. ! MODULE H5O - + USE H5GLOBAL - + CONTAINS !---------------------------------------------------------------------- -! Name: h5olink_f +! Name: h5olink_f ! ! Purpose: Creates a hard link to an object in an HDF5 file. ! -! Inputs: +! Inputs: ! object_id - Object to be linked. ! new_loc_id - File or group identifier specifying location at which object is to be linked. ! new_link_name - Name of link to be created, relative to new_loc_id. -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lcpl_id - Link creation property list identifier. ! lapl_id - Link access property list identifier. @@ -42,20 +42,20 @@ CONTAINS ! Programmer: M.S. Breitenfeld ! April 21, 2008 ! -! Modifications: N/A +! Modifications: N/A ! !---------------------------------------------------------------------- SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id ! Object to be linked - INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier specifying + INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier specifying ! location at which object is to be linked. CHARACTER(LEN=*), INTENT(IN) :: new_link_name ! Name of link to be created, relative to new_loc_id. - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! Success: 0 - ! Failure: -1 - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + ! Failure: -1 + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link creation property list identifier. INTEGER(HID_T) :: lapl_id_default INTEGER(HID_T) :: lcpl_id_default @@ -92,25 +92,25 @@ CONTAINS END SUBROUTINE h5olink_f !---------------------------------------------------------------------- -! Name: h5oopen_f +! Name: h5oopen_f ! ! Purpose: Opens an object in an HDF5 file by location identifier and path name.O ! -! Inputs: +! Inputs: ! loc_id - File or group identifier ! name - Path to the object, relative to loc_id. -! Outputs: -! obj_id - Object identifier for the opened object -! hdferr: - error code +! Outputs: +! obj_id - Object identifier for the opened object +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lapl_id - Access property list identifier for the link pointing to the object ! ! Programmer: M.S. Breitenfeld ! April 18, 2008 ! -! Modifications: N/A +! Modifications: N/A ! !---------------------------------------------------------------------- @@ -119,9 +119,9 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Path to the object, relative to loc_id INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier for the opened object - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! Success: 0 - ! Failure: -1 + ! Failure: -1 INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Attribute access property list INTEGER(HID_T) :: lapl_id_default @@ -154,23 +154,23 @@ CONTAINS END SUBROUTINE h5oopen_f !---------------------------------------------------------------------- -! Name: h5oopen_by_addr_f +! Name: h5oopen_by_addr_f ! -! Purpose: Opens an object using its address within an HDF5 file. +! Purpose: Opens an object using its address within an HDF5 file. ! -! Inputs: +! Inputs: ! loc_id - File or group identifier ! addr - Object’s address in the file -! Outputs: -! obj_id - Object identifier for the opened object -! hdferr: - error code +! Outputs: +! obj_id - Object identifier for the opened object +! hdferr: - error code ! Success: 0 ! Failure: -1 ! ! Programmer: M. Scot Breitenfeld ! September 14, 2009 ! -! Modifications: N/A +! Modifications: N/A ! !---------------------------------------------------------------------- @@ -179,7 +179,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier INTEGER(HADDR_T), INTENT(IN) :: addr ! Object’s address in the file INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier for the opened object - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! Success: 0 ! Failure: -1 INTERFACE diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index ee2145d..96b771d 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -1717,7 +1717,7 @@ nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, *offset = (int_f)c_offset; *bytes = (hsize_t_f)size; /* Note: if the size of the fortran buffer is larger then the returned string - * from the function then we need to give HD5packFstring the fortran buffer size so + * from the function then we need to give HD5packFstring the fortran buffer size so * that it fills the remaining unused characters with blanks. MSB */ HD5packFstring(c_name, _fcdtocp(name), c_namelen+1); @@ -3996,7 +3996,7 @@ nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_l done: if(c_expression) - HDfree(c_expression); + HDfree(c_expression); return ret_value; } @@ -4464,10 +4464,10 @@ nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) * Purpose: Calls H5Pset_chunk_cache * * Inputs: dapl_id - Link creation property list identifier - * rdcc_nslots - + * rdcc_nslots - * rdcc_nbytes - * rdcc_w0 - - * + * * Returns: 0 on success, -1 on failure * Programmer: M.S. Breitenfeld * April 13, 2009 @@ -4495,10 +4495,10 @@ nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nb * * Inputs: dapl_id - Link creation property list identifier * Outputs: - * rdcc_nslots - + * rdcc_nslots - * rdcc_nbytes - * rdcc_w0 - - * + * * Returns: 0 on success, -1 on failure * Programmer: M.S. Breitenfeld * April 13, 2009 diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90 index 48d36ab..50aad81 100644 --- a/fortran/src/H5Pff.f90 +++ b/fortran/src/H5Pff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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 contains Fortran90 interfaces for H5P functions. @@ -25,7 +25,7 @@ MODULE PROCEDURE h5pset_fill_value_real MODULE PROCEDURE h5pset_fill_value_char END INTERFACE - + INTERFACE h5pget_fill_value_f MODULE PROCEDURE h5pget_fill_value_integer MODULE PROCEDURE h5pget_fill_value_real @@ -37,7 +37,7 @@ MODULE PROCEDURE h5pset_real MODULE PROCEDURE h5pset_char END INTERFACE - + INTERFACE h5pget_f MODULE PROCEDURE h5pget_integer MODULE PROCEDURE h5pget_real @@ -49,28 +49,28 @@ MODULE PROCEDURE h5pregister_real MODULE PROCEDURE h5pregister_char END INTERFACE - + INTERFACE h5pinsert_f MODULE PROCEDURE h5pinsert_integer MODULE PROCEDURE h5pinsert_real MODULE PROCEDURE h5pinsert_char END INTERFACE - + INTERFACE h5pset_fapl_multi_f MODULE PROCEDURE h5pset_fapl_multi_l MODULE PROCEDURE h5pset_fapl_multi_s - END INTERFACE + END INTERFACE + - CONTAINS !---------------------------------------------------------------------- -! Name: h5pcreate_f +! Name: h5pcreate_f ! -! Purpose: Creates a new property as an instance of a property +! Purpose: Creates a new property as an instance of a property ! list class. ! -! Inputs: +! Inputs: ! class - type of the property class to be created. ! Possible values are: ! H5P_FILE_CREATE_F @@ -78,34 +78,34 @@ ! H5P_DATASET_CREATE_F ! H5P_DATASET_XFER_F ! H5P_FILE_MOUNT_F -! Outputs: +! Outputs: ! prp_id - property list identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pcreate_f(class, prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! The type of the property list + INTEGER(HID_T), INTENT(IN) :: class ! The type of the property list ! to be created. Possible values - ! are: + ! are: ! H5P_FILE_CREATE_F ! H5P_FILE_ACCESS_F ! H5P_DATASET_CREATE_F ! H5P_DATASET_XFER_F ! H5P_FILE_MOUNT_F - INTEGER(HID_T), INTENT(OUT) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pcreate_c @@ -122,46 +122,46 @@ END FUNCTION h5pcreate_c END INTERFACE - hdferr = h5pcreate_c(class, prp_id) + hdferr = h5pcreate_c(class, prp_id) END SUBROUTINE h5pcreate_f !---------------------------------------------------------------------- -! Name: h5pset_preserve_f +! Name: h5pset_preserve_f ! -! Purpose: Sets the dataset transfer property list status to +! Purpose: Sets the dataset transfer property list status to ! TRUE or FALSE for initializing compound datatype ! members during write/read operations. ! -! Inputs: +! Inputs: ! prp_id - property list identifier ! flag - status flag -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL -! June 4, 2003 +! port). March 14, 2001 +! Datatype of the flag parameter is changed from +! INTEGER to LOGICAL +! June 4, 2003 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier LOGICAL, INTENT(IN) :: flag ! TRUE/FALSE flag to set the dataset ! transfer property for partila writing/reading - ! compound datatype + ! compound datatype INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: flag_c @@ -180,43 +180,43 @@ END INTERFACE flag_c = 0 if(flag) flag_c = 1 - hdferr = h5pset_preserve_c(prp_id, flag_c) + hdferr = h5pset_preserve_c(prp_id, flag_c) END SUBROUTINE h5pset_preserve_f !---------------------------------------------------------------------- -! Name: h5pget_preserve_f +! Name: h5pget_preserve_f ! ! Purpose: Checks status of the dataset transfer property list. ! -! Inputs: +! Inputs: ! prp_id - property list identifier -! Outputs: +! Outputs: ! flag - status flag -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL -! June 4, 2003 +! port). March 14, 2001 +! Datatype of the flag parameter is changed from +! INTEGER to LOGICAL +! June 4, 2003 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag. Shows status of the dataset's ! transfer property for partial writing/reading - ! compound datatype + ! compound datatype INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: flag_c @@ -234,19 +234,19 @@ END FUNCTION h5pget_preserve_c END INTERFACE - hdferr = h5pget_preserve_c(prp_id, flag_c) + hdferr = h5pget_preserve_c(prp_id, flag_c) flag = .FALSE. if(flag_c .eq. 1) flag = .TRUE. END SUBROUTINE h5pget_preserve_f !---------------------------------------------------------------------- -! Name: h5pget_class_f +! Name: h5pget_class_f ! ! Purpose: Returns the property list class for a property list. ! -! Inputs: +! Inputs: ! prp_id - property list identifier -! Outputs: +! Outputs: ! classtype - property list class ! Possible values are: ! H5P_ROOT_F @@ -255,32 +255,32 @@ ! H5PE_DATASET_CREATE_F ! H5P_DATASET_XFER_F ! H5P_FILE_MOUNT_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: classtype ! The type of the property list + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: classtype ! The type of the property list ! to be created. Possible values - ! are: + ! are: ! H5P_ROOT_F ! H5P_FILE_CREATE_F ! H5P_FILE_ACCESS_F - ! H5PE_DATASET_CREATE_F + ! H5PE_DATASET_CREATE_F ! H5P_DATASET_XFER_F ! H5P_FILE_MOUNT_F INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -295,46 +295,46 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: classtype + INTEGER, INTENT(OUT) :: classtype END FUNCTION h5pget_class_c END INTERFACE - hdferr = h5pget_class_c(prp_id, classtype) + hdferr = h5pget_class_c(prp_id, classtype) END SUBROUTINE h5pget_class_f !---------------------------------------------------------------------- -! Name: h5pcopy_f +! Name: h5pcopy_f ! -! Purpose: Copies an existing property list to create a new +! Purpose: Copies an existing property list to create a new ! property list ! -! Inputs: +! Inputs: ! prp_id - property list identifier -! Outputs: +! Outputs: ! new_prp_id - new property list identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: new_prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list - ! copy + ! copy INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pcopy_c @@ -355,34 +355,34 @@ END SUBROUTINE h5pcopy_f !---------------------------------------------------------------------- -! Name: h5pclose_f +! Name: h5pclose_f ! -! Purpose: Terminates access to a property list. +! Purpose: Terminates access to a property list. ! -! Inputs: -! prp_id - identifier of the property list to -! terminate access to. -! Outputs: -! hdferr: - error code +! Inputs: +! prp_id - identifier of the property list to +! terminate access to. +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pclose_f(prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pclose_c @@ -394,7 +394,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_C'::h5pclose_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id END FUNCTION h5pclose_c END INTERFACE @@ -402,38 +402,38 @@ END SUBROUTINE h5pclose_f !---------------------------------------------------------------------- -! Name: h5pset_chunk_f +! Name: h5pset_chunk_f ! -! Purpose: Sets the size of the chunks used to store -! a chunked layout dataset. +! Purpose: Sets the size of the chunks used to store +! a chunked layout dataset. ! -! Inputs: +! Inputs: ! prp_id - datatset creation property list identifier ! ndims - number of dimensions for each chunk ! dims - array with dimension sizes for each chunk -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims ! Array containing sizes of ! chunk dimensions INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -457,39 +457,39 @@ END SUBROUTINE h5pset_chunk_f !---------------------------------------------------------------------- -! Name: h5pget_chunk_f +! Name: h5pget_chunk_f ! -! Purpose: Retrieves the size of chunks for the raw data of a +! Purpose: Retrieves the size of chunks for the raw data of a ! chunked layout dataset ! -! Inputs: +! Inputs: ! prp_id - property list identifier ! ndims - size of dims array -! Outputs: +! Outputs: ! dims - array with dimension sizes for each chunk -! hdferr: - error code +! hdferr: - error code ! Success: number of chunk dimensions -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions to ! to return - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims ! Array containing sizes of ! chunk dimensions INTEGER, INTENT(OUT) :: hdferr ! Error code; number of @@ -515,35 +515,35 @@ END SUBROUTINE h5pget_chunk_f !---------------------------------------------------------------------- -! Name: h5pset_deflate_f +! Name: h5pset_deflate_f ! -! Purpose: Sets compression method and compression level. +! Purpose: Sets compression method and compression level. ! -! Inputs: +! Inputs: ! prp_id - property list identifier ! level - compression level -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: level ! Compression level + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: level ! Compression level INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pset_deflate_c @@ -564,41 +564,41 @@ END SUBROUTINE h5pset_deflate_f !---------------------------------------------------------------------- -! Name: h5pset(get)fill_value_f +! Name: h5pset(get)fill_value_f ! ! Purpose: Sets(gets) fill value for a dataset creation property list ! -! Inputs: +! Inputs: ! prp_id - dataset creation property list identifier ! type_id - datatype identifier for fill value ! fillvalue - fill value -! Outputs: +! Outputs: ! ( type_id - datatype identifier for fill value ) ! ( fillvalue - fill value ) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! ! Comment: h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. !---------------------------------------------------------------------- SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, & hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype ! (in memory) INTEGER, INTENT(IN) :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -625,10 +625,10 @@ SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, & hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of ! of fillvalue datatype - ! (in memory) + ! (in memory) INTEGER, INTENT(IN) :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -654,9 +654,9 @@ SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, & hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype ! (in memory) REAL, INTENT(IN) :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -683,10 +683,10 @@ SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, & hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of ! of fillvalue datatype - ! (in memory) + ! (in memory) REAL, INTENT(IN) :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -713,9 +713,9 @@ SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, & hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype ! (in memory) CHARACTER, INTENT(IN) :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -729,7 +729,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUEC_C'::h5pset_fill_valuec_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: fillvalue + !DEC$ATTRIBUTES reference :: fillvalue INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER, INTENT(IN) :: fillvalue @@ -742,10 +742,10 @@ SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, & hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of ! of fillvalue datatype - ! (in memory) + ! (in memory) CHARACTER, INTENT(IN) :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -758,7 +758,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUEC_C'::h5pget_fill_valuec_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: fillvalue + !DEC$ATTRIBUTES reference :: fillvalue INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER :: fillvalue @@ -769,43 +769,43 @@ END SUBROUTINE h5pget_fill_value_char !---------------------------------------------------------------------- -! Name: h5pget_version_f +! Name: h5pget_version_f ! -! Purpose: Retrieves the version information of various objects +! Purpose: Retrieves the version information of various objects ! for a file creation property list ! -! Inputs: +! Inputs: ! prp_id - file createion property list identifier -! Outputs: +! Outputs: ! boot - super block version number ! freelist - global freelist version number ! stab - symbol table version number ! shhdr - shared object header version number -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_version_f(prp_id, boot, freelist, & stab, shhdr, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, DIMENSION(:), INTENT(OUT) :: boot !array to put boot !block version number INTEGER, DIMENSION(:), INTENT(OUT) :: freelist !array to put global !freelist version number - + INTEGER, DIMENSION(:), INTENT(OUT) :: stab !array to put symbol !table version number INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr !array to put shared @@ -822,8 +822,8 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_VERSION_C'::h5pget_version_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(:), INTENT(OUT) :: boot - INTEGER, DIMENSION(:), INTENT(OUT) :: freelist + INTEGER, DIMENSION(:), INTENT(OUT) :: boot + INTEGER, DIMENSION(:), INTENT(OUT) :: freelist INTEGER, DIMENSION(:), INTENT(OUT) :: stab INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr END FUNCTION h5pget_version_c @@ -833,34 +833,34 @@ END SUBROUTINE h5pget_version_f !---------------------------------------------------------------------- -! Name: h5pset_userblock_f +! Name: h5pset_userblock_f ! ! Purpose: Sets user block size ! -! Inputs: +! Inputs: ! prp_id - file creation property list to modify ! size - size of the user-block in bytes -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size !Size of the user-block in bytes + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size !Size of the user-block in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pset_userblock_c @@ -881,36 +881,36 @@ END SUBROUTINE h5pset_userblock_f !---------------------------------------------------------------------- -! Name: h5pget_userblock_f +! Name: h5pget_userblock_f ! ! Purpose: Gets user block size. ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier -! Outputs: +! Outputs: ! block_size - size of the user block in bytes -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: block_size !Size of the - !user-block in bytes + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: block_size !Size of the + !user-block in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pget_userblock_c @@ -930,39 +930,39 @@ END SUBROUTINE h5pget_userblock_f !---------------------------------------------------------------------- -! Name: h5pset_sizes_f +! Name: h5pset_sizes_f ! -! Purpose: Sets the byte size of the offsets and lengths used +! Purpose: Sets the byte size of the offsets and lengths used ! to address objects in an HDF5 file. ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier -! sizeof_addr - size of an object offset in bytes +! sizeof_addr - size of an object offset in bytes ! sizeof_size - size of an object length in bytes -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr !Size of an object - !offset in bytes - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size !Size of an object - !length in bytes + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr !Size of an object + !offset in bytes + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size !Size of an object + !length in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pset_sizes_c @@ -974,7 +974,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIZES_C'::h5pset_sizes_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr INTEGER(SIZE_T), INTENT(IN) :: sizeof_size END FUNCTION h5pset_sizes_c @@ -984,41 +984,41 @@ END SUBROUTINE h5pset_sizes_f !---------------------------------------------------------------------- -! Name: h5pget_sizes_f +! Name: h5pget_sizes_f ! -! Purpose: Retrieves the size of the offsets and lengths used +! Purpose: Retrieves the size of the offsets and lengths used ! in an HDF5 file ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier -! Outputs: -! sizeof_addr - size of an object offset in bytes +! Outputs: +! sizeof_addr - size of an object offset in bytes ! sizeof_size - size of an object length in bytes -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr !Size of an object - !offset in bytes + !offset in bytes INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size !Size of an object - !length in bytes - + !length in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pget_sizes_c @@ -1030,7 +1030,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZES_C'::h5pget_sizes_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size END FUNCTION h5pget_sizes_c @@ -1040,38 +1040,38 @@ END SUBROUTINE h5pget_sizes_f !---------------------------------------------------------------------- -! Name: h5pset_sym_k_f +! Name: h5pset_sym_k_f ! -! Purpose: Sets the size of parameters used to control the +! Purpose: Sets the size of parameters used to control the ! symbol table nodes ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier ! ik - symbol table tree rank ! lk - symbol table node size -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! Symbol table tree rank - INTEGER, INTENT(IN) :: lk ! Symbol table node size - + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ik ! Symbol table tree rank + INTEGER, INTENT(IN) :: lk ! Symbol table node size + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pset_sym_k_c @@ -1083,7 +1083,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SYM_K_C'::h5pset_sym_k_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: ik INTEGER, INTENT(IN) :: lk END FUNCTION h5pset_sym_k_c @@ -1093,36 +1093,36 @@ END SUBROUTINE h5pset_sym_k_f !---------------------------------------------------------------------- -! Name: h5pget_sym_k_f +! Name: h5pget_sym_k_f ! ! Purpose: Retrieves the size of the symbol table B-tree 1/2 rank -! and the symbol table leaf node 1/2 size. +! and the symbol table leaf node 1/2 size. ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier -! Outputs: +! Outputs: ! ik - symbol table tree 1/2 rank ! lk - symbol table node 1/2 size -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: ik !Symbol table tree rank INTEGER, INTENT(OUT) :: lk !Symbol table node size INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1136,7 +1136,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SYM_K_C'::h5pget_sym_k_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: ik INTEGER, INTENT(OUT) :: lk END FUNCTION h5pget_sym_k_c @@ -1146,36 +1146,36 @@ END SUBROUTINE h5pget_sym_k_f !---------------------------------------------------------------------- -! Name: h5pset_istore_k_f +! Name: h5pset_istore_k_f ! -! Purpose: Sets the size of the parameter used to control the +! Purpose: Sets the size of the parameter used to control the ! B-trees for indexing chunked datasets ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier ! ik - 1/2 rank of chunked storage B-tree -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: ik ! 1/2 rank of chunked storage B-tree - + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pset_istore_k_c @@ -1196,34 +1196,34 @@ END SUBROUTINE h5pset_istore_k_f !---------------------------------------------------------------------- -! Name: h5pget_istore_k_f +! Name: h5pget_istore_k_f ! -! Purpose: Queries the 1/2 rank of an indexed storage B-tree. +! Purpose: Queries the 1/2 rank of an indexed storage B-tree. ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier -! Outputs: +! Outputs: ! ik - 1/2 rank of chunked storage B-tree -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: ik !1/2 rank of chunked storage B-tree INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1245,34 +1245,34 @@ END SUBROUTINE h5pget_istore_k_f !---------------------------------------------------------------------- -! Name: h5pget_driver_f +! Name: h5pget_driver_f ! -! Purpose: Returns low-lever driver identifier. +! Purpose: Returns low-lever driver identifier. ! -! Inputs: -! prp_id - file access or data transfer property -! list identifier. -! Outputs: +! Inputs: +! prp_id - file access or data transfer property +! list identifier. +! Outputs: ! driver - low-level driver identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(OUT) :: driver !low-level file driver identifier INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1294,32 +1294,32 @@ END SUBROUTINE h5pget_driver_f !---------------------------------------------------------------------- -! Name: h5pset_fapl_stdio_f +! Name: h5pset_fapl_stdio_f ! -! Purpose: Sets the standard I/O driver. +! Purpose: Sets the standard I/O driver. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pset_fapl_stdio_c @@ -1339,34 +1339,34 @@ END SUBROUTINE h5pset_fapl_stdio_f !---------------------------------------------------------------------- -! Name: h5pget_stdio_f +! Name: h5pget_stdio_f ! ! Purpose: NOT AVAILABLE ! -! Inputs: -! Outputs: -! hdferr: - error code +! Inputs: +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- ! SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr) ! ! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: io ! value indicates that the file - !access property list is set to +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER, INTENT(OUT) :: io ! value indicates that the file + !access property list is set to !the stdio driver ! INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pget_stdio_c @@ -1374,32 +1374,32 @@ ! END SUBROUTINE h5pget_stdio_f !---------------------------------------------------------------------- -! Name: h5pset_fapl_sec2_f +! Name: h5pset_fapl_sec2_f ! -! Purpose: Sets the sec2 driver. +! Purpose: Sets the sec2 driver. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pset_fapl_sec2_c @@ -1411,7 +1411,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SEC2_C'::h5pset_fapl_sec2_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier END FUNCTION h5pset_fapl_sec2_c END INTERFACE @@ -1419,32 +1419,32 @@ END SUBROUTINE h5pset_fapl_sec2_f !---------------------------------------------------------------------- -! Name: h5pget_sec2_f +! Name: h5pget_sec2_f ! ! Purpose: NOT AVAILABLE ! -! Inputs: -! Outputs: -! hdferr: - error code +! Inputs: +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- -! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) +! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) ! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file !driver uses the functions declared !in the unistd.h file ! INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1453,34 +1453,34 @@ ! END SUBROUTINE h5pget_sec2_f !---------------------------------------------------------------------- -! Name: h5pset_alignment_f +! Name: h5pset_alignment_f ! -! Purpose: Sets alignment properties of a file access property list. +! Purpose: Sets alignment properties of a file access property list. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! threshold - threshold value +! threshold - threshold value ! alignment - alignment value -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_alignment_f(prp_id, threshold, alignment, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1504,35 +1504,35 @@ END SUBROUTINE h5pset_alignment_f !---------------------------------------------------------------------- -! Name: h5pget_alignment_f +! Name: h5pget_alignment_f ! -! Purpose: Retrieves the current settings for alignment -! properties from a file access property list. +! Purpose: Retrieves the current settings for alignment +! properties from a file access property list. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! Outputs: -! threshold - threshold value +! Outputs: +! threshold - threshold value ! alignment - alignment value -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_alignment_f(prp_id, threshold, alignment, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1556,41 +1556,41 @@ END SUBROUTINE h5pget_alignment_f !---------------------------------------------------------------------- -! Name: h5pset_fapl_core_f +! Name: h5pset_fapl_core_f ! -! Purpose: Modifies the file access property list to use the -! H5FD_CORE driver. +! Purpose: Modifies the file access property list to use the +! H5FD_CORE driver. ! ! Inputs: prp_id - file access property list identifier -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! Outputs: -! hdferr: - error code +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes. LOGICAL, INTENT(IN) :: backing_store ! flag to indicate that - ! entire file contents are flushed to a file + ! entire file contents are flushed to a file ! with the same name as this core file. INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: backing_store_flag + INTEGER :: backing_store_flag ! INTEGER, EXTERNAL :: h5pset_fapl_core_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -1601,9 +1601,9 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_CORE_C'::h5pset_fapl_core_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: increment - INTEGER :: backing_store_flag + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: increment + INTEGER :: backing_store_flag END FUNCTION h5pset_fapl_core_c END INTERFACE backing_store_flag = 0 @@ -1612,41 +1612,41 @@ END SUBROUTINE h5pset_fapl_core_f !---------------------------------------------------------------------- -! Name: h5pget_fapl_core_f +! Name: h5pget_fapl_core_f ! -! Purpose: Queries core file driver properties. +! Purpose: Queries core file driver properties. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! Outputs: -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! hdferr: - error code +! Outputs: +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes. LOGICAL, INTENT(OUT) :: backing_store ! flag to indicate that - ! entire file contents are flushed to a file + ! entire file contents are flushed to a file ! with the same name as this core file. INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: backing_store_flag + INTEGER :: backing_store_flag ! INTEGER, EXTERNAL :: h5pget_fapl_core_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -1657,9 +1657,9 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_CORE_C'::h5pget_fapl_core_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: increment - INTEGER :: backing_store_flag + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: increment + INTEGER :: backing_store_flag END FUNCTION h5pget_fapl_core_c END INTERFACE @@ -1669,39 +1669,39 @@ END SUBROUTINE h5pget_fapl_core_f !---------------------------------------------------------------------- -! Name: h5pset_fapl_family_f +! Name: h5pset_fapl_family_f ! -! Purpose: Sets the file access property list to use the family driver. +! Purpose: Sets the file access property list to use the family driver. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property ! list to be used for each family member -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes, !of each family member - INTEGER(HID_T), INTENT(IN) :: memb_plist !Identifier of the file - !access property list for + INTEGER(HID_T), INTENT(IN) :: memb_plist !Identifier of the file + !access property list for !each member of the family INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1724,40 +1724,40 @@ END SUBROUTINE h5pset_fapl_family_f !---------------------------------------------------------------------- -! Name: h5pget_fapl_family_f +! Name: h5pget_fapl_family_f ! -! Purpose: Returns file access property list information. +! Purpose: Returns file access property list information. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! Outputs: -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property +! Outputs: +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property ! list to be used for each family member -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes, !of each family member - INTEGER(HID_T), INTENT(OUT) :: memb_plist !Identifier of the file - !access property list for + INTEGER(HID_T), INTENT(OUT) :: memb_plist !Identifier of the file + !access property list for !each member of the family INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1780,45 +1780,45 @@ END SUBROUTINE h5pget_fapl_family_f !---------------------------------------------------------------------- -! Name: h5pset_cache_f +! Name: h5pset_cache_f ! -! Purpose: Sets the meta data cache and raw data chunk +! Purpose: Sets the meta data cache and raw data chunk ! cache parameters ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes ! rdcc_w0 - preemption policy (0 or 1) -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: mdc_nelmts !Number of elements (objects) ! in the meta data cache INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts !Number of elements (objects) ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes !Total size of the raw data - !chunk cache, in bytes + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes !Total size of the raw data + !chunk cache, in bytes REAL, INTENT(IN) :: rdcc_w0 !Preemption policy INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1832,8 +1832,8 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CACHE_C'::h5pset_cache_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts + INTEGER, INTENT(IN) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes REAL, INTENT(IN) :: rdcc_w0 END FUNCTION h5pset_cache_c @@ -1843,48 +1843,48 @@ END SUBROUTINE h5pset_cache_f !---------------------------------------------------------------------- -! Name: h5pget_cache_f +! Name: h5pget_cache_f ! -! Purpose: Queries the meta data cache and raw data chunk cache -! parameters. +! Purpose: Queries the meta data cache and raw data chunk cache +! parameters. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! Outputs: -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! Outputs: +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes ! rdcc_w0 - preemption policy (0 or 1) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! ! Bug fix: type of the rdcc_nelmts parameter should be INTEGER -! instead of INTEGER(SIZE_T) October 10, 2003 +! instead of INTEGER(SIZE_T) October 10, 2003 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: mdc_nelmts !Number of elements (objects) ! in the meta data cache INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts !Number of elements (objects) ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes !Total size of the raw data - !chunk cache, in bytes + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes !Total size of the raw data + !chunk cache, in bytes REAL, INTENT(OUT) :: rdcc_w0 !Preemption policy INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1899,8 +1899,8 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CACHE_C'::h5pget_cache_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts + INTEGER, INTENT(OUT) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes REAL, INTENT(OUT) :: rdcc_w0 END FUNCTION h5pget_cache_c @@ -1910,44 +1910,44 @@ END SUBROUTINE h5pget_cache_f !---------------------------------------------------------------------- -! Name: h5pset_fapl_split_f +! Name: h5pset_fapl_split_f ! -! Purpose: Emulates the old split file driver. +! Purpose: Emulates the old split file driver. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! meta_ext - name of the extension for the metafile +! meta_ext - name of the extension for the metafile ! filename -! meta_plist - identifier of the meta file access property +! meta_plist - identifier of the meta file access property ! list ! raw_ext - name extension for the raw file filename ! raw_plist - identifier of the raw file access property list -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: meta_ext !Name of the extension for !the metafile filename INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file ! access property list CHARACTER(LEN=*), INTENT(IN) :: raw_ext !Name extension for the raw file filename - INTEGER(HID_T), INTENT(IN) :: raw_plist !Identifier of the raw file + INTEGER(HID_T), INTENT(IN) :: raw_plist !Identifier of the raw file !access property list INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: meta_len, raw_len @@ -1964,10 +1964,10 @@ !DEC$ATTRIBUTES reference :: meta_ext !DEC$ATTRIBUTES reference :: raw_ext INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: meta_ext + CHARACTER(LEN=*), INTENT(IN) :: meta_ext INTEGER(HID_T), INTENT(IN) :: meta_plist CHARACTER(LEN=*), INTENT(IN) :: raw_ext - INTEGER(HID_T), INTENT(IN) :: raw_plist + INTEGER(HID_T), INTENT(IN) :: raw_plist INTEGER :: meta_len, raw_len END FUNCTION h5pset_fapl_split_c END INTERFACE @@ -1978,36 +1978,36 @@ END SUBROUTINE h5pset_fapl_split_f !---------------------------------------------------------------------- -! Name: h5pget_split_f +! Name: h5pget_split_f ! ! Purpose: NOT AVAILABLE ! -! Inputs: -! Outputs: -! hdferr: - error code +! Inputs: +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- ! SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,& -! raw_ext, raw_plist, hdferr) +! raw_ext, raw_plist, hdferr) ! IMPLICIT NONE ! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier ! INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta ! file extension to be copied to the ! meta_ext buffer - + ! CHARACTER(LEN=*), INTENT(OUT) :: meta_ext !Name of the extension for !the metafile filename ! INTEGER(HID_T), INTENT(OUT) :: meta_plist ! Identifier of the meta file @@ -2016,7 +2016,7 @@ ! file extension to be copied to the ! raw_ext buffer ! CHARACTER(LEN=*), INTENT(OUT) :: raw_ext !Name extension for the raw file filename -! INTEGER(HID_T), INTENT(OUT) :: raw_plist !Identifier of the raw file +! INTEGER(HID_T), INTENT(OUT) :: raw_plist !Identifier of the raw file !access property list ! INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2026,35 +2026,35 @@ ! END SUBROUTINE h5pget_split_f !---------------------------------------------------------------------- -! Name: h5pset_gc_references_f +! Name: h5pset_gc_references_f ! -! Purpose: Sets garbage collecting references flag. +! Purpose: Sets garbage collecting references flag. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! gc_reference - flag for stting garbage collection on +! gc_reference - flag for stting garbage collection on ! and off (1 or 0) -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: gc_reference !the flag for garbage collecting ! references for the file INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2077,34 +2077,34 @@ END SUBROUTINE h5pset_gc_references_f !---------------------------------------------------------------------- -! Name: h5pget_gc_references_f +! Name: h5pget_gc_references_f ! -! Purpose: Returns garbage collecting references setting. +! Purpose: Returns garbage collecting references setting. ! -! Inputs: +! Inputs: ! prp_id - file access property list identifier -! Outputs: -! gc_reference - flag for stting garbage collection on +! Outputs: +! gc_reference - flag for stting garbage collection on ! and off (1 or 0) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_gc_references_f (prp_id, gc_reference, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: gc_reference !the flag for garbage collecting ! references for the file INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2127,38 +2127,38 @@ END SUBROUTINE h5pget_gc_references_f !---------------------------------------------------------------------- -! Name: h5pset_layout_f +! Name: h5pset_layout_f ! -! Purpose: Sets the type of storage used store the raw data -! for a dataset. +! Purpose: Sets the type of storage used store the raw data +! for a dataset. ! -! Inputs: +! Inputs: ! prp_id - data creation property list identifier ! layout - type of storage layout for raw data ! possible values are: ! H5D_COMPACT_F ! H5D_CONTIGUOUS_F ! H5D_CHUNKED_F -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: layout !Type of storage layout for raw data !possible values are: !H5D_COMPACT_F @@ -2184,37 +2184,37 @@ END SUBROUTINE h5pset_layout_f !---------------------------------------------------------------------- -! Name: h5pget_layout_f +! Name: h5pget_layout_f ! -! Purpose: Returns the layout of the raw data for a dataset. +! Purpose: Returns the layout of the raw data for a dataset. ! -! Inputs: +! Inputs: ! prp_id - data creation property list identifier -! Outputs: +! Outputs: ! layout - type of storage layout for raw data ! possible values are: ! H5D_COMPACT_F ! H5D_CONTIGUOUS_F ! H5D_CHUNKED_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: layout !Type of storage layout for raw data !possible values are: !H5D_COMPACT_F(0) @@ -2240,36 +2240,36 @@ END SUBROUTINE h5pget_layout_f !---------------------------------------------------------------------- -! Name: h5pset_filter_f +! Name: h5pset_filter_f ! -! Purpose: Adds a filter to the filter pipeline. +! Purpose: Adds a filter to the filter pipeline. ! -! Inputs: -! prp_id - data creation or transfer property list +! Inputs: +! prp_id - data creation or transfer property list ! identifier -! filter - filter to be added to the pipeline +! filter - filter to be added to the pipeline ! flags - bit vector specifying certain general ! properties of the filter ! cd_nelmts - number of elements in cd_values ! cd_values - auxiliary data for the filter -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! February, 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: filter !Filter to be added to the pipeline. INTEGER, INTENT(IN) :: flags !Bit vector specifying certain general !properties of the filter. @@ -2287,11 +2287,11 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILTER_C'::h5pset_filter_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values END FUNCTION h5pset_filter_c END INTERFACE @@ -2299,34 +2299,34 @@ END SUBROUTINE h5pset_filter_f !---------------------------------------------------------------------- -! Name: h5pget_nfilters_f +! Name: h5pget_nfilters_f ! -! Purpose: Returns the number of filters in the pipeline. +! Purpose: Returns the number of filters in the pipeline. ! -! Inputs: -! prp_id - data creation or transfer property list +! Inputs: +! prp_id - data creation or transfer property list ! identifier -! Outputs: +! Outputs: ! nfilters - number of filters in the pipeline -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: nfilters !the number of filters in the pipeline INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2348,43 +2348,43 @@ END SUBROUTINE h5pget_nfilters_f !---------------------------------------------------------------------- -! Name: h5pget_filter_f +! Name: h5pget_filter_f ! ! Purpose: Returns information about a filter in a pipeline ! -! Inputs: -! prp_id - data creation or transfer property list +! Inputs: +! prp_id - data creation or transfer property list ! identifier -! Outputs: +! Outputs: ! identifier -! filter - filter to be added to the pipeline +! filter - filter to be added to the pipeline ! flags - bit vector specifying certain general ! properties of the filter ! cd_nelmts - number of elements in cd_values ! cd_values - auxiliary data for the filter ! namelen - number of characters in the name buffer ! name - buffer to retrieve filter name -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: filter_number !Sequence number within the filter - !pipeline of the filter for which + !pipeline of the filter for which !information is sought INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values !Auxiliary data for the filter. INTEGER, INTENT(OUT) :: flags !Bit vector specifying certain general @@ -2392,7 +2392,7 @@ INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts !Number of elements in cd_values. INTEGER(SIZE_T), INTENT(IN) :: namelen !Anticipated number of characters in name. CHARACTER(LEN=*), INTENT(OUT) :: name !Name of the filter - INTEGER, INTENT(OUT) :: filter_id ! filter identification number + INTEGER, INTENT(OUT) :: filter_id ! filter identification number INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2409,9 +2409,9 @@ !DEC$ENDIF !DEC$ATTRIBUTES reference :: name INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_number + INTEGER, INTENT(IN) :: filter_number INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags + INTEGER, INTENT(OUT) :: flags INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts INTEGER(SIZE_T), INTENT(IN) :: namelen CHARACTER(LEN=*), INTENT(OUT) :: name @@ -2419,47 +2419,47 @@ END FUNCTION h5pget_filter_c END INTERFACE - hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & cd_values, namelen, name, filter_id ) END SUBROUTINE h5pget_filter_f !---------------------------------------------------------------------- -! Name: h5pset_external_f +! Name: h5pset_external_f ! -! Purpose: Adds an external file to the list of external files. +! Purpose: Adds an external file to the list of external files. ! -! Inputs: +! Inputs: ! prp_id - dataset creation property list identifier ! name - name of external file -! offset - offset in bytes from the beginning of the +! offset - offset in bytes from the beginning of the ! file to the location in the file ! where the data starts -! bytes - size of the external file data. -! Outputs: -! hdferr: - error code +! bytes - size of the external file data. +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_external_f(prp_id, name, offset,bytes, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name !Name of an external file - INTEGER, INTENT(IN) :: offset !Offset, in bytes, from the beginning - !of the file to the location in the file + INTEGER, INTENT(IN) :: offset !Offset, in bytes, from the beginning + !of the file to the location in the file !where the data starts. - INTEGER(HSIZE_T), INTENT(IN) :: bytes ! Number of bytes reserved in the + INTEGER(HSIZE_T), INTENT(IN) :: bytes ! Number of bytes reserved in the !file for the data INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2488,35 +2488,35 @@ END SUBROUTINE h5pset_external_f !---------------------------------------------------------------------- -! Name: h5pget_external_count_f +! Name: h5pget_external_count_f ! -! Purpose: Returns the number of external files for a dataset. +! Purpose: Returns the number of external files for a dataset. ! -! Inputs: +! Inputs: ! prp_id - dataset creation property list identifier -! Outputs: -! count - number of external files for the +! Outputs: +! count - number of external files for the ! specified dataset -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: count !number of external files for the + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: count !number of external files for the !specified dataset INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pget_external_count_c @@ -2528,7 +2528,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_COUNT_C'::h5pget_external_count_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: count END FUNCTION h5pget_external_count_c END INTERFACE @@ -2537,35 +2537,35 @@ END SUBROUTINE h5pget_external_count_f !---------------------------------------------------------------------- -! Name: h5pget_external_f +! Name: h5pget_external_f ! -! Purpose: Returns information about an external file. +! Purpose: Returns information about an external file. ! -! Inputs: +! Inputs: ! prp_id - dataset creation property list identifier -! Outputs: -! idx - external file index +! Outputs: +! idx - external file index ! name_size - maximum size of name array -! name - name of the external file +! name - name of the external file ! name - name of external file -! offset - offset in bytes from the beginning of the +! offset - offset in bytes from the beginning of the ! file to the location in the file ! where the data starts ! bytes - size of the external file data -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- @@ -2573,12 +2573,12 @@ IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: idx !External file index. - INTEGER(SIZE_T), INTENT(IN) :: name_size !Maximum length of name array + INTEGER(SIZE_T), INTENT(IN) :: name_size !Maximum length of name array CHARACTER(LEN=*), INTENT(OUT) :: name !Name of an external file - INTEGER, INTENT(OUT) :: offset !Offset, in bytes, from the beginning - !of the file to the location in the file + INTEGER, INTENT(OUT) :: offset !Offset, in bytes, from the beginning + !of the file to the location in the file !where the data starts. - INTEGER(HSIZE_T), INTENT(OUT) :: bytes ! Number of bytes reserved in the + INTEGER(HSIZE_T), INTENT(OUT) :: bytes ! Number of bytes reserved in the !file for the data INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2593,7 +2593,7 @@ !DEC$ENDIF !DEC$ATTRIBUTES reference :: name INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: idx + INTEGER, INTENT(IN) :: idx INTEGER(SIZE_T), INTENT(IN) :: name_size CHARACTER(LEN=*), INTENT(OUT) :: name INTEGER, INTENT(OUT) :: offset @@ -2605,41 +2605,41 @@ END SUBROUTINE h5pget_external_f !---------------------------------------------------------------------- -! Name: h5pset_btree_ratios_f +! Name: h5pset_btree_ratios_f ! -! Purpose: Sets B-tree split ratios for a dataset transfer -! property list. +! Purpose: Sets B-tree split ratios for a dataset transfer +! property list. ! -! Inputs: -! prp_id - the dataset transfer property list -! identifier -! left - the B-tree split ratio for left-most nodes +! Inputs: +! prp_id - the dataset transfer property list +! identifier +! left - the B-tree split ratio for left-most nodes ! middle - the B-tree split ratio for all other nodes ! right - the B-tree split ratio for right-most nodes -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier REAL, INTENT(IN) :: left !The B-tree split ratio for left-most nodes. - REAL, INTENT(IN) :: middle !The B-tree split ratio for all other nodes - REAL, INTENT(IN) :: right !The B-tree split ratio for right-most - !nodes and lone nodes. + REAL, INTENT(IN) :: middle !The B-tree split ratio for all other nodes + REAL, INTENT(IN) :: right !The B-tree split ratio for right-most + !nodes and lone nodes. INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2663,40 +2663,40 @@ END SUBROUTINE h5pset_btree_ratios_f !---------------------------------------------------------------------- -! Name: h5pget_btree_ratios_f +! Name: h5pget_btree_ratios_f ! ! Purpose: Gets B-tree split ratios for a dataset transfer property list ! -! Inputs: -! prp_id - the dataset transfer property list -! identifier -! Outputs: -! left - the B-tree split ratio for left-most nodes +! Inputs: +! prp_id - the dataset transfer property list +! identifier +! Outputs: +! left - the B-tree split ratio for left-most nodes ! middle - the B-tree split ratio for all other nodes ! right - the B-tree split ratio for right-most nodes -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier REAL, INTENT(OUT) :: left !The B-tree split ratio for left-most nodes. - REAL, INTENT(OUT) :: middle !The B-tree split ratio for all other nodes - REAL, INTENT(OUT) :: right !The B-tree split ratio for right-most - !nodes and lone nodes. + REAL, INTENT(OUT) :: middle !The B-tree split ratio for all other nodes + REAL, INTENT(OUT) :: right !The B-tree split ratio for right-most + !nodes and lone nodes. INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2721,38 +2721,38 @@ END SUBROUTINE h5pget_btree_ratios_f !---------------------------------------------------------------------- -! Name: h5pget_fclose_degree_f +! Name: h5pget_fclose_degree_f ! ! Purpose: Returns the degree for the file close behavior. ! -! Inputs: +! Inputs: ! fapl_id - file access property list identifier -! Outputs: +! Outputs: ! degree - one of the following: ! Possible values are: ! H5F_CLOSE_DEFAULT_F ! H5F_CLOSE_WEAK_F ! H5F_CLOSE_SEMI_F ! H5F_CLOSE_STRONG_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! September 26, 2002 +! September 26, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier INTEGER, INTENT(OUT) :: degree ! Possible values - ! are: + ! are: ! H5F_CLOSE_DEFAULT_F ! H5F_CLOSE_WEAK_F ! H5F_CLOSE_SEMI_F @@ -2774,15 +2774,15 @@ END FUNCTION h5pget_fclose_degree_c END INTERFACE - hdferr = h5pget_fclose_degree_c(fapl_id, degree) + hdferr = h5pget_fclose_degree_c(fapl_id, degree) END SUBROUTINE h5pget_fclose_degree_f !---------------------------------------------------------------------- -! Name: h5pset_fclose_degree_f +! Name: h5pset_fclose_degree_f ! ! Purpose: Sets the degree for the file close behavior. ! -! Inputs: +! Inputs: ! fapl_id - file access property list identifier ! degree - one of the following: ! Possible values are: @@ -2790,26 +2790,26 @@ ! H5F_CLOSE_WEAK_F ! H5F_CLOSE_SEMI_F ! H5F_CLOSE_STRONG_F -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! September 26, 2002 +! September 26, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier INTEGER, INTENT(IN) :: degree ! Possible values - ! are: + ! are: ! H5F_CLOSE_DEFAULT_F ! H5F_CLOSE_WEAK_F ! H5F_CLOSE_SEMI_F @@ -2828,38 +2828,38 @@ END FUNCTION h5pset_fclose_degree_c END INTERFACE - hdferr = h5pset_fclose_degree_c(fapl_id, degree) + hdferr = h5pset_fclose_degree_c(fapl_id, degree) END SUBROUTINE h5pset_fclose_degree_f !---------------------------------------------------------------------- -! Name: h5pequal_f +! Name: h5pequal_f ! ! Purpose: Checks if two property lists are eqaul ! -! Inputs: +! Inputs: ! plist1_id - property list identifier ! plist2_id - property list identifier -! Outputs: +! Outputs: ! flag - flag, possible values ! .TRUE. or .FALSE. -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1, flag is set to .FALSE. +! Failure: -1, flag is set to .FALSE. ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! September 30, 2002 +! September 30, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier LOGICAL, INTENT(OUT) :: flag ! Flag INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: c_flag @@ -2877,38 +2877,38 @@ END INTERFACE flag = .FALSE. - hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) + hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) if (c_flag .GT. 0) flag = .TRUE. END SUBROUTINE h5pequal_f !---------------------------------------------------------------------- -! Name: h5pset_buffer_f +! Name: h5pset_buffer_f ! ! Purpose: Sets sixe for conversion buffer ! -! Inputs: +! Inputs: ! plist_id - data transfer property list identifier -! size - buffer size -! Outputs: -! hdferr: - error code +! size - buffer size +! Outputs: +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 2, 2002 +! October 2, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by ! the library. INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2923,37 +2923,37 @@ END FUNCTION h5pset_buffer_c END INTERFACE - hdferr = h5pset_buffer_c(plist_id, size) + hdferr = h5pset_buffer_c(plist_id, size) END SUBROUTINE h5pset_buffer_f !---------------------------------------------------------------------- -! Name: h5pget_buffer_f +! Name: h5pget_buffer_f ! ! Purpose: Gets size for conversion buffer ! -! Inputs: +! Inputs: ! plist_id - data transfer property list identifier -! Outputs: -! size - buffer size -! hdferr: - error code +! Outputs: +! size - buffer size +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 2, 2002 +! October 2, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by ! the library. INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2968,7 +2968,7 @@ END FUNCTION h5pget_buffer_c END INTERFACE - hdferr = h5pget_buffer_c(plist_id, size) + hdferr = h5pget_buffer_c(plist_id, size) END SUBROUTINE h5pget_buffer_f !---------------------------------------------------------------------- @@ -2976,34 +2976,34 @@ ! ! Purpose: Check if fill value is defined. ! -! Inputs: +! Inputs: ! plist_id - dataset creation property list identifier -! Outputs: +! Outputs: ! flag - fill value status flag ! Possible values are: ! H5D_FILL_VALUE_ERROR_F ! H5D_FILL_VALUE_UNDEFINED_F ! H5D_FILL_VALUE_DEFAULT_F ! H5D_FILL_VALUE_USER_DEFINED_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 4, 2002 +! October 4, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(OUT) :: flag - INTEGER, INTENT(OUT) :: hdferr + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) @@ -3016,7 +3016,7 @@ END FUNCTION h5pfill_value_defined_c END INTERFACE - hdferr = h5pfill_value_defined_c(plist_id, flag) + hdferr = h5pfill_value_defined_c(plist_id, flag) END SUBROUTINE h5pfill_value_defined_f !---------------------------------------------------------------------- @@ -3024,7 +3024,7 @@ ! ! Purpose: Set space allocation time for dataset during creation. ! -! Inputs: +! Inputs: ! plist_id - dataset creation property list identifier ! flag - allocation time flag ! Possible values are: @@ -3033,26 +3033,26 @@ ! H5D_ALLOC_TIME_EARLY_F ! H5D_ALLOC_TIME_LATE_F ! H5D_ALLOC_TIME_INCR_F -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 4, 2002 +! October 4, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: flag - INTEGER, INTENT(OUT) :: hdferr + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) @@ -3065,7 +3065,7 @@ END FUNCTION h5pset_alloc_time_c END INTERFACE - hdferr = h5pset_alloc_time_c(plist_id, flag) + hdferr = h5pset_alloc_time_c(plist_id, flag) END SUBROUTINE h5pset_alloc_time_f !---------------------------------------------------------------------- @@ -3073,9 +3073,9 @@ ! ! Purpose: Get space allocation time for dataset during creation. ! -! Inputs: +! Inputs: ! plist_id - dataset creation property list identifier -! Outputs: +! Outputs: ! flag - allocation time flag ! Possible values are: ! H5D_ALLOC_TIME_ERROR_F @@ -3083,25 +3083,25 @@ ! H5D_ALLOC_TIME_EARLY_F ! H5D_ALLOC_TIME_LATE_F ! H5D_ALLOC_TIME_INCR_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 4, 2002 +! October 4, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(OUT) :: flag - INTEGER, INTENT(OUT) :: hdferr + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) @@ -3114,7 +3114,7 @@ END FUNCTION h5pget_alloc_time_c END INTERFACE - hdferr = h5pget_alloc_time_c(plist_id, flag) + hdferr = h5pget_alloc_time_c(plist_id, flag) END SUBROUTINE h5pget_alloc_time_f !---------------------------------------------------------------------- @@ -3122,33 +3122,33 @@ ! ! Purpose: Set fill value writing time for dataset ! -! Inputs: +! Inputs: ! plist_id - dataset creation property list identifier ! flag - fill time flag ! Possible values are: ! H5D_FILL_TIME_ERROR_F ! H5D_FILL_TIME_ALLOC_F ! H5D_FILL_TIME_NEVER_F -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 4, 2002 +! October 4, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: flag - INTEGER, INTENT(OUT) :: hdferr + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) @@ -3161,7 +3161,7 @@ END FUNCTION h5pset_fill_time_c END INTERFACE - hdferr = h5pset_fill_time_c(plist_id, flag) + hdferr = h5pset_fill_time_c(plist_id, flag) END SUBROUTINE h5pset_fill_time_f !---------------------------------------------------------------------- @@ -3169,10 +3169,10 @@ ! ! Purpose: Get fill value writing time for dataset ! -! Inputs: +! Inputs: ! plist_id - dataset creation property list identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: @@ -3184,18 +3184,18 @@ ! NONE ! ! Programmer: Elena Pourmal -! October 4, 2002 +! October 4, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(OUT) :: flag - INTEGER, INTENT(OUT) :: hdferr + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) @@ -3208,36 +3208,36 @@ END FUNCTION h5pget_fill_time_c END INTERFACE - hdferr = h5pget_fill_time_c(plist_id, flag) + hdferr = h5pget_fill_time_c(plist_id, flag) END SUBROUTINE h5pget_fill_time_f !---------------------------------------------------------------------- -! Name: h5pset_meta_block_size_f +! Name: h5pset_meta_block_size_f ! -! Purpose: Sets the minimum size of metadata block allocations +! Purpose: Sets the minimum size of metadata block allocations ! -! Inputs: +! Inputs: ! plist_id - file access property list identifier ! size - metatdata block size -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE @@ -3251,36 +3251,36 @@ END FUNCTION h5pset_meta_block_size_c END INTERFACE - hdferr = h5pset_meta_block_size_c(plist_id, size) + hdferr = h5pset_meta_block_size_c(plist_id, size) END SUBROUTINE h5pset_meta_block_size_f !---------------------------------------------------------------------- -! Name: h5pget_meta_block_size_f +! Name: h5pget_meta_block_size_f ! -! Purpose: Gets the minimum size of metadata block allocations +! Purpose: Gets the minimum size of metadata block allocations ! -! Inputs: +! Inputs: ! plist_id - file access property list identifier -! Outputs: +! Outputs: ! size - metatdata block size -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE @@ -3294,36 +3294,36 @@ END FUNCTION h5pget_meta_block_size_c END INTERFACE - hdferr = h5pget_meta_block_size_c(plist_id, size) + hdferr = h5pget_meta_block_size_c(plist_id, size) END SUBROUTINE h5pget_meta_block_size_f !---------------------------------------------------------------------- -! Name: h5pset_sieve_buf_size_f +! Name: h5pset_sieve_buf_size_f ! ! Purpose: Sets the maximum size of the data sieve buffer ! -! Inputs: +! Inputs: ! plist_id - file access property list identifier ! size - sieve buffer size -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE @@ -3337,36 +3337,36 @@ END FUNCTION h5pset_sieve_buf_size_c END INTERFACE - hdferr = h5pset_sieve_buf_size_c(plist_id, size) + hdferr = h5pset_sieve_buf_size_c(plist_id, size) END SUBROUTINE h5pset_sieve_buf_size_f !---------------------------------------------------------------------- -! Name: h5pget_sieve_buf_size_f +! Name: h5pget_sieve_buf_size_f ! ! Purpose: Gets the maximum size of the data sieve buffer ! -! Inputs: +! Inputs: ! plist_id - file access property list identifier -! Outputs: +! Outputs: ! size - sieve buffer size -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE @@ -3380,35 +3380,35 @@ END FUNCTION h5pget_sieve_buf_size_c END INTERFACE - hdferr = h5pget_sieve_buf_size_c(plist_id, size) + hdferr = h5pget_sieve_buf_size_c(plist_id, size) END SUBROUTINE h5pget_sieve_buf_size_f !---------------------------------------------------------------------- -! Name: h5pset_small_data_block_size_f +! Name: h5pset_small_data_block_size_f ! ! Purpose: Sets the minimum size of "small" raw data block ! -! Inputs: +! Inputs: ! plist_id - file access property list identifier ! size - small raw data block size -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier INTEGER(HSIZE_T), INTENT(IN) :: size ! Small raw data block size INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3423,35 +3423,35 @@ END FUNCTION h5pset_small_data_block_size_c END INTERFACE - hdferr = h5pset_small_data_block_size_c(plist_id, size) + hdferr = h5pset_small_data_block_size_c(plist_id, size) END SUBROUTINE h5pset_small_data_block_size_f !---------------------------------------------------------------------- -! Name: h5pget_small_data_block_size_f +! Name: h5pget_small_data_block_size_f ! ! Purpose: Gets the minimum size of "small" raw data block ! -! Inputs: +! Inputs: ! plist_id - file access property list identifier -! Outputs: +! Outputs: ! size - small raw data block size -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier INTEGER(HSIZE_T), INTENT(OUT) :: size ! Small raw data block size INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3466,35 +3466,35 @@ END FUNCTION h5pget_small_data_block_size_c END INTERFACE - hdferr = h5pget_small_data_block_size_c(plist_id, size) + hdferr = h5pget_small_data_block_size_c(plist_id, size) END SUBROUTINE h5pget_small_data_block_size_f !---------------------------------------------------------------------- -! Name: h5pset_hyper_vector_size_f +! Name: h5pset_hyper_vector_size_f ! ! Purpose: Set the number of "I/O" vectors (vector size) ! -! Inputs: +! Inputs: ! plist_id - dataset transfer property list identifier ! size - vector size -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier INTEGER(SIZE_T), INTENT(IN) :: size ! Vector size INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3509,35 +3509,35 @@ END FUNCTION h5pset_hyper_vector_size_c END INTERFACE - hdferr = h5pset_hyper_vector_size_c(plist_id, size) + hdferr = h5pset_hyper_vector_size_c(plist_id, size) END SUBROUTINE h5pset_hyper_vector_size_f !---------------------------------------------------------------------- -! Name: h5pget_hyper_vector_size_f +! Name: h5pget_hyper_vector_size_f ! ! Purpose: Get the number of "I/O" vectors (vector size) ! -! Inputs: +! Inputs: ! plist_id - dataset transfer property list identifier -! Outputs: +! Outputs: ! size - vector size -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier INTEGER(SIZE_T), INTENT(OUT) :: size ! Vector size INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3552,36 +3552,36 @@ END FUNCTION h5pget_hyper_vector_size_c END INTERFACE - hdferr = h5pget_hyper_vector_size_c(plist_id, size) + hdferr = h5pget_hyper_vector_size_c(plist_id, size) END SUBROUTINE h5pget_hyper_vector_size_f !---------------------------------------------------------------------- -! Name: h5pset_integer +! Name: h5pset_integer ! ! Purpose: Sets a property list value ! -! Inputs: +! Inputs: ! prp_id - iproperty list identifier to modify ! name - name of property to modify ! value - value to set property to -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify INTEGER, INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3610,28 +3610,28 @@ ! ! Purpose: Sets a property list value ! -! Inputs: +! Inputs: ! prp_id - iproperty list identifier to modify ! name - name of property to modify ! value - value to set property to -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_real(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify REAL, INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3661,28 +3661,28 @@ ! ! Purpose: Sets a property list value ! -! Inputs: +! Inputs: ! prp_id - iproperty list identifier to modify ! name - name of property to modify ! value - value to set property to -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_char(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify CHARACTER(LEN=*), INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3711,32 +3711,32 @@ END SUBROUTINE h5pset_char !---------------------------------------------------------------------- -! Name: h5pget_integer +! Name: h5pget_integer ! ! Purpose: Gets a property list value ! -! Inputs: +! Inputs: ! prp_id - iproperty list identifier to modify ! name - name of property to modify -! Outputs: +! Outputs: ! value - value of property -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify INTEGER, INTENT(OUT) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3765,28 +3765,28 @@ ! ! Purpose: Gets a property list value ! -! Inputs: +! Inputs: ! prp_id - iproperty list identifier to modify ! name - name of property to modify -! Outputs: +! Outputs: ! value - value of property -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_real(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify REAL, INTENT(OUT) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3816,28 +3816,28 @@ ! ! Purpose: Gets a property list value ! -! Inputs: +! Inputs: ! prp_id - iproperty list identifier to modify ! name - name of property to modify -! Outputs: +! Outputs: ! value - value of property -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_char(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3866,32 +3866,32 @@ END SUBROUTINE h5pget_char !---------------------------------------------------------------------- -! Name: h5pexist_f +! Name: h5pexist_f ! -! Purpose: Queries whether a property name exists in a property list or class. +! Purpose: Queries whether a property name exists in a property list or class. ! -! Inputs: +! Inputs: ! prp_id - iproperty list identifier to query ! name - name of property to check for -! Outputs: +! Outputs: ! flag - logical flag -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify LOGICAL, INTENT(OUT) :: flag ! .TRUE. if exists, .FALSE. ! otherwise @@ -3920,32 +3920,32 @@ END SUBROUTINE h5pexist_f !---------------------------------------------------------------------- -! Name: h5pget_size_f +! Name: h5pget_size_f ! ! Purpose: Queries the size of a property value in bytes. ! -! Inputs: +! Inputs: ! prp_id - property list identifier to query ! name - name of property to query -! Outputs: +! Outputs: ! size - size of property in bytes -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to query INTEGER(SIZE_T), INTENT(OUT) :: size ! Size in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3969,31 +3969,31 @@ END SUBROUTINE h5pget_size_f !---------------------------------------------------------------------- -! Name: h5pget_npros_f +! Name: h5pget_npros_f ! ! Purpose: Queries number of properties in property list or class ! -! Inputs: +! Inputs: ! prp_id - iproperty list identifier to query -! Outputs: +! Outputs: ! nprops - number of properties in property object -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(SIZE_T), INTENT(OUT) :: nprops ! iNumber of properties INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -4011,13 +4011,13 @@ END SUBROUTINE h5pget_nprops_f !---------------------------------------------------------------------- -! Name: h5pget_class_name_f +! Name: h5pget_class_name_f ! ! Purpose: Queries the name of a class. ! -! Inputs: +! Inputs: ! prp_id - property list identifier to query -! Outputs: +! Outputs: ! name - name of a class ! size - Actual length of the class name ! If provided buffer "name" is smaller, @@ -4025,23 +4025,23 @@ ! provided user buffer ! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: Returned the size of name as an argument +! Modifications: Returned the size of name as an argument ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name - + INTEGER, INTENT(OUT) :: size ! Actual length of the class name INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -4068,34 +4068,34 @@ END SUBROUTINE h5pget_class_name_f !---------------------------------------------------------------------- -! Name: h5pget_class_parent_f +! Name: h5pget_class_parent_f ! -! Purpose: Retrieves the parent class of a genric property class. +! Purpose: Retrieves the parent class of a genric property class. ! -! Inputs: +! Inputs: ! prp_id - property list identifier to query -! Outputs: +! Outputs: ! parent_id - identifier of the parent class -! hdferr: - error code -! +! hdferr: - error code +! ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list - ! identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list + ! identifier INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE @@ -4112,33 +4112,33 @@ END SUBROUTINE h5pget_class_parent_f !---------------------------------------------------------------------- -! Name: h5pisa_class_f +! Name: h5pisa_class_f ! -! Purpose: Determines whether a property list is a member of a class. +! Purpose: Determines whether a property list is a member of a class. ! -! Inputs: -! plist - property list identifier +! Inputs: +! plist - property list identifier ! pclass - identifier of the property class -! Outputs: +! Outputs: ! flag - .TRUE. if a member, .FALSE. otherwise -! hdferr: - error code -! +! hdferr: - error code +! ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier INTEGER(HID_T), INTENT(IN) :: pclass ! Class identifier LOGICAL, INTENT(OUT) :: flag ! logical flag INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -4162,35 +4162,35 @@ END SUBROUTINE h5pisa_class_f !---------------------------------------------------------------------- -! Name: h5pcopy_prop_f +! Name: h5pcopy_prop_f ! ! Purpose: Copies a property from one list or class to another. ! -! Inputs: +! Inputs: ! dst_id - Identifier of the destination property list -! src_id - Identifier of the source property list +! src_id - Identifier of the source property list ! name - name of the property to copy -! Outputs: -! hdferr: - error code -! -! Success: 0 -! Failure: -1 +! Outputs: +! hdferr: - error code +! +! Success: 0 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list - ! identifier - INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier + INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list + ! identifier + INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Property name INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -4213,28 +4213,28 @@ END SUBROUTINE h5pcopy_prop_f !---------------------------------------------------------------------- -! Name: h5premove_f +! Name: h5premove_f ! -! Purpose: Removes a property from a property list. +! Purpose: Removes a property from a property list. ! -! Inputs: +! Inputs: ! plid - Property list identofoer ! name - name of the property to remove -! Outputs: -! hdferr: - error code -! -! Success: 0 -! Failure: -1 +! Outputs: +! hdferr: - error code +! +! Success: 0 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5premove_f(plid, name, hdferr) @@ -4251,7 +4251,7 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_C'::h5premove_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plid + INTEGER(HID_T), INTENT(IN) :: plid CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len END FUNCTION h5premove_c @@ -4261,28 +4261,28 @@ END SUBROUTINE h5premove_f !---------------------------------------------------------------------- -! Name: h5punregister_f +! Name: h5punregister_f ! -! Purpose: Removes a property from a property list class. +! Purpose: Removes a property from a property list class. ! -! Inputs: +! Inputs: ! class - Property list class identifier ! name - name of the property to remove -! Outputs: -! hdferr: - error code -! -! Success: 0 -! Failure: -1 +! Outputs: +! hdferr: - error code +! +! Success: 0 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5punregister_f(class, name, hdferr) @@ -4309,27 +4309,27 @@ END SUBROUTINE h5punregister_f !---------------------------------------------------------------------- -! Name: h5pclose_class_f +! Name: h5pclose_class_f ! -! Purpose: Closes an existing property list class. +! Purpose: Closes an existing property list class. ! -! Inputs: -! class - Property list class identifier -! Outputs: -! hdferr: - error code -! -! Success: 0 -! Failure: -1 +! Inputs: +! class - Property list class identifier +! Outputs: +! hdferr: - error code +! +! Success: 0 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pclose_class_f(class, hdferr) @@ -4350,12 +4350,12 @@ END SUBROUTINE h5pclose_class_f !---------------------------------------------------------------------- -! Name: h5pcreate_class_f +! Name: h5pcreate_class_f ! ! Purpose: Create a new property list class ! -! Inputs: +! Inputs: ! parent - Property list identifier of the parent class ! Possible values include: ! H5P_ROOT_F @@ -4365,35 +4365,35 @@ ! H5P_DATASET_XFER_F ! H5P_FILE_MOUNT_F ! name - name of the class we are creating -! Outputs: +! Outputs: ! class - porperty list class identifier -! hdferr: - error code -! -! Success: 0 -! Failure: -1 +! hdferr: - error code +! +! Success: 0 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: parent ! parent property list class + INTEGER(HID_T), INTENT(IN) :: parent ! parent property list class ! identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! name of property tocreate + CHARACTER(LEN=*), INTENT(IN) :: name ! name of property tocreate INTEGER(HID_T), INTENT(OUT) :: class ! property list class identifier INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len INTERFACE INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len,& - class) + class) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_CLASS_C'::h5pcreate_class_c @@ -4415,33 +4415,33 @@ ! ! Purpose: Registers a permanent property with a property list class. ! -! Inputs: -! class - property list class to register +! Inputs: +! class - property list class to register ! permanent property within ! name - name of property to register ! size - size of property in bytes -! value - default value for property in newly +! value - default value for property in newly ! created property lists -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 10, 2002 +! October 10, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value INTEGER, INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -4456,7 +4456,7 @@ INTEGER(HID_T), INTENT(IN) :: class CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(SIZE_T), INTENT(IN) :: size INTEGER, INTENT(IN) :: value END FUNCTION h5pregister_integer_c END INTERFACE @@ -4470,33 +4470,33 @@ ! ! Purpose: Registers a permanent property with a property list class. ! -! Inputs: -! class - property list class to register +! Inputs: +! class - property list class to register ! permanent property within ! name - name of property to register ! size - size of property in bytes -! value - default value for property in newly +! value - default value for property in newly ! created property lists -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 10, 2002 +! October 10, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pregister_real(class, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value REAL, INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -4511,7 +4511,7 @@ INTEGER(HID_T), INTENT(IN) :: class CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(SIZE_T), INTENT(IN) :: size REAL, INTENT(IN) :: value END FUNCTION h5pregister_real_c END INTERFACE @@ -4525,33 +4525,33 @@ ! ! Purpose: Registers a permanent property with a property list class. ! -! Inputs: -! class - property list class to register +! Inputs: +! class - property list class to register ! permanent property within ! name - name of property to register ! size - size of property in bytes -! value - default value for property in newly +! value - default value for property in newly ! created property lists -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 10, 2002 +! October 10, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pregister_char(class, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value CHARACTER(LEN=*), INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -4569,7 +4569,7 @@ INTEGER(HID_T), INTENT(IN) :: class CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(SIZE_T), INTENT(IN) :: size CHARACTER(LEN=*), INTENT(IN) :: value INTEGER, INTENT(IN) :: value_len END FUNCTION h5pregisterc_c @@ -4585,31 +4585,31 @@ ! ! Purpose: Registers a temporary property with a property list class. ! -! Inputs: +! Inputs: ! plist - property list identifier ! name - name of property to insert ! size - size of property in bytes -! value - initial value for the property -! Outputs: -! hdferr: - error code +! value - initial value for the property +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 10, 2002 +! October 10, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value INTEGER, INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -4624,7 +4624,7 @@ INTEGER(HID_T), INTENT(IN) :: plist CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(SIZE_T), INTENT(IN) :: size INTEGER, INTENT(IN) :: value END FUNCTION h5pinsert_integer_c END INTERFACE @@ -4638,32 +4638,32 @@ ! ! Purpose: Registers a temporary property with a property list class. ! -! Inputs: +! Inputs: ! plist - property list identifier ! permanent property within ! name - name of property to insert ! size - size of property in bytes -! value - initial value for the property -! Outputs: -! hdferr: - error code +! value - initial value for the property +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 10, 2002 +! October 10, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value REAL, INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -4678,7 +4678,7 @@ INTEGER(HID_T), INTENT(IN) :: plist CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(SIZE_T), INTENT(IN) :: size REAL, INTENT(IN) :: value END FUNCTION h5pinsert_real_c END INTERFACE @@ -4693,32 +4693,32 @@ ! ! Purpose: Registers a temporary property with a property list class. ! -! Inputs: +! Inputs: ! plist - property list identifier ! permanent property within ! name - name of property to insert ! size - size of property in bytes -! value - initial value for the property -! Outputs: -! hdferr: - error code +! value - initial value for the property +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! October 10, 2002 +! October 10, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value CHARACTER(LEN=*), INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -4735,7 +4735,7 @@ INTEGER(HID_T), INTENT(IN) :: plist CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(SIZE_T), INTENT(IN) :: size CHARACTER(LEN=*), INTENT(IN) :: value INTEGER, INTENT(IN) :: value_len END FUNCTION h5pinsertc_c @@ -4747,31 +4747,31 @@ END SUBROUTINE h5pinsert_char !---------------------------------------------------------------------- -! Name: h5pset_shuffle_f +! Name: h5pset_shuffle_f ! ! Purpose: Sets shuffling filter ! -! Inputs: +! Inputs: ! prp_id - dataset creation property list identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! March 12, 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_shuffle_f(prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pset_shuffle_c @@ -4791,34 +4791,34 @@ END SUBROUTINE h5pset_shuffle_f !---------------------------------------------------------------------- -! Name: h5pset_edc_check_f +! Name: h5pset_edc_check_f ! -! Purpose: Enables/disables error detecting +! Purpose: Enables/disables error detecting ! -! Inputs: +! Inputs: ! prp_id - dataset creation property list identifier ! flag - EDC flag; possible values: ! H5Z_DISABLE_EDC_F ! H5Z_ENABLE_EDC_F -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! March 13, 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: flag ! Checksum filter flag INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -4832,7 +4832,7 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EDC_CHECK_C'::h5pset_edc_check_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: flag + INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_edc_check_c END INTERFACE hdferr = h5pset_edc_check_c(prp_id, flag) @@ -4840,31 +4840,31 @@ END SUBROUTINE h5pset_edc_check_f !---------------------------------------------------------------------- -! Name: h5pget_edc_check_f +! Name: h5pget_edc_check_f ! -! Purpose: Queries error detecting +! Purpose: Queries error detecting ! -! Inputs: +! Inputs: ! prp_id - dataset creation property list identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! March 13, 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier INTEGER, INTENT(OUT) :: flag ! Checksum filter flag ! May have one of the following values: ! H5Z_ERROR_EDC_F @@ -4890,32 +4890,32 @@ END SUBROUTINE h5pget_edc_check_f !---------------------------------------------------------------------- -! Name: h5pset_fletcher32_f +! Name: h5pset_fletcher32_f ! -! Purpose: Sets Fletcher32 checksum of EDC for a dataset creation +! Purpose: Sets Fletcher32 checksum of EDC for a dataset creation ! property list. ! -! Inputs: +! Inputs: ! prp_id - dataset creation property list identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! March 13, 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5pset_fletcher32_c @@ -4935,32 +4935,32 @@ END SUBROUTINE h5pset_fletcher32_f !---------------------------------------------------------------------- -! Name: h5pset_family_offset_f +! Name: h5pset_family_offset_f ! ! Purpose: Sets offset for family file driver. ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier ! offset - file offset -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! 19 March 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -4974,7 +4974,7 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAMILY_OFFSET_C'::h5pset_family_offset_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: offset + INTEGER(HSIZE_T), INTENT(IN) :: offset END FUNCTION h5pset_family_offset_c END INTERFACE hdferr = h5pset_family_offset_c(prp_id, offset) @@ -4982,35 +4982,35 @@ END SUBROUTINE h5pset_family_offset_f !---------------------------------------------------------------------- -! Name: h5pset_fapl_multi_l +! Name: h5pset_fapl_multi_l ! -! Purpose: Sets up use of the multi-file driver. +! Purpose: Sets up use of the multi-file driver. ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier ! mem_map - mapping array ! memb_fapl - property list for each memory usage type ! memb_name - names of member file -! relax - flag -! Outputs: -! hdferr: - error code +! relax - flag +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! 20 March 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_map INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_fapl CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_name @@ -5034,7 +5034,7 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: memb_name - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_map INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_fapl CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_name @@ -5051,36 +5051,36 @@ enddo flag = 0 if (relax) flag = 1 - hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) + hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) END SUBROUTINE h5pset_fapl_multi_l !---------------------------------------------------------------------- -! Name: h5pset_fapl_multi_s +! Name: h5pset_fapl_multi_s ! -! Purpose: Sets up use of the multi-file driver. +! Purpose: Sets up use of the multi-file driver. ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier -! relax - flag -! Outputs: -! hdferr: - error code +! relax - flag +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! 31 March 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier LOGICAL, INTENT(IN) :: relax INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: flag @@ -5089,61 +5089,61 @@ ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) + INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_fapl_multi_sc END INTERFACE flag = 0 if (relax) flag = 1 - hdferr = h5pset_fapl_multi_sc(prp_id, flag) + hdferr = h5pset_fapl_multi_sc(prp_id, flag) END SUBROUTINE h5pset_fapl_multi_s !---------------------------------------------------------------------- -! Name: h5pget_fapl_multi_f +! Name: h5pget_fapl_multi_f ! -! Purpose: Sets up use of the multi-file driver. +! Purpose: Sets up use of the multi-file driver. ! -! Inputs: +! Inputs: ! prp_id - file creation property list identifier -! Outputs: +! Outputs: ! mem_map - mapping array ! memb_fapl - property list for each memory usage type ! memb_name - names of member file -! relax - flag -! hdferr: - error code +! relax - flag +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! maxlen_out - maximum length for memb_name array element +! maxlen_out - maximum length for memb_name array element ! ! Programmer: Elena Pourmal ! 24 March 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_map INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_fapl CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_name !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr - INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out + INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out LOGICAL, INTENT(OUT) :: relax INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm INTEGER :: maxlen - INTEGER :: c_maxlen_out + INTEGER :: c_maxlen_out INTEGER :: flag INTEGER :: i @@ -5158,14 +5158,14 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: memb_name - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_map INTEGER(HID_T), DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_fapl CHARACTER(LEN=*), DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_name REAL, DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_addr INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm INTEGER :: maxlen - INTEGER :: c_maxlen_out + INTEGER :: c_maxlen_out INTEGER, INTENT(OUT) :: flag END FUNCTION h5pget_fapl_multi_c END INTERFACE @@ -5173,40 +5173,40 @@ do i=0, H5FD_MEM_NTYPES_F-1 lenm(i) = LEN_TRIM(memb_name(i)) enddo - hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) + hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) relax = .TRUE. - if(flag .eq. 0) relax = .FALSE. + if(flag .eq. 0) relax = .FALSE. if(present(maxlen_out)) maxlen_out = c_maxlen_out END SUBROUTINE h5pget_fapl_multi_f !---------------------------------------------------------------------- -! Name: h5pset_szip_f +! Name: h5pset_szip_f ! ! Purpose: Sets up use of szip compression ! -! Inputs: +! Inputs: ! prp_id - dataset creation property list identifier ! options_mask ! pixels_per_block - szip parameters -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! April 10 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) + SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier INTEGER, INTENT(IN) :: options_mask INTEGER, INTENT(IN) :: pixels_per_block INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -5215,50 +5215,50 @@ ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) + INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SZIP_C'::h5pset_szip_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, INTENT(IN) :: options_mask INTEGER, INTENT(IN) :: pixels_per_block END FUNCTION h5pset_szip_c END INTERFACE - hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) + hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) END SUBROUTINE h5pset_szip_f !---------------------------------------------------------------------- -! Name: h5pall_filters_avail_f +! Name: h5pall_filters_avail_f ! ! Purpose: Checks if all filters set in the dataset creation ! property list are available ! -! Inputs: +! Inputs: ! prp_id - data creation property list identifier -! Outputs: +! Outputs: ! flag - .TRUE. if all filters are available ! .FALSE. otherwise -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! April 10 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier LOGICAL, INTENT(OUT) :: flag INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: status @@ -5267,30 +5267,30 @@ ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) + INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PALL_FILTERS_AVAIL_C'::h5pall_filters_avail_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, INTENT(OUT) :: status END FUNCTION h5pall_filters_avail_c END INTERFACE flag = .TRUE. - hdferr = h5pall_filters_avail_c(prp_id, status) + hdferr = h5pall_filters_avail_c(prp_id, status) if (status .eq. 0 ) flag = .FALSE. END SUBROUTINE h5pall_filters_avail_f !---------------------------------------------------------------------- -! Name: h5pget_filter_by_id_f +! Name: h5pget_filter_by_id_f ! ! Purpose: Returns information about a filter in a pipeline ! -! Inputs: -! prp_id - data creation or transfer property list +! Inputs: +! prp_id - data creation or transfer property list ! identifier -! Outputs: +! Outputs: ! filter_id - filter identifier ! flags - bit vector specifying certain general ! properties of the filter @@ -5298,23 +5298,23 @@ ! cd_values - auxiliary data for the filter ! namelen - number of characters in the name buffer ! name - buffer to retrieve filter name -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! April 10 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: filter_id ! Filter identifier INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts !Number of elements in cd_values. @@ -5339,50 +5339,50 @@ !DEC$ENDIF !DEC$ATTRIBUTES reference :: name INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_id + INTEGER, INTENT(IN) :: filter_id INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags + INTEGER, INTENT(OUT) :: flags INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts INTEGER(SIZE_T), INTENT(IN) :: namelen CHARACTER(LEN=*), INTENT(OUT) :: name END FUNCTION h5pget_filter_by_id_c END INTERFACE - hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & cd_values, namelen, name) END SUBROUTINE h5pget_filter_by_id_f !---------------------------------------------------------------------- -! Name: h5pmodify_filter_f +! Name: h5pmodify_filter_f ! -! Purpose: Adds a filter to the filter pipeline. +! Purpose: Adds a filter to the filter pipeline. ! -! Inputs: -! prp_id - data creation or transfer property list +! Inputs: +! prp_id - data creation or transfer property list ! identifier ! filter - filter to be modified ! flags - bit vector specifying certain general ! properties of the filter ! cd_nelmts - number of elements in cd_values ! cd_values - auxiliary data for the filter -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! April 10 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: filter !Filter to be modified INTEGER, INTENT(IN) :: flags !Bit vector specifying certain general !properties of the filter. @@ -5400,11 +5400,11 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PMODIFY_FILTER_C'::h5pmodify_filter_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values END FUNCTION h5pmodify_filter_c END INTERFACE @@ -5412,27 +5412,27 @@ END SUBROUTINE h5pmodify_filter_f !---------------------------------------------------------------------- -! Name: h5premove_filter_f +! Name: h5premove_filter_f ! -! Purpose: Delete one or more filters from the filter pipeline. +! Purpose: Delete one or more filters from the filter pipeline. ! -! Inputs: -! prp_id - data creation or transfer property list +! Inputs: +! prp_id - data creation or transfer property list ! identifier ! filter - filter to be removed -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Quincey Koziol ! January 27 2004 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr) @@ -5451,8 +5451,8 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_FILTER_C'::h5premove_filter_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter END FUNCTION h5premove_filter_c END INTERFACE @@ -5460,29 +5460,29 @@ END SUBROUTINE h5premove_filter_f !---------------------------------------------------------------------- -! Name: H5Pget_attr_phase_change_f +! Name: H5Pget_attr_phase_change_f ! -! Purpose: Retrieves attribute storage phase change thresholds +! Purpose: Retrieves attribute storage phase change thresholds ! -! Inputs: +! Inputs: ! ocpl_id - Object (dataset or group) creation property list identifier -! Outputs: +! Outputs: ! max_compact - Maximum number of attributes to be stored in compact storage ! (Default: 8) ! min_dense - Minimum number of attributes to be stored in dense storage ! (Default: 6) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! January, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) @@ -5505,34 +5505,34 @@ INTEGER(HID_T), INTENT(IN) :: ocpl_id INTEGER, INTENT(OUT) :: max_compact INTEGER, INTENT(OUT) :: min_dense - + END FUNCTION h5pget_attr_phase_change_c END INTERFACE - + hdferr = h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) END SUBROUTINE h5pget_attr_phase_change_f !---------------------------------------------------------------------- -! Name: H5Pset_attr_creation_order_f +! Name: H5Pset_attr_creation_order_f ! ! Purpose: Sets tracking and indexing of attribute creation order ! -! Inputs: +! Inputs: ! ocpl_id - Object creation property list identifier ! crt_order_flags - Flags specifying whether to track and index attribute creation order ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! January, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr) @@ -5552,41 +5552,41 @@ !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: ocpl_id INTEGER, INTENT(IN) :: crt_order_flags - + END FUNCTION H5Pset_attr_creation_order_c END INTERFACE - + hdferr = H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) END SUBROUTINE h5pset_attr_creation_order_f - + !---------------------------------------------------------------------- -! Name: H5Pset_shared_mesg_nindexes_f +! Name: H5Pset_shared_mesg_nindexes_f ! -! Purpose: Sets number of shared object header message indexes +! Purpose: Sets number of shared object header message indexes ! -! Inputs: +! Inputs: ! plist_id - file creation property list ! nindexes - Number of shared object header message indexes to be available in files created with this property list ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! January, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id ! file creation property list - INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes + INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes ! available in files created WITH this property list INTEGER, INTENT(OUT) :: hdferr ! Error code ! @@ -5598,41 +5598,41 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_NINDEXES_C'::h5pset_shared_mesg_nindexes_c !DEC$ENDIF - + INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: nindexes - + END FUNCTION H5pset_shared_mesg_nindexes_c END INTERFACE - - hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) + + hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) END SUBROUTINE h5pset_shared_mesg_nindexes_f - + !---------------------------------------------------------------------- ! Name: H5Pset_shared_mesg_index_f ! ! Purpose: Configures the specified shared object header message index ! -! Inputs: +! Inputs: ! fcpl_id - File creation property list identifier. ! index_num - Index being configured. ! mesg_type_flags - Types of messages that should be stored in this index. ! min_mesg_size - Minimum message size. ! ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! January, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr) @@ -5652,19 +5652,19 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_INDEX_C'::h5pset_shared_mesg_index_c !DEC$ENDIF - - INTEGER(HID_T), INTENT(IN) :: fcpl_id + + INTEGER(HID_T), INTENT(IN) :: fcpl_id INTEGER, INTENT(IN) :: index_num INTEGER, INTENT(IN) :: mesg_type_flags INTEGER, INTENT(IN) :: min_mesg_size - + END FUNCTION H5pset_shared_mesg_index_c END INTERFACE - - hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) + + hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) END SUBROUTINE h5pset_shared_mesg_index_f - + !---------------------------------------------------------------------- ! Name: H5Pget_attr_creation_order_f ! @@ -5675,24 +5675,24 @@ ! ! Outputs: ! crt_order_flags - Flags specifying whether to track and index attribute creation order -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! February, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier + INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order INTEGER, INTENT(OUT) :: hdferr ! Error code ! ! MS FORTRAN needs explicit interface for C functions called here. @@ -5706,7 +5706,7 @@ !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: ocpl_id INTEGER, INTENT(OUT) :: crt_order_flags - + END FUNCTION H5pget_attr_creation_order_c END INTERFACE @@ -5725,18 +5725,18 @@ ! high - The latest version of the library that will be used for writing objects. ! ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! February 18, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr) @@ -5763,7 +5763,7 @@ INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER, INTENT(IN) :: low INTEGER, INTENT(IN) :: high - + END FUNCTION H5pset_libver_bounds_c END INTERFACE @@ -5772,7 +5772,7 @@ END SUBROUTINE h5pset_libver_bounds_f !---------------------------------------------------------------------- -! Name: H5Pset_link_creation_order_f +! Name: H5Pset_link_creation_order_f ! ! Purpose: Sets creation order tracking and indexing for links in a group. ! @@ -5781,18 +5781,18 @@ ! crt_order_flags - Creation order flag(s) ! ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! February 18, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) @@ -5812,7 +5812,7 @@ !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(IN) :: crt_order_flags - + END FUNCTION H5pset_link_creation_order_c END INTERFACE @@ -5825,23 +5825,23 @@ ! ! Purpose: Queries the settings for conversion between compact and dense groups. ! -! Inputs: +! Inputs: ! gcpl_id - Group creation property list identifier -! Outputs: +! Outputs: ! max_compact - Maximum number of attributes to be stored in compact storage ! min_dense - Minimum number of attributes to be stored in dense storage -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! February 20, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) @@ -5862,7 +5862,7 @@ INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(OUT) :: max_compact INTEGER, INTENT(OUT) :: min_dense - + END FUNCTION h5pget_link_phase_change_c END INTERFACE @@ -5870,33 +5870,33 @@ END SUBROUTINE h5pget_link_phase_change_f !---------------------------------------------------------------------- -! Name: H5Pget_obj_track_times_f +! Name: H5Pget_obj_track_times_f ! ! Purpose: Returns whether times are tracked for an object. ! -! Inputs: +! Inputs: ! plist_id - property list id ! flag - object timestamp setting ! .TRUE.,.FALSE. ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! February 22, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property + ! list identifier LOGICAL, INTENT(OUT) :: flag ! Object timestamp setting INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: status @@ -5904,27 +5904,27 @@ ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) + INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_OBJ_TRACK_TIMES_C'::h5pget_obj_track_times_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier INTEGER, INTENT(OUT) :: status END FUNCTION h5pget_obj_track_times_c END INTERFACE flag = .TRUE. - hdferr = h5pget_obj_track_times_c(plist_id, status) + hdferr = h5pget_obj_track_times_c(plist_id, status) IF(status.EQ.0) flag = .FALSE. END SUBROUTINE h5pget_obj_track_times_f !---------------------------------------------------------------------- -! Name: H5Pset_obj_track_times_f +! Name: H5Pset_obj_track_times_f ! ! Purpose: Set whether the birth, access, modification & change times for ! an object are stored. -! +! ! Birth time is the time the object was created. Access time is ! the last time that metadata or raw data was read from this ! object. Modification time is the last time the data for @@ -5933,34 +5933,34 @@ ! time is the last time the metadata for this object was written ! (adding/modifying/deleting an attribute on an object, extending ! the size of a dataset, etc). -! +! ! If these times are not tracked, they will be reported as ! 12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX ! epoch) when queried. ! -! Inputs: +! Inputs: ! plist_id - property list id ! flag - object timestamp setting ! .TRUE.,.FALSE. ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! February 22, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property + ! list identifier LOGICAL, INTENT(IN) :: flag ! Object timestamp setting INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: status @@ -5968,12 +5968,12 @@ ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) + INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_OBJ_TRACK_TIMES_C'::h5pset_obj_track_times_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier INTEGER, INTENT(IN) :: status END FUNCTION h5pset_obj_track_times_c END INTERFACE @@ -5990,38 +5990,38 @@ ! ! Purpose: Specifies in property list whether to create missing intermediate groups. ! -! Inputs: +! Inputs: ! lcpl_id - Link creation property list identifier -! crt_intermed_group - crt_intermed_group specifying whether -! to create intermediate groups upon the creation +! crt_intermed_group - crt_intermed_group specifying whether +! to create intermediate groups upon the creation ! of an object ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! February 22, 2008 ! -! Modifications: +! Modifications: ! ! Comment: The long subroutine name (>31) on older f90 compilers causes problems -! so had to shorten the name +! so had to shorten the name !-------------------------------------------------------------------------------------- SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! specifying whether to create intermediate groups + INTEGER, INTENT(IN) :: crt_intermed_group ! specifying whether to create intermediate groups ! upon the creation of an object INTEGER, INTENT(OUT) :: hdferr ! Error code ! ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) + INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CREATE_INTER_GROUP_C'::h5pset_create_inter_group_c @@ -6045,18 +6045,18 @@ ! ! Outputs: ! crt_order_flags - Creation order flag(s) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! March 3, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) @@ -6076,7 +6076,7 @@ !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(OUT) :: crt_order_flags - + END FUNCTION H5pget_link_creation_order_c END INTERFACE @@ -6085,7 +6085,7 @@ END SUBROUTINE h5pget_link_creation_order_f !---------------------------------------------------------------------- -! Name: H5Pset_char_encoding +! Name: H5Pset_char_encoding ! ! Purpose: Sets the character encoding used to encode a string. ! @@ -6096,24 +6096,24 @@ ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding ! ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! March 3, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - + INTEGER, INTENT(IN) :: encoding ! String encoding character set: ! H5T_CSET_ASCII_F -> US ASCII ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding @@ -6130,7 +6130,7 @@ !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: encoding - + END FUNCTION H5pset_char_encoding_c END INTERFACE @@ -6139,7 +6139,7 @@ END SUBROUTINE h5pset_char_encoding_f !---------------------------------------------------------------------- -! Name: H5Pget_char_encoding +! Name: H5Pget_char_encoding ! ! Purpose: Retrieves the character encoding used to create a string ! @@ -6150,24 +6150,24 @@ ! encoding - Valid values for encoding are: ! H5T_CSET_ASCII_F -> US ASCII ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! March 3, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - + INTEGER, INTENT(OUT) :: encoding ! Valid values for encoding are: ! H5T_CSET_ASCII_F -> US ASCII ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding @@ -6184,7 +6184,7 @@ !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(OUT) :: encoding - + END FUNCTION H5pget_char_encoding_c END INTERFACE @@ -6193,17 +6193,17 @@ END SUBROUTINE h5pget_char_encoding_f !---------------------------------------------------------------------- -! Name: h5pset_copy_object_f +! Name: h5pset_copy_object_f ! ! Purpose: Sets properties to be used when an object is copied. ! -! Inputs: +! Inputs: ! ocp_plist_id - Object copy property list identifier ! copy_options - Copy option(s) to be set -! Outputs: -! hdferr - error code +! Outputs: +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! @@ -6212,7 +6212,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr) @@ -6220,7 +6220,7 @@ INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are: ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F + ! H5O_COPY_EXPAND_SOFT_LINK_F ! H5O_COPY_EXPAND_EXT_LINK_F ! H5O_COPY_EXPAND_REFERENCE_F ! H5O_COPY_WITHOUT_ATTR_FLAG_F @@ -6239,21 +6239,21 @@ INTEGER, INTENT(IN) :: copy_options END FUNCTION h5pset_copy_object_c END INTERFACE - hdferr = h5pset_copy_object_c(ocp_plist_id, copy_options) + hdferr = h5pset_copy_object_c(ocp_plist_id, copy_options) END SUBROUTINE h5pset_copy_object_f !---------------------------------------------------------------------- -! Name: h5pget_copy_object_f +! Name: h5pget_copy_object_f ! ! Purpose: Retrieves the properties to be used when an object is copied. ! -! Inputs: +! Inputs: ! ocp_plist_id - Object copy property list identifier -! Outputs: +! Outputs: ! copy_options - Copy option(s) to be get -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! @@ -6262,7 +6262,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr) @@ -6270,7 +6270,7 @@ INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier INTEGER, INTENT(OUT) :: copy_options ! valid copy options returned are: ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F + ! H5O_COPY_EXPAND_SOFT_LINK_F ! H5O_COPY_EXPAND_EXT_LINK_F ! H5O_COPY_EXPAND_REFERENCE_F ! H5O_COPY_WITHOUT_ATTR_FLAG_F @@ -6288,22 +6288,22 @@ INTEGER, INTENT(OUT) :: copy_options END FUNCTION h5pget_copy_object_c END INTERFACE - hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) + hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) END SUBROUTINE h5pget_copy_object_f !---------------------------------------------------------------------- -! Name: h5pget_data_transform_f +! Name: h5pget_data_transform_f ! ! Purpose: Retrieves a data transform expression. ! -! Inputs: +! Inputs: ! plist_id - Identifier of the property list or class -! Outputs: +! Outputs: ! expression - buffer to hold transform expression ! hdferr - error code ! Success: Actual lenght of the expression -! If provided buffer "expression" is -! smaller, than expression will be +! If provided buffer "expression" is +! smaller, than expression will be ! truncated to fit into ! provided user buffer ! Failure: -1 @@ -6328,7 +6328,7 @@ INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: expression_len INTEGER(SIZE_T) :: size_default - + ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -6339,8 +6339,8 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DATA_TRANSFORM_C'::h5pget_data_transform_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: expression - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(LEN=*), INTENT(OUT) :: expression + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(LEN=*), INTENT(OUT) :: expression INTEGER(SIZE_T) :: size_default INTEGER :: expression_len END FUNCTION h5pget_data_transform_c @@ -6356,14 +6356,14 @@ END SUBROUTINE h5pget_data_transform_f !---------------------------------------------------------------------- -! Name: h5pset_data_transform_f +! Name: h5pset_data_transform_f ! ! Purpose: Sets a data transform expression. ! -! Inputs: -! plist_id - Identifier of the property list or class +! Inputs: +! plist_id - Identifier of the property list or class ! expression - buffer to hold transform expression -! Outputs: +! Outputs: ! hdferr - error code ! Success: 0 ! Failure: -1 @@ -6375,7 +6375,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr) @@ -6394,7 +6394,7 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DATA_TRANSFORM_C'::h5pset_data_transform_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: expression - INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HID_T), INTENT(IN) :: plist_id CHARACTER(LEN=*), INTENT(IN) :: expression INTEGER :: expression_len END FUNCTION h5pset_data_transform_c @@ -6406,11 +6406,11 @@ END SUBROUTINE h5pset_data_transform_f !---------------------------------------------------------------------- -! Name: H5Pget_local_heap_size_hint_f +! Name: H5Pget_local_heap_size_hint_f ! ! Purpose: Queries the local heap size hint for original-style groups. ! -! Inputs: +! Inputs: ! gcpl_id - Group creation property list identifier ! Outputs: ! size_hint - Hint for size of local heap @@ -6425,7 +6425,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) @@ -6452,13 +6452,13 @@ END SUBROUTINE h5pget_local_heap_size_hint_f !---------------------------------------------------------------------- -! Name: H5Pget_est_link_info_f +! Name: H5Pget_est_link_info_f ! ! Purpose: Queries data required to estimate required local heap or object header size. ! -! Inputs: +! Inputs: ! gcpl_id - Group creation property list identifier -! Outputs: +! Outputs: ! est_num_entries - Estimated number of links to be inserted into group ! est_name_len - Estimated average length of link names ! hdferr - error code @@ -6472,12 +6472,12 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -6490,7 +6490,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EST_LINK_INFO_C'::h5pget_est_link_info_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(OUT) :: est_num_entries INTEGER, INTENT(OUT) :: est_name_len END FUNCTION h5pget_est_link_info_c @@ -6501,11 +6501,11 @@ END SUBROUTINE h5pget_est_link_info_f !---------------------------------------------------------------------- -! Name: H5Pset_local_heap_size_hint_f +! Name: H5Pset_local_heap_size_hint_f ! ! Purpose: Sets the local heap size hint for original-style groups. ! -! Inputs: +! Inputs: ! gcpl_id - Group creation property list identifier ! size_hint - Hint for size of local heap ! Outputs: @@ -6520,7 +6520,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) @@ -6547,12 +6547,12 @@ END SUBROUTINE h5pset_local_heap_size_hint_f !---------------------------------------------------------------------- -! Name: h5pset_est_link_info_f +! Name: h5pset_est_link_info_f ! ! Purpose: Sets estimated number of links and length of link names in a group. ! -! Inputs: -! gcpl_id - Group creation property list identifier +! Inputs: +! gcpl_id - Group creation property list identifier ! est_num_entries - Estimated number of links to be inserted into group ! est_name_len - Estimated average length of link names ! Outputs: @@ -6567,12 +6567,12 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -6585,7 +6585,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EST_LINK_INFO_C'::h5pset_est_link_info_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(IN) :: est_num_entries INTEGER, INTENT(IN) :: est_name_len END FUNCTION h5pset_est_link_info_c @@ -6600,23 +6600,23 @@ ! ! Purpose: Sets the parameters for conversion between compact and dense groups. ! -! Inputs: -! gcpl_id - Group creation property list identifier +! Inputs: +! gcpl_id - Group creation property list identifier ! max_compact - Maximum number of attributes to be stored in compact storage ! min_dense - Minimum number of attributes to be stored in dense storage ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! March 21, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) @@ -6637,7 +6637,7 @@ INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(IN) :: max_compact INTEGER, INTENT(IN) :: min_dense - + END FUNCTION h5pset_link_phase_change_c END INTERFACE @@ -6649,28 +6649,28 @@ ! ! Purpose: Sets up use of the direct I/O driver. ! -! Inputs: +! Inputs: ! fapl_id - File access property list identifier ! alignment - Required memory alignment boundary ! block_size - File system block size ! cbuf_size - Copy buffer size ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! March 21, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier INTEGER(SIZE_T), INTENT(IN) :: alignment ! Required memory alignment boundary! INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size @@ -6685,7 +6685,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_DIRECT_C'::h5pset_fapl_direct_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER(SIZE_T), INTENT(IN) :: alignment INTEGER(SIZE_T), INTENT(IN) :: block_size INTEGER(SIZE_T), INTENT(IN) :: cbuf_size @@ -6700,28 +6700,28 @@ ! ! Purpose: Gets up use of the direct I/O driver. ! -! Inputs: +! Inputs: ! fapl_id - File access property list identifier ! Outputs: ! alignment - Required memory alignment boundary ! block_size - File system block size ! cbuf_size - Copy buffer size -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! March 21, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary! INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size @@ -6736,7 +6736,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_DIRECT_C'::h5pget_fapl_direct_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER(SIZE_T), INTENT(OUT) :: alignment INTEGER(SIZE_T), INTENT(OUT) :: block_size INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size @@ -6747,29 +6747,29 @@ END SUBROUTINE h5pget_fapl_direct_f !---------------------------------------------------------------------- -! Name: H5Pset_attr_phase_change_f +! Name: H5Pset_attr_phase_change_f ! ! Purpose: Sets attribute storage phase change thresholds. ! -! Inputs: +! Inputs: ! ocpl_id - Object (dataset or group) creation property list identifier -! Outputs: +! Outputs: ! max_compact - Maximum number of attributes to be stored in compact storage ! (Default: 8) ! min_dense - Minimum number of attributes to be stored in dense storage ! (Default: 6) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! January, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) @@ -6792,21 +6792,21 @@ INTEGER(HID_T), INTENT(IN) :: ocpl_id INTEGER, INTENT(IN) :: max_compact INTEGER, INTENT(IN) :: min_dense - + END FUNCTION h5pset_attr_phase_change_c END INTERFACE - + hdferr = h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) END SUBROUTINE h5pset_attr_phase_change_f !---------------------------------------------------------------------- -! Name: H5Pset_nbit_f +! Name: H5Pset_nbit_f ! ! Purpose: Sets up the use of the N-Bit filter. ! -! Inputs: +! Inputs: ! plist_id - Dataset creation property list identifier. ! Outputs: ! hdferr - error code @@ -6820,7 +6820,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_nbit_f(plist_id, hdferr) @@ -6845,11 +6845,11 @@ END SUBROUTINE h5pset_nbit_f !---------------------------------------------------------------------- -! Name: h5pset_scaleoffset_f +! Name: h5pset_scaleoffset_f ! ! Purpose: Sets up the use of the Scale-Offset filter. ! -! Inputs: +! Inputs: ! plist_id - Dataset creation property list identifier. ! scale_type - Flag indicating compression method. ! scale_factor - Parameter related to scale. @@ -6865,7 +6865,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr) @@ -6894,11 +6894,11 @@ END SUBROUTINE h5pset_scaleoffset_f !---------------------------------------------------------------------- -! Name: h5pset_nlinks_f +! Name: h5pset_nlinks_f ! ! Purpose: Sets maximum number of soft or user-defined link traversals. ! -! Inputs: +! Inputs: ! lapl_id - File access property list identifier ! nlinks - Maximum number of links to traverse ! @@ -6914,7 +6914,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr) @@ -6922,7 +6922,7 @@ INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse INTEGER, INTENT(OUT) :: hdferr ! Error code - + ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -6935,17 +6935,17 @@ INTEGER(SIZE_T), INTENT(IN) :: nlinks END FUNCTION h5pset_nlinks_c END INTERFACE - + hdferr = h5pset_nlinks_c(lapl_id, nlinks) - + END SUBROUTINE h5pset_nlinks_f !---------------------------------------------------------------------- -! Name: h5pget_nlinks_f +! Name: h5pget_nlinks_f ! ! Purpose: Gets maximum number of soft or user-defined link traversals. ! -! Inputs: +! Inputs: ! lapl_id - File access property list identifier ! nlinks - Maximum number of links to traverse ! @@ -6961,7 +6961,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr) @@ -6969,7 +6969,7 @@ INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse INTEGER, INTENT(OUT) :: hdferr ! Error code - + ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -6982,9 +6982,9 @@ INTEGER(SIZE_T), INTENT(OUT) :: nlinks END FUNCTION h5pget_nlinks_c END INTERFACE - + hdferr = h5pget_nlinks_c(lapl_id, nlinks) - + END SUBROUTINE h5pget_nlinks_f !---------------------------------------------------------------------- @@ -6992,35 +6992,35 @@ ! ! Purpose: Determines whether property is set to enable creating missing intermediate groups. ! -! Inputs: +! Inputs: ! lcpl_id - Link creation property list identifier -! crt_intermed_group - Specifying whether to create intermediate groups upon +! crt_intermed_group - Specifying whether to create intermediate groups upon ! the creation of an object ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! April 4, 2008 ! -! Modifications: +! Modifications: ! ! Comment: The long subroutine name (>31) on older f90 compilers causes problems -! so had to shorten the name +! so had to shorten the name !-------------------------------------------------------------------------------------- SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! Flag specifying whether to create intermediate groups + INTEGER, INTENT(IN) :: crt_intermed_group ! Flag specifying whether to create intermediate groups ! upon creation of an object INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE - INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) + INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CREATE_INTER_GROUP_C'::h5pget_create_inter_group_c @@ -7055,35 +7055,35 @@ ! of one means fully read chunks are always preempted before ! other chunks. ! -! Inputs: +! Inputs: ! dapl_id - Dataset access property list identifier. ! rdcc_nslots - The number of chunk slots in the raw data chunk cache for this dataset. ! rdcc_nbytes - The total size of the raw data chunk cache for this dataset. ! rdcc_w0 - The chunk preemption policy for this dataset. ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! April 13, 2009 ! -! Modifications: +! Modifications: !-------------------------------------------------------------------------------------- SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data ! chunk cache for this dataset. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache ! for this dataset. REAL, INTENT(IN) :: rdcc_w0 ! The chunk preemption policy for this dataset. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure - + INTERFACE INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) @@ -7113,32 +7113,32 @@ ! not been set on this property list, the default values for a ! file access property list are returned. ! -! Inputs: +! Inputs: ! dapl_id - Dataset access property list identifier. -! Outputs: -! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. -! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. -! rdcc_w0 - Preemption policy. -! hdferr: - error code +! Outputs: +! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. +! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. +! rdcc_w0 - Preemption policy. +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: M.S. Breitenfeld ! April 13, 2009 ! -! Modifications: +! Modifications: !-------------------------------------------------------------------------------------- SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy. INTEGER, INTENT(OUT) :: hdferr ! error code - + INTERFACE INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) USE H5GLOBAL diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90 index f8ffb2f..6c557e3 100644 --- a/fortran/src/H5Rff.f90 +++ b/fortran/src/H5Rff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,96 +11,96 @@ ! 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 contains Fortran90 interfaces for H5R functions. -! +! MODULE H5R USE H5GLOBAL ! If you change the value of these parameters, do not forget to change corresponding -! values in the H5f90.h file. -! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 -! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 +! values in the H5f90.h file. +! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 +! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 ! ! TYPE hobj_ref_t_f -! INTEGER ref(REF_OBJ_BUF_LEN) -! END TYPE +! INTEGER ref(REF_OBJ_BUF_LEN) +! END TYPE ! ! TYPE hdset_reg_ref_t_f -! INTEGER ref(REF_REG_BUF_LEN) -! END TYPE +! INTEGER ref(REF_REG_BUF_LEN) +! END TYPE ! INTERFACE h5rcreate_f MODULE PROCEDURE h5rcreate_object_f - MODULE PROCEDURE h5rcreate_region_f + MODULE PROCEDURE h5rcreate_region_f + + END INTERFACE - END INTERFACE - INTERFACE h5rdereference_f MODULE PROCEDURE h5rdereference_object_f - MODULE PROCEDURE h5rdereference_region_f + MODULE PROCEDURE h5rdereference_region_f + + END INTERFACE - END INTERFACE - INTERFACE h5rget_region_f - MODULE PROCEDURE h5rget_region_region_f + MODULE PROCEDURE h5rget_region_region_f + + END INTERFACE - END INTERFACE - INTERFACE h5rget_object_type_f MODULE PROCEDURE h5rget_object_type_obj_f - END INTERFACE - + END INTERFACE + INTERFACE h5rget_name_f MODULE PROCEDURE h5rget_name_object_f - MODULE PROCEDURE h5rget_name_region_f + MODULE PROCEDURE h5rget_name_region_f - END INTERFACE + END INTERFACE CONTAINS - + !---------------------------------------------------------------------- -! Name: h5rcreate_object_f +! Name: h5rcreate_object_f ! ! Purpose: Creates reference to the object ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - name of the object at the specified location -! Outputs: +! Outputs: ! ref - reference to the specified object -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: This is a module procedure for the h5rcreate_f -! subroutine. +! Comment: This is a module procedure for the h5rcreate_f +! subroutine. !---------------------------------------------------------------------- - + SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified - ! by loc_id identifier - TYPE(hobj_ref_t_f), INTENT(OUT) :: ref ! Object reference - INTEGER, INTENT(OUT) :: hdferr ! Error code + ! by loc_id identifier + TYPE(hobj_ref_t_f), INTENT(OUT) :: ref ! Object reference + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: namelen ! Name length INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference @@ -114,9 +114,9 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_OBJECT_C':: h5rcreate_object_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: name INTEGER(HADDR_T) :: ref_f - INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER :: namelen END FUNCTION h5rcreate_object_c @@ -126,45 +126,45 @@ ref_f = 0 hdferr = h5rcreate_object_c(ref_f, loc_id, name, namelen ) ref%ref = ref_f - + END SUBROUTINE h5rcreate_object_f - + !---------------------------------------------------------------------- -! Name: h5rcreate_region_f +! Name: h5rcreate_region_f ! ! Purpose: Creates r eference to the dataset region ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - name of the dataset at the specified location ! space_id - dataspace identifier that describes selected region -! Outputs: +! Outputs: ! ref - reference to the dataset region -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: This is a module procedure for the h5rcreate_f -! subroutine. +! Comment: This is a module procedure for the h5rcreate_f +! subroutine. !---------------------------------------------------------------------- - + SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier - TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference - INTEGER, INTENT(OUT) :: hdferr ! Error code + ! by loc_id identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier + TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: namelen ! Name length INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference @@ -178,13 +178,13 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name -! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + !DEC$ATTRIBUTES reference :: name +! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: space_id END FUNCTION h5rcreate_region_c END INTERFACE @@ -194,42 +194,42 @@ ref%ref = ref_f END SUBROUTINE h5rcreate_region_f - + !---------------------------------------------------------------------- ! Name: h5rdereference_object_f ! ! Purpose: Opens the HDF5 object referenced ! -! Inputs: -! dset_id - identifier of the dataset containing -! reference +! Inputs: +! dset_id - identifier of the dataset containing +! reference ! ref - reference to open -! Outputs: +! Outputs: ! obj_id - object_identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: This is a module procedure for the h5rdereference_f -! subroutine. +! Comment: This is a module procedure for the h5rdereference_f +! subroutine. !---------------------------------------------------------------------- - - + + SUBROUTINE h5rdereference_object_f(dset_id, ref, obj_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference @@ -243,9 +243,9 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RDEREFERENCE_OBJECT_C':: h5rdereference_object_c !DEC$ENDIF ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HADDR_T) :: ref_f - INTEGER(HID_T), INTENT(OUT) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: obj_id END FUNCTION h5rdereference_object_c END INTERFACE @@ -253,42 +253,42 @@ hdferr = h5rdereference_object_c(dset_id, ref_f, obj_id ) END SUBROUTINE h5rdereference_object_f - + !---------------------------------------------------------------------- ! Name: h5rdereference_region_f ! ! Purpose: Opens the dataset region ! -! Inputs: -! dset_id - identifier of the dataset containing -! reference to teh regions +! Inputs: +! dset_id - identifier of the dataset containing +! reference to teh regions ! ref - reference to open -! Outputs: +! Outputs: ! obj_id - dataspace identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: This is a module procedure for the h5rdereference_f -! subroutine. +! Comment: This is a module procedure for the h5rdereference_f +! subroutine. !---------------------------------------------------------------------- - - + + SUBROUTINE h5rdereference_region_f(dset_id, ref, obj_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference @@ -301,10 +301,10 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RDEREFERENCE_REGION_C':: h5rdereference_region_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id -! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + INTEGER(HID_T), INTENT(IN) :: dset_id +! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: obj_id END FUNCTION h5rdereference_region_c END INTERFACE @@ -312,43 +312,43 @@ hdferr = h5rdereference_region_c(dset_id, ref_f, obj_id ) END SUBROUTINE h5rdereference_region_f - + !---------------------------------------------------------------------- ! Name: h5rget_region_region_f ! ! Purpose: Retrieves a dataspace with the specified region selected ! -! Inputs: -! dset_id - identifier of the dataset containing -! reference to the regions +! Inputs: +! dset_id - identifier of the dataset containing +! reference to the regions ! ref - reference to open -! Outputs: +! Outputs: ! space_id - dataspace identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: This is a module procedure for the h5rget_region_f -! subroutine. +! Comment: This is a module procedure for the h5rget_region_f +! subroutine. !---------------------------------------------------------------------- - - - + + + SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference ! INTEGER, EXTERNAL :: h5rget_region_region_c @@ -360,10 +360,10 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id -! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + INTEGER(HID_T), INTENT(IN) :: dset_id +! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: space_id + INTEGER(HID_T), INTENT(OUT) :: space_id END FUNCTION h5rget_region_region_c END INTERFACE @@ -371,17 +371,17 @@ hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) END SUBROUTINE h5rget_region_region_f - + !---------------------------------------------------------------------- ! Name: h5rget_object_type_obj_f ! -! Purpose: Retrieves the type of object that an object reference points to. +! Purpose: Retrieves the type of object that an object reference points to. ! -! Inputs: -! dset_id - identifier of the dataset containing +! Inputs: +! dset_id - identifier of the dataset containing ! reference to the objects ! ref - reference to open -! Outputs: +! Outputs: ! obj_type - object_type, possible values: ! H5G_UNKNOWN_F (-1) ! H5G_GROUP_F 0 @@ -389,36 +389,36 @@ ! H5G_TYPE_F 2 ! H5G_LINK_F 3 ! -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: This is a module procedure for the h5rget_object_type_f -! subroutine. +! Comment: This is a module procedure for the h5rget_object_type_f +! subroutine. !---------------------------------------------------------------------- - + SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER, INTENT(OUT) :: obj_type ! Object type + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference + INTEGER, INTENT(OUT) :: obj_type ! Object type ! H5G_UNKNOWN_F (-1) ! H5G_GROUP_F 0 ! H5G_DATASET_F 1 ! H5G_TYPE_F 2 ! H5G_LINK_F 3 - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference ! INTEGER, EXTERNAL :: h5rget_object_type_obj_c @@ -431,9 +431,9 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_OBJECT_TYPE_OBJ_C':: h5rget_object_type_obj_c !DEC$ENDIF ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HADDR_T) :: ref_f - INTEGER, INTENT(OUT) :: obj_type + INTEGER, INTENT(OUT) :: obj_type END FUNCTION h5rget_object_type_obj_c END INTERFACE @@ -451,38 +451,38 @@ ! loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. ! ref - An object or dataset region reference. ! -! Outputs: +! Outputs: ! name - A name associated with the referenced object or dataset region. ! -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! size - The size of the name buffer. ! ! Programmer: M.S. Breitenfeld ! March 28, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the dataset containing the reference + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the dataset containing the reference ! or for the group that dataset is in. TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! The size of the name buffer, ! returning 0 (zero) if no name is associated with the identifier CHARACTER(LEN=*), INTENT(OUT) :: name ! A name associated with the referenced object or dataset region. - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference INTEGER(SIZE_T) :: size_default INTEGER(SIZE_T) :: name_len - + INTERFACE INTEGER FUNCTION h5rget_name_object_c(loc_id, ref_f, name, name_len, size_default) USE H5GLOBAL @@ -498,14 +498,14 @@ INTEGER(SIZE_T) :: name_len END FUNCTION h5rget_name_object_c END INTERFACE - + name_len=LEN(name) ref_f = ref%ref hdferr = h5rget_name_object_c(loc_id, ref_f, name, name_len, size_default) - + IF(PRESENT(size)) size = size_default - + END SUBROUTINE h5rget_name_object_f !---------------------------------------------------------------------- @@ -517,38 +517,38 @@ ! loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. ! ref - An object or dataset region reference. ! -! Outputs: +! Outputs: ! name - A name associated with the referenced object or dataset region. ! -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! size - The size of the name buffer. ! ! Programmer: M.S. Breitenfeld ! March 28, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the dataset containing the reference + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the dataset containing the reference ! or for the group that dataset is in. TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! The size of the name buffer, ! returning 0 (zero) if no name is associated with the identifier CHARACTER(LEN=*), INTENT(OUT) :: name ! A name associated with the referenced object or dataset region. INTEGER, INTENT(OUT) :: hdferr ! Error code - + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference INTEGER(SIZE_T) :: size_default INTEGER(SIZE_T) :: name_len - + INTERFACE INTEGER FUNCTION h5rget_name_region_c(loc_id, ref_f, name, name_len, size_default) USE H5GLOBAL @@ -564,14 +564,14 @@ INTEGER(SIZE_T) :: name_len END FUNCTION h5rget_name_region_c END INTERFACE - + name_len=LEN(name) ref_f = ref%ref hdferr = h5rget_name_region_c(loc_id, ref_f, name, name_len, size_default) - + IF(PRESENT(size)) size = size_default - + END SUBROUTINE h5rget_name_region_f END MODULE H5R diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index 9b0356f..dea3ff0 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -37,7 +37,7 @@ nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f hid_t c_space_id; int i; int_f ret_value = 0; - + /* * Transpose dimension arrays because of C-FORTRAN storage order */ @@ -45,11 +45,11 @@ nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f c_dims[i] = dims[*rank - i - 1]; c_maxdims[i] = maxdims[*rank - i - 1]; } /* end for */ - + c_space_id = H5Screate_simple(*rank, c_dims, c_maxdims); - if(c_space_id < 0) + if(c_space_id < 0) HGOTO_DONE(FAIL) - + *space_id = (hid_t_f)c_space_id; done: @@ -204,7 +204,7 @@ nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) * Returns: 0 on success, -1 on failure * Programmer: Xiangyang Su * Monday, November 15, 1999 - * Modifications: + * Modifications: * Transpose dimension arrays because of C-FORTRAN storage order * M.S. Breitenfeld *---------------------------------------------------------------------------*/ @@ -281,12 +281,12 @@ nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end) hsize_t c_end[H5S_MAX_RANK]; int i, rank; int_f ret_value = 0; - + c_space_id = *space_id; rank = H5Sget_simple_extent_ndims(c_space_id); if(rank < 0 ) HGOTO_DONE(FAIL) - + if(H5Sget_select_bounds(c_space_id, c_start, c_end) < 0) HGOTO_DONE(FAIL) diff --git a/fortran/src/H5Sff.f90 b/fortran/src/H5Sff.f90 index 7cabb00..06bebef 100644 --- a/fortran/src/H5Sff.f90 +++ b/fortran/src/H5Sff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,54 +11,54 @@ ! 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 contains Fortran90 interfaces for H5S functions. -! +! MODULE H5S USE H5GLOBAL - + CONTAINS - + !---------------------------------------------------------------------- -! Name: h5screate_simple_f +! Name: h5screate_simple_f ! ! Purpose: Creates a new simple data space and opens it for access . ! -! Inputs: +! Inputs: ! rank - number of dimensions ! dims - an array of the size of each dimension -! Outputs: +! Outputs: ! space_id - dataspace identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! maxdims - an array of the maximum size of each +! maxdims - an array of the maximum size of each ! dimension ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) IMPLICIT NONE - INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - ! Array with the dimension - ! sizes - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier + INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + ! Array with the dimension + ! sizes + INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) - ! Array with the maximum - ! dimension sizes + INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) + ! Array with the maximum + ! dimension sizes INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims ! INTEGER, EXTERNAL :: h5screate_simple_c @@ -76,44 +76,44 @@ INTEGER(HID_T), INTENT(OUT) :: space_id END FUNCTION h5screate_simple_c END INTERFACE - + allocate (f_maxdims(rank), stat=hdferr) - if (hdferr .NE. 0) then + if (hdferr .NE. 0) then hdferr = -1 return - endif - if (present(maxdims)) then - f_maxdims = maxdims + endif + if (present(maxdims)) then + f_maxdims = maxdims else f_maxdims = dims - endif + endif hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) deallocate(f_maxdims) END SUBROUTINE h5screate_simple_f - + !---------------------------------------------------------------------- -! Name: h5sclose_f +! Name: h5sclose_f ! -! Purpose: Releases and terminates access to a dataspace. +! Purpose: Releases and terminates access to a dataspace. ! -! Inputs: +! Inputs: ! space_id - identifier of dataspace to release -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sclose_f(space_id, hdferr) @@ -139,39 +139,39 @@ END SUBROUTINE h5sclose_f !---------------------------------------------------------------------- -! Name: h5screate_f +! Name: h5screate_f ! -! Purpose: Creates a new dataspace of a specified type. +! Purpose: Creates a new dataspace of a specified type. ! -! Inputs: +! Inputs: ! classtype - the type of the dataspace to be created -! Outputs: +! Outputs: ! space_id - dataspace identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5screate_f(classtype, space_id, hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: classtype ! The type of the dataspace - ! to be created. + ! to be created. ! Possible values are: ! H5S_SCALAR_F (0) ! H5S_SIMPLE_F(1) ! H5S_NULL_F(2) - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5screate_c @@ -193,42 +193,42 @@ END SUBROUTINE h5screate_f !---------------------------------------------------------------------- -! Name: h5scopy_f +! Name: h5scopy_f ! -! Purpose: Creates an exact copy of a dataspace. +! Purpose: Creates an exact copy of a dataspace. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! Outputs: +! Outputs: ! new_space_id - identifier of dataspace's copy -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: new_space_id - ! Identifier of dataspace's copy + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: new_space_id + ! Identifier of dataspace's copy INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5scopy_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5scopy_c(space_id, new_space_id) + INTEGER FUNCTION h5scopy_c(space_id, new_space_id) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOPY_C'::h5scopy_c @@ -239,41 +239,41 @@ END INTERFACE hdferr = h5scopy_c(space_id, new_space_id) - + END SUBROUTINE h5scopy_f !---------------------------------------------------------------------- -! Name: h5sget_select_hyper_nblocks_f +! Name: h5sget_select_hyper_nblocks_f ! -! Purpose: Get number of hyperslab blocks. +! Purpose: Get number of hyperslab blocks. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! Outputs: +! Outputs: ! num_blocks - number of hyperslab blocks in the current ! hyperslab selection -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - !number of hyperslab blocks - !in the current dataspace - !selection + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + !number of hyperslab blocks + !in the current dataspace + !selection INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5sget_select_hyper_nblocks_c @@ -286,52 +286,52 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_NBLOCKS_C'::h5sget_select_hyper_nblocks_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks END FUNCTION h5sget_select_hyper_nblocks_c END INTERFACE hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) - + END SUBROUTINE h5sget_select_hyper_nblocks_f !---------------------------------------------------------------------- -! Name: h5sget_select_hyper_blocklist_f +! Name: h5sget_select_hyper_blocklist_f ! -! Purpose: Gets the list of hyperslab blocks currently selected. +! Purpose: Gets the list of hyperslab blocks currently selected. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier ! startblock - hyperslab block to start with ! num_blocks - number of blocks to get -! Outputs: +! Outputs: ! buf - buffer to hold block list -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & num_blocks, buf, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startblock - !Hyperslab block to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - !number of hyperslab blocks - !to get in the current dataspace - !selection - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(IN) :: startblock + !Hyperslab block to start with. + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + !number of hyperslab blocks + !to get in the current dataspace + !selection + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf !List of hyperslab blocks selected INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -346,55 +346,55 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_BLOCKLIST_C'::h5sget_select_hyper_blocklist_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startblock - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startblock + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf END FUNCTION h5sget_select_hyper_blocklist_c END INTERFACE - + hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, & num_blocks, buf ) - + END SUBROUTINE h5sget_select_hyper_blocklist_f !---------------------------------------------------------------------- -! Name: h5sget_select_bounds_f +! Name: h5sget_select_bounds_f ! -! Purpose: Gets the bounding box containing the current selection. +! Purpose: Gets the bounding box containing the current selection. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! -! Outputs: +! +! Outputs: ! start - starting coordinates of bounding box ! end - ending coordinates of bounding box -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - ! Starting coordinates of the bounding box. + ! Starting coordinates of the bounding box. INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END !Ending coordinates of the bounding box, - !i.e., the coordinates of the diagonally - !opposite corner + !i.e., the coordinates of the diagonally + !opposite corner INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE @@ -408,43 +408,43 @@ INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END END FUNCTION h5sget_select_bounds_c END INTERFACE - + hdferr = h5sget_select_bounds_c(space_id, start, END) - + END SUBROUTINE h5sget_select_bounds_f !---------------------------------------------------------------------- -! Name: h5sget_select_elem_npoints_f +! Name: h5sget_select_elem_npoints_f ! -! Purpose: Gets the number of element points in the current selection +! Purpose: Gets the number of element points in the current selection ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! Outputs: -! num_points - number of element points in the current +! Outputs: +! num_points - number of element points in the current ! dataspace selection -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - !number of element points - !in the current dataspace - !selection + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + !number of element points + !in the current dataspace + !selection INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5sget_select_elem_npoints_c @@ -457,50 +457,50 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_NPOINTS_C'::h5sget_select_elem_npoints_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points END FUNCTION h5sget_select_elem_npoints_c END INTERFACE hdferr = h5sget_select_elem_npoints_c (space_id, num_points) - + END SUBROUTINE h5sget_select_elem_npoints_f !---------------------------------------------------------------------- -! Name: h5sget_select_elem_pointlist_f +! Name: h5sget_select_elem_pointlist_f ! -! Purpose: Gets the list of element points currently selected. +! Purpose: Gets the list of element points currently selected. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! startpoint - element point to start with +! startpoint - element point to start with ! num_points - number of elemnt points to get -! Outputs: +! Outputs: ! buf - buffer with element points selected -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & num_points, buf, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - !Element point to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_points - !Number of element points to get - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + !Element point to start with. + INTEGER(HSIZE_T), INTENT(IN) :: num_points + !Number of element points to get + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf !List of element points selected INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -512,9 +512,9 @@ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_POINTLIST_C'::h5sget_select_elem_pointlist_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - INTEGER(HSIZE_T), INTENT(IN) :: num_points - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + INTEGER(HSIZE_T), INTENT(IN) :: num_points + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf END FUNCTION h5sget_select_elem_pointlist_c END INTERFACE @@ -524,47 +524,47 @@ END SUBROUTINE h5sget_select_elem_pointlist_f !---------------------------------------------------------------------- -! Name: h5sselect_elements_f +! Name: h5sselect_elements_f ! -! Purpose: Selects elements to be included in the selection for -! a dataspace +! Purpose: Selects elements to be included in the selection for +! a dataspace ! -! Inputs: +! Inputs: ! space_id - dataspace identifier ! operator - flag, valid values are: ! H5S_SELECT_SET_F (0) ! H5S_SELECT_OR_F (1) ! rank - number of dataspace dimensions ! num_elements - number of elements to be selected -! coord - 2D (rank x num_elements) array with the +! coord - 2D (rank x num_elements) array with the ! elements coordinates -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & + SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & num_elements, coord, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER, INTENT(IN) :: OPERATOR ! Flag, valid values are: ! H5S_SELECT_SET_F (0) ! H5S_SELECT_OR_F (1) - INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions + INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions INTEGER(SIZE_T), INTENT(IN) :: num_elements ! Number of elements to be ! selected - INTEGER(HSIZE_T), DIMENSION(rank,num_elements), INTENT(IN) :: coord + INTEGER(HSIZE_T), DIMENSION(rank,num_elements), INTENT(IN) :: coord ! Array with the coordinates ! of the selected elements ! coord(rank, num_elements) @@ -585,7 +585,7 @@ INTEGER(HSIZE_T),DIMENSION(*) :: c_c_coord END FUNCTION h5sselect_elements_c END INTERFACE - + ALLOCATE(c_coord(rank,num_elements), STAT = error) IF (error.NE. 0) THEN hdferr = -1 @@ -597,37 +597,37 @@ hdferr = h5sselect_elements_c(space_id, OPERATOR, num_elements, c_coord) DEALLOCATE(c_coord) - + END SUBROUTINE h5sselect_elements_f !---------------------------------------------------------------------- -! Name: h5sselect_all_f +! Name: h5sselect_all_f ! -! Purpose: Selects the entire dataspace. +! Purpose: Selects the entire dataspace. ! -! Inputs: +! Inputs: ! space_id - identifier for the dataspace in which ! selection being made -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sselect_all_f(space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5sselect_all_c @@ -648,33 +648,33 @@ END SUBROUTINE h5sselect_all_f !---------------------------------------------------------------------- -! Name: h5sselect_none_f +! Name: h5sselect_none_f ! -! Purpose: Resets the selection region to include no elements. +! Purpose: Resets the selection region to include no elements. ! -! Inputs: -! space_id - the identifier for the dataspace in which -! the selection is being reset. -! Outputs: -! hdferr: - error code +! Inputs: +! space_id - the identifier for the dataspace in which +! the selection is being reset. +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sselect_none_f(space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5sselect_none_c @@ -686,7 +686,7 @@ !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_NONE_C'::h5sselect_none_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: space_id END FUNCTION h5sselect_none_c END INTERFACE @@ -695,36 +695,36 @@ END SUBROUTINE h5sselect_none_f !---------------------------------------------------------------------- -! Name: h5sselect_valid_f +! Name: h5sselect_valid_f ! -! Purpose: Verifies that the selection is within the extent of -! the dataspace. +! Purpose: Verifies that the selection is within the extent of +! the dataspace. ! -! Inputs: -! space_id - identifier for the dataspace for which +! Inputs: +! space_id - identifier for the dataspace for which ! selection is verified -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier LOGICAL, INTENT(OUT) :: status ! TRUE if the selection is ! contained within the extent, - ! FALSE otherwise. + ! FALSE otherwise. INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine @@ -732,14 +732,14 @@ ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5sselect_valid_c(space_id, flag) + INTEGER FUNCTION h5sselect_valid_c(space_id, flag) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_VALID_C'::h5sselect_valid_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: space_id INTEGER :: flag - END FUNCTION h5sselect_valid_c + END FUNCTION h5sselect_valid_c END INTERFACE hdferr = h5sselect_valid_c(space_id, flag) @@ -749,34 +749,34 @@ END SUBROUTINE h5sselect_valid_f !---------------------------------------------------------------------- -! Name: h5sget_simple_extent_npoints_f +! Name: h5sget_simple_extent_npoints_f ! -! Purpose: Determines the number of elements in a dataspace. +! Purpose: Determines the number of elements in a dataspace. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! Outputs: +! Outputs: ! npoints - number of elements in the dataspace -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(OUT) :: npoints ! Number of elements in + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(OUT) :: npoints ! Number of elements in ! dataspace INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -784,7 +784,7 @@ ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) + INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NPOINTS_C'::h5sget_simple_extent_npoints_c @@ -795,46 +795,46 @@ END INTERFACE hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) - + END SUBROUTINE h5sget_simple_extent_npoints_f !---------------------------------------------------------------------- -! Name: h5sget_select_npoints_f +! Name: h5sget_select_npoints_f ! -! Purpose: Determines the number of elements in a dataspace selection. +! Purpose: Determines the number of elements in a dataspace selection. ! -! Inputs: -! space_id - dataspace identifier -! Outputs: +! Inputs: +! space_id - dataspace identifier +! Outputs: ! npoints - number of points in the dataspace selection -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER(HSSIZE_T), INTENT(OUT) :: npoints ! Number of elements in the - ! selection + ! selection INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5sget_select_npoints_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) + INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_NPOINTS_C'::h5sget_select_npoints_c @@ -845,45 +845,45 @@ END INTERFACE hdferr = h5sget_select_npoints_c(space_id, npoints) - + END SUBROUTINE h5sget_select_npoints_f !---------------------------------------------------------------------- -! Name: h5sget_simple_extent_ndims_f +! Name: h5sget_simple_extent_ndims_f ! -! Purpose: Determines the dimensionality of a dataspace +! Purpose: Determines the dimensionality of a dataspace ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! Outputs: +! Outputs: ! rank - number of dataspace dimensions -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: rank ! Number of dimensions + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: rank ! Number of dimensions INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5sget_simple_extent_ndims_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) + INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NDIMS_C'::h5sget_simple_extent_ndims_c @@ -894,44 +894,44 @@ END INTERFACE hdferr = h5sget_simple_extent_ndims_c(space_id, rank) - + END SUBROUTINE h5sget_simple_extent_ndims_f !---------------------------------------------------------------------- -! Name: h5sget_simple_extent_dims_f +! Name: h5sget_simple_extent_dims_f ! -! Purpose: Retrieves dataspace dimension size and maximum size. +! Purpose: Retrieves dataspace dimension size and maximum size. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! Outputs: +! Outputs: ! dims - array to store size of each dimension -! maxdims - array to store maximum size of each +! maxdims - array to store maximum size of each ! dimension -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - ! Array to store dimension sizes - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - ! Array to store max dimension - ! sizes + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + ! Array to store dimension sizes + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + ! Array to store max dimension + ! sizes INTEGER, INTENT(OUT) :: hdferr ! Error code: -1 on failure, ! number of dimensions on ! on success @@ -952,43 +952,43 @@ END INTERFACE hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) - + END SUBROUTINE h5sget_simple_extent_dims_f !---------------------------------------------------------------------- -! Name: h5sget_simple_extent_type_f +! Name: h5sget_simple_extent_type_f ! -! Purpose: Determine the current class of a dataspace +! Purpose: Determine the current class of a dataspace ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! Outputs: +! Outputs: ! classtype - class type, possible values are: ! H5S_NO_CLASS_F (-1) ! H5S_SCALAR_F (0) ! H5S_SIMPLE_F (1) ! H5S_NULL_F (2) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER, INTENT(OUT) :: classtype ! Class type , possible values - ! are: + ! are: ! H5S_NO_CLASS_F (-1) ! H5S_SCALAR_F (0) ! H5S_SIMPLE_F (1) @@ -1010,49 +1010,49 @@ END INTERFACE hdferr = h5sget_simple_extent_type_c(space_id, classtype) - + END SUBROUTINE h5sget_simple_extent_type_f !---------------------------------------------------------------------- -! Name: h5sset_extent_simple_f +! Name: h5sset_extent_simple_f ! -! Purpose: Sets or resets the size of an existing dataspace. +! Purpose: Sets or resets the size of an existing dataspace. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier ! rank - dataspace number of dimensions ! current_size - array with the new sizes of dimensions -! maximum_size - array with the new maximum sizes of +! maximum_size - array with the new maximum sizes of ! dimensions -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & - maximum_size, hdferr) + maximum_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(IN) :: rank ! Dataspace rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(IN) :: rank ! Dataspace rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size ! Array with the new sizes - ! of dimensions - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + ! of dimensions + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size ! Array with the new maximum - ! sizes of dimensions - ! sizes + ! sizes of dimensions + ! sizes INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5sset_extent_simple_c @@ -1060,7 +1060,7 @@ ! INTERFACE INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & - current_size, maximum_size) + current_size, maximum_size) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_SIMPLE_C'::h5sset_extent_simple_c @@ -1074,49 +1074,49 @@ hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & maximum_size) - + END SUBROUTINE h5sset_extent_simple_f !---------------------------------------------------------------------- -! Name: h5sis_simple_f +! Name: h5sis_simple_f ! -! Purpose: Determines whether a dataspace is a simple dataspace. +! Purpose: Determines whether a dataspace is a simple dataspace. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! Outputs: +! Outputs: ! status - flag to indicate if dataspace -! is simple or not -! hdferr: - error code +! is simple or not +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sis_simple_f(space_id, status, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier LOGICAL, INTENT(OUT) :: status ! Flag, idicates if dataspace ! is simple or not ( TRUE or - ! FALSE) + ! FALSE) INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" ! INTEGER, EXTERNAL :: h5sis_simple_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5sis_simple_c(space_id, flag) + INTEGER FUNCTION h5sis_simple_c(space_id, flag) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SIS_SIMPLE_C'::h5sis_simple_c @@ -1129,47 +1129,47 @@ hdferr = h5sis_simple_c(space_id, flag) status = .TRUE. if (flag .EQ. 0) status = .FALSE. - + END SUBROUTINE h5sis_simple_f !---------------------------------------------------------------------- -! Name: h5soffset_simple_f +! Name: h5soffset_simple_f ! -! Purpose: Sets the offset of a simple dataspace. +! Purpose: Sets the offset of a simple dataspace. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! offset - the offset at which to position the -! selection -! Outputs: -! hdferr: - error code +! offset - the offset at which to position the +! selection +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset ! The offset at which to position - ! the selection + ! the selection INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5soffset_simple_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5soffset_simple_c(space_id, offset) + INTEGER FUNCTION h5soffset_simple_c(space_id, offset) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SOFFSET_SIMPLE_C'::h5soffset_simple_c @@ -1180,41 +1180,41 @@ END INTERFACE hdferr = h5soffset_simple_c(space_id, offset) - + END SUBROUTINE h5soffset_simple_f !---------------------------------------------------------------------- -! Name: h5sextent_copy_f +! Name: h5sextent_copy_f ! -! Purpose: Copies the extent of a dataspace. +! Purpose: Copies the extent of a dataspace. ! -! Inputs: -! dest_space_id - the identifier for the dataspace to which -! the extent is copied -! source_space_id - the identifier for the dataspace from +! Inputs: +! dest_space_id - the identifier for the dataspace to which +! the extent is copied +! source_space_id - the identifier for the dataspace from ! which the extent is copied -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dest_space_id ! Identifier of destination ! dataspace - INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source + INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source ! dataspace INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1233,42 +1233,42 @@ END INTERFACE hdferr = h5sextent_copy_c(dest_space_id, source_space_id) - + END SUBROUTINE h5sextent_copy_f !---------------------------------------------------------------------- -! Name: h5sset_extent_none_f +! Name: h5sset_extent_none_f ! -! Purpose: Removes the extent from a dataspace. +! Purpose: Removes the extent from a dataspace. ! -! Inputs: +! Inputs: ! space_id - dataspace identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sset_extent_none_f(space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5sset_extent_none_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5sset_extent_none_c(space_id) + INTEGER FUNCTION h5sset_extent_none_c(space_id) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_NONE_C'::h5sset_extent_none_c @@ -1278,64 +1278,64 @@ END INTERFACE hdferr = h5sset_extent_none_c(space_id) - + END SUBROUTINE h5sset_extent_none_f !---------------------------------------------------------------------- -! Name: h5sselect_hyperslab_f +! Name: h5sselect_hyperslab_f ! -! Purpose: Selects a hyperslab region to add to the current selected -! region +! Purpose: Selects a hyperslab region to add to the current selected +! region ! -! Inputs: +! Inputs: ! space_id - dataspace identifier ! operator - flag, valid values are: ! H5S_SELECT_SET_F (0) ! H5S_SELECT_OR_F (1) ! start - array with hyperslab offsets -! count - number of blocks included in the +! count - number of blocks included in the ! hyperslab -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! stride - array with hyperslab strides -! block - array with hyperslab block sizes +! block - array with hyperslab block sizes ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 +! port). March 6, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, & hdferr, stride, block) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier INTEGER, INTENT(IN) :: operator ! Flag, valid values are: ! H5S_SELECT_SET_F (0) ! H5S_SELECT_OR_F (1) - ! + ! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - ! Starting coordinates of the hyperslab - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - ! Number of blocks to select - ! from dataspace + ! Starting coordinates of the hyperslab + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + ! Number of blocks to select + ! from dataspace INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride ! Array of how many elements to move ! in each direction - INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block + INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block ! Sizes of element block - INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block + INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride INTEGER :: rank - INTEGER :: error1, error2 + INTEGER :: error1, error2 ! INTEGER, EXTERNAL :: h5sselect_hyperslab_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -1352,7 +1352,7 @@ INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride - INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block + INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block END FUNCTION h5sselect_hyperslab_c END INTERFACE @@ -1406,77 +1406,77 @@ def_stride, def_block) deallocate(def_block) deallocate(def_stride) - + END SUBROUTINE h5sselect_hyperslab_f !---------------------------------------------------------------------- -! Name: h5scombine_hyperslab_f +! Name: h5scombine_hyperslab_f ! -! Purpose: Combine a hyperslab selection with the current -! selection for a dataspace +! Purpose: Combine a hyperslab selection with the current +! selection for a dataspace ! -! Inputs: -! space_id - dataspace of selection to use +! Inputs: +! space_id - dataspace of selection to use ! operator - flag, valid values are: -! H5S_SELECT_NOOP_F -! H5S_SELECT_SET_F -! H5S_SELECT_OR_F -! H5S_SELECT_AND_F -! H5S_SELECT_XOR_F -! H5S_SELECT_NOTB_F -! H5S_SELECT_NOTA_F -! H5S_SELECT_APPEND_F -! H5S_SELECT_PREPEND_F +! H5S_SELECT_NOOP_F +! H5S_SELECT_SET_F +! H5S_SELECT_OR_F +! H5S_SELECT_AND_F +! H5S_SELECT_XOR_F +! H5S_SELECT_NOTB_F +! H5S_SELECT_NOTA_F +! H5S_SELECT_APPEND_F +! H5S_SELECT_PREPEND_F ! start - array with hyperslab offsets -! count - number of blocks included in the +! count - number of blocks included in the ! hyperslab -! Outputs: +! Outputs: ! hyper_id - identifier for the new hyperslab -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! stride - array with hyperslab strides -! block - array with hyperslab block sizes +! block - array with hyperslab block sizes ! ! Programmer: Elena Pourmal ! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: Commented out until 1.6 ? 10/08/2002 +! Comment: Commented out until 1.6 ? 10/08/2002 !---------------------------------------------------------------------- ! SUBROUTINE h5scombine_hyperslab_f(space_id, operator, start, count, & ! hyper_id, hdferr, stride, block) ! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier +! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier ! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! ! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - ! Starting coordinates of the hyperslab -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - ! Number of blocks to select - ! from dataspace -! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier + ! Starting coordinates of the hyperslab +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + ! Number of blocks to select + ! from dataspace +! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier ! INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride ! Array of how many elements to move ! in each direction -! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block +! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block ! Sizes of element block -! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block +! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block ! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride ! INTEGER :: rank -! INTEGER :: error1, error2 +! INTEGER :: error1, error2 ! INTERFACE ! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, & @@ -1490,7 +1490,7 @@ ! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start ! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count ! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride -! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block +! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block ! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! END FUNCTION h5scombine_hyperslab_c ! END INTERFACE @@ -1545,60 +1545,60 @@ ! def_stride, def_block, hyper_id) ! deallocate(def_block) ! deallocate(def_stride) - + ! END SUBROUTINE h5scombine_hyperslab_f !---------------------------------------------------------------------- -! Name: h5scombine_select_f +! Name: h5scombine_select_f ! -! Purpose: Combine two hyperslab selections with an operation +! Purpose: Combine two hyperslab selections with an operation ! and return a dataspace with resulting selection. ! -! Inputs: -! space1_id - dataspace of selection to use +! Inputs: +! space1_id - dataspace of selection to use ! operator - flag, valid values are: -! H5S_SELECT_NOOP_F -! H5S_SELECT_SET_F -! H5S_SELECT_OR_F -! H5S_SELECT_AND_F -! H5S_SELECT_XOR_F -! H5S_SELECT_NOTB_F -! H5S_SELECT_NOTA_F -! H5S_SELECT_APPEND_F -! H5S_SELECT_PREPEND_F -! space2_id - dataspace of selection to use -! Outputs: +! H5S_SELECT_NOOP_F +! H5S_SELECT_SET_F +! H5S_SELECT_OR_F +! H5S_SELECT_AND_F +! H5S_SELECT_XOR_F +! H5S_SELECT_NOTB_F +! H5S_SELECT_NOTA_F +! H5S_SELECT_APPEND_F +! H5S_SELECT_PREPEND_F +! space2_id - dataspace of selection to use +! Outputs: ! ds_id - idataspace identifier with the new selection -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: - NONE ! ! Programmer: Elena Pourmal ! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: commented out until 1.6 release(?) 10/08/2002 +! Comment: commented out until 1.6 release(?) 10/08/2002 !---------------------------------------------------------------------- ! SUBROUTINE h5scombine_select_f(space1_id, operator, space2_id, & ! ds_id, hdferr) ! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier +! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier +! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier ! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier ! INTEGER, INTENT(OUT) :: hdferr ! Error code ! ! INTERFACE @@ -1618,60 +1618,60 @@ ! hdferr = h5scombine_select_c(space1_id, operator, space2_id, & ! ds_id) ! return - + ! END SUBROUTINE h5scombine_select_f !---------------------------------------------------------------------- -! Name: h5sselect_select_f +! Name: h5sselect_select_f ! -! Purpose: Refine a hyperslab selection with an operation +! Purpose: Refine a hyperslab selection with an operation ! using second hyperslab ! -! Inputs: +! Inputs: ! space1_id - dataspace of selection to modify ! operator - flag, valid values are: -! H5S_SELECT_NOOP_F -! H5S_SELECT_SET_F -! H5S_SELECT_OR_F -! H5S_SELECT_AND_F -! H5S_SELECT_XOR_F -! H5S_SELECT_NOTB_F -! H5S_SELECT_NOTA_F -! H5S_SELECT_APPEND_F -! H5S_SELECT_PREPEND_F -! space2_id - dataspace of selection to use -! -! Outputs: -! hdferr: - error code +! H5S_SELECT_NOOP_F +! H5S_SELECT_SET_F +! H5S_SELECT_OR_F +! H5S_SELECT_AND_F +! H5S_SELECT_XOR_F +! H5S_SELECT_NOTB_F +! H5S_SELECT_NOTA_F +! H5S_SELECT_APPEND_F +! H5S_SELECT_PREPEND_F +! space2_id - dataspace of selection to use +! +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: - NONE ! ! Programmer: Elena Pourmal ! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment:Commented out until 1.6 release(?) 10/08/2002 EIP +! Comment:Commented out until 1.6 release(?) 10/08/2002 EIP !---------------------------------------------------------------------- ! SUBROUTINE h5sselect_select_f(space1_id, operator, space2_id, & ! hdferr) ! IMPLICIT NONE ! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to - ! modify -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier + ! modify +! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier ! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! ! INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTERFACE @@ -1689,45 +1689,45 @@ ! hdferr = h5sselect_select_c(space1_id, operator, space2_id) ! return - + ! END SUBROUTINE h5sselect_select_f !---------------------------------------------------------------------- -! Name: h5sget_select_type_f +! Name: h5sget_select_type_f ! ! Purpose: Retrieve the type of selection ! -! Inputs: +! Inputs: ! space_id - dataspace iidentifier with selection -! Outputs: +! Outputs: ! type - flag, valid values are: -! H5S_SEL_ERROR_F -! H5S_SEL_NONE_F -! H5S_SEL_POINTS_F -! H5S_SEL_HYPERSLABS_F -! H5S_SEL_ALL_F -! hdferr: - error code +! H5S_SEL_ERROR_F +! H5S_SEL_NONE_F +! H5S_SEL_POINTS_F +! H5S_SEL_HYPERSLABS_F +! H5S_SEL_ALL_F +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: - NONE ! ! Programmer: Elena Pourmal ! October 7, 2002 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sget_select_type_f(space_id, type, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to INTEGER, INTENT(OUT) :: type ! Selection type - ! H5S_SEL_ERROR_F - ! H5S_SEL_NONE_F - ! H5S_SEL_POINTS_F - ! H5S_SEL_HYPERSLABS_F - ! H5S_SEL_ALL_F + ! H5S_SEL_ERROR_F + ! H5S_SEL_NONE_F + ! H5S_SEL_POINTS_F + ! H5S_SEL_HYPERSLABS_F + ! H5S_SEL_ALL_F INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE @@ -1743,7 +1743,7 @@ hdferr = h5sget_select_type_c(space_id, type) return - + END SUBROUTINE h5sget_select_type_f !---------------------------------------------------------------------- @@ -1751,11 +1751,11 @@ ! ! Purpose: Decode a binary object description of data space and return a new object handle. ! -! Inputs: +! Inputs: ! buf - Buffer for the data space object to be decoded. ! obj_id - Object ID ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! @@ -1764,9 +1764,9 @@ ! Programmer: M.S. Breitenfeld ! March 26, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) @@ -1788,7 +1788,7 @@ END INTERFACE hdferr = h5sdecode_c(buf, obj_id) - + END SUBROUTINE h5sdecode_f !---------------------------------------------------------------------- @@ -1802,7 +1802,7 @@ ! nalloc - The size of the allocated buffer. ! Outputs: ! nalloc - The size of the buffer needed. -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! @@ -1811,9 +1811,9 @@ ! Programmer: M.S. Breitenfeld ! March 26, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) @@ -1836,25 +1836,25 @@ INTEGER(SIZE_T), INTENT(INOUT) :: nalloc END FUNCTION h5sencode_c END INTERFACE - + hdferr = h5sencode_c(buf, obj_id, nalloc) END SUBROUTINE h5sencode_f - + !---------------------------------------------------------------------- -! Name: h5sextent_equal_f +! Name: h5sextent_equal_f ! ! Purpose: Determines whether two dataspace extents are equal. ! -! Inputs: +! Inputs: ! space1_id - First dataspace identifier. ! space2_id - Second dataspace identifier. -! Outputs: +! Outputs: ! Equal - .TRUE. if equal, .FALSE. if unequal. -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! @@ -1863,7 +1863,7 @@ ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) @@ -1886,14 +1886,14 @@ INTEGER(HID_T) :: c_equal END FUNCTION h5sextent_equal_c END INTERFACE - + hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) - + equal = .FALSE. - IF(c_equal.GT.0) equal = .TRUE. + IF(c_equal.GT.0) equal = .TRUE. + - END SUBROUTINE h5sextent_equal_f END MODULE H5S diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90 index 2e981ad..c6c96d0 100644 --- a/fortran/src/H5Tff.f90 +++ b/fortran/src/H5Tff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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 contains FORTRAN90 interfaces for H5T functions @@ -19,41 +19,41 @@ MODULE H5T USE H5GLOBAL - + CONTAINS !---------------------------------------------------------------------- -! Name: h5topen_f +! Name: h5topen_f ! -! Purpose: Opens named datatype. +! Purpose: Opens named datatype. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - a datatype name -! Outputs: +! Outputs: ! type_id - datatype identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! tapl_id - datatype access property list identifier. ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! ! Added optional parameter 'tapl_id' for compatability -! with H5Topen2. April 9, 2009. +! with H5Topen2. April 9, 2009. ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -70,7 +70,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TOPEN_C'::h5topen_c !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name + !DEC$ATTRIBUTES reference ::name INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER :: namelen @@ -78,7 +78,7 @@ CONTAINS INTEGER(HID_T) :: tapl_id_default END FUNCTION h5topen_c END INTERFACE - + namelen = LEN(name) tapl_id_default = H5P_DEFAULT_F @@ -88,47 +88,47 @@ CONTAINS END SUBROUTINE h5topen_f !---------------------------------------------------------------------- -! Name: h5tcommit_f +! Name: h5tcommit_f ! -! Purpose: Commits a transient datatype to a file, creating a -! new named datatype. +! Purpose: Commits a transient datatype to a file, creating a +! new named datatype. ! -! Inputs: +! Inputs: ! loc_id - location identifier ! name - name of the datatype to be stored ! at the specified location ! type_id - identifier of a datatype to be stored -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! lcpl_id - Link creation property list ! tcpl_id - Datatype creation property list ! tapl_id - Datatype access property list ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: - Explicit Fortran interfaces were added for +! Modifications: - Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). March 7, 2001 ! -! - Added optional parameters introduced in version 1.8 +! - Added optional parameters introduced in version 1.8 ! M.S. Breitenfeld ! ! ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, & lcpl_id, tcpl_id, tapl_id ) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list @@ -150,7 +150,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_C'::h5tcommit_c !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name + !DEC$ATTRIBUTES reference ::name INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER :: namelen @@ -168,7 +168,7 @@ CONTAINS IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id IF (PRESENT(tapl_id)) tapl_id_default = tapl_id - + namelen = LEN(name) hdferr = h5tcommit_c(loc_id, name, namelen, type_id, & @@ -177,36 +177,36 @@ CONTAINS END SUBROUTINE h5tcommit_f !---------------------------------------------------------------------- -! Name: h5tcopy_f +! Name: h5tcopy_f ! -! Purpose: iCreates a copy of exisiting datatype. +! Purpose: iCreates a copy of exisiting datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! new_type_id - identifier of datatype's copy -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: new_type_id - ! Identifier of datatype's copy + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: new_type_id + ! Identifier of datatype's copy INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tcopy_c @@ -227,37 +227,37 @@ CONTAINS END SUBROUTINE h5tcopy_f !---------------------------------------------------------------------- -! Name: h5tequal_f +! Name: h5tequal_f ! -! Purpose: Determines whether two datatype identifiers refer -! to the same datatype. +! Purpose: Determines whether two datatype identifiers refer +! to the same datatype. ! -! Inputs: +! Inputs: ! type1_id - datatype identifier ! type2_id - datatype identifier -! Outputs: +! Outputs: ! flag - TRUE/FALSE flag to indicate ! if two datatypes are equal -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two ! datatypes are equal INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -271,8 +271,8 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TEQUAL_C'::h5tequal_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type1_id - INTEGER(HID_T), INTENT(IN) :: type2_id + INTEGER(HID_T), INTENT(IN) :: type1_id + INTEGER(HID_T), INTENT(IN) :: type2_id INTEGER :: c_flag END FUNCTION h5tequal_c END INTERFACE @@ -283,33 +283,33 @@ CONTAINS END SUBROUTINE h5tequal_f !---------------------------------------------------------------------- -! Name: h5tclose_f +! Name: h5tclose_f ! -! Purpose: Releases a datatype. +! Purpose: Releases a datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tclose_f(type_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tclose_c @@ -329,13 +329,13 @@ CONTAINS END SUBROUTINE h5tclose_f !---------------------------------------------------------------------- -! Name: h5tget_class_f +! Name: h5tget_class_f ! -! Purpose: Returns the datatype class identifier. +! Purpose: Returns the datatype class identifier. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! class - class, possible values are: ! H5T_NO_CLASS_F (-1) ! H5T_INTEGER_F (0) @@ -347,27 +347,27 @@ CONTAINS ! H5T_COMPOUND_F (6) ! H5T_REFERENCE_F (7) ! H5T_ENUM_F (8) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_class_f(type_id, class, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: class + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: class ! Datatype class, possible values are: ! H5T_NO_CLASS_F (-1) ! H5T_INTEGER_F (0) @@ -390,7 +390,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CLASS_C'::h5tget_class_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: class END FUNCTION h5tget_class_c END INTERFACE @@ -399,34 +399,34 @@ CONTAINS END SUBROUTINE h5tget_class_f !---------------------------------------------------------------------- -! Name: h5tget_size_f +! Name: h5tget_size_f ! -! Purpose: Returns the size of a datatype. +! Purpose: Returns the size of a datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! size - datatype size -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_size_f(type_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -448,34 +448,34 @@ CONTAINS END SUBROUTINE h5tget_size_f !---------------------------------------------------------------------- -! Name: h5tset_size_f +! Name: h5tset_size_f ! -! Purpose: Sets the total size for an atomic datatype. +! Purpose: Sets the total size for an atomic datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! size - size of the datatype -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_size_f(type_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -497,39 +497,39 @@ CONTAINS END SUBROUTINE h5tset_size_f !---------------------------------------------------------------------- -! Name: h5tget_order_f +! Name: h5tget_order_f ! -! Purpose: Returns the byte order of an atomic datatype. +! Purpose: Returns the byte order of an atomic datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! order - byte order for the datatype, possible ! values are: ! H5T_ORDER_LE_F ! H5T_ORDER_BE_F ! H5T_ORDER_VAX_F (not implemented yet) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_order_f(type_id, order, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: order + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: order ! Datatype byte order, bossible values are: ! H5T_ORDER_LE_F ! H5T_ORDER_BE_F @@ -554,43 +554,43 @@ CONTAINS END SUBROUTINE h5tget_order_f !---------------------------------------------------------------------- -! Name: h5tset_order_f +! Name: h5tset_order_f ! -! Purpose: Sets the byte ordering of an atomic datatype. +! Purpose: Sets the byte ordering of an atomic datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! order - datatype byte order ! Possible values are: ! H5T_ORDER_LE_F ! H5T_ORDER_BE_F ! H5T_ORDER_VAX_F (not implemented yet) -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_order_f(type_id, order, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER, INTENT(IN) :: order ! Datatype byte order, bossible values ! are: - ! H5T_ORDER_LE_F + ! H5T_ORDER_LE_F ! H5T_ORDER_BE_F - ! H5T_ORDER_VAX_F + ! H5T_ORDER_VAX_F INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tset_order_c @@ -611,34 +611,34 @@ CONTAINS END SUBROUTINE h5tset_order_f !---------------------------------------------------------------------- -! Name: h5tget_precision_f +! Name: h5tget_precision_f ! -! Purpose: Returns the precision of an atomic datatype. +! Purpose: Returns the precision of an atomic datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! precision - precision of the datatype -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_precision_f(type_id, precision, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -651,8 +651,8 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PRECISION_C'::h5tget_precision_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: precision + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: precision END FUNCTION h5tget_precision_c END INTERFACE @@ -660,33 +660,33 @@ CONTAINS END SUBROUTINE h5tget_precision_f !---------------------------------------------------------------------- -! Name: h5tset_precision_f +! Name: h5tset_precision_f ! -! Purpose: Sets the precision of an atomic datatype. +! Purpose: Sets the precision of an atomic datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! precision - datatype precision -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_precision_f(type_id, precision, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -699,8 +699,8 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PRECISION_C'::h5tset_precision_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: precision + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: precision END FUNCTION h5tset_precision_c END INTERFACE @@ -708,33 +708,33 @@ CONTAINS END SUBROUTINE h5tset_precision_f !---------------------------------------------------------------------- -! Name: h5tget_offset_f +! Name: h5tget_offset_f ! -! Purpose: Retrieves the bit offset of the first significant bit. +! Purpose: Retrieves the bit offset of the first significant bit. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! offset - offset value -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the ! first significant bit INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -748,8 +748,8 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_OFFSET_C'::h5tget_offset_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: offset + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: offset END FUNCTION h5tget_offset_c END INTERFACE @@ -757,33 +757,33 @@ CONTAINS END SUBROUTINE h5tget_offset_f !---------------------------------------------------------------------- -! Name: h5tset_offset_f +! Name: h5tset_offset_f ! -! Purpose: Sets the bit offset of the first significant bit. +! Purpose: Sets the bit offset of the first significant bit. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! offset - offset value -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the ! first significant bit INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -797,8 +797,8 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_OFFSET_C'::h5tset_offset_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: offset END FUNCTION h5tset_offset_c END INTERFACE @@ -806,44 +806,44 @@ CONTAINS END SUBROUTINE h5tset_offset_f !---------------------------------------------------------------------- -! Name: h5tget_pad_f +! Name: h5tget_pad_f ! -! Purpose: Retrieves the padding type of the least and -! most-significant bit padding. +! Purpose: Retrieves the padding type of the least and +! most-significant bit padding. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type +! Outputs: +! lsbpad - least-significant bit padding type +! msbpad - most-significant bit padding type ! Possible values of padding type are: ! H5T_PAD_ERROR_F = -1 ! H5T_PAD_ZERO_F = 0 ! H5T_PAD_ONE_F = 1 ! H5T_PAD_BACKGROUND_F = 2 ! H5T_PAD_NPAD_F = 3 -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: lsbpad ! padding type of the + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: lsbpad ! padding type of the ! least significant bit - INTEGER, INTENT(OUT) :: msbpad ! padding type of the + INTEGER, INTENT(OUT) :: msbpad ! padding type of the ! most significant bit ! Possible values of padding type are: ! H5T__PAD_ZERO_F = 0 @@ -864,7 +864,7 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PAD_C'::h5tget_pad_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: lsbpad + INTEGER, INTENT(OUT) :: lsbpad INTEGER, INTENT(OUT) :: msbpad END FUNCTION h5tget_pad_c END INTERFACE @@ -873,43 +873,43 @@ CONTAINS END SUBROUTINE h5tget_pad_f !---------------------------------------------------------------------- -! Name: h5tset_pad_f +! Name: h5tset_pad_f ! -! Purpose: Sets the least and most-significant bits padding types. +! Purpose: Sets the least and most-significant bits padding types. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type +! lsbpad - least-significant bit padding type +! msbpad - most-significant bit padding type ! Possible values of padding type are: ! H5T_PAD_ERROR_F = -1 ! H5T_PAD_ZERO_F = 0 ! H5T_PAD_ONE_F = 1 ! H5T_PAD_BACKGROUND_F = 2 ! H5T_PAD_NPAD_F = 3 -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: lsbpad ! padding type of the + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: lsbpad ! padding type of the ! least significant bit - INTEGER, INTENT(IN) :: msbpad ! padding type of the + INTEGER, INTENT(IN) :: msbpad ! padding type of the ! most significant bit ! Possible values of padding type are: ! H5T_PAD_ZERO_F = 0 @@ -929,7 +929,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PAD_C'::h5tset_pad_c !DEC$ENDIF - INTEGER, INTENT(IN) :: lsbpad + INTEGER, INTENT(IN) :: lsbpad INTEGER, INTENT(IN) :: msbpad END FUNCTION h5tset_pad_c END INTERFACE @@ -938,44 +938,44 @@ CONTAINS END SUBROUTINE h5tset_pad_f !---------------------------------------------------------------------- -! Name: h5tget_sign_f +! Name: h5tget_sign_f ! -! Purpose: Retrieves the sign type for an integer type. +! Purpose: Retrieves the sign type for an integer type. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: -! sign - sign type +! Outputs: +! sign - sign type ! Possible values are: ! Unsigned integer type H5T_SGN_NONE_F = 0 ! Two's complement signed integer type ! H5T_SGN_2_F = 1 -! or error value: H5T_SGN_ERROR_F=-1 -! hdferr: - error code +! or error value: H5T_SGN_ERROR_F=-1 +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER, INTENT(OUT) :: sign ! sign type for an integer type !possible values are: !Unsigned integer type H5T_SGN_NONE_F = 0 !Two's complement signed integer type !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 + !or error value: H5T_SGN_ERROR_F=-1 INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tget_sign_c @@ -996,44 +996,44 @@ CONTAINS END SUBROUTINE h5tget_sign_f !---------------------------------------------------------------------- -! Name: h5tset_sign_f +! Name: h5tset_sign_f ! -! Purpose: Sets the sign proprety for an integer type. +! Purpose: Sets the sign proprety for an integer type. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! sign - sign type +! sign - sign type ! Possible values are: ! Unsigned integer type H5T_SGN_NONE_F = 0 ! Two's complement signed integer type ! H5T_SGN_2_F = 1 -! or error value: H5T_SGN_ERROR_F=-1 -! Outputs: -! hdferr: - error code +! or error value: H5T_SGN_ERROR_F=-1 +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: sign !sign type for an integer type + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: sign !sign type for an integer type !possible values are: !Unsigned integer type H5T_SGN_NONE_F = 0 !Two's complement signed integer type !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 + !or error value: H5T_SGN_ERROR_F=-1 INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tset_sign_c @@ -1054,41 +1054,41 @@ CONTAINS END SUBROUTINE h5tset_sign_f !---------------------------------------------------------------------- -! Name: h5tget_fields_f +! Name: h5tget_fields_f ! -! Purpose: Retrieves floating point datatype bit field information. +! Purpose: Retrieves floating point datatype bit field information. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! spos - sign bit-position ! epos - exponent bit-position ! esize - size of exponent in bits ! mpos - mantissa position ! msize - size of mantissa in bits -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(OUT) :: epos ! exponent bit-position + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: spos ! sign bit-position + INTEGER(SIZE_T), INTENT(OUT) :: epos ! exponent bit-position INTEGER(SIZE_T), INTENT(OUT) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(OUT) :: mpos ! mantissa bit-position + INTEGER(SIZE_T), INTENT(OUT) :: mpos ! mantissa bit-position INTEGER(SIZE_T), INTENT(OUT) :: msize ! size of mantissa in bits INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1102,10 +1102,10 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_FIELDS_C'::h5tget_fields_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: spos - INTEGER(SIZE_T), INTENT(OUT) :: epos + INTEGER(SIZE_T), INTENT(OUT) :: spos + INTEGER(SIZE_T), INTENT(OUT) :: epos INTEGER(SIZE_T), INTENT(OUT) :: esize - INTEGER(SIZE_T), INTENT(OUT) :: mpos + INTEGER(SIZE_T), INTENT(OUT) :: mpos INTEGER(SIZE_T), INTENT(OUT) :: msize END FUNCTION h5tget_fields_c END INTERFACE @@ -1114,42 +1114,42 @@ CONTAINS END SUBROUTINE h5tget_fields_f !---------------------------------------------------------------------- -! Name: h5tset_fields_f +! Name: h5tset_fields_f ! -! Purpose: Sets locations and sizes of floating point bit fields. +! Purpose: Sets locations and sizes of floating point bit fields. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! spos - sign bit-position ! epos - exponent bit-position ! esize - size of exponent in bits ! mpos - mantissa position ! msize - size of mantissa in bits -! hdferr: - error code -! Outputs: -! hdferr: - error code +! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(IN) :: epos ! exponent bit-position + INTEGER(SIZE_T), INTENT(IN) :: spos ! sign bit-position + INTEGER(SIZE_T), INTENT(IN) :: epos ! exponent bit-position INTEGER(SIZE_T), INTENT(IN) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(IN) :: mpos ! mantissa bit-position + INTEGER(SIZE_T), INTENT(IN) :: mpos ! mantissa bit-position INTEGER(SIZE_T), INTENT(IN) :: msize ! size of mantissa in bits INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1163,10 +1163,10 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_FIELDS_C'::h5tset_fields_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: spos - INTEGER(SIZE_T), INTENT(IN) :: epos + INTEGER(SIZE_T), INTENT(IN) :: spos + INTEGER(SIZE_T), INTENT(IN) :: epos INTEGER(SIZE_T), INTENT(IN) :: esize - INTEGER(SIZE_T), INTENT(IN) :: mpos + INTEGER(SIZE_T), INTENT(IN) :: mpos INTEGER(SIZE_T), INTENT(IN) :: msize END FUNCTION h5tset_fields_c END INTERFACE @@ -1175,33 +1175,33 @@ CONTAINS END SUBROUTINE h5tset_fields_f !---------------------------------------------------------------------- -! Name: h5tget_ebias_f +! Name: h5tget_ebias_f ! -! Purpose: Retrieves the exponent bias of a floating-point type. +! Purpose: Retrieves the exponent bias of a floating-point type. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! ebias - datatype exponent bias -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1214,7 +1214,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_EBIAS_C'::h5tget_ebias_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(OUT) :: ebias END FUNCTION h5tget_ebias_c END INTERFACE @@ -1223,34 +1223,34 @@ CONTAINS END SUBROUTINE h5tget_ebias_f !---------------------------------------------------------------------- -! Name: h5tset_ebias_f +! Name: h5tset_ebias_f ! -! Purpose: Sets the exponent bias of a floating-point type. +! Purpose: Sets the exponent bias of a floating-point type. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! ebias - datatype exponent bias -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1263,7 +1263,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_EBIAS_C'::h5tset_ebias_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(IN) :: ebias END FUNCTION h5tset_ebias_c END INTERFACE @@ -1272,41 +1272,41 @@ CONTAINS END SUBROUTINE h5tset_ebias_f !---------------------------------------------------------------------- -! Name: h5tget_norm_f +! Name: h5tget_norm_f ! -! Purpose: Retrieves mantissa normalization of a floating-point -! datatype. +! Purpose: Retrieves mantissa normalization of a floating-point +! datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! norm - normalization types, valid values are: ! H5T_NORM_IMPLIED_F(0) ! H5T_NORM_MSBSET_F(1) ! H5T_NORM_NONE_F(2) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_norm_f(type_id, norm, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of + !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not + !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of !mantissa is always 1, H5T_NORM_NONE_F(2) !Mantissa is not normalize INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1329,41 +1329,41 @@ CONTAINS END SUBROUTINE h5tget_norm_f !---------------------------------------------------------------------- -! Name: h5tset_norm_f +! Name: h5tset_norm_f ! -! Purpose: Sets the mantissa normalization of a floating-point datatype. +! Purpose: Sets the mantissa normalization of a floating-point datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! norm - normalization types, valid values are: ! H5T_NORM_IMPLIED_F(0) ! H5T_NORM_MSBSET_F(1) ! H5T_NORM_NONE_F(2) -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_norm_f(type_id, norm, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of + !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not + !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of !mantissa is always 1, H5T_NORM_NONE_F(2) !Mantissa is not normalize INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1386,39 +1386,39 @@ CONTAINS END SUBROUTINE h5tset_norm_f !---------------------------------------------------------------------- -! Name: h5tget_inpad_f +! Name: h5tget_inpad_f ! -! Purpose: Retrieves the internal padding type for unused bits -! in floating-point datatypes. +! Purpose: Retrieves the internal padding type for unused bits +! in floating-point datatypes. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! padtype - padding type for unused bits ! Possible values of padding type are: ! H5T_PAD_ZERO_F = 0 ! H5T_PAD_ONE_F = 1 ! H5T_PAD_BACKGROUND_F = 2 -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits ! in floating-point datatypes. ! Possible values of padding type are: ! H5T__PAD_ZERO_F = 0 @@ -1445,38 +1445,38 @@ CONTAINS END SUBROUTINE h5tget_inpad_f !---------------------------------------------------------------------- -! Name: h5tset_inpad_f +! Name: h5tset_inpad_f ! -! Purpose: Fills unused internal floating point bits. +! Purpose: Fills unused internal floating point bits. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! padtype - padding type for unused bits ! Possible values of padding type are: ! H5T_PAD_ZERO_F = 0 ! H5T_PAD_ONE_F = 1 ! H5T_PAD_BACKGROUND_F = 2 -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: padtype ! padding type for unused bits + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: padtype ! padding type for unused bits ! in floating-point datatypes. ! Possible values of padding type are: ! H5T__PAD_ZERO_F = 0 @@ -1502,38 +1502,40 @@ CONTAINS END SUBROUTINE h5tset_inpad_f !---------------------------------------------------------------------- -! Name: h5tget_cset_f +! Name: h5tget_cset_f ! -! Purpose: Retrieves the character set type of a string datatype. +! Purpose: Retrieves the character set type of a string datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! cset - character set type of a string datatype -! Possible values of padding type are: +! Possible values are: ! H5T_CSET_ASCII_F = 0 -! hdferr: - error code +! H5T_CSET_UTF8_F +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: cset ! character set type of a string datatype - ! Possible values of padding type are: - !H5T_CSET_ASCII_F = 0 + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: cset ! character set type of a string datatype + ! Possible values are: + ! H5T_CSET_ASCII_F = 0 + ! H5T_CSET_UTF8_F INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tget_cset_c @@ -1554,38 +1556,41 @@ CONTAINS END SUBROUTINE h5tget_cset_f !---------------------------------------------------------------------- -! Name: h5tset_cset_f +! Name: h5tset_cset_f ! -! Purpose: Sets character set to be used. +! Purpose: Sets character set to be used. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! cset - character set type of a string datatype -! Possible values of padding type are: +! Possible values are: ! H5T_CSET_ASCII_F = 0 -! Outputs: -! hdferr: - error code +! H5T_CSET_UTF8_F +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: cset !character set type of a string datatype - !Possible values of padding type are: - !H5T_CSET_ASCII_F = 0 + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: cset !character set type of a string datatype + !Possible values are: + ! H5T_CSET_ASCII_F = 0 + ! H5T_CSET_UTF8_F + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tset_cset_c @@ -1606,39 +1611,39 @@ CONTAINS END SUBROUTINE h5tset_cset_f !---------------------------------------------------------------------- -! Name: h5tget_strpad_f +! Name: h5tget_strpad_f ! -! Purpose: Retrieves the storage mechanism for a string datatype. +! Purpose: Retrieves the storage mechanism for a string datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: +! Outputs: ! strpad - storage method for a string datatype ! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, +! H5T_STR_NULLTERM_F, +! H5T_STR_NULLPAD_F, ! H5T_STR_SPACEPAD_F ! H5T_STR_ERROR_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: strpad + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: strpad INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tget_strpad_c @@ -1659,39 +1664,39 @@ CONTAINS END SUBROUTINE h5tget_strpad_f !---------------------------------------------------------------------- -! Name: h5tset_strpad_f +! Name: h5tset_strpad_f ! -! Purpose: Defines the storage mechanism for character strings. +! Purpose: Defines the storage mechanism for character strings. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! strpad - storage method for a string datatype ! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, +! H5T_STR_NULLTERM_F, +! H5T_STR_NULLPAD_F, ! H5T_STR_SPACEPAD_F ! H5T_STR_ERROR_F -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tset_strpad_c @@ -1712,35 +1717,35 @@ CONTAINS END SUBROUTINE h5tset_strpad_f !---------------------------------------------------------------------- -! Name: h5tget_nmembers_f +! Name: h5tget_nmembers_f ! -! Purpose: Retrieves the number of fields in a compound datatype. +! Purpose: Retrieves the number of fields in a compound datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: -! num_members - number of members -! hdferr: - error code +! Outputs: +! num_members - number of members +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tget_nmembers_c @@ -1761,39 +1766,39 @@ CONTAINS END SUBROUTINE h5tget_nmembers_f !---------------------------------------------------------------------- -! Name: h5tget_member_name_f +! Name: h5tget_member_name_f ! -! Purpose: Retrieves the name of a field of a compound datatype. +! Purpose: Retrieves the name of a field of a compound datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! index - filed index (0-based) -! Outputs: +! Outputs: ! member_name - buffer to hold member's name ! namelen - name length -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of - !a compound datatype - INTEGER, INTENT(OUT) :: namelen ! Length of the name + !a compound datatype + INTEGER, INTENT(OUT) :: namelen ! Length of the name INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tget_member_name_c @@ -1806,46 +1811,46 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_NAME_C'::h5tget_member_name_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: member_name - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: index CHARACTER(LEN=*), INTENT(OUT) :: member_name INTEGER, INTENT(OUT) :: namelen - END FUNCTION + END FUNCTION END INTERFACE hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) END SUBROUTINE h5tget_member_name_f !---------------------------------------------------------------------- -! Name: h5tget_member_offset_f +! Name: h5tget_member_offset_f ! -! Purpose: Retrieves the offset of a field of a compound datatype. +! Purpose: Retrieves the offset of a field of a compound datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! member_no - number of the field -! Outputs: +! Outputs: ! offset - byte offset of the requested field -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no !Number of the field + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no !Number of the field !whose offset is requested INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1868,19 +1873,19 @@ CONTAINS hdferr = h5tget_member_offset_c(type_id, member_no, offset ) END SUBROUTINE h5tget_member_offset_f !---------------------------------------------------------------------- -! Name: h5tget_member_index_f +! Name: h5tget_member_index_f ! -! Purpose: Retrieves the index of a compound or enumeration datatype member. +! Purpose: Retrieves the index of a compound or enumeration datatype member. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! name - name of the field or member whose index to ! to be retrieved from the datatype. -! Outputs: +! Outputs: ! index - 0-based index of the filed or member (0 to N-1) -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! @@ -1889,16 +1894,16 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Field or member name INTEGER, INTENT(OUT) :: index ! Field or member index INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: namelen ! Name length + INTEGER :: namelen ! Name length INTERFACE INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) @@ -1906,11 +1911,11 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_INDEX_C'::h5tget_member_index_c !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name + !DEC$ATTRIBUTES reference ::name INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: index + INTEGER, INTENT(OUT) :: index END FUNCTION h5tget_member_index_c END INTERFACE @@ -1920,39 +1925,39 @@ CONTAINS !---------------------------------------------------------------------- -! Name: h5tget_member_dim_f +! Name: h5tget_member_dim_f ! -! Purpose: This function is not supported in hdf5-1.4.* +! Purpose: This function is not supported in hdf5-1.4.* ! -! Inputs: -! Outputs: -! hdferr: - error code +! Inputs: +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- ! SUBROUTINE h5tget_member_dims_f(type_id, field_idx,dims, field_dims, perm, hdferr) ! ! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier -! INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of +! INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier +! INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of ! !field_dims, perm) ! INTEGER, INTENT(OUT) :: dims !number of dimensions of the field ! -! INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) :: field_dims !buffer to store the +! INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) :: field_dims !buffer to store the ! !dimensions of the field -! INTEGER, DIMENSION(*), INTENT(OUT) :: perm !buffer to store the +! INTEGER, DIMENSION(*), INTENT(OUT) :: perm !buffer to store the ! !permutation vector of the field ! INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tget_member_dims_c @@ -1961,36 +1966,36 @@ CONTAINS ! END SUBROUTINE h5tget_member_dims_f !---------------------------------------------------------------------- -! Name: h5tget_array_dims_f +! Name: h5tget_array_dims_f ! ! Purpose: Returns sizes of array dimensions. ! -! Inputs: +! Inputs: ! type_id - array datatype identifier -! Outputs: +! Outputs: ! dims - buffer to store array datatype ! dimensions -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims !buffer to store array datatype - ! dimensions + ! dimensions INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tget_array_dims_c @@ -2012,33 +2017,33 @@ CONTAINS END SUBROUTINE h5tget_array_dims_f !---------------------------------------------------------------------- -! Name: h5tget_array_ndims_f +! Name: h5tget_array_ndims_f ! -! Purpose: Returns the rank of an array datatype. +! Purpose: Returns the rank of an array datatype. ! -! Inputs: +! Inputs: ! type_id - array datatype identifier -! Outputs: +! Outputs: ! ndims - number of array dimensions -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier INTEGER, INTENT(OUT) :: ndims ! number of array dimensions INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2061,33 +2066,33 @@ CONTAINS END SUBROUTINE h5tget_array_ndims_f !---------------------------------------------------------------------- -! Name: h5tget_super_f +! Name: h5tget_super_f ! -! Purpose: Returns the base datatype from which a datatype is derived. +! Purpose: Returns the base datatype from which a datatype is derived. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: -! base_type_id - identifier of the base type -! hdferr: - error code +! Outputs: +! base_type_id - identifier of the base type +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype ! from which datatype (type_id) was derived INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2101,7 +2106,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SUPER_C'::h5tget_super_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(OUT) :: base_type_id END FUNCTION h5tget_super_c END INTERFACE @@ -2111,38 +2116,38 @@ CONTAINS END SUBROUTINE h5tget_super_f !---------------------------------------------------------------------- -! Name: h5tget_member_type_f +! Name: h5tget_member_type_f ! -! Purpose: Returns the datatype of the specified member. +! Purpose: Returns the datatype of the specified member. ! -! Inputs: +! Inputs: ! type_id - compound datatype identifier ! field_idx - field index (0-based) ! -! Outputs: +! Outputs: ! datatype - idnetifier of the member's datatype -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve - INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of - !the datatype of the field + INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of + !the datatype of the field INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tget_member_type_c @@ -2164,32 +2169,32 @@ CONTAINS END SUBROUTINE h5tget_member_type_f !---------------------------------------------------------------------- -! Name: h5tcreate_f +! Name: h5tcreate_f ! ! Purpose: Creates a new dataype ! -! Inputs: +! Inputs: ! class - datatype class, possible values are: ! H5T_COMPOUND_F -! H5T_ENUM_F +! H5T_ENUM_F ! H5T_OPAQUE_F ! size - datattype size -! Outputs: +! Outputs: ! type_id - datatype identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- @@ -2197,7 +2202,7 @@ CONTAINS IMPLICIT NONE INTEGER, INTENT(IN) :: class ! Datatype class can be one of ! H5T_COMPOUND_F - ! H5T_ENUM_F + ! H5T_ENUM_F ! H5T_OPAQUE_F INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the datatype INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier @@ -2212,9 +2217,9 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c !DEC$ENDIF - INTEGER, INTENT(IN) :: class - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER, INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T), INTENT(OUT) :: type_id END FUNCTION h5tcreate_c END INTERFACE @@ -2222,36 +2227,36 @@ CONTAINS END SUBROUTINE h5tcreate_f !---------------------------------------------------------------------- -! Name: h5tinsert_f +! Name: h5tinsert_f ! -! Purpose: Adds a new member to a compound datatype. +! Purpose: Adds a new member to a compound datatype. ! -! Inputs: +! Inputs: ! type_id - compound dattype identifier ! name - name of the field to insert -! offset - start of the member in an instance of +! offset - start of the member in an instance of ! the compound datatype ! field_id - datatype identifier of the field to insert -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of !the compound datatype @@ -2273,7 +2278,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER(SIZE_T), INTENT(IN) :: offset - INTEGER(HID_T), INTENT(IN) :: field_id + INTEGER(HID_T), INTENT(IN) :: field_id INTEGER :: namelen END FUNCTION h5tinsert_c END INTERFACE @@ -2283,27 +2288,27 @@ CONTAINS END SUBROUTINE h5tinsert_f !---------------------------------------------------------------------- -! Name: h5tpack_f +! Name: h5tpack_f ! -! Purpose: Recursively removes padding from within a compound datatype. +! Purpose: Recursively removes padding from within a compound datatype. ! -! Inputs: +! Inputs: ! type_id - compound datatype identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tpack_f(type_id, hdferr) @@ -2324,46 +2329,46 @@ CONTAINS END FUNCTION h5tpack_c END INTERFACE - hdferr = h5tpack_c(type_id) + hdferr = h5tpack_c(type_id) END SUBROUTINE h5tpack_f !---------------------------------------------------------------------- -! Name: h5tinsert_array_f +! Name: h5tinsert_array_f ! ! Purpose: This function is not available on hdf5-1.4.* ! -! Inputs: -! Outputs: -! hdferr: - error code +! Inputs: +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- ! SUBROUTINE h5tinsert_array_f(parent_id,name,offset, ndims, dims, member_id, hdferr, perm) ! IMPLICIT NONE ! INTEGER(HID_T), INTENT(IN) :: parent_id ! identifier of the parent compound datatype ! CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member -! INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member +! INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member ! !within compound datatype -! INTEGER, INTENT(IN) :: ndims !Dimensionality of new member. +! INTEGER, INTENT(IN) :: ndims !Dimensionality of new member. ! !Valid values are 0 (zero) through 4 (four) ! INTEGER(SIZE_T), DIMENSION(*), INTENT(IN) :: dims !Size of new member array ! INTEGER(HID_T), INTENT(IN) :: member_id ! identifier of the datatype of the new member ! INTEGER, INTENT(OUT) :: hdferr ! Error code ! -! INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm -! !Pointer to buffer to store +! INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm +! !Pointer to buffer to store ! !the permutation vector of the field ! INTEGER :: namelen, sizeofperm ! INTEGER, EXTERNAL :: h5tinsert_array_c, h5tinsert_array_c2 @@ -2371,45 +2376,45 @@ CONTAINS ! if (present(perm)) then ! hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm) ! else -! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) -! end if -! +! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) +! end if +! ! END SUBROUTINE h5tinsert_array_f !---------------------------------------------------------------------- -! Name: h5tarray_create_f +! Name: h5tarray_create_f ! -! Purpose: Creates an array datatype object. +! Purpose: Creates an array datatype object. ! -! Inputs: -! base_id - datatype identifier for the array +! Inputs: +! base_id - datatype identifier for the array ! base datatype ! rank - rank of the array ! dims - array dimension sizes -! Outputs: +! Outputs: ! type_id - array datatype identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype INTEGER, INTENT(IN) :: rank ! Rank of the array INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension - INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype + INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2430,42 +2435,42 @@ CONTAINS END INTERFACE hdferr = h5tarray_create_c(base_id, rank, dims, type_id) - + END SUBROUTINE h5tarray_create_f !---------------------------------------------------------------------- -! Name: h5tenum_create_f +! Name: h5tenum_create_f ! -! Purpose: Creates a new enumeration datatype. +! Purpose: Creates a new enumeration datatype. ! -! Inputs: -! parent_id - datatype identifier for base datatype -! Outputs: +! Inputs: +! parent_id - datatype identifier for base datatype +! Outputs: ! new_type_id - datatype identifier for the enumeration ! datatype -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: parent_id ! Datatype identifier for ! the base datatype - INTEGER(HID_T), INTENT(OUT) :: new_type_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id !datatype identifier for the - ! new enumeration datatype + ! new enumeration datatype INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tenum_create_c @@ -2477,8 +2482,8 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_CREATE_C'::h5tenum_create_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: parent_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id + INTEGER(HID_T), INTENT(IN) :: parent_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id END FUNCTION h5tenum_create_c END INTERFACE @@ -2486,32 +2491,32 @@ CONTAINS END SUBROUTINE h5tenum_create_f !---------------------------------------------------------------------- -! Name: h5tenaum_insert_f +! Name: h5tenaum_insert_f ! -! Purpose: Inserts a new enumeration datatype member. +! Purpose: Inserts a new enumeration datatype member. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! Outputs: -! hdferr: - error code +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member INTEGER, INTENT(IN) :: value !value of the new member INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2527,8 +2532,8 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: value INTEGER :: namelen END FUNCTION h5tenum_insert_c @@ -2539,36 +2544,36 @@ CONTAINS END SUBROUTINE h5tenum_insert_f !---------------------------------------------------------------------- -! Name: h5tenum_nameof_f +! Name: h5tenum_nameof_f ! -! Purpose: Returns the symbol name corresponding to a specified -! member of an enumeration datatype. +! Purpose: Returns the symbol name corresponding to a specified +! member of an enumeration datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier -! value - value of the enumeration datatype +! value - value of the enumeration datatype ! namelen - name buffer size -! Outputs: +! Outputs: ! name - buffer to hold symbol name -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier CHARACTER(LEN=*), INTENT(OUT) :: name !Name of the enumeration datatype. INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name INTEGER, INTENT(IN) :: value !value of the enumeration datatype. @@ -2584,9 +2589,9 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_NAMEOF_C'::h5tenum_nameof_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER(SIZE_T), INTENT(IN) :: namelen INTEGER, INTENT(IN) :: value END FUNCTION h5tenum_nameof_c END INTERFACE @@ -2595,35 +2600,35 @@ CONTAINS END SUBROUTINE h5tenum_nameof_f !---------------------------------------------------------------------- -! Name: h5tenum_valuof_f +! Name: h5tenum_valuof_f ! -! Purpose: Returns the value corresponding to a specified -! member of an enumeration datatype. +! Purpose: Returns the value corresponding to a specified +! member of an enumeration datatype. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! name - symbol name -! Outputs: +! Outputs: ! value - value of the enumeration datatype -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- - + SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier CHARACTER(LEN=*), INTENT(IN) :: name !Name of the enumeration datatype. INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2639,9 +2644,9 @@ CONTAINS !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_VALUEOF_C'::h5tenum_valueof_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(IN) :: namelen INTEGER, INTENT(OUT) :: value END FUNCTION h5tenum_valueof_c END INTERFACE @@ -2651,34 +2656,34 @@ CONTAINS END SUBROUTINE h5tenum_valueof_f !---------------------------------------------------------------------- -! Name: h5tget_member_value_f +! Name: h5tget_member_value_f ! -! Purpose: Returns the value of an enumeration datatype member. +! Purpose: Returns the value of an enumeration datatype member. ! -! Inputs: +! Inputs: ! type_id - datatype identifier ! member_no - number of the enumeration datatype member -! Outputs: +! Outputs: ! value - value of the enumeration datatype -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2692,46 +2697,46 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_VALUE_C'::h5tget_member_value_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: member_no INTEGER, INTENT(OUT) :: value - END FUNCTION + END FUNCTION END INTERFACE hdferr = h5tget_member_value_c(type_id, member_no, value) END SUBROUTINE h5tget_member_value_f !---------------------------------------------------------------------- -! Name: h5tset_tag_f +! Name: h5tset_tag_f ! -! Purpose: Tags an opaque datatype. +! Purpose: Tags an opaque datatype. ! -! Inputs: +! Inputs: ! type_id - identifier for opaque datatype -! tag - unique ASCII string with which the opaque -! datatype is to be tagged. -! Outputs: -! hdferr: - error code +! tag - unique ASCII string with which the opaque +! datatype is to be tagged. +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which - !the opaque datatype is to be tagged + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which + !the opaque datatype is to be tagged INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: taglen @@ -2756,37 +2761,37 @@ CONTAINS END SUBROUTINE h5tset_tag_f !---------------------------------------------------------------------- -! Name: h5tget_tag_f +! Name: h5tget_tag_f ! -! Purpose: Gets the tag associated with an opaque datatype. +! Purpose: Gets the tag associated with an opaque datatype. ! -! Inputs: +! Inputs: ! type_id - identifier for opaque datatype -! Outputs: +! Outputs: ! tag - unique ASCII string associated with opaque ! datatype -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 7, 2001 +! port). March 7, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(OUT) :: tag !Unique ASCII string with which + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(OUT) :: tag !Unique ASCII string with which !the opaque datatype is to be tagged - INTEGER, INTENT(OUT) :: taglen !length of tag + INTEGER, INTENT(OUT) :: taglen !length of tag INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5tget_tag_c @@ -2801,7 +2806,7 @@ CONTAINS !DEC$ATTRIBUTES reference :: tag INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(OUT) :: tag - INTEGER, INTENT(OUT) :: taglen + INTEGER, INTENT(OUT) :: taglen END FUNCTION h5tget_tag_c END INTERFACE @@ -2809,32 +2814,32 @@ CONTAINS END SUBROUTINE h5tget_tag_f !---------------------------------------------------------------------- -! Name: h5tvlen_create_f +! Name: h5tvlen_create_f ! -! Purpose: Creates a new variable-length datatype. +! Purpose: Creates a new variable-length datatype. ! -! Inputs: +! Inputs: ! type_id - identifier iof base datatype -! Outputs: +! Outputs: ! vltype_id - identifier for VL datatype -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! Wednesday, October 23, 2002 ! -! Modifications: +! Modifications: ! -! Comment: Only basic Fortran base datatypes are supported +! Comment: Only basic Fortran base datatypes are supported !---------------------------------------------------------------------- SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: vltype_id ! VL datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: vltype_id ! VL datatype identifier INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE @@ -2852,43 +2857,43 @@ CONTAINS END SUBROUTINE h5tvlen_create_f !---------------------------------------------------------------------- -! Name: h5tis_variable_str_f +! Name: h5tis_variable_str_f ! ! Purpose: Determines whether a dattype is a variable string. ! -! Inputs: +! Inputs: ! type_id - - datartpe identifier -! Outputs: +! Outputs: ! status - flag to indicate if datatype ! is a variable string -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! March 12, 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier LOGICAL, INTENT(OUT) :: status ! Flag, idicates if datatype ! is a variable string or not ( TRUE or - ! FALSE) + ! FALSE) INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" ! INTEGER, EXTERNAL :: h5tis_variable_str_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) + INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TIS_VARIABLE_STR_C'::h5tis_variable_str_c @@ -2901,18 +2906,18 @@ CONTAINS hdferr = h5tis_variable_str_c(type_id, flag) status = .TRUE. if (flag .EQ. 0) status = .FALSE. - + END SUBROUTINE h5tis_variable_str_f !---------------------------------------------------------------------- -! Name: h5tget_member_class_f +! Name: h5tget_member_class_f ! ! Purpose: Returns datatype class of compound datatype member. ! -! Inputs: +! Inputs: ! type_id - - datartpe identifier ! member_no - index of compound datatype member -! Outputs: +! Outputs: ! class - class type for compound dadtype member ! Can be one of the follwoing classes: ! H5T_NO_CLASS_F (error) @@ -2927,23 +2932,23 @@ CONTAINS ! H5T_ENUM_F ! H5T_VLEN_F ! H5T_ARRAY_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! April 6, 2005 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier INTEGER, INTENT(IN) :: member_no ! Member number INTEGER, INTENT(OUT) :: class ! Member class INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2951,37 +2956,37 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) + INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_CLASS_C'::h5tget_member_class_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: class + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: class END FUNCTION h5tget_member_class_c END INTERFACE hdferr = h5tget_member_class_c(type_id, member_no, class) - + END SUBROUTINE h5tget_member_class_f !---------------------------------------------------------------------- -! Name: h5tcommit_anon_f +! Name: h5tcommit_anon_f ! -! Purpose: Commits a transient datatype to a file, -! creating a new named datatype, -! but does not link it into the file structure. +! Purpose: Commits a transient datatype to a file, +! creating a new named datatype, +! but does not link it into the file structure. ! ! Inputs: -! loc_id - A file or group identifier specifying the file +! loc_id - A file or group identifier specifying the file ! in which the new named datatype is to be created. ! dtype_id - A datatype identifier. ! ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! tcpl_id - A datatype creation property list identifier. ! (H5P_DEFAULT_F for the default property list.) @@ -2993,17 +2998,17 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! A file or group identifier specifying - ! the file in which the new named datatype + INTEGER(HID_T), INTENT(IN) :: loc_id ! A file or group identifier specifying + ! the file in which the new named datatype ! is to be created. - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property ! list identifier. ! (H5P_DEFAULT_F for the default property list.) INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier. @@ -3032,14 +3037,14 @@ CONTAINS IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id IF(PRESENT(tapl_id)) tapl_id_default = tapl_id - - hdferr = h5tcommit_anon_c(loc_id, dtype_id, & + + hdferr = h5tcommit_anon_c(loc_id, dtype_id, & tcpl_id_default, tapl_id_default ) END SUBROUTINE h5tcommit_anon_f !---------------------------------------------------------------------- -! Name: h5tcommitted_f +! Name: h5tcommitted_f ! ! Purpose: Determines whether a datatype is a named type or a transient type. ! @@ -3049,9 +3054,9 @@ CONTAINS ! Outputs: ! committed - .TRUE., if the datatype has been committed ! .FALSE., if the datatype has not been committed. -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: None ! ! Programmer: M.S. Breitenfeld @@ -3059,7 +3064,7 @@ CONTAINS ! ! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) @@ -3067,9 +3072,9 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dtype_id ! A datatype identifier LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed !.FALSE., if the datatype has not been committed. - INTEGER, INTENT(OUT) :: hdferr ! Error code: + INTEGER, INTENT(OUT) :: hdferr ! Error code: ! Success: 0 -! Failure: -1 +! Failure: -1 ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -3094,7 +3099,7 @@ CONTAINS ELSE hdferr = -1 ENDIF - + END SUBROUTINE h5tcommitted_f @@ -3102,11 +3107,11 @@ CONTAINS ! Name: H5Tdecode_f ! ! Purpose: Decode a binary object description of data type and return a new object handle. -! Inputs: +! Inputs: ! buf - Buffer for the data space object to be decoded. ! obj_id - Object ID ! Outputs: -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! @@ -3115,9 +3120,9 @@ CONTAINS ! Programmer: M.S. Breitenfeld ! April 9, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) @@ -3139,7 +3144,7 @@ CONTAINS END INTERFACE hdferr = h5tdecode_c(buf, obj_id) - + END SUBROUTINE h5tdecode_f !---------------------------------------------------------------------- @@ -3153,7 +3158,7 @@ CONTAINS ! nalloc - The size of the allocated buffer. ! Outputs: ! nalloc - The size of the buffer needed. -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! @@ -3162,9 +3167,9 @@ CONTAINS ! Programmer: M.S. Breitenfeld ! April 9, 2008 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) @@ -3187,28 +3192,28 @@ CONTAINS INTEGER(SIZE_T), INTENT(INOUT) :: nalloc END FUNCTION h5tencode_c END INTERFACE - + hdferr = h5tencode_c(buf, obj_id, nalloc) END SUBROUTINE h5tencode_f !---------------------------------------------------------------------- -! Name: h5tget_create_plist_f +! Name: h5tget_create_plist_f ! ! Purpose: Returns a copy of a datatype creation property list. -! -! Inputs: +! +! Inputs: ! dtype_id - Datatype identifier -! Outputs: +! Outputs: ! dtpl_id - Datatype property list identifier -! hdferr: - Error code +! hdferr: - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: M.S. Breitenfeld -! April 9, 2008 +! April 9, 2008 ! ! Modifications: N/A ! @@ -3233,28 +3238,28 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: dtpl_id END FUNCTION h5tget_create_plist_c END INTERFACE - + hdferr = h5tget_create_plist_c(dtype_id, dtpl_id) END SUBROUTINE h5tget_create_plist_f !---------------------------------------------------------------------- -! Name: h5tcompiler_conv_f +! Name: h5tcompiler_conv_f ! ! Purpose: Check whether the library’s default conversion is hard conversion.R -! -! Inputs: +! +! Inputs: ! src_id - Identifier for the source datatype. ! dst_id - Identifier for the destination datatype. -! Outputs: +! Outputs: ! flag - TRUE for compiler conversion, FALSE for library conversion -! hdferr: - Error code +! hdferr: - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: M.S. Breitenfeld -! April 9, 2008 +! April 9, 2008 ! ! Modifications: N/A ! @@ -3280,7 +3285,7 @@ CONTAINS INTEGER :: c_flag END FUNCTION h5tcompiler_conv_c END INTERFACE - + hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag) flag = .FALSE. @@ -3289,29 +3294,29 @@ CONTAINS END SUBROUTINE h5tcompiler_conv_f !---------------------------------------------------------------------- -! Name: h5tget_native_type_f +! Name: h5tget_native_type_f ! ! Purpose: Returns the native datatype of a specified datatype. -! -! Inputs: +! +! Inputs: ! dtype_id - Datatype identifier for the dataset datatype. ! * -! direction - Direction of search: +! direction - Direction of search: ! H5T_DIR_DEFAULT = 0, /*default direction is inscendent */ ! H5T_DIR_ASCEND = 1, /*in inscendent order */ ! H5T_DIR_DESCEND = 2 /*in descendent order */ ! * NOTE: In C it is defined as a structure: H5T_direction_t ! -! Outputs: +! Outputs: ! native_dtype_id - The native datatype identifier for the specified dataset datatype -! hdferr: - Error code +! hdferr: - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: M.S. Breitenfeld -! June 18, 2008 +! June 18, 2008 ! ! Modifications: N/A ! @@ -3332,12 +3337,12 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NATIVE_TYPE_C'::h5tget_native_type_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T), INTENT(IN) :: dtype_id INTEGER, INTENT(IN) :: direction INTEGER(HID_T), INTENT(OUT) :: native_dtype_id END FUNCTION h5tget_native_type_c END INTERFACE - + hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) END SUBROUTINE h5tget_native_type_f diff --git a/fortran/src/H5Zff.f90 b/fortran/src/H5Zff.f90 index 7465db5..750a7a5 100644 --- a/fortran/src/H5Zff.f90 +++ b/fortran/src/H5Zff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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 contains FORTRAN90 interfaces for H5I functions @@ -19,7 +19,7 @@ MODULE H5Z USE H5GLOBAL - + CONTAINS !---------------------------------------------------------------------- @@ -28,22 +28,22 @@ ! Purpose: Unregisters specified filetr ! ! Inputs: filter - filter; may have one of the following values: -! H5Z_FILTER_DEFLATE_F -! H5Z_FILTER_SHUFFLE_F -! H5Z_FILTER_FLETCHER32_F -! Outputs: -! hdferr: - error code +! H5Z_FILTER_DEFLATE_F +! H5Z_FILTER_SHUFFLE_F +! H5Z_FILTER_FLETCHER32_F +! Outputs: +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal ! March 12, 2003 ! -! Modifications: +! Modifications: ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5zunregister_f(filter, hdferr) IMPLICIT NONE @@ -67,42 +67,42 @@ !---------------------------------------------------------------------- ! Name: h5zfilter_avail_f ! -! Purpose: Queries if filter is available +! Purpose: Queries if filter is available ! -! Inputs: +! Inputs: ! filter - filter -! Outputs: -! status - status; .TRUE. if filter is available, +! Outputs: +! status - status; .TRUE. if filter is available, ! .FALSE. otherwise -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal ! March 12, 2003 ! -! Modifications: +! Modifications: ! !---------------------------------------------------------------------- SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: - ! H5Z_FILTER_DEFLATE_F - ! H5Z_FILTER_SHUFFLE_F - ! H5Z_FILTER_FLETCHER32_F + ! H5Z_FILTER_DEFLATE_F + ! H5Z_FILTER_SHUFFLE_F + ! H5Z_FILTER_FLETCHER32_F LOGICAL, INTENT(OUT) :: status ! Flag, idicates if filter ! is availble not ( TRUE or - ! FALSE) + ! FALSE) INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" ! INTEGER, EXTERNAL :: h5zfilter_avail_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5zfilter_avail_c(filter, flag) + INTEGER FUNCTION h5zfilter_avail_c(filter, flag) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZFILTER_AVAIL_C'::h5zfilter_avail_c @@ -115,51 +115,51 @@ hdferr = h5zfilter_avail_c(filter, flag) status = .TRUE. if (flag .EQ. 0) status = .FALSE. - + END SUBROUTINE h5zfilter_avail_f !---------------------------------------------------------------------- ! Name: h5zget_filter_info_f ! -! Purpose: Queries if filter has its encoder and/or decoder -! available +! Purpose: Queries if filter has its encoder and/or decoder +! available ! -! Inputs: +! Inputs: ! filter - filter -! Outputs: +! Outputs: ! config_flags - Bit vector possibly containing the ! following values: ! H5Z_FILTER_ENCODE_ENABLED_F ! H5Z_FILTER_DECODE_ENABLED_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Nat Furrer and James Laird ! June 16, 2004 ! -! Modifications: +! Modifications: ! !---------------------------------------------------------------------- SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: - ! H5Z_FILTER_DEFLATE_F - ! H5Z_FILTER_SHUFFLE_F + ! H5Z_FILTER_DEFLATE_F + ! H5Z_FILTER_SHUFFLE_F ! H5Z_FILTER_FLETCHER32_F - ! H5Z_FILTER_SZIP_F + ! H5Z_FILTER_SZIP_F INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter ! has its encoder and/or decoder - ! available - INTEGER, INTENT(OUT) :: hdferr ! Error code + ! available + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5zget_filter_info_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) + INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZGET_FILTER_INFO_C'::h5zget_filter_info_c @@ -170,12 +170,12 @@ END INTERFACE hdferr = h5zget_filter_info_c(filter, config_flags) - + END SUBROUTINE h5zget_filter_info_f END MODULE H5Z - - + + diff --git a/fortran/src/H5_DBLE_InterfaceExclude.f90 b/fortran/src/H5_DBLE_InterfaceExclude.f90 index 976a6f4..b3bafa1 100644 --- a/fortran/src/H5_DBLE_InterfaceExclude.f90 +++ b/fortran/src/H5_DBLE_InterfaceExclude.f90 @@ -2,7 +2,7 @@ ! ! NAME ! H5_DBLE_INTERFACE -! +! ! FUNCTION ! This module is used for when the default REAL is of type DOUBLE PRECISION. ! We do not include the double precision interfaces if the defaut REAL is @@ -13,7 +13,7 @@ ! Empty module. ! ! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -26,7 +26,7 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! AUTHOR ! M.S. Breitenfeld diff --git a/fortran/src/H5_DBLE_InterfaceInclude.f90 b/fortran/src/H5_DBLE_InterfaceInclude.f90 index 45bb237..4e7dbfb 100644 --- a/fortran/src/H5_DBLE_InterfaceInclude.f90 +++ b/fortran/src/H5_DBLE_InterfaceInclude.f90 @@ -2,7 +2,7 @@ ! ! NAME ! H5_DBLE_INTERFACE -! +! ! FUNCTION ! This module is used for when the default REAL is not of the type DOUBLE PRECISION. ! We only do not include the double precision interfaces if the defaut REAL is @@ -10,11 +10,11 @@ ! generic interfaces declared as REAL. Otherwise it is okay to include the interfaces. ! ! NOTES -! This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines +! This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines ! from the HDF function catagory H5A, H5D and H5P. ! ! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -27,7 +27,7 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! AUTHOR ! M.S. Breitenfeld @@ -125,11 +125,11 @@ CONTAINS ! SUBROUTINE h5awrite_double_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_double_s_c @@ -141,7 +141,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_S_C'::h5awrite_double_s_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN)::buf @@ -153,12 +153,12 @@ CONTAINS SUBROUTINE h5awrite_double_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf ! Attribute data + DIMENSION(dims(1)) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_double_1_c @@ -170,7 +170,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_1_C'::h5awrite_double_1_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -184,13 +184,13 @@ CONTAINS SUBROUTINE h5awrite_double_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_double_2_c @@ -202,7 +202,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_2_C'::h5awrite_double_2_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -216,13 +216,13 @@ CONTAINS SUBROUTINE h5awrite_double_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_double_3_c @@ -234,7 +234,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_3_C'::h5awrite_double_3_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -248,13 +248,13 @@ CONTAINS SUBROUTINE h5awrite_double_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_double_4_c @@ -266,7 +266,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_4_C'::h5awrite_double_4_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -280,13 +280,13 @@ CONTAINS SUBROUTINE h5awrite_double_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_double_5_c @@ -298,7 +298,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_5_C'::h5awrite_double_5_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -312,13 +312,13 @@ CONTAINS SUBROUTINE h5awrite_double_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_double_6_c @@ -330,7 +330,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_6_C'::h5awrite_double_6_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -344,13 +344,13 @@ CONTAINS SUBROUTINE h5awrite_double_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5awrite_double_7_c @@ -362,7 +362,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_7_C'::h5awrite_double_7_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -376,11 +376,11 @@ CONTAINS SUBROUTINE h5aread_double_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_double_s_c @@ -392,7 +392,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_S_C'::h5aread_double_s_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(INOUT)::buf @@ -404,13 +404,13 @@ CONTAINS SUBROUTINE h5aread_double_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_double_1_c @@ -422,7 +422,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_1_C'::h5aread_double_1_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(INOUT), & @@ -436,13 +436,13 @@ CONTAINS SUBROUTINE h5aread_double_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_double_2_c @@ -454,7 +454,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_2_C'::h5aread_double_2_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(INOUT), & @@ -468,13 +468,13 @@ CONTAINS SUBROUTINE h5aread_double_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_double_3_c @@ -486,7 +486,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_3_C'::h5aread_double_3_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(INOUT), & @@ -500,13 +500,13 @@ CONTAINS SUBROUTINE h5aread_double_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_double_4_c @@ -518,7 +518,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_4_C'::h5aread_double_4_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(INOUT), & @@ -532,13 +532,13 @@ CONTAINS SUBROUTINE h5aread_double_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_double_5_c @@ -550,7 +550,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_5_C'::h5aread_double_5_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(INOUT), & @@ -564,13 +564,13 @@ CONTAINS SUBROUTINE h5aread_double_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_double_6_c @@ -582,7 +582,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_6_C'::h5aread_double_6_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(INOUT), & @@ -596,13 +596,13 @@ CONTAINS SUBROUTINE h5aread_double_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5aread_double_7_c @@ -614,7 +614,7 @@ CONTAINS !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_7_C'::h5aread_double_7_c !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(INOUT), & @@ -636,16 +636,16 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_double_s_c @@ -653,7 +653,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -675,9 +675,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_double_s_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -692,16 +692,16 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_double_1_c @@ -709,7 +709,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwrite_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -732,9 +732,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_double_1_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -749,24 +749,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_double_2_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -789,9 +789,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_double_2_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -806,24 +806,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_double_3_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -846,9 +846,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_double_3_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -863,15 +863,15 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -880,7 +880,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dwrite_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -903,9 +903,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_double_4_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -920,24 +920,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_double_5_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -960,9 +960,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_double_5_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -978,24 +978,24 @@ CONTAINS DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_double_6_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1018,9 +1018,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_double_6_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1036,24 +1036,24 @@ CONTAINS DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dwrite_double_7_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dwrite_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1075,9 +1075,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dwrite_double_7_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1091,16 +1091,16 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_double_s_c @@ -1108,7 +1108,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dread_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1130,9 +1130,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_double_s_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1147,24 +1147,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_double_1_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1187,9 +1187,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_double_1_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1204,24 +1204,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_double_2_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1234,7 +1234,7 @@ CONTAINS INTEGER(HID_T) :: file_space_id_default INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & + DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf END FUNCTION h5dread_double_2_c END INTERFACE @@ -1244,9 +1244,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_double_2_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1261,16 +1261,16 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_double_3_c @@ -1278,7 +1278,7 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dread_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1301,9 +1301,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_double_3_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1319,24 +1319,24 @@ CONTAINS DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_double_4_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1359,9 +1359,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_double_4_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1376,24 +1376,24 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_double_5_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1416,9 +1416,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_double_5_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1434,24 +1434,24 @@ CONTAINS DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_double_6_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1474,9 +1474,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_double_6_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1492,24 +1492,24 @@ CONTAINS DOUBLE PRECISION, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default ! INTEGER, EXTERNAL :: h5dread_double_7_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5dread_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & + mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf, dims) USE H5GLOBAL @@ -1531,9 +1531,9 @@ CONTAINS mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id hdferr = h5dread_double_7_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, buf, dims) @@ -1543,21 +1543,21 @@ CONTAINS !---------------------------------------------------------------------- ! Name: h5dfill_double ! - ! Purpose: Fills dataspace elements with a fill value in a memory buffer. - ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes + ! Purpose: Fills dataspace elements with a fill value in a memory buffer. + ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes ! of the fillvalues and buffers are supported. Buffer and fillvalue ! are assumed to have the same datatype. ! Only one-dimesional buffers are supported. ! - ! Inputs: + ! Inputs: ! fill_value - fill value ! space_id - memory space selection identifier ! buf - data buffer iin memory ro apply selection to ! - of k-th dimension of the buf array - ! Outputs: - ! hdferr: - error code + ! Outputs: + ! hdferr: - error code ! Success: 0 - ! Failure: -1 + ! Failure: -1 ! ! Programmer: Elena Pourmal ! March 12, 2003 @@ -1569,10 +1569,10 @@ CONTAINS DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier ! INTEGER, EXTERNAL :: h5dfill_double_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -1582,19 +1582,19 @@ CONTAINS buf, mem_type_id) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_DOUBLE_C'::h5dfill_double_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_DOUBLE_C'::h5dfill_double_c !DEC$ENDIF DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier END FUNCTION h5dfill_double_c END INTERFACE fill_type_id = H5T_NATIVE_DOUBLE mem_type_id = H5T_NATIVE_DOUBLE - hdferr = h5dfill_double_c(fill_value, fill_type_id, space_id, & + hdferr = h5dfill_double_c(fill_value, fill_type_id, space_id, & buf, mem_type_id) @@ -1607,9 +1607,9 @@ CONTAINS SUBROUTINE h5pset_fill_value_double(prp_id, type_id, fillvalue, & hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype ! (in memory) DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1636,10 +1636,10 @@ CONTAINS SUBROUTINE h5pget_fill_value_double(prp_id, type_id, fillvalue, & hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of ! of fillvalue datatype - ! (in memory) + ! (in memory) DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1667,28 +1667,28 @@ CONTAINS ! ! Purpose: Sets a property list value ! - ! Inputs: + ! Inputs: ! prp_id - iproperty list identifier to modify ! name - name of property to modify ! value - value to set property to - ! Outputs: - ! hdferr: - error code + ! Outputs: + ! hdferr: - error code ! Success: 0 - ! Failure: -1 + ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal - ! October 9, 2002 + ! October 9, 2002 ! - ! Modifications: + ! Modifications: ! - ! Comment: + ! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pset_double(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify DOUBLE PRECISION, INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1718,28 +1718,28 @@ CONTAINS ! ! Purpose: Gets a property list value ! - ! Inputs: + ! Inputs: ! prp_id - iproperty list identifier to modify ! name - name of property to modify - ! Outputs: + ! Outputs: ! value - value of property - ! hdferr: - error code + ! hdferr: - error code ! Success: 0 - ! Failure: -1 + ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal - ! October 9, 2002 + ! October 9, 2002 ! - ! Modifications: + ! Modifications: ! - ! Comment: + ! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pget_double(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify DOUBLE PRECISION, INTENT(OUT) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1769,33 +1769,33 @@ CONTAINS ! ! Purpose: Registers a permanent property with a property list class. ! - ! Inputs: - ! class - property list class to register + ! Inputs: + ! class - property list class to register ! permanent property within ! name - name of property to register ! size - size of property in bytes - ! value - default value for property in newly + ! value - default value for property in newly ! created property lists - ! Outputs: - ! hdferr: - error code + ! Outputs: + ! hdferr: - error code ! Success: 0 - ! Failure: -1 + ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal - ! October 10, 2002 + ! October 10, 2002 ! - ! Modifications: + ! Modifications: ! - ! Comment: + ! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pregister_double(class, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value DOUBLE PRECISION, INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -1810,7 +1810,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: class CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(SIZE_T), INTENT(IN) :: size DOUBLE PRECISION, INTENT(IN) :: value END FUNCTION h5pregister_double_c END INTERFACE @@ -1824,32 +1824,32 @@ CONTAINS ! ! Purpose: Registers a temporary property with a property list class. ! - ! Inputs: + ! Inputs: ! plist - property list identifier ! permanent property within ! name - name of property to insert ! size - size of property in bytes - ! value - initial value for the property - ! Outputs: - ! hdferr: - error code + ! value - initial value for the property + ! Outputs: + ! hdferr: - error code ! Success: 0 - ! Failure: -1 + ! Failure: -1 ! Optional parameters: ! NONE ! ! Programmer: Elena Pourmal - ! October 10, 2002 + ! October 10, 2002 ! - ! Modifications: + ! Modifications: ! - ! Comment: + ! Comment: !---------------------------------------------------------------------- SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value DOUBLE PRECISION, INTENT(IN) :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -1864,7 +1864,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: plist CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(SIZE_T), INTENT(IN) :: size DOUBLE PRECISION, INTENT(IN) :: value END FUNCTION h5pinsert_double_c END INTERFACE diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90 index 89360a3..7dffd0a 100644 --- a/fortran/src/H5_ff.f90 +++ b/fortran/src/H5_ff.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,32 +11,32 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! MODULE H5LIB CONTAINS !---------------------------------------------------------------------- -! Name: h5open_f +! Name: h5open_f ! -! Purpose: Initializes the HDF5 library and Fortran90 interface. +! Purpose: Initializes the HDF5 library and Fortran90 interface. ! -! Inputs: -! Outputs: -! error: - error code +! Inputs: +! Outputs: +! error: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5open_f(error) USE H5GLOBAL @@ -48,7 +48,7 @@ CONTAINS ! INTEGER, EXTERNAL :: h5init_flags_c ! INTEGER, EXTERNAL :: h5init1_flags_c ! INTEGER, EXTERNAL :: h5open_c - + ! ! MS FORTRAN needs explicit interfaces for C functions called here. ! @@ -64,7 +64,7 @@ CONTAINS USE H5GLOBAL INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types + INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_TYPES_C'::h5init_types_c !DEC$ENDIF @@ -83,7 +83,7 @@ CONTAINS i_H5P_flags_int, & i_H5R_flags, & i_H5S_flags, & - i_H5T_flags, & + i_H5T_flags, & i_H5Z_flags, & i_H5generic_flags) USE H5GLOBAL @@ -138,26 +138,26 @@ CONTAINS END SUBROUTINE h5open_f !---------------------------------------------------------------------- -! Name: h5close_f +! Name: h5close_f ! -! Purpose: Closes the HDF5 library and Fortran90 interface. +! Purpose: Closes the HDF5 library and Fortran90 interface. ! -! Inputs: -! Outputs: -! error: - error code +! Inputs: +! Outputs: +! error: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! -! Modifications: Explicit Fortran interfaces were added for +! Modifications: Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). February 28, 2001 +! port). February 28, 2001 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5close_f(error) @@ -184,7 +184,7 @@ CONTAINS INTEGER I_TYPES_LEN INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types + INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_TYPES_C'::h5close_types_c !DEC$ENDIF @@ -197,32 +197,32 @@ CONTAINS error = error_1 + error_2 END SUBROUTINE h5close_f - + !---------------------------------------------------------------------- -! Name: h5get_libversion_f +! Name: h5get_libversion_f ! ! Purpose: Returns the HDF5 LIbrary release number ! -! Inputs: -! Outputs: +! Inputs: +! Outputs: ! majnum: - major version of the library ! minum: - minor version of the library ! relnum: - release version of the library -! error: - error code +! error: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal ! September 24, 2002 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) USE H5GLOBAL - + IMPLICIT NONE INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error INTERFACE @@ -233,36 +233,36 @@ CONTAINS INTEGER, INTENT(OUT) :: majnum, minnum, relnum END FUNCTION h5get_libversion_c END INTERFACE - + error = h5get_libversion_c(majnum, minnum, relnum) - + END SUBROUTINE h5get_libversion_f !---------------------------------------------------------------------- -! Name: h5check_version_f +! Name: h5check_version_f ! ! Purpose: Verifies that library versions are consistent. ! -! Inputs: +! Inputs: ! majnum: - major version of the library ! minum: - minor version of the library ! relnum: - release version of the library -! Outputs: -! error: - error code +! Outputs: +! error: - error code ! Success: 0 ! Failure: application aborts ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal ! September 24, 2002 ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) USE H5GLOBAL - + IMPLICIT NONE INTEGER, INTENT(IN) :: majnum, minnum, relnum INTEGER, INTENT(OUT) :: error @@ -274,34 +274,34 @@ CONTAINS INTEGER, INTENT(IN) :: majnum, minnum, relnum END FUNCTION h5check_version_c END INTERFACE - + error = h5check_version_c(majnum, minnum, relnum) - + END SUBROUTINE h5check_version_f !---------------------------------------------------------------------- -! Name: h5garbage_collect_f +! Name: h5garbage_collect_f ! ! Purpose: Garbage collects on all free-lists of all types. ! -! Inputs: -! Outputs: -! error: - error code +! Inputs: +! Outputs: +! error: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal ! September 24, 2002 ! ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5garbage_collect_f(error) USE H5GLOBAL - + IMPLICIT NONE INTEGER, INTENT(OUT) :: error INTERFACE @@ -311,34 +311,34 @@ CONTAINS !DEC$ENDIF END FUNCTION h5garbage_collect_c END INTERFACE - + error = h5garbage_collect_c() END SUBROUTINE h5garbage_collect_f !---------------------------------------------------------------------- -! Name: h5dont_atexit_f +! Name: h5dont_atexit_f ! -! Purpose: Instructs library not to install atexit cleanup routine. +! Purpose: Instructs library not to install atexit cleanup routine. ! -! Inputs: -! Outputs: -! error: - error code +! Inputs: +! Outputs: +! error: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! Optional parameters: -! NONE +! NONE ! ! Programmer: Elena Pourmal ! September 24, 2002 ! ! -! Comment: +! Comment: !---------------------------------------------------------------------- SUBROUTINE h5dont_atexit_f(error) USE H5GLOBAL - + IMPLICIT NONE INTEGER, INTENT(OUT) :: error INTERFACE @@ -348,8 +348,8 @@ CONTAINS !DEC$ENDIF END FUNCTION h5dont_atexit_c END INTERFACE - + error = h5dont_atexit_c() - + END SUBROUTINE h5dont_atexit_f END MODULE H5LIB diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 index da21f6e..05ec366 100644 --- a/fortran/src/H5f90global.f90 +++ b/fortran/src/H5f90global.f90 @@ -2,23 +2,23 @@ ! ! NAME ! H5GLOBAL -! +! ! FUNCTION -! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are +! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are ! packed into arrays in H5_f.c and these arrays are then passed to Fortran. ! This module then uses EQUIVALENCE to assign elements of the arrays to ! Fortran equivalent C stubs. ! ! NOTES -! The size of the C arrays in H5_f.c have to match the values of the variables +! The size of the C arrays in H5_f.c have to match the values of the variables ! declared as PARAMETER, hence if the size of an array in H5_f.c is changed ! then the PARAMETER of that corresponding array in Fortran must also be changed. ! ! USES -! H5FORTRAN_TYPES - This module is generated at run time. See +! H5FORTRAN_TYPES - This module is generated at run time. See ! H5fortran_types.f90 for further informaton. ! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -31,7 +31,7 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! AUTHOR ! Elena Pourmal @@ -43,8 +43,8 @@ MODULE H5GLOBAL ! Definitions for reference datatypes. ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + ! values in the H5f90.h file. + INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90. ! The flag is used to tell the function whether the kind input variable @@ -65,11 +65,11 @@ MODULE H5GLOBAL ! value when new predefined ! datatypes are added - ! Do not forget to change the following line when new predefined + ! Do not forget to change the following line when new predefined ! floating data types are added INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4 - ! Do not forget to change the following line when new predefined + ! Do not forget to change the following line when new predefined ! integer data types are added INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 17 @@ -169,7 +169,7 @@ MODULE H5GLOBAL !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /FLOATING_TYPES/ !DEC$endif - COMMON /FLOATING_TYPES/ floating_types + COMMON /FLOATING_TYPES/ floating_types ! ! COMMON /INTEGER_TYPES/ H5T_STD_I8BE, & ! H5T_STD_I8LE, & @@ -206,7 +206,7 @@ MODULE H5GLOBAL !DEC$endif COMMON /H5F_FLAGS/ H5F_flags - INTEGER :: H5F_ACC_RDWR_F + INTEGER :: H5F_ACC_RDWR_F INTEGER :: H5F_ACC_RDONLY_F INTEGER :: H5F_ACC_TRUNC_F INTEGER :: H5F_ACC_EXCL_F @@ -260,7 +260,7 @@ MODULE H5GLOBAL INTEGER :: H5_ITER_UNKNOWN_F INTEGER :: H5_ITER_INC_F INTEGER :: H5_ITER_DEC_F - INTEGER :: H5_ITER_NATIVE_F + INTEGER :: H5_ITER_NATIVE_F INTEGER :: H5_ITER_N_F EQUIVALENCE(H5generic_flags(1), H5_INDEX_UNKNOWN_F) @@ -268,7 +268,7 @@ MODULE H5GLOBAL EQUIVALENCE(H5generic_flags(3), H5_INDEX_CRT_ORDER_F) EQUIVALENCE(H5generic_flags(4), H5_INDEX_N_F) EQUIVALENCE(H5generic_flags(5), H5_ITER_UNKNOWN_F) - EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) + EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) @@ -301,7 +301,7 @@ MODULE H5GLOBAL EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) - EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) + EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! XXX: Fix problems with H5G_LINK_F! - QAK ! these are really H5L values -MSB- EQUIVALENCE(H5G_flags(5), H5G_LINK_F) EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) @@ -309,10 +309,10 @@ MODULE H5GLOBAL EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) ! XXX - EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) - EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) - EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) - EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) + EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) + EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) + EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) + EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) ! ! H5D flags declaration ! @@ -324,7 +324,7 @@ MODULE H5GLOBAL !DEC$endif COMMON /H5D_FLAGS/ H5D_flags - INTEGER :: H5D_COMPACT_F + INTEGER :: H5D_COMPACT_F INTEGER :: H5D_CONTIGUOUS_F INTEGER :: H5D_CHUNKED_F @@ -348,7 +348,7 @@ MODULE H5GLOBAL INTEGER :: H5D_FILL_VALUE_DEFAULT_F INTEGER :: H5D_FILL_VALUE_USER_DEFINED_F -! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 +! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 ! characters for variable names in Fortran. INTEGER :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F @@ -377,7 +377,7 @@ MODULE H5GLOBAL EQUIVALENCE(H5D_flags(16), H5D_FILL_VALUE_ERROR_F) EQUIVALENCE(H5D_flags(17), H5D_FILL_VALUE_UNDEFINED_F) EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) - EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) + EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) EQUIVALENCE(H5D_flags(21), H5D_CHUNK_CACHE_NBYTES_DFLT_F) @@ -393,7 +393,7 @@ MODULE H5GLOBAL !DEC$endif COMMON /H5FD_FLAGS/ H5FD_flags - INTEGER :: H5FD_MPIO_INDEPENDENT_F + INTEGER :: H5FD_MPIO_INDEPENDENT_F INTEGER :: H5FD_MPIO_COLLECTIVE_F INTEGER :: H5FD_MEM_NOLIST_F INTEGER :: H5FD_MEM_DEFAULT_F @@ -505,7 +505,7 @@ MODULE H5GLOBAL INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER INTEGER :: H5O_COPY_EXPAND_REFERENCE_F ! TO STAY UNDER THE - INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F INTEGER :: H5O_COPY_PRESERVE_NULL_FLAG_F INTEGER :: H5O_COPY_ALL_F INTEGER :: H5O_SHMESG_NONE_FLAG_F @@ -543,27 +543,27 @@ MODULE H5GLOBAL EQUIVALENCE(h5o_flags(17) , H5O_HDR_ATTR_CRT_ORDER_INDEX_F) EQUIVALENCE(h5o_flags(18) , H5O_HDR_ATTR_STORE_PHASE_CHA_F) EQUIVALENCE(h5o_flags(19) , H5O_HDR_STORE_TIMES_F) - EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) + EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) ! ! H5P flags declaration ! - INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 + INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 INTEGER(HID_T) H5P_flags(H5P_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS/ !DEC$endif COMMON /H5P_FLAGS/ H5P_flags - INTEGER(HID_T) :: H5P_FILE_CREATE_F - INTEGER(HID_T) :: H5P_FILE_ACCESS_F + INTEGER(HID_T) :: H5P_FILE_CREATE_F + INTEGER(HID_T) :: H5P_FILE_ACCESS_F INTEGER(HID_T) :: H5P_DATASET_CREATE_F - INTEGER(HID_T) :: H5P_DATASET_XFER_F - INTEGER(HID_T) :: H5P_FILE_MOUNT_F - INTEGER(HID_T) :: H5P_DEFAULT_F - INTEGER(HID_T) :: H5P_ROOT_F + INTEGER(HID_T) :: H5P_DATASET_XFER_F + INTEGER(HID_T) :: H5P_FILE_MOUNT_F + INTEGER(HID_T) :: H5P_DEFAULT_F + INTEGER(HID_T) :: H5P_ROOT_F INTEGER(HID_T) :: H5P_OBJECT_CREATE_F INTEGER(HID_T) :: H5P_DATASET_ACCESS_F INTEGER(HID_T) :: H5P_GROUP_CREATE_F @@ -598,14 +598,14 @@ MODULE H5GLOBAL ! ! H5P intgere flags declaration ! - INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 + INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 INTEGER H5P_flags_int(H5P_FLAGS_INT_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ !DEC$endif COMMON /H5P_FLAGS_INT/ H5P_flags_int - INTEGER :: H5P_CRT_ORDER_INDEXED_F - INTEGER :: H5P_CRT_ORDER_TRACKED_F + INTEGER :: H5P_CRT_ORDER_INDEXED_F + INTEGER :: H5P_CRT_ORDER_TRACKED_F EQUIVALENCE(H5P_flags_int(1), H5P_CRT_ORDER_INDEXED_F) EQUIVALENCE(H5P_flags_int(2), H5P_CRT_ORDER_TRACKED_F) ! @@ -627,16 +627,16 @@ MODULE H5GLOBAL ! ! H5S flags declaration ! - INTEGER, PARAMETER :: H5S_FLAGS_LEN = 20 + INTEGER, PARAMETER :: H5S_FLAGS_LEN = 20 INTEGER H5S_flags(H5S_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ !DEC$endif COMMON /H5S_FLAGS/ H5S_flags - INTEGER :: H5S_SCALAR_F - INTEGER :: H5S_SIMPLE_F - INTEGER :: H5S_NULL_F + INTEGER :: H5S_SCALAR_F + INTEGER :: H5S_SIMPLE_F + INTEGER :: H5S_NULL_F INTEGER :: H5S_UNLIMITED_F INTEGER :: H5S_ALL_F @@ -644,13 +644,13 @@ MODULE H5GLOBAL INTEGER :: H5S_SELECT_NOOP_F INTEGER :: H5S_SELECT_SET_F INTEGER :: H5S_SELECT_OR_F - INTEGER :: H5S_SELECT_AND_F - INTEGER :: H5S_SELECT_XOR_F - INTEGER :: H5S_SELECT_NOTB_F - INTEGER :: H5S_SELECT_NOTA_F - INTEGER :: H5S_SELECT_APPEND_F - INTEGER :: H5S_SELECT_PREPEND_F - INTEGER :: H5S_SELECT_INVALID_F + INTEGER :: H5S_SELECT_AND_F + INTEGER :: H5S_SELECT_XOR_F + INTEGER :: H5S_SELECT_NOTB_F + INTEGER :: H5S_SELECT_NOTA_F + INTEGER :: H5S_SELECT_APPEND_F + INTEGER :: H5S_SELECT_PREPEND_F + INTEGER :: H5S_SELECT_INVALID_F INTEGER :: H5S_SEL_ERROR_F @@ -668,12 +668,12 @@ MODULE H5GLOBAL EQUIVALENCE(H5S_flags(7), H5S_ALL_F) EQUIVALENCE(H5S_flags(8), H5S_SELECT_NOOP_F) - EQUIVALENCE(H5S_flags(9), H5S_SELECT_AND_F) + EQUIVALENCE(H5S_flags(9), H5S_SELECT_AND_F) EQUIVALENCE(H5S_flags(10), H5S_SELECT_XOR_F) EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTB_F) EQUIVALENCE(H5S_flags(12), H5S_SELECT_NOTA_F) - EQUIVALENCE(H5S_flags(13), H5S_SELECT_APPEND_F) - EQUIVALENCE(H5S_flags(14), H5S_SELECT_PREPEND_F) + EQUIVALENCE(H5S_flags(13), H5S_SELECT_APPEND_F) + EQUIVALENCE(H5S_flags(14), H5S_SELECT_PREPEND_F) EQUIVALENCE(H5S_flags(15), H5S_SELECT_INVALID_F) @@ -694,36 +694,36 @@ MODULE H5GLOBAL !DEC$endif COMMON /H5T_FLAGS/ H5T_flags - INTEGER :: H5T_NO_CLASS_F - INTEGER :: H5T_INTEGER_F - INTEGER :: H5T_FLOAT_F - INTEGER :: H5T_TIME_F - INTEGER :: H5T_STRING_F + INTEGER :: H5T_NO_CLASS_F + INTEGER :: H5T_INTEGER_F + INTEGER :: H5T_FLOAT_F + INTEGER :: H5T_TIME_F + INTEGER :: H5T_STRING_F INTEGER :: H5T_BITFIELD_F - INTEGER :: H5T_OPAQUE_F - INTEGER :: H5T_COMPOUND_F + INTEGER :: H5T_OPAQUE_F + INTEGER :: H5T_COMPOUND_F INTEGER :: H5T_REFERENCE_F - INTEGER :: H5T_ENUM_F + INTEGER :: H5T_ENUM_F INTEGER :: H5T_VLEN_F INTEGER :: H5T_ARRAY_F - INTEGER :: H5T_ORDER_LE_F + INTEGER :: H5T_ORDER_LE_F INTEGER :: H5T_ORDER_BE_F INTEGER :: H5T_ORDER_VAX_F INTEGER :: H5T_ORDER_NONE_F INTEGER :: H5T_PAD_ZERO_F INTEGER :: H5T_PAD_ONE_F INTEGER :: H5T_PAD_BACKGROUND_F - INTEGER :: H5T_PAD_ERROR_F - INTEGER :: H5T_SGN_NONE_F - INTEGER :: H5T_SGN_2_F + INTEGER :: H5T_PAD_ERROR_F + INTEGER :: H5T_SGN_NONE_F + INTEGER :: H5T_SGN_2_F INTEGER :: H5T_SGN_ERROR_F INTEGER :: H5T_NORM_IMPLIED_F INTEGER :: H5T_NORM_MSBSET_F - INTEGER :: H5T_NORM_NONE_F + INTEGER :: H5T_NORM_NONE_F INTEGER :: H5T_CSET_ASCII_F INTEGER :: H5T_CSET_UTF8_F - INTEGER :: H5T_STR_NULLTERM_F - INTEGER :: H5T_STR_NULLPAD_F + INTEGER :: H5T_STR_NULLTERM_F + INTEGER :: H5T_STR_NULLPAD_F INTEGER :: H5T_STR_SPACEPAD_F INTEGER :: H5T_STR_ERROR_F INTEGER :: H5T_DIR_ASCEND_F @@ -774,13 +774,13 @@ MODULE H5GLOBAL !DEC$endif COMMON /H5Z_FLAGS/ H5Z_flags - INTEGER :: H5Z_FILTER_ERROR_F - INTEGER :: H5Z_FILTER_NONE_F + INTEGER :: H5Z_FILTER_ERROR_F + INTEGER :: H5Z_FILTER_NONE_F INTEGER :: H5Z_FILTER_ALL_F - INTEGER :: H5Z_FILTER_DEFLATE_F - INTEGER :: H5Z_FILTER_SHUFFLE_F - INTEGER :: H5Z_FILTER_FLETCHER32_F - INTEGER :: H5Z_FILTER_SZIP_F + INTEGER :: H5Z_FILTER_DEFLATE_F + INTEGER :: H5Z_FILTER_SHUFFLE_F + INTEGER :: H5Z_FILTER_FLETCHER32_F + INTEGER :: H5Z_FILTER_SZIP_F INTEGER :: H5Z_ERROR_EDC_F INTEGER :: H5Z_DISABLE_EDC_F INTEGER :: H5Z_ENABLE_EDC_F @@ -809,7 +809,7 @@ MODULE H5GLOBAL ! H5 Library flags declaration ! INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2 - INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) + INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5LIB_FLAGS/ !DEC$endif diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index d6b7a85..78fb9e9 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -149,9 +149,9 @@ int main() /* Default is C has 16 byte float */ - H5_C_HAS_REAL_NATIVE_16 = 1; + H5_C_HAS_REAL_NATIVE_16 = 1; /* Default is C has 12 byte float */ - H5_C_HAS_REAL_NATIVE_12 = 1; + H5_C_HAS_REAL_NATIVE_12 = 1; /* Write copyright, boilerplate to both files */ initCfile(); @@ -251,7 +251,7 @@ int main() writeFloatTypedef("double", 12); else if(sizeof(float) == 12) writeFloatTypedef("float", 12); - else /*C has no 12 byte float so disable it in Fortran*/ + else /*C has no 12 byte float so disable it in Fortran*/ { printf("warning: Fortran REAL is 12 bytes, no corresponding C floating type\n"); printf(" Disabling Fortran 12 byte REALs\n"); H5_C_HAS_REAL_NATIVE_12 = 0; @@ -265,7 +265,7 @@ int main() writeFloatTypedef("double", 16); else if(sizeof(float) == 16) writeFloatTypedef("float", 16); - else /*C has no 16 byte float so disable it in Fortran*/ + else /*C has no 16 byte float so disable it in Fortran*/ { printf("warning: Fortran REAL is 16 bytes, no corresponding C floating type\n"); printf(" Disabling Fortran 16 byte REALs\n"); H5_C_HAS_REAL_NATIVE_16 = 0; @@ -408,7 +408,7 @@ int main() } if(flag == 0) /* No higher or lower one found, indicating an error */ { - return -1; + return -1; } } } @@ -490,7 +490,7 @@ int main() } if(flag == 0) /* No higher or lower one found, indicating an error */ { - return -1; + return -1; } } } diff --git a/fortran/src/H5test_kind.f90 b/fortran/src/H5test_kind.f90 index b945cd3..bdf5f5b 100644 --- a/fortran/src/H5test_kind.f90 +++ b/fortran/src/H5test_kind.f90 @@ -2,24 +2,24 @@ ! ! NAME ! H5test_kind -! +! ! FUNCTION -! This stand alone program is used at build time to generate the program +! This stand alone program is used at build time to generate the program ! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated +! integers and reals. The appropriate program and subroutines are then generated ! depending on which of the KIND values are found. ! ! NOTES -! This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only +! This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only ! used when the Fortran intrinsic function SIZEOF is not available. It generates -! code that does not make use of SIZEOF in H5fortran_detect.f90 which is less +! code that does not make use of SIZEOF in H5fortran_detect.f90 which is less ! portable in comparison to using SIZEOF. ! -! The availability of SIZEOF is checked at configure time and the TRUE/FALSE +! The availability of SIZEOF is checked at configure time and the TRUE/FALSE ! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". ! ! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -32,7 +32,7 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! AUTHOR ! Elena Pourma @@ -88,7 +88,7 @@ WRITE(*,'(40(A,/))') & '! NOTES',& '! This source code does not make use of the Fortran intrinsic function SIZEOF because',& '! the availability of the intrinsic function was determined to be not available at',& -'! configure time',& +'! configure time',& '!',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '! Copyright by The HDF Group. *',& @@ -151,7 +151,7 @@ WRITE(*,'(40(A,/))') & WRITE(*,*)" WRITE(*,*) ""#define H5_FORTRAN_HAS_NATIVE_16"" " WRITE(*,*)" ENDIF" WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" + WRITE(*,*)"END SUBROUTINE" jr = 0 WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j WRITE(*,*)" IMPLICIT NONE" @@ -171,7 +171,7 @@ WRITE(*,'(40(A,/))') & WRITE(*,*)" write(*,*) ""#define H5_FORTRAN_HAS_REAL_NATIVE_16"" " WRITE(*,*)" ENDIF" WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" + WRITE(*,*)"END SUBROUTINE" jd = 0 WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd WRITE(*,*)" IMPLICIT NONE" @@ -188,7 +188,7 @@ WRITE(*,'(40(A,/))') & WRITE(*,*)" WRITE(*,*) ""#define H5_FORTRAN_HAS_DOUBLE_NATIVE_16"" " WRITE(*,*)" ENDIF" WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" + WRITE(*,*)"END SUBROUTINE" DO i = 1, ii j = ikind_numbers(i) WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j @@ -212,7 +212,7 @@ WRITE(*,'(40(A,/))') & WRITE(*,*)" WRITE(*,*) ""#define H5_FORTRAN_HAS_INTEGER_16"" " WRITE(*,*)" ENDIF" WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" + WRITE(*,*)" END SUBROUTINE" ENDDO DO i = 1, ir j = rkind_numbers(i) @@ -234,9 +234,9 @@ WRITE(*,'(40(A,/))') & WRITE(*,*)" write(*,*) ""#define H5_FORTRAN_HAS_REAL_16"" " WRITE(*,*)" ENDIF" WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" + WRITE(*,*)" END SUBROUTINE" ENDDO END PROGRAM test_kind - + diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90 index 2b992a3..fbbe8e9 100644 --- a/fortran/src/H5test_kind_SIZEOF.f90 +++ b/fortran/src/H5test_kind_SIZEOF.f90 @@ -4,17 +4,17 @@ ! H5test_kind ! ! FUNCTION -! This stand alone program is used at build time to generate the program +! This stand alone program is used at build time to generate the program ! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated +! integers and reals. The appropriate program and subroutines are then generated ! depending on which of the KIND values are found. ! ! NOTES -! This program is used in place of H5test_kind.f90 when the Fortran intrinsic -! function SIZEOF is available. It generates code that makes use of SIZEOF in +! This program is used in place of H5test_kind.f90 when the Fortran intrinsic +! function SIZEOF is available. It generates code that makes use of SIZEOF in ! H5fortran_detect.f90 which is a portable solution. ! -! The availability of SIZEOF is checked at configure time and the TRUE/FALSE +! The availability of SIZEOF is checked at configure time and the TRUE/FALSE ! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". ! ! COPYRIGHT @@ -86,7 +86,7 @@ WRITE(*,'(40(A,/))') & '! NOTES',& '! This source code makes use of the Fortran intrinsic function SIZEOF because',& '! the availability of the intrinsic function was determined to be available at',& -'! configure time',& +'! configure time',& '!',& '! COPYRIGHT',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& @@ -137,7 +137,7 @@ WRITE(*,'(40(A,/))') & WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" WRITE(*,*)' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'//"//ADJUSTL(ichr2)" WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" + WRITE(*,*)"END SUBROUTINE" jr = 0 WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j WRITE(*,*)" IMPLICIT NONE" @@ -187,6 +187,6 @@ WRITE(*,'(40(A,/))') & WRITE(*,*)"END SUBROUTINE" ENDDO END PROGRAM test_kind - - + + diff --git a/fortran/src/HDF5.f90 b/fortran/src/HDF5.f90 index 1d758fb..b18591d 100644 --- a/fortran/src/HDF5.f90 +++ b/fortran/src/HDF5.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! MODULE HDF5 USE H5GLOBAL diff --git a/fortran/src/HDF5mpio.f90 b/fortran/src/HDF5mpio.f90 index 6febef8..15d3a93 100644 --- a/fortran/src/HDF5mpio.f90 +++ b/fortran/src/HDF5mpio.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! MODULE HDF5 USE H5GLOBAL diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 31b08ac..d0122f2 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -424,7 +424,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 49 +LT_VERS_REVISION = 54 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/fortran/test/fflush1.f90 b/fortran/test/fflush1.f90 index f42ae6e..8767e55 100644 --- a/fortran/test/fflush1.f90 +++ b/fortran/test/fflush1.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,23 +11,23 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! ! Purpose: This is the first half of a two-part test that makes sure ! that a file can be read after an application crashes as long -! as the file was flushed first. We simulate by exit the +! as the file was flushed first. We simulate by exit the ! the program using stop statement ! PROGRAM FFLUSH1EXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE ! - !the respective filename is "fflush1.h5" + !the respective filename is "fflush1.h5" ! CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" CHARACTER(LEN=80) :: fix_filename @@ -42,40 +42,40 @@ ! ! File identifiers ! - INTEGER(HID_T) :: file_id - + INTEGER(HID_T) :: file_id + ! ! Group identifier ! - INTEGER(HID_T) :: gid + INTEGER(HID_T) :: gid ! ! dataset identifier ! INTEGER(HID_T) :: dset_id - + ! ! data space identifier ! INTEGER(HID_T) :: dataspace - ! + ! !The dimensions for the dataset. ! INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/NX,NY/) ! - !flag to check operation success - ! + !flag to check operation success + ! INTEGER :: error ! - !general purpose integer - ! + !general purpose integer + ! INTEGER :: i, j, total_error = 0 ! - !data buffers - ! + !data buffers + ! INTEGER, DIMENSION(NX,NY) :: data_in INTEGER(HSIZE_T), DIMENSION(2) :: data_dims data_dims(1) = NX @@ -84,7 +84,7 @@ ! !Initialize FORTRAN predifined datatypes ! - CALL h5open_f(error) + CALL h5open_f(error) CALL check("h5open_f",error,total_error) ! @@ -98,7 +98,7 @@ ! !Create file "fflush1.h5" using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -109,29 +109,29 @@ ! !Create group "/G" inside file "fflush1.h5". - ! + ! CALL h5gcreate_f(file_id, "/G", gid, error) CALL check("h5gcreate_f",error,total_error) ! - !Create data space for the dataset. + !Create data space for the dataset. ! CALL h5screate_simple_f(RANK, dims, dataspace, error) CALL check("h5screate_simple_f",error,total_error) ! !Create dataset "/D" inside file "fflush1.h5". - ! + ! CALL h5dcreate_f(file_id, "/D", H5T_NATIVE_INTEGER, dataspace, & dset_id, error) CALL check("h5dcreate_f",error,total_error) - + ! ! Write data_in to the dataset ! CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error) CALL check("h5dwrite_f",error,total_error) - + ! !flush and exit without closing the library ! diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.f90 index 38a2bd7..a4710e2 100644 --- a/fortran/test/fflush2.f90 +++ b/fortran/test/fflush2.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,7 +11,7 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! ! Purpose: This is the second half of a two-part test that makes sure @@ -22,8 +22,8 @@ PROGRAM FFLUSH2EXAMPLE - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" @@ -39,37 +39,37 @@ ! ! File identifiers ! - INTEGER(HID_T) :: file_id - + INTEGER(HID_T) :: file_id + ! ! Group identifier ! - INTEGER(HID_T) :: gid + INTEGER(HID_T) :: gid ! ! dataset identifier ! INTEGER(HID_T) :: dset_id - + ! ! data type identifier ! INTEGER(HID_T) :: dtype_id ! - !flag to check operation success - ! + !flag to check operation success + ! INTEGER :: error ! - !general purpose integer - ! + !general purpose integer + ! INTEGER :: i, j, total_error = 0 ! - !data buffers - ! + !data buffers + ! INTEGER, DIMENSION(NX,NY) :: data_out INTEGER(HSIZE_T), DIMENSION(2) :: data_dims data_dims(1) = NX @@ -78,7 +78,7 @@ ! !Initialize FORTRAN predifined datatypes ! - CALL h5open_f(error) + CALL h5open_f(error) CALL check("h5open_f",error,total_error) ! @@ -95,13 +95,13 @@ ! !Open the dataset - ! + ! CALL h5dopen_f(file_id, "/D", dset_id, error) CALL check("h5dopen_f",error,total_error) ! !Get dataset's data type. - ! + ! CALL h5dget_type_f(dset_id, dtype_id, error) CALL check("h5dget_type_f",error,total_error) @@ -128,14 +128,14 @@ ! !Open the group. ! - CALL h5gopen_f(file_id, "G", gid, error) + CALL h5gopen_f(file_id, "G", gid, error) CALL check("h5gopen_f",error,total_error) - + ! !In case error happens, exit. ! IF (error == -1) CALL h5_exit_f (1) - + ! !Close the datatype ! @@ -166,7 +166,7 @@ CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL h5close_f(error) CALL check("h5close_types_f",error,total_error) - + ! if errors detected, exit with non-zero code. IF (total_error .ne. 0) CALL h5_exit_f (1) diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90 index f44e373..d8acc29 100644 --- a/fortran/test/fortranlib_test.f90 +++ b/fortran/test/fortranlib_test.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,16 +11,16 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! ! ! -! ! Testing Fortran functionality. ! PROGRAM fortranlibtest - + USE HDF5 - + IMPLICIT NONE INTEGER :: total_error = 0 INTEGER :: error @@ -43,7 +43,7 @@ PROGRAM fortranlibtest WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO") WRITE(*, '(I1)', advance="NO") majnum - WRITE(*, '(".")', advance="NO") + WRITE(*, '(".")', advance="NO") WRITE(*, '(I1)', advance="NO") minnum WRITE(*, '(" release ")', advance="NO") WRITE(*, '(I3)') relnum @@ -60,7 +60,7 @@ PROGRAM fortranlibtest ret_total_error = 0 CALL mountingtest(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Mounting test', total_error) - + ret_total_error = 0 CALL reopentest(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Reopen test', total_error) @@ -86,7 +86,7 @@ PROGRAM fortranlibtest ret_total_error = 0 CALL datasettest(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Dataset test', total_error) - + ret_total_error = 0 CALL extenddsettest(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Extendible dataset test', total_error) @@ -108,7 +108,7 @@ PROGRAM fortranlibtest ret_total_error = 0 CALL refobjtest(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Reference to object test', total_error) - + ret_total_error = 0 CALL refregtest(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Reference to dataset region test', total_error) @@ -126,7 +126,7 @@ PROGRAM fortranlibtest ret_total_error = 0 CALL test_select_hyperslab( cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Hyperslab selection test', total_error) - + ret_total_error = 0 CALL test_select_element(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Element selection test', total_error) @@ -142,7 +142,7 @@ PROGRAM fortranlibtest ret_total_error = 0 CALL test_select_bounds(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Selection bounds test ', total_error) - + ! write(*,*) ! write(*,*) '=========================================' ! write(*,*) 'Testing DATATYPE interface ' @@ -165,7 +165,7 @@ PROGRAM fortranlibtest ! write(*,*) ! write(*,*) '=========================================' -! write(*,*) 'Testing PROPERTY interface ' +! write(*,*) 'Testing PROPERTY interface ' ! write(*,*) '=========================================' ret_total_error = 0 @@ -181,7 +181,7 @@ PROGRAM fortranlibtest ! write(*,*) ! write(*,*) '=========================================' -! write(*,*) 'Testing ATTRIBUTE interface ' +! write(*,*) 'Testing ATTRIBUTE interface ' ! write(*,*) '=========================================' ret_total_error = 0 @@ -203,7 +203,7 @@ PROGRAM fortranlibtest ret_total_error = 0 CALL szip_test(szip_flag, cleanup, ret_total_error) - + IF (.NOT. szip_flag) THEN ! test not available CALL write_test_status(-1, ' SZIP filter test', total_error) ELSE @@ -236,7 +236,7 @@ PROGRAM fortranlibtest WRITE(*, fmt = '(i4)', advance='NO') total_error WRITE(*, fmt = '(12a)' ) ' error(s) ! ' WRITE(*,*) ' ============================================ ' - + CALL h5close_f(error) ! if errors detected, exit with non-zero code. diff --git a/fortran/test/fortranlib_test_1_8.f90 b/fortran/test/fortranlib_test_1_8.f90 index 9ab6743..fac83eb 100644 --- a/fortran/test/fortranlib_test_1_8.f90 +++ b/fortran/test/fortranlib_test_1_8.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,10 +11,10 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! ! ! -! ! Testing Fortran wrappers introduced in 1.8 release. ! PROGRAM fortranlibtest @@ -28,7 +28,7 @@ PROGRAM fortranlibtest INTEGER :: majnum, minnum, relnum LOGICAL :: cleanup, status - CALL h5open_f(error) + CALL h5open_f(error) cleanup = .TRUE. CALL h5_env_nocleanup_f(status) @@ -41,7 +41,7 @@ PROGRAM fortranlibtest IF(total_error .EQ. 0) THEN WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO") WRITE(*, '(I1)', advance="NO") majnum - WRITE(*, '(".")', advance="NO") + WRITE(*, '(".")', advance="NO") WRITE(*, '(I1)', advance="NO") minnum WRITE(*, '(" release ")', advance="NO") WRITE(*, '(I3)') relnum @@ -92,7 +92,7 @@ PROGRAM fortranlibtest ' Testing dataspace encoding and decoding', & total_error) - + ! CALL test_hard_query(group_total_error) @@ -112,15 +112,15 @@ PROGRAM fortranlibtest END PROGRAM fortranlibtest SUBROUTINE dtransform(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T) :: dxpl_id_c_to_f INTEGER(HID_T) :: file_id - + CHARACTER(LEN=15), PARAMETER :: c_to_f = "(9/5.0)*x + 123" INTEGER :: error CHARACTER(LEN=15) :: ptrgetTest @@ -135,7 +135,7 @@ SUBROUTINE dtransform(cleanup, total_error) CALL H5Pcreate_f(H5P_DATASET_XFER_F, dxpl_id_c_to_f, error) CALL check("dtransform.H5Pcreate_f", error, total_error) - + CALL H5Pset_data_transform_f(dxpl_id_c_to_f, c_to_f, error) CALL check("dtransform.H5Pset_data_transform_f", error, total_error) @@ -177,8 +177,8 @@ END SUBROUTINE dtransform SUBROUTINE test_genprop_basic_class(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -210,8 +210,8 @@ SUBROUTINE test_genprop_basic_class(cleanup, total_error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',name, 'CLASS1_NAME=',CLASS1_NAME total_error = total_error + 1 - ENDIF - + ENDIF + ! /* Check class name smaller buffer*/ CALL H5Pget_class_name_f(cid1, name_small, size, error) CALL check("H5Pget_class_name", error, total_error) @@ -266,8 +266,8 @@ SUBROUTINE test_h5s_encode(cleanup, total_error) !** !****************************************************************/ - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -296,7 +296,7 @@ SUBROUTINE test_h5s_encode(cleanup, total_error) ! H5S_sel_type sel_type; ! hssize_t nblocks; ! - !Dataset dimensions + !Dataset dimensions ! INTEGER, PARAMETER :: SPACE1_DIM1= 3, SPACE1_DIM2=15, SPACE1_DIM3=13 @@ -311,15 +311,15 @@ SUBROUTINE test_h5s_encode(cleanup, total_error) ! * Test encoding and decoding of simple dataspace and hyperslab selection. ! *------------------------------------------------------------------------- ! */ - + CALL H5Screate_simple_f(SPACE1_RANK, dims1, sid1, error) CALL check("H5Screate_simple", error, total_error) - + CALL h5sselect_hyperslab_f(sid1, H5S_SELECT_SET_F, & - start, count, error, stride=stride, BLOCK=BLOCK) + start, count, error, stride=stride, BLOCK=BLOCK) CALL check("h5sselect_hyperslab_f", error, total_error) - - + + !/* Encode simple data space in a buffer */ ! First find the buffer size @@ -369,9 +369,9 @@ SUBROUTINE test_h5s_encode(cleanup, total_error) ! CALL h5sclose_f(sid1, error) CALL check("h5sclose_f", error, total_error) - + CALL h5sclose_f(decoded_sid1, error) - CALL check("h5sclose_f", error, total_error) + CALL check("h5sclose_f", error, total_error) ! /*------------------------------------------------------------------------- ! * Test encoding and decoding of scalar dataspace. @@ -417,7 +417,7 @@ SUBROUTINE test_h5s_encode(cleanup, total_error) CALL h5sclose_f(sid3, error) CALL check("h5sclose_f", error, total_error) - + CALL h5sclose_f(decoded_sid3, error) CALL check("h5sclose_f", error, total_error) diff --git a/fortran/test/t.c b/fortran/test/t.c index f2203d0..bf30331 100644 --- a/fortran/test/t.c +++ b/fortran/test/t.c @@ -52,9 +52,9 @@ nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f* fapl, _fcd full_n HD5packFstring(c_full_name, _fcdtocp(full_name), (size_t)*full_namelen); done: - if(c_base_name) + if(c_base_name) HDfree(c_base_name); - if(c_full_name) + if(c_full_name) HDfree(c_full_name); return ret_value; diff --git a/fortran/test/tH5A.f90 b/fortran/test/tH5A.f90 index b73dd8a..dd6cbb1 100644 --- a/fortran/test/tH5A.f90 +++ b/fortran/test/tH5A.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,23 +11,23 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! SUBROUTINE attribute_test(cleanup, total_error) -! This subroutine tests following functionalities: +! This subroutine tests following functionalities: ! h5acreate_f, h5awrite_f, h5aclose_f,h5aread_f, h5aopen_name_f, ! h5aget_name_f,h5aget_space_f, h5aget_type_f, -! +! + + USE HDF5 ! This module contains all necessary modules - USE HDF5 ! This module contains all necessary modules - IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error CHARACTER(LEN=5), PARAMETER :: filename = "atest" !File name - CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=9), PARAMETER :: dsetname = "atestdset" !Dataset name CHARACTER(LEN=11), PARAMETER :: aname = "attr_string" !String Attribute name CHARACTER(LEN=14), PARAMETER :: aname2 = "attr_character"!Character Attribute name @@ -35,7 +35,7 @@ CHARACTER(LEN=9), PARAMETER :: aname4 = "attr_real" !Real Attribute name CHARACTER(LEN=12), PARAMETER :: aname5 = "attr_integer" !Integer Attribute name CHARACTER(LEN=9), PARAMETER :: aname6 = "attr_null" !Null Attribute name - + ! !data space rank and dimensions ! @@ -45,44 +45,44 @@ - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: dataspace ! Dataspace identifier for dataset + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: dataspace ! Dataspace identifier for dataset - INTEGER(HID_T) :: attr_id !String Attribute identifier - INTEGER(HID_T) :: attr2_id !Character Attribute identifier - INTEGER(HID_T) :: attr3_id !Double Attribute identifier - INTEGER(HID_T) :: attr4_id !Real Attribute identifier - INTEGER(HID_T) :: attr5_id !Integer Attribute identifier - INTEGER(HID_T) :: attr6_id !Null Attribute identifier - INTEGER(HID_T) :: aspace_id !String Attribute Dataspace identifier + INTEGER(HID_T) :: attr_id !String Attribute identifier + INTEGER(HID_T) :: attr2_id !Character Attribute identifier + INTEGER(HID_T) :: attr3_id !Double Attribute identifier + INTEGER(HID_T) :: attr4_id !Real Attribute identifier + INTEGER(HID_T) :: attr5_id !Integer Attribute identifier + INTEGER(HID_T) :: attr6_id !Null Attribute identifier + INTEGER(HID_T) :: aspace_id !String Attribute Dataspace identifier INTEGER(HID_T) :: aspace2_id !Character Attribute Dataspace identifier - INTEGER(HID_T) :: aspace6_id !Null Attribute Dataspace identifier - INTEGER(HID_T) :: atype_id !String Attribute Datatype identifier - INTEGER(HID_T) :: atype2_id !Character Attribute Datatype identifier - INTEGER(HID_T) :: atype3_id !Double Attribute Datatype identifier - INTEGER(HID_T) :: atype4_id !Real Attribute Datatype identifier - INTEGER(HID_T) :: atype5_id !Integer Attribute Datatype identifier + INTEGER(HID_T) :: aspace6_id !Null Attribute Dataspace identifier + INTEGER(HID_T) :: atype_id !String Attribute Datatype identifier + INTEGER(HID_T) :: atype2_id !Character Attribute Datatype identifier + INTEGER(HID_T) :: atype3_id !Double Attribute Datatype identifier + INTEGER(HID_T) :: atype4_id !Real Attribute Datatype identifier + INTEGER(HID_T) :: atype5_id !Integer Attribute Datatype identifier INTEGER(HSIZE_T), DIMENSION(1) :: adims = (/2/) ! Attribute dimension INTEGER(HSIZE_T), DIMENSION(1) :: adims2 = (/1/) ! Attribute dimension INTEGER :: arank = 1 ! Attribure rank INTEGER(SIZE_T) :: attrlen ! Length of the attribute string - INTEGER(HID_T) :: attr_space !Returned String Attribute Space identifier - INTEGER(HID_T) :: attr2_space !Returned other Attribute Space identifier + INTEGER(HID_T) :: attr_space !Returned String Attribute Space identifier + INTEGER(HID_T) :: attr2_space !Returned other Attribute Space identifier INTEGER(HID_T) :: attr_type !Returned Attribute Datatype identifier INTEGER(HID_T) :: attr2_type !Returned CHARACTER Attribute Datatype identifier INTEGER(HID_T) :: attr3_type !Returned DOUBLE Attribute Datatype identifier INTEGER(HID_T) :: attr4_type !Returned REAL Attribute Datatype identifier INTEGER(HID_T) :: attr5_type !Returned INTEGER Attribute Datatype identifier INTEGER(HID_T) :: attr6_type !Returned NULL Attribute Datatype identifier - INTEGER :: num_attrs !number of attributes + INTEGER :: num_attrs !number of attributes INTEGER(HSIZE_T) :: attr_storage ! attributes storage requirements .MSB. CHARACTER(LEN=256) :: attr_name !buffer to put attr_name INTEGER(SIZE_T) :: name_size = 80 !attribute name length CHARACTER(LEN=35), DIMENSION(2) :: attr_data ! String attribute data - CHARACTER(LEN=35), DIMENSION(2) :: aread_data ! Buffer to put read back + CHARACTER(LEN=35), DIMENSION(2) :: aread_data ! Buffer to put read back ! string attr data CHARACTER :: attr_character_data = 'A' DOUBLE PRECISION, DIMENSION(1) :: attr_double_data = 3.459 @@ -90,7 +90,7 @@ INTEGER, DIMENSION(1) :: attr_integer_data = 5 INTEGER(HSIZE_T), DIMENSION(7) :: data_dims - + CHARACTER :: aread_character_data ! variable to put read back Character attr data INTEGER, DIMENSION(1) :: aread_integer_data ! variable to put read back integer attr data INTEGER, DIMENSION(1) :: aread_null_data = 7 ! variable to put read back null attr data @@ -98,19 +98,19 @@ REAL, DIMENSION(1) :: aread_real_data ! variable to put read back real attr data ! - !general purpose integer - ! + !general purpose integer + ! INTEGER :: i, j INTEGER :: error ! Error flag - - ! + + ! !The dimensions for the dataset. ! INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/NX,NY/) ! - !data buffers - ! + !data buffers + ! INTEGER, DIMENSION(NX,NY) :: data_in @@ -126,9 +126,9 @@ ! Initialize attribute's data ! attr_data(1) = 'Dataset character attribute' - attr_data(2) = 'Some other string here ' - attrlen = LEN(attr_data(1)) - + attr_data(2) = 'Some other string here ' + attrlen = LEN(attr_data(1)) + ! ! Create the file. ! @@ -141,13 +141,13 @@ CALL check("h5fcreate_f",error,total_error) ! - !Create data space for the dataset. + !Create data space for the dataset. ! CALL h5screate_simple_f(RANK, dims, dataspace, error) CALL check("h5screate_simple_f",error,total_error) ! - ! create dataset in the file. + ! create dataset in the file. ! CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, & dset_id, error) @@ -162,17 +162,17 @@ CALL check("h5dwrite_f",error,total_error) ! - ! Create scalar data space for the String attribute. + ! Create scalar data space for the String attribute. ! CALL h5screate_simple_f(arank, adims, aspace_id, error) CALL check("h5screate_simple_f",error,total_error) ! - ! Create scalar data space for all other attributes. + ! Create scalar data space for all other attributes. ! CALL h5screate_simple_f(arank, adims2, aspace2_id, error) CALL check("h5screate_simple_f",error,total_error) ! - ! Create null data space for null attributes. + ! Create null data space for null attributes. ! CALL h5screate_f(H5S_NULL_F, aspace6_id, error) CALL check("h5screate_f",error,total_error) @@ -222,7 +222,7 @@ CALL h5acreate_f(dset_id, aname2, atype2_id, aspace2_id, & attr2_id, error) CALL check("h5acreate_f",error,total_error) - + ! ! Create dataset DOUBLE attribute. @@ -250,7 +250,7 @@ attr6_id, error) CALL check("h5acreate_f",error,total_error) - + ! ! Write the String attribute data. ! @@ -265,20 +265,20 @@ ! ! Write the DOUBLE attribute data. ! - data_dims(1) = 1 + data_dims(1) = 1 CALL h5awrite_f(attr3_id, atype3_id, attr_double_data, data_dims, error) CALL check("h5awrite_f",error,total_error) ! ! Write the Real attribute data. ! - data_dims(1) = 1 + data_dims(1) = 1 CALL h5awrite_f(attr4_id, atype4_id, attr_real_data, data_dims, error) CALL check("h5awrite_f",error,total_error) ! ! Write the Integer attribute data. ! - data_dims(1) = 1 + data_dims(1) = 1 CALL h5awrite_f(attr5_id, atype5_id, attr_integer_data, data_dims, error) CALL check("h5awrite_f",error,total_error) @@ -310,9 +310,9 @@ CALL check("h5aget_storage_size_f",error,total_error) ! CALL verify("h5aget_storage_size_f",attr_storage,0,total_error) - + ! - ! Close the attribute. + ! Close the attribute. ! CALL h5aclose_f(attr_id, error) CALL check("h5aclose_f",error,total_error) @@ -394,7 +394,7 @@ ! CALL h5aopen_name_f(dset_id, aname5, attr5_id, error) CALL check("h5aopen_idx_f",error,total_error) - + ! !open the NULL attrbute by name ! @@ -412,7 +412,7 @@ IF (error .NE. 12) THEN total_error = total_error + 1 END IF - + ! !get the STRING attrbute space ! @@ -449,7 +449,7 @@ ! CALL h5aget_type_f(attr5_id, attr5_type, error) CALL check("h5aget_type_f",error,total_error) - + ! !get the null attrbute datatype ! @@ -483,9 +483,9 @@ IF ( (aread_data(1) .NE. attr_data(1)) .OR. (aread_data(2) .NE. attr_data(2)) ) THEN WRITE(*,*) "Read back string attrbute is wrong", aread_data(1), aread_data(2) - total_error = total_error + 1 + total_error = total_error + 1 END IF - + ! !read the CHARACTER attribute data back to memory ! @@ -493,51 +493,51 @@ CALL check("h5aread_f",error,total_error) IF (aread_character_data .NE. 'A' ) THEN WRITE(*,*) "Read back character attrbute is wrong ",aread_character_data - total_error = total_error + 1 + total_error = total_error + 1 END IF ! !read the double attribute data back to memory ! - data_dims(1) = 1 + data_dims(1) = 1 CALL h5aread_f(attr3_id, H5T_NATIVE_DOUBLE, aread_double_data, data_dims, error) CALL check("h5aread_f",error,total_error) IF (aread_double_data(1) .NE. 3.459 ) THEN WRITE(*,*) "Read back double attrbute is wrong", aread_double_data(1) total_error = total_error + 1 - END IF + END IF ! !read the real attribute data back to memory ! - data_dims(1) = 1 + data_dims(1) = 1 CALL h5aread_f(attr4_id, H5T_NATIVE_REAL, aread_real_data, data_dims, error) CALL check("h5aread_f",error,total_error) IF (aread_real_data(1) .NE. 4.0 ) THEN WRITE(*,*) "Read back real attrbute is wrong ", aread_real_data - total_error = total_error + 1 - END IF + total_error = total_error + 1 + END IF ! !read the Integer attribute data back to memory ! - data_dims(1) = 1 + data_dims(1) = 1 CALL h5aread_f(attr5_id, H5T_NATIVE_INTEGER, aread_integer_data, data_dims, error) CALL check("h5aread_f",error,total_error) IF (aread_integer_data(1) .NE. 5 ) THEN WRITE(*,*) "Read back integer attrbute is wrong ", aread_integer_data - total_error = total_error + 1 - END IF + total_error = total_error + 1 + END IF ! !read the null attribute data. nothing can be read. ! - data_dims(1) = 1 + data_dims(1) = 1 CALL h5aread_f(attr6_id, H5T_NATIVE_INTEGER, aread_null_data, data_dims, error) CALL check("h5aread_f",error,total_error) IF (aread_null_data(1) .NE. 7 ) THEN WRITE(*,*) "Read back null attrbute is wrong ", aread_null_data - total_error = total_error + 1 - END IF - + total_error = total_error + 1 + END IF + ! - ! Close the attribute. + ! Close the attribute. ! CALL h5aclose_f(attr_id, error) CALL check("h5aclose_f",error,total_error) @@ -553,9 +553,9 @@ CALL check("h5aclose_f",error,total_error) ! - ! Delete the attribute from the Dataset. + ! Delete the attribute from the Dataset. ! - CALL h5adelete_f(dset_id, aname, error) + CALL h5adelete_f(dset_id, aname, error) CALL check("h5adelete_f",error,total_error) ! @@ -591,13 +591,13 @@ CALL h5tclose_f(attr6_type, error) CALL check("h5tclose_f",error,total_error) - ! + ! ! End access to the dataset and release resources used by it. - ! + ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f",error,total_error) - ! + ! ! Close the file. ! CALL h5fclose_f(file_id, error) diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90 index 58408ee..223877c 100644 --- a/fortran/test/tH5A_1_8.f90 +++ b/fortran/test/tH5A_1_8.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,22 +11,22 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! -SUBROUTINE attribute_test_1_8(cleanup, total_error) +SUBROUTINE attribute_test_1_8(cleanup, total_error) ! This subroutine tests following 1.8 functionalities: ! h5acreate_f, h5awrite_f, h5aclose_f,h5aread_f, h5aopen_name_f, ! h5aget_name_f,h5aget_space_f, h5aget_type_f, H5Pset_shared_mesg_nindexes_f, ! H5Pset_shared_mesg_index_f -! +! - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(INOUT) :: total_error - + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=5), PARAMETER :: filename = "atest" !File name CHARACTER(LEN=9), PARAMETER :: dsetname = "atestdset" !Dataset name CHARACTER(LEN=11), PARAMETER :: aname = "attr_string" !String Attribute name @@ -35,7 +35,7 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) CHARACTER(LEN=9), PARAMETER :: aname4 = "attr_real" !Real Attribute name CHARACTER(LEN=12), PARAMETER :: aname5 = "attr_integer" !Integer Attribute name CHARACTER(LEN=9), PARAMETER :: aname6 = "attr_null" !Null Attribute name - + ! !data space rank and dimensions ! @@ -44,11 +44,11 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) INTEGER, PARAMETER :: NY = 5 ! - !general purpose integer - ! + !general purpose integer + ! INTEGER :: i, j INTEGER :: error ! Error flag - + ! NEW STARTS HERE INTEGER(HID_T) :: fapl = -1, fapl2 = -1 INTEGER(HID_T) :: fcpl = -1, fcpl2 = -1 @@ -63,7 +63,7 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) ! ******************** ! WRITE(*,*) "TESTING ATTRIBUTES" - + CALL H5Pcreate_f(H5P_FILE_ACCESS_F,fapl,error) CALL check("h5Pcreate_f",error,total_error) CALL h5pcopy_f(fapl, fapl2, error) @@ -71,7 +71,7 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) CALL H5Pcreate_f(H5P_FILE_CREATE_F,fcpl,error) CALL check("h5Pcreate_f",error,total_error) - + CALL h5pcopy_f(fcpl, fcpl2, error) CALL check("h5pcopy_f",error,total_error) @@ -118,13 +118,13 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) my_fcpl = fcpl END IF !!$ CALL test_attr_dense_create(my_fcpl, my_fapl) - + ret_total_error = 0 CALL test_attr_dense_open(my_fcpl, my_fapl, ret_total_error) CALL write_test_status(ret_total_error, & ' - Testing INT attributes on both datasets and groups', & total_error) - + !!$ CALL test_attr_dense_delete(my_fcpl, my_fapl) !!$ CALL test_attr_dense_rename(my_fcpl, my_fapl) !!$ CALL test_attr_dense_unlink(my_fcpl, my_fapl) @@ -147,7 +147,7 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) CALL write_test_status(ret_total_error, & ' - Testing creating objects with attribute creation order', & total_error) - + ret_total_error = 0 CALL test_attr_corder_create_compact(my_fcpl, my_fapl, ret_total_error) CALL write_test_status(ret_total_error, & @@ -162,13 +162,13 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) CALL write_test_status(ret_total_error, & ' - Testing querying attribute info by index', & total_error) - + ret_total_error = 0 CALL test_attr_delete_by_idx(new_format, my_fcpl, my_fapl, ret_total_error) CALL write_test_status(ret_total_error, & ' - Testing deleting attribute by index', & total_error) - + !!$ CALL test_attr_iterate2(new_format, my_fcpl, my_fapl) !!$ CALL test_attr_open_by_idx(new_format, my_fcpl, my_fapl) !!$ CALL test_attr_open_by_name(new_format, my_fcpl, my_fapl) @@ -192,7 +192,7 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) CALL write_test_status(ret_total_error,& ' - Testing deleting shared attributes in "compact" & "dense" storage', & total_error) - + !!$ CALL test_attr_shared_unlink(my_fcpl, my_fapl) END IF @@ -264,16 +264,16 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) INTEGER(HID_T) :: my_dataset INTEGER :: u - + INTEGER :: max_compact ! Maximum # of links to store in group compactly INTEGER :: min_dense ! Minimum # of links to store in group "densely" CHARACTER(LEN=7) :: attrname CHARACTER(LEN=2) :: chr2 - INTEGER(HID_T) :: attr !String Attribute identifier + INTEGER(HID_T) :: attr !String Attribute identifier INTEGER(HSIZE_T), DIMENSION(7) :: data_dims - LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute + LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute INTEGER :: corder ! Is a positive integer containing the creation order of the attribute INTEGER :: cset ! Indicates the character set used for the attribute’s name INTEGER(HSIZE_T) :: data_size ! indicates the size, in the number of characters @@ -330,7 +330,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) CALL h5acreate_f(my_dataset, attrname, H5T_NATIVE_INTEGER, sid, attr, error) CALL check("h5acreate_f",error,total_error) - data_dims(1) = 1 + data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, u, data_dims, error) CALL check("h5awrite_f",error,total_error) @@ -354,7 +354,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dset3, error) CALL check("h5dclose_f",error,total_error) - + ! /* Close file */ CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) @@ -404,7 +404,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) f_corder_valid, corder, cset, data_size, error, lapl_id = H5P_DEFAULT_F ) !with optional CALL check("H5Aget_info_by_name_f", error, total_error) - + ! /* Verify creation order of attribute */ CALL verifyLogical("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) @@ -417,7 +417,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) f_corder_valid, corder, cset, data_size, error) ! without optional CALL check("H5Aget_info_by_name_f", error, total_error) - + ! /* Verify creation order of attribute */ CALL verifyLogical("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) @@ -432,7 +432,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dset3, error) CALL check("h5dclose_f",error,total_error) - + ! /* Close file */ CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) @@ -463,24 +463,24 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) INTEGER :: error - + INTEGER :: value_scalar INTEGER, DIMENSION(1) :: value - INTEGER(HID_T) :: attr !String Attribute identifier + INTEGER(HID_T) :: attr !String Attribute identifier INTEGER(HID_T) :: attr_sid INTEGER(HSIZE_T), DIMENSION(7) :: data_dims - INTEGER(HSIZE_T) :: storage_size ! attributes storage requirements + INTEGER(HSIZE_T) :: storage_size ! attributes storage requirements - LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute + LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute INTEGER :: corder ! Is a positive integer containing the creation order of the attribute INTEGER :: cset ! Indicates the character set used for the attribute’s name INTEGER(HSIZE_T) :: data_size ! indicates the size, in the number of characters - + LOGICAL :: equal ! test: H5Sextent_equal_f - + data_dims = 0 ! /* Output message about test being performed */ @@ -532,7 +532,7 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) CALL H5Sextent_equal_f(attr_sid, null_sid, equal, error) CALL check("H5Sextent_equal_f",error,total_error) CALL Verifylogical("H5Sextent_equal_f",equal,.TRUE.,total_error) - + !!$ ret = H5Sclose(attr_sid) !!$ CALL CHECK(ret, FAIL, "H5Sclose") @@ -586,7 +586,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) IMPLICIT NONE INTEGER(SIZE_T), PARAMETER :: NAME_BUF_SIZE = 7 - LOGICAL :: new_format + LOGICAL :: new_format INTEGER(HID_T), INTENT(IN) :: fcpl INTEGER(HID_T), INTENT(IN) :: fapl INTEGER, INTENT(INOUT) :: total_error @@ -616,7 +616,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) CHARACTER(LEN=2) :: chr2 - LOGICAL, DIMENSION(1:2) :: use_index = (/.FALSE.,.TRUE./) + LOGICAL, DIMENSION(1:2) :: use_index = (/.FALSE.,.TRUE./) INTEGER :: Input1 INTEGER :: i @@ -666,10 +666,10 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dset1, error, dcpl_id=dcpl ) CALL check("h5dcreate_f2",error,total_error) - + CALL h5dcreate_f(fid, DSET2_NAME, H5T_NATIVE_CHARACTER, sid, dset2, error, dcpl_id=dcpl ) CALL check("h5dcreate_f3",error,total_error) - + CALL h5dcreate_f(fid, DSET3_NAME, H5T_NATIVE_CHARACTER, sid, dset3, error, dcpl_id=dcpl ) CALL check("h5dcreate_f4",error,total_error) @@ -704,12 +704,12 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 CALL H5Acreate_by_name_f(fid, dsetname, attrname, H5T_NATIVE_INTEGER, sid, & - attr, error, lapl_id=H5P_DEFAULT_F, acpl_id=H5P_DEFAULT_F, aapl_id=H5P_DEFAULT_F) + attr, error, lapl_id=H5P_DEFAULT_F, acpl_id=H5P_DEFAULT_F, aapl_id=H5P_DEFAULT_F) CALL check("H5Acreate_by_name_f",error,total_error) - + ! /* Write data into the attribute */ - data_dims(1) = 1 + data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, u, data_dims, error) CALL check("h5awrite_f",error,total_error) @@ -751,7 +751,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) my_dataset = dset3 dsetname = DSET3_NAME END SELECT - + ! /* Create more attributes, to push into dense form */ DO u = max_compact, max_compact* 2 - 1 @@ -763,7 +763,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) CALL check("H5Acreate_by_name",error,total_error) ! /* Write data into the attribute */ - data_dims(1) = 1 + data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, u, data_dims, error) CALL check("h5awrite_f",error,total_error) @@ -867,7 +867,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) INTEGER(HID_T) :: attr !String Attribute identifier INTEGER(HSIZE_T), DIMENSION(7) :: data_dims - LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute + LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute INTEGER :: corder ! Is a positive integer containing the creation order of the attribute INTEGER :: cset ! Indicates the character set used for the attribute’s name INTEGER(HSIZE_T) :: data_size ! indicates the size, in the number of characters @@ -895,7 +895,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) data_dims = 0 ! /* Create dataspace for dataset & attributes */ - + CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) @@ -911,7 +911,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL check("H5Pget_attr_phase_change_f",error,total_error) ! /* Loop over using index for creation order value */ - + DO i = 1, 2 ! /* Output message about test being performed */ @@ -937,18 +937,18 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) ENDIF ! /* Create datasets */ - + CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dset1, error ) CALL check("h5dcreate_f",error,total_error) - + CALL h5dcreate_f(fid, DSET2_NAME, H5T_NATIVE_CHARACTER, sid, dset2, error ) CALL check("h5dcreate_f",error,total_error) - + CALL h5dcreate_f(fid, DSET3_NAME, H5T_NATIVE_CHARACTER, sid, dset3, error ) CALL check("h5dcreate_f",error,total_error) ! /* Work on all the datasets */ - + DO curr_dset = 0,NUM_DSETS-1 SELECT CASE (curr_dset) @@ -974,7 +974,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) ! -- CHECK PASSING AN INTEGER CONSTANT IN DIFFERENT FORMS -- - ! 1) call by passing an integer with the _hsize_t declaration + ! 1) call by passing an integer with the _hsize_t declaration CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, 0_hsize_t, & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) @@ -986,13 +986,13 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) - + ! 3) call by passing a variable with the attribute hsize_t CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, hzero, & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) - + CALL h5aget_name_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, & hzero, tmpname, error, size, lapl_id=H5P_DEFAULT_F) CALL VERIFY("h5aget_name_by_idx_f",error,minusone,total_error) @@ -1009,7 +1009,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) ! check with the optional information create2 specs. CALL h5acreate_f(my_dataset, attrname, H5T_NATIVE_INTEGER, sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - + ! /* Write data into the attribute */ attr_integer_data(1) = j @@ -1023,7 +1023,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL check("h5aclose_f",error,total_error) ! /* Verify information for new attribute */ - + !EP CALL attr_info_by_idx_check(my_dataset, attrname, INT(j,HSIZE_T), use_index(i), total_error ) htmp = j CALL attr_info_by_idx_check(my_dataset, attrname, htmp, use_index(i), total_error ) @@ -1045,7 +1045,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) ! /* Close file */ CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - + END DO ! /* Close property list */ @@ -1071,7 +1071,7 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CHARACTER(LEN=*) :: attrname INTEGER(HSIZE_T) :: n LOGICAL :: use_index - LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute + LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute INTEGER :: corder ! Is a positive integer containing the creation order of the attribute INTEGER :: cset ! Indicates the character set used for the attribute’s name INTEGER(HSIZE_T) :: data_size ! indicates the size, in the number of characters @@ -1084,7 +1084,7 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) ! /* Verify the information for first attribute, in increasing creation order */ CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, hzero, & f_corder_valid, corder, cset, data_size, error) - + CALL check("h5aget_info_by_idx_f",error,total_error) CALL verify("h5aget_info_by_idx_f",corder,0,total_error) ! /* Verify the information for new attribute, in increasing creation order */ @@ -1143,25 +1143,25 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) - + !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, 0_HSIZE_T, & ! -- CHECK PASSING AN INTEGER CONSTANT IN DIFFERENT FORMS -- - ! 1) call by passing an integer with the _hsize_t declaration + ! 1) call by passing an integer with the _hsize_t declaration CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, 0_HSIZE_T, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) - + ! 2) call by passing an integer with the INT(,hsize_t) declaration CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, INT(0,HSIZE_T), & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) - + CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + ! 3) call by passing a variable with the attribute hsize_t CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, hzero, & @@ -1244,7 +1244,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) CHARACTER(LEN=11) :: attrname2 CHARACTER(LEN=1), PARAMETER :: chr1 = '.' - + INTEGER :: u INTEGER, PARAMETER :: SPACE1_RANK = 3 INTEGER, PARAMETER :: NX = 20 @@ -1301,7 +1301,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) CALL H5Pset_shared_mesg_nindexes_f(my_fcpl,3,error) ! /* Make attributes > 500 bytes shared */ - CALL H5Pset_shared_mesg_index_f(my_fcpl, 0, H5O_SHMESG_ATTR_FLAG_F, 500,error) + CALL H5Pset_shared_mesg_index_f(my_fcpl, 0, H5O_SHMESG_ATTR_FLAG_F, 500,error) ! /* Make datatypes & dataspaces > 1 byte shared (i.e. all of them :-) */ CALL H5Pset_shared_mesg_index_f(my_fcpl, 1, H5O_SHMESG_DTYPE_FLAG_F, 1,error) CALL H5Pset_shared_mesg_index_f(my_fcpl, 2, H5O_SHMESG_SDSPACE_FLAG_F, 1,error) @@ -1321,7 +1321,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ! /* Re-open file */ CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error,fapl) CALL check("h5open_f",error,total_error) - + ! /* Commit datatype to file */ IF(test_shared.EQ.2) THEN CALL H5Tcommit_f(fid, TYPE1_NAME, attr_tid, error, H5P_DEFAULT_F, H5P_DEFAULT_F, H5P_DEFAULT_F) @@ -1366,16 +1366,16 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) !!$ is_dense = H5O_is_attr_dense_test(dataset2); !!$ VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test"); ! /* Add attributes to each dataset, until after converting to dense storage */ - + DO u = 0, (max_compact * 2) - 1 ! /* Create attribute name */ WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 - + ! /* Alternate between creating "small" & "big" attributes */ - + IF(MOD(u+1,2).EQ.0)THEN ! /* Create "small" attribute on first dataset */ @@ -1412,13 +1412,13 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) attr_integer_data(1) = u + 1 CALL h5awrite_f(attr, attr_tid, attr_integer_data, data_dims, error) CALL check("h5awrite_f",error,total_error) - + ! Check refcount for attribute */ !!$ ret = H5A_get_shared_rc_test(attr, &shared_refcount); !!$ CHECK(ret, FAIL, "H5A_get_shared_rc_test"); !!$ VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test"); ENDIF - + ! /* Close attribute */ CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) @@ -1444,7 +1444,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) !!$ VERIFY(is_shared, FALSE, "H5A_is_shared_test"); !!$ ! /* Write data into the attribute */ - + attr_integer_data(1) = u + 1 data_dims(1) = 1 CALL h5awrite_f(attr, attr_tid, attr_integer_data, data_dims, error) @@ -1452,7 +1452,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ELSE ! /* Create "big" attribute on second dataset */ - + CALL h5acreate_f(dataset2, attrname, attr_tid, big_sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) @@ -1467,7 +1467,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) !!$ ! /* Write data into the attribute */ - + attr_integer_data(1) = u + 1 data_dims(1) = 1 ! CALL h5awrite_f(attr, attr_tid, attr_integer_data, data_dims, error) @@ -1493,7 +1493,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ! /* Create new attribute name */ - + WRITE(chr2,'(I2.2)') u attrname2 = 'new attr '//chr2 @@ -1556,7 +1556,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ! /* Change second dataset's attribute's name back to original */ - + CALL H5Arename_by_name_f(fid, DSET2_NAME, attrname2, attrname, error) CALL check("H5Arename_by_name_f",error,total_error) @@ -1611,7 +1611,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ! /* Close attribute */ CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - + ENDDO ! /* Close attribute's datatype */ @@ -1696,7 +1696,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) !****************************************************************/ USE HDF5 - + IMPLICIT NONE LOGICAL, INTENT(IN) :: new_format @@ -1723,7 +1723,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) INTEGER(HID_T) :: attr !String Attribute identifier INTEGER(HSIZE_T), DIMENSION(7) :: data_dims - LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute + LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute INTEGER :: corder ! Is a positive integer containing the creation order of the attribute INTEGER :: cset ! Indicates the character set used for the attribute’s name INTEGER(HSIZE_T) :: data_size ! indicates the size, in the number of characters @@ -1742,14 +1742,14 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) INTEGER(SIZE_T) :: size CHARACTER(LEN=8) :: tmpname CHARACTER(LEN=1), PARAMETER :: chr1 = '.' - + INTEGER :: idx_type INTEGER :: order INTEGER :: u ! /* Local index variable */ INTEGER :: Input1 INTEGER(HSIZE_T) :: hzero = 0_HSIZE_T INTEGER :: minusone = -1 - + data_dims = 0 ! /* Create dataspace for dataset & attributes */ @@ -1770,10 +1770,10 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! /* Loop over operating in different orders */ DO order = H5_ITER_INC_F, H5_ITER_DEC_F - + ! /* Loop over using index for creation order value */ DO i = 1, 2 - + ! /* Print appropriate test message */ !!$ IF(idx_type .EQ. H5_INDEX_CRT_ORDER_F)THEN !!$ IF(order .EQ. H5_ITER_INC_F) THEN @@ -1828,18 +1828,18 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ENDIF ! /* Create datasets */ - + CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dset1, error, dcpl ) CALL check("h5dcreate_f2",error,total_error) - + CALL h5dcreate_f(fid, DSET2_NAME, H5T_NATIVE_CHARACTER, sid, dset2, error, dcpl ) CALL check("h5dcreate_f3",error,total_error) - + CALL h5dcreate_f(fid, DSET3_NAME, H5T_NATIVE_CHARACTER, sid, dset3, error, dcpl ) CALL check("h5dcreate_f4",error,total_error) - + ! /* Work on all the datasets */ - + DO curr_dset = 0,NUM_DSETS-1 SELECT CASE (curr_dset) CASE (0) @@ -1851,44 +1851,44 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! CASE DEFAULT ! CALL HDassert(0.AND."Toomanydatasets!") END SELECT - + ! /* Check on dataset's attribute storage status */ !!$ is_empty = H5O_is_attr_empty_test(my_dataset); !!$ VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test"); !!$ is_dense = H5O_is_attr_dense_test(my_dataset); !!$ VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test"); - + ! /* Check for deleting non-existant attribute */ !EP CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, 0_HSIZE_T,error, lapl_id=H5P_DEFAULT_F) CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, hzero,error, lapl_id=H5P_DEFAULT_F) CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) - + ! /* Create attributes, up to limit of compact form */ DO u = 0, max_compact - 1 ! /* Create attribute */ WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 - + CALL h5acreate_f(my_dataset, attrname, H5T_NATIVE_INTEGER, sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - + ! /* Write data into the attribute */ attr_integer_data(1) = u data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, attr_integer_data, data_dims, error) CALL check("h5awrite_f",error,total_error) - + ! /* Close attribute */ CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) ! /* Verify information for new attribute */ CALL attr_info_by_idx_check(my_dataset, attrname, INT(u,HSIZE_T), use_index(i), total_error ) - + ENDDO - + ! /* Verify state of object */ !!$ ret = H5O_num_attrs_test(my_dataset, &nattrs); @@ -1902,7 +1902,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) !/* Check for out of bound deletions */ CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(u,HSIZE_T), error, lapl_id=H5P_DEFAULT_F) CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) - + ENDDO @@ -1917,18 +1917,18 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! CASE DEFAULT ! CALL HDassert(0.AND."Toomanydatasets!") END SELECT - + ! /* Delete attributes from compact storage */ - + DO u = 0, max_compact - 2 - + ! /* Delete first attribute in appropriate order */ - - + + !EP CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, 0_HSIZE_T, error) CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, hzero, error) CALL check("H5Adelete_by_idx_f",error,total_error) - + ! /* Verify the attribute information for first attribute in appropriate order */ ! HDmemset(&ainfo, 0, sizeof(ainfo)); @@ -1936,7 +1936,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) !EP CALL h5aget_info_by_idx_f(my_dataset, ".", idx_type, order, 0_HSIZE_T, & CALL h5aget_info_by_idx_f(my_dataset, ".", idx_type, order, hzero, & f_corder_valid, corder, cset, data_size, error) - + IF(new_format)THEN IF(order.EQ.H5_ITER_INC_F)THEN CALL VERIFY("H5Aget_info_by_idx_f",corder,u + 1,total_error) @@ -1944,7 +1944,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ELSE CALL VERIFY("H5Aget_info_by_idx_f",corder, max_compact-(u + 2),total_error) ENDIF - + ! /* Verify the name for first attribute in appropriate order */ ! HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); @@ -1969,14 +1969,14 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, hzero, error) CALL check("H5Adelete_by_idx_f",error,total_error) - + ! /* Verify state of attribute storage (empty) */ !!$ is_empty = H5O_is_attr_empty_test(my_dataset); !!$ VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test"); ENDDO ! /* Work on all the datasets */ - + DO curr_dset = 0,NUM_DSETS-1 SELECT CASE (curr_dset) CASE (0) @@ -1996,7 +1996,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! /* Create attribute */ WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 - + CALL h5acreate_f(my_dataset, attrname, H5T_NATIVE_INTEGER, sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) @@ -2067,7 +2067,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(0,HSIZE_T), error) CALL check("H5Adelete_by_idx_f",error,total_error) ! /* Verify the attribute information for first attribute in appropriate order */ - + CALL h5aget_info_by_idx_f(my_dataset, ".", idx_type, order, INT(0,HSIZE_T), & f_corder_valid, corder, cset, data_size, error) IF(new_format)THEN @@ -2081,7 +2081,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! /* Verify the name for first attribute in appropriate order */ ! HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); - size = 7 ! *CHECK* if not the correct size + size = 7 ! *CHECK* if not the correct size CALL h5aget_name_by_idx_f(my_dataset, ".", idx_type, order,INT(0,hsize_t), & tmpname, error, size) @@ -2089,12 +2089,12 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) WRITE(chr2,'(I2.2)') u + 1 attrname = 'attr '//chr2 ELSE - WRITE(chr2,'(I2.2)') max_compact * 2 - (u + 2) + WRITE(chr2,'(I2.2)') max_compact * 2 - (u + 2) attrname = 'attr '//chr2 ENDIF IF(TRIM(attrname).NE.TRIM(tmpname)) error = -1 CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) - + ENDDO ! /* Delete last attribute */ @@ -2117,7 +2117,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dset3, error) CALL check("h5dclose_f",error,total_error) - + ! /* Close file */ CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) @@ -2145,7 +2145,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) !****************************************************************/ USE HDF5 - + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2179,7 +2179,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) CHARACTER(LEN=7) :: attrname CHARACTER(LEN=1), PARAMETER :: chr1 = '.' - + INTEGER :: u INTEGER, PARAMETER :: SPACE1_RANK = 3 INTEGER, PARAMETER :: NX = 20 @@ -2209,7 +2209,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) ! /* Loop over type of shared components */ DO test_shared = 0, 2 - + ! /* Make copy of file creation property list */ CALL H5Pcopy_f(fcpl, my_fcpl, error) @@ -2271,7 +2271,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dataset, error, dcpl_id=dcpl ) CALL check("h5dcreate_f",error,total_error) - + CALL h5dcreate_f(fid, DSET2_NAME, H5T_NATIVE_CHARACTER, sid, dataset2, error, dcpl_id=dcpl ) CALL check("h5dcreate_f",error,total_error) @@ -2303,13 +2303,13 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) !!$ VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test"); !!$ ! /* Add attributes to each dataset, until after converting to dense storage */ - + DO u = 0, (max_compact * 2) - 1 ! /* Create attribute name */ WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 - + ! /* Alternate between creating "small" & "big" attributes */ IF(MOD(u+1,2).EQ.0)THEN @@ -2387,7 +2387,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) ELSE ! /* Create "big" attribute on second dataset */ - + CALL h5acreate_f(dataset2, attrname, attr_tid, big_sid, attr, error, acpl_id=H5P_DEFAULT_F, aapl_id=H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) @@ -2402,7 +2402,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) !!$ ! /* Write data into the attribute */ - + attr_integer_data(1) = u + 1 data_dims(1) = 1 CALL h5awrite_f(attr, attr_tid, attr_integer_data, data_dims, error) @@ -2469,7 +2469,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) ENDDO ! /* Close attribute's datatype */ - + CALL h5tclose_f(attr_tid, error) CALL check("h5tclose_f",error,total_error) @@ -2556,7 +2556,7 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) !****************************************************************/ USE HDF5 - + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2618,7 +2618,7 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) CALL check("H5Pset_attr_creation_order",error,total_error) ! /* Create a dataset */ - + CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dataset, error, & lcpl_id=H5P_DEFAULT_F, dcpl_id=dcpl, dapl_id=H5P_DEFAULT_F) CALL check("h5dcreate_f",error,total_error) @@ -2647,7 +2647,7 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) ! /* Write data into the attribute */ - data_dims(1) = 1 + data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, u, data_dims, error) CALL check("h5awrite_f",error,total_error) @@ -2666,7 +2666,7 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) ! /* Add one more attribute, to push into "dense" storage */ ! /* Create attribute */ - + WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 @@ -2677,9 +2677,9 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) !!$ is_dense = H5O_is_attr_dense_test(dataset); !!$ VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test"); - + ! /* Write data into the attribute */ - data_dims(1) = 1 + data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, u, data_dims, error) CALL check("h5awrite_f",error,total_error) @@ -2724,7 +2724,7 @@ END SUBROUTINE test_attr_dense_open SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) USE HDF5 - + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id @@ -2739,7 +2739,7 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) CHARACTER(LEN=ATTR_NAME_LEN) :: check_name INTEGER(HSIZE_T), DIMENSION(7) :: data_dims - INTEGER(HID_T) :: attr !String Attribute identifier + INTEGER(HID_T) :: attr !String Attribute identifier INTEGER :: error INTEGER :: value @@ -2785,7 +2785,7 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) attr, error, aapl_id=H5P_DEFAULT_F) ! /* Verify Name */ - + WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 @@ -2819,7 +2819,7 @@ END SUBROUTINE test_attr_dense_verify SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) USE HDF5 - + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2849,7 +2849,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) ! /* Create dataset creation property list */ CALL H5Pcreate_f(H5P_DATASET_CREATE_F,dcpl,error) CALL check("h5Pcreate_f",error,total_error) - + ! /* Get creation order indexing on object */ CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) @@ -2919,11 +2919,11 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) ! /* Close property list */ CALL h5pclose_f(dcpl, error) CALL check("h5pclose_f",error,total_error) - + ! /* Close Dataset */ CALL h5dclose_f(dataset, error) CALL check("h5dclose_f",error,total_error) - + ! /* Close file */ CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) @@ -2941,7 +2941,7 @@ END SUBROUTINE test_attr_corder_create_basic SUBROUTINE test_attr_basic_write(fapl, total_error) USE HDF5 - + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl @@ -2962,11 +2962,11 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) CHARACTER(LEN=25) :: check_name CHARACTER(LEN=18) :: chr_exact_size - INTEGER, PARAMETER :: SPACE1_RANK = 2 + INTEGER, PARAMETER :: SPACE1_RANK = 2 CHARACTER(LEN=5), PARAMETER :: ATTR1_NAME="Attr1" - INTEGER, PARAMETER :: ATTR1_RANK = 1 - INTEGER, PARAMETER :: ATTR1_DIM1 = 3 + INTEGER, PARAMETER :: ATTR1_RANK = 1 + INTEGER, PARAMETER :: ATTR1_DIM1 = 3 CHARACTER(LEN=7), PARAMETER :: ATTR1A_NAME ="Attr1_a" CHARACTER(LEN=18), PARAMETER :: ATTR_TMP_NAME = "Attr1_a-1234567890" INTEGER, DIMENSION(ATTR1_DIM1) :: attr_data1 @@ -3021,7 +3021,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) CALL H5Gopen_f(fid1, "/", group, error, H5P_DEFAULT_F) CALL check("H5Gopen_f",error,total_error) - ! /* Open attribute again */ + ! /* Open attribute again */ CALL h5aopen_f(group, ATTR1_NAME, attr, error) CALL check("h5aopen_f",error,total_error) @@ -3038,7 +3038,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) CALL check("h5acreate_f",error,total_error) ! /* Write attribute information */ - + CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, attr_data1, dimsa, error) CALL check("h5awrite_f",error,total_error) @@ -3144,7 +3144,7 @@ END SUBROUTINE test_attr_basic_write SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) USE HDF5 - + IMPLICIT NONE LOGICAL, INTENT(IN) :: new_format @@ -3188,7 +3188,7 @@ SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) ! /* Create group for attributes */ - CALL H5Gcreate_f(fid, GROUP1_NAME, gid, error) + CALL H5Gcreate_f(fid, GROUP1_NAME, gid, error) CALL check("H5Gcreate_f", error, total_error) ! /* Create many attributes */ @@ -3266,7 +3266,7 @@ END SUBROUTINE test_attr_many SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) USE HDF5 - + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fid CHARACTER(LEN=*), INTENT(IN) :: dsetname @@ -3278,7 +3278,7 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CHARACTER (LEN=8) :: attrname INTEGER, PARAMETER :: NUM_DSETS = 3 INTEGER :: error - LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute + LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute INTEGER :: corder ! Is a positive integer containing the creation order of the attribute INTEGER :: cset ! Indicates the character set used for the attribute’s name INTEGER(HSIZE_T) :: data_size ! indicates the size, in the number of characters @@ -3293,14 +3293,14 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 - - + + CALL h5aopen_f(obj_id, attrname, attr_id, error) CALL check("h5aopen_f",error,total_error) ! /* Get the attribute's information */ - + CALL h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f",error,total_error) @@ -3310,7 +3310,7 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL VERIFY("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - + CALL VERIFY("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.f90 index e704db2..56e82f4 100644 --- a/fortran/test/tH5D.f90 +++ b/fortran/test/tH5D.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,10 +11,10 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! ! ! -! ! Testing Dataset Interface functionality. ! ! @@ -23,20 +23,20 @@ ! h5dread_f, and h5dwrite_f ! SUBROUTINE datasettest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error CHARACTER(LEN=5), PARAMETER :: filename = "dsetf" ! File name - CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name CHARACTER(LEN=9), PARAMETER :: null_dsetname = "null_dset" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: null_dset ! Null dataset identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: null_dset ! Null dataset identifier INTEGER(HID_T) :: dspace_id ! Dataspace identifier INTEGER(HID_T) :: null_dspace ! Null dataspace identifier INTEGER(HID_T) :: dtype_id ! Datatype identifier @@ -65,7 +65,7 @@ ! ! Create a new file using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -75,12 +75,12 @@ CALL check("h5fcreate_f", error, total_error) - ! + ! ! Create the dataspace. ! CALL h5screate_simple_f(rank, dims, dspace_id, error) CALL check("h5screate_simple_f", error, total_error) - ! + ! ! Create null dataspace. ! CALL h5screate_f(H5S_NULL_F, null_dspace, error) @@ -94,7 +94,7 @@ dset_id, error) CALL check("h5dcreate_f", error, total_error) ! - ! Create the null dataset. + ! Create the null dataset. ! CALL h5dcreate_f(file_id, null_dsetname, H5T_NATIVE_INTEGER, null_dspace, & null_dset, error) @@ -104,20 +104,20 @@ ! Write the dataset. ! data_dims(1) = 4 - data_dims(2) = 6 + data_dims(2) = 6 CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error) CALL check("h5dwrite_f", error, total_error) ! ! Write null dataset. Nothing can be written. - ! - null_data_dim(1) = 1 + ! + null_data_dim(1) = 1 CALL h5dwrite_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, error) CALL check("h5dwrite_f", error, total_error) - ! + ! ! End access to the dataset and release resources used by it. - ! + ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f", error, total_error) CALL h5dclose_f(null_dset, error) @@ -131,7 +131,7 @@ CALL h5sclose_f(null_dspace, error) CALL check("h5sclose_f", error, total_error) - ! + ! ! Close the file. ! CALL h5fclose_f(file_id, error) @@ -144,7 +144,7 @@ CALL check("h5fopen_f", error, total_error) ! - ! Open the existing dataset. + ! Open the existing dataset. ! CALL h5dopen_f(file_id, dsetname, dset_id, error) CALL check("h5dopen_f", error, total_error) @@ -152,13 +152,13 @@ CALL check("h5dopen_f", error, total_error) ! - ! Get the dataset type. + ! Get the dataset type. ! CALL h5dget_type_f(dset_id, dtype_id, error) CALL check("h5dget_type_f", error, total_error) ! - ! Get the data space. + ! Get the data space. ! CALL h5dget_space_f(dset_id, dspace_id, error) CALL check("h5dget_space_f", error, total_error) @@ -176,26 +176,26 @@ ! !Compare the data. - ! + ! do i = 1, 4 do j = 1, 6 - IF (data_out(i,j) .NE. dset_data(i, j)) THEN + IF (data_out(i,j) .NE. dset_data(i, j)) THEN write(*, *) "dataset test error occured" write(*,*) "data read is not the same as the data writen" END IF - end do + end do end do ! ! Check if no change to null_dset_data ! - IF (null_dset_data .NE. 1) THEN + IF (null_dset_data .NE. 1) THEN write(*, *) "null dataset test error occured" END IF - ! + ! ! End access to the dataset and release resources used by it. - ! + ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f", error, total_error) CALL h5dclose_f(null_dset, error) @@ -212,14 +212,14 @@ ! CALL h5tclose_f(dtype_id, error) CALL check("h5tclose_f", error, total_error) - ! + ! ! Close the file. ! CALL h5fclose_f(file_id, error) CALL check("h5fclose_f", error, total_error) if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) - + RETURN END SUBROUTINE datasettest @@ -228,11 +228,11 @@ ! SUBROUTINE extenddsettest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error ! !the dataset is stored in file "extf.h5" @@ -250,11 +250,11 @@ ! INTEGER :: RANK = 2 - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: dataspace ! Dataspace identifier - INTEGER(HID_T) :: memspace ! memory Dataspace identifier - INTEGER(HID_T) :: crp_list ! dataset creatation property identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: dataspace ! Dataspace identifier + INTEGER(HID_T) :: memspace ! memory Dataspace identifier + INTEGER(HID_T) :: crp_list ! dataset creatation property identifier ! !dataset dimensions at creation time @@ -262,44 +262,44 @@ INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/3,3/) ! - !data dimensions + !data dimensions ! INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/10,3/) ! !Maximum dimensions ! - INTEGER(HSIZE_T), DIMENSION(2) :: maxdims + INTEGER(HSIZE_T), DIMENSION(2) :: maxdims ! - !data arrays for reading and writing + !data arrays for reading and writing ! INTEGER, DIMENSION(10,3) :: data_in, data_out ! - !Size of data in the file + !Size of data in the file ! INTEGER(HSIZE_T), DIMENSION(2) :: size ! - !general purpose integer + !general purpose integer ! INTEGER :: i, j ! - !flag to check operation success + !flag to check operation success ! - INTEGER :: error + INTEGER :: error ! !Variables used in reading data back - ! + ! INTEGER(HSIZE_T), DIMENSION(2) :: dimsr, maxdimsr INTEGER :: rankr INTEGER(HSIZE_T), DIMENSION(2) :: data_dims ! - !data initialization + !data initialization ! do i = 1, 10 do j = 1, 3 @@ -310,12 +310,12 @@ ! !Initialize FORTRAN predifined datatypes ! -! CALL h5init_types_f(error) +! CALL h5init_types_f(error) ! CALL check("h5init_types_f",error,total_error) ! !Create a new file using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -361,8 +361,8 @@ ! !Extend the dataset. Dataset becomes 10 x 3. ! - size(1) = 10; - size(2) = 3; + size(1) = 10; + size(2) = 3; CALL h5dextend_f(dset_id, size, error) CALL check("h5dextend_f",error,total_error) @@ -451,7 +451,7 @@ CALL check("h5screate_simple_f",error,total_error) ! - !Read data + !Read data ! CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, & memspace, dataspace) @@ -460,14 +460,14 @@ ! !Compare the data. - ! + ! do i = 1, dims1(1) do j = 1, dims1(2) - IF (data_out(i,j) .NE. data_in(i, j)) THEN + IF (data_out(i,j) .NE. data_in(i, j)) THEN write(*, *) "extend dataset test error occured" write(*, *) "read value is not the same as the written values" END IF - end do + end do end do ! @@ -503,6 +503,6 @@ CALL check("h5_cleanup_f", error, total_error) RETURN - END SUBROUTINE extenddsettest + END SUBROUTINE extenddsettest diff --git a/fortran/test/tH5E.f90 b/fortran/test/tH5E.f90 index 7bd2402..a4912bd 100644 --- a/fortran/test/tH5E.f90 +++ b/fortran/test/tH5E.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,35 +11,35 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! SUBROUTINE error_report_test(cleanup, total_error) ! This subroutine tests following functionalities: h5eprint_f - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error CHARACTER(LEN=6), PARAMETER :: filename = "etestf" ! File name CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=8), PARAMETER :: err_filename = "err_file"! Error output file CHARACTER(LEN=80) :: fix_err_filename - - + + INTEGER(HID_T) :: file_id ! File identifier INTEGER(HID_T) :: grp_id ! Group identifier INTEGER :: error, tmp_error, err_flag - - err_flag = 0 + + err_flag = 0 CALL h5eset_auto_f(err_flag, error) CALL check("h5eprint_f",error, total_error) ! ! Create a new file using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -47,7 +47,7 @@ endif CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) CALL check("h5fcreate_f",error,total_error) - + ! ! Try to open non-existing group in the file. ! Error message should go to the err_file_name file. @@ -61,8 +61,8 @@ CALL h5eprint_f(error, fix_err_filename) CALL h5gopen_f(file_id, "Doesnotexist2", grp_id, tmp_error) CALL h5eprint_f(error, fix_err_filename) - - ! + + ! ! Close the file. ! CALL h5fclose_f(file_id, error) diff --git a/fortran/test/tH5F.f90 b/fortran/test/tH5F.f90 index af2d7d6..4b88cb3 100644 --- a/fortran/test/tH5F.f90 +++ b/fortran/test/tH5F.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,27 +11,27 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! ! ! -! ! Testing File Interface functionality. ! -! In the mountingtest subroutine we create one file with a group in it, +! In the mountingtest subroutine we create one file with a group in it, ! and another file with a dataset. Mounting is used to -! access the dataset from the second file as a member of a group -! in the first file. +! access the dataset from the second file as a member of a group +! in the first file. ! SUBROUTINE mountingtest(cleanup, total_error) USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error ! !the respective filename is "mount1.h5" and "mount2.h5" ! - CHARACTER(LEN=6) :: filename1 + CHARACTER(LEN=6) :: filename1 CHARACTER(LEN=6) :: filename2 CHARACTER(LEN=80) :: fix_filename1 CHARACTER(LEN=80) :: fix_filename2 @@ -46,12 +46,12 @@ ! ! File identifiers ! - INTEGER(HID_T) :: file1_id, file2_id + INTEGER(HID_T) :: file1_id, file2_id ! ! Group identifier ! - INTEGER(HID_T) :: gid + INTEGER(HID_T) :: gid ! ! dataset identifier @@ -68,29 +68,29 @@ ! INTEGER(HID_T) :: dtype_id - ! + ! !The dimensions for the dataset. ! INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/NX,NY/) - + ! !return value for testing whether a file is in hdf5 format ! LOGICAL :: status ! - !flag to check operation success - ! + !flag to check operation success + ! INTEGER :: error ! - !general purpose integer - ! + !general purpose integer + ! INTEGER :: i, j ! - !data buffers - ! + !data buffers + ! INTEGER, DIMENSION(NX,NY) :: data_in, data_out INTEGER(HSIZE_T), DIMENSION(2) :: data_dims @@ -114,26 +114,26 @@ ! Fix names of the files ! CALL h5_fixname_f(filename1, fix_filename1, H5P_DEFAULT_F, error) - if(error .ne. 0) stop + if(error .ne. 0) stop CALL h5_fixname_f(filename2, fix_filename2, H5P_DEFAULT_F, error) - if(error .ne. 0) stop + if(error .ne. 0) stop ! !Create first file "mount1.h5" using default properties. - ! + ! CALL h5fcreate_f(fix_filename1, H5F_ACC_TRUNC_F, file1_id, error) CALL check("h5fcreate_f",error,total_error) - + ! !Create group "/G" inside file "mount1.h5". - ! + ! CALL h5gcreate_f(file1_id, "/G", gid, error) CALL check("h5gcreate_f",error,total_error) ! !close file and group identifiers. - ! + ! CALL h5gclose_f(gid, error) CALL check("h5gclose_f",error,total_error) CALL h5fclose_f(file1_id, error) @@ -141,19 +141,19 @@ ! !Create second file "mount2.h5" using default properties. - ! + ! CALL h5fcreate_f(fix_filename2, H5F_ACC_TRUNC_F, file2_id, error) CALL check("h5fcreate_f",error,total_error) ! - !Create data space for the dataset. + !Create data space for the dataset. ! CALL h5screate_simple_f(RANK, dims, dataspace, error) CALL check("h5screate_simple_f",error,total_error) ! !Create dataset "/D" inside file "mount2.h5". - ! + ! CALL h5dcreate_f(file2_id, "/D", H5T_NATIVE_INTEGER, dataspace, & dset_id, error) CALL check("h5dcreate_f",error,total_error) @@ -168,7 +168,7 @@ ! !close file, dataset and dataspace identifiers. - ! + ! CALL h5sclose_f(dataspace, error) CALL check("h5sclose_f",error,total_error) CALL h5dclose_f(dset_id, error) @@ -195,7 +195,7 @@ ! !reopen both files. - ! + ! CALL h5fopen_f (fix_filename1, H5F_ACC_RDWR_F, file1_id, error) CALL check("hfopen_f",error,total_error) CALL h5fopen_f (fix_filename2, H5F_ACC_RDWR_F, file2_id, error) @@ -203,44 +203,44 @@ ! !mount the second file under the first file's "/G" group. - ! + ! CALL h5fmount_f (file1_id, "/G", file2_id, error) CALL check("h5fmount_f",error,total_error) ! !Access dataset D in the first file under /G/D name. - ! + ! CALL h5dopen_f(file1_id, "/G/D", dset_id, error) CALL check("h5dopen_f",error,total_error) ! !Get dataset's data type. - ! + ! CALL h5dget_type_f(dset_id, dtype_id, error) CALL check("h5dget_type_f",error,total_error) ! !Read the dataset. - ! + ! CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) CALL check("h5dread_f",error,total_error) ! !Compare the data. - ! + ! do i = 1, NX do j = 1, NY - IF (data_out(i,j) .NE. data_in(i, j)) THEN + IF (data_out(i,j) .NE. data_in(i, j)) THEN write(*, *) "mounting test error occured" END IF - end do + end do end do ! !Close dset_id and dtype_id. - ! + ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f",error,total_error) CALL h5tclose_f(dtype_id, error) @@ -248,13 +248,13 @@ ! !unmount the second file. - ! + ! CALL h5funmount_f(file1_id, "/G", error); CALL check("h5funmount_f",error,total_error) ! !Close both files. - ! + ! CALL h5fclose_f(file1_id, error) CALL check("h5fclose_f",error,total_error) CALL h5fclose_f(file2_id, error) @@ -269,27 +269,27 @@ ! ! The following subroutine tests h5freopen_f. -! It creates the file which has name "reopen.h5" and +! It creates the file which has name "reopen.h5" and ! the "/dset" dataset inside the file. ! writes the data to the file, close the dataset. -! Reopen the file based upon the file_id, open the -! dataset use the reopen_id then reads the +! Reopen the file based upon the file_id, open the +! dataset use the reopen_id then reads the ! dataset back to memory to test whether the data -! read is identical to the data written +! read is identical to the data written ! SUBROUTINE reopentest(cleanup, total_error) USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error - + INTEGER, INTENT(OUT) :: total_error + ! CHARACTER(LEN=6), PARAMETER :: filename = "reopen" - CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=80) :: fix_filename - INTEGER(HID_T) :: file_id, reopen_id ! File identifiers - INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: file_id, reopen_id ! File identifiers + INTEGER(HID_T) :: dset_id ! Dataset identifier ! !dataset name is "dset" @@ -308,30 +308,30 @@ ! INTEGER(HID_T) :: dataspace - ! + ! !The dimensions for the dataset. ! INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/NX,NY/) ! !flag to check operation success - ! + ! INTEGER :: error ! !general purpose integer - ! + ! INTEGER :: i, j ! - !array to store data + !array to store data ! INTEGER, DIMENSION(4,6) :: dset_data, data_out INTEGER(HSIZE_T), DIMENSION(2) :: data_dims INTEGER(HSIZE_T) :: file_size CHARACTER(LEN=80) :: file_name INTEGER(SIZE_T) :: name_size - + ! !initialize the dset_data array which will be written to the "/dset" ! @@ -344,13 +344,13 @@ ! !Initialize FORTRAN predifined datatypes ! -! CALL h5init_types_f(error) +! CALL h5init_types_f(error) ! CALL check("h5init_types_f",error,total_error) ! !Create file "reopen.h5" using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -360,14 +360,14 @@ CALL check("h5fcreate_f",error,total_error) ! - !Create data space for the dataset. + !Create data space for the dataset. ! CALL h5screate_simple_f(RANK, dims, dataspace, error) CALL check("h5screate_simple_f",error,total_error) ! !Create dataset "/dset" inside the file . - ! + ! CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, & dset_id, error) CALL check("h5dcreate_f",error,total_error) @@ -393,7 +393,7 @@ CALL check("h5sclose_f",error,total_error) ! - !Reopen file dsetf.h5. + !Reopen file dsetf.h5. ! CALL h5freopen_f(file_id, reopen_id, error) CALL check("h5freopen_f",error,total_error) @@ -404,7 +404,7 @@ CALL check("h5fget_filesize_f",error,total_error) ! - !Open the dataset based on the reopen_id. + !Open the dataset based on the reopen_id. ! CALL h5dopen_f(reopen_id, dsetname, dset_id, error) CALL check("h5dopen_f",error,total_error) @@ -415,7 +415,7 @@ CALL check("h5fget_name_f",error,total_error) IF(file_name(1:name_size) .NE. fix_filename(1:name_size)) THEN write(*,*) "file name obtained from the dataset id is incorrect" - END IF + END IF ! !Read the dataset. @@ -425,13 +425,13 @@ ! !Compare the data. - ! + ! do i = 1, NX do j = 1, NY - IF (data_out(i,j) .NE. dset_data(i, j)) THEN + IF (data_out(i,j) .NE. dset_data(i, j)) THEN write(*, *) "reopen test error occured" END IF - end do + end do end do @@ -448,7 +448,7 @@ CALL check("h5fclose_f",error,total_error) CALL h5fclose_f(reopen_id, error) CALL check("h5fclose_f",error,total_error) - + if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) @@ -462,13 +462,13 @@ ! We first create a file using the default creation and access property ! list. Then, the file was closed and reopened. We then get the ! creation and access property lists of the first file. The second file is -! created using the got property lists +! created using the got property lists SUBROUTINE plisttest(cleanup, total_error) USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error ! !file names are "plist1.h5" and "plist2.h5" @@ -482,12 +482,12 @@ INTEGER(HID_T) :: prop_id ! File creation property list identifier INTEGER(HID_T) :: access_id ! File Access property list identifier - !flag to check operation success + !flag to check operation success INTEGER :: error ! !Create a file1 using default properties. - ! + ! CALL h5_fixname_f(filename1, fix_filename1, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify file name" @@ -540,7 +540,7 @@ CALL check("h5pclose_f",error,total_error) CALL h5pclose_f(access_id, error) CALL check("h5pclose_f",error,total_error) - + ! !Terminate access to the files. ! @@ -557,8 +557,8 @@ RETURN END SUBROUTINE plisttest - - + + ! ! The following subroutine tests h5pget(set)_fclose_degree_f ! @@ -567,21 +567,21 @@ USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error INTEGER :: error - + ! CHARACTER(LEN=10), PARAMETER :: filename = "file_close" - CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=80) :: fix_filename - INTEGER(HID_T) :: fid, fid_d, fid1, fid2, fid3 ! File identifiers + INTEGER(HID_T) :: fid, fid_d, fid1, fid2, fid3 ! File identifiers INTEGER(HID_T) :: fapl, fapl1, fapl2, fapl3 ! File access identifiers INTEGER(HID_T) :: fid_d_fapl, fid1_fapl ! File access identifiers LOGICAL :: flag INTEGER(SIZE_T) :: obj_count, obj_countf INTEGER(HID_T), ALLOCATABLE, DIMENSION(:) :: obj_ids INTEGER :: i - + CALL h5eset_auto_f(0, error) CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) @@ -652,7 +652,7 @@ total_error = total_error + 1 write(*,*) "Wrong number of open objects reported, error" endif - allocate(obj_ids(obj_countf), stat = error) + allocate(obj_ids(obj_countf), stat = error) CALL h5fget_obj_ids_f(fid, H5F_OBJ_FILE_F, obj_countf, obj_ids, error) CALL check("h5fget_obj_ids_f",error,total_error) if(error .eq. 0) then @@ -661,22 +661,22 @@ CALL check("h5fclose_f",error,total_error) enddo endif - + CALL h5fclose_f(fid, error) if(error .eq. 0) then total_error = total_error + 1 write(*,*) "File should be closed at this point, error" - endif + endif CALL h5fclose_f(fid1, error) if(error .eq. 0) then total_error = total_error + 1 write(*,*) "File should be closed at this point, error" - endif + endif CALL h5fclose_f(fid_d, error) if(error .eq. 0) then total_error = total_error + 1 write(*,*) "File should be closed at this point, error" - endif + endif if(cleanup) then CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) @@ -685,7 +685,7 @@ deallocate(obj_ids) RETURN - END SUBROUTINE file_close + END SUBROUTINE file_close ! ! The following subroutine tests h5fget_freespace_f @@ -696,16 +696,16 @@ IMPLICIT NONE CHARACTER(*), INTENT(IN) :: filename LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error INTEGER :: error ! CHARACTER(LEN=3), PARAMETER :: grpname = "grp" - CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=80) :: fix_filename - INTEGER(HID_T) :: fid ! File identifiers + INTEGER(HID_T) :: fid ! File identifiers INTEGER(HSSIZE_T) :: free_space - INTEGER(HID_T) :: group_id ! Group identifier - + INTEGER(HID_T) :: group_id ! Group identifier + CALL h5eset_auto_f(0, error) CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) @@ -730,7 +730,7 @@ ! Close group CALL h5gclose_f(group_id, error) CALL check("h5gclose_f", error, total_error) - + ! Check the free space now CALL h5fget_freespace_f(fid, free_space, error) CALL check("h5fget_freespace_f",error,total_error) @@ -758,7 +758,7 @@ CALL check("h5_cleanup_f", error, total_error) RETURN - END SUBROUTINE file_space + END SUBROUTINE file_space diff --git a/fortran/test/tH5G.f90 b/fortran/test/tH5G.f90 index e0270a9..300e538 100644 --- a/fortran/test/tH5G.f90 +++ b/fortran/test/tH5G.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,46 +11,46 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! SUBROUTINE group_test(cleanup, total_error) -! This subroutine tests following functionalities: +! This subroutine tests following functionalities: ! h5gcreate_f, h5gopen_f, h5gclose_f, (?)h5gget_obj_info_idx_f, h5gn_members_f ! h5glink(2)_f, h5gunlink_f, h5gmove(2)_f, h5gget_linkval_f, h5gset_comment_f, -! h5gget_comment_f +! h5gget_comment_f + + USE HDF5 ! This module contains all necessary modules - USE HDF5 ! This module contains all necessary modules - IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error CHARACTER(LEN=5), PARAMETER :: filename = "gtest" !File name CHARACTER(LEN=80) :: fix_filename - CHARACTER(LEN=33), PARAMETER :: comment = "Testing the group functionalities" + CHARACTER(LEN=33), PARAMETER :: comment = "Testing the group functionalities" ! comment for this file CHARACTER(LEN=7), PARAMETER :: groupname1 = "MyGroup" ! Group name - CHARACTER(LEN=16), PARAMETER :: groupname2 = "/MyGroup/Group_A" - CHARACTER(LEN=9), PARAMETER :: linkname1 = "hardlink1" - CHARACTER(LEN=9), PARAMETER :: linkname2 = "hardlink2" - CHARACTER(LEN=9), PARAMETER :: linkname3 = "softlink1" - CHARACTER(LEN=9), PARAMETER :: linkname4 = "softlink2" - CHARACTER(LEN=12), PARAMETER :: linkname5 = "newsoftlink2" + CHARACTER(LEN=16), PARAMETER :: groupname2 = "/MyGroup/Group_A" + CHARACTER(LEN=9), PARAMETER :: linkname1 = "hardlink1" + CHARACTER(LEN=9), PARAMETER :: linkname2 = "hardlink2" + CHARACTER(LEN=9), PARAMETER :: linkname3 = "softlink1" + CHARACTER(LEN=9), PARAMETER :: linkname4 = "softlink2" + CHARACTER(LEN=12), PARAMETER :: linkname5 = "newsoftlink2" CHARACTER(LEN=13), PARAMETER :: dsetname1 = "MyGroup/dset1" ! Dataset name CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: group1_id ! Group identifier - INTEGER(HID_T) :: group2_id ! Group identifier - INTEGER(HID_T) :: dset1_id ! Dataset identifier - INTEGER(HID_T) :: dset2_id ! Dataset identifier - INTEGER(HID_T) :: dsetnew_id ! Dataset identifier - INTEGER(HID_T) :: dspace_id ! Data space identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: group1_id ! Group identifier + INTEGER(HID_T) :: group2_id ! Group identifier + INTEGER(HID_T) :: dset1_id ! Dataset identifier + INTEGER(HID_T) :: dset2_id ! Dataset identifier + INTEGER(HID_T) :: dsetnew_id ! Dataset identifier + INTEGER(HID_T) :: dspace_id ! Data space identifier - INTEGER, DIMENSION(1) :: dset1_data = 34 ! Data value - INTEGER, DIMENSION(1) :: dset2_data = 98 ! Data value + INTEGER, DIMENSION(1) :: dset1_data = 34 ! Data value + INTEGER, DIMENSION(1) :: dset2_data = 98 ! Data value INTEGER(HSIZE_T), DIMENSION(1) :: dims = 1 ! Datasets dimensions INTEGER :: rank = 1 ! Datasets rank INTEGER :: error ! Error flag @@ -58,7 +58,7 @@ CHARACTER(LEN=100) :: name !name to put symbolic object CHARACTER(LEN=100) :: commentout !comment to the file INTEGER :: nmembers - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims ! ! Create the file. ! @@ -75,19 +75,19 @@ ! CALL h5gcreate_f(file_id, groupname1, group1_id, error) CALL check("h5gcreate_f",error,total_error) - + ! ! Create a group named "/MyGroup/Group_A" in the file. ! CALL h5gcreate_f(file_id, groupname2, group2_id, error) CALL check("h5gcreate_f",error,total_error) ! - !Create data space for the dataset. + !Create data space for the dataset. ! CALL h5screate_simple_f(rank, dims, dspace_id, error) CALL check("h5screate_simple_f",error,total_error) ! - ! create dataset in the file. + ! create dataset in the file. ! CALL h5dcreate_f(file_id, dsetname1, H5T_NATIVE_INTEGER, dspace_id, & dset1_id, error) @@ -101,7 +101,7 @@ CALL check("h5dwrite_f",error,total_error) ! - ! create dataset2 in the Group_A. + ! create dataset2 in the Group_A. ! CALL h5dcreate_f(group2_id, dsetname2, H5T_NATIVE_INTEGER, dspace_id, & dset2_id, error) @@ -116,22 +116,22 @@ ! !Create a hard link to the group1 ! - CALL h5glink_f(file_id, H5G_LINK_HARD_F, groupname1, linkname1, error) + CALL h5glink_f(file_id, H5G_LINK_HARD_F, groupname1, linkname1, error) CALL check("h5glink_f",error,total_error) ! !Create a hard link to the group2 ! - CALL h5glink2_f(file_id, groupname2, H5G_LINK_HARD_F, file_id, linkname2, error) + CALL h5glink2_f(file_id, groupname2, H5G_LINK_HARD_F, file_id, linkname2, error) CALL check("h5glink2_f",error,total_error) ! !Create a soft link to dataset11 ! - CALL h5glink_f(file_id, H5G_LINK_SOFT_F, dsetname1, linkname3, error) + CALL h5glink_f(file_id, H5G_LINK_SOFT_F, dsetname1, linkname3, error) CALL check("h5glink_f",error,total_error) ! !Create a soft link to dataset2 ! - CALL h5glink_f(file_id, H5G_LINK_SOFT_F, dsetname2, linkname4, error) + CALL h5glink_f(file_id, H5G_LINK_SOFT_F, dsetname2, linkname4, error) CALL check("h5glink_f",error,total_error) ! !close group1 @@ -147,7 +147,7 @@ !get obj info of group1 ! ! CALL h5gget_obj_info_idx_f(file_id, linkname1, 2, name, obj_type, error) -! CALL check("h5gget_obj_info_idx_f", error, total_error) +! CALL check("h5gget_obj_info_idx_f", error, total_error) ! XXX: Fix problems with H5G_LINK_F! - QAK ! if (obj_type .ne. H5G_LINK_F) then ! write(*,*) "got object ", name, " type error ", obj_type @@ -202,7 +202,7 @@ !get the comment of dataset1 ! CALL h5gget_comment_f(file_id, dsetname1,namesize, commentout, error) - CALL check("h5gget_comment_f", error, total_error) + CALL check("h5gget_comment_f", error, total_error) if ( commentout(1:33) .ne. comment) then write(*,*) "got comment ", commentout, " is wrong" total_error = total_error +1 @@ -211,10 +211,10 @@ ! Move dataset1 to gourp2_id location ! CALL h5dclose_f(dset1_id, error) - CALL check("h5dclose_f", error, total_error) + CALL check("h5dclose_f", error, total_error) - CALL h5gmove2_f(file_id, dsetname1, group2_id, "dset1", error) - CALL check("h5gmove2_f", error, total_error) + CALL h5gmove2_f(file_id, dsetname1, group2_id, "dset1", error) + CALL check("h5gmove2_f", error, total_error) ! ! Open dataset from the new location ! @@ -224,17 +224,17 @@ !release all the resources ! CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f", error, total_error) + CALL check("h5fclose_f", error, total_error) CALL h5gclose_f(group1_id, error) - CALL check("h5gclose_f", error, total_error) + CALL check("h5gclose_f", error, total_error) CALL h5gclose_f(group2_id, error) - CALL check("h5gclose_f", error, total_error) + CALL check("h5gclose_f", error, total_error) CALL h5dclose_f(dset2_id, error) - CALL check("h5dclose_f", error, total_error) + CALL check("h5dclose_f", error, total_error) CALL h5dclose_f(dsetnew_id, error) - CALL check("h5dclose_f", error, total_error) + CALL check("h5dclose_f", error, total_error) CALL h5sclose_f(dspace_id, error) - CALL check("h5sclose_f", error, total_error) + CALL check("h5sclose_f", error, total_error) if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90 index 725e21b..6a2c623 100644 --- a/fortran/test/tH5G_1_8.f90 +++ b/fortran/test/tH5G_1_8.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,17 +11,17 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! SUBROUTINE group_test(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(OUT) :: total_error INTEGER(HID_T) :: fapl, fapl2, my_fapl ! /* File access property lists */ - + INTEGER :: error, ret_total_error ! WRITE(*,*) "TESTING GROUPS" @@ -75,7 +75,7 @@ SUBROUTINE group_test(cleanup, total_error) CALL write_test_status(ret_total_error, & ' Testing deleting links by index', & total_error) - + ret_total_error = 0 CALL test_lcpl(cleanup, fapl, ret_total_error) CALL write_test_status(ret_total_error, & @@ -118,15 +118,15 @@ END SUBROUTINE group_test SUBROUTINE group_info(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl INTEGER(HID_T) :: gcpl_id ! /* Group creation property list ID */ - INTEGER :: max_compact ! /* Maximum # of links to store in group compactly */ + INTEGER :: max_compact ! /* Maximum # of links to store in group compactly */ INTEGER :: min_dense ! /* Minimum # of links to store in group "densely" */ INTEGER :: idx_type ! /* Type of index to operate on */ @@ -144,7 +144,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! H5G_STORAGE_TYPE_DENSE: Indexed storage ! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure INTEGER :: nlinks ! Number of links in group - INTEGER :: max_corder ! Current maximum creation order value for group + INTEGER :: max_corder ! Current maximum creation order value for group INTEGER :: u,v ! /* Local index variables */ CHARACTER(LEN=2) :: chr2 @@ -352,7 +352,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! /* Close group created */ CALL H5Gclose_f(group_id2, error) CALL check("H5Gclose_f", error, total_error) - + ! /* Retrieve main group's information */ CALL H5Gget_info_f(group_id, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_f", error, total_error) @@ -361,11 +361,11 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) - + ! /* Retrieve main group's information, by name */ CALL H5Gget_info_by_name_f(file_id, CORDER_GROUP_NAME, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) - + ! /* Check main group's information */ CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) @@ -384,7 +384,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) valname = CORDER_GROUP_NAME//objname CALL H5Lcreate_soft_f(valname, soft_group_id, objname, error, H5P_DEFAULT_F, H5P_DEFAULT_F) - + ! /* Retrieve soft link group's information, by name */ CALL H5Gget_info_f(soft_group_id, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_f", error, total_error) @@ -401,7 +401,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gclose_f", error, total_error) CALL H5Gclose_f(soft_group_id, error) CALL check("H5Gclose_f", error, total_error) - + ! /* Close the file */ CALL H5Fclose_f(file_id, error) CALL check("H5Fclose_f", error, total_error) @@ -434,8 +434,8 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE timestamps(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -445,7 +445,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) INTEGER(HID_T) :: group_id2 !/* Group ID */ INTEGER(HID_T) :: gcpl_id !/* Group creation property list ID */ INTEGER(HID_T) :: gcpl_id2 !/* Group creation property list ID */ - + CHARACTER(LEN=6), PARAMETER :: prefix = 'links9' CHARACTER(LEN=9), PARAMETER :: filename = prefix//'.h5' ! /* File name */ ! /* Timestamp macros */ @@ -483,7 +483,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! /* Create file */ !h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - + CALL H5Fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl) CALL check("h5fcreate_f",error,total_error) @@ -514,7 +514,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_obj_track_times_f(gcpl_id2, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) CALL VerifyLogical("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) - + ! /* Query the object information for each group */ ! if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR ! if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR @@ -630,8 +630,8 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE mklinks(fapl, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -642,7 +642,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) INTEGER :: arank = 1 ! Attribure rank INTEGER :: error - INTEGER :: cset ! Indicates the character set used for the link’s name. + INTEGER :: cset ! Indicates the character set used for the link’s name. INTEGER :: corder ! Specifies the link’s creation order position. LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid. INTEGER :: link_type ! Specifies the link class: @@ -663,7 +663,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("mklinks.h5screate_simple_f",error,total_error) !/* Create a group */ - CALL H5Gcreate_f(file, "grp1", grp, error) + CALL H5Gcreate_f(file, "grp1", grp, error) CALL check("H5Gcreate_f", error, total_error) CALL H5Gclose_f(grp, error) CALL check("h5gclose_f",error,total_error) @@ -677,7 +677,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !/* Create a hard link */ CALL H5Lcreate_hard_f(file, "d1", INT(H5L_SAME_LOC_F,HID_T), "grp1/hard", error) CALL check("H5Lcreate_hard_f", error, total_error) - + !/* Create a symbolic link */ CALL H5Lcreate_soft_f("/d1", file, "grp1/soft",error) CALL check("H5Lcreate_soft_f", error, total_error) @@ -725,8 +725,8 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE test_move_preserves(fapl_id, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl_id @@ -749,7 +749,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) INTEGER :: crt_order_flags ! /* Status of creation order info for GCPL */ CHARACTER(LEN=12), PARAMETER :: filename = 'TestLinks.h5' - INTEGER :: cset ! Indicates the character set used for the link’s name. + INTEGER :: cset ! Indicates the character set used for the link’s name. INTEGER :: corder ! Specifies the link’s creation order position. LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid. INTEGER :: link_type ! Specifies the link class: @@ -774,17 +774,17 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags,0, total_error) - + CALL H5Pset_link_creation_order_f(fcpl_id, H5P_CRT_ORDER_TRACKED_F, error) CALL check("H5Pset_link_creation_order_f", error, total_error) - + CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) !/* Create file */ !/* (with creation order tracking for the root group) */ - + CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, file_id, error, fcpl_id, fapl_id) CALL check("h5fcreate_f",error,total_error) @@ -796,7 +796,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pset_char_encoding_f",error, total_error) !/* Create a group with that lcpl */ - CALL H5Gcreate_f(file_id, "group", group_id, error,lcpl_id=lcpl_id, gcpl_id=H5P_DEFAULT_F, gapl_id=H5P_DEFAULT_F) + CALL H5Gcreate_f(file_id, "group", group_id, error,lcpl_id=lcpl_id, gcpl_id=H5P_DEFAULT_F, gapl_id=H5P_DEFAULT_F) CALL check("H5Gcreate_f", error, total_error) CALL H5Gclose_f(group_id, error) CALL check("H5Gclose_f", error, total_error) @@ -825,7 +825,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! /* Close the file and reopen it */ CALL H5Fclose_f(file_id, error) CALL check("H5Fclose_f", error, total_error) - + !!$ if((file_id = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0) TEST_ERROR !!$ !!$ /* Get the link's character set & modification time . They should be unchanged */ @@ -908,7 +908,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pclose_f", error, total_error) CALL H5Pclose_f(lcpl_id, error) CALL check("H5Pclose_f", error, total_error) - + ! if(H5Fclose(file_id) < 0) TEST_ERROR END SUBROUTINE test_move_preserves @@ -932,8 +932,8 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE lifecycle(cleanup, fapl2, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl2 @@ -985,7 +985,7 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) ! /* Set up group creation property list */ CALL H5Pcreate_f(H5P_GROUP_CREATE_F,gcpl,error) CALL check("H5Pcreate_f",error,total_error) - + ! /* Query default group creation property settings */ CALL H5Pget_local_heap_size_hint_f(gcpl, lheap_size_hint, error) @@ -1002,7 +1002,7 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) CALL check("H5Pget_est_link_info_f", error, total_error) CALL verify("H5Pget_est_link_info_f", est_num_entries, H5G_CRT_GINFO_EST_NUM_ENTRIES,total_error) CALL verify("H5Pget_est_link_info_f", est_name_len, H5G_CRT_GINFO_EST_NAME_LEN,total_error) - + !/* Set GCPL parameters */ @@ -1044,7 +1044,7 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) CALL H5Ldelete_f(fid, LIFECYCLE_TOP_GROUP, error) CALL check("H5Ldelete_f", error, total_error) - + ! /* Close GCPL */ CALL H5Pclose_f(gcpl, error) CALL check("H5Pclose_f", error, total_error) @@ -1079,8 +1079,8 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) SUBROUTINE cklinks(fapl, total_error) ! USE ISO_C_BINDING - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1116,7 +1116,7 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) !!$ TEST_ERROR !!$ } /* end if */ - + CALL H5Lexists_f(file,"d1",Lexists, error) CALL verifylogical("test_lcpl.H5Lexists", Lexists,.TRUE.,total_error) @@ -1148,8 +1148,8 @@ END SUBROUTINE cklinks ! */ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1159,19 +1159,19 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) INTEGER(HID_T) :: gcpl_id ! /* Group creation property list ID */ INTEGER :: idx_type ! /* Type of index to operate on */ - LOGICAL, DIMENSION(1:2) :: use_index = (/.FALSE.,.TRUE./) + LOGICAL, DIMENSION(1:2) :: use_index = (/.FALSE.,.TRUE./) ! /* Use index on creation order values */ - INTEGER :: max_compact ! /* Maximum # of links to store in group compactly */ + INTEGER :: max_compact ! /* Maximum # of links to store in group compactly */ INTEGER :: min_dense ! /* Minimum # of links to store in group "densely" */ CHARACTER(LEN=7) :: objname ! /* Object name */ CHARACTER(LEN=8) :: filename = 'file0.h5' ! /* File name */ CHARACTER(LEN=12), PARAMETER :: CORDER_GROUP_NAME = "corder_group" - LOGICAL :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + LOGICAL :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute INTEGER :: corder ! Is a positive integer containing the creation order of the attribute INTEGER :: cset ! Indicates the character set used for the attribute’s name - INTEGER(SIZE_T) :: val_size + INTEGER(SIZE_T) :: val_size INTEGER :: link_type INTEGER(HADDR_T) :: address @@ -1237,7 +1237,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) ! /* Create file */ CALL H5Fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error, access_prp=fapl) CALL check("delete_by_idx.H5Fcreate_f", error, total_error) - + ! /* Create group creation property list */ CALL H5Pcreate_f(H5P_GROUP_CREATE_F, gcpl_id, error ) CALL check("delete_by_idx.H5Pcreate_f", error, total_error) @@ -1287,7 +1287,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) ! IF(H5G_has_links_test(group_id, NULL) != TRUE) TEST_ERROR ! /* Check for out of bound deletion */ - htmp =9 + htmp =9 !EP CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(u,HSIZE_T), error) CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, htmp, error) CALL VERIFY("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) @@ -1312,7 +1312,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) CALL check("H5Iget_type_f", error, total_error) CALL VERIFY("H5Iget_type_f", id_type, H5I_GROUP_F, total_error) - + CALL H5Gclose_f(grp, error) CALL check("H5Gclose_f", error, total_error) @@ -1389,8 +1389,8 @@ END SUBROUTINE delete_by_idx SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & hard_link, use_index, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: group_id @@ -1399,7 +1399,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & LOGICAL, INTENT(IN) :: hard_link LOGICAL, INTENT(IN) :: use_index - LOGICAL :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + LOGICAL :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute INTEGER :: corder ! Is a positive integer containing the creation order of the attribute INTEGER :: cset ! Indicates the character set used for the attribute’s name INTEGER :: link_type @@ -1437,7 +1437,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! /* Verify value for new soft link, in increasing creation order */ !!$ IF(hard_link)THEN !!$ ! HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE); -!!$ +!!$ !!$ CALL H5Lget_val_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, n, tmpval, INT(7,SIZE_T),error) !!$ CALL check("H5Lget_val_by_idx",error,total_error) !!$ @@ -1493,21 +1493,21 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & SUBROUTINE test_lcpl(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl LOGICAL :: cleanup - + INTEGER(HID_T) :: file_id INTEGER(HID_T) :: group_id INTEGER(HID_T) :: space_id, data_space INTEGER(HID_T) :: dset_id INTEGER(HID_T) :: type_id INTEGER(HID_T) :: lcpl_id - - INTEGER :: cset ! Indicates the character set used for the link’s name. + + INTEGER :: cset ! Indicates the character set used for the link’s name. INTEGER :: corder ! Specifies the link’s creation order position. LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid. INTEGER :: link_type ! Specifies the link class: @@ -1534,25 +1534,25 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! WRITE(*,*) "link creation property lists (w/new group format)" - + !/* Actually, intermediate group creation is tested elsewhere (tmisc). ! * Here we only need to test the character encoding property */ !/* Create file */ ! h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - + CALL H5Fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl) CALL check("test_lcpl.H5Fcreate_f", error, total_error) ! /* Create and link a group with the default LCPL */ - + CALL H5Gcreate_f(file_id, "/group", group_id, error) CALL check("test_lcpl.H5Gcreate_f", error, total_error) - + ! /* Check that its character encoding is the default */ - + CALL H5Lget_info_f(file_id, "group", & cset, corder, f_corder_valid, link_type, address, val_size, & error, H5P_DEFAULT_F) @@ -1570,7 +1570,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL check("test_lcpl.h5tcommit_f", error, total_error) CALL h5tclose_f(type_id, error) CALL check("test_lcpl.h5tclose_f", error, total_error) - + ! /* Check that its character encoding is the default */ CALL H5Lget_info_f(file_id, "type", & @@ -1613,7 +1613,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL h5sget_simple_extent_dims_f(data_space, dimsout, maxdimsout, error) CALL check("test_lcpl.h5sget_simple_extent_dims_f",error, total_error) - + DO i = 1, 2 tmp1 = dimsout(i) tmp2 = extend_dim(i) @@ -1628,7 +1628,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! /* close data set */ CALL h5dclose_f(dset_id, error) - CALL check("test_lcpl.h5dclose_f", error, total_error) + CALL check("test_lcpl.h5dclose_f", error, total_error) ! /* Check that its character encoding is the default */ CALL H5Lget_info_f(file_id, "dataset", & @@ -1689,7 +1689,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Pget_char_encoding_f(lcpl_id, encoding, error) CALL check("test_lcpl.H5Pget_char_encoding_f", error, total_error) - CALL VERIFY("test_lcpl.H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) + CALL VERIFY("test_lcpl.H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) ! /* Check that its character encoding is UTF-8 */ CALL H5Lget_info_f(file_id, "dataset2", & @@ -1718,7 +1718,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & cset, corder, f_corder_valid, link_type, address, val_size, & error) CALL check("test_lcpl.H5Lget_info_f", error, total_error) - CALL verify("test_lcpl.H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) + CALL verify("test_lcpl.H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) ! /* Check that the first link's encoding hasn't changed */ @@ -1731,7 +1731,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & !/* Make sure that LCPLs work properly for other API calls: */ !/* H5Lcreate_soft */ - + CALL H5Pset_char_encoding_f(lcpl_id, H5T_CSET_UTF8_F, error) CALL check("test_lcpl.H5Pset_char_encoding_f",error, total_error) CALL H5Lcreate_soft_f("dataset2", file_id, "slink_to_dset2",error,lcpl_id) @@ -1759,12 +1759,12 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! /* H5Lcopy */ - + CALL H5Pset_char_encoding_f(lcpl_id, H5T_CSET_UTF8_F, error) CALL check("test_lcpl.H5Pset_char_encoding_f",error, total_error) CALL H5Lcopy_f(file_id, "moved_slink", file_id, "copied_slink", error, lcpl_id) - + CALL H5Lget_info_f(file_id, "copied_slink", & cset, corder, f_corder_valid, link_type, address, val_size, & error) @@ -1801,8 +1801,8 @@ END SUBROUTINE test_lcpl SUBROUTINE objcopy(fapl, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1821,13 +1821,13 @@ SUBROUTINE objcopy(fapl, total_error) !/* Set the "use the latest version of the format" bounds for creating objects in the file */ CALL H5Pset_libver_bounds_f(fapl2, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error) - + ! /* create property to pass copy options */ CALL h5pcreate_f(H5P_OBJECT_COPY_F, pid, error) CALL check("h5pcreate_f",error, total_error) ! /* set options for object copy */ - CALL H5Pset_copy_object_f(pid, flag, error) + CALL H5Pset_copy_object_f(pid, flag, error) CALL check("H5Pset_copy_object_f",error, total_error) ! /* Verify object copy flags */ @@ -1836,7 +1836,7 @@ SUBROUTINE objcopy(fapl, total_error) CALL VERIFY("H5Pget_copy_object_f", cpy_flags, flag, total_error) !!$ -!!$ CALL test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, +!!$ CALL test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, !!$ FALSE, "H5Ocopy(): without attributes"); CALL lapl_nlinks(fapl2, total_error) @@ -1865,7 +1865,7 @@ END SUBROUTINE objcopy SUBROUTINE lapl_nlinks( fapl, total_error) USE HDF5 - + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl INTEGER, INTENT(INOUT) :: total_error @@ -1877,13 +1877,13 @@ SUBROUTINE lapl_nlinks( fapl, total_error) INTEGER(HID_T) :: plist = (-1) ! /* lapl ID */ INTEGER(HID_T) :: tid = (-1) ! /* Other IDs */ INTEGER(HID_T) :: gapl = (-1), dapl = (-1), tapl = (-1) ! /* Other property lists */ - + CHARACTER(LEN=7) :: objname ! /* Object name */ INTEGER(size_t) :: name_len ! /* Length of object name */ CHARACTER(LEN=12) :: filename = 'TestLinks.h5' INTEGER(size_t) :: nlinks ! /* nlinks for H5Pset_nlinks */ INTEGER(size_t) :: buf_size = 7 - + ! WRITE(*,*) "adjusting nlinks with LAPL (w/new group format)" @@ -1892,9 +1892,9 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL check(" lapl_nlinks.h5fcreate_f",error,total_error) ! /* Create group with short name in file (used as target for links) */ - CALL H5Gcreate_f(fid, "final", gid, error) + CALL H5Gcreate_f(fid, "final", gid, error) CALL check(" lapl_nlinks.H5Gcreate_f", error, total_error) - + !/* Create chain of soft links to existing object (limited) */ CALL H5Lcreate_soft_f("final", fid, "soft1", error) CALL H5Lcreate_soft_f("soft1", fid, "soft2", error) @@ -1921,13 +1921,13 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL check("h5fclose_f",error,total_error) !/* Open file */ - + CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error, fapl) CALL check("h5open_f",error,total_error) - + !/* Create LAPL with higher-than-usual nlinks value */ !/* Create a non-default lapl with udata set to point to the first group */ - + CALL H5Pcreate_f(H5P_LINK_ACCESS_F,plist,error) CALL check("h5Pcreate_f",error,total_error) nlinks = 20 @@ -1942,7 +1942,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) !/* Open object through what is normally too many soft links using ! * new property list */ - + CALL H5Oopen_f(fid,"soft17",gid,error,plist) CALL check("H5Oopen_f",error,total_error) @@ -1954,9 +1954,9 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL H5Gcreate_f(gid, "new_soft", gid2, error) CALL check("H5Gcreate_f", error, total_error) - ! /* Close groups */ + ! /* Close groups */ CALL H5Gclose_f(gid2, error) - CALL check("H5Gclose_f", error, total_error) + CALL check("H5Gclose_f", error, total_error) CALL H5Gclose_f(gid, error) CALL check("H5Gclose_f", error, total_error) @@ -1974,7 +1974,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL VERIFY("H5Pget_nlinks_f", INT(nlinks), 4, total_error) ! /* Try opening through what is now too many soft links */ - + CALL H5Oopen_f(fid,"soft5",gid,error,plist) CALL VERIFY("H5Oopen_f", error, -1, total_error) ! should fail @@ -2064,11 +2064,11 @@ SUBROUTINE lapl_nlinks( fapl, total_error) !!$ } H5E_END_TRY !!$ ! /* Create property lists with nlinks set */ - + CALL H5Pcreate_f(H5P_GROUP_ACCESS_F,gapl,error) - CALL check("h5Pcreate_f",error,total_error) + CALL check("h5Pcreate_f",error,total_error) CALL H5Pcreate_f(H5P_DATATYPE_ACCESS_F,tapl,error) - CALL check("h5Pcreate_f",error,total_error) + CALL check("h5Pcreate_f",error,total_error) CALL H5Pcreate_f(H5P_DATASET_ACCESS_F,dapl,error) CALL check("h5Pcreate_f",error,total_error) @@ -2090,11 +2090,11 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL H5Topen_f(fid, "soft17/datatype", tid, error, tapl) CALL check("H5Gopen_f",error,total_error) - + !!$ if((did = H5Dopen2(fid, "soft17/dataset", dapl)) < 0) TEST_ERROR ! /* Close objects */ - + CALL h5gclose_f(gid, error) CALL check("h5gclose_f",error,total_error) CALL h5tclose_f(tid, error) @@ -2103,7 +2103,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) !!$ if(H5Dclose(did) < 0) TEST_ERROR !!$ ! /* Close plists */ - + CALL h5pclose_f(gapl, error) CALL check("h5pclose_f", error, total_error) CALL h5pclose_f(tapl, error) diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.f90 index c34bd09..0d1a8c5 100644 --- a/fortran/test/tH5I.f90 +++ b/fortran/test/tH5I.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,38 +11,38 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! SUBROUTINE identifier_test(cleanup, total_error) ! This subroutine tests following functionalities: h5iget_type_f - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error CHARACTER(LEN=6), PARAMETER :: filename = "itestf" ! File name CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=10), PARAMETER :: dsetname = "/itestdset" ! Dataset name CHARACTER(LEN=10), PARAMETER :: groupname = "itestgroup"! group name CHARACTER(LEN=10), PARAMETER :: aname = "itestattr"! group name - - + + INTEGER(HID_T) :: file_id ! File identifier INTEGER(HID_T) :: new_file_id ! File identifier - INTEGER(HID_T) :: group_id ! group identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: group_id ! group identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier INTEGER(HID_T) :: dspace_id ! Dataspace identifier INTEGER(HID_T) :: attr_id ! Datatype attribute identifier INTEGER(HID_T) :: aspace_id ! attribute data space identifier INTEGER(HID_T) :: atype_id ! attribute data type identifier - INTEGER, DIMENSION(1) :: dset_data = 0 ! Data value - + INTEGER, DIMENSION(1) :: dset_data = 0 ! Data value + INTEGER(HSIZE_T), DIMENSION(1) :: dims = 1 ! Datasets dimensions INTEGER(HSIZE_T), DIMENSION(1) :: adims = 1 ! Attribute dimensions @@ -69,24 +69,24 @@ ! check that the ID is not valid dtype = -1 CALL H5Iis_valid_f(dtype, tri_ret, error) - CALL check("H5Iis_valid_f", error, total_error) + CALL check("H5Iis_valid_f", error, total_error) CALL VerifyLogical("H5Iis_valid_f", tri_ret, .FALSE., total_error) - + ! Create a datatype id CALL H5Tcopy_f(H5T_NATIVE_INTEGER,dtype,error) - CALL check("H5Tcopy_f", error, total_error) - + CALL check("H5Tcopy_f", error, total_error) + ! Check that the ID is valid CALL H5Iis_valid_f(dtype, tri_ret, error) - CALL check("H5Iis_valid_f", error, total_error) + CALL check("H5Iis_valid_f", error, total_error) CALL VerifyLogical("H5Tequal_f", tri_ret, .TRUE., total_error) - + CALL H5Tclose_f(dtype, error) - CALL check("H5Tclose_f", error, total_error) - + CALL check("H5Tclose_f", error, total_error) + ! ! Create a new file using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -94,7 +94,7 @@ endif CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) CALL check("h5fcreate_f",error,total_error) - + ! ! Create a group named "/MyGroup" in the file. ! @@ -102,20 +102,20 @@ CALL check("h5gcreate_f",error,total_error) ! - !Create data space for the dataset. + !Create data space for the dataset. ! CALL h5screate_simple_f(rank, dims, dspace_id, error) CALL check("h5screate_simple_f",error,total_error) ! - ! create dataset in the file. + ! create dataset in the file. ! CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, & dset_id, error) CALL check("h5dcreate_f",error,total_error) ! ! Get dataset name from dataset identifier - ! + ! buf_size = 80 CALL h5iget_name_f(dset_id, name_buf, buf_size, name_size, error) CALL check("h5iget_name_f",error,total_error) @@ -128,8 +128,8 @@ total_error = total_error + 1 endif endif - - ! + + ! ! Get file identifier from dataset identifier and then get file name ! CALL h5iget_file_id_f(dset_id, new_file_id, error) @@ -150,7 +150,7 @@ CALL check("h5dwrite_f",error,total_error) ! - ! Create scalar data space for dataset attribute. + ! Create scalar data space for dataset attribute. ! CALL h5screate_simple_f(arank, adims, aspace_id, error) CALL check("h5screate_simple_f",error,total_error) @@ -215,37 +215,37 @@ CALL check("h5iget_type_f",error,total_error) CALL verify("get attribute identifier wrong",type,H5I_ATTR_F,total_error) - ! + ! ! Close the attribute. - ! + ! CALL h5aclose_f(attr_id, error) CALL check("h5aclose_f",error,total_error) - ! + ! ! Close the dataspace. - ! + ! CALL h5sclose_f(aspace_id, error) CALL check("h5sclose_f",error,total_error) CALL h5sclose_f(dspace_id, error) CALL check("h5sclose_f",error,total_error) - ! + ! ! Close the dataype. - ! + ! CALL h5tclose_f(atype_id, error) CALL check("h5tclose_f",error,total_error) - ! + ! ! Close the dataset. - ! + ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f",error,total_error) - ! + ! ! Close the group. - ! + ! CALL h5gclose_f(group_id, error) CALL check("h5gclose_f",error,total_error) - ! + ! ! Close the file. ! CALL h5fclose_f(file_id, error) @@ -260,7 +260,7 @@ ! Create a file CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) CALL check("h5fcreate_f",error,total_error) - + ! Get the reference count for the file ID CALL h5iget_ref_f(file_id, ref_count, error) CALL check("h5iget_ref_f",error,total_error) diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90 index 0aa4abd..253a42a 100644 --- a/fortran/test/tH5O.f90 +++ b/fortran/test/tH5O.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,11 +11,11 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! SUBROUTINE test_h5o(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(OUT) :: total_error @@ -35,7 +35,7 @@ SUBROUTINE test_h5o(cleanup, total_error) CALL check("h5_cleanup_f", error, total_error) IF(cleanup) CALL h5_cleanup_f("test", H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) - + END SUBROUTINE test_h5o !/**************************************************************** @@ -46,8 +46,8 @@ END SUBROUTINE test_h5o SUBROUTINE test_h5o_link(total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error @@ -79,7 +79,7 @@ SUBROUTINE test_h5o_link(total_error) wdata(i,j) = i*j ENDDO ENDDO - + ! /* Create the dataspace */ CALL h5screate_simple_f(2, dims, space_id, error) CALL check("h5screate_simple_f",error,total_error) @@ -97,14 +97,14 @@ SUBROUTINE test_h5o_link(total_error) !/* Make a FAPL that uses the "use the latest version of the format" bounds */ CALL H5Pcreate_f(H5P_FILE_ACCESS_F,fapl_id,error) CALL check("h5Pcreate_f",error,total_error) - + ! /* Set the "use the latest version of the format" bounds for creating objects in the file */ - + CALL H5Pset_libver_bounds_f(fapl_id, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error) CALL check("H5Pset_libver_bounds_f",error, total_error) - + !!$ ret = H5Pset_libver_bounds(fapl_id, (new_format ? H5F_LIBVER_LATEST : H5F_LIBVER_EARLIEST), H5F_LIBVER_LATEST); - + ! /* Create a new HDF5 file */ CALL H5Fcreate_f(TEST_FILENAME, H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl_id) CALL check("H5Fcreate_f", error, total_error) @@ -112,11 +112,11 @@ SUBROUTINE test_h5o_link(total_error) ! /* Close the FAPL */ CALL h5pclose_f(fapl_id, error) CALL check("h5pclose_f",error,total_error) - + ! /* Create and commit a datatype with no name */ CALL H5Tcopy_f( H5T_NATIVE_INTEGER, type_id, error) CALL check("H5Tcopy_F",error,total_error) - + CALL H5Tcommit_anon_f(file_id, type_id, error) ! using no optional parameters CALL check("H5Tcommit_anon_F",error,total_error) @@ -130,7 +130,7 @@ SUBROUTINE test_h5o_link(total_error) ! /* Verify that we can write to and read from the dataset */ - + ! /* Write the data to the dataset */ !EP CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, wdata, dims, error, & @@ -143,7 +143,7 @@ SUBROUTINE test_h5o_link(total_error) !EP mem_space_id=H5S_ALL_F, file_space_id=H5S_ALL_F, xfer_prp = H5P_DEFAULT_F) CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, rdata, dims, error) CALL check("h5dread_f", error, total_error) - + ! /* Verify the data */ DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 @@ -175,17 +175,17 @@ SUBROUTINE test_h5o_link(total_error) ! /* Re-open datatype using new link */ CALL H5Topen_f(group_id, "datatype", type_id, error) CALL check("h5topen_f", error, total_error) - + ! /* Link nameless group to root group and close the group ID*/ CALL H5Olink_f(group_id, file_id, "/group", error) CALL check("H5Olink_f", error, total_error) - + CALL h5gclose_f(group_id, error) CALL check("h5gclose_f",error,total_error) ! /* Open dataset through root group and verify its data */ - + CALL H5Dopen_f(file_id, "/group/inter_group/dataset", dset_id, error) CALL check("test_lcpl.h5dopen_f", error, total_error) @@ -227,8 +227,8 @@ END SUBROUTINE test_h5o_link SUBROUTINE test_h5o_plist(total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error @@ -240,7 +240,7 @@ SUBROUTINE test_h5o_plist(total_error) INTEGER :: max_compact, min_dense !/* Actual phase change parameters */ INTEGER :: error !/* Value returned from API calls */ CHARACTER(LEN=7), PARAMETER :: TEST_FILENAME = 'test.h5' - + ! PRINT*,'Testing object creation properties' @@ -275,7 +275,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL check("H5Pget_attr_phase_change_f", error, total_error) CALL H5Pset_attr_phase_change_f(tcpl, def_max_compact+1, def_min_dense-1, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - + ! /* Retrieve attribute phase change values on each creation property list and verify */ CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) @@ -307,7 +307,7 @@ SUBROUTINE test_h5o_plist(total_error) ! /* Commit the type inside the group anonymously and link it in */ CALL h5tcopy_f(H5T_NATIVE_INTEGER, dtype, error) CALL check("h5tcopy_f", error, total_error) - + CALL H5Tcommit_anon_f(fid, dtype, error, tcpl_id=tcpl) CALL check("H5Tcommit_anon_f",error,total_error) @@ -321,7 +321,7 @@ SUBROUTINE test_h5o_plist(total_error) ! /* Create the dataset anonymously and link it in */ CALL H5Dcreate_anon_f(fid, H5T_NATIVE_INTEGER, dspace, dset, error, dcpl ) CALL check("H5Dcreate_anon_f",error,total_error) - + CALL H5Olink_f(dset, fid, "dataset", error) CALL check("H5Olink_f", error, total_error) @@ -338,7 +338,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL check("h5pclose_f", error, total_error) ! /* Retrieve each object's creation property list */ - + CALL H5Gget_create_plist_f(grp, gcpl, error) CALL check("H5Gget_create_plist", error, total_error) @@ -367,7 +367,7 @@ SUBROUTINE test_h5o_plist(total_error) !/* Close current objects */ - + CALL h5pclose_f(gcpl,error) CALL check("h5pclose_f", error, total_error) CALL h5pclose_f(dcpl,error) @@ -427,7 +427,7 @@ SUBROUTINE test_h5o_plist(total_error) ! /* Close current objects */ - + CALL h5pclose_f(gcpl,error) CALL check("h5pclose_f", error, total_error) CALL h5pclose_f(dcpl,error) diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90 index 3063842..6a49f72 100644 --- a/fortran/test/tH5P.f90 +++ b/fortran/test/tH5P.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,25 +11,25 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! SUBROUTINE external_test(cleanup, total_error) -! This subroutine tests following functionalities: +! This subroutine tests following functionalities: ! h5pset_external_f, h5pget_external_count_f, ! h5pget_external_f - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error CHARACTER(LEN=8), PARAMETER :: filename = "external" CHARACTER(LEN=80) :: fix_filename - INTEGER(HID_T) :: file_id - INTEGER(HID_T) :: plist_id - INTEGER(HID_T) :: space_id + INTEGER(HID_T) :: file_id + INTEGER(HID_T) :: plist_id + INTEGER(HID_T) :: space_id INTEGER(HID_T) :: dataset_id INTEGER(HSIZE_T), DIMENSION(1) :: cur_size !data space current size INTEGER(HSIZE_T), DIMENSION(1) :: max_size !data space maximum size @@ -38,7 +38,7 @@ INTEGER(HSIZE_T) :: file_size !sizeof external file segment INTEGER :: error !error code INTEGER(SIZE_T) :: int_size !size of integer - INTEGER(HSIZE_T) :: file_bytes !Number of bytes reserved + INTEGER(HSIZE_T) :: file_bytes !Number of bytes reserved !in the file for the data INTEGER :: RANK = 1 !dataset rank INTEGER :: count !number of external files for the @@ -51,7 +51,7 @@ ! !Create file "external.h5" using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -80,7 +80,7 @@ max_size(1) = 100; call h5tget_size_f(H5T_NATIVE_INTEGER, int_size, error) CALL check("h5tget_size_f",error,total_error) - file_size = int_size * max_size(1); + file_size = int_size * max_size(1); CALL h5pset_external_f(plist_id, "ext1.data", 0, file_size, error) CALL check("h5pset_external_f",error,total_error) CALL h5screate_simple_f(RANK, cur_size, space_id, error, max_size) @@ -88,7 +88,7 @@ CALL h5dcreate_f(file_id, "dset1", H5T_NATIVE_INTEGER, space_id, & dataset_id, error, plist_id) CALL check("h5dcreate_f", error, total_error) - + CALL h5dclose_f(dataset_id, error) CALL check("h5dclose_f", error, total_error) CALL h5pclose_f(plist_id, error) @@ -100,8 +100,8 @@ CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, file_id, error) CALL h5dopen_f(file_id, "dset1", dataset_id, error) CALL check("h5dopen_f",error,total_error) - - ! Read dataset creation information + + ! Read dataset creation information CALL h5dget_create_plist_f(dataset_id, plist_id, error) CALL check("h5dget_create_plist_f",error,total_error) CALL h5pget_external_count_f(plist_id, count, error) @@ -123,7 +123,7 @@ write (*,*) "got external file size is not correct" total_error = total_error + 1 end if - + CALL h5dclose_f(dataset_id, error) CALL check("h5dclose_f", error, total_error) CALL h5pclose_f(plist_id, error) @@ -136,27 +136,27 @@ CALL check("h5_cleanup_f", error, total_error) RETURN END SUBROUTINE external_test - + SUBROUTINE multi_file_test(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error CHARACTER(LEN=9), PARAMETER :: filename = "multidset" ! File name - CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier INTEGER(HID_T) :: dspace_id ! Dataspace identifier INTEGER(HID_T) :: dtype_id ! Datatype identifier INTEGER(HID_T) :: fapl, fapl_1 ! File access property list identifier INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_map, memb_map_out INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_fapl, memb_fapl_out CHARACTER(LEN=20), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_name, memb_name_out - REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_addr, memb_addr_out + REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_addr, memb_addr_out !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F) :: memb_addr LOGICAL :: relax = .TRUE. LOGICAL :: relax_out = .TRUE. @@ -208,7 +208,7 @@ ! ! Create a new file using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -227,19 +227,19 @@ write(*,*) "Wrong value for driver" endif ! - ! Let's check h5pget(set)cache_f APIs here for now + ! Let's check h5pget(set)cache_f APIs here for now ! CALL h5pget_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, & rdcc_w0, error) CALL check("h5pget_cache_f", error, total_error) - + ! Set cache to some number ! rdcc_nbytes = 1024*1024 CALL h5pset_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, & rdcc_w0, error) CALL check("h5pset_cache_f", error, total_error) - + CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error, access_prp = fapl) CALL check("h5fcreate_f", error, total_error) if(error .ne. 0) then @@ -247,10 +247,10 @@ total_error = 1 call h5pclose_f(fapl, error) return - endif + endif - ! + ! ! Create the dataspace. ! CALL h5screate_simple_f(rank, dims, dspace_id, error) @@ -268,14 +268,14 @@ ! Write the dataset. ! data_dims(1) = 4 - data_dims(2) = 6 + data_dims(2) = 6 CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error) CALL check("h5dwrite_f", error, total_error) - ! + ! ! End access to the dataset and release resources used by it. - ! + ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f", error, total_error) @@ -285,14 +285,14 @@ CALL h5sclose_f(dspace_id, error) CALL check("h5sclose_f", error, total_error) - ! + ! ! Close the file. ! CALL h5fclose_f(file_id, error) CALL check("h5fclose_f", error, total_error) CALL h5pclose_f(fapl, error) CALL check("h5pclose_f", error, total_error) - ! + ! ! Open the existing file. ! CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error) @@ -314,19 +314,19 @@ ! CALL check("h5pget_fapl_multi_f", error, total_error) ! - ! Open the existing dataset. + ! Open the existing dataset. ! CALL h5dopen_f(file_id, dsetname, dset_id, error) CALL check("h5dopen_f", error, total_error) ! - ! Get the dataset type. + ! Get the dataset type. ! CALL h5dget_type_f(dset_id, dtype_id, error) CALL check("h5dget_type_f", error, total_error) ! - ! Get the data space. + ! Get the data space. ! CALL h5dget_space_f(dset_id, dspace_id, error) CALL check("h5dget_space_f", error, total_error) @@ -339,19 +339,19 @@ ! !Compare the data. - ! + ! do i = 1, 4 do j = 1, 6 - IF (data_out(i,j) .NE. dset_data(i, j)) THEN + IF (data_out(i,j) .NE. dset_data(i, j)) THEN write(*, *) "dataset test error occured" write(*,*) "data read is not the same as the data writen" END IF - end do + end do end do - ! + ! ! End access to the dataset and release resources used by it. - ! + ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f", error, total_error) @@ -366,7 +366,7 @@ ! CALL h5tclose_f(dtype_id, error) CALL check("h5tclose_f", error, total_error) - ! + ! ! Close the file. ! CALL h5fclose_f(file_id, error) @@ -377,7 +377,7 @@ CALL check("h5pclose_f", error, total_error) IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) - + IF(cleanup) CALL h5_cleanup_f(filename//'.h5-b', H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) IF(cleanup) CALL h5_cleanup_f(filename//'.h5-g', H5P_DEFAULT_F, error) @@ -390,7 +390,7 @@ CALL check("h5_cleanup_f", error, total_error) IF(cleanup) CALL h5_cleanup_f(filename//'.h5-s', H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) - + RETURN END SUBROUTINE multi_file_test @@ -412,14 +412,14 @@ ! April 16, 2009 !------------------------------------------------------------------------- ! -SUBROUTINE test_chunk_cache(cleanup, total_error) +SUBROUTINE test_chunk_cache(cleanup, total_error) + + USE HDF5 ! This module contains all necessary modules - USE HDF5 ! This module contains all necessary modules - IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(OUT) :: total_error - + CHARACTER(LEN=14), PARAMETER :: filename="chunk_cache" CHARACTER(LEN=80) :: fix_filename INTEGER(hid_t) :: fid = -1 ! /* File ID */ @@ -457,7 +457,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) ! Verify that H5Pget_chunk_cache(dapl) returns the same values as are in ! the default fapl. - ! + ! CALL H5Pget_cache_f(fapl_def, mdc_nelmts, nslots_1, nbytes_1, w0_1, error) CALL check("H5Pget_cache_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl1, nslots_4, nbytes_4, w0_4, error) @@ -514,7 +514,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) ! /* Create dataset with default dapl */ CALL H5Dcreate_f(fid, "dset", H5T_NATIVE_INTEGER, sid, dsid, error, dcpl, H5P_DEFAULT_F, dapl1) CALL check("H5Pcreate_f", error, total_error) - + ! /* Retrieve dapl from dataset, verify cache values are the same as on fapl_local */ CALL H5Dget_access_plist_f(dsid, dapl2, error) CALL check("H5Dget_access_plist_f", error, total_error) @@ -526,7 +526,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) ENDIF CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error) - + ! Set new values on dapl1. nbytes will be set to default, so the file ! property will override this setting @@ -601,7 +601,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Pset_cache_f", error, total_error) ! Close and reopen file with new fapl_local - + CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error) CALL H5Fclose_f(fid,error); CALL check("h5fclose_f", error, total_error) @@ -611,12 +611,12 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) ! Verify that dapl2 retrieved earlier (using values from the old fapl) ! sets its values in the new file (test use of H5Dopen2 with a dapl) ! - + CALL h5dopen_f (fid, "dset", dsid, error, dapl2) CALL check("h5dopen_f", error, total_error) - + CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error) ! Close dapl2, to avoid id leak - + CALL H5Dget_access_plist_f(dsid, dapl2, error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) @@ -654,11 +654,11 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error) CALL H5Sclose_f(sid,error); CALL check("H5Sclose_f", error, total_error) - CALL H5Pclose_f(fapl_local,error); CALL check("H5Pclose_f", error, total_error) - CALL H5Pclose_f(fapl_def,error); CALL check("H5Pclose_f", error, total_error) - CALL H5Pclose_f(dapl1,error); CALL check("H5Pclose_f", error, total_error) - CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error) - CALL H5Pclose_f(dcpl,error); CALL check("H5Pclose_f", error, total_error) + CALL H5Pclose_f(fapl_local,error); CALL check("H5Pclose_f", error, total_error) + CALL H5Pclose_f(fapl_def,error); CALL check("H5Pclose_f", error, total_error) + CALL H5Pclose_f(dapl1,error); CALL check("H5Pclose_f", error, total_error) + CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error) + CALL H5Pclose_f(dcpl,error); CALL check("H5Pclose_f", error, total_error) CALL H5Fclose_f(fid,error); CALL check("H5Fclose_f", error, total_error) IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.f90 index adcdfc7..0289465 100644 --- a/fortran/test/tH5R.f90 +++ b/fortran/test/tH5R.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,56 +11,56 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! ! ! -! ! Testing Reference Interface functionality. ! ! The following subroutine tests h5rcreate_f, h5rdereference_f, h5rget_name_f ! and H5Rget_object_type functions ! SUBROUTINE refobjtest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error - + INTEGER, INTENT(OUT) :: total_error + CHARACTER(LEN=9), PARAMETER :: filename = "reference" CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=8), PARAMETER :: dsetnamei = "INTEGERS" CHARACTER(LEN=17), PARAMETER :: dsetnamer = "OBJECT_REFERENCES" CHARACTER(LEN=6), PARAMETER :: groupname1 = "GROUP1" CHARACTER(LEN=6), PARAMETER :: groupname2 = "GROUP2" - - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: grp1_id ! Group identifier - INTEGER(HID_T) :: grp2_id ! Group identifier - INTEGER(HID_T) :: dset1_id ! Dataset identifier - INTEGER(HID_T) :: dsetr_id ! Dataset identifier - INTEGER(HID_T) :: type_id ! Type identifier - INTEGER(HID_T) :: space_id ! Dataspace identifier - INTEGER(HID_T) :: spacer_id ! Dataspace identifier + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: grp1_id ! Group identifier + INTEGER(HID_T) :: grp2_id ! Group identifier + INTEGER(HID_T) :: dset1_id ! Dataset identifier + INTEGER(HID_T) :: dsetr_id ! Dataset identifier + INTEGER(HID_T) :: type_id ! Type identifier + INTEGER(HID_T) :: space_id ! Dataspace identifier + INTEGER(HID_T) :: spacer_id ! Dataspace identifier INTEGER :: error, obj_type INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/5/) INTEGER(HSIZE_T), DIMENSION(1) :: dimsr= (/4/) INTEGER(HSIZE_T), DIMENSION(1) :: my_maxdims = (/5/) - INTEGER :: rank = 1 - INTEGER :: rankr = 1 + INTEGER :: rank = 1 + INTEGER :: rankr = 1 TYPE(hobj_ref_t_f), DIMENSION(4) :: ref TYPE(hobj_ref_t_f), DIMENSION(4) :: ref_out INTEGER(HSIZE_T), DIMENSION(1) :: ref_dim INTEGER, DIMENSION(5) :: DATA = (/1, 2, 3, 4, 5/) INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - + CHARACTER(LEN=7) :: buf ! buffer to hold the region name CHARACTER(LEN=16) :: buf_big ! buffer bigger then needed CHARACTER(LEN=4) :: buf_small ! buffer smaller then needed INTEGER(SIZE_T) :: buf_size ! returned size of the region buffer name - + ! !Create a new file with Default file access and - !file creation properties . + !file creation properties . ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) IF (error .NE. 0) THEN @@ -69,28 +69,28 @@ SUBROUTINE refobjtest(cleanup, total_error) ENDIF CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) CALL check("h5fcreate_f",error,total_error) - - + + ! ! Create a group inside the file ! CALL h5gcreate_f(file_id, groupname1, grp1_id, error) CALL check("h5gcreate_f",error,total_error) - + ! ! Create a group inside the group GROUP1 ! CALL h5gcreate_f(grp1_id, groupname2, grp2_id, error) CALL check("h5gcreate_f",error,total_error) - - ! - ! Create dataspaces for datasets + + ! + ! Create dataspaces for datasets ! CALL h5screate_simple_f(rank, dims, space_id, error, maxdims=my_maxdims) CALL check("h5screate_simple_f",error,total_error) CALL h5screate_simple_f(rankr, dimsr, spacer_id, error) CALL check("h5screate_simple_f",error,total_error) - + ! ! Create integer dataset ! @@ -110,13 +110,13 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL check("h5tcopy_f",error,total_error) CALL h5tcommit_f(file_id, "MyType", type_id, error) CALL check("h5tcommit_f",error,total_error) - + ! ! Close dataspaces, groups and integer dataset - ! + ! CALL h5sclose_f(space_id, error) CALL check("h5sclose_f",error,total_error) - CALL h5sclose_f(spacer_id, error) + CALL h5sclose_f(spacer_id, error) CALL check("h5sclose_f",error,total_error) CALL h5dclose_f(dset1_id, error) CALL check("h5dclose_f",error,total_error) @@ -126,7 +126,7 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL check("h5gclose_f",error,total_error) CALL h5gclose_f(grp2_id, error) CALL check("h5gclose_f",error,total_error) - + ! ! Craete references to two groups, integer dataset and shared datatype ! and write it to the dataset in the file @@ -142,37 +142,37 @@ SUBROUTINE refobjtest(cleanup, total_error) ref_dim(1) = SIZE(ref) CALL h5dwrite_f(dsetr_id, H5T_STD_REF_OBJ, ref, ref_dim, error) CALL check("h5dwrite_f",error,total_error) - + ! getting path to normal dataset in root group - + CALL H5Rget_name_f(dsetr_id, ref(1), buf, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - + CALL VERIFY("H5Rget_name_f", INT(buf_size),7, total_error) CALL VerifyString("H5Rget_name_f", buf, "/GROUP1", total_error) - + ! with buffer bigger then needed - + CALL H5Rget_name_f(dsetr_id, ref(1), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/GROUP1", total_error) - + ! getting path to dataset in /Group1 - + CALL H5Rget_name_f(dsetr_id, ref(2), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) CALL VERIFY("H5Rget_name_f", INT(buf_size),14,total_error) CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/GROUP1/GROUP2", total_error) - + ! !Close the dataset - ! + ! CALL h5dclose_f(dsetr_id, error) CALL check("h5dclose_f",error,total_error) - - ! + + ! ! Reopen the dataset with object references ! CALL h5dopen_f(file_id, dsetnamer,dsetr_id,error) @@ -180,60 +180,60 @@ SUBROUTINE refobjtest(cleanup, total_error) ref_dim(1) = SIZE(ref_out) CALL h5dread_f(dsetr_id, H5T_STD_REF_OBJ, ref_out, ref_dim, error) CALL check("h5dread_f",error,total_error) - + ! !get the third reference's type and Dereference it ! - CALL h5rget_object_type_f(dsetr_id, ref(3), obj_type, error) + CALL h5rget_object_type_f(dsetr_id, ref(3), obj_type, error) CALL check("h5rget_object_type_f",error,total_error) - IF (obj_type == H5G_DATASET_F) THEN + IF (obj_type == H5G_DATASET_F) THEN CALL h5rdereference_f(dsetr_id, ref(3), dset1_id, error) CALL check("h5rdereference_f",error,total_error) - + data_dims(1) = 5 CALL h5dwrite_f(dset1_id, H5T_NATIVE_INTEGER, DATA, data_dims, error) CALL check("h5dwrite_f",error,total_error) END IF - + ! !get the fourth reference's type and Dereference it ! - CALL h5rget_object_type_f(dsetr_id, ref(4), obj_type, error) + CALL h5rget_object_type_f(dsetr_id, ref(4), obj_type, error) CALL check("h5rget_object_type_f",error,total_error) - IF (obj_type == H5G_TYPE_F) THEN + IF (obj_type == H5G_TYPE_F) THEN CALL h5rdereference_f(dsetr_id, ref(4), type_id, error) CALL check("h5rdereference_f",error,total_error) END IF - + ! ! Close all objects. - ! + ! CALL h5dclose_f(dset1_id, error) CALL check("h5dclose_f",error,total_error) CALL h5tclose_f(type_id, error) CALL check("h5tclose_f",error,total_error) - + CALL h5dclose_f(dsetr_id, error) CALL check("h5dclose_f",error,total_error) CALL h5fclose_f(file_id, error) CALL check("h5fclose_f",error,total_error) - - + + IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) RETURN - + END SUBROUTINE refobjtest ! ! The following subroutine tests h5rget_region_f, h5rcreate_f, h5rget_name_f, ! and h5rdereference_f functionalities -! +! SUBROUTINE refregtest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error - + INTEGER, INTENT(OUT) :: total_error + CHARACTER(LEN=6), PARAMETER :: filename = "Refreg" CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=6), PARAMETER :: dsetnamev = "MATRIX" @@ -243,24 +243,24 @@ SUBROUTINE refregtest(cleanup, total_error) CHARACTER(LEN=11) :: buf_big ! buffer bigger then needed CHARACTER(LEN=4) :: buf_small ! buffer smaller then needed INTEGER(SIZE_T) :: buf_size ! returned size of the region buffer name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: space_id ! Dataspace identifier - INTEGER(HID_T) :: spacer_id ! Dataspace identifier - INTEGER(HID_T) :: dsetv_id ! Dataset identifier - INTEGER(HID_T) :: dsetr_id ! Dataset identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: space_id ! Dataspace identifier + INTEGER(HID_T) :: spacer_id ! Dataspace identifier + INTEGER(HID_T) :: dsetv_id ! Dataset identifier + INTEGER(HID_T) :: dsetr_id ! Dataset identifier INTEGER :: error TYPE(hdset_reg_ref_t_f) , DIMENSION(2) :: ref ! Buffers to store references TYPE(hdset_reg_ref_t_f) , DIMENSION(2) :: ref_out ! INTEGER(HSIZE_T), DIMENSION(2) :: ref_dim INTEGER(HSIZE_T), DIMENSION(2) :: data_dims INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/2,9/) ! Datasets dimensions - INTEGER(HSIZE_T), DIMENSION(1) :: dimsr = (/2/) ! + INTEGER(HSIZE_T), DIMENSION(1) :: dimsr = (/2/) ! INTEGER(HSIZE_T), DIMENSION(2) :: start INTEGER(HSIZE_T), DIMENSION(2) :: count - INTEGER :: rankr = 1 + INTEGER :: rankr = 1 INTEGER :: rank = 2 - INTEGER , DIMENSION(2,9) :: DATA - INTEGER , DIMENSION(2,9) :: data_out = 0 + INTEGER , DIMENSION(2,9) :: DATA + INTEGER , DIMENSION(2,9) :: data_out = 0 INTEGER(HSIZE_T) , DIMENSION(2,3) :: coord INTEGER(SIZE_T) ::num_points = 3 ! Number of selected points coord = RESHAPE((/1,1,2,7,1,9/), (/2,3/)) ! Coordinates of selected points @@ -281,30 +281,30 @@ SUBROUTINE refregtest(cleanup, total_error) ENDIF CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) ! Default file access and file creation - ! properties are used. + ! properties are used. CALL check("h5fcreate_f", error, total_error) - ! + ! ! Create dataspaces: - ! - ! for dataset with references to dataset regions + ! + ! for dataset with references to dataset regions ! CALL h5screate_simple_f(rankr, dimsr, spacer_id, error) CALL check("h5screate_simple_f", error, total_error) ! - ! for integer dataset + ! for integer dataset ! CALL h5screate_simple_f(rank, dims, space_id, error) CALL check("h5screate_simple_f", error, total_error) ! ! Create and write datasets: ! - ! Integer dataset + ! Integer dataset ! CALL h5dcreate_f(file_id, dsetnamev, H5T_NATIVE_INTEGER, space_id, & dsetv_id, error) CALL check("h5dcreate_f", error, total_error) data_dims(1) = 2 - data_dims(2) = 9 + data_dims(2) = 9 CALL h5dwrite_f(dsetv_id, H5T_NATIVE_INTEGER, DATA, data_dims, error) CALL check("h5dwrite_f", error, total_error) @@ -319,14 +319,14 @@ SUBROUTINE refregtest(cleanup, total_error) ! ! Create a reference to the hyperslab selection. ! - start(1) = 0 - start(2) = 3 + start(1) = 0 + start(2) = 3 COUNT(1) = 2 COUNT(2) = 3 CALL h5sselect_hyperslab_f(space_id, H5S_SELECT_SET_F, & - start, count, error) + start, count, error) CALL check("h5sselect_hyperslab_f", error, total_error) - CALL h5rcreate_f(file_id, dsetnamev, space_id, ref(1), error) + CALL h5rcreate_f(file_id, dsetnamev, space_id, ref(1), error) CALL check("h5rcreate_f", error, total_error) ! ! Create a reference to elements selection. @@ -334,15 +334,15 @@ SUBROUTINE refregtest(cleanup, total_error) CALL h5sselect_none_f(space_id, error) CALL check("h5sselect_none_f", error, total_error) CALL h5sselect_elements_f(space_id, H5S_SELECT_SET_F, rank, num_points,& - coord, error) + coord, error) CALL check("h5sselect_elements_f", error, total_error) - CALL h5rcreate_f(file_id, dsetnamev, space_id, ref(2), error) + CALL h5rcreate_f(file_id, dsetnamev, space_id, ref(2), error) CALL check("h5rcreate_f", error, total_error) ! - ! Write dataset with the references. + ! Write dataset with the references. ! ref_dim(1) = SIZE(ref) - CALL h5dwrite_f(dsetr_id, H5T_STD_REF_DSETREG, ref, ref_dim, error) + CALL h5dwrite_f(dsetr_id, H5T_STD_REF_DSETREG, ref, ref_dim, error) CALL check("h5dwrite_f", error, total_error) ! ! Close all objects. @@ -366,7 +366,7 @@ SUBROUTINE refregtest(cleanup, total_error) ! Read references to the dataset regions. ! ref_dim(1) = SIZE(ref_out) - CALL h5dread_f(dsetr_id, H5T_STD_REF_DSETREG, ref_out, ref_dim, error) + CALL h5dread_f(dsetr_id, H5T_STD_REF_DSETREG, ref_out, ref_dim, error) CALL check("h5dread_f", error, total_error) @@ -391,12 +391,12 @@ SUBROUTINE refregtest(cleanup, total_error) CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) CALL VerifyString("H5Rget_name_f", TRIM(buf_small), "/MAT", total_error) - ! + ! ! Dereference the first reference. - ! + ! CALL H5rdereference_f(dsetr_id, ref_out(1), dsetv_id, error) CALL check("h5rdereference_f", error, total_error) - CALL H5rget_region_f(dsetr_id, ref_out(1), space_id, error) + CALL H5rget_region_f(dsetr_id, ref_out(1), space_id, error) CALL check("h5rget_region_f", error, total_error) ! Get name of the dataset the second region reference points to using H5Rget_name_f @@ -418,13 +418,13 @@ SUBROUTINE refregtest(cleanup, total_error) CALL h5dclose_f(dsetv_id, error) CALL check("h5dclose_f", error, total_error) data_out = 0 - ! + ! ! Dereference the second reference. - ! + ! CALL H5rdereference_f(dsetr_id, ref_out(2), dsetv_id, error) CALL check("h5rdereference_f", error, total_error) - CALL H5rget_region_f(dsetr_id, ref_out(2), space_id, error) + CALL H5rget_region_f(dsetr_id, ref_out(2), space_id, error) CALL check("h5rget_region_f", error, total_error) ! ! Read selected data from the dataset. diff --git a/fortran/test/tH5S.f90 b/fortran/test/tH5S.f90 index 63efe5f..29943bb 100644 --- a/fortran/test/tH5S.f90 +++ b/fortran/test/tH5S.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,35 +11,35 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! ! ! -! ! Testing Dataspace Interface functionality. ! ! ! The following subroutine tests the following functionalities: -! h5screate_f, h5scopy_f, h5screate_simple_f, h5sis_simple_f, -! h5sget_simple_extent_dims_f,h5sget_simple_extent_ndims_f +! h5screate_f, h5scopy_f, h5screate_simple_f, h5sis_simple_f, +! h5sget_simple_extent_dims_f,h5sget_simple_extent_ndims_f ! h5sget_simple_extent_npoints_f, h5sget_simple_extent_type_f, -! h5sextent_copy_f, h5sset_extent_simple_f, h5sset_extent_none_f +! h5sextent_copy_f, h5sset_extent_simple_f, h5sset_extent_none_f ! SUBROUTINE dataspace_basic_test(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error CHARACTER(LEN=10), PARAMETER :: filename1 = "basicspace" ! File1 name CHARACTER(LEN=9), PARAMETER :: filename2 = "copyspace" ! File2 name - CHARACTER(LEN=80) :: fix_filename1 - CHARACTER(LEN=80) :: fix_filename2 + CHARACTER(LEN=80) :: fix_filename1 + CHARACTER(LEN=80) :: fix_filename2 CHARACTER(LEN=9), PARAMETER :: dsetname = "basicdset" ! Dataset name - INTEGER(HID_T) :: file1_id, file2_id ! File identifiers - INTEGER(HID_T) :: dset1_id, dset2_id ! Dataset identifiers + INTEGER(HID_T) :: file1_id, file2_id ! File identifiers + INTEGER(HID_T) :: dset1_id, dset2_id ! Dataset identifiers INTEGER(HID_T) :: space1_id, space2_id ! Dataspace identifiers INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/4,6/) ! Dataset dimensions @@ -81,10 +81,10 @@ ! ! CALL h5init_types_f(error) ! CALL check("h5init_types_f", error, total_error) - + ! ! Create new files using default properties. - ! + ! CALL h5_fixname_f(filename1, fix_filename1, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -101,53 +101,53 @@ CALL h5fcreate_f(fix_filename2, H5F_ACC_TRUNC_F, file2_id, error) CALL check("h5fcreate_f", error, total_error) - ! + ! ! Create dataspace for file1. ! CALL h5screate_simple_f(rank1, dims1, space1_id, error, maxdims1) CALL check("h5screate_simple_f", error, total_error) - ! + ! ! Copy space1_id to space2_id. ! CALL h5scopy_f(space1_id, space2_id, error) CALL check("h5scopy_f", error, total_error) - ! + ! !Check whether copied space is simple. ! CALL h5sis_simple_f(space2_id, flag, error) CALL check("h5sissimple_f", error, total_error) IF (.NOT. flag) write(*,*) "dataspace is not simple type" - - ! + + ! !set the copied space to none. ! CALL h5sset_extent_none_f(space2_id, error) CALL check("h5sset_extent_none_f", error, total_error) - - ! + + ! !copy the extent of space1_id to space2_id. ! - CALL h5sextent_copy_f(space2_id, space1_id, error) + CALL h5sextent_copy_f(space2_id, space1_id, error) CALL check("h5sextent_copy_f", error, total_error) - ! + ! !get the copied space's dimensions. ! CALL h5sget_simple_extent_dims_f(space2_id, dimsout, maxdimsout, error) CALL check("h5sget_simple_extent_dims_f", error, total_error) IF ((dimsout(1) .NE. dims1(1)) .OR. (dimsout(2) .NE. dims1(2)) ) THEN - write(*,*)"error occured, copied dims not same" + write(*,*)"error occured, copied dims not same" END IF - - ! + + ! !get the copied space's rank. ! CALL h5sget_simple_extent_ndims_f(space2_id, rank2, error) CALL check("h5sget_simple_extent_ndims_f", error, total_error) - IF (rank2 .NE. rank1) write(*,*)"error occured, copied ranks not same" - - ! + IF (rank2 .NE. rank1) write(*,*)"error occured, copied ranks not same" + + ! !get the copied space's number of elements. ! CALL h5sget_simple_extent_npoints_f(space2_id, npoints, error) @@ -155,27 +155,27 @@ IF (npoints .NE. 24) write(*,*)"error occured, number of elements not correct" - ! + ! !get the copied space's class type. ! - CALL h5sget_simple_extent_type_f(space2_id, classtype, error) + CALL h5sget_simple_extent_type_f(space2_id, classtype, error) CALL check("h5sget_simple_extent_type_f", error, total_error) IF (classtype .NE. 1) write(*,*)"class type not H5S_SIMPLE_f" - ! + ! !set the copied space to dim2 size. ! CALL h5sset_extent_simple_f(space2_id, rank2, dims2, maxdims2, error) CALL check("h5sset_extent_simple_f", error, total_error) - ! + ! !get the copied space's dimensions. ! CALL h5sget_simple_extent_dims_f(space2_id, dimsout, maxdimsout, error) CALL check("h5sget_simple_extent_dims_f", error, total_error) IF ((dimsout(1) .NE. dims2(1)) .OR. (dimsout(2) .NE. dims2(2)) ) THEN write(*,*)"error occured, copied dims not same" - END IF + END IF ! ! Create the datasets with default properties in two files. @@ -196,7 +196,7 @@ CALL h5dwrite_f(dset1_id, H5T_NATIVE_INTEGER, data1_in, data_dims, error) CALL check("h5dwrite_f", error, total_error) - data_dims(1) = 6 + data_dims(1) = 6 data_dims(2) = 6 CALL h5dwrite_f(dset2_id, H5T_NATIVE_INTEGER, data2_in, data_dims, error) CALL check("h5dwrite_f", error, total_error) @@ -211,40 +211,40 @@ ! !Compare the data. - ! + ! do i = 1, 4 do j = 1, 6 - IF (data1_out(i,j) .NE. data1_in(i, j)) THEN + IF (data1_out(i,j) .NE. data1_in(i, j)) THEN write(*, *) "dataset test error occured" write(*,*) "data read is not the same as the data writen" END IF - end do + end do end do ! ! Read the second dataset. ! - data_dims(1) = 6 + data_dims(1) = 6 data_dims(2) = 6 CALL h5dread_f(dset2_id, H5T_NATIVE_INTEGER, data2_out, data_dims, error) CALL check("h5dread_f", error, total_error) ! !Compare the data. - ! + ! do i = 1, 6 do j = 1, 6 - IF (data2_out(i,j) .NE. data2_in(i, j)) THEN + IF (data2_out(i,j) .NE. data2_in(i, j)) THEN write(*, *) "dataset test error occured" write(*,*) "data read is not the same as the data writen" END IF - end do + end do end do - ! + ! !Close the datasets. - ! + ! CALL h5dclose_f(dset1_id, error) CALL check("h5dclose_f", error, total_error) CALL h5dclose_f(dset2_id, error) @@ -257,14 +257,14 @@ CALL check("h5sclose_f", error, total_error) CALL h5sclose_f(space2_id, error) CALL check("h5sclose_f", error, total_error) - ! + ! ! Close the files. ! CALL h5fclose_f(file1_id, error) CALL check("h5fclose_f", error, total_error) CALL h5fclose_f(file2_id, error) CALL check("h5fclose_f", error, total_error) - + if(cleanup) CALL h5_cleanup_f(filename1, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) diff --git a/fortran/test/tH5Sselect.f90 b/fortran/test/tH5Sselect.f90 index 7e11b61..f7fd8af 100644 --- a/fortran/test/tH5Sselect.f90 +++ b/fortran/test/tH5Sselect.f90 @@ -1,4 +1,4 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,9 +11,9 @@ ! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! ! -! ! Testing Selection-related Dataspace Interface functionality. ! @@ -22,17 +22,17 @@ ! h5sget_select_npoints_f, h5sselect_elements_f, h5sselect_all_f, ! h5sselect_none_f, h5sselect_valid_f, h5sselect_hyperslab_f, ! h5sget_select_bounds_f, h5sget_select_elem_pointlist_f, -! h5sget_select_elem_npoints_f, h5sget_select_hyper_blocklist_f, +! h5sget_select_elem_npoints_f, h5sget_select_hyper_blocklist_f, ! h5sget_select_hyper_nblocks_f, h5sget_select_npoints_f ! SUBROUTINE test_select_hyperslab(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error CHARACTER(LEN=7), PARAMETER :: filename = "tselect" CHARACTER(LEN=80) :: fix_filename @@ -42,60 +42,60 @@ ! CHARACTER(LEN=8), PARAMETER :: dsetname = "IntArray" - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: dataspace ! Dataspace identifier - INTEGER(HID_T) :: memspace ! memspace identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: dataspace ! Dataspace identifier + INTEGER(HID_T) :: memspace ! memspace identifier ! - !Memory space dimensions + !Memory space dimensions ! INTEGER(HSIZE_T), DIMENSION(3) :: dimsm = (/7,7,3/) ! - !Dataset dimensions + !Dataset dimensions ! INTEGER(HSIZE_T), DIMENSION(2) :: dimsf = (/5,6/) ! - !Size of the hyperslab in the file + !Size of the hyperslab in the file ! INTEGER(HSIZE_T), DIMENSION(2) :: count = (/3,4/) ! - !hyperslab offset in the file + !hyperslab offset in the file ! INTEGER(HSIZE_T), DIMENSION(2) :: offset = (/1,2/) ! - !Size of the hyperslab in memory + !Size of the hyperslab in memory ! INTEGER(HSIZE_T), DIMENSION(3) :: count_out = (/3,4,1/) ! - !hyperslab offset in memory + !hyperslab offset in memory ! INTEGER(HSIZE_T), DIMENSION(3) :: offset_out = (/3,0,0/) ! - !data to write + !data to write ! INTEGER, DIMENSION(5,6) :: data ! - !output buffer + !output buffer ! INTEGER, DIMENSION(7,7,3) :: data_out ! - !dataset space rank + !dataset space rank ! - INTEGER :: dsetrank = 2 + INTEGER :: dsetrank = 2 ! - !memspace rank + !memspace rank ! INTEGER :: memrank = 3 @@ -103,23 +103,23 @@ ! - !general purpose integer + !general purpose integer ! - INTEGER :: i, j + INTEGER :: i, j ! - !flag to check operation success + !flag to check operation success ! - INTEGER :: error + INTEGER :: error INTEGER(HSIZE_T), DIMENSION(3) :: data_dims ! - !This writes data to the HDF5 file. + !This writes data to the HDF5 file. ! ! - !data initialization + !data initialization ! do i = 1, 5 do j = 1, 6 @@ -137,12 +137,12 @@ ! !Initialize FORTRAN predifined datatypes ! -! CALL h5init_types_f(error) +! CALL h5init_types_f(error) ! CALL check("h5init_types_f", error, total_error) ! !Create a new file using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -152,7 +152,7 @@ CALL check("h5fcreate_f", error, total_error) ! - !Create the data space for the dataset. + !Create the data space for the dataset. ! CALL h5screate_simple_f(dsetrank, dimsf, dataspace, error) CALL check("h5screate_simple_f", error, total_error) @@ -168,7 +168,7 @@ ! Write the dataset ! data_dims(1) = 5 - data_dims(2) = 6 + data_dims(2) = 6 CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, data_dims, error) CALL check("h5dwrite_f", error, total_error) @@ -191,7 +191,7 @@ CALL check("h5fclose_f", error, total_error) ! - !This reads the hyperslab from the sds.h5 file just + !This reads the hyperslab from the sds.h5 file just !created, into a 2-dimensional plane of the 3-dimensional array. ! @@ -228,7 +228,7 @@ !Select hyperslab in the dataset. ! CALL h5sselect_hyperslab_f(dataspace, H5S_SELECT_SET_F, & - offset, count, error) + offset, count, error) CALL check("h5sselect_hyperslab_f", error, total_error) ! !create memory dataspace. @@ -240,16 +240,16 @@ !Select hyperslab in memory. ! CALL h5sselect_hyperslab_f(memspace, H5S_SELECT_SET_F, & - offset_out, count_out, error) + offset_out, count_out, error) CALL check("h5sselect_hyperslab_f", error, total_error) ! - !Read data from hyperslab in the file into the hyperslab in + !Read data from hyperslab in the file into the hyperslab in !memory and display. ! data_dims(1) = 7 - data_dims(2) = 7 - data_dims(3) = 3 + data_dims(2) = 7 + data_dims(3) = 3 CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, & memspace, dataspace) CALL check("h5dread_f", error, total_error) @@ -264,7 +264,7 @@ ! 0 0 0 0 0 0 0 ! 0 0 0 0 0 0 0 ! 0 0 0 0 0 0 0 - ! 3 4 5 6 0 0 0 + ! 3 4 5 6 0 0 0 ! 4 5 6 7 0 0 0 ! 5 6 7 8 0 0 0 ! 0 0 0 0 0 0 0 @@ -307,11 +307,11 @@ SUBROUTINE test_select_element(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error ! !the dataset1 is stored in file "copy1.h5" @@ -335,60 +335,60 @@ CHARACTER(LEN=8), PARAMETER :: dsetname2 = "Copy2" ! - !dataset rank + !dataset rank ! INTEGER, PARAMETER :: RANK = 2 ! - !number of points selected + !number of points selected ! INTEGER(SIZE_T), PARAMETER :: NUMP = 2 - INTEGER(HID_T) :: file1_id ! File1 identifier - INTEGER(HID_T) :: file2_id ! File2 identifier - INTEGER(HID_T) :: dset1_id ! Dataset1 identifier - INTEGER(HID_T) :: dset2_id ! Dataset2 identifier - INTEGER(HID_T) :: dataspace1 ! Dataspace identifier - INTEGER(HID_T) :: dataspace2 ! Dataspace identifier - INTEGER(HID_T) :: memspace ! memspace identifier + INTEGER(HID_T) :: file1_id ! File1 identifier + INTEGER(HID_T) :: file2_id ! File2 identifier + INTEGER(HID_T) :: dset1_id ! Dataset1 identifier + INTEGER(HID_T) :: dset2_id ! Dataset2 identifier + INTEGER(HID_T) :: dataspace1 ! Dataspace identifier + INTEGER(HID_T) :: dataspace2 ! Dataspace identifier + INTEGER(HID_T) :: memspace ! memspace identifier ! - !Memory space dimensions + !Memory space dimensions ! INTEGER(HSIZE_T), DIMENSION(1) :: dimsm = (/2/) ! - !Dataset dimensions + !Dataset dimensions ! INTEGER(HSIZE_T), DIMENSION(2) :: dimsf = (/3,4/) ! - !Points positions in the file + !Points positions in the file ! INTEGER(HSIZE_T), DIMENSION(RANK,NUMP) :: coord ! - !data buffers + !data buffers ! INTEGER, DIMENSION(3,4) :: buf1, buf2, bufnew ! - !value to write + !value to write ! INTEGER, DIMENSION(2) :: val = (/53, 59/) ! - !memory rank + !memory rank ! - INTEGER :: memrank = 1 + INTEGER :: memrank = 1 ! - !general purpose integer + !general purpose integer ! - INTEGER :: i, j + INTEGER :: i, j ! - !flag to check operation success + !flag to check operation success ! INTEGER :: error INTEGER(HSIZE_T), DIMENSION(3) :: data_dims @@ -396,11 +396,11 @@ ! !Create two files containing identical datasets. Write 0's to one - !and 1's to the other. + !and 1's to the other. ! ! - !data initialization + !data initialization ! do i = 1, 3 do j = 1, 4 @@ -417,12 +417,12 @@ ! !Initialize FORTRAN predifined datatypes ! -! CALL h5init_types_f(error) +! CALL h5init_types_f(error) ! CALL check("h5init_types_f", error, total_error) ! !Create file1, file2 using default properties. - ! + ! CALL h5_fixname_f(filename1, fix_filename1, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -440,7 +440,7 @@ CALL check("h5fcreate_f", error, total_error) ! - !Create the data space for the datasets. + !Create the data space for the datasets. ! CALL h5screate_simple_f(RANK, dimsf, dataspace1, error) CALL check("h5screate_simple_f", error, total_error) @@ -498,8 +498,8 @@ CALL check("h5fclose_f", error, total_error) ! - !Open the two files. Select two points in one file, write values to - !those point locations, then do H5Scopy and write the values to the + !Open the two files. Select two points in one file, write values to + !those point locations, then do H5Scopy and write the values to the !other file. Close files. ! @@ -534,12 +534,12 @@ CALL check("h5screate_simple_f", error, total_error) ! - !Set the selected point positions.Because Fortran array index starts + !Set the selected point positions.Because Fortran array index starts ! from 1, so add one to the actual select points in C ! - coord(1,1) = 1 - coord(2,1) = 2 - coord(1,2) = 1 + coord(1,1) = 1 + coord(2,1) = 2 + coord(1,2) = 1 coord(2,2) = 4 ! @@ -560,7 +560,7 @@ ! !Copy the daspace1 into dataspace2 ! - CALL h5scopy_f(dataspace1, dataspace2, error) + CALL h5scopy_f(dataspace1, dataspace2, error) CALL check("h5scopy_f", error, total_error) ! @@ -683,25 +683,25 @@ SUBROUTINE test_basic_select(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error + INTEGER, INTENT(OUT) :: total_error ! !the dataset is stored in file "testselect.h5" ! CHARACTER(LEN=10), PARAMETER :: filename = "testselect" - CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=80) :: fix_filename ! - !dataspace rank + !dataspace rank ! INTEGER, PARAMETER :: RANK = 2 ! - !select NUMP_POINTS points from the file + !select NUMP_POINTS points from the file ! INTEGER(SIZE_T), PARAMETER :: NUMPS = 10 @@ -710,86 +710,86 @@ ! CHARACTER(LEN=10), PARAMETER :: dsetname = "testselect" - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier INTEGER(HID_T) :: dataspace ! Dataspace identifier ! - !Dataset dimensions + !Dataset dimensions ! INTEGER(HSIZE_T), DIMENSION(2) :: dimsf = (/5,6/) ! - !Size of the hyperslab in the file + !Size of the hyperslab in the file ! INTEGER(HSIZE_T), DIMENSION(2) :: count = (/2,2/) ! - !hyperslab offset in the file + !hyperslab offset in the file ! INTEGER(HSIZE_T), DIMENSION(2) :: offset = (/0,0/) ! - !start block for getting the selected hyperslab + !start block for getting the selected hyperslab ! INTEGER(HSIZE_T) :: startblock = 0 ! - !start point for getting the selected elements + !start point for getting the selected elements ! INTEGER(HSIZE_T) :: startpoint = 0 ! - !Stride of the hyperslab in the file + !Stride of the hyperslab in the file ! INTEGER(HSIZE_T), DIMENSION(2) :: stride = (/3,3/) ! - !BLock size of the hyperslab in the file + !BLock size of the hyperslab in the file ! INTEGER(HSIZE_T), DIMENSION(2) :: block = (/2,2/) ! - !array to give selected points' coordinations + !array to give selected points' coordinations ! INTEGER(HSIZE_T), DIMENSION(RANK, NUMPS) :: coord ! - !Number of hyperslabs selected in the current dataspace + !Number of hyperslabs selected in the current dataspace ! INTEGER(HSSIZE_T) :: num_blocks ! !allocatable array for putting a list of hyperslabs - !selected in the current file dataspace + !selected in the current file dataspace ! INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: blocklist ! - !Number of points selected in the current dataspace + !Number of points selected in the current dataspace ! INTEGER(HSSIZE_T) :: num_points INTEGER(HSIZE_T) :: num1_points ! !allocatable array for putting a list of points - !selected in the current file dataspace + !selected in the current file dataspace ! INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: pointlist ! - !start and end bounds in the current dataspace selection + !start and end bounds in the current dataspace selection ! INTEGER(HSIZE_T), DIMENSION(RANK) :: startout, endout ! - !data to write + !data to write ! INTEGER, DIMENSION(5,6) :: data ! - !flag to check operation success + !flag to check operation success ! INTEGER :: error INTEGER(HSIZE_T), DIMENSION(3) :: data_dims @@ -797,7 +797,7 @@ INTEGER :: i ! - !initialize the coord array to give the selected points' position + !initialize the coord array to give the selected points' position ! coord(1,1) = 1 coord(2,1) = 1 @@ -822,7 +822,7 @@ ! !Create a new file using default properties. - ! + ! CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) if (error .ne. 0) then write(*,*) "Cannot modify filename" @@ -832,7 +832,7 @@ CALL check("h5fcreate_f", error, total_error) ! - !Create the data space for the dataset. + !Create the data space for the dataset. ! CALL h5screate_simple_f(RANK, dimsf, dataspace, error) CALL check("h5screate_simple_f", error, total_error) @@ -875,7 +875,7 @@ ! CALL h5fopen_f (fix_filename, H5F_ACC_RDONLY_F, file_id, error) CALL check("h5fopen_f", error, total_error) - + ! !Open the dataset. ! @@ -892,11 +892,11 @@ !Select hyperslab in the dataset. ! CALL h5sselect_hyperslab_f(dataspace, H5S_SELECT_SET_F, & - offset, count, error, stride, block) + offset, count, error, stride, block) CALL check("h5sselect_hyperslab_f", error, total_error) ! - !get the number of hyperslab blocks in the current dataspac selection + !get the number of hyperslab blocks in the current dataspac selection ! CALL h5sget_select_hyper_nblocks_f(dataspace, num_blocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) @@ -911,16 +911,16 @@ if(error .NE. 0) then STOP endif - + ! - !get the list of hyperslabs selected in the current dataspac selection + !get the list of hyperslabs selected in the current dataspac selection ! CALL h5sget_select_hyper_blocklist_f(dataspace, startblock, & num_blocks, blocklist, error) CALL check("h5sget_select_hyper_blocklist_f", error, total_error) ! write(*,*) (blocklist(i), i =1, num_blocks*RANK*2) !result of blocklist selected is: - !1, 1, 2, 2, 4, 1, 5, 2, 1, 4, 2, 5, 4, 4, 5, 5 + !1, 1, 2, 2, 4, 1, 5, 2, 1, 4, 2, 5, 4, 4, 5, 5 ! !deallocate the blocklist array @@ -928,7 +928,7 @@ DEALLOCATE(blocklist) ! - !get the selection bounds in the current dataspac selection + !get the selection bounds in the current dataspac selection ! CALL h5sget_select_bounds_f(dataspace, startout, endout, error) CALL check("h5sget_select_bounds_f", error, total_error) @@ -967,7 +967,7 @@ CALL h5sget_select_elem_npoints_f(dataspace, num_points, error) CALL check("h5sget_select_elem_npoints_f", error, total_error) IF (num_points .NE. 10) write(*,*) "error occured with num_points" - !write(*,*) num_points + !write(*,*) num_points ! result of num_points is 10 ! @@ -977,11 +977,11 @@ CALL h5sget_select_elem_pointlist_f(dataspace, startpoint, & num1_points, pointlist, error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) - !write(*,*) (pointlist(i), i =1, num1_points*RANK) + !write(*,*) (pointlist(i), i =1, num1_points*RANK) !result of pintlist is: - !1, 1, 3, 1, 5, 1, 1, 3, 3, 3, 5, 3, 3, + !1, 1, 3, 1, 5, 1, 1, 3, 3, 3, 5, 3, 3, !4, 1, 4, 3, 5, 5, 5 - + ! !deallocate the pointlist array ! @@ -1021,13 +1021,13 @@ !****************************************************************/ SUBROUTINE test_select_point(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(OUT) :: total_error INTEGER(HID_T) :: xfer_plist - + INTEGER, PARAMETER :: SPACE1_DIM1=3 INTEGER, PARAMETER :: SPACE1_DIM2=15 INTEGER, PARAMETER :: SPACE1_DIM3=13 @@ -1035,11 +1035,11 @@ SUBROUTINE test_select_point(cleanup, total_error) INTEGER, PARAMETER :: SPACE2_DIM2=26 INTEGER, PARAMETER :: SPACE3_DIM1=15 INTEGER, PARAMETER :: SPACE3_DIM2=26 - + INTEGER, PARAMETER :: SPACE1_RANK=3 INTEGER, PARAMETER :: SPACE2_RANK=2 INTEGER, PARAMETER :: SPACE3_RANK=2 - + ! /* Element selection information */ INTEGER, PARAMETER :: POINT1_NPOINTS=10 INTEGER(hid_t) ::fid1 ! /* HDF5 File IDs */ @@ -1048,7 +1048,7 @@ SUBROUTINE test_select_point(cleanup, total_error) INTEGER(hsize_t), DIMENSION(1:3) :: dims1 = (/SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3/) INTEGER(hsize_t), DIMENSION(1:2) :: dims2 = (/SPACE2_DIM1, SPACE2_DIM2/) INTEGER(hsize_t), DIMENSION(1:2) :: dims3 = (/SPACE3_DIM1, SPACE3_DIM2/) - + INTEGER(hsize_t), DIMENSION(1:SPACE1_RANK,1:POINT1_NPOINTS) :: coord1 !/* Coordinates for point selection */ INTEGER(hsize_t), DIMENSION(1:SPACE1_RANK,1:POINT1_NPOINTS) :: temp_coord1 !/* Coordinates for point selection */ INTEGER(hsize_t), DIMENSION(1:SPACE2_RANK,1:POINT1_NPOINTS) :: coord2 !/* Coordinates for point selection */ @@ -1064,7 +1064,7 @@ SUBROUTINE test_select_point(cleanup, total_error) ! struct pnt_iter pi; /* Custom Pointer iterator struct */ INTEGER :: error !/* Generic return value */ CHARACTER(LEN=9) :: filename = 'h5s_hyper' - CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=1), DIMENSION(1:SPACE2_DIM1,1:SPACE2_DIM2) :: wbuf, rbuf CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) @@ -1090,11 +1090,11 @@ SUBROUTINE test_select_point(cleanup, total_error) !!$ for(i=0, tbuf=wbuf; i", indt + 4, ""); strcat(str, tmp_str); } /* end if */ - + /* Release resources */ if(name) { for(i = 0; i < nmembs; i++) diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c index 98dcbd5..41c4cec 100644 --- a/hl/src/H5LTparse.c +++ b/hl/src/H5LTparse.c @@ -17,7 +17,7 @@ * on jam. Do NOT modify it by hand. */ #ifndef lint -static char const +static char const yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $"; #endif #include @@ -91,7 +91,7 @@ struct arr_info { }; /*stack for nested array type*/ struct arr_info arr_stack[STACK_SIZE]; -int asindex = -1; /*pointer to the top of array stack*/ +int asindex = -1; /*pointer to the top of array stack*/ hbool_t is_str_size = 0; /*flag to lexer for string size*/ hbool_t is_str_pad = 0; /*flag to lexer for string padding*/ @@ -99,7 +99,7 @@ H5T_pad_t str_pad; /*variable for string padding*/ H5T_cset_t str_cset; /*variable for string character set*/ hbool_t is_variable = 0; /*variable for variable-length string*/ size_t str_size; /*variable for string size*/ - + hid_t enum_id; /*type ID*/ hbool_t is_enum = 0; /*flag to lexer for enum type*/ hbool_t is_enum_memb = 0; /*flag to lexer for enum member*/ @@ -822,9 +822,9 @@ case 46: break; case 47: #line 156 "H5LTparse.y" -{ yyval.ival = cmpd_stack[csindex].id; +{ yyval.ival = cmpd_stack[csindex].id; cmpd_stack[csindex].id = 0; - cmpd_stack[csindex].first_memb = 1; + cmpd_stack[csindex].first_memb = 1; csindex--; } break; @@ -834,7 +834,7 @@ case 50: break; case 51: #line 167 "H5LTparse.y" -{ +{ size_t origin_size, new_size; hid_t dtype_id = cmpd_stack[csindex].id; @@ -848,7 +848,7 @@ case 51: cmpd_stack[csindex].first_memb = 0; } else { origin_size = H5Tget_size(dtype_id); - + if(yyvsp[-1].ival == 0) { new_size = origin_size + H5Tget_size(yyvsp[-6].ival); H5Tset_size(dtype_id, new_size); @@ -859,10 +859,10 @@ case 51: H5Tinsert(dtype_id, yyvsp[-3].sval, yyvsp[-1].ival, yyvsp[-6].ival); } } - + cmpd_stack[csindex].is_field = 0; H5Tclose(yyvsp[-6].ival); - + new_size = H5Tget_size(dtype_id); } break; @@ -886,7 +886,7 @@ case 56: break; case 57: #line 213 "H5LTparse.y" -{ +{ yyval.ival = H5Tarray_create2(yyvsp[-1].ival, arr_stack[asindex].ndims, arr_stack[asindex].dims); arr_stack[asindex].ndims = 0; asindex--; @@ -900,9 +900,9 @@ break; case 61: #line 224 "H5LTparse.y" { unsigned ndims = arr_stack[asindex].ndims; - arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival; + arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival; arr_stack[asindex].ndims++; - arr_stack[asindex].is_dim = 0; + arr_stack[asindex].is_dim = 0; } break; case 64: @@ -915,10 +915,10 @@ case 65: break; case 66: #line 241 "H5LTparse.y" -{ +{ size_t size = (size_t)yylval.ival; yyval.ival = H5Tcreate(H5T_OPAQUE, size); - is_opq_size = 0; + is_opq_size = 0; } break; case 67: @@ -927,7 +927,7 @@ case 67: break; case 68: #line 247 "H5LTparse.y" -{ +{ H5Tset_tag(yyvsp[-6].ival, yylval.sval); is_opq_tag = 0; } @@ -942,12 +942,12 @@ case 72: break; case 73: #line 260 "H5LTparse.y" -{ +{ if(yyvsp[-1].ival == H5T_VARIABLE_TOKEN) is_variable = 1; - else + else str_size = yylval.ival; - is_str_size = 0; + is_str_size = 0; } break; case 74: @@ -963,7 +963,7 @@ case 74: break; case 75: #line 277 "H5LTparse.y" -{ +{ if(yyvsp[-1].ival == H5T_CSET_ASCII_TOKEN) str_cset = H5T_CSET_ASCII; else if(yyvsp[-1].ival == H5T_CSET_UTF8_TOKEN) @@ -981,7 +981,7 @@ case 76: break; case 77: #line 291 "H5LTparse.y" -{ +{ hid_t str_id = yyvsp[-1].ival; /*set string size*/ @@ -990,12 +990,12 @@ case 77: is_variable = 0; } else H5Tset_size(str_id, str_size); - + /*set string padding and character set*/ H5Tset_strpad(str_id, str_pad); H5Tset_cset(str_id, str_cset); - yyval.ival = str_id; + yyval.ival = str_id; } break; case 78: @@ -1042,7 +1042,7 @@ case 91: #line 330 "H5LTparse.y" { is_enum_memb = 1; /*indicate member of enum*/ - enum_memb_symbol = strdup(yylval.sval); + enum_memb_symbol = strdup(yylval.sval); } break; case 92: @@ -1057,32 +1057,32 @@ case 92: hid_t native = H5Tget_native_type(super, H5T_DIR_ASCEND); H5T_order_t super_order = H5Tget_order(super); H5T_order_t native_order = H5Tget_order(native); - + if(is_enum && is_enum_memb) { /*if it's an enum member*/ /*To handle machines of different endianness*/ if(H5Tequal(native, H5T_NATIVE_SCHAR) || H5Tequal(native, H5T_NATIVE_UCHAR)) { if(super_order != native_order) - H5Tconvert(native, super, 1, &char_val, NULL, H5P_DEFAULT); + H5Tconvert(native, super, 1, &char_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &char_val); } else if(H5Tequal(native, H5T_NATIVE_SHORT) || H5Tequal(native, H5T_NATIVE_USHORT)) { if(super_order != native_order) - H5Tconvert(native, super, 1, &short_val, NULL, H5P_DEFAULT); + H5Tconvert(native, super, 1, &short_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &short_val); } else if(H5Tequal(native, H5T_NATIVE_INT) || H5Tequal(native, H5T_NATIVE_UINT)) { if(super_order != native_order) - H5Tconvert(native, super, 1, &int_val, NULL, H5P_DEFAULT); + H5Tconvert(native, super, 1, &int_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &int_val); } else if(H5Tequal(native, H5T_NATIVE_LONG) || H5Tequal(native, H5T_NATIVE_ULONG)) { if(super_order != native_order) - H5Tconvert(native, super, 1, &long_val, NULL, H5P_DEFAULT); + H5Tconvert(native, super, 1, &long_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &long_val); } else if(H5Tequal(native, H5T_NATIVE_LLONG) || H5Tequal(native, H5T_NATIVE_ULLONG)) { if(super_order != native_order) - H5Tconvert(native, super, 1, &llong_val, NULL, H5P_DEFAULT); + H5Tconvert(native, super, 1, &llong_val, NULL, H5P_DEFAULT); H5Tenum_insert(enum_id, enum_memb_symbol, &llong_val); } - is_enum_memb = 0; + is_enum_memb = 0; if(enum_memb_symbol) free(enum_memb_symbol); } diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c index 3d16db5..ff4347a 100644 --- a/hl/src/H5PT.c +++ b/hl/src/H5PT.c @@ -215,8 +215,8 @@ out: * Modifications: * * John Mainzer -- 4/23/08 - * Added error check on malloc of table, initialized fields - * in table to keep lower level code from choking on bogus + * Added error check on malloc of table, initialized fields + * in table to keep lower level code from choking on bogus * data in error cases. * *------------------------------------------------------------------------- diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c index b9cb73c..6edc244 100644 --- a/hl/src/H5TB.c +++ b/hl/src/H5TB.c @@ -181,7 +181,7 @@ herr_t H5TBmake_table( const char *table_title, /* attach the FIELD_ name attribute */ for ( i = 0; i < nfields; i++) - { + { /* get the member name */ member_name = H5Tget_member_name( mem_type_id,(unsigned) i ); @@ -339,7 +339,7 @@ herr_t H5TBappend_records( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Tclose(mem_type_id); @@ -443,7 +443,7 @@ herr_t H5TBwrite_records( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Tclose(mem_type_id); @@ -607,7 +607,7 @@ herr_t H5TBwrite_fields_name( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(preserve_id); H5Dclose(did); @@ -766,7 +766,7 @@ herr_t H5TBwrite_fields_index( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(preserve_id); H5Dclose(did); @@ -856,7 +856,7 @@ herr_t H5TBread_table( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Tclose(mem_type_id); @@ -1091,7 +1091,7 @@ herr_t H5TBread_fields_name( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Tclose(mem_type_id); @@ -1247,7 +1247,7 @@ herr_t H5TBread_fields_index( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Tclose(read_type_id); @@ -1414,7 +1414,7 @@ out: if (tmp_buf !=NULL ) free( tmp_buf ); - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Tclose(tid); @@ -1574,7 +1574,7 @@ herr_t H5TBinsert_record( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Sclose(sid); @@ -1711,7 +1711,7 @@ herr_t H5TBadd_records_from( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did_1); H5Sclose(sid_1); @@ -2065,7 +2065,7 @@ herr_t H5TBcombine_tables( hid_t loc_id1, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did_1); H5Sclose(sid_1); @@ -2220,7 +2220,7 @@ herr_t H5TBinsert_field( hid_t loc_id, if (inserted ) idx = i - 1; - if (i == position ) + if (i == position ) { /* get the new member size */ new_member_size = H5Tget_size( field_type ); @@ -2502,7 +2502,7 @@ herr_t H5TBinsert_field( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did_1); H5Sclose(sid_1); @@ -2614,7 +2614,7 @@ herr_t H5TBdelete_field( hid_t loc_id, /* check out the field */ for ( i = 0; i < nfields; i++) - { + { /* get the member name */ member_name = H5Tget_member_name( tid_1,(unsigned) i ); @@ -2673,7 +2673,7 @@ herr_t H5TBdelete_field( hid_t loc_id, /* insert the old fields except the one to delete */ for ( i = 0; i < nfields; i++) - { + { /* get the member name */ member_name = H5Tget_member_name( tid_1, (unsigned) i ); @@ -2751,13 +2751,13 @@ herr_t H5TBdelete_field( hid_t loc_id, * we have to read field by field of the old dataset and save it into the new one *------------------------------------------------------------------------- */ - for ( i = 0; i < nfields; i++) + for ( i = 0; i < nfields; i++) { /* get the member name */ member_name = H5Tget_member_name(tid_1, (unsigned)i); /* skip the field to delete */ - if (H5TB_find_field(member_name, field_name) > 0) + if (H5TB_find_field(member_name, field_name) > 0) { free(member_name); continue; @@ -2951,7 +2951,7 @@ herr_t H5TBdelete_field( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did_1); H5Sclose(sid_1); @@ -3101,7 +3101,7 @@ out: * * Comments: * -* Modifications: +* Modifications: * May 08, 2003 * In version 2.0 of Table, the number of records is stored as an * attribute "NROWS" @@ -3178,7 +3178,7 @@ herr_t H5TBget_table_info ( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Sclose(sid); @@ -3284,7 +3284,7 @@ herr_t H5TBget_field_info( hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Tclose(tid); @@ -3455,7 +3455,7 @@ hid_t H5TB_create_type(hid_t loc_id, for ( i = 0; i < nfields; i++) { - if ((fnames[i] = (char*) malloc(sizeof(char)*HLTB_MAX_FIELD_LEN))==NULL) + if ((fnames[i] = (char*) malloc(sizeof(char)*HLTB_MAX_FIELD_LEN))==NULL) { free(fnames); return -1; @@ -3501,7 +3501,7 @@ hid_t H5TB_create_type(hid_t loc_id, /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Tclose(mtype_id); H5Tclose(nmtype_id); diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 36ebcf9..caed2ae 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -380,7 +380,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 49 +LT_VERS_REVISION = 54 LT_VERS_AGE = 0 # This library is our main target. diff --git a/hl/test/H5srcdir_str.h.in b/hl/test/H5srcdir_str.h.in new file mode 100644 index 0000000..d472124 --- /dev/null +++ b/hl/test/H5srcdir_str.h.in @@ -0,0 +1,22 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* If you are reading this file and it has a '.h' suffix, it was automatically + * generated from the '.in' version. Make changes there. + */ + +/* Set the 'srcdir' path from configure time */ +static const char *config_srcdir = "@srcdir@"; + diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index a364c75..4f86240 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -53,8 +53,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/commence.am \ +DIST_COMMON = $(srcdir)/H5srcdir_str.h.in $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am COPYING check_PROGRAMS = $(am__EXEEXT_1) @BUILD_ALL_CONDITIONAL_TRUE@noinst_PROGRAMS = $(am__EXEEXT_2) @@ -66,7 +66,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = H5srcdir_str.h CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = test_lite$(EXEEXT) test_image$(EXEEXT) \ test_table$(EXEEXT) test_ds$(EXEEXT) test_packet$(EXEEXT) @@ -448,6 +448,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +H5srcdir_str.h: $(top_builddir)/config.status $(srcdir)/H5srcdir_str.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c index 573fe20..93bda2b 100644 --- a/hl/test/gen_test_ds.c +++ b/hl/test/gen_test_ds.c @@ -17,11 +17,11 @@ * Purpose: This program is run to generate an HDF5 data file with datasets * that use dimension scales. * - * Compile and run this program to generate the "test_ds_xx.h5" + * Compile and run this program to generate the "test_ds_xx.h5" * file, where xx is "le" on a little-endian machine and "be" * on a big-endian machine. * Move it to the test directory in the current branch. - * The test: test_foreign_scaleattached(const char *fileforeign) + * The test: test_foreign_scaleattached(const char *fileforeign) * in test_ds.c will read them. */ @@ -33,7 +33,7 @@ /* prototypes */ static hid_t open_test_file(const char *fileext); -herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx); +herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx); herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx); herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx); herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx); @@ -79,7 +79,7 @@ int main(int argc , char **argv) int nerrors=0; char filename[65]; - + if (argc < 2) { printf("Usage: gen_test [le | be]\n"); return 1; @@ -102,7 +102,7 @@ int main(int argc , char **argv) nerrors += test_duplicatelong_attachscales(filename) < 0 ? 1 : 0; nerrors += test_samelong_scalenames(filename) < 0 ? 1 : 0; nerrors += test_foreign_scaleattached(filename) < 0 ? 1 : 0; - + if(nerrors) goto error; printf("Dimension scales file generation passed.\n"); @@ -120,7 +120,7 @@ static hid_t open_test_file(const char *fileext) strcpy(filename, FILENAME); strcat(filename, fileext); strcat(filename, FILEEXT); - + return H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT); } @@ -129,7 +129,7 @@ static hid_t open_test_file(const char *fileext) *------------------------------------------------------------------------- */ -herr_t create_long_dataset(hid_t fid, const char *name, const char *dsidx) +herr_t create_long_dataset(hid_t fid, const char *name, const char *dsidx) { int rank = 4; int rankds = 1; @@ -181,11 +181,11 @@ herr_t create_long_dataset(hid_t fid, const char *name, const char *dsidx) return SUCCEED; } -herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx) +herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx) { herr_t ret_value = FAIL; hid_t dsid = -1; - + if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) { if(H5DSis_attached(did, dsid, idx) == 0) { if(H5DSattach_scale(did, dsid, idx) >= 0) { @@ -205,7 +205,7 @@ herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int id return ret_value; } -herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx) +herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx) { herr_t ret_value = FAIL; hid_t dsid = -1; @@ -225,11 +225,11 @@ herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int id return ret_value; } -herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx) +herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx) { herr_t ret_value = FAIL; hid_t dsid = -1; - + if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) { if(H5DSis_attached(did, dsid, idx) == 1) { if(H5DSset_scale(dsid, scalename) >= 0) { @@ -245,7 +245,7 @@ herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *sc return ret_value; } -herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx) +herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx) { herr_t ret_value = FAIL; hid_t dsid = -1; @@ -282,12 +282,12 @@ static int test_long_attachscales(const char *filename) char scalename[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "al"); - + TESTING2("test_long_attachscales"); - + if((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) goto out; - + /* make a dataset */ if(create_long_dataset(fid, dsname, "al") < 0) goto out; @@ -297,22 +297,22 @@ static int test_long_attachscales(const char *filename) strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM2) < 0) goto out; - + strcpy(scalename, DS_4_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM3) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -320,18 +320,18 @@ static int test_long_attachscales(const char *filename) goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -343,12 +343,12 @@ static int test_duplicatelong_attachscales(const char *filename) char scalename[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "al2"); - + TESTING2("test_duplicatelong_attachscales"); - + if((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) goto out; - + /* make a dataset 2 */ if(create_long_dataset(fid, dsname, "al2") < 0) goto out; @@ -358,22 +358,22 @@ static int test_duplicatelong_attachscales(const char *filename) strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM2) < 0) goto out; - + strcpy(scalename, DS_4_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM3) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -381,18 +381,18 @@ static int test_duplicatelong_attachscales(const char *filename) goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -404,10 +404,10 @@ static int test_long_scalenames(const char *filename) { char name[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "al"); - + if((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) goto out; - + TESTING2("set long scale/cmp scale name"); if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) { strcpy(scalename, DS_1_NAME); @@ -419,7 +419,7 @@ static int test_long_scalenames(const char *filename) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "al"); strcpy(name, SCALE_2_NAME); @@ -429,7 +429,7 @@ static int test_long_scalenames(const char *filename) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "al"); strcpy(name, SCALE_3_NAME); @@ -439,7 +439,7 @@ static int test_long_scalenames(const char *filename) { if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0) goto out; - + strcpy(scalename, DS_4_NAME); strcat(scalename, "al"); strcpy(name, SCALE_4_NAME); @@ -449,7 +449,7 @@ static int test_long_scalenames(const char *filename) { if(test_cmp_scalename(fid, did, scalename, name, DIM3) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -457,18 +457,18 @@ static int test_long_scalenames(const char *filename) { goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -481,10 +481,10 @@ static int test_samelong_scalenames(const char *filename) { strcpy(dsname, DATASET_NAME); strcat(dsname, "al2"); - + if((fid = open_test_file(filename)) < 0) goto out; - + TESTING2("set same long scale/cmp scale name"); if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) { strcpy(scalename, DS_1_NAME); @@ -496,7 +496,7 @@ static int test_samelong_scalenames(const char *filename) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "al"); strcpy(name, DS_2_NAME); @@ -506,7 +506,7 @@ static int test_samelong_scalenames(const char *filename) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "al"); strcpy(name, DS_3_NAME); @@ -516,7 +516,7 @@ static int test_samelong_scalenames(const char *filename) { if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0) goto out; - + strcpy(scalename, DS_4_NAME); strcat(scalename, "al"); strcpy(name, DS_4_NAME); @@ -526,7 +526,7 @@ static int test_samelong_scalenames(const char *filename) { if(test_cmp_scalename(fid, did, scalename, name, DIM3) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -534,18 +534,18 @@ static int test_samelong_scalenames(const char *filename) { goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -555,7 +555,7 @@ static int test_foreign_scaleattached(const char *filename) hid_t fid = -1; hid_t did = -1; hid_t dsid = -1; - + TESTING2("test_foreign_scaleattached"); if((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) @@ -565,7 +565,7 @@ static int test_foreign_scaleattached(const char *filename) if((dsid = H5Dopen2(fid, "/ds_4_al", H5P_DEFAULT)) >= 0) { if(H5DSis_attached(did, dsid, 3) == 1) { ret_value = SUCCEED; - } + } if(H5Dclose(dsid) < 0) goto out; } @@ -574,22 +574,22 @@ static int test_foreign_scaleattached(const char *filename) } else goto out; - + if(ret_value == FAIL) goto out; - + PASSED(); - + H5Fclose(fid); return 0; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 32622ed..d1705ec 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -16,6 +16,7 @@ #include #include #include "h5hltest.h" +#include "H5srcdir.h" #include "H5DSpublic.h" #include "H5LTpublic.h" #include "H5IMpublic.h" @@ -32,9 +33,9 @@ static int create_test_file(const char *fileext); static int open_test_file(const char *fileext); herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims); herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims); -herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims); -herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int fulldims); -herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims); +herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims); +herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int fulldims); +herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims); herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf); herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf); herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf, char *s3_wbuf); @@ -168,8 +169,8 @@ int main(void) nerrors += test_samelong_scalenames("2") < 0 ? 1 : 0; nerrors += test_foreign_scaleattached(FOREIGN_FILE1) < 0 ? 1 : 0; nerrors += test_foreign_scaleattached(FOREIGN_FILE2) < 0 ? 1 : 0; - -/* the following tests have not been rewritten to match those above */ + +/* the following tests have not been rewritten to match those above */ nerrors += test_simple() < 0 ?1:0; nerrors += test_errors() < 0 ?1:0; nerrors += test_errors2() < 0 ?1:0; @@ -177,7 +178,7 @@ int main(void) nerrors += test_iterators() < 0 ?1:0; nerrors += test_types() < 0 ?1:0; nerrors += test_data() < 0 ?1:0; - + if(nerrors) goto error; printf("All dimension scales tests passed.\n"); @@ -224,7 +225,7 @@ static hid_t open_test_file(const char *fileext) strcpy(filename, FILENAME); strcat(filename, fileext); strcat(filename, FILEEXT); - + return H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT); } @@ -232,7 +233,7 @@ static hid_t open_test_file(const char *fileext) * create "data" dataset *------------------------------------------------------------------------- */ -herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims) +herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims) { int rank = 3; int rankds = 1; @@ -261,11 +262,11 @@ herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims) /* make a DS dataset for the first dimension */ if(create_DS1_char_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0) return FAIL; - + /* make a DS dataset for the second dimension */ if(create_DS2_char_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0) return FAIL; - + /* make a DS dataset for the third dimension */ if(create_DS3_char_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, NULL, NULL, NULL) < 0) return FAIL; @@ -273,10 +274,10 @@ herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims) else { if(create_DS1_char_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0) return FAIL; - + if(create_DS2_char_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0) return FAIL; - + if(create_DS3_char_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, s31_wbuf, s32_wbuf, s33_wbuf) < 0) return FAIL; } @@ -286,7 +287,7 @@ herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims) return SUCCEED; } -herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims) +herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims) { int rank = 3; int rankds = 1; @@ -316,11 +317,11 @@ herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims) /* make a DS dataset for the first dimension */ if(create_DS1_short_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0) return FAIL; - + /* make a DS dataset for the second dimension */ if(create_DS2_short_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0) return FAIL; - + /* make a DS dataset for the third dimension */ if(create_DS3_short_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, NULL, NULL, NULL) < 0) return FAIL; @@ -328,10 +329,10 @@ herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims) else { if(create_DS1_short_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0) return FAIL; - + if(create_DS2_short_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0) return FAIL; - + if(create_DS3_short_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, s31_wbuf, s32_wbuf, s33_wbuf) < 0) return FAIL; } @@ -341,7 +342,7 @@ herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims) return SUCCEED; } -herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims) +herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims) { int rank = RANK; int rankds = 1; @@ -365,7 +366,7 @@ herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims) /* make a DS dataset for the first dimension */ if(create_DS1_int_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0) return FAIL; - + /* make a DS dataset for the second dimension */ if(create_DS2_int_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0) return FAIL; @@ -373,7 +374,7 @@ herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims) else { if(create_DS1_int_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0) return FAIL; - + if(create_DS2_int_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0) return FAIL; } @@ -383,7 +384,7 @@ herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims) return SUCCEED; } -herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int fulldims) +herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int fulldims) { int rank = 4; int rankds = 1; @@ -420,15 +421,15 @@ herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int /* make a DS dataset for the first dimension */ if(create_DS1_long_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0) return FAIL; - + /* make a DS dataset for the second dimension */ if(create_DS2_long_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0) return FAIL; - + /* make a DS dataset for the third dimension */ if(create_DS3_long_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, NULL, NULL, NULL) < 0) return FAIL; - + /* make a DS dataset for the fourth dimension */ if(create_DS4_long_datasets(fid, dsidx, rankds, s4_dim, s4_wbuf, NULL, NULL, NULL, NULL) < 0) return FAIL; @@ -436,13 +437,13 @@ herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int else { if(create_DS1_long_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0) return FAIL; - + if(create_DS2_long_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0) return FAIL; - + if(create_DS3_long_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, s31_wbuf, s32_wbuf, s33_wbuf) < 0) return FAIL; - + if(create_DS4_long_datasets(fid, dsidx, rankds, s4_dim, s4_wbuf, s41_wbuf, s42_wbuf, s43_wbuf, s44_wbuf) < 0) return FAIL; } @@ -452,7 +453,7 @@ herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int return SUCCEED; } -herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims) +herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims) { int rank = RANK; int rankds = 1; @@ -476,7 +477,7 @@ herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims) /* make a DS dataset for the first dimension */ if(create_DS1_float_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0) return FAIL; - + /* make a DS dataset for the second dimension */ if(create_DS2_float_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0) return FAIL; @@ -484,7 +485,7 @@ herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims) else { if(create_DS1_float_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0) return FAIL; - + if(create_DS2_float_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0) return FAIL; } @@ -498,7 +499,7 @@ herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims) * create 2 dimension scales datasets for first dimension *------------------------------------------------------------------------- */ -herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf) +herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf) { char name[32]; @@ -523,10 +524,10 @@ herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_ * create 3 dimension scales datasets for second dimension *------------------------------------------------------------------------- */ -herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf) +herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf) { char name[32]; - + strcpy(name, DS_2_NAME); strcat(name, dsidx); /* make a DS dataset for the second dimension */ @@ -556,7 +557,7 @@ herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_ * create 1 dimension scales datasets for third dimension of dataset *------------------------------------------------------------------------- */ -herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf, char *s3_wbuf) +herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf, char *s3_wbuf) { char name[32]; @@ -597,7 +598,7 @@ herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_ * create 2 dimension scales datasets for first dimension *------------------------------------------------------------------------- */ -herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf) +herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf) { char name[32]; @@ -622,10 +623,10 @@ herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize * create 3 dimension scales datasets for second dimension *------------------------------------------------------------------------- */ -herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf) +herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf) { char name[32]; - + strcpy(name, DS_2_NAME); strcat(name, dsidx); @@ -656,7 +657,7 @@ herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize * create 1 dimension scales datasets for third dimension of dataset *------------------------------------------------------------------------- */ -herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf, short *s3_wbuf) +herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf, short *s3_wbuf) { char name[32]; @@ -698,7 +699,7 @@ herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize * create 2 dimension scales datasets for first dimension *------------------------------------------------------------------------- */ -herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf) +herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf) { char name[32]; @@ -724,10 +725,10 @@ herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t * create 3 dimension scales datasets for second dimension *------------------------------------------------------------------------- */ -herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf) +herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf) { char name[32]; - + strcpy(name, DS_2_NAME); strcat(name, dsidx); @@ -758,7 +759,7 @@ herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t * create 1 dimension scales datasets for third dimension of dataset *------------------------------------------------------------------------- */ -herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf, int *s3_wbuf) +herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf, int *s3_wbuf) { char name[32]; @@ -800,7 +801,7 @@ herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t * create 2 dimension scales datasets for first dimension *------------------------------------------------------------------------- */ -herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf) +herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf) { char name[32]; @@ -826,10 +827,10 @@ herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_ * create 3 dimension scales datasets for second dimension *------------------------------------------------------------------------- */ -herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf) +herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf) { char name[32]; - + strcpy(name, DS_2_NAME); strcat(name, dsidx); @@ -860,7 +861,7 @@ herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_ * create 3 dimension scales datasets for third dimension of dataset *------------------------------------------------------------------------- */ -herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf) +herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf) { char name[32]; @@ -902,7 +903,7 @@ herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_ * create 4 dimension scales datasets for third dimension of dataset *------------------------------------------------------------------------- */ -herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf, long *s4_wbuf) +herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf, long *s4_wbuf) { char name[32]; @@ -952,7 +953,7 @@ herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_ * create 2 dimension scales datasets for first dimension *------------------------------------------------------------------------- */ -herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf) +herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf) { char name[32]; @@ -978,10 +979,10 @@ herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize * create 3 dimension scales datasets for second dimension *------------------------------------------------------------------------- */ -herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf) +herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf) { char name[32]; - + strcpy(name, DS_2_NAME); strcat(name, dsidx); @@ -1012,7 +1013,7 @@ herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize * create 3 dimension scales datasets for third dimension of dataset *------------------------------------------------------------------------- */ -herr_t create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf, float *s3_wbuf) +herr_t create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf, float *s3_wbuf) { char name[32]; @@ -1050,11 +1051,11 @@ herr_t create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize return SUCCEED; } -herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx) +herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx) { herr_t ret_value = FAIL; hid_t dsid = -1; - + if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) { if(H5DSis_attached(did, dsid, idx) == 0) { if(H5DSattach_scale(did, dsid, idx) >= 0) { @@ -1074,7 +1075,7 @@ herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int id return ret_value; } -herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx) +herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx) { herr_t ret_value = FAIL; hid_t dsid = -1; @@ -1094,11 +1095,11 @@ herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int id return ret_value; } -herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx) +herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx) { herr_t ret_value = FAIL; hid_t dsid = -1; - + if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) { if(H5DSis_attached(did, dsid, idx) == 1) { if(H5DSset_scale(dsid, scalename) >= 0) { @@ -1114,7 +1115,7 @@ herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *sc return ret_value; } -herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx) +herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx) { herr_t ret_value = FAIL; hid_t dsid = -1; @@ -1151,12 +1152,12 @@ static int test_char_attachscales(const char *fileext) char scalename[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "ac"); - + TESTING2("test_char_attachscales"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + /* make a dataset */ if(create_char_dataset(fid, "ac", 0) < 0) goto out; @@ -1166,17 +1167,17 @@ static int test_char_attachscales(const char *fileext) strcat(scalename, "ac"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "ac"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "ac"); if(test_attach_scale(fid, did, scalename, DIM2) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1184,18 +1185,18 @@ static int test_char_attachscales(const char *fileext) goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1207,12 +1208,12 @@ static int test_short_attachscales(const char *fileext) char scalename[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "as"); - + TESTING2("test_short_attachscales"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + /* make a dataset */ if(create_short_dataset(fid, "as", 1) < 0) goto out; @@ -1222,47 +1223,47 @@ static int test_short_attachscales(const char *fileext) strcat(scalename, "as"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_11_NAME); strcat(scalename, "as"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "as"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_21_NAME); strcat(scalename, "as"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_22_NAME); strcat(scalename, "as"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "as"); if(test_attach_scale(fid, did, scalename, DIM2) < 0) goto out; - + strcpy(scalename, DS_31_NAME); strcat(scalename, "as"); if(test_attach_scale(fid, did, scalename, DIM2) < 0) goto out; - + strcpy(scalename, DS_32_NAME); strcat(scalename, "as"); if(test_attach_scale(fid, did, scalename, DIM2) < 0) goto out; - + strcpy(scalename, DS_33_NAME); strcat(scalename, "as"); if(test_attach_scale(fid, did, scalename, DIM2) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1270,18 +1271,18 @@ static int test_short_attachscales(const char *fileext) goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1293,12 +1294,12 @@ static int test_int_attachscales(const char *fileext) char scalename[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "a"); - + TESTING2("test_int_attachscales"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + /* make a dataset */ if(create_int_dataset(fid, "a", 1) < 0) goto out; @@ -1308,27 +1309,27 @@ static int test_int_attachscales(const char *fileext) strcat(scalename, "a"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_11_NAME); strcat(scalename, "a"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "a"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_21_NAME); strcat(scalename, "a"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_22_NAME); strcat(scalename, "a"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1336,18 +1337,18 @@ static int test_int_attachscales(const char *fileext) goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1359,12 +1360,12 @@ static int test_long_attachscales(const char *fileext) char scalename[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "al"); - + TESTING2("test_long_attachscales"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + /* make a dataset */ if(create_long_dataset(fid, dsname, "al", 0) < 0) goto out; @@ -1374,22 +1375,22 @@ static int test_long_attachscales(const char *fileext) strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM2) < 0) goto out; - + strcpy(scalename, DS_4_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM3) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1397,18 +1398,18 @@ static int test_long_attachscales(const char *fileext) goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1420,12 +1421,12 @@ static int test_duplicatelong_attachscales(const char *fileext) char scalename[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "al2"); - + TESTING2("test_duplicatelong_attachscales"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + /* make a dataset 2 */ if(create_long_dataset(fid, dsname, "al2", 0) < 0) goto out; @@ -1435,22 +1436,22 @@ static int test_duplicatelong_attachscales(const char *fileext) strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM2) < 0) goto out; - + strcpy(scalename, DS_4_NAME); strcat(scalename, "al"); if(test_attach_scale(fid, did, scalename, DIM3) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1458,18 +1459,18 @@ static int test_duplicatelong_attachscales(const char *fileext) goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1481,12 +1482,12 @@ static int test_float_attachscales(const char *fileext) char scalename[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "af"); - + TESTING2("test_float_attachscales"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + /* make a dataset */ if(create_float_dataset(fid, "af", 1) < 0) goto out; @@ -1496,27 +1497,27 @@ static int test_float_attachscales(const char *fileext) strcat(scalename, "af"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_11_NAME); strcat(scalename, "af"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "af"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_21_NAME); strcat(scalename, "af"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + strcpy(scalename, DS_22_NAME); strcat(scalename, "af"); if(test_attach_scale(fid, did, scalename, DIM1) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1524,18 +1525,18 @@ static int test_float_attachscales(const char *fileext) goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1548,25 +1549,25 @@ static int test_numberofscales(const char *fileext) char scalename[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "a"); - + TESTING2("test_numberofscales"); - + if((fid = open_test_file(fileext)) < 0) goto out; if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) { if((nscales = H5DSget_num_scales(did, 0)) < 0) goto out; - + if(nscales != 2) goto out; - + if((nscales = H5DSget_num_scales(did, 1)) < 0) goto out; - + if(nscales != 3) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1586,19 +1587,19 @@ static int test_numberofscales(const char *fileext) strcat(scalename, "b"); if(test_attach_scale(fid, did, scalename, DIM0) < 0) goto out; - + if((nscales = H5DSget_num_scales(did, 0)) < 0) goto out; - + if(nscales != 1) goto out; - + if((nscales = H5DSget_num_scales(did, 1)) < 0) goto out; - + if(nscales != 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1606,18 +1607,18 @@ static int test_numberofscales(const char *fileext) goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1629,10 +1630,10 @@ static int test_char_scalenames(const char *fileext) { char name[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "ac"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + TESTING2("set char scale/cmp scale name"); if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) { strcpy(scalename, DS_1_NAME); @@ -1644,7 +1645,7 @@ static int test_char_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "ac"); strcpy(name, SCALE_2_NAME); @@ -1654,7 +1655,7 @@ static int test_char_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "ac"); strcpy(name, SCALE_3_NAME); @@ -1664,7 +1665,7 @@ static int test_char_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1672,18 +1673,18 @@ static int test_char_scalenames(const char *fileext) { goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1695,10 +1696,10 @@ static int test_short_scalenames(const char *fileext) { char name[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "as"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + TESTING2("set short scale/cmp scale name"); if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) { strcpy(scalename, DS_1_NAME); @@ -1710,7 +1711,7 @@ static int test_short_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_11_NAME); strcat(scalename, "as"); strcpy(name, SCALE_11_NAME); @@ -1720,7 +1721,7 @@ static int test_short_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "as"); strcpy(name, SCALE_2_NAME); @@ -1730,7 +1731,7 @@ static int test_short_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_21_NAME); strcat(scalename, "as"); strcpy(name, SCALE_21_NAME); @@ -1740,7 +1741,7 @@ static int test_short_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_22_NAME); strcat(scalename, "as"); strcpy(name, SCALE_22_NAME); @@ -1750,7 +1751,7 @@ static int test_short_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "as"); strcpy(name, SCALE_3_NAME); @@ -1760,7 +1761,7 @@ static int test_short_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0) goto out; - + strcpy(scalename, DS_31_NAME); strcat(scalename, "as"); strcpy(name, SCALE_31_NAME); @@ -1770,7 +1771,7 @@ static int test_short_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0) goto out; - + strcpy(scalename, DS_32_NAME); strcat(scalename, "as"); strcpy(name, SCALE_32_NAME); @@ -1780,7 +1781,7 @@ static int test_short_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0) goto out; - + strcpy(scalename, DS_33_NAME); strcat(scalename, "as"); strcpy(name, SCALE_33_NAME); @@ -1790,7 +1791,7 @@ static int test_short_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1798,18 +1799,18 @@ static int test_short_scalenames(const char *fileext) { goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1821,10 +1822,10 @@ static int test_int_scalenames(const char *fileext) { char name[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "a"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + TESTING2("set int scale/cmp scale name"); if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) { strcpy(scalename, DS_1_NAME); @@ -1836,7 +1837,7 @@ static int test_int_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_11_NAME); strcat(scalename, "a"); strcpy(name, SCALE_11_NAME); @@ -1846,7 +1847,7 @@ static int test_int_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "a"); strcpy(name, SCALE_2_NAME); @@ -1856,7 +1857,7 @@ static int test_int_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_21_NAME); strcat(scalename, "a"); strcpy(name, SCALE_21_NAME); @@ -1866,7 +1867,7 @@ static int test_int_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_22_NAME); strcat(scalename, "a"); strcpy(name, SCALE_22_NAME); @@ -1884,18 +1885,18 @@ static int test_int_scalenames(const char *fileext) { goto out; PASSED(); - + H5Fclose(fid); return 0; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1907,10 +1908,10 @@ static int test_long_scalenames(const char *fileext) { char name[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "al"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + TESTING2("set long scale/cmp scale name"); if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) { strcpy(scalename, DS_1_NAME); @@ -1922,7 +1923,7 @@ static int test_long_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "al"); strcpy(name, SCALE_2_NAME); @@ -1932,7 +1933,7 @@ static int test_long_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "al"); strcpy(name, SCALE_3_NAME); @@ -1942,7 +1943,7 @@ static int test_long_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0) goto out; - + strcpy(scalename, DS_4_NAME); strcat(scalename, "al"); strcpy(name, SCALE_4_NAME); @@ -1952,7 +1953,7 @@ static int test_long_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM3) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -1960,18 +1961,18 @@ static int test_long_scalenames(const char *fileext) { goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -1983,10 +1984,10 @@ static int test_samelong_scalenames(const char *fileext) { char name[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "al2"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + TESTING2("set same long scale/cmp scale name"); if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) { strcpy(scalename, DS_1_NAME); @@ -1998,7 +1999,7 @@ static int test_samelong_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "al"); strcpy(name, DS_2_NAME); @@ -2008,7 +2009,7 @@ static int test_samelong_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_3_NAME); strcat(scalename, "al"); strcpy(name, DS_3_NAME); @@ -2018,7 +2019,7 @@ static int test_samelong_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0) goto out; - + strcpy(scalename, DS_4_NAME); strcat(scalename, "al"); strcpy(name, DS_4_NAME); @@ -2028,7 +2029,7 @@ static int test_samelong_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM3) < 0) goto out; - + if(H5Dclose(did) < 0) goto out; } @@ -2036,18 +2037,18 @@ static int test_samelong_scalenames(const char *fileext) { goto out; PASSED(); - + H5Fclose(fid); return SUCCEED; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -2059,10 +2060,10 @@ static int test_float_scalenames(const char *fileext) { char name[32]; strcpy(dsname, DATASET_NAME); strcat(dsname, "af"); - + if((fid = open_test_file(fileext)) < 0) goto out; - + TESTING2("set float scale/cmp scale name"); if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) { strcpy(scalename, DS_1_NAME); @@ -2074,7 +2075,7 @@ static int test_float_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_11_NAME); strcat(scalename, "af"); strcpy(name, SCALE_11_NAME); @@ -2084,7 +2085,7 @@ static int test_float_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0) goto out; - + strcpy(scalename, DS_2_NAME); strcat(scalename, "af"); strcpy(name, SCALE_2_NAME); @@ -2094,7 +2095,7 @@ static int test_float_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_21_NAME); strcat(scalename, "af"); strcpy(name, SCALE_21_NAME); @@ -2104,7 +2105,7 @@ static int test_float_scalenames(const char *fileext) { if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0) goto out; - + strcpy(scalename, DS_22_NAME); strcat(scalename, "af"); strcpy(name, SCALE_22_NAME); @@ -2122,18 +2123,18 @@ static int test_float_scalenames(const char *fileext) { goto out; PASSED(); - + H5Fclose(fid); return 0; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -2143,16 +2144,8 @@ static int test_foreign_scaleattached(const char *fileforeign) hid_t fid = -1; hid_t did = -1; hid_t dsid = -1; - char *srcdir = getenv("srcdir"); /* the source directory */ - char filename[512]=""; /* buffer to hold name of existing file */ + const char *filename = H5_get_srcdir_filename(fileforeign); - /* compose the name of the file to open, using the srcdir, if appropriate */ - if (srcdir) { - strcpy(filename,srcdir); - strcat(filename,"/"); - } - strcat(filename, fileforeign); - TESTING2("test_foreign_scaleattached"); if((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) @@ -2162,7 +2155,7 @@ static int test_foreign_scaleattached(const char *fileforeign) if((dsid = H5Dopen2(fid, "/ds_4_al", H5P_DEFAULT)) >= 0) { if(H5DSis_attached(did, dsid, 3) == 1) { ret_value = SUCCEED; - } + } if(H5Dclose(dsid) < 0) goto out; } @@ -2171,23 +2164,23 @@ static int test_foreign_scaleattached(const char *fileforeign) } else goto out; - + if(ret_value == FAIL) goto out; - + PASSED(); - + H5Fclose(fid); return 0; - + out: H5E_BEGIN_TRY { H5Dclose(did); H5Fclose(fid); } H5E_END_TRY; - + H5_FAILED(); - + return FAIL; } @@ -2226,7 +2219,7 @@ static int test_simple(void) char *name_out=NULL; char snames[3]; int i, j; - + printf("Testing API functions\n"); /*------------------------------------------------------------------------- @@ -2391,7 +2384,7 @@ static int test_simple(void) if(H5Dclose(did) < 0) goto out; - + /*------------------------------------------------------------------------- * H5DSdetach_scale @@ -2984,7 +2977,7 @@ static int test_simple(void) PASSED(); - + /*------------------------------------------------------------------------- * H5DSset_label, H5DSget_label *------------------------------------------------------------------------- @@ -3406,7 +3399,7 @@ static int test_simple(void) /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Dclose(dsid); @@ -3544,7 +3537,7 @@ static herr_t read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Sclose(sid); H5Tclose(tid); @@ -3634,7 +3627,7 @@ static herr_t match_dim_scale(hid_t did, unsigned dim, hid_t dsid, void *visitor return ret; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Sclose(sid); } H5E_END_TRY; @@ -3645,7 +3638,7 @@ out: /*------------------------------------------------------------------------- * Function: op_continue * - * Purpose: example operator function used by H5DSiterate_scales that continues + * Purpose: example operator function used by H5DSiterate_scales that continues * iteration and increments visitor_data (Note: int*) * * Return: @@ -3678,7 +3671,7 @@ static herr_t op_continue(hid_t dset, unsigned dim, hid_t scale_id, void *visito /*------------------------------------------------------------------------- * Function: op_stop * - * Purpose: example operator function used by H5DSiterate_scales that stops + * Purpose: example operator function used by H5DSiterate_scales that stops * iteration and increments visitor_data (Note: int*) * * Return: @@ -3698,7 +3691,7 @@ static herr_t op_stop(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_da dset = dset; dim = dim; scale_id = scale_id; - + if ( visitor_data != NULL ) { (*(int *)visitor_data)++; @@ -4073,7 +4066,7 @@ static int test_errors(void) /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Sclose(sid); H5Sclose(sidds); @@ -4265,7 +4258,7 @@ static int test_iterators(void) /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Gclose(gid); H5Dclose(did); @@ -4474,7 +4467,7 @@ static int test_rank(void) /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Dclose(dsid); @@ -4654,7 +4647,7 @@ static int test_types(void) /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Dclose(dsid); @@ -4734,7 +4727,7 @@ static int test_data(void) goto out; if(H5Pset_fill_value(dcpl, H5T_NATIVE_FLOAT, &fill) < 0) goto out; - + /* read ASCII bathymetry data and dimensions to create dataset */ if(read_data("dsdata.txt",2,dims,&vals) < 0) goto out; @@ -4813,7 +4806,7 @@ static int test_data(void) /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Dclose(dsid); @@ -4845,9 +4838,9 @@ out: *------------------------------------------------------------------------- */ -static int read_data( const char* fname, - int ndims, - hsize_t *dims, +static int read_data( const char* fname, + int ndims, + hsize_t *dims, float **buf ) { int i, n; @@ -4856,19 +4849,9 @@ static int read_data( const char* fname, size_t nelms; FILE *f; float val; - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]; /* buffer to hold name of existing data file */ + const char *data_file = H5_get_srcdir_filename(fname); - strcpy(data_file, ""); - /* compose the name of the file to open, using the srcdir, if appropriate */ - if(srcdir) - { - strcpy(data_file, srcdir); - strcat(data_file, "/"); - } /* read first data file */ - strcat(data_file,fname); - f = fopen(data_file, "r"); if( f == NULL ) { @@ -4922,7 +4905,7 @@ static int test_errors2(void) int scale_idx; /* scale index */ int nscales; /* number of scales in DIM */ int count; /* visitor data */ - + printf("Testing parameter errors\n"); /*------------------------------------------------------------------------- @@ -4987,7 +4970,7 @@ static int test_errors2(void) if (H5Dclose(dsid) < 0) goto out; if (H5Dclose(did) < 0) - goto out; + goto out; PASSED(); @@ -5004,15 +4987,15 @@ static int test_errors2(void) if (H5DSset_label(did,0,"label") < 0) goto out; if (H5DSget_label(did,2,lbuf,sizeof(lbuf)) == SUCCEED) - goto out; + goto out; if ((label_len=H5DSget_label(did,0,NULL,0)) < 0) - goto out; + goto out; if ( label_len != strlen("label") ) goto out; if (H5DSget_label(did,0,lbuf,sizeof(lbuf)) < 0) goto out; if (H5Dclose(did) < 0) - goto out; + goto out; PASSED(); @@ -5049,10 +5032,10 @@ static int test_errors2(void) if (H5DSiterate_scales(did,2,NULL,op_continue,NULL)== SUCCEED) goto out; /* invalid DS_IDX */ - scale_idx = 2; + scale_idx = 2; if (H5DSiterate_scales(did,0,&scale_idx,op_continue,NULL)== SUCCEED) goto out; - + /* continue iteration */ scale_idx = 0; count = 0; @@ -5075,9 +5058,9 @@ static int test_errors2(void) goto out; } - + if (H5Dclose(did) < 0) - goto out; + goto out; /*------------------------------------------------------------------------- * close @@ -5092,7 +5075,7 @@ static int test_errors2(void) /* error zone */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Dclose(dsid); diff --git a/hl/test/test_image.c b/hl/test/test_image.c index 426ae1d..1332841 100644 --- a/hl/test/test_image.c +++ b/hl/test/test_image.c @@ -16,6 +16,7 @@ #include #include #include "h5hltest.h" +#include "H5srcdir.h" #include "H5LTpublic.h" #include "H5IMpublic.h" #include "pal_rgb.h" @@ -510,8 +511,7 @@ static int test_generate(void) int imax, jmax, kmax; float valex, xmin, xmax, value; FILE *f; - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing data file */ + const char *data_file = H5_get_srcdir_filename(DATA_FILE4); int i; /* create a file using default properties */ @@ -521,17 +521,6 @@ static int test_generate(void) printf("Testing read and process data and make indexed images\n"); /*------------------------------------------------------------------------- - * compose the name of the file to open, using the srcdir, if appropriate - *------------------------------------------------------------------------- - */ - if ( srcdir ) - { - strcpy(data_file, srcdir); - strcat(data_file, "/"); - } - strcat(data_file,DATA_FILE4); - - /*------------------------------------------------------------------------- * read data; the file data format is described below *------------------------------------------------------------------------- */ @@ -723,20 +712,7 @@ static int read_data( const char* fname, /*IN*/ char str[20]; FILE *f; int w, h; - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing data file */ - - /*------------------------------------------------------------------------- - * compose the name of the file to open, using "srcdir", if appropriate - *------------------------------------------------------------------------- - */ - strcpy(data_file, ""); - if (srcdir) - { - strcpy(data_file, srcdir); - strcat(data_file, "/"); - } - strcat(data_file,fname); + const char *data_file = H5_get_srcdir_filename(fname); /*------------------------------------------------------------------------- * read @@ -811,20 +787,7 @@ static int read_palette(const char* fname, unsigned int green; unsigned int blue; unsigned nentries; - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]; /* buffer to hold name of existing data file */ - - /*------------------------------------------------------------------------- - * compose the name of the file to open, using "srcdir", if appropriate - *------------------------------------------------------------------------- - */ - strcpy(data_file, ""); - if (srcdir) - { - strcpy(data_file, srcdir); - strcat(data_file, "/"); - } - strcat(data_file,fname); + const char *data_file = H5_get_srcdir_filename(fname); /* ensure the given palette is valid */ if (!palette) diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 95869af..2b36eb6 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -16,6 +16,7 @@ #include #include #include "h5hltest.h" +#include "H5srcdir.h" #include "H5LTpublic.h" #define FILE_NAME "test_lite1.h5" @@ -1537,18 +1538,10 @@ static int test_complicated_compound(void) char *line = NULL; FILE *fp = NULL; size_t size = 1024; - char *srcdir = getenv("srcdir"); /* the source directory */ - char filename[1024]=""; + const char *filename = H5_get_srcdir_filename(INPUT_FILE); TESTING3(" text for complicated compound types"); - /* compose the name of the file to open, using the srcdir, if appropriate */ - if(srcdir) { - strcpy(filename, srcdir); - strcat(filename, "/"); - } - strcat(filename, INPUT_FILE); - /* Open input file */ fp = fopen(filename, "r"); if(fp == NULL) { @@ -1605,7 +1598,7 @@ out: free(line); if(fp) fclose(fp); - + H5_FAILED(); return -1; } diff --git a/hl/test/test_table.c b/hl/test/test_table.c index 433d49f..0fc4c84 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -16,6 +16,7 @@ #include #include #include "h5hltest.h" +#include "H5srcdir.h" #include "H5TBpublic.h" #define TEST_FILE_BE "test_table_be.hdf5" @@ -123,19 +124,10 @@ static hid_t h5file_open(const char *fname, unsigned flags) { hid_t fid; /* identifier for the file */ - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing file */ - - /* compose the name of the file to open, using the srcdir, if appropriate */ - if (srcdir) - { - strcpy(data_file,srcdir); - strcat(data_file,"/"); - } - strcat(data_file,fname); + const char *data_file = H5_get_srcdir_filename(fname); /* open */ - if ((fid = H5Fopen(data_file,flags,H5P_DEFAULT))<0) + if ((fid = H5Fopen(data_file,flags,H5P_DEFAULT))<0) { fprintf(stderr,"Error: Cannot open file <%s>\n",data_file ); exit(1); @@ -154,7 +146,7 @@ static int cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf ) rbuf[i].lati != wbuf[j].lati || rbuf[i].longi != wbuf[j].longi || rbuf[i].pressure != wbuf[j].pressure || - rbuf[i].temperature != wbuf[j].temperature ) + rbuf[i].temperature != wbuf[j].temperature ) { fprintf(stderr,"read and write buffers have differences\n"); fprintf(stderr,"%s %ld %f %f %d\n", @@ -459,7 +451,7 @@ static int test_table(hid_t fid, int do_write) * data= 0 1 2 3 4 5 6 7 *------------------------------------------------------------------------- */ - wstart=0; + wstart=0; wrecords=8; if (H5TBwrite_records(fid,"table2",wstart,wrecords,type_size_mem,field_offset, field_size,wbuf)<0) diff --git a/perform/perf_meta.c b/perform/perf_meta.c index 279c8de..b3966d6 100644 --- a/perform/perf_meta.c +++ b/perform/perf_meta.c @@ -20,8 +20,10 @@ * Purpose: Tests performance of metadata */ -#include "h5test.h" +#include +#include #include +#include "h5test.h" #ifdef H5_HAVE_PARALLEL #define MAINPROCESS (!mpi_rank) /* define process 0 as main process */ diff --git a/perform/sio_perf.h b/perform/sio_perf.h index 2417b6f..bd05cfe 100644 --- a/perform/sio_perf.h +++ b/perform/sio_perf.h @@ -18,7 +18,6 @@ #include "sio_timer.h" #ifndef STANDALONE #include "H5private.h" -#include "h5test.h" #include "h5tools_utils.h" #else #include "sio_standalone.h" diff --git a/release_docs/INSTALL_Cygwin.txt b/release_docs/INSTALL_Cygwin.txt index 20da44a..36e7cd7 100644 --- a/release_docs/INSTALL_Cygwin.txt +++ b/release_docs/INSTALL_Cygwin.txt @@ -2,6 +2,8 @@ HDF5 Build and Install Instructions for Cygwin ************************************************************************ +Needs Updating to latest versions + Preconditions: -------------- diff --git a/release_docs/INSTALL_Windows.txt b/release_docs/INSTALL_Windows.txt index a24e1d5..de31747 100644 --- a/release_docs/INSTALL_Windows.txt +++ b/release_docs/INSTALL_Windows.txt @@ -35,11 +35,10 @@ Contents: Preconditions: 1. Installed Microsoft Visual Studio. This document is written for Visual - Studio 2005, although we also support Visual Studio 2008 as well. Most - of the instructions are the same. We no longer support building HDF5 - using Microsoft Visual Studio .NET 2003. + Studio 2008. We no longer support building HDF5 + using Microsoft Visual Studio .NET 2003, or Visual Studio 2005. - 2. (Optional) Installed Intel Compiler 9.1 or 10.1 if you want to build HDF5 + 2. (Optional) Installed Intel Compiler 10.1 or 11.1 if you want to build HDF5 Fortran libraries. 3. Install Winzip or 7-zip for extracting source tarball. @@ -67,24 +66,24 @@ Preconditions: c:\ (any drive) MyHDFstuff\ (any folder name) - 5. Download the hdf5-1.8.x source code package and use 7zip or WinZip to + 5. Download the hdf5-1.9.x source code package and use 7zip or WinZip to extract the HDF5 package into c:\MyHDFstuff. This creates a directory - called 'hdf5-1.8.x' under MyHDFstuff which contains several files and - directories. Rename "hdf5-1.8.x" to "hdf5". + called 'hdf5-1.9.x' under MyHDFstuff which contains several files and + directories. Rename "hdf5-1.9.x" to "hdf5". 6. HDF5 provide options to do in-memory compression within HDF5 library. Currently, two external compression libraries Zlib and Szip can be used with HDF5. 6.1 HDF5 uses Zlib version 1.2.3 for compression and Zlib is NOT - distributed with HDF5 library in 1.8.x release. To use Zlib library, + distributed with HDF5 library in 1.9.x release. To use Zlib library, you have to install your own Zlib DLL library or go to ftp://ftp.hdfgroup.org/lib-external/zlib/1.2/bin/windows to download the Zlib library. 6.2 HDF5 uses Szip version 2.1 for compression and Szip compression - software is provided with HDF5 products in 1.8.1 release. To use + software is provided with HDF5 products in 1.9.x release. To use Szip 2.1 library, you can download Szip source codes and binaries from ftp://ftp.hdfgroup.org/lib-external/szip/2.1/bin/windows @@ -159,12 +158,12 @@ Preconditions: Notes: - 1. As of 1.8.0, all.zip is deprecated. Users should go to hdf5/windows - directory, run copy_hdf.bat first and then open all.sln under - hdf5/windows/proj/all to start building process. + 1. Users should go to hdf5/windows directory, run copy_hdf.bat first and then + open all.sln under hdf5/windows/proj/all to start building process. 2. Visual Studio 6.0 is no longer supported in HDF5 1.8 or later releases. Visual Studio .NET is no longer support in HDF5 1.8.4 or later releases. + Visual Studio 2005 is no longer support in HDF5 1.8.5 or later releases. 3. For users who want to quickly build HDF5 library or do not want to know HDF5 building and installation details, please read the @@ -177,14 +176,14 @@ Notes: any more. To obtain HDF4 related tools, please check http://hdfgroup.org/h4toh5/ and ftp://ftp.hdfgroup.org/HDF5/h4toh5 - 6. For Fortran users, Intel fortran Compiler 9.1 and 10.1 is currently - supported-- please see Section VI. Intel Compiler verion 7.x and 8.x are + 6. For Fortran users, Intel fortran Compiler 10.1 and 11.1 is currently + supported-- please see Section VI. Intel Compiler verion 9.x or earlier are no longer supported. 7. For users who would like to build Muti-threaded version of HDF5 library, please read Section VII. - 8. To build HDF5 in Visual Studio 2008, be sure to read the instructions in + 8. To build HDF5 in Visual Studio 2010, be sure to read the instructions in Section XI. @@ -255,7 +254,7 @@ STEP 1: Building HDF5 Libraries and Tools 3. (Optional) Disable HDF5 C++ and High level C++ - In HDF5 1.8, C++ and HL C++ libraries are built by default. To opt-out, + In HDF5 1.9, C++ and HL C++ libraries are built by default. To opt-out, you must explicitly disable them. 3.1 Skip this step if you do want to build HDF5 High-Level C++ libraries @@ -1112,16 +1111,13 @@ Warning: When you modify the H5pubconf.h file as described below, DO NOT just Section VI: How to build HDF5 with Fortran Support ======================================================================== -Notes: 1. For Intel Compiler users, Intel fortran Compiler 9.1 and 10.1 are - currently supported-- please see below. Intel Compiler verion 7.x and - 8.x are no longer supported. +Notes: 1. For Intel Compiler users, Intel fortran Compiler 10.1 and 11.1 are + currently supported-- please see below. Intel Compiler verion 9.x and + earlier are no longer supported. - 2. The Compaq Fortran Compiler is no longer supported for HDF5 1.8. + 2. The Compaq Fortran Compiler is no longer supported for HDF5 1.9. - 3. Intel Fortran 9.1 works only under Visual Studio 2005 environments. - Visual Studio 2008 is supported only with Intel Fortran 10.1. - - 4. Parallel builds should be disabled. To do so: Go to Tools > + 3. Parallel builds should be disabled. To do so: Go to Tools > Options > Projects and Solutions > Build and Run. Set "Maximum Number of Parallel Project Builds" to 1. @@ -1143,7 +1139,7 @@ Notes: 1. For Intel Compiler users, Intel fortran Compiler 9.1 and 10.1 are You have to read this part even if you want to use only Zlib or Szip. You also need to read Section V. - 1) Invoke Microsoft Visual Studio 2005 or 2008. + 1) Invoke Microsoft Visual Studio. 2) From the main menu, Go to Tools > Options > Intel(R) Fortran. In the right panel, make sure your "Selected Compiler" is Intel Fortran. @@ -1157,11 +1153,11 @@ Notes: 1. For Intel Compiler users, Intel fortran Compiler 9.1 and 10.1 are 5) Then click "OK". -1. Build with Intel Fortran Compiler 9.1 or 10.1 under Visual Studio 2005 or 2008 +1. Build with Intel Fortran Compiler 10.1 or 11.1 under Visual Studio 2008 Note: This step will build HDF5 Static and DLL C and C++ Library using Visual Studio compiler as well as HDF5 Static and High Level - Fortran Library using Intel Fortran 9.1 or 10.1 Compiler. + Fortran Library using Intel Fortran Compiler. 1.1 Open all_fortran.sln @@ -1385,10 +1381,9 @@ Notes: 1. For Intel Compiler users, Intel fortran Compiler 9.1 and 10.1 are Section VII : How to build Multi-threaded version of HDF5 library ======================================================================== -Notes: In Visual Studio 2005, the Single-threaded runtime libraries have been - depreciated, and Multi-threaded is built by default. Therefore, no extra +Notes: In Visual Studio 2008 Multi-threaded is built by default. Therefore, no extra work needs to be done to build Multi-threaded libraries in Visual Studio - 2005. + 2008. ======================================================================== @@ -1571,7 +1566,7 @@ Notes: In Visual Studio 2005, the Single-threaded runtime libraries have been Section IX: How to build HDF5 for 64-bit Windows ======================================================================== -HDF5 can be built for 64-bit Windows in Visual Studio 2005 or 2008. +HDF5 can be built for 64-bit Windows in Visual Studio 2008. Notes: @@ -1584,7 +1579,7 @@ Prerequisites: 1. A 64-bit Windows machine. Either AMD64 and Itanium is supported. - 2. Microsoft Visual Studio 2005 or 2008 installed with x64 Extensions. + 2. Microsoft Visual Studio 2008 installed with x64 Extensions. Building: @@ -1627,8 +1622,7 @@ Building on Windows Vista is very similar to building on Windows XP, with some minor changes. Therefore, follow the build instructions above, with the following considerations: - 1. Only Visual Studio 2005 and 2008 is currently supported on Windows Vista. - This is because Microsoft has ended their support for .NET. + 1. Only Visual Studio 2008 is currently supported on Windows Vista. 2. Elevated security permissions are required to test the HDF5 libraries. This is because DLLs are installed in the system directory. To enable @@ -1644,17 +1638,17 @@ following considerations: ======================================================================== - Section XI: How to build HDF5 using Visual Studio 2008 + Section XI: How to build HDF5 using Visual Studio 2010 ======================================================================== -Building with Visual Studio 2008 is very similar to building with Visual Studio -2005, with some minor changes. Therefore, follow the build instructions above, +Building with Visual Studio 2010 is very similar to building with Visual Studio +2008, with some minor changes. Therefore, follow the build instructions above, with the following considerations: - 1. Visual Studio 2008 uses a new format for project files, but Visual Studio - 2005 project files can be easily converted. The HDF5 project files + 1. Visual Studio 2010 uses a new format for project files, but Visual Studio + 2008 project files can be easily converted. The HDF5 project files will need to be converted on first use. To do so: - 1.1. Open the HDF5 Visual Studio 2005 solution file as in Section II + 1.1. Open the HDF5 Visual Studio 2008 solution file as in Section II (either all.sln or all_fortran.sln if building Fortran.) 1.2. You will be prompted with an automatic conversion wizard. Click diff --git a/release_docs/INSTALL_Windows_From_Command_Line.txt b/release_docs/INSTALL_Windows_From_Command_Line.txt index c35fdbf..771bcf0 100755 --- a/release_docs/INSTALL_Windows_From_Command_Line.txt +++ b/release_docs/INSTALL_Windows_From_Command_Line.txt @@ -5,12 +5,12 @@ Note: This instruction is written for users who would like to build HDF5 libraries and tools from the HDF5 source code package on command line. We no longer support building HDF5 using Microsoft Visual - Studio .NET 2003. + Studio 2005. Currently, we support: 1. Building and testing HDF5 C/C++/Fortran libraries on command line with - Microsoft Visual Studio 2005 or 2008 for 32- or 64-bit Windows. + Microsoft Visual Studio 2008 for 32- or 64-bit Windows. For all other Windows development tools, HDF5 should be built in the development environment. Please refer to INSTALL_Windows.txt @@ -37,14 +37,12 @@ notes in INSTALL_Windows.txt before starting below procedures. Studio. These are generally setup when Visual Studio is installed, but you can verify by running the command: - echo %vs80comntools% + echo %vs90comntools% This should output a path similar to: - C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\ - - If you are using Visual Studio 2008, use "vs90comntools" - + C:\Program Files\Microsoft Visual Studio 9\Common7\Tools\ + 1.2 Run batch file copy_hdf.bat. Go to c:\MyHDFstuff\hdf5\windows and run copy_hdf.bat. @@ -81,12 +79,10 @@ notes in INSTALL_Windows.txt before starting below procedures. from command line. hdf5bt file takes the following options: - /vs8 Build HDF5 using Visual Studio 2005 /vs9 Build HDF5 using Visual Studio 2008 - Note: Default is Visual Studio 2005 /fort Build and test HDF5 with Fortran libraries /ivf101 Build HDF5 Fortran using Intel Visual Fortran 10.1 - Note: Default is Intel Visual Fortran 9.1 + /ivf111 Build HDF5 Fortran using Intel Visual Fortran 11.1 /useenv Build HDF5 using compiler settings defined in the environment, rather than the IDE. /? Help information @@ -110,13 +106,12 @@ notes in INSTALL_Windows.txt before starting below procedures. directory is provided for users to build HDF5 library and tools from command line. - hdf55build takes the following options: - /vs8 Build HDF5 using Visual Studio 2005 + hdf5build takes the following options: /vs9 Build HDF5 using Visual Studio 2008 - Note: Default is Visual Studio 2005 /fort Build HDF5 with Fortran libraries /ivf101 Build HDF5 Fortran using Intel Visual Fortran 10.1 - Note: Default is Intel Visual Fortran 9.1 + /ivf111 Build HDF5 Fortran using Intel Visual Fortran 11.1 + /nodebug Build HDF5 release versions only /useenv Build HDF5 using compiler settings defined in the environment, rather than the IDE. /? Help information @@ -148,6 +143,9 @@ notes in INSTALL_Windows.txt before starting below procedures. tools. To use this option, HDF5 Fortran libraries must have been built. + nodebug option can be added to any of the above options to only + test the release versions. + Invoke a command prompt window and run hdf5check with appropriate option. Users are encouraged to pipe the test output into a file. You should find no "*FAILED*" marks. diff --git a/release_docs/INSTALL_Windows_Short_VS2005.TXT b/release_docs/INSTALL_Windows_Short_VS2005.TXT index b668581..9ed15b4 100755 --- a/release_docs/INSTALL_Windows_Short_VS2005.TXT +++ b/release_docs/INSTALL_Windows_Short_VS2005.TXT @@ -3,187 +3,7 @@ * with Windows XP (Short Version) * ************************************************************************ -Notes: This short instruction is written for users who want to quickly build - HDF5 library and tools from the HDF5 source code package with Microsoft - Visual Studio 2005 but do not want to know HDF5 building and installation - details on Windows XP. - - For detailed HDF5 build and install information, or if you have trouble - following any steps in the instructions, please refer to - INSTALL_Windows.txt for further information. - - For users who would like to build and test HDF5 package from the - command line, please refer to INSATLL_Windows_From_Command_Line.txt. - - Notes: - - 1. HDF5 1.8 can also be built using Visual Studio 2005 on Windows - Vista. For details, please see Section X of INSTALL_Windows.txt. - - 2. 64-bit builds are also supported in Visual STudio 2005. For details - please see Section IX of INSTALL_Windows.txt. - - 3. Fortran libraries can be built with Visual Studio 2005 and Intel - Fortran 9.1. For details, see Section VI of INSTALL_Windows.txt. - -WARNINGS: - -Please read CAREFULLY about HDF5 build and install preconditions and -notes in INSTALL_Windows.txt before starting below procedures. - - -======================================================================== - Preconditions -======================================================================== - - 1. Set up path for external libraries and headers - - Skip this part if you don't want to use ANY compression features provided - by HDF5. Please do read Section V in INSTALL_Windows.txt. - - You have to read this part even if you want to only use Zlib or Szip. You - also need to read Section V in INSTALL_Windows.txt. - - Invoke Microsoft Visual Studio and go to "Tools" and select "Options". In - the left pane of "Option" window poped up, choose and expand "Projects", - Click on "VC++ Directories". In the right pane, Find the box "Show - directories for", choose "Include files", if you can not find your Zlib - and Szip header path (for example, c:\zlib123\include, c:\szip\include) - from the directory list, add the header path (c:\zlib123\include, - c:\szip\include) to the included directories. - - Find the box "Show directories for", choose "Library files", If you cannot - find your Zlib and Szip library path (for example, c:\zlib123\dll, - c:\szip\dll) from the directory list, add the library path - (c:\zlib123\dll, c:\szip\dll) to the library directories. - -======================================================================== - Building HDF5 C/C++ Libraries with Visual Studio 2005 -======================================================================== - - 1. Run batch file copy_hdf.bat - - Go to c:\MyHDFstuff\hdf5\windows and run copy_hdf.bat. This process will - copy all the necessary batch files, windows specific source codes and - text files saved under c:\MyHDFstuff\hdf5\windows directory to the - corresponding directories under hdf5. - - 2. Invoke Microsoft Visual Studio compiler - - Invoke Microsoft Visual Studio. From the main menu, go to "File" and - select the "Open Solution" option. Then open the - c:\MyHDFstuff\hdf5\windows\proj\all\all.sln solution if you are building - without Fortran libraries, or - c:\MyHDFstuff\hdf5\windows\proj\all_fortran\all_fortran.sln if you would - like to use Fortran. - - You should find Windows project files listed as "all", "big", etc. on the - left. - - - 3. (Optional) Disable HDF5 C++ and High level C++ - - In HDF5 1.8, C++ and HL C++ libraries are built by default. To opt-out, - you must explicitly disable them. - - 3.1 Skip this step if you do want to build HDF5 High-Level C++ libraries - - Go to "Project" and select "Project Dependencies". Select "all", and - disable all of the following projects: - - hdf5_hl_cpp - hdf5_hl_cppdll - hl_test_table_cpp - hl_test_table_cppdll - - 3.2 Skip this step if you do want to build HDF5 High-Level libraries - - Go to "Project" and select "Project Dependencies". Select "all", and - disable all of the project files listed in the previous step, as well - as the following projects: - - hdf5_hl - hdf5_hldll - hl_test_image - hl_test_imagedll - hl_test_lite - hl_test_litedll - hl_test_table - hl_test_tabledll - hl_test_ds - hl_test_dsdll - hl_test_packet - hl_test_packetdll - - Click on "OK", From the main menu, choose "Build"-> "Build" or - "Rebuild ALL" to build both release and debug version of HDF5 - Libraries. - - - 4. Select "Build", then Select "Configuration Manager". - - 4.1 To build debug static libraries, debug multithreaded DLLs, and tests: - - In "Active Solution Configuration", select "Debug". Select "Close". - Select "Build" -> "Build Solution" or "Rebuild Solution" to build debug - version of project "all". - - 4.2 To build release static libraries, multithreaded DLLs and tests: - - In "Active Solution Configuration", select "Release". Select "Close". - Select "Build" -> "Build Solution" or "Rebuild Solution" to build release - version of project "all". - - Both debug and release versions must be built. - - Warning messages can be ignored. - -======================================================================== - Testing HDF5 C/C++ Libraries with VS .NET -======================================================================== - -HDF5 libraries and tools should be tested to make sure that they were -built correctly. c:\MyHDFstuff\hdf5\hdf5check.bat was provided to test -HDF5 libraries and tools. - -hdf5check.bat has four options: - - hdf5check test HDF5 C library and tools only - - hdf5check enablecpp test HDF5 C/C++ libraries and tools - - hdf5check enablefortran test HDF5 C/Fortran libraries and tools - - hdf5check enableall test HDF5 C/C++/Fortran libraries and tools - - -Notes: Users who only build HDF5 C/C++ libraries ONLY have the first - two options. - -Invoke a command prompt window and run hdf5check with appropriate option. -Users are encouraged to pipe the test output into a file. You should find -no "*FAILED*" marks. - -If you want to test HDF5 libraries and tools one by one, please refer to -Section II, step 2 in INSTALL_Windows.txt. - - -======================================================================== - Installing HDF5 C/C++ Libraries -======================================================================== - -Run the batch file c:\MyHDFstuff\hdf5\installhdf5lib.bat to install -all HDF5 libraries and tools into c:\MyHDFstuff\hdf5\hdf5lib directory. - -======================================================================== - Building HDF5 Examples and Applications -======================================================================== - -Building HDF5 Examples is Optional. Please read Section II, step 4 and -the following part in INSTALL_Windows.txt for detailed information. - - - +Notes: We no longer support building HDF5 using Microsoft Visual Studio 2005. ************************************************************************ Need further assistance, send email to help@hdfgroup.org diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b9f7675..c8ec41b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.59-FA_a4 currently under development +HDF5 version 1.9.64-FA_a4 currently under development ================================================================================ @@ -64,6 +64,8 @@ New Features Library: -------- + - Greatly improved performance of extending a dataset with early + allocation. (NAF - 2010/03/24 - 1637) - Added support for filtering densely stored groups. Many of the API functions related to filters have been extended to support dense groups as well as datasets. Pipeline messages can now be stored in a group's @@ -142,8 +144,9 @@ New Features Tools: ------ - - h5diff: Add new flag -l (--link-follow),for comparing through links - (soft and external links along with hard link). + - h5diff: Add new flag --no-dangling-links. (refer to --help for details) + (JKM - 2010/02/10) + - h5diff: Add new flag --follow-links. (refer to --help for details) (JKM - 2010/01/25) - h5diff: fix for displaying garbage value on LE machine for BE data. (JKM - 2009/11/20) @@ -207,6 +210,16 @@ Bug Fixes since HDF5-1.8.0 release Library ------- + - Files can now be concurrently opened more than once using the core file + driver, as long as the backing store is used. (NAF - 2010/03/09) + - Added support for H5O_COPY_EXPAND_EXT_LINK_FLAG to H5Ocopy. External + links will now be expanded if this flag is set. + (NAF - 2010/03/05 - 1733) + - Fixed a bug where the library, when traversing an external link, would + reopen the source file if nothing else worked. (NAF - 2010/03/05) + - Fixed an intermittent bug in the b-tree code which could be triggered + by expanding and shrinking chunked datasets in certain ways. + (NAF - 2010/02/16) - H5Tdetect_class said a VL string is a string type. But when it's in a compound type, it said it's a VL type (Bug #1584). I fixed it to be consistent. It always return string type. (SLU - 2009/12/10) @@ -389,6 +402,8 @@ Bug Fixes since HDF5-1.8.0 release Tools ----- + - h5diff: fixed incorrect behavior (hang) in parallel mode when + specify invalid options (ex: -v and -q) (JKM 2010/02/17) - h5dump/h5ls display buffer resize fixed in tools library. (ADB - 2009/07/21 - 1520) - Fixed many problems that could occur when using h5repack with named diff --git a/src/H5.c b/src/H5.c index 6bd96cb..ed19b50 100644 --- a/src/H5.c +++ b/src/H5.c @@ -22,6 +22,8 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ +#include "H5lib_settings.h" /* Library build setings */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free lists */ diff --git a/src/H5AC.c b/src/H5AC.c index 659c4e6..bd2b20b 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -760,6 +760,11 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id) HDassert(f); HDassert(f->shared->cache); +#if H5AC_DUMP_STATS_ON_CLOSE + /* Dump debugging info */ + H5AC_stats(f); +#endif /* H5AC_DUMP_STATS_ON_CLOSE */ + #if H5AC__TRACE_FILE_ENABLED if(H5AC_close_trace_file(f->shared->cache) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_close_trace_file() failed.") @@ -847,8 +852,8 @@ H5AC_expunge_entry(H5F_t *f, H5AC_t * cache_ptr = f->shared->cache; - /* For the expunge entry call, only the addr, and type id are really - * necessary in the trace file. Write the return value to catch occult + /* For the expunge entry call, only the addr, and type id are really + * necessary in the trace file. Write the return value to catch occult * errors. */ if ( ( cache_ptr != NULL ) && @@ -1207,19 +1212,21 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, #endif /* H5AC__TRACE_FILE_ENABLED */ #ifdef H5_HAVE_PARALLEL - if ( ( aux_ptr != NULL ) && - ( aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold ) ) { - - result = H5AC_propagate_flushed_and_still_clean_entries_list(f, - H5AC_noblock_dxpl_id, - f->shared->cache, - TRUE); - if ( result < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ - "Can't propagate clean entries list.") - } - } + /* Check if we should try to flush */ + if(aux_ptr && (aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold)) { + hbool_t evictions_enabled; + + /* Query if evictions are allowed */ + if(H5C_get_evictions_enabled((const H5C_t *)f->shared->cache, &evictions_enabled) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.") + + /* Flush if evictions are allowed */ + if(evictions_enabled) { + if(H5AC_propagate_flushed_and_still_clean_entries_list(f, + H5AC_noblock_dxpl_id, f->shared->cache, TRUE) < 0 ) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") + } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ done: @@ -1489,19 +1496,21 @@ H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_ad } #ifdef H5_HAVE_PARALLEL - if ( ( aux_ptr != NULL ) && - ( aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold ) ) { - - result = H5AC_propagate_flushed_and_still_clean_entries_list(f, - H5AC_noblock_dxpl_id, - f->shared->cache, - TRUE); - if ( result < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ - "Can't propagate clean entries list.") - } - } + /* Check if we should try to flush */ + if(aux_ptr && (aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold)) { + hbool_t evictions_enabled; + + /* Query if evictions are allowed */ + if(H5C_get_evictions_enabled((const H5C_t *)f->shared->cache, &evictions_enabled) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.") + + /* Flush if evictions are allowed */ + if(evictions_enabled) { + if(H5AC_propagate_flushed_and_still_clean_entries_list(f, + H5AC_noblock_dxpl_id, f->shared->cache, TRUE) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") + } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ done: @@ -2183,20 +2192,21 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, } #ifdef H5_HAVE_PARALLEL - if ( ( aux_ptr != NULL ) && - ( aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold ) ) { - - result = H5AC_propagate_flushed_and_still_clean_entries_list(f, - H5AC_noblock_dxpl_id, - f->shared->cache, - TRUE); - - if ( result < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ - "Can't propagate clean entries list.") - } - } + /* Check if we should try to flush */ + if(aux_ptr && (aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold)) { + hbool_t evictions_enabled; + + /* Query if evictions are allowed */ + if(H5C_get_evictions_enabled((const H5C_t *)f->shared->cache, &evictions_enabled) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.") + + /* Flush if evictions are allowed */ + if(evictions_enabled) { + if(H5AC_propagate_flushed_and_still_clean_entries_list(f, + H5AC_noblock_dxpl_id, f->shared->cache, TRUE) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") + } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ done: diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c index eb2c741..31dcb66 100644 --- a/src/H5Abtree2.c +++ b/src/H5Abtree2.c @@ -326,7 +326,8 @@ H5A_dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void UNUSED *ct FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_name_encode) /* Encode the record's fields */ - UINT64ENCODE(raw, nrecord->id); + HDmemcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN); + raw += H5O_FHEAP_ID_LEN; *raw++ = nrecord->flags; UINT32ENCODE(raw, nrecord->corder) UINT32ENCODE(raw, nrecord->hash) @@ -356,7 +357,8 @@ H5A_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void UNUSED *ct FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_name_decode) /* Decode the record's fields */ - UINT64DECODE(raw, nrecord->id); + HDmemcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN); + raw += H5O_FHEAP_ID_LEN; nrecord->flags = *raw++; UINT32DECODE(raw, nrecord->corder) UINT32DECODE(raw, nrecord->hash) @@ -388,7 +390,7 @@ H5A_dense_btree2_name_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dx HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u, %08lx}\n", indent, "", fwidth, "Record:", - (hsize_t)nrecord->id, (unsigned)nrecord->flags, (unsigned)nrecord->corder, (unsigned long)nrecord->hash); + (hsize_t)nrecord->id.val, (unsigned)nrecord->flags, (unsigned)nrecord->corder, (unsigned long)nrecord->hash); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5A_dense_btree2_name_debug() */ @@ -484,7 +486,8 @@ H5A_dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void UNUSED * FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_corder_encode) /* Encode the record's fields */ - UINT64ENCODE(raw, nrecord->id); + HDmemcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN); + raw += H5O_FHEAP_ID_LEN; *raw++ = nrecord->flags; UINT32ENCODE(raw, nrecord->corder) @@ -513,7 +516,8 @@ H5A_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void UNUSED * FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_corder_decode) /* Decode the record's fields */ - UINT64DECODE(raw, nrecord->id); + HDmemcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN); + raw += H5O_FHEAP_ID_LEN; nrecord->flags = *raw++; UINT32DECODE(raw, nrecord->corder) @@ -544,7 +548,7 @@ H5A_dense_btree2_corder_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u}\n", indent, "", fwidth, "Record:", - (hsize_t)nrecord->id, (unsigned)nrecord->flags, (unsigned)nrecord->corder); + (hsize_t)nrecord->id.val, (unsigned)nrecord->flags, (unsigned)nrecord->corder); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5A_dense_btree2_corder_debug() */ diff --git a/src/H5Aint.c b/src/H5Aint.c index a89c1c9..63f7e60 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -269,6 +269,10 @@ H5A_dense_build_table_cb(const H5A_t *attr, void *_udata) HDassert(udata); HDassert(udata->curr_attr < udata->atable->nattrs); + /* Allocate attribute for entry in the table */ + if(NULL == (udata->atable->attrs[udata->curr_attr] = H5FL_CALLOC(H5A_t))) + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate attribute") + /* Copy attribute information. Share the attribute object in copying. */ if(NULL == H5A_copy(udata->atable->attrs[udata->curr_attr], attr)) HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute") @@ -333,17 +337,11 @@ H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, if(atable->nattrs > 0) { H5A_dense_bt_ud_t udata; /* User data for iteration callback */ H5A_attr_iter_op_t attr_op; /* Attribute operator */ - unsigned i; /* Allocate the table to store the attributes */ - if((atable->attrs = (H5A_t **)H5FL_SEQ_MALLOC(H5A_t_ptr, atable->nattrs)) == NULL) + if((atable->attrs = (H5A_t **)H5FL_SEQ_CALLOC(H5A_t_ptr, atable->nattrs)) == NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - /* Allocate pointers for each entry in the table */ - for(i=0; inattrs; i++) - if((atable->attrs[i] = (H5A_t *)H5FL_CALLOC(H5A_t)) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - /* Set up user data for iteration */ udata.atable = atable; udata.curr_attr = 0; @@ -638,15 +636,11 @@ done: * Programmer: Quincey Koziol * Dec 11, 2006 * - * Modification: Raymond Lu - * 4 June 2008 - * Changed from H5A_free to H5A_close to release attributes. *------------------------------------------------------------------------- */ herr_t H5A_attr_release_table(H5A_attr_table_t *atable) { - size_t u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5A_attr_release_table) @@ -656,11 +650,12 @@ H5A_attr_release_table(H5A_attr_table_t *atable) /* Release attribute info, if any. */ if(atable->nattrs > 0) { + size_t u; /* Local index variable */ + /* Free attribute message information */ - for(u = 0; u < atable->nattrs; u++) { - if(H5A_close((atable->attrs[u])) < 0) + for(u = 0; u < atable->nattrs; u++) + if(atable->attrs[u] && H5A_close(atable->attrs[u]) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute") - } } /* end if */ else HDassert(atable->attrs == NULL); @@ -1154,7 +1149,7 @@ H5A_dense_copy_file_cb(const H5A_t *attr_src, void *_udata) HDassert(udata->file); HDassert(udata->cpy_info); - if ( NULL == (attr_dst=H5A_attr_copy_file(attr_src, udata->file, + if ( NULL == (attr_dst=H5A_attr_copy_file(attr_src, udata->file, udata->recompute_size, udata->cpy_info, udata->dxpl_id))) HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute") @@ -1190,7 +1185,7 @@ done: * *------------------------------------------------------------------------- */ -herr_t +herr_t H5A_dense_copy_file_all(H5F_t *file_src, H5O_ainfo_t *ainfo_src, H5F_t *file_dst, const H5O_ainfo_t *ainfo_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, hid_t dxpl_id) { @@ -1275,7 +1270,7 @@ done: * *------------------------------------------------------------------------- */ -herr_t +herr_t H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainfo_src, H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info) { diff --git a/src/H5Apkg.h b/src/H5Apkg.h index de57e79..27f500e 100644 --- a/src/H5Apkg.h +++ b/src/H5Apkg.h @@ -283,7 +283,7 @@ H5_DLL H5A_t *H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t H5O_copy_t *cpy_info, hid_t dxpl_id); H5_DLL herr_t H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *mesg_src, H5O_loc_t *dst_oloc, const H5A_t *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info); -H5_DLL herr_t H5A_dense_copy_file_all(H5F_t *file_src, H5O_ainfo_t *ainfo_src, H5F_t *file_dst, +H5_DLL herr_t H5A_dense_copy_file_all(H5F_t *file_src, H5O_ainfo_t *ainfo_src, H5F_t *file_dst, const H5O_ainfo_t *ainfo_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, hid_t dxpl_id); H5_DLL herr_t H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t * ainfo_src, H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info); diff --git a/src/H5Atest.c b/src/H5Atest.c index df88472..845c6c8 100644 --- a/src/H5Atest.c +++ b/src/H5Atest.c @@ -37,6 +37,7 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Apkg.h" /* Attributes */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ #include "H5SMprivate.h" /* Shared object header messages */ diff --git a/src/H5B.c b/src/H5B.c index 591b974..a0168aa 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -233,6 +233,7 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata, bt->nchildren = 0; if(NULL == (bt->rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer") + H5RC_INC(bt->rc_shared); shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); HDassert(shared); if(NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) || @@ -321,7 +322,7 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *u while(lt < rt && cmp) { idx = (lt + rt) / 2; /* compare */ - if((cmp = (type->cmp3)(f, dxpl_id, H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0) + if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0) rt = idx; else lt = idx + 1; @@ -823,7 +824,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type while(lt < rt && cmp) { idx = (lt + rt) / 2; - if((cmp = (type->cmp3)(f, dxpl_id, H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0) + if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0) rt = idx; else lt = idx + 1; @@ -850,72 +851,90 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type } /* end if */ else my_ins = H5B_INS_NOOP; - } else if(cmp < 0 && idx == 0 && bt->level > 0) { - /* - * The value being inserted is less than any value in this tree. - * Follow the minimum branch out of this node to a subtree. - */ - if((int)(my_ins = H5B_insert_helper(f, dxpl_id, bt->child[idx], type, - H5B_NKEY(bt,shared,idx), lt_key_changed, md_key, - udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed, - &child_addr/*out*/)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum subtree") - } else if(cmp < 0 && idx == 0 && type->follow_min) { - /* - * The value being inserted is less than any leaf node out of this - * current node. Follow the minimum branch to a leaf node and let the - * subclass handle the problem. - */ - if((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx), - lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1), - rt_key_changed, &child_addr/*out*/)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node") } else if(cmp < 0 && idx == 0) { - /* - * The value being inserted is less than any leaf node out of the - * current node. Create a new minimum leaf node out of this B-tree - * node. This node is not empty (handled above). - */ - my_ins = H5B_INS_LEFT; - HDmemcpy(md_key, H5B_NKEY(bt,shared,idx), type->sizeof_nkey); - if((type->new_node)(f, dxpl_id, H5B_INS_LEFT, H5B_NKEY(bt, shared, idx), udata, - md_key, &child_addr/*out*/) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node") - *lt_key_changed = TRUE; - } else if(cmp > 0 && idx + 1 >= bt->nchildren && bt->level > 0) { - /* - * The value being inserted is larger than any value in this tree. - * Follow the maximum branch out of this node to a subtree. - */ - idx = bt->nchildren - 1; - if((int)(my_ins = H5B_insert_helper(f, dxpl_id, bt->child[idx], type, - H5B_NKEY(bt, shared, idx), lt_key_changed, md_key, udata, - H5B_NKEY(bt, shared, idx + 1), rt_key_changed, &child_addr/*out*/)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum subtree") - } else if(cmp > 0 && idx + 1 >= bt->nchildren && type->follow_max) { - /* - * The value being inserted is larger than any leaf node out of the - * current node. Follow the maximum branch to a leaf node and let the - * subclass handle the problem. - */ - idx = bt->nchildren - 1; - if((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx), - lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1), - rt_key_changed, &child_addr/*out*/)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node") + if(bt->level > 0) { + /* + * The value being inserted is less than any value in this tree. + * Follow the minimum branch out of this node to a subtree. + */ + if((int)(my_ins = H5B_insert_helper(f, dxpl_id, bt->child[idx], type, + H5B_NKEY(bt,shared,idx), lt_key_changed, md_key, + udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed, + &child_addr/*out*/)) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum subtree") + } else if(type->follow_min) { + /* + * The value being inserted is less than any leaf node out of this + * current node. Follow the minimum branch to a leaf node and let + * the subclass handle the problem. + */ + if((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx), + lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1), + rt_key_changed, &child_addr/*out*/)) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node") + } else { + /* + * The value being inserted is less than any leaf node out of the + * current node. Create a new minimum leaf node out of this B-tree + * node. This node is not empty (handled above). + */ + my_ins = H5B_INS_LEFT; + HDmemcpy(md_key, H5B_NKEY(bt,shared,idx), type->sizeof_nkey); + if((type->new_node)(f, dxpl_id, H5B_INS_LEFT, H5B_NKEY(bt, shared, idx), udata, + md_key, &child_addr/*out*/) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node") + *lt_key_changed = TRUE; + } /* end else */ + +#ifdef H5_STRICT_FORMAT_CHECKS + /* Since we are to the left of the leftmost key there must not be a left + * sibling */ + if(H5F_addr_defined(bt->left)) + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "internal error: likely corrupt key values") +#endif /* H5_STRICT_FORMAT_CHECKS */ } else if(cmp > 0 && idx + 1 >= bt->nchildren) { - /* - * The value being inserted is larger than any leaf node out of the - * current node. Create a new maximum leaf node out of this B-tree - * node. - */ - idx = bt->nchildren - 1; - my_ins = H5B_INS_RIGHT; - HDmemcpy(md_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey); - if((type->new_node)(f, dxpl_id, H5B_INS_RIGHT, md_key, udata, - H5B_NKEY(bt, shared, idx + 1), &child_addr/*out*/) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node") - *rt_key_changed = TRUE; + if (bt->level > 0) { + /* + * The value being inserted is larger than any value in this tree. + * Follow the maximum branch out of this node to a subtree. + */ + idx = bt->nchildren - 1; + if((int)(my_ins = H5B_insert_helper(f, dxpl_id, bt->child[idx], type, + H5B_NKEY(bt, shared, idx), lt_key_changed, md_key, udata, + H5B_NKEY(bt, shared, idx + 1), rt_key_changed, &child_addr/*out*/)) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum subtree") + } else if(type->follow_max) { + /* + * The value being inserted is larger than any leaf node out of the + * current node. Follow the maximum branch to a leaf node and let + * the subclass handle the problem. + */ + idx = bt->nchildren - 1; + if((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx), + lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1), + rt_key_changed, &child_addr/*out*/)) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node") + } else { + /* + * The value being inserted is larger than any leaf node out of the + * current node. Create a new maximum leaf node out of this B-tree + * node. + */ + idx = bt->nchildren - 1; + my_ins = H5B_INS_RIGHT; + HDmemcpy(md_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey); + if((type->new_node)(f, dxpl_id, H5B_INS_RIGHT, md_key, udata, + H5B_NKEY(bt, shared, idx + 1), &child_addr/*out*/) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node") + *rt_key_changed = TRUE; + } /* end else */ + +#ifdef H5_STRICT_FORMAT_CHECKS + /* Since we are to the right of the rightmost key there must not be a + * right sibling */ + if(H5F_addr_defined(bt->right)) + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "internal error: likely corrupt key values") +#endif /* H5_STRICT_FORMAT_CHECKS */ } else if(cmp) { /* * We couldn't figure out which branch to follow out of this node. THIS @@ -951,17 +970,21 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type */ if(*lt_key_changed) { bt_flags |= H5AC__DIRTIED_FLAG; - if(idx > 0) - *lt_key_changed = FALSE; - else - HDmemcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey); + if(idx > 0) { + HDassert(type->critical_key == H5B_LEFT); + *lt_key_changed = FALSE; + } /* end if */ + else + HDmemcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey); } /* end if */ if(*rt_key_changed) { bt_flags |= H5AC__DIRTIED_FLAG; - if(idx + 1 < bt->nchildren) - *rt_key_changed = FALSE; - else - HDmemcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey); + if(idx + 1 < bt->nchildren) { + HDassert(type->critical_key == H5B_RIGHT); + *rt_key_changed = FALSE; + } /* end if */ + else + HDmemcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey); } /* end if */ if(H5B_INS_CHANGE == my_ins) { /* @@ -1013,7 +1036,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type * The max key in the original left node must be equal to the min key * in the new node. */ - cmp = (type->cmp2)(f, dxpl_id, H5B_NKEY(bt, shared, bt->nchildren), udata, + cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata, H5B_NKEY(twin, shared, 0)); HDassert(0 == cmp); #endif @@ -1271,7 +1294,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type rt = bt->nchildren; while(lt < rt && cmp) { idx = (lt + rt) / 2; - if((cmp = (type->cmp3)(f, dxpl_id, H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0) + if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0) rt = idx; else lt = idx + 1; @@ -1321,160 +1344,216 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type * our right key and indicate that it changed. */ if(*lt_key_changed) { + HDassert(type->critical_key == H5B_LEFT); bt_flags |= H5AC__DIRTIED_FLAG; - if(idx > 0) + if(idx > 0) /* Don't propagate change out of this B-tree node */ - *lt_key_changed = FALSE; - else - HDmemcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey); + *lt_key_changed = FALSE; + else + HDmemcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey); } /* end if */ if(*rt_key_changed) { + HDassert(type->critical_key == H5B_RIGHT); bt_flags |= H5AC__DIRTIED_FLAG; - if(idx + 1 < bt->nchildren) { + if(idx + 1 < bt->nchildren) /* Don't propagate change out of this B-tree node */ - *rt_key_changed = FALSE; - } /* end if */ - else { - HDmemcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey); + *rt_key_changed = FALSE; + else + HDmemcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey); + } /* end if */ - /* Since our right key was changed, we must check for a right - * sibling and change it's left-most key as well. - * (Handle the ret_value==H5B_INS_REMOVE case below) + /* + * If the subtree returned H5B_INS_REMOVE then we should remove the + * subtree entry from the current node. There are four cases: + */ + if(H5B_INS_REMOVE == ret_value) { + /* Clients should not change keys when a node is removed. This function + * will handle it as appropriate, based on the value of bt->critical_key + */ + HDassert(!(*lt_key_changed)); + HDassert(!(*rt_key_changed)); + + if(1 == bt->nchildren) { + /* + * The subtree is the only child of this node. Discard both + * keys and the subtree pointer. Free this node (unless it's the + * root node) and return H5B_INS_REMOVE. */ - if(ret_value != H5B_INS_REMOVE && level > 0) { + /* Only delete the node if it is not the root node. Note that this + * "level" is the opposite of bt->level */ + if(level > 0) { + /* Fix siblings, making sure that the keys remain consistent + * between siblings. Overwrite the key that that is not + * "critical" for any child in its node to maintain this + * consistency (and avoid breaking key/child consistency) */ + if(H5F_addr_defined(bt->left)) { + if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, type, udata, H5AC_WRITE))) + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node from tree") + + /* Copy right-most key from deleted node to right-most key + * in its left neighbor, but only if it is not the critical + * key for the right-most child of the left neighbor */ + if(type->critical_key == H5B_LEFT) + HDmemcpy(H5B_NKEY(sibling, shared, sibling->nchildren), + H5B_NKEY(bt, shared, 1), type->sizeof_nkey); + + sibling->right = bt->right; + + if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->left, sibling, H5AC__DIRTIED_FLAG) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree") + sibling = NULL; /* Make certain future references will be caught */ + } /* end if */ if(H5F_addr_defined(bt->right)) { if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, type, udata, H5AC_WRITE))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to unlink node from tree") - /* Make certain the native key for the right sibling is set up */ - HDmemcpy(H5B_NKEY(sibling, shared, 0), H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey); + /* Copy left-most key from deleted node to left-most key in + * its right neighbor, but only if it is not the critical + * key for the left-most child of the right neighbor */ + if(type->critical_key == H5B_RIGHT) + HDmemcpy(H5B_NKEY(sibling, shared, 0), + H5B_NKEY(bt, shared, 0), type->sizeof_nkey); + + sibling->left = bt->left; if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree") sibling = NULL; /* Make certain future references will be caught */ } /* end if */ - } /* end if */ - } /* end else */ - } /* end if */ - /* - * If the subtree returned H5B_INS_REMOVE then we should remove the - * subtree entry from the current node. There are four cases: - */ - if(H5B_INS_REMOVE == ret_value && 1 == bt->nchildren) { - /* - * The subtree is the only child of this node. Discard both - * keys and the subtree pointer. Free this node (unless it's the - * root node) and return H5B_INS_REMOVE. - */ - bt_flags |= H5AC__DIRTIED_FLAG; - bt->nchildren = 0; - if(level > 0) { - if(H5F_addr_defined(bt->left)) { - if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, type, udata, H5AC_WRITE))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node from tree") - - sibling->right = bt->right; - - if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->left, sibling, H5AC__DIRTIED_FLAG) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree") - sibling = NULL; /* Make certain future references will be caught */ - } /* end if */ - if(H5F_addr_defined(bt->right)) { - if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, type, udata, H5AC_WRITE))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to unlink node from tree") - - /* Copy left-most key from deleted node to left-most key in it's right neighbor */ - HDmemcpy(H5B_NKEY(sibling, shared, 0), H5B_NKEY(bt, shared, 0), type->sizeof_nkey); - - sibling->left = bt->left; - - if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree") - sibling = NULL; /* Make certain future references will be caught */ - } /* end if */ - bt->left = HADDR_UNDEF; - bt->right = HADDR_UNDEF; - H5_CHECK_OVERFLOW(shared->sizeof_rnode, size_t, hsize_t); - if(H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, bt_flags | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0) { - bt = NULL; - bt_flags = H5AC__NO_FLAGS_SET; - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to free B-tree node") - } /* end if */ - bt = NULL; - bt_flags = H5AC__NO_FLAGS_SET; - } /* end if */ - } else if(H5B_INS_REMOVE == ret_value && 0 == idx) { - /* - * The subtree is the left-most child of this node. We discard the - * left-most key and the left-most child (the child has already been - * freed) and shift everything down by one. We copy the new left-most - * key into lt_key and notify the caller that the left key has - * changed. Return H5B_INS_NOOP. - */ - bt_flags |= H5AC__DIRTIED_FLAG; - bt->nchildren -= 1; - - HDmemmove(bt->native, - bt->native + type->sizeof_nkey, - (bt->nchildren + 1) * type->sizeof_nkey); - HDmemmove(bt->child, - bt->child + 1, - bt->nchildren * sizeof(haddr_t)); - HDmemcpy(lt_key, H5B_NKEY(bt, shared, 0), type->sizeof_nkey); - *lt_key_changed = TRUE; - ret_value = H5B_INS_NOOP; - } else if(H5B_INS_REMOVE == ret_value && idx + 1 == bt->nchildren) { - /* - * The subtree is the right-most child of this node. We discard the - * right-most key and the right-most child (the child has already been - * freed). We copy the new right-most key into rt_key and notify the - * caller that the right key has changed. Return H5B_INS_NOOP. - */ - bt_flags |= H5AC__DIRTIED_FLAG; - bt->nchildren -= 1; - HDmemcpy(rt_key, H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey); - *rt_key_changed = TRUE; - - /* Since our right key was changed, we must check for a right - * sibling and change it's left-most key as well. - * (Handle the ret_value==H5B_INS_REMOVE case below) - */ - if(level > 0) { - if(H5F_addr_defined(bt->right)) { - if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, type, udata, H5AC_WRITE))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to unlink node from tree") + /* Update bt struct */ + bt->left = HADDR_UNDEF; + bt->right = HADDR_UNDEF; + bt->nchildren = 0; - HDmemcpy(H5B_NKEY(sibling, shared, 0), H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey); - - if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree") - sibling = NULL; /* Make certain future references will be caught */ - } /* end if */ - } /* end if */ - - ret_value = H5B_INS_NOOP; - } else if(H5B_INS_REMOVE == ret_value) { - /* - * There are subtrees out of this node to both the left and right of - * the subtree being removed. The key to the left of the subtree and - * the subtree are removed from this node and all keys and nodes to - * the right are shifted left by one place. The subtree has already - * been freed). Return H5B_INS_NOOP. - */ - bt_flags |= H5AC__DIRTIED_FLAG; - bt->nchildren -= 1; - - HDmemmove(bt->native + idx * type->sizeof_nkey, - bt->native + (idx + 1) * type->sizeof_nkey, - (bt->nchildren + 1 - idx) * type->sizeof_nkey); - HDmemmove(bt->child + idx, - bt->child + idx + 1, - (bt->nchildren - idx) * sizeof(haddr_t)); - ret_value = H5B_INS_NOOP; - } else - ret_value = H5B_INS_NOOP; + /* Delete the node from disk (via the metadata cache) */ + bt_flags |= H5AC__DIRTIED_FLAG; + H5_CHECK_OVERFLOW(shared->sizeof_rnode, size_t, hsize_t); + if(H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, bt_flags | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0) { + bt = NULL; + bt_flags = H5AC__NO_FLAGS_SET; + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to free B-tree node") + } /* end if */ + bt = NULL; + bt_flags = H5AC__NO_FLAGS_SET; + } else { + /* We removed the last child in the root node, set the level + * back to 0 (as well as nchildren) */ + bt->nchildren = 0; + bt->level = 0; + bt_flags |= H5AC__DIRTIED_FLAG; + } /* end else */ + } else if(0 == idx) { + /* + * The subtree is the left-most child of this node. We update the + * key and child arrays and lt_key as appropriate, depending on the + * status of bt->critical_key. Return H5B_INS_NOOP. + */ + if(type->critical_key == H5B_LEFT) { + /* Slide all keys down 1, update lt_key */ + HDmemmove(H5B_NKEY(bt, shared, 0), H5B_NKEY(bt, shared, 1), + bt->nchildren * type->sizeof_nkey); + HDmemcpy(lt_key, H5B_NKEY(bt, shared, 0), type->sizeof_nkey); + *lt_key_changed = TRUE; + } else + /* Slide all but the leftmost 2 keys down, leaving the leftmost + * key intact (the right key of the leftmost child is + * overwritten) */ + HDmemmove(H5B_NKEY(bt, shared, 1), H5B_NKEY(bt, shared, 2), + (bt->nchildren - 1) * type->sizeof_nkey); + + HDmemmove(bt->child, + bt->child + 1, + (bt->nchildren - 1) * sizeof(haddr_t)); + + bt->nchildren -= 1; + bt_flags |= H5AC__DIRTIED_FLAG; + ret_value = H5B_INS_NOOP; + } else if(idx + 1 == bt->nchildren) { + /* + * The subtree is the right-most child of this node. We update the + * key and child arrays and rt_key as appropriate, depending on the + * status of bt->critical_key. Return H5B_INS_NOOP. + */ + if(type->critical_key == H5B_LEFT) + /* Slide the rightmost key down one, overwriting the left key of + * the deleted (righmost) child */ + HDmemmove(H5B_NKEY(bt, shared, bt->nchildren - 1), + H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey); + else { + /* Just update rt_key */ + HDmemcpy(rt_key, H5B_NKEY(bt, shared, bt->nchildren - 1), + type->sizeof_nkey); + *rt_key_changed = TRUE; + } /* end else */ + + bt->nchildren -= 1; + bt_flags |= H5AC__DIRTIED_FLAG; + ret_value = H5B_INS_NOOP; + } else { + /* + * There are subtrees out of this node to both the left and right of + * the subtree being removed. The subtree and its critical key are + * removed from this node and all keys and nodes to the right are + * shifted left by one place. The subtree has already been freed. + * Return H5B_INS_NOOP. + */ + if(type->critical_key == H5B_LEFT) + HDmemmove(H5B_NKEY(bt, shared, idx), + H5B_NKEY(bt, shared, idx + 1), + (bt->nchildren - idx) * type->sizeof_nkey); + else + HDmemmove(H5B_NKEY(bt, shared, idx + 1), + H5B_NKEY(bt, shared, idx + 2), + (bt->nchildren - 1 - idx) * type->sizeof_nkey); + + HDmemmove(bt->child + idx, + bt->child + idx + 1, + (bt->nchildren - idx) * sizeof(haddr_t)); + + bt->nchildren -= 1; + bt_flags |= H5AC__DIRTIED_FLAG; + ret_value = H5B_INS_NOOP; + } /* end else */ + } else /* H5B_INS_REMOVE != ret_value */ + ret_value = H5B_INS_NOOP; + + /* Patch keys in neighboring trees if necessary */ + if(*lt_key_changed && H5F_addr_defined(bt->left)) { + HDassert(type->critical_key == H5B_LEFT); + HDassert(level > 0); + + /* Update the rightmost key in the left sibling */ + if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, + bt->left, type, udata, H5AC_WRITE))) + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to unlink node from tree") + + HDmemcpy(H5B_NKEY(sibling, shared, sibling->nchildren), + H5B_NKEY(bt, shared, 0), type->sizeof_nkey); + + if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->left, sibling, + H5AC__DIRTIED_FLAG) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree") + sibling = NULL; /* Make certain future references will be caught */ + } /* end if */ + else if(*rt_key_changed && H5F_addr_defined(bt->right)) { + HDassert(type->critical_key == H5B_RIGHT); + HDassert(level > 0); + + /* Update the lefttmost key in the right sibling */ + if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, + bt->right, type, udata, H5AC_WRITE))) + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to unlink node from tree") + + HDmemcpy(H5B_NKEY(sibling, shared, 0), + H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey); + + if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, + H5AC__DIRTIED_FLAG) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree") + sibling = NULL; /* Make certain future references will be caught */ + } /* end else */ done: if(bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, bt_flags) < 0) @@ -1509,8 +1588,6 @@ H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void uint8_t *rt_key = (uint8_t*)_rt_key; /*right key*/ hbool_t lt_key_changed = FALSE; /*left key changed?*/ hbool_t rt_key_changed = FALSE; /*right key changed?*/ - unsigned bt_flags = H5AC__NO_FLAGS_SET; - H5B_t *bt = NULL; /*btree node */ herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5B_remove, FAIL) @@ -1526,22 +1603,6 @@ H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void udata, rt_key, &rt_key_changed) == H5B_INS_ERROR) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to remove entry from B-tree") - /* - * If the B-tree is now empty then make sure we mark the root node as - * being at level zero - */ - if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree root node") - - if(0 == bt->nchildren && 0 != bt->level) { - bt->level = 0; - bt_flags |= H5AC__DIRTIED_FLAG; - } /* end if */ - - if(H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, bt_flags) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release node") - bt = NULL; /* Make certain future references will be caught */ - #ifdef H5B_DEBUG H5B_assert(f, dxpl_id, addr, type, udata); #endif @@ -1651,6 +1712,8 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey) /* Set up the "global" information for this file's groups */ shared->type = type; shared->two_k = 2 * H5F_KVALUE(f, type); + shared->sizeof_addr = H5F_SIZEOF_ADDR(f); + shared->sizeof_len = H5F_SIZEOF_SIZE(f); shared->sizeof_rkey = sizeof_rkey; HDassert(shared->sizeof_rkey); shared->sizeof_keys = (shared->two_k + 1) * type->sizeof_nkey; diff --git a/src/H5B2.c b/src/H5B2.c index 5ab9e8a..0d7d86d 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -174,7 +174,7 @@ H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udat done: if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, NULL, "unable to release v2 B-tree header") - if(!ret_value && bt2) + if(!ret_value && bt2) if(H5B2_close(bt2, dxpl_id) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTCLOSEOBJ, NULL, "unable to close v2 B-tree") @@ -239,7 +239,7 @@ H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata) done: if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, NULL, "unable to release v2 B-tree header") - if(!ret_value && bt2) + if(!ret_value && bt2) if(H5B2_close(bt2, dxpl_id) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTCLOSEOBJ, NULL, "unable to close v2 B-tree") diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index 696eb89..668bce4 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -264,9 +264,6 @@ H5B2_hdr_alloc(H5F_t *f) ret_value = hdr; done: - if(!ret_value && hdr) - if(H5B2_hdr_free(hdr) < 0) - HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to free shared v2 B-tree info") FUNC_LEAVE_NOAPI(ret_value) } /* end H5B2_hdr_alloc() */ @@ -602,7 +599,7 @@ H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id) done: /* Unprotect the header with appropriate flags */ - if(hdr && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, cache_flags) < 0) + if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, cache_flags) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree header") FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h index c336227..5817d22 100644 --- a/src/H5B2pkg.h +++ b/src/H5B2pkg.h @@ -275,14 +275,14 @@ H5_DLL H5B2_internal_t *H5B2_protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, /* Routines for allocating nodes */ H5_DLL herr_t H5B2_split_root(H5B2_hdr_t *hdr, hid_t dxpl_id); -H5_DLL herr_t H5B2_create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, +H5_DLL herr_t H5B2_create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr); /* Routines for inserting records */ -H5_DLL herr_t H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, +H5_DLL herr_t H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr, void *udata); -H5_DLL herr_t H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, +H5_DLL herr_t H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr, void *udata); /* Routines for iterating over nodes/records */ diff --git a/src/H5Bcache.c b/src/H5Bcache.c index cc5bbbf..99cd0cd 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -54,9 +54,6 @@ /* Local Prototypes */ /********************/ -/* General routines */ -static herr_t H5B_serialize(const H5F_t *f, const H5B_t *bt); - /* Metadata cache callbacks */ static H5B_t *H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, void *udata); static herr_t H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned UNUSED * flags_ptr); @@ -86,78 +83,6 @@ const H5AC_class_t H5AC_BT[1] = {{ /*------------------------------------------------------------------------- - * Function: H5B_serialize - * - * Purpose: Serialize the data structure for writing to disk. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Bill Wendling - * wendling@ncsa.uiuc.edu - * Sept. 15, 2003 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5B_serialize(const H5F_t *f, const H5B_t *bt) -{ - H5B_shared_t *shared=NULL; /* Pointer to shared B-tree info */ - unsigned u; - uint8_t *p; /* Pointer into raw data buffer */ - uint8_t *native; /* Pointer to native keys */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(H5B_serialize, FAIL) - - /* check arguments */ - HDassert(f); - HDassert(bt); - HDassert(bt->rc_shared); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); - HDassert(shared); - - p = shared->page; - - /* magic number */ - HDmemcpy(p, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += 4; - - /* node type and level */ - *p++ = (uint8_t)shared->type->id; - H5_CHECK_OVERFLOW(bt->level, unsigned, uint8_t); - *p++ = (uint8_t)bt->level; - - /* entries used */ - UINT16ENCODE(p, bt->nchildren); - - /* sibling pointers */ - H5F_addr_encode(f, &p, bt->left); - H5F_addr_encode(f, &p, bt->right); - - /* child keys and pointers */ - native = bt->native; - for(u = 0; u < bt->nchildren; ++u) { - /* encode the key */ - if(shared->type->encode(f, bt, p, native) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") - p += shared->sizeof_rkey; - native += shared->type->sizeof_nkey; - - /* encode the child address */ - H5F_addr_encode(f, &p, bt->child[u]); - } /* end for */ - if(bt->nchildren > 0) { - /* Encode the final key */ - if(shared->type->encode(f, bt, p, native) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") - } /* end if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_serialize() */ - - -/*------------------------------------------------------------------------- * Function: H5B_load * * Purpose: Loads a B-tree node from the disk. @@ -194,8 +119,12 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, void *udata) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate B-tree struct") HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t)); + /* Set & increment the ref-counted "shared" B-tree information for the node */ if(NULL == (bt->rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't retrieve B-tree node buffer") + H5RC_INC(bt->rc_shared); + + /* Get a pointer to the shared info, for convenience */ shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); HDassert(shared); @@ -232,7 +161,7 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, void *udata) native = bt->native; for(u = 0; u < bt->nchildren; u++) { /* Decode native key value */ - if((type->decode)(f, bt, p, native) < 0) + if((type->decode)(shared, p, native) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key") p += shared->sizeof_rkey; native += type->sizeof_nkey; @@ -244,7 +173,7 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, void *udata) /* Decode final key */ if(bt->nchildren > 0) { /* Decode native key value */ - if((type->decode)(f, bt, p, native) < 0) + if((type->decode)(shared, p, native) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key") } /* end if */ @@ -290,8 +219,45 @@ H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, uns HDassert(shared->type->encode); if(bt->cache_info.is_dirty) { - if(H5B_serialize(f, bt) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSERIALIZE, FAIL, "unable to serialize B-tree") + uint8_t *p; /* Pointer into raw data buffer */ + uint8_t *native; /* Pointer to native keys */ + unsigned u; /* Local index variable */ + + p = shared->page; + + /* magic number */ + HDmemcpy(p, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC); + p += 4; + + /* node type and level */ + *p++ = (uint8_t)shared->type->id; + H5_CHECK_OVERFLOW(bt->level, unsigned, uint8_t); + *p++ = (uint8_t)bt->level; + + /* entries used */ + UINT16ENCODE(p, bt->nchildren); + + /* sibling pointers */ + H5F_addr_encode(f, &p, bt->left); + H5F_addr_encode(f, &p, bt->right); + + /* child keys and pointers */ + native = bt->native; + for(u = 0; u < bt->nchildren; ++u) { + /* encode the key */ + if(shared->type->encode(shared, p, native) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") + p += shared->sizeof_rkey; + native += shared->type->sizeof_nkey; + + /* encode the child address */ + H5F_addr_encode(f, &p, bt->child[u]); + } /* end for */ + if(bt->nchildren > 0) { + /* Encode the final key */ + if(shared->type->encode(shared, p, native) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") + } /* end if */ /* * Write the disk page. We always write the header, but we don't diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c index aafb999..dff2380 100644 --- a/src/H5Bdbg.c +++ b/src/H5Bdbg.c @@ -126,14 +126,14 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Left Key:"); HDassert(H5B_NKEY(bt,shared,u)); - (void)(type->debug_key)(stream, f, dxpl_id, indent + 6, MAX(0, fwidth - 6), + (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6), H5B_NKEY(bt, shared, u), udata); /* Decode the 'right' key & print it */ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Right Key:"); HDassert(H5B_NKEY(bt, shared, u + 1)); - (void)(type->debug_key)(stream, f, dxpl_id, indent + 6, MAX (0, fwidth - 6), + (void)(type->debug_key)(stream, indent + 6, MAX (0, fwidth - 6), H5B_NKEY(bt, shared, u + 1), udata); } /* end if */ } /* end for */ @@ -239,8 +239,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void tail = tmp; /* Check that the keys are monotonically increasing */ - cmp = (type->cmp2)(f, dxpl_id, H5B_NKEY(bt, shared, i), udata, - H5B_NKEY(bt, shared, i + 1)); + cmp = (type->cmp2)(H5B_NKEY(bt, shared, i), udata, H5B_NKEY(bt, shared, i + 1)); HDassert(cmp < 0); } /* end for */ } /* end if */ diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index 7aedd00..79b5e8a 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -32,6 +32,9 @@ #include "H5Bprivate.h" /* Other private headers needed by this file */ +#include "H5ACprivate.h" /* Metadata cache */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5RCprivate.h" /* Reference counted objects */ /**************************/ @@ -47,9 +50,9 @@ /****************************/ /* The B-tree node as stored in memory... */ -struct H5B_t { - H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */ - /* first field in structure */ +typedef struct H5B_t { + H5AC_info_t cache_info; /* Information for H5AC cache functions */ + /* _must_ be first field in structure */ H5RC_t *rc_shared; /*ref-counted shared info */ unsigned level; /*node level */ unsigned nchildren; /*number of child pointers */ @@ -57,7 +60,7 @@ struct H5B_t { haddr_t right; /*address of right sibling */ uint8_t *native; /*array of keys in native format */ haddr_t *child; /*2k child pointers */ -}; +} H5B_t; /*****************************/ /* Package Private Variables */ @@ -75,6 +78,7 @@ H5FL_BLK_EXTERN(native_block); /* Declare a free list to manage the H5B_t struct */ H5FL_EXTERN(H5B_t); + /******************************/ /* Package Private Prototypes */ /******************************/ diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index 716b608..83a357b 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -33,9 +33,7 @@ /* Private headers needed by this file */ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ #include "H5Fprivate.h" /* File access */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5RCprivate.h" /* Reference counted object functions */ /**************************/ @@ -78,13 +76,17 @@ typedef enum H5B_ins_t { H5B_INS_REMOVE = 5 /*remove current node */ } H5B_ins_t; +/* Enum for specifying the direction of the critical key in relation to the + * child */ +typedef enum H5B_dir_t { + H5B_LEFT = 0, /* Critical key is to the left */ + H5B_RIGHT = 1 /* Critical key is to the right */ +} H5B_dir_t; + /* Define the operator callback function pointer for H5B_iterate() */ typedef int (*H5B_operator_t)(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, const void *_rt_key, void *_udata); -/* Typedef for B-tree in memory (defined in H5Bpkg.h) */ -typedef struct H5B_t H5B_t; - /* Each B-tree has certain information that can be shared across all * the instances of nodes in that B-tree. */ @@ -94,6 +96,8 @@ typedef struct H5B_shared_t { size_t sizeof_rkey; /* Size of raw (disk) key */ size_t sizeof_rnode; /* Size of raw (disk) node */ size_t sizeof_keys; /* Size of native (memory) key node */ + size_t sizeof_addr; /* Size of file address (in bytes) */ + size_t sizeof_len; /* Size of file lengths (in bytes) */ uint8_t *page; /* Disk page */ size_t *nkey; /* Offsets of each native key in native key buffer */ } H5B_shared_t; @@ -111,8 +115,8 @@ typedef struct H5B_class_t { size_t sizeof_nkey; /*size of native (memory) key*/ H5RC_t * (*get_shared)(const H5F_t*, const void*); /*shared info for node */ herr_t (*new_node)(H5F_t*, hid_t, H5B_ins_t, void*, void*, void*, haddr_t*); - int (*cmp2)(H5F_t*, hid_t, void*, void*, void*); /*compare 2 keys */ - int (*cmp3)(H5F_t*, hid_t, void*, void*, void*); /*compare 3 keys */ + int (*cmp2)(void*, void*, void*); /*compare 2 keys */ + int (*cmp3)(void*, void*, void*); /*compare 3 keys */ htri_t (*found)(H5F_t*, hid_t, haddr_t, const void*, void*); /* insert new data */ @@ -123,14 +127,17 @@ typedef struct H5B_class_t { hbool_t follow_min; hbool_t follow_max; + /* The direction of the key that is intrinsically associated with each node */ + H5B_dir_t critical_key; + /* remove existing data */ H5B_ins_t (*remove)(H5F_t*, hid_t, haddr_t, void*, hbool_t*, void*, void*, hbool_t*); /* encode, decode, debug key values */ - herr_t (*decode)(const H5F_t*, const struct H5B_t*, const uint8_t*, void*); - herr_t (*encode)(const H5F_t*, const struct H5B_t*, uint8_t*, void*); - herr_t (*debug_key)(FILE*, H5F_t*, hid_t, int, int, const void*, const void*); + herr_t (*decode)(const H5B_shared_t*, const uint8_t*, void*); + herr_t (*encode)(const H5B_shared_t*, uint8_t*, const void*); + herr_t (*debug_key)(FILE*, int, int, const void*, const void*); } H5B_class_t; /* Information about B-tree */ diff --git a/src/H5C.c b/src/H5C.c index d8688b2..32a4123 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -112,2587 +112,6 @@ #include "H5SLprivate.h" /* Skip lists */ -/**************************************************************************** - * - * We maintain doubly linked lists of instances of H5C_cache_entry_t for a - * variety of reasons -- protected list, LRU list, and the clean and dirty - * LRU lists at present. The following macros support linking and unlinking - * of instances of H5C_cache_entry_t by both their regular and auxilary next - * and previous pointers. - * - * The size and length fields are also maintained. - * - * Note that the relevant pair of prev and next pointers are presumed to be - * NULL on entry in the insertion macros. - * - * Finally, observe that the sanity checking macros evaluate to the empty - * string when H5C_DO_SANITY_CHECKS is FALSE. They also contain calls - * to the HGOTO_ERROR macro, which may not be appropriate in all cases. - * If so, we will need versions of the insertion and deletion macros which - * do not reference the sanity checking macros. - * JRM - 5/5/04 - * - * Changes: - * - * - Removed the line: - * - * ( ( (Size) == (entry_ptr)->size ) && ( (len) != 1 ) ) || - * - * from the H5C__DLL_PRE_REMOVE_SC macro. With the addition of the - * epoch markers used in the age out based cache size reduction algorithm, - * this invarient need not hold, as the epoch markers are of size 0. - * - * One could argue that I should have given the epoch markers a positive - * size, but this would break the index_size = LRU_list_size + pl_size - * + pel_size invarient. - * - * Alternatively, I could pass the current decr_mode in to the macro, - * and just skip the check whenever epoch markers may be in use. - * - * However, any size errors should be caught when the cache is flushed - * and destroyed. Until we are tracking such an error, this should be - * good enough. - * JRM - 12/9/04 - * - * - * - In the H5C__DLL_PRE_INSERT_SC macro, replaced the lines: - * - * ( ( (len) == 1 ) && - * ( ( (head_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || - * ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) - * ) - * ) || - * - * with: - * - * ( ( (len) == 1 ) && - * ( ( (head_ptr) != (tail_ptr) ) || - * ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) - * ) - * ) || - * - * Epoch markers have size 0, so we can now have a non-empty list with - * zero size. Hence the "( (Size) <= 0 )" clause cause false failures - * in the sanity check. Since "Size" is typically a size_t, it can't - * take on negative values, and thus the revised clause "( (Size) < 0 )" - * caused compiler warnings. - * JRM - 12/22/04 - * - * - In the H5C__DLL_SC macro, replaced the lines: - * - * ( ( (len) == 1 ) && - * ( ( (head_ptr) != (tail_ptr) ) || ( (cache_ptr)->size <= 0 ) || - * ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) - * ) - * ) || - * - * with - * - * ( ( (len) == 1 ) && - * ( ( (head_ptr) != (tail_ptr) ) || - * ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) - * ) - * ) || - * - * Epoch markers have size 0, so we can now have a non-empty list with - * zero size. Hence the "( (Size) <= 0 )" clause cause false failures - * in the sanity check. Since "Size" is typically a size_t, it can't - * take on negative values, and thus the revised clause "( (Size) < 0 )" - * caused compiler warnings. - * JRM - 1/10/05 - * - * - Added the H5C__DLL_UPDATE_FOR_SIZE_CHANGE macro and the associated - * sanity checking macros. These macro are used to update the size of - * a DLL when one of its entries changes size. - * - * JRM - 9/8/05 - * - ****************************************************************************/ - -#if H5C_DO_SANITY_CHECKS - -#define H5C__DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ -if ( ( (head_ptr) == NULL ) || \ - ( (tail_ptr) == NULL ) || \ - ( (entry_ptr) == NULL ) || \ - ( (len) <= 0 ) || \ - ( (Size) < (entry_ptr)->size ) || \ - ( ( (entry_ptr)->prev == NULL ) && ( (head_ptr) != (entry_ptr) ) ) || \ - ( ( (entry_ptr)->next == NULL ) && ( (tail_ptr) != (entry_ptr) ) ) || \ - ( ( (len) == 1 ) && \ - ( ! ( ( (head_ptr) == (entry_ptr) ) && \ - ( (tail_ptr) == (entry_ptr) ) && \ - ( (entry_ptr)->next == NULL ) && \ - ( (entry_ptr)->prev == NULL ) && \ - ( (Size) == (entry_ptr)->size ) \ - ) \ - ) \ - ) \ - ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "DLL pre remove SC failed") \ -} - -#define H5C__DLL_SC(head_ptr, tail_ptr, len, Size, fv) \ -if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ - ( (head_ptr) != (tail_ptr) ) \ - ) || \ - ( (len) < 0 ) || \ - ( (Size) < 0 ) || \ - ( ( (len) == 1 ) && \ - ( ( (head_ptr) != (tail_ptr) ) || \ - ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) \ - ) \ - ) || \ - ( ( (len) >= 1 ) && \ - ( ( (head_ptr) == NULL ) || ( (head_ptr)->prev != NULL ) || \ - ( (tail_ptr) == NULL ) || ( (tail_ptr)->next != NULL ) \ - ) \ - ) \ - ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "DLL sanity check failed") \ -} - -#define H5C__DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ -if ( ( (entry_ptr) == NULL ) || \ - ( (entry_ptr)->next != NULL ) || \ - ( (entry_ptr)->prev != NULL ) || \ - ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ - ( (head_ptr) != (tail_ptr) ) \ - ) || \ - ( (len) < 0 ) || \ - ( ( (len) == 1 ) && \ - ( ( (head_ptr) != (tail_ptr) ) || \ - ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) \ - ) \ - ) || \ - ( ( (len) >= 1 ) && \ - ( ( (head_ptr) == NULL ) || ( (head_ptr)->prev != NULL ) || \ - ( (tail_ptr) == NULL ) || ( (tail_ptr)->next != NULL ) \ - ) \ - ) \ - ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "DLL pre insert SC failed") \ -} - -#define H5C__DLL_PRE_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) \ -if ( ( (dll_len) <= 0 ) || \ - ( (dll_size) <= 0 ) || \ - ( (old_size) <= 0 ) || \ - ( (old_size) > (dll_size) ) || \ - ( (new_size) <= 0 ) || \ - ( ( (dll_len) == 1 ) && ( (old_size) != (dll_size) ) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "DLL pre size update SC failed") \ -} - -#define H5C__DLL_POST_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) \ -if ( ( (new_size) > (dll_size) ) || \ - ( ( (dll_len) == 1 ) && ( (new_size) != (dll_size) ) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "DLL post size update SC failed") \ -} - -#else /* H5C_DO_SANITY_CHECKS */ - -#define H5C__DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) -#define H5C__DLL_SC(head_ptr, tail_ptr, len, Size, fv) -#define H5C__DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) -#define H5C__DLL_PRE_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) -#define H5C__DLL_POST_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) - -#endif /* H5C_DO_SANITY_CHECKS */ - - -#define H5C__DLL_APPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val) \ - H5C__DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ - fail_val) \ - if ( (head_ptr) == NULL ) \ - { \ - (head_ptr) = (entry_ptr); \ - (tail_ptr) = (entry_ptr); \ - } \ - else \ - { \ - (tail_ptr)->next = (entry_ptr); \ - (entry_ptr)->prev = (tail_ptr); \ - (tail_ptr) = (entry_ptr); \ - } \ - (len)++; \ - (Size) += (entry_ptr)->size; - -#define H5C__DLL_PREPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val) \ - H5C__DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ - fail_val) \ - if ( (head_ptr) == NULL ) \ - { \ - (head_ptr) = (entry_ptr); \ - (tail_ptr) = (entry_ptr); \ - } \ - else \ - { \ - (head_ptr)->prev = (entry_ptr); \ - (entry_ptr)->next = (head_ptr); \ - (head_ptr) = (entry_ptr); \ - } \ - (len)++; \ - (Size) += entry_ptr->size; - -#define H5C__DLL_REMOVE(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val) \ - H5C__DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ - fail_val) \ - { \ - if ( (head_ptr) == (entry_ptr) ) \ - { \ - (head_ptr) = (entry_ptr)->next; \ - if ( (head_ptr) != NULL ) \ - { \ - (head_ptr)->prev = NULL; \ - } \ - } \ - else \ - { \ - (entry_ptr)->prev->next = (entry_ptr)->next; \ - } \ - if ( (tail_ptr) == (entry_ptr) ) \ - { \ - (tail_ptr) = (entry_ptr)->prev; \ - if ( (tail_ptr) != NULL ) \ - { \ - (tail_ptr)->next = NULL; \ - } \ - } \ - else \ - { \ - (entry_ptr)->next->prev = (entry_ptr)->prev; \ - } \ - entry_ptr->next = NULL; \ - entry_ptr->prev = NULL; \ - (len)--; \ - (Size) -= entry_ptr->size; \ - } - -#define H5C__DLL_UPDATE_FOR_SIZE_CHANGE(dll_len, dll_size, old_size, new_size) \ - H5C__DLL_PRE_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) \ - (dll_size) -= (old_size); \ - (dll_size) += (new_size); \ - H5C__DLL_POST_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) - -#if H5C_DO_SANITY_CHECKS - -#define H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \ -if ( ( (hd_ptr) == NULL ) || \ - ( (tail_ptr) == NULL ) || \ - ( (entry_ptr) == NULL ) || \ - ( (len) <= 0 ) || \ - ( (Size) < (entry_ptr)->size ) || \ - ( ( (Size) == (entry_ptr)->size ) && ( ! ( (len) == 1 ) ) ) || \ - ( ( (entry_ptr)->aux_prev == NULL ) && ( (hd_ptr) != (entry_ptr) ) ) || \ - ( ( (entry_ptr)->aux_next == NULL ) && ( (tail_ptr) != (entry_ptr) ) ) || \ - ( ( (len) == 1 ) && \ - ( ! ( ( (hd_ptr) == (entry_ptr) ) && ( (tail_ptr) == (entry_ptr) ) && \ - ( (entry_ptr)->aux_next == NULL ) && \ - ( (entry_ptr)->aux_prev == NULL ) && \ - ( (Size) == (entry_ptr)->size ) \ - ) \ - ) \ - ) \ - ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "aux DLL pre remove SC failed") \ -} - -#define H5C__AUX_DLL_SC(head_ptr, tail_ptr, len, Size, fv) \ -if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ - ( (head_ptr) != (tail_ptr) ) \ - ) || \ - ( (len) < 0 ) || \ - ( (Size) < 0 ) || \ - ( ( (len) == 1 ) && \ - ( ( (head_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || \ - ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) \ - ) \ - ) || \ - ( ( (len) >= 1 ) && \ - ( ( (head_ptr) == NULL ) || ( (head_ptr)->aux_prev != NULL ) || \ - ( (tail_ptr) == NULL ) || ( (tail_ptr)->aux_next != NULL ) \ - ) \ - ) \ - ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "AUX DLL sanity check failed") \ -} - -#define H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \ -if ( ( (entry_ptr) == NULL ) || \ - ( (entry_ptr)->aux_next != NULL ) || \ - ( (entry_ptr)->aux_prev != NULL ) || \ - ( ( ( (hd_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ - ( (hd_ptr) != (tail_ptr) ) \ - ) || \ - ( (len) < 0 ) || \ - ( ( (len) == 1 ) && \ - ( ( (hd_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || \ - ( (hd_ptr) == NULL ) || ( (hd_ptr)->size != (Size) ) \ - ) \ - ) || \ - ( ( (len) >= 1 ) && \ - ( ( (hd_ptr) == NULL ) || ( (hd_ptr)->aux_prev != NULL ) || \ - ( (tail_ptr) == NULL ) || ( (tail_ptr)->aux_next != NULL ) \ - ) \ - ) \ - ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "AUX DLL pre insert SC failed") \ -} - -#else /* H5C_DO_SANITY_CHECKS */ - -#define H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) -#define H5C__AUX_DLL_SC(head_ptr, tail_ptr, len, Size, fv) -#define H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) - -#endif /* H5C_DO_SANITY_CHECKS */ - - -#define H5C__AUX_DLL_APPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val)\ - H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ - fail_val) \ - if ( (head_ptr) == NULL ) \ - { \ - (head_ptr) = (entry_ptr); \ - (tail_ptr) = (entry_ptr); \ - } \ - else \ - { \ - (tail_ptr)->aux_next = (entry_ptr); \ - (entry_ptr)->aux_prev = (tail_ptr); \ - (tail_ptr) = (entry_ptr); \ - } \ - (len)++; \ - (Size) += entry_ptr->size; - -#define H5C__AUX_DLL_PREPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ - H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ - fv) \ - if ( (head_ptr) == NULL ) \ - { \ - (head_ptr) = (entry_ptr); \ - (tail_ptr) = (entry_ptr); \ - } \ - else \ - { \ - (head_ptr)->aux_prev = (entry_ptr); \ - (entry_ptr)->aux_next = (head_ptr); \ - (head_ptr) = (entry_ptr); \ - } \ - (len)++; \ - (Size) += entry_ptr->size; - -#define H5C__AUX_DLL_REMOVE(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ - H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ - fv) \ - { \ - if ( (head_ptr) == (entry_ptr) ) \ - { \ - (head_ptr) = (entry_ptr)->aux_next; \ - if ( (head_ptr) != NULL ) \ - { \ - (head_ptr)->aux_prev = NULL; \ - } \ - } \ - else \ - { \ - (entry_ptr)->aux_prev->aux_next = (entry_ptr)->aux_next; \ - } \ - if ( (tail_ptr) == (entry_ptr) ) \ - { \ - (tail_ptr) = (entry_ptr)->aux_prev; \ - if ( (tail_ptr) != NULL ) \ - { \ - (tail_ptr)->aux_next = NULL; \ - } \ - } \ - else \ - { \ - (entry_ptr)->aux_next->aux_prev = (entry_ptr)->aux_prev; \ - } \ - entry_ptr->aux_next = NULL; \ - entry_ptr->aux_prev = NULL; \ - (len)--; \ - (Size) -= entry_ptr->size; \ - } - - -/*********************************************************************** - * - * Stats collection macros - * - * The following macros must handle stats collection when this collection - * is enabled, and evaluate to the empty string when it is not. - * - * The sole exception to this rule is - * H5C__UPDATE_CACHE_HIT_RATE_STATS(), which is always active as - * the cache hit rate stats are always collected and available. - * - * Changes: - * - * JRM -- 3/21/06 - * Added / updated macros for pinned entry related stats. - * - * JRM -- 8/9/06 - * More pinned entry stats related updates. - * - * JRM -- 3/31/07 - * Updated H5C__UPDATE_STATS_FOR_PROTECT() to keep stats on - * read and write protects. - * - * MAM -- 1/15/09 - * Created H5C__UPDATE_MAX_INDEX_SIZE_STATS to contain - * common code within macros that update the maximum - * index, clean_index, and dirty_index statistics fields. - * - ***********************************************************************/ - -#define H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit) \ - (cache_ptr->cache_accesses)++; \ - if ( hit ) { \ - (cache_ptr->cache_hits)++; \ - } \ - -#if H5C_COLLECT_CACHE_STATS - -#define H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ - if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ - (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ - if ( (cache_ptr)->clean_index_size > \ - (cache_ptr)->max_clean_index_size ) \ - (cache_ptr)->max_clean_index_size = \ - (cache_ptr)->clean_index_size; \ - if ( (cache_ptr)->dirty_index_size > \ - (cache_ptr)->max_dirty_index_size ) \ - (cache_ptr)->max_dirty_index_size = \ - (cache_ptr)->dirty_index_size; - -#define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) \ - (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++; - -#define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) \ - if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \ - (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ - if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ - (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ - if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ - (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ - if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ - (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; - -#define H5C__UPDATE_STATS_FOR_RENAME(cache_ptr, entry_ptr) \ - if ( cache_ptr->flush_in_progress ) { \ - ((cache_ptr)->cache_flush_renames[(entry_ptr)->type->id])++; \ - } \ - if ( entry_ptr->flush_in_progress ) { \ - ((cache_ptr)->entry_flush_renames[(entry_ptr)->type->id])++; \ - } \ - (((cache_ptr)->renames)[(entry_ptr)->type->id])++; - -#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)\ - if ( cache_ptr->flush_in_progress ) { \ - ((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \ - } \ - if ( entry_ptr->flush_in_progress ) { \ - ((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \ - } \ - if ( (entry_ptr)->size < (new_size) ) { \ - ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \ - H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ - if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ - (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ - if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ - (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \ - } else if ( (entry_ptr)->size > (new_size) ) { \ - ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \ - } - -#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \ - (cache_ptr)->total_ht_insertions++; - -#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \ - (cache_ptr)->total_ht_deletions++; - -#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) \ - if ( success ) { \ - (cache_ptr)->successful_ht_searches++; \ - (cache_ptr)->total_successful_ht_search_depth += depth; \ - } else { \ - (cache_ptr)->failed_ht_searches++; \ - (cache_ptr)->total_failed_ht_search_depth += depth; \ - } - -#define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) \ - ((cache_ptr)->unpins)[(entry_ptr)->type->id]++; - -#if H5C_COLLECT_CACHE_ENTRY_STATS - -#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr) \ - (entry_ptr)->accesses = 0; \ - (entry_ptr)->clears = 0; \ - (entry_ptr)->flushes = 0; \ - (entry_ptr)->pins = 0; - -#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \ - (((cache_ptr)->clears)[(entry_ptr)->type->id])++; \ - if ( (entry_ptr)->is_pinned ) { \ - (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \ - } \ - ((entry_ptr)->clears)++; - -#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \ - (((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \ - if ( (entry_ptr)->is_pinned ) { \ - (((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \ - } \ - ((entry_ptr)->flushes)++; - -#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \ - (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; \ - if ( (entry_ptr)->accesses > \ - ((cache_ptr)->max_accesses)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->max_accesses)[(entry_ptr)->type->id] \ - = (entry_ptr)->accesses; \ - } \ - if ( (entry_ptr)->accesses < \ - ((cache_ptr)->min_accesses)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->min_accesses)[(entry_ptr)->type->id] \ - = (entry_ptr)->accesses; \ - } \ - if ( (entry_ptr)->clears > \ - ((cache_ptr)->max_clears)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->max_clears)[(entry_ptr)->type->id] \ - = (entry_ptr)->clears; \ - } \ - if ( (entry_ptr)->flushes > \ - ((cache_ptr)->max_flushes)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->max_flushes)[(entry_ptr)->type->id] \ - = (entry_ptr)->flushes; \ - } \ - if ( (entry_ptr)->size > \ - ((cache_ptr)->max_size)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->max_size)[(entry_ptr)->type->id] \ - = (entry_ptr)->size; \ - } \ - if ( (entry_ptr)->pins > \ - ((cache_ptr)->max_pins)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->max_pins)[(entry_ptr)->type->id] \ - = (entry_ptr)->pins; \ - } - -#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \ - (((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \ - if ( (entry_ptr)->is_pinned ) { \ - (((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \ - ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \ - (entry_ptr)->pins++; \ - if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ - (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ - if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ - (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; \ - } \ - if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ - (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ - H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ - if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \ - (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ - if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ - (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ - if ( (entry_ptr)->size > \ - ((cache_ptr)->max_size)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->max_size)[(entry_ptr)->type->id] \ - = (entry_ptr)->size; \ - } - -#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \ - if ( hit ) \ - ((cache_ptr)->hits)[(entry_ptr)->type->id]++; \ - else \ - ((cache_ptr)->misses)[(entry_ptr)->type->id]++; \ - if ( ! ((entry_ptr)->is_read_only) ) { \ - ((cache_ptr)->write_protects)[(entry_ptr)->type->id]++; \ - } else { \ - ((cache_ptr)->read_protects)[(entry_ptr)->type->id]++; \ - if ( ((entry_ptr)->ro_ref_count) > \ - ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] = \ - ((entry_ptr)->ro_ref_count); \ - } \ - } \ - if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ - (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ - H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ - if ( (cache_ptr)->pl_len > (cache_ptr)->max_pl_len ) \ - (cache_ptr)->max_pl_len = (cache_ptr)->pl_len; \ - if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ - (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \ - if ( (entry_ptr)->size > \ - ((cache_ptr)->max_size)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->max_size)[(entry_ptr)->type->id] \ - = (entry_ptr)->size; \ - } \ - ((entry_ptr)->accesses)++; - -#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \ - ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \ - (entry_ptr)->pins++; \ - if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ - (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ - if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ - (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; - -#else /* H5C_COLLECT_CACHE_ENTRY_STATS */ - -#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr) - -#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \ - if ( (entry_ptr)->is_pinned ) { \ - (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \ - } \ - (((cache_ptr)->clears)[(entry_ptr)->type->id])++; - -#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \ - (((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \ - if ( (entry_ptr)->is_pinned ) { \ - (((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \ - } - -#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \ - (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; - -#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \ - (((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \ - if ( (entry_ptr)->is_pinned ) { \ - (((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \ - ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \ - if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ - (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ - if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ - (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; \ - } \ - if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ - (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ - H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ - if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \ - (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ - if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ - (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; - -#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \ - if ( hit ) \ - ((cache_ptr)->hits)[(entry_ptr)->type->id]++; \ - else \ - ((cache_ptr)->misses)[(entry_ptr)->type->id]++; \ - if ( ! ((entry_ptr)->is_read_only) ) { \ - ((cache_ptr)->write_protects)[(entry_ptr)->type->id]++; \ - } else { \ - ((cache_ptr)->read_protects)[(entry_ptr)->type->id]++; \ - if ( ((entry_ptr)->ro_ref_count) > \ - ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] ) { \ - ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] = \ - ((entry_ptr)->ro_ref_count); \ - } \ - } \ - if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ - (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ - H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ - if ( (cache_ptr)->pl_len > (cache_ptr)->max_pl_len ) \ - (cache_ptr)->max_pl_len = (cache_ptr)->pl_len; \ - if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ - (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; - -#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \ - ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \ - if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ - (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ - if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ - (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; - -#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ - -#else /* H5C_COLLECT_CACHE_STATS */ - -#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr) -#define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) -#define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) -#define H5C__UPDATE_STATS_FOR_RENAME(cache_ptr, entry_ptr) -#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) -#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) -#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) -#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) -#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) -#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) -#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) -#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) -#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) -#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) -#define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) - -#endif /* H5C_COLLECT_CACHE_STATS */ - - -/*********************************************************************** - * - * Hash table access and manipulation macros: - * - * The following macros handle searches, insertions, and deletion in - * the hash table. - * - * When modifying these macros, remember to modify the similar macros - * in tst/cache.c - * - * Changes: - * - * - Updated existing index macros and sanity check macros to maintain - * the clean_index_size and dirty_index_size fields of H5C_t. Also - * added macros to allow us to track entry cleans and dirties. - * - * JRM -- 11/5/08 - * - ***********************************************************************/ - -/* H5C__HASH_TABLE_LEN is defined in H5Cpkg.h. It mut be a power of two. */ - -#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3) - -#define H5C__HASH_FCN(x) (int)(((x) & H5C__HASH_MASK) >> 3) - -#if H5C_DO_SANITY_CHECKS - -#define H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ - ( (entry_ptr) == NULL ) || \ - ( ! H5F_addr_defined((entry_ptr)->addr) ) || \ - ( (entry_ptr)->ht_next != NULL ) || \ - ( (entry_ptr)->ht_prev != NULL ) || \ - ( (entry_ptr)->size <= 0 ) || \ - ( (k = H5C__HASH_FCN((entry_ptr)->addr)) < 0 ) || \ - ( k >= H5C__HASH_TABLE_LEN ) || \ - ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ - "Pre HT insert SC failed") \ -} - -#define H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ - ( (cache_ptr)->index_len < 1 ) || \ - ( (entry_ptr) == NULL ) || \ - ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ - ( ! H5F_addr_defined((entry_ptr)->addr) ) || \ - ( (entry_ptr)->size <= 0 ) || \ - ( H5C__HASH_FCN((entry_ptr)->addr) < 0 ) || \ - ( H5C__HASH_FCN((entry_ptr)->addr) >= H5C__HASH_TABLE_LEN ) || \ - ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] \ - == NULL ) || \ - ( ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] \ - != (entry_ptr) ) && \ - ( (entry_ptr)->ht_prev == NULL ) ) || \ - ( ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] == \ - (entry_ptr) ) && \ - ( (entry_ptr)->ht_prev != NULL ) ) || \ - ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Pre HT remove SC failed") \ -} - -#define H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ - ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ - ( ! H5F_addr_defined(Addr) ) || \ - ( H5C__HASH_FCN(Addr) < 0 ) || \ - ( H5C__HASH_FCN(Addr) >= H5C__HASH_TABLE_LEN ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "Pre HT search SC failed") \ -} - -#define H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ - ( (cache_ptr)->index_len < 1 ) || \ - ( (entry_ptr) == NULL ) || \ - ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ - ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ - ( H5F_addr_ne((entry_ptr)->addr, (Addr)) ) || \ - ( (entry_ptr)->size <= 0 ) || \ - ( ((cache_ptr)->index)[k] == NULL ) || \ - ( ( ((cache_ptr)->index)[k] != (entry_ptr) ) && \ - ( (entry_ptr)->ht_prev == NULL ) ) || \ - ( ( ((cache_ptr)->index)[k] == (entry_ptr) ) && \ - ( (entry_ptr)->ht_prev != NULL ) ) || \ - ( ( (entry_ptr)->ht_prev != NULL ) && \ - ( (entry_ptr)->ht_prev->ht_next != (entry_ptr) ) ) || \ - ( ( (entry_ptr)->ht_next != NULL ) && \ - ( (entry_ptr)->ht_next->ht_prev != (entry_ptr) ) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ - "Post successful HT search SC failed") \ -} - -#define H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \ -if ( ( (cache_ptr) == NULL ) || \ - ( ((cache_ptr)->index)[k] != (entry_ptr) ) || \ - ( (entry_ptr)->ht_prev != NULL ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ - "Post HT shift to front SC failed") \ -} - -#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->index_len <= 0 ) || \ - ( (cache_ptr)->index_size <= 0 ) || \ - ( (new_size) <= 0 ) || \ - ( (old_size) > (cache_ptr)->index_size ) || \ - ( (new_size) <= 0 ) || \ - ( ( (cache_ptr)->index_len == 1 ) && \ - ( (cache_ptr)->index_size != (old_size) ) ) || \ - ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) || \ - ( (entry_ptr == NULL) ) || \ - ( ( !( was_clean ) || \ - ( (cache_ptr)->clean_index_size < (old_size) ) ) && \ - ( ( (was_clean) ) || \ - ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) \ - ( (entry_ptr) == NULL ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Pre HT entry size change SC failed") \ -} - -#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->index_len <= 0 ) || \ - ( (cache_ptr)->index_size <= 0 ) || \ - ( (new_size) > (cache_ptr)->index_size ) || \ - ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) || \ - ( ( !((entry_ptr)->is_dirty ) || \ - ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \ - ( ( ((entry_ptr)->is_dirty) ) || \ - ( (cache_ptr)->clean_index_size < (new_size) ) ) ) \ - ( ( (cache_ptr)->index_len == 1 ) && \ - ( (cache_ptr)->index_size != (new_size) ) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Post HT entry size change SC failed") \ -} - -#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) \ -if ( \ - ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ - ( (cache_ptr)->index_len <= 0 ) || \ - ( (entry_ptr) == NULL ) || \ - ( (entry_ptr)->is_dirty != FALSE ) || \ - ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ - ( (cache_ptr)->dirty_index_size < (entry_ptr)->size ) || \ - ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Pre HT update for entry clean SC failed") \ -} - -#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) \ -if ( \ - ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ - ( (cache_ptr)->index_len <= 0 ) || \ - ( (entry_ptr) == NULL ) || \ - ( (entry_ptr)->is_dirty != TRUE ) || \ - ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ - ( (cache_ptr)->clean_index_size < (entry_ptr)->size ) || \ - ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Pre HT update for entry dirty SC failed") \ -} - -#define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) \ -if ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Post HT update for entry clean SC failed") \ -} - -#define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) \ -if ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Post HT update for entry dirty SC failed") \ -} - -#else /* H5C_DO_SANITY_CHECKS */ - -#define H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) -#define H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) -#define H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) -#define H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) -#define H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) -#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) -#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) -#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) -#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr) -#define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) -#define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) - -#endif /* H5C_DO_SANITY_CHECKS */ - - -#define H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, fail_val) \ -{ \ - int k; \ - H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \ - k = H5C__HASH_FCN((entry_ptr)->addr); \ - if ( ((cache_ptr)->index)[k] == NULL ) \ - { \ - ((cache_ptr)->index)[k] = (entry_ptr); \ - } \ - else \ - { \ - (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ - (entry_ptr)->ht_next->ht_prev = (entry_ptr); \ - ((cache_ptr)->index)[k] = (entry_ptr); \ - } \ - (cache_ptr)->index_len++; \ - (cache_ptr)->index_size += (entry_ptr)->size; \ - if ( (entry_ptr)->is_dirty ) { \ - (cache_ptr)->dirty_index_size += (entry_ptr)->size; \ - } else { \ - (cache_ptr)->clean_index_size += (entry_ptr)->size; \ - } \ - H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \ -} - -#define H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) \ -{ \ - int k; \ - H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \ - k = H5C__HASH_FCN((entry_ptr)->addr); \ - if ( (entry_ptr)->ht_next ) \ - { \ - (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ - } \ - if ( (entry_ptr)->ht_prev ) \ - { \ - (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ - } \ - if ( ((cache_ptr)->index)[k] == (entry_ptr) ) \ - { \ - ((cache_ptr)->index)[k] = (entry_ptr)->ht_next; \ - } \ - (entry_ptr)->ht_next = NULL; \ - (entry_ptr)->ht_prev = NULL; \ - (cache_ptr)->index_len--; \ - (cache_ptr)->index_size -= (entry_ptr)->size; \ - if ( (entry_ptr)->is_dirty ) { \ - (cache_ptr)->dirty_index_size -= (entry_ptr)->size; \ - } else { \ - (cache_ptr)->clean_index_size -= (entry_ptr)->size; \ - } \ - H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \ -} - -#define H5C__SEARCH_INDEX(cache_ptr, Addr, entry_ptr, fail_val) \ -{ \ - int k; \ - int depth = 0; \ - H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ - k = H5C__HASH_FCN(Addr); \ - entry_ptr = ((cache_ptr)->index)[k]; \ - while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \ - { \ - (entry_ptr) = (entry_ptr)->ht_next; \ - (depth)++; \ - } \ - if ( entry_ptr ) \ - { \ - H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \ - if ( entry_ptr != ((cache_ptr)->index)[k] ) \ - { \ - if ( (entry_ptr)->ht_next ) \ - { \ - (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ - } \ - HDassert( (entry_ptr)->ht_prev != NULL ); \ - (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ - ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \ - (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ - (entry_ptr)->ht_prev = NULL; \ - ((cache_ptr)->index)[k] = (entry_ptr); \ - H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \ - } \ - } \ - H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, (entry_ptr != NULL), depth) \ -} - -#define H5C__SEARCH_INDEX_NO_STATS(cache_ptr, Addr, entry_ptr, fail_val) \ -{ \ - int k; \ - int depth = 0; \ - H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ - k = H5C__HASH_FCN(Addr); \ - entry_ptr = ((cache_ptr)->index)[k]; \ - while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \ - { \ - (entry_ptr) = (entry_ptr)->ht_next; \ - (depth)++; \ - } \ - if ( entry_ptr ) \ - { \ - H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \ - if ( entry_ptr != ((cache_ptr)->index)[k] ) \ - { \ - if ( (entry_ptr)->ht_next ) \ - { \ - (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ - } \ - HDassert( (entry_ptr)->ht_prev != NULL ); \ - (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ - ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \ - (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ - (entry_ptr)->ht_prev = NULL; \ - ((cache_ptr)->index)[k] = (entry_ptr); \ - H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \ - } \ - } \ -} - -#define H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr) \ -{ \ - H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \ - (cache_ptr)->dirty_index_size -= (entry_ptr)->size; \ - (cache_ptr)->clean_index_size += (entry_ptr)->size; \ - H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \ -} - -#define H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr) \ -{ \ - H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \ - (cache_ptr)->clean_index_size -= (entry_ptr)->size; \ - (cache_ptr)->dirty_index_size += (entry_ptr)->size; \ - H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \ -} - -#define H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) \ -{ \ - H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) \ - (cache_ptr)->index_size -= (old_size); \ - (cache_ptr)->index_size += (new_size); \ - if ( was_clean ) { \ - (cache_ptr)->clean_index_size -= (old_size); \ - } else { \ - (cache_ptr)->dirty_index_size -= (old_size); \ - } \ - if ( (entry_ptr)->is_dirty ) { \ - (cache_ptr)->dirty_index_size += (new_size); \ - } else { \ - (cache_ptr)->clean_index_size += (new_size); \ - } \ - H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, entry_ptr) \ -} - - -/************************************************************************** - * - * Skip list insertion and deletion macros: - * - * These used to be functions, but I converted them to macros to avoid some - * function call overhead. - * - **************************************************************************/ - -/*------------------------------------------------------------------------- - * - * Macro: H5C__INSERT_ENTRY_IN_SLIST - * - * Purpose: Insert the specified instance of H5C_cache_entry_t into - * the skip list in the specified instance of H5C_t. Update - * the associated length and size fields. - * - * Return: N/A - * - * Programmer: John Mainzer, 5/10/04 - * - * Modifications: - * - * JRM -- 7/21/04 - * Updated function to set the in_tree flag when inserting - * an entry into the tree. Also modified the function to - * update the tree size and len fields instead of the similar - * index fields. - * - * All of this is part of the modifications to support the - * hash table. - * - * JRM -- 7/27/04 - * Converted the function H5C_insert_entry_in_tree() into - * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of - * wringing a little more speed out of the cache. - * - * Note that we don't bother to check if the entry is already - * in the tree -- if it is, H5SL_insert() will fail. - * - * QAK -- 11/27/04 - * Switched over to using skip list routines. - * - * JRM -- 6/27/06 - * Added fail_val parameter. - * - * JRM -- 8/25/06 - * Added the H5C_DO_SANITY_CHECKS version of the macro. - * - * This version maintains the slist_len_increase and - * slist_size_increase fields that are used in sanity - * checks in the flush routines. - * - * All this is needed as the fractal heap needs to be - * able to dirty, resize and/or rename entries during the - * flush. - * - *------------------------------------------------------------------------- - */ - -#if H5C_DO_SANITY_CHECKS - -#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( (entry_ptr)->size > 0 ); \ - HDassert( H5F_addr_defined((entry_ptr)->addr) ); \ - HDassert( !((entry_ptr)->in_slist) ); \ - \ - if ( H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, &(entry_ptr)->addr) \ - < 0 ) \ - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), \ - "Can't insert entry in skip list") \ - \ - (entry_ptr)->in_slist = TRUE; \ - (cache_ptr)->slist_len++; \ - (cache_ptr)->slist_size += (entry_ptr)->size; \ - (cache_ptr)->slist_len_increase++; \ - (cache_ptr)->slist_size_increase += (entry_ptr)->size; \ - \ - HDassert( (cache_ptr)->slist_len > 0 ); \ - HDassert( (cache_ptr)->slist_size > 0 ); \ - \ -} /* H5C__INSERT_ENTRY_IN_SLIST */ - -#else /* H5C_DO_SANITY_CHECKS */ - -#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( (entry_ptr)->size > 0 ); \ - HDassert( H5F_addr_defined((entry_ptr)->addr) ); \ - HDassert( !((entry_ptr)->in_slist) ); \ - \ - if ( H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, &(entry_ptr)->addr) \ - < 0 ) \ - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), \ - "Can't insert entry in skip list") \ - \ - (entry_ptr)->in_slist = TRUE; \ - (cache_ptr)->slist_len++; \ - (cache_ptr)->slist_size += (entry_ptr)->size; \ - \ - HDassert( (cache_ptr)->slist_len > 0 ); \ - HDassert( (cache_ptr)->slist_size > 0 ); \ - \ -} /* H5C__INSERT_ENTRY_IN_SLIST */ - -#endif /* H5C_DO_SANITY_CHECKS */ - - -/*------------------------------------------------------------------------- - * - * Function: H5C__REMOVE_ENTRY_FROM_SLIST - * - * Purpose: Remove the specified instance of H5C_cache_entry_t from the - * index skip list in the specified instance of H5C_t. Update - * the associated length and size fields. - * - * Return: N/A - * - * Programmer: John Mainzer, 5/10/04 - * - * Modifications: - * - * JRM -- 7/21/04 - * Updated function for the addition of the hash table. - * - * JRM - 7/27/04 - * Converted from the function H5C_remove_entry_from_tree() - * to the macro H5C__REMOVE_ENTRY_FROM_TREE in the hopes of - * wringing a little more performance out of the cache. - * - * QAK -- 11/27/04 - * Switched over to using skip list routines. - * - * JRM -- 3/28/07 - * Updated sanity checks for the new is_read_only and - * ro_ref_count fields in H5C_cache_entry_t. - * - *------------------------------------------------------------------------- - */ - -#define H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - HDassert( (entry_ptr)->in_slist ); \ - HDassert( (cache_ptr)->slist_ptr ); \ - \ - if ( H5SL_remove((cache_ptr)->slist_ptr, &(entry_ptr)->addr) \ - != (entry_ptr) ) \ - \ - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, \ - "Can't delete entry from skip list.") \ - \ - HDassert( (cache_ptr)->slist_len > 0 ); \ - (cache_ptr)->slist_len--; \ - HDassert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \ - (cache_ptr)->slist_size -= (entry_ptr)->size; \ - (entry_ptr)->in_slist = FALSE; \ -} /* H5C__REMOVE_ENTRY_FROM_SLIST */ - - -/*------------------------------------------------------------------------- - * - * Function: H5C__UPDATE_SLIST_FOR_SIZE_CHANGE - * - * Purpose: Update cache_ptr->slist_size for a change in the size of - * and entry in the slist. - * - * Return: N/A - * - * Programmer: John Mainzer, 9/07/05 - * - * Modifications: - * - * JRM -- 8/27/06 - * Added the H5C_DO_SANITY_CHECKS version of the macro. - * - * This version maintains the slist_size_increase field - * that are used in sanity checks in the flush routines. - * - * All this is needed as the fractal heap needs to be - * able to dirty, resize and/or rename entries during the - * flush. - * - *------------------------------------------------------------------------- - */ - -#if H5C_DO_SANITY_CHECKS - -#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (old_size) > 0 ); \ - HDassert( (new_size) > 0 ); \ - HDassert( (old_size) <= (cache_ptr)->slist_size ); \ - HDassert( (cache_ptr)->slist_len > 0 ); \ - HDassert( ((cache_ptr)->slist_len > 1) || \ - ( (cache_ptr)->slist_size == (old_size) ) ); \ - \ - (cache_ptr)->slist_size -= (old_size); \ - (cache_ptr)->slist_size += (new_size); \ - \ - (cache_ptr)->slist_size_increase -= (int64_t)(old_size); \ - (cache_ptr)->slist_size_increase += (int64_t)(new_size); \ - \ - HDassert( (new_size) <= (cache_ptr)->slist_size ); \ - HDassert( ( (cache_ptr)->slist_len > 1 ) || \ - ( (cache_ptr)->slist_size == (new_size) ) ); \ -} /* H5C__REMOVE_ENTRY_FROM_SLIST */ - -#else /* H5C_DO_SANITY_CHECKS */ - -#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (old_size) > 0 ); \ - HDassert( (new_size) > 0 ); \ - HDassert( (old_size) <= (cache_ptr)->slist_size ); \ - HDassert( (cache_ptr)->slist_len > 0 ); \ - HDassert( ((cache_ptr)->slist_len > 1) || \ - ( (cache_ptr)->slist_size == (old_size) ) ); \ - \ - (cache_ptr)->slist_size -= (old_size); \ - (cache_ptr)->slist_size += (new_size); \ - \ - HDassert( (new_size) <= (cache_ptr)->slist_size ); \ - HDassert( ( (cache_ptr)->slist_len > 1 ) || \ - ( (cache_ptr)->slist_size == (new_size) ) ); \ -} /* H5C__REMOVE_ENTRY_FROM_SLIST */ - -#endif /* H5C_DO_SANITY_CHECKS */ - - -/************************************************************************** - * - * Replacement policy update macros: - * - * These used to be functions, but I converted them to macros to avoid some - * function call overhead. - * - **************************************************************************/ - -/*------------------------------------------------------------------------- - * - * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS - * - * Purpose: For efficiency, we sometimes change the order of flushes -- - * but doing so can confuse the replacement policy. This - * macro exists to allow us to specify an entry as the - * most recently touched so we can repair any such - * confusion. - * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the macro - * should switch on the current policy and act accordingly. - * - * Return: N/A - * - * Programmer: John Mainzer, 10/13/05 - * - * Modifications: - * - * JRM -- 3/20/06 - * Modified macro to ignore pinned entries. Pinned entries - * do not appear in the data structures maintained by the - * replacement policy code, and thus this macro has nothing - * to do if called for such an entry. - * - * JRM -- 3/28/07 - * Added sanity checks using the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. - * - *------------------------------------------------------------------------- - */ - -#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - -#define H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( ! ((entry_ptr)->is_pinned) ) { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list, and re-insert it at the head.\ - */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* Use the dirty flag to infer whether the entry is on the clean or \ - * dirty LRU list, and remove it. Then insert it at the head of \ - * the same LRU list. \ - * \ - * At least initially, all entries should be clean. That may \ - * change, so we may as well deal with both cases now. \ - */ \ - \ - if ( (entry_ptr)->is_dirty ) { \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - } else { \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ - /* End modified LRU specific code. */ \ - } \ -} /* H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS */ - -#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - -#define H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( ! ((entry_ptr)->is_pinned) ) { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list, and re-insert it at the head \ - */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* End modified LRU specific code. */ \ - } \ -} /* H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS */ - -#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - - -/*------------------------------------------------------------------------- - * - * Macro: H5C__UPDATE_RP_FOR_EVICTION - * - * Purpose: Update the replacement policy data structures for an - * eviction of the specified cache entry. - * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 5/10/04 - * - * Modifications: - * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_eviction() to the - * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze - * a bit more performance out of the cache. - * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause dificulties with - * the pre-processor, I'll have to remove them. - * - * JRM - 7/28/04 - * Split macro into two version, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. - * - * JRM - 3/20/06 - * Pinned entries can't be evicted, so this entry should never - * be called on a pinned entry. Added assert to verify this. - * - * JRM -- 3/28/07 - * Added sanity checks for the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. - * - *------------------------------------------------------------------------- - */ - -#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - -#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( !((entry_ptr)->is_pinned) ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list. */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* If the entry is clean when it is evicted, it should be on the \ - * clean LRU list, if it was dirty, it should be on the dirty LRU list. \ - * Remove it from the appropriate list according to the value of the \ - * dirty flag. \ - */ \ - \ - if ( (entry_ptr)->is_dirty ) { \ - \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - } else { \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ -} /* H5C__UPDATE_RP_FOR_EVICTION */ - -#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - -#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( !((entry_ptr)->is_pinned) ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list. */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ -} /* H5C__UPDATE_RP_FOR_EVICTION */ - -#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - - -/*------------------------------------------------------------------------- - * - * Macro: H5C__UPDATE_RP_FOR_FLUSH - * - * Purpose: Update the replacement policy data structures for a flush - * of the specified cache entry. - * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. - * - * Return: N/A - * - * Programmer: John Mainzer, 5/6/04 - * - * Modifications: - * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_flush() to the - * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze - * a bit more performance out of the cache. - * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause dificulties with - * pre-processor, I'll have to remove them. - * - * JRM - 7/28/04 - * Split macro into two versions, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. - * - * JRM - 3/20/06 - * While pinned entries can be flushed, they don't reside in - * the replacement policy data structures when unprotected. - * Thus I modified this macro to do nothing if the entry is - * pinned. - * - * JRM - 3/28/07 - * Added sanity checks based on the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. - * - *------------------------------------------------------------------------- - */ - -#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - -#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( ! ((entry_ptr)->is_pinned) ) { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list, and re-insert it at the \ - * head. \ - */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* since the entry is being flushed or cleared, one would think \ - * that it must be dirty -- but that need not be the case. Use the \ - * dirty flag to infer whether the entry is on the clean or dirty \ - * LRU list, and remove it. Then insert it at the head of the \ - * clean LRU list. \ - * \ - * The function presumes that a dirty entry will be either cleared \ - * or flushed shortly, so it is OK if we put a dirty entry on the \ - * clean LRU list. \ - */ \ - \ - if ( (entry_ptr)->is_dirty ) { \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - } else { \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - \ - /* End modified LRU specific code. */ \ - } \ -} /* H5C__UPDATE_RP_FOR_FLUSH */ - -#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - -#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( ! ((entry_ptr)->is_pinned) ) { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list, and re-insert it at the \ - * head. \ - */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* End modified LRU specific code. */ \ - } \ -} /* H5C__UPDATE_RP_FOR_FLUSH */ - -#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - - -/*------------------------------------------------------------------------- - * - * Macro: H5C__UPDATE_RP_FOR_INSERTION - * - * Purpose: Update the replacement policy data structures for an - * insertion of the specified cache entry. - * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. - * - * Return: N/A - * - * Programmer: John Mainzer, 5/17/04 - * - * Modifications: - * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_insertion() to the - * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze - * a bit more performance out of the cache. - * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause dificulties with - * pre-processor, I'll have to remove them. - * - * JRM - 7/28/04 - * Split macro into two version, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. - * - * JRM - 3/10/06 - * This macro should never be called on a pinned entry. - * Inserted an assert to verify this. - * - * JRM - 8/9/06 - * Not any more. We must now allow insertion of pinned - * entries. Updated macro to support this. - * - * JRM - 3/28/07 - * Added sanity checks using the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. - * - *------------------------------------------------------------------------- - */ - -#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - -#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( (entry_ptr)->is_pinned ) { \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, (fail_val)) \ - \ - } else { \ - \ - /* modified LRU specific code */ \ - \ - /* insert the entry at the head of the LRU list. */ \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* insert the entry at the head of the clean or dirty LRU list as \ - * appropriate. \ - */ \ - \ - if ( entry_ptr->is_dirty ) { \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - } else { \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ - /* End modified LRU specific code. */ \ - } \ -} - -#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - -#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( (entry_ptr)->is_pinned ) { \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, (fail_val)) \ - \ - } else { \ - \ - /* modified LRU specific code */ \ - \ - /* insert the entry at the head of the LRU list. */ \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* End modified LRU specific code. */ \ - } \ -} - -#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - - -/*------------------------------------------------------------------------- - * - * Macro: H5C__UPDATE_RP_FOR_PROTECT - * - * Purpose: Update the replacement policy data structures for a - * protect of the specified cache entry. - * - * To do this, unlink the specified entry from any data - * structures used by the replacement policy, and add the - * entry to the protected list. - * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. - * - * Return: N/A - * - * Programmer: John Mainzer, 5/17/04 - * - * Modifications: - * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_protect() to the - * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze - * a bit more performance out of the cache. - * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause dificulties with - * pre-processor, I'll have to remove them. - * - * JRM - 7/28/04 - * Split macro into two version, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. - * - * JRM - 3/17/06 - * Modified macro to attempt to remove pinned entriese from - * the pinned entry list instead of from the data structures - * maintained by the replacement policy. - * - * JRM - 3/28/07 - * Added sanity checks based on the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. - * - *------------------------------------------------------------------------- - */ - -#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - -#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( (entry_ptr)->is_pinned ) { \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, (fail_val)) \ - HDassert( (cache_ptr)->pel_len >= 0 ); \ - \ - } else { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list. */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* Similarly, remove the entry from the clean or dirty LRU list \ - * as appropriate. \ - */ \ - \ - if ( (entry_ptr)->is_dirty ) { \ - \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - \ - } else { \ - \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ - /* End modified LRU specific code. */ \ - } \ - \ - /* Regardless of the replacement policy, or whether the entry is \ - * pinned, now add the entry to the protected list. \ - */ \ - \ - H5C__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \ - (cache_ptr)->pl_tail_ptr, \ - (cache_ptr)->pl_len, \ - (cache_ptr)->pl_size, (fail_val)) \ -} /* H5C__UPDATE_RP_FOR_PROTECT */ - -#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - -#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( (entry_ptr)->is_pinned ) { \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, (fail_val)) \ - HDassert( (cache_ptr)->pel_len >= 0 ); \ - \ - } else { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list. */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* End modified LRU specific code. */ \ - } \ - \ - /* Regardless of the replacement policy, or whether the entry is \ - * pinned, now add the entry to the protected list. \ - */ \ - \ - H5C__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \ - (cache_ptr)->pl_tail_ptr, \ - (cache_ptr)->pl_len, \ - (cache_ptr)->pl_size, (fail_val)) \ -} /* H5C__UPDATE_RP_FOR_PROTECT */ - -#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - - -/*------------------------------------------------------------------------- - * - * Macro: H5C__UPDATE_RP_FOR_RENAME - * - * Purpose: Update the replacement policy data structures for a - * rename of the specified cache entry. - * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. - * - * Return: N/A - * - * Programmer: John Mainzer, 5/17/04 - * - * Modifications: - * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_rename() to the - * macro H5C__UPDATE_RP_FOR_RENAME in an effort to squeeze - * a bit more performance out of the cache. - * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause dificulties with - * pre-processor, I'll have to remove them. - * - * JRM - 7/28/04 - * Split macro into two version, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. - * - * JRM - 6/23/05 - * Added the was_dirty parameter. It is possible that - * the entry was clean when it was renamed -- if so it - * it is in the clean LRU regardless of the current - * value of the is_dirty field. - * - * At present, all renamed entries are forced to be - * dirty. This macro is a bit more general that that, - * to allow it to function correctly should that policy - * be relaxed in the future. - * - * JRM - 3/17/06 - * Modified macro to do nothing if the entry is pinned. - * In this case, the entry is on the pinned entry list, not - * in the replacement policy data structures, so there is - * nothing to be done. - * - * JRM - 3/28/07 - * Added sanity checks using the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. - * - *------------------------------------------------------------------------- - */ - -#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - -#define H5C__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( ! ((entry_ptr)->is_pinned) ) { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list, and re-insert it at the head. \ - */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* remove the entry from either the clean or dirty LUR list as \ - * indicated by the was_dirty parameter \ - */ \ - if ( was_dirty ) { \ - \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - \ - } else { \ - \ - H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ - /* insert the entry at the head of either the clean or dirty LRU \ - * list as appropriate. \ - */ \ - \ - if ( (entry_ptr)->is_dirty ) { \ - \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - \ - } else { \ - \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ - /* End modified LRU specific code. */ \ - } \ -} /* H5C__UPDATE_RP_FOR_RENAME */ - -#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - -#define H5C__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - if ( ! ((entry_ptr)->is_pinned) ) { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list, and re-insert it at the head. \ - */ \ - \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* End modified LRU specific code. */ \ - } \ -} /* H5C__UPDATE_RP_FOR_RENAME */ - -#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - - -/*------------------------------------------------------------------------- - * - * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE - * - * Purpose: Update the replacement policy data structures for a - * size change of the specified cache entry. - * - * To do this, determine if the entry is pinned. If it is, - * update the size of the pinned entry list. - * - * If it isn't pinned, the entry must handled by the - * replacement policy. Update the appropriate replacement - * policy data structures. - * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. - * - * Return: N/A - * - * Programmer: John Mainzer, 8/23/06 - * - * Modifications: - * - * JRM -- 3/28/07 - * Added sanity checks based on the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. - * - *------------------------------------------------------------------------- - */ - -#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - -#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - HDassert( new_size > 0 ); \ - \ - if ( (entry_ptr)->is_pinned ) { \ - \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ - } else { \ - \ - /* modified LRU specific code */ \ - \ - /* Update the size of the LRU list */ \ - \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ - /* Similarly, update the size of the clean or dirty LRU list as \ - * appropriate. At present, the entry must be clean, but that \ - * could change. \ - */ \ - \ - if ( (entry_ptr)->is_dirty ) { \ - \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ - } else { \ - \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ - } \ - \ - /* End modified LRU specific code. */ \ - } \ - \ -} /* H5C__UPDATE_RP_FOR_SIZE_CHANGE */ - -#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - -#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - HDassert( new_size > 0 ); \ - \ - if ( (entry_ptr)->is_pinned ) { \ - \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ - } else { \ - \ - /* modified LRU specific code */ \ - \ - /* Update the size of the LRU list */ \ - \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ - /* End modified LRU specific code. */ \ - } \ - \ -} /* H5C__UPDATE_RP_FOR_SIZE_CHANGE */ - -#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - - -/*------------------------------------------------------------------------- - * - * Macro: H5C__UPDATE_RP_FOR_UNPIN - * - * Purpose: Update the replacement policy data structures for an - * unpin of the specified cache entry. - * - * To do this, unlink the specified entry from the protected - * entry list, and re-insert it in the data structures used - * by the current replacement policy. - * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the macro - * should switch on the current policy and act accordingly. - * - * Return: N/A - * - * Programmer: John Mainzer, 3/22/06 - * - * Modifications: - * - * JRM -- 3/28/07 - * Added sanity checks based on the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. - * - *------------------------------------------------------------------------- - */ - -#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - -#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->is_pinned); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - /* Regardless of the replacement policy, remove the entry from the \ - * pinned entry list. \ - */ \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, (fail_val)) \ - HDassert( (cache_ptr)->pel_len >= 0 ); \ - \ - /* modified LRU specific code */ \ - \ - /* insert the entry at the head of the LRU list. */ \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* Similarly, insert the entry at the head of either the clean or \ - * dirty LRU list as appropriate. \ - */ \ - \ - if ( (entry_ptr)->is_dirty ) { \ - \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - \ - } else { \ - \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ - /* End modified LRU specific code. */ \ - \ -} /* H5C__UPDATE_RP_FOR_UNPIN */ - -#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - -#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->is_pinned); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - /* Regardless of the replacement policy, remove the entry from the \ - * pinned entry list. \ - */ \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, (fail_val)) \ - HDassert( (cache_ptr)->pel_len >= 0 ); \ - \ - /* modified LRU specific code */ \ - \ - /* insert the entry at the head of the LRU list. */ \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* End modified LRU specific code. */ \ - \ -} /* H5C__UPDATE_RP_FOR_UNPIN */ - -#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - - -/*------------------------------------------------------------------------- - * - * Macro: H5C__UPDATE_RP_FOR_UNPROTECT - * - * Purpose: Update the replacement policy data structures for an - * unprotect of the specified cache entry. - * - * To do this, unlink the specified entry from the protected - * list, and re-insert it in the data structures used by the - * current replacement policy. - * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. - * - * Return: N/A - * - * Programmer: John Mainzer, 5/19/04 - * - * Modifications: - * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_unprotect() to - * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to - * squeeze a bit more performance out of the cache. - * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause dificulties with - * pre-processor, I'll have to remove them. - * - * JRM - 7/28/04 - * Split macro into two version, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. - * - * JRM - 3/17/06 - * Modified macro to put pinned entries on the pinned entry - * list instead of inserting them in the data structures - * maintained by the replacement policy. - * - *------------------------------------------------------------------------- - */ - -#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - -#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( (entry_ptr)->is_protected); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - /* Regardless of the replacement policy, remove the entry from the \ - * protected list. \ - */ \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \ - (cache_ptr)->pl_tail_ptr, (cache_ptr)->pl_len, \ - (cache_ptr)->pl_size, (fail_val)) \ - \ - if ( (entry_ptr)->is_pinned ) { \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, (fail_val)) \ - \ - } else { \ - \ - /* modified LRU specific code */ \ - \ - /* insert the entry at the head of the LRU list. */ \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* Similarly, insert the entry at the head of either the clean or \ - * dirty LRU list as appropriate. \ - */ \ - \ - if ( (entry_ptr)->is_dirty ) { \ - \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - \ - } else { \ - \ - H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ - /* End modified LRU specific code. */ \ - } \ - \ -} /* H5C__UPDATE_RP_FOR_UNPROTECT */ - -#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - -#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( (entry_ptr)->is_protected); \ - HDassert( (entry_ptr)->size > 0 ); \ - \ - /* Regardless of the replacement policy, remove the entry from the \ - * protected list. \ - */ \ - H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \ - (cache_ptr)->pl_tail_ptr, (cache_ptr)->pl_len, \ - (cache_ptr)->pl_size, (fail_val)) \ - \ - if ( (entry_ptr)->is_pinned ) { \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, (fail_val)) \ - \ - } else { \ - \ - /* modified LRU specific code */ \ - \ - /* insert the entry at the head of the LRU list. */ \ - \ - H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* End modified LRU specific code. */ \ - } \ -} /* H5C__UPDATE_RP_FOR_UNPROTECT */ - -#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - - /* * Private file-scope variables. */ @@ -3005,7 +424,7 @@ done: * * JRM -- 11/5/08 * Added initialization for the new clean_index_size and - * dirty_index_size fields of H5C_t. + * dirty_index_size fields of H5C_t. * *------------------------------------------------------------------------- */ @@ -4649,7 +2068,7 @@ H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr) * Purpose: Get the trace_file_ptr field from the cache, via an entry. * * This field will either be NULL (which indicates that trace - * file logging is turned off), or contain a pointer to the + * file logging is turned off), or contain a pointer to the * open file to which trace file data is to be written. * * Return: Non-negative on success/Negative on failure @@ -4759,26 +2178,26 @@ H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr, * field. * * JRM -- 11/13/08 - * Moved test to see if we already have an entry with the - * specified address in the cache. This was necessary as + * Moved test to see if we already have an entry with the + * specified address in the cache. This was necessary as * we used to modify some fields in the entry to be inserted * priort to this test, which got the cache confused if the * insertion failed because the entry was already present. * * Also revised the function to call H5C_make_space_in_cache() - * if the min_clean_size is not met at present, not just if - * there is insufficient space in the cache for the new + * if the min_clean_size is not met at present, not just if + * there is insufficient space in the cache for the new * entry. * * The purpose of this modification is to avoid "metadata - * blizzards" in the write only case. In such instances, + * blizzards" in the write only case. In such instances, * the cache was allowed to fill with dirty metadata. When * we finally needed to evict an entry to make space, we had * to flush out a whole cache full of metadata -- which has - * interesting performance effects. We hope to avoid (or - * perhaps more accurately hide) this effect by maintaining + * interesting performance effects. We hope to avoid (or + * perhaps more accurately hide) this effect by maintaining * the min_clean_size, which should force us to start flushing - * entries long before we actually have to evict something + * entries long before we actually have to evict something * to make space. * *------------------------------------------------------------------------- @@ -4938,17 +2357,17 @@ H5C_insert_entry(H5F_t * f, } - if ( ( cache_ptr->evictions_enabled ) + if ( ( cache_ptr->evictions_enabled ) && ( ( (cache_ptr->index_size + entry_ptr->size) > - cache_ptr->max_cache_size - ) + cache_ptr->max_cache_size + ) || ( ( ( empty_space + cache_ptr->clean_index_size ) < cache_ptr->min_clean_size ) - ) - ) + ) + ) ) { size_t space_needed; @@ -5510,9 +2929,9 @@ done: * 5/15/06 * * JRM -- 11/5/08 - * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to + * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to * update the new clean_index_size and dirty_index_size - * fields of H5C_t in the case that the entry was clean + * fields of H5C_t in the case that the entry was clean * prior to this call, and is pinned and not protected. * *------------------------------------------------------------------------- @@ -5549,7 +2968,7 @@ H5C_mark_pinned_or_protected_entry_dirty(void *thing) entry_ptr->is_dirty = TRUE; if ( was_pinned_unprotected_and_clean ) { - + H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr); } @@ -5611,7 +3030,7 @@ done: * * JRM -- 11/5/08 * On review this function looks like no change is needed to - * support the new clean_index_size and dirty_index_size + * support the new clean_index_size and dirty_index_size * fields of H5C_t. * *------------------------------------------------------------------------- @@ -6068,14 +3487,14 @@ done: * enough space for and entry that has just been loaded. * * The purpose of this modification is to avoid "metadata - * blizzards" in the write only case. In such instances, + * blizzards" in the write only case. In such instances, * the cache was allowed to fill with dirty metadata. When * we finally needed to evict an entry to make space, we had * to flush out a whole cache full of metadata -- which has - * interesting performance effects. We hope to avoid (or - * perhaps more accurately hide) this effect by maintaining + * interesting performance effects. We hope to avoid (or + * perhaps more accurately hide) this effect by maintaining * the min_clean_size, which should force us to start flushing - * entries long before we actually have to evict something + * entries long before we actually have to evict something * to make space. * *------------------------------------------------------------------------- @@ -6189,17 +3608,17 @@ H5C_protect(H5F_t * f, * regardless if the min_free_space requirement is not met. */ - if ( ( cache_ptr->evictions_enabled ) + if ( ( cache_ptr->evictions_enabled ) && ( ( (cache_ptr->index_size + entry_ptr->size) > - cache_ptr->max_cache_size - ) + cache_ptr->max_cache_size + ) || ( ( ( empty_space + cache_ptr->clean_index_size ) < cache_ptr->min_clean_size ) - ) - ) + ) + ) ) { size_t space_needed; @@ -6207,7 +3626,7 @@ H5C_protect(H5F_t * f, if ( empty_space <= entry_ptr->size ) { cache_ptr->cache_full = TRUE; - + } if ( cache_ptr->check_write_permitted != NULL ) { @@ -7028,12 +4447,12 @@ done: * read_protects, and max_read_protects fields. * * JRM -- 11/13/08 - * Added code displaying the max_clean_index_size and + * Added code displaying the max_clean_index_size and * max_dirty_index_size. * * MAM -- 01/06/09 * Added code displaying the calls_to_msic, - * total_entries_skipped_in_msic, total_entries_scanned_in_msic, + * total_entries_skipped_in_msic, total_entries_scanned_in_msic, * and max_entries_skipped_in_msic fields. * *------------------------------------------------------------------------- @@ -7314,8 +4733,8 @@ H5C_stats(H5C_t * cache_ptr, (long long)(cache_ptr->calls_to_msic)); if (cache_ptr->calls_to_msic > 0) { - average_entries_skipped_per_calls_to_msic = - (((double)(cache_ptr->total_entries_skipped_in_msic)) / + average_entries_skipped_per_calls_to_msic = + (((double)(cache_ptr->total_entries_skipped_in_msic)) / ((double)(cache_ptr->calls_to_msic))); } @@ -7325,8 +4744,8 @@ H5C_stats(H5C_t * cache_ptr, (long)(cache_ptr->max_entries_skipped_in_msic)); if (cache_ptr->calls_to_msic > 0) { - average_entries_scanned_per_calls_to_msic = - (((double)(cache_ptr->total_entries_scanned_in_msic)) / + average_entries_scanned_per_calls_to_msic = + (((double)(cache_ptr->total_entries_scanned_in_msic)) / ((double)(cache_ptr->calls_to_msic))); } @@ -7341,7 +4760,7 @@ H5C_stats(H5C_t * cache_ptr, HDfprintf(stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->total_entries_scanned_in_msic - + (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space)); #if H5C_COLLECT_CACHE_ENTRY_STATS @@ -7810,14 +5229,14 @@ done: * cache" concept, by adding the 'take_ownership' flag. * * JRM -- 11/5/08 - * Added code to update the clean_index_size and - * dirty_index_size fields of H5C_t in cases where the - * the entry was clean on protect, was marked dirty on - * unprotect, and did not change its size. Do this via + * Added code to update the clean_index_size and + * dirty_index_size fields of H5C_t in cases where the + * the entry was clean on protect, was marked dirty on + * unprotect, and did not change its size. Do this via * a call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(). * * If the size changed, this case is already dealt with by - * by the pre-existing call to + * by the pre-existing call to * H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(). * *------------------------------------------------------------------------- @@ -8047,7 +5466,7 @@ H5C_unprotect(H5F_t * f, entry_ptr->size = new_size; } else if ( ( was_clean ) && ( entry_ptr->is_dirty ) ) { - + H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr) } @@ -8522,7 +5941,7 @@ H5C_adjust_flush_dependency_rc(H5C_cache_entry_t * cache_entry, cache_entry->flush_dep_height = new_child_height + 1; } /* end if */ else { - /* Check for child's flush dep. height decreasing and ref. count of + /* Check for child's flush dep. height decreasing and ref. count of * old child height going to zero, it could mean the parent's * flush dependency height dropped. */ @@ -10787,8 +8206,8 @@ done: * the "destroy_entry" variable. * * JRM -- 11/5/08 - * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN() to - * maintain the new clean_index_size and clean_index_size + * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN() to + * maintain the new clean_index_size and clean_index_size * fields of H5C_t. * *------------------------------------------------------------------------- @@ -11101,7 +8520,7 @@ H5C_flush_single_entry(H5F_t * f, if ( destroy ) { #ifndef NDEBUG - /* we are about to call the clear callback with the + /* we are about to call the clear callback with the * destroy flag set -- this will result in *entry_ptr * being freed. Set the magic field to bad magic * so we can detect a freed cache entry if we see @@ -11130,7 +8549,7 @@ H5C_flush_single_entry(H5F_t * f, if ( destroy ) { #ifndef NDEBUG - /* we are about to call the flush callback with the + /* we are about to call the flush callback with the * destroy flag set -- this will result in *entry_ptr * being freed. Set the magic field to bad magic * so we can detect a freed cache entry if we see @@ -11246,11 +8665,11 @@ H5C_flush_single_entry(H5F_t * f, HDassert( entry_ptr->size < H5C_MAX_ENTRY_SIZE ); - /* update the hash table for the size change - * We pass TRUE as the was_clean parameter, as we + /* update the hash table for the size change + * We pass TRUE as the was_clean parameter, as we * have already updated the clean and dirty index * size fields for the fact that the entry has - * been flushed. (See above call to + * been flushed. (See above call to * H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN()). */ H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), \ @@ -11543,21 +8962,21 @@ done: * ever detect the condidtion. * * JRM -- 11/13/08 - * Modified function to always observe the min_clean_size + * Modified function to always observe the min_clean_size * whether we are maintaining the clean and dirt LRU lists * or not. To do this, we had to add the new clean_index_size * and dirty_index_size fields to H5C_t, and supporting code * as needed throughout the cache. * * The purpose of this modification is to avoid "metadata - * blizzards" in the write only case. In such instances, + * blizzards" in the write only case. In such instances, * the cache was allowed to fill with dirty metadata. When * we finally needed to evict an entry to make space, we had * to flush out a whole cache full of metadata -- which has - * interesting performance effects. We hope to avoid (or - * perhaps more accurately hide) this effect by maintaining + * interesting performance effects. We hope to avoid (or + * perhaps more accurately hide) this effect by maintaining * the min_clean_size, which should force us to start flushing - * entries long before we actually have to evict something + * entries long before we actually have to evict something * to make space. * * MAM -- 01/06/09 @@ -11596,7 +9015,7 @@ H5C_make_space_in_cache(H5F_t * f, HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); HDassert( first_flush_ptr != NULL ); HDassert( ( *first_flush_ptr == TRUE ) || ( *first_flush_ptr == FALSE ) ); - HDassert( cache_ptr->index_size == + HDassert( cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size) ); if ( write_permitted ) { @@ -11667,7 +9086,7 @@ H5C_make_space_in_cache(H5F_t * f, H5C__NO_FLAGS_SET, first_flush_ptr, FALSE); - } else if ( (cache_ptr->index_size + space_needed) + } else if ( (cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size ) { #if H5C_COLLECT_CACHE_STATS @@ -11685,12 +9104,12 @@ H5C_make_space_in_cache(H5F_t * f, TRUE); } else { - /* We have enough space so don't flush clean entry. - * Set result to SUCCEED to avoid triggering the error + /* We have enough space so don't flush clean entry. + * Set result to SUCCEED to avoid triggering the error * code below. */ #if H5C_COLLECT_CACHE_STATS - clean_entries_skipped++; + clean_entries_skipped++; #endif /* H5C_COLLECT_CACHE_STATS */ didnt_flush_entry = TRUE; result = SUCCEED; @@ -11769,9 +9188,9 @@ H5C_make_space_in_cache(H5F_t * f, empty_space = cache_ptr->max_cache_size - cache_ptr->index_size; } - - HDassert( cache_ptr->index_size == - (cache_ptr->clean_index_size + + + HDassert( cache_ptr->index_size == + (cache_ptr->clean_index_size + cache_ptr->dirty_index_size) ); } diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index b7a348b..db68e88 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -29,7 +29,7 @@ */ #ifndef H5C_PACKAGE -#error "Do not include this file outside the H5HL package!" +#error "Do not include this file outside the H5C package!" #endif #ifndef _H5Cpkg_H @@ -55,8 +55,6 @@ #define H5C__MAX_PASSES_ON_FLUSH 4 -#define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */ - /**************************************************************************** * @@ -207,18 +205,18 @@ * the hash table. Note that the index_size field (above) * is also the sum of the sizes of all entries in the cache. * Thus we should have the invarient that clean_index_size + - * dirty_index_size == index_size. + * dirty_index_size == index_size. * * WARNING: * - * 1) The clean_index_size field is not maintained by the - * index macros, as the hash table doesn't care whether + * 1) The clean_index_size field is not maintained by the + * index macros, as the hash table doesn't care whether * the entry is clean or dirty. Instead the field is * maintained in the H5C__UPDATE_RP macros. * * 2) The value of the clean_index_size must not be mistaken - * for the current clean size of the cache. Rather, the - * clean size of the cache is the current value of + * for the current clean size of the cache. Rather, the + * clean size of the cache is the current value of * clean_index_size plus the amount of empty space (if any) * in the cache. * @@ -226,12 +224,12 @@ * the hash table. Note that the index_size field (above) * is also the sum of the sizes of all entries in the cache. * Thus we should have the invarient that clean_index_size + - * dirty_index_size == index_size. + * dirty_index_size == index_size. * * WARNING: * - * 1) The dirty_index_size field is not maintained by the - * index macros, as the hash table doesn't care whether + * 1) The dirty_index_size field is not maintained by the + * index macros, as the hash table doesn't care whether * the entry is clean or dirty. Instead the field is * maintained in the H5C__UPDATE_RP macros. * @@ -856,6 +854,8 @@ * ****************************************************************************/ +#define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */ + #define H5C__H5C_T_MAGIC 0x005CAC0E #define H5C__MAX_NUM_TYPE_IDS 27 #define H5C__PREFIX_LEN 32 @@ -1017,5 +1017,2595 @@ struct H5C_t char prefix[H5C__PREFIX_LEN]; }; + +/****************************************************************************/ +/***************************** Macro Definitions ****************************/ +/****************************************************************************/ + + +/**************************************************************************** + * + * We maintain doubly linked lists of instances of H5C_cache_entry_t for a + * variety of reasons -- protected list, LRU list, and the clean and dirty + * LRU lists at present. The following macros support linking and unlinking + * of instances of H5C_cache_entry_t by both their regular and auxilary next + * and previous pointers. + * + * The size and length fields are also maintained. + * + * Note that the relevant pair of prev and next pointers are presumed to be + * NULL on entry in the insertion macros. + * + * Finally, observe that the sanity checking macros evaluate to the empty + * string when H5C_DO_SANITY_CHECKS is FALSE. They also contain calls + * to the HGOTO_ERROR macro, which may not be appropriate in all cases. + * If so, we will need versions of the insertion and deletion macros which + * do not reference the sanity checking macros. + * JRM - 5/5/04 + * + * Changes: + * + * - Removed the line: + * + * ( ( (Size) == (entry_ptr)->size ) && ( (len) != 1 ) ) || + * + * from the H5C__DLL_PRE_REMOVE_SC macro. With the addition of the + * epoch markers used in the age out based cache size reduction algorithm, + * this invarient need not hold, as the epoch markers are of size 0. + * + * One could argue that I should have given the epoch markers a positive + * size, but this would break the index_size = LRU_list_size + pl_size + * + pel_size invarient. + * + * Alternatively, I could pass the current decr_mode in to the macro, + * and just skip the check whenever epoch markers may be in use. + * + * However, any size errors should be caught when the cache is flushed + * and destroyed. Until we are tracking such an error, this should be + * good enough. + * JRM - 12/9/04 + * + * + * - In the H5C__DLL_PRE_INSERT_SC macro, replaced the lines: + * + * ( ( (len) == 1 ) && + * ( ( (head_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || + * ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) + * ) + * ) || + * + * with: + * + * ( ( (len) == 1 ) && + * ( ( (head_ptr) != (tail_ptr) ) || + * ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) + * ) + * ) || + * + * Epoch markers have size 0, so we can now have a non-empty list with + * zero size. Hence the "( (Size) <= 0 )" clause cause false failures + * in the sanity check. Since "Size" is typically a size_t, it can't + * take on negative values, and thus the revised clause "( (Size) < 0 )" + * caused compiler warnings. + * JRM - 12/22/04 + * + * - In the H5C__DLL_SC macro, replaced the lines: + * + * ( ( (len) == 1 ) && + * ( ( (head_ptr) != (tail_ptr) ) || ( (cache_ptr)->size <= 0 ) || + * ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) + * ) + * ) || + * + * with + * + * ( ( (len) == 1 ) && + * ( ( (head_ptr) != (tail_ptr) ) || + * ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) + * ) + * ) || + * + * Epoch markers have size 0, so we can now have a non-empty list with + * zero size. Hence the "( (Size) <= 0 )" clause cause false failures + * in the sanity check. Since "Size" is typically a size_t, it can't + * take on negative values, and thus the revised clause "( (Size) < 0 )" + * caused compiler warnings. + * JRM - 1/10/05 + * + * - Added the H5C__DLL_UPDATE_FOR_SIZE_CHANGE macro and the associated + * sanity checking macros. These macro are used to update the size of + * a DLL when one of its entries changes size. + * + * JRM - 9/8/05 + * + ****************************************************************************/ + +#if H5C_DO_SANITY_CHECKS + +#define H5C__DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ +if ( ( (head_ptr) == NULL ) || \ + ( (tail_ptr) == NULL ) || \ + ( (entry_ptr) == NULL ) || \ + ( (len) <= 0 ) || \ + ( (Size) < (entry_ptr)->size ) || \ + ( ( (entry_ptr)->prev == NULL ) && ( (head_ptr) != (entry_ptr) ) ) || \ + ( ( (entry_ptr)->next == NULL ) && ( (tail_ptr) != (entry_ptr) ) ) || \ + ( ( (len) == 1 ) && \ + ( ! ( ( (head_ptr) == (entry_ptr) ) && \ + ( (tail_ptr) == (entry_ptr) ) && \ + ( (entry_ptr)->next == NULL ) && \ + ( (entry_ptr)->prev == NULL ) && \ + ( (Size) == (entry_ptr)->size ) \ + ) \ + ) \ + ) \ + ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "DLL pre remove SC failed") \ +} + +#define H5C__DLL_SC(head_ptr, tail_ptr, len, Size, fv) \ +if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ + ( (head_ptr) != (tail_ptr) ) \ + ) || \ + ( (len) < 0 ) || \ + ( (Size) < 0 ) || \ + ( ( (len) == 1 ) && \ + ( ( (head_ptr) != (tail_ptr) ) || \ + ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) \ + ) \ + ) || \ + ( ( (len) >= 1 ) && \ + ( ( (head_ptr) == NULL ) || ( (head_ptr)->prev != NULL ) || \ + ( (tail_ptr) == NULL ) || ( (tail_ptr)->next != NULL ) \ + ) \ + ) \ + ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "DLL sanity check failed") \ +} + +#define H5C__DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ +if ( ( (entry_ptr) == NULL ) || \ + ( (entry_ptr)->next != NULL ) || \ + ( (entry_ptr)->prev != NULL ) || \ + ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ + ( (head_ptr) != (tail_ptr) ) \ + ) || \ + ( (len) < 0 ) || \ + ( ( (len) == 1 ) && \ + ( ( (head_ptr) != (tail_ptr) ) || \ + ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) \ + ) \ + ) || \ + ( ( (len) >= 1 ) && \ + ( ( (head_ptr) == NULL ) || ( (head_ptr)->prev != NULL ) || \ + ( (tail_ptr) == NULL ) || ( (tail_ptr)->next != NULL ) \ + ) \ + ) \ + ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "DLL pre insert SC failed") \ +} + +#define H5C__DLL_PRE_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) \ +if ( ( (dll_len) <= 0 ) || \ + ( (dll_size) <= 0 ) || \ + ( (old_size) <= 0 ) || \ + ( (old_size) > (dll_size) ) || \ + ( (new_size) <= 0 ) || \ + ( ( (dll_len) == 1 ) && ( (old_size) != (dll_size) ) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "DLL pre size update SC failed") \ +} + +#define H5C__DLL_POST_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) \ +if ( ( (new_size) > (dll_size) ) || \ + ( ( (dll_len) == 1 ) && ( (new_size) != (dll_size) ) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "DLL post size update SC failed") \ +} + +#else /* H5C_DO_SANITY_CHECKS */ + +#define H5C__DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) +#define H5C__DLL_SC(head_ptr, tail_ptr, len, Size, fv) +#define H5C__DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) +#define H5C__DLL_PRE_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) +#define H5C__DLL_POST_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) + +#endif /* H5C_DO_SANITY_CHECKS */ + + +#define H5C__DLL_APPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val) \ + H5C__DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ + fail_val) \ + if ( (head_ptr) == NULL ) \ + { \ + (head_ptr) = (entry_ptr); \ + (tail_ptr) = (entry_ptr); \ + } \ + else \ + { \ + (tail_ptr)->next = (entry_ptr); \ + (entry_ptr)->prev = (tail_ptr); \ + (tail_ptr) = (entry_ptr); \ + } \ + (len)++; \ + (Size) += (entry_ptr)->size; + +#define H5C__DLL_PREPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val) \ + H5C__DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ + fail_val) \ + if ( (head_ptr) == NULL ) \ + { \ + (head_ptr) = (entry_ptr); \ + (tail_ptr) = (entry_ptr); \ + } \ + else \ + { \ + (head_ptr)->prev = (entry_ptr); \ + (entry_ptr)->next = (head_ptr); \ + (head_ptr) = (entry_ptr); \ + } \ + (len)++; \ + (Size) += entry_ptr->size; + +#define H5C__DLL_REMOVE(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val) \ + H5C__DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ + fail_val) \ + { \ + if ( (head_ptr) == (entry_ptr) ) \ + { \ + (head_ptr) = (entry_ptr)->next; \ + if ( (head_ptr) != NULL ) \ + { \ + (head_ptr)->prev = NULL; \ + } \ + } \ + else \ + { \ + (entry_ptr)->prev->next = (entry_ptr)->next; \ + } \ + if ( (tail_ptr) == (entry_ptr) ) \ + { \ + (tail_ptr) = (entry_ptr)->prev; \ + if ( (tail_ptr) != NULL ) \ + { \ + (tail_ptr)->next = NULL; \ + } \ + } \ + else \ + { \ + (entry_ptr)->next->prev = (entry_ptr)->prev; \ + } \ + entry_ptr->next = NULL; \ + entry_ptr->prev = NULL; \ + (len)--; \ + (Size) -= entry_ptr->size; \ + } + +#define H5C__DLL_UPDATE_FOR_SIZE_CHANGE(dll_len, dll_size, old_size, new_size) \ + H5C__DLL_PRE_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) \ + (dll_size) -= (old_size); \ + (dll_size) += (new_size); \ + H5C__DLL_POST_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) + +#if H5C_DO_SANITY_CHECKS + +#define H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \ +if ( ( (hd_ptr) == NULL ) || \ + ( (tail_ptr) == NULL ) || \ + ( (entry_ptr) == NULL ) || \ + ( (len) <= 0 ) || \ + ( (Size) < (entry_ptr)->size ) || \ + ( ( (Size) == (entry_ptr)->size ) && ( ! ( (len) == 1 ) ) ) || \ + ( ( (entry_ptr)->aux_prev == NULL ) && ( (hd_ptr) != (entry_ptr) ) ) || \ + ( ( (entry_ptr)->aux_next == NULL ) && ( (tail_ptr) != (entry_ptr) ) ) || \ + ( ( (len) == 1 ) && \ + ( ! ( ( (hd_ptr) == (entry_ptr) ) && ( (tail_ptr) == (entry_ptr) ) && \ + ( (entry_ptr)->aux_next == NULL ) && \ + ( (entry_ptr)->aux_prev == NULL ) && \ + ( (Size) == (entry_ptr)->size ) \ + ) \ + ) \ + ) \ + ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "aux DLL pre remove SC failed") \ +} + +#define H5C__AUX_DLL_SC(head_ptr, tail_ptr, len, Size, fv) \ +if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ + ( (head_ptr) != (tail_ptr) ) \ + ) || \ + ( (len) < 0 ) || \ + ( (Size) < 0 ) || \ + ( ( (len) == 1 ) && \ + ( ( (head_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || \ + ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) \ + ) \ + ) || \ + ( ( (len) >= 1 ) && \ + ( ( (head_ptr) == NULL ) || ( (head_ptr)->aux_prev != NULL ) || \ + ( (tail_ptr) == NULL ) || ( (tail_ptr)->aux_next != NULL ) \ + ) \ + ) \ + ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "AUX DLL sanity check failed") \ +} + +#define H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \ +if ( ( (entry_ptr) == NULL ) || \ + ( (entry_ptr)->aux_next != NULL ) || \ + ( (entry_ptr)->aux_prev != NULL ) || \ + ( ( ( (hd_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ + ( (hd_ptr) != (tail_ptr) ) \ + ) || \ + ( (len) < 0 ) || \ + ( ( (len) == 1 ) && \ + ( ( (hd_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || \ + ( (hd_ptr) == NULL ) || ( (hd_ptr)->size != (Size) ) \ + ) \ + ) || \ + ( ( (len) >= 1 ) && \ + ( ( (hd_ptr) == NULL ) || ( (hd_ptr)->aux_prev != NULL ) || \ + ( (tail_ptr) == NULL ) || ( (tail_ptr)->aux_next != NULL ) \ + ) \ + ) \ + ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "AUX DLL pre insert SC failed") \ +} + +#else /* H5C_DO_SANITY_CHECKS */ + +#define H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) +#define H5C__AUX_DLL_SC(head_ptr, tail_ptr, len, Size, fv) +#define H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) + +#endif /* H5C_DO_SANITY_CHECKS */ + + +#define H5C__AUX_DLL_APPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val)\ + H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ + fail_val) \ + if ( (head_ptr) == NULL ) \ + { \ + (head_ptr) = (entry_ptr); \ + (tail_ptr) = (entry_ptr); \ + } \ + else \ + { \ + (tail_ptr)->aux_next = (entry_ptr); \ + (entry_ptr)->aux_prev = (tail_ptr); \ + (tail_ptr) = (entry_ptr); \ + } \ + (len)++; \ + (Size) += entry_ptr->size; + +#define H5C__AUX_DLL_PREPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ + H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ + fv) \ + if ( (head_ptr) == NULL ) \ + { \ + (head_ptr) = (entry_ptr); \ + (tail_ptr) = (entry_ptr); \ + } \ + else \ + { \ + (head_ptr)->aux_prev = (entry_ptr); \ + (entry_ptr)->aux_next = (head_ptr); \ + (head_ptr) = (entry_ptr); \ + } \ + (len)++; \ + (Size) += entry_ptr->size; + +#define H5C__AUX_DLL_REMOVE(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ + H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ + fv) \ + { \ + if ( (head_ptr) == (entry_ptr) ) \ + { \ + (head_ptr) = (entry_ptr)->aux_next; \ + if ( (head_ptr) != NULL ) \ + { \ + (head_ptr)->aux_prev = NULL; \ + } \ + } \ + else \ + { \ + (entry_ptr)->aux_prev->aux_next = (entry_ptr)->aux_next; \ + } \ + if ( (tail_ptr) == (entry_ptr) ) \ + { \ + (tail_ptr) = (entry_ptr)->aux_prev; \ + if ( (tail_ptr) != NULL ) \ + { \ + (tail_ptr)->aux_next = NULL; \ + } \ + } \ + else \ + { \ + (entry_ptr)->aux_next->aux_prev = (entry_ptr)->aux_prev; \ + } \ + entry_ptr->aux_next = NULL; \ + entry_ptr->aux_prev = NULL; \ + (len)--; \ + (Size) -= entry_ptr->size; \ + } + + +/*********************************************************************** + * + * Stats collection macros + * + * The following macros must handle stats collection when this collection + * is enabled, and evaluate to the empty string when it is not. + * + * The sole exception to this rule is + * H5C__UPDATE_CACHE_HIT_RATE_STATS(), which is always active as + * the cache hit rate stats are always collected and available. + * + * Changes: + * + * JRM -- 3/21/06 + * Added / updated macros for pinned entry related stats. + * + * JRM -- 8/9/06 + * More pinned entry stats related updates. + * + * JRM -- 3/31/07 + * Updated H5C__UPDATE_STATS_FOR_PROTECT() to keep stats on + * read and write protects. + * + * MAM -- 1/15/09 + * Created H5C__UPDATE_MAX_INDEX_SIZE_STATS to contain + * common code within macros that update the maximum + * index, clean_index, and dirty_index statistics fields. + * + ***********************************************************************/ + +#define H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit) \ + (cache_ptr->cache_accesses)++; \ + if ( hit ) { \ + (cache_ptr->cache_hits)++; \ + } \ + +#if H5C_COLLECT_CACHE_STATS + +#define H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ + if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ + (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ + if ( (cache_ptr)->clean_index_size > \ + (cache_ptr)->max_clean_index_size ) \ + (cache_ptr)->max_clean_index_size = \ + (cache_ptr)->clean_index_size; \ + if ( (cache_ptr)->dirty_index_size > \ + (cache_ptr)->max_dirty_index_size ) \ + (cache_ptr)->max_dirty_index_size = \ + (cache_ptr)->dirty_index_size; + +#define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) \ + (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++; + +#define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) \ + if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \ + (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ + if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ + (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ + if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ + (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ + if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ + (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; + +#define H5C__UPDATE_STATS_FOR_RENAME(cache_ptr, entry_ptr) \ + if ( cache_ptr->flush_in_progress ) { \ + ((cache_ptr)->cache_flush_renames[(entry_ptr)->type->id])++; \ + } \ + if ( entry_ptr->flush_in_progress ) { \ + ((cache_ptr)->entry_flush_renames[(entry_ptr)->type->id])++; \ + } \ + (((cache_ptr)->renames)[(entry_ptr)->type->id])++; + +#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)\ + if ( cache_ptr->flush_in_progress ) { \ + ((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \ + } \ + if ( entry_ptr->flush_in_progress ) { \ + ((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \ + } \ + if ( (entry_ptr)->size < (new_size) ) { \ + ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ + if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ + (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ + if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ + (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \ + } else if ( (entry_ptr)->size > (new_size) ) { \ + ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \ + } + +#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \ + (cache_ptr)->total_ht_insertions++; + +#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \ + (cache_ptr)->total_ht_deletions++; + +#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) \ + if ( success ) { \ + (cache_ptr)->successful_ht_searches++; \ + (cache_ptr)->total_successful_ht_search_depth += depth; \ + } else { \ + (cache_ptr)->failed_ht_searches++; \ + (cache_ptr)->total_failed_ht_search_depth += depth; \ + } + +#define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) \ + ((cache_ptr)->unpins)[(entry_ptr)->type->id]++; + +#if H5C_COLLECT_CACHE_ENTRY_STATS + +#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr) \ + (entry_ptr)->accesses = 0; \ + (entry_ptr)->clears = 0; \ + (entry_ptr)->flushes = 0; \ + (entry_ptr)->pins = 0; + +#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \ + (((cache_ptr)->clears)[(entry_ptr)->type->id])++; \ + if ( (entry_ptr)->is_pinned ) { \ + (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \ + } \ + ((entry_ptr)->clears)++; + +#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \ + (((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \ + if ( (entry_ptr)->is_pinned ) { \ + (((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \ + } \ + ((entry_ptr)->flushes)++; + +#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \ + (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; \ + if ( (entry_ptr)->accesses > \ + ((cache_ptr)->max_accesses)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->max_accesses)[(entry_ptr)->type->id] \ + = (entry_ptr)->accesses; \ + } \ + if ( (entry_ptr)->accesses < \ + ((cache_ptr)->min_accesses)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->min_accesses)[(entry_ptr)->type->id] \ + = (entry_ptr)->accesses; \ + } \ + if ( (entry_ptr)->clears > \ + ((cache_ptr)->max_clears)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->max_clears)[(entry_ptr)->type->id] \ + = (entry_ptr)->clears; \ + } \ + if ( (entry_ptr)->flushes > \ + ((cache_ptr)->max_flushes)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->max_flushes)[(entry_ptr)->type->id] \ + = (entry_ptr)->flushes; \ + } \ + if ( (entry_ptr)->size > \ + ((cache_ptr)->max_size)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->max_size)[(entry_ptr)->type->id] \ + = (entry_ptr)->size; \ + } \ + if ( (entry_ptr)->pins > \ + ((cache_ptr)->max_pins)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->max_pins)[(entry_ptr)->type->id] \ + = (entry_ptr)->pins; \ + } + +#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \ + (((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \ + if ( (entry_ptr)->is_pinned ) { \ + (((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \ + ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \ + (entry_ptr)->pins++; \ + if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ + (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ + if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ + (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; \ + } \ + if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ + (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ + if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \ + (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ + if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ + (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ + if ( (entry_ptr)->size > \ + ((cache_ptr)->max_size)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->max_size)[(entry_ptr)->type->id] \ + = (entry_ptr)->size; \ + } + +#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \ + if ( hit ) \ + ((cache_ptr)->hits)[(entry_ptr)->type->id]++; \ + else \ + ((cache_ptr)->misses)[(entry_ptr)->type->id]++; \ + if ( ! ((entry_ptr)->is_read_only) ) { \ + ((cache_ptr)->write_protects)[(entry_ptr)->type->id]++; \ + } else { \ + ((cache_ptr)->read_protects)[(entry_ptr)->type->id]++; \ + if ( ((entry_ptr)->ro_ref_count) > \ + ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] = \ + ((entry_ptr)->ro_ref_count); \ + } \ + } \ + if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ + (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ + if ( (cache_ptr)->pl_len > (cache_ptr)->max_pl_len ) \ + (cache_ptr)->max_pl_len = (cache_ptr)->pl_len; \ + if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ + (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \ + if ( (entry_ptr)->size > \ + ((cache_ptr)->max_size)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->max_size)[(entry_ptr)->type->id] \ + = (entry_ptr)->size; \ + } \ + ((entry_ptr)->accesses)++; + +#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \ + ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \ + (entry_ptr)->pins++; \ + if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ + (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ + if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ + (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; + +#else /* H5C_COLLECT_CACHE_ENTRY_STATS */ + +#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr) + +#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \ + if ( (entry_ptr)->is_pinned ) { \ + (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \ + } \ + (((cache_ptr)->clears)[(entry_ptr)->type->id])++; + +#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \ + (((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \ + if ( (entry_ptr)->is_pinned ) { \ + (((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \ + } + +#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \ + (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; + +#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \ + (((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \ + if ( (entry_ptr)->is_pinned ) { \ + (((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \ + ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \ + if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ + (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ + if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ + (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; \ + } \ + if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ + (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ + if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \ + (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ + if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ + (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; + +#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \ + if ( hit ) \ + ((cache_ptr)->hits)[(entry_ptr)->type->id]++; \ + else \ + ((cache_ptr)->misses)[(entry_ptr)->type->id]++; \ + if ( ! ((entry_ptr)->is_read_only) ) { \ + ((cache_ptr)->write_protects)[(entry_ptr)->type->id]++; \ + } else { \ + ((cache_ptr)->read_protects)[(entry_ptr)->type->id]++; \ + if ( ((entry_ptr)->ro_ref_count) > \ + ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] ) { \ + ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] = \ + ((entry_ptr)->ro_ref_count); \ + } \ + } \ + if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ + (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ + if ( (cache_ptr)->pl_len > (cache_ptr)->max_pl_len ) \ + (cache_ptr)->max_pl_len = (cache_ptr)->pl_len; \ + if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ + (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; + +#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \ + ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \ + if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ + (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ + if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ + (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; + +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ + +#else /* H5C_COLLECT_CACHE_STATS */ + +#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr) +#define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) +#define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) +#define H5C__UPDATE_STATS_FOR_RENAME(cache_ptr, entry_ptr) +#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) +#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) +#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) +#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) +#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) +#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) +#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) +#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) +#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) +#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) +#define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) + +#endif /* H5C_COLLECT_CACHE_STATS */ + + +/*********************************************************************** + * + * Hash table access and manipulation macros: + * + * The following macros handle searches, insertions, and deletion in + * the hash table. + * + * When modifying these macros, remember to modify the similar macros + * in tst/cache.c + * + * Changes: + * + * - Updated existing index macros and sanity check macros to maintain + * the clean_index_size and dirty_index_size fields of H5C_t. Also + * added macros to allow us to track entry cleans and dirties. + * + * JRM -- 11/5/08 + * + ***********************************************************************/ + +/* H5C__HASH_TABLE_LEN is defined in H5Cpkg.h. It mut be a power of two. */ + +#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3) + +#define H5C__HASH_FCN(x) (int)(((x) & H5C__HASH_MASK) >> 3) + +#if H5C_DO_SANITY_CHECKS + +#define H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (entry_ptr) == NULL ) || \ + ( ! H5F_addr_defined((entry_ptr)->addr) ) || \ + ( (entry_ptr)->ht_next != NULL ) || \ + ( (entry_ptr)->ht_prev != NULL ) || \ + ( (entry_ptr)->size <= 0 ) || \ + ( (k = H5C__HASH_FCN((entry_ptr)->addr)) < 0 ) || \ + ( k >= H5C__HASH_TABLE_LEN ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + \ + (cache_ptr)->dirty_index_size) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ + "Pre HT insert SC failed") \ +} + +#define H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (cache_ptr)->index_len < 1 ) || \ + ( (entry_ptr) == NULL ) || \ + ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ + ( ! H5F_addr_defined((entry_ptr)->addr) ) || \ + ( (entry_ptr)->size <= 0 ) || \ + ( H5C__HASH_FCN((entry_ptr)->addr) < 0 ) || \ + ( H5C__HASH_FCN((entry_ptr)->addr) >= H5C__HASH_TABLE_LEN ) || \ + ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] \ + == NULL ) || \ + ( ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] \ + != (entry_ptr) ) && \ + ( (entry_ptr)->ht_prev == NULL ) ) || \ + ( ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] == \ + (entry_ptr) ) && \ + ( (entry_ptr)->ht_prev != NULL ) ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + \ + (cache_ptr)->dirty_index_size) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Pre HT remove SC failed") \ +} + +/* (Keep in sync w/H5C_TEST__PRE_HT_SEARCH_SC macro in test/cache_common.h -QAK) */ +#define H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ + ( ! H5F_addr_defined(Addr) ) || \ + ( H5C__HASH_FCN(Addr) < 0 ) || \ + ( H5C__HASH_FCN(Addr) >= H5C__HASH_TABLE_LEN ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "Pre HT search SC failed") \ +} + +/* (Keep in sync w/H5C_TEST__POST_SUC_HT_SEARCH_SC macro in test/cache_common.h -QAK) */ +#define H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (cache_ptr)->index_len < 1 ) || \ + ( (entry_ptr) == NULL ) || \ + ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ + ( H5F_addr_ne((entry_ptr)->addr, (Addr)) ) || \ + ( (entry_ptr)->size <= 0 ) || \ + ( ((cache_ptr)->index)[k] == NULL ) || \ + ( ( ((cache_ptr)->index)[k] != (entry_ptr) ) && \ + ( (entry_ptr)->ht_prev == NULL ) ) || \ + ( ( ((cache_ptr)->index)[k] == (entry_ptr) ) && \ + ( (entry_ptr)->ht_prev != NULL ) ) || \ + ( ( (entry_ptr)->ht_prev != NULL ) && \ + ( (entry_ptr)->ht_prev->ht_next != (entry_ptr) ) ) || \ + ( ( (entry_ptr)->ht_next != NULL ) && \ + ( (entry_ptr)->ht_next->ht_prev != (entry_ptr) ) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ + "Post successful HT search SC failed") \ +} + +/* (Keep in sync w/H5C_TEST__POST_HT_SHIFT_TO_FRONT macro in test/cache_common.h -QAK) */ +#define H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \ +if ( ( (cache_ptr) == NULL ) || \ + ( ((cache_ptr)->index)[k] != (entry_ptr) ) || \ + ( (entry_ptr)->ht_prev != NULL ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ + "Post HT shift to front SC failed") \ +} + +#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ + entry_ptr, was_clean) \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->index_len <= 0 ) || \ + ( (cache_ptr)->index_size <= 0 ) || \ + ( (new_size) <= 0 ) || \ + ( (old_size) > (cache_ptr)->index_size ) || \ + ( (new_size) <= 0 ) || \ + ( ( (cache_ptr)->index_len == 1 ) && \ + ( (cache_ptr)->index_size != (old_size) ) ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + \ + (cache_ptr)->dirty_index_size) ) || \ + ( (entry_ptr == NULL) ) || \ + ( ( !( was_clean ) || \ + ( (cache_ptr)->clean_index_size < (old_size) ) ) && \ + ( ( (was_clean) ) || \ + ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) \ + ( (entry_ptr) == NULL ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Pre HT entry size change SC failed") \ +} + +#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ + entry_ptr) \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->index_len <= 0 ) || \ + ( (cache_ptr)->index_size <= 0 ) || \ + ( (new_size) > (cache_ptr)->index_size ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + \ + (cache_ptr)->dirty_index_size) ) || \ + ( ( !((entry_ptr)->is_dirty ) || \ + ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \ + ( ( ((entry_ptr)->is_dirty) ) || \ + ( (cache_ptr)->clean_index_size < (new_size) ) ) ) \ + ( ( (cache_ptr)->index_len == 1 ) && \ + ( (cache_ptr)->index_size != (new_size) ) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Post HT entry size change SC failed") \ +} + +#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) \ +if ( \ + ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (cache_ptr)->index_len <= 0 ) || \ + ( (entry_ptr) == NULL ) || \ + ( (entry_ptr)->is_dirty != FALSE ) || \ + ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->dirty_index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Pre HT update for entry clean SC failed") \ +} + +#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) \ +if ( \ + ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (cache_ptr)->index_len <= 0 ) || \ + ( (entry_ptr) == NULL ) || \ + ( (entry_ptr)->is_dirty != TRUE ) || \ + ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->clean_index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Pre HT update for entry dirty SC failed") \ +} + +#define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) \ +if ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Post HT update for entry clean SC failed") \ +} + +#define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) \ +if ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Post HT update for entry dirty SC failed") \ +} + +#else /* H5C_DO_SANITY_CHECKS */ + +#define H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) +#define H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) +#define H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) +#define H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) +#define H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) +#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) +#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) +#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ + entry_ptr, was_clean) +#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ + entry_ptr) +#define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) +#define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) + +#endif /* H5C_DO_SANITY_CHECKS */ + + +#define H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, fail_val) \ +{ \ + int k; \ + H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \ + k = H5C__HASH_FCN((entry_ptr)->addr); \ + if ( ((cache_ptr)->index)[k] == NULL ) \ + { \ + ((cache_ptr)->index)[k] = (entry_ptr); \ + } \ + else \ + { \ + (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ + (entry_ptr)->ht_next->ht_prev = (entry_ptr); \ + ((cache_ptr)->index)[k] = (entry_ptr); \ + } \ + (cache_ptr)->index_len++; \ + (cache_ptr)->index_size += (entry_ptr)->size; \ + if ( (entry_ptr)->is_dirty ) { \ + (cache_ptr)->dirty_index_size += (entry_ptr)->size; \ + } else { \ + (cache_ptr)->clean_index_size += (entry_ptr)->size; \ + } \ + H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \ +} + +#define H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) \ +{ \ + int k; \ + H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \ + k = H5C__HASH_FCN((entry_ptr)->addr); \ + if ( (entry_ptr)->ht_next ) \ + { \ + (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ + } \ + if ( (entry_ptr)->ht_prev ) \ + { \ + (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ + } \ + if ( ((cache_ptr)->index)[k] == (entry_ptr) ) \ + { \ + ((cache_ptr)->index)[k] = (entry_ptr)->ht_next; \ + } \ + (entry_ptr)->ht_next = NULL; \ + (entry_ptr)->ht_prev = NULL; \ + (cache_ptr)->index_len--; \ + (cache_ptr)->index_size -= (entry_ptr)->size; \ + if ( (entry_ptr)->is_dirty ) { \ + (cache_ptr)->dirty_index_size -= (entry_ptr)->size; \ + } else { \ + (cache_ptr)->clean_index_size -= (entry_ptr)->size; \ + } \ + H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \ +} + +#define H5C__SEARCH_INDEX(cache_ptr, Addr, entry_ptr, fail_val) \ +{ \ + int k; \ + int depth = 0; \ + H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ + k = H5C__HASH_FCN(Addr); \ + entry_ptr = ((cache_ptr)->index)[k]; \ + while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \ + { \ + (entry_ptr) = (entry_ptr)->ht_next; \ + (depth)++; \ + } \ + if ( entry_ptr ) \ + { \ + H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \ + if ( entry_ptr != ((cache_ptr)->index)[k] ) \ + { \ + if ( (entry_ptr)->ht_next ) \ + { \ + (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ + } \ + HDassert( (entry_ptr)->ht_prev != NULL ); \ + (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ + ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \ + (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ + (entry_ptr)->ht_prev = NULL; \ + ((cache_ptr)->index)[k] = (entry_ptr); \ + H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \ + } \ + } \ + H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, (entry_ptr != NULL), depth) \ +} + +#define H5C__SEARCH_INDEX_NO_STATS(cache_ptr, Addr, entry_ptr, fail_val) \ +{ \ + int k; \ + int depth = 0; \ + H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ + k = H5C__HASH_FCN(Addr); \ + entry_ptr = ((cache_ptr)->index)[k]; \ + while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \ + { \ + (entry_ptr) = (entry_ptr)->ht_next; \ + (depth)++; \ + } \ + if ( entry_ptr ) \ + { \ + H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \ + if ( entry_ptr != ((cache_ptr)->index)[k] ) \ + { \ + if ( (entry_ptr)->ht_next ) \ + { \ + (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ + } \ + HDassert( (entry_ptr)->ht_prev != NULL ); \ + (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ + ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \ + (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ + (entry_ptr)->ht_prev = NULL; \ + ((cache_ptr)->index)[k] = (entry_ptr); \ + H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \ + } \ + } \ +} + +#define H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr) \ +{ \ + H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \ + (cache_ptr)->dirty_index_size -= (entry_ptr)->size; \ + (cache_ptr)->clean_index_size += (entry_ptr)->size; \ + H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \ +} + +#define H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr) \ +{ \ + H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \ + (cache_ptr)->clean_index_size -= (entry_ptr)->size; \ + (cache_ptr)->dirty_index_size += (entry_ptr)->size; \ + H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \ +} + +#define H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size, \ + entry_ptr, was_clean) \ +{ \ + H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ + entry_ptr, was_clean) \ + (cache_ptr)->index_size -= (old_size); \ + (cache_ptr)->index_size += (new_size); \ + if ( was_clean ) { \ + (cache_ptr)->clean_index_size -= (old_size); \ + } else { \ + (cache_ptr)->dirty_index_size -= (old_size); \ + } \ + if ( (entry_ptr)->is_dirty ) { \ + (cache_ptr)->dirty_index_size += (new_size); \ + } else { \ + (cache_ptr)->clean_index_size += (new_size); \ + } \ + H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, entry_ptr) \ +} + + +/************************************************************************** + * + * Skip list insertion and deletion macros: + * + * These used to be functions, but I converted them to macros to avoid some + * function call overhead. + * + **************************************************************************/ + +/*------------------------------------------------------------------------- + * + * Macro: H5C__INSERT_ENTRY_IN_SLIST + * + * Purpose: Insert the specified instance of H5C_cache_entry_t into + * the skip list in the specified instance of H5C_t. Update + * the associated length and size fields. + * + * Return: N/A + * + * Programmer: John Mainzer, 5/10/04 + * + * Modifications: + * + * JRM -- 7/21/04 + * Updated function to set the in_tree flag when inserting + * an entry into the tree. Also modified the function to + * update the tree size and len fields instead of the similar + * index fields. + * + * All of this is part of the modifications to support the + * hash table. + * + * JRM -- 7/27/04 + * Converted the function H5C_insert_entry_in_tree() into + * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of + * wringing a little more speed out of the cache. + * + * Note that we don't bother to check if the entry is already + * in the tree -- if it is, H5SL_insert() will fail. + * + * QAK -- 11/27/04 + * Switched over to using skip list routines. + * + * JRM -- 6/27/06 + * Added fail_val parameter. + * + * JRM -- 8/25/06 + * Added the H5C_DO_SANITY_CHECKS version of the macro. + * + * This version maintains the slist_len_increase and + * slist_size_increase fields that are used in sanity + * checks in the flush routines. + * + * All this is needed as the fractal heap needs to be + * able to dirty, resize and/or rename entries during the + * flush. + * + *------------------------------------------------------------------------- + */ + +#if H5C_DO_SANITY_CHECKS + +#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( (entry_ptr)->size > 0 ); \ + HDassert( H5F_addr_defined((entry_ptr)->addr) ); \ + HDassert( !((entry_ptr)->in_slist) ); \ + \ + if ( H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, &(entry_ptr)->addr) \ + < 0 ) \ + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), \ + "Can't insert entry in skip list") \ + \ + (entry_ptr)->in_slist = TRUE; \ + (cache_ptr)->slist_len++; \ + (cache_ptr)->slist_size += (entry_ptr)->size; \ + (cache_ptr)->slist_len_increase++; \ + (cache_ptr)->slist_size_increase += (entry_ptr)->size; \ + \ + HDassert( (cache_ptr)->slist_len > 0 ); \ + HDassert( (cache_ptr)->slist_size > 0 ); \ + \ +} /* H5C__INSERT_ENTRY_IN_SLIST */ + +#else /* H5C_DO_SANITY_CHECKS */ + +#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( (entry_ptr)->size > 0 ); \ + HDassert( H5F_addr_defined((entry_ptr)->addr) ); \ + HDassert( !((entry_ptr)->in_slist) ); \ + \ + if ( H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, &(entry_ptr)->addr) \ + < 0 ) \ + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), \ + "Can't insert entry in skip list") \ + \ + (entry_ptr)->in_slist = TRUE; \ + (cache_ptr)->slist_len++; \ + (cache_ptr)->slist_size += (entry_ptr)->size; \ + \ + HDassert( (cache_ptr)->slist_len > 0 ); \ + HDassert( (cache_ptr)->slist_size > 0 ); \ + \ +} /* H5C__INSERT_ENTRY_IN_SLIST */ + +#endif /* H5C_DO_SANITY_CHECKS */ + + +/*------------------------------------------------------------------------- + * + * Function: H5C__REMOVE_ENTRY_FROM_SLIST + * + * Purpose: Remove the specified instance of H5C_cache_entry_t from the + * index skip list in the specified instance of H5C_t. Update + * the associated length and size fields. + * + * Return: N/A + * + * Programmer: John Mainzer, 5/10/04 + * + * Modifications: + * + * JRM -- 7/21/04 + * Updated function for the addition of the hash table. + * + * JRM - 7/27/04 + * Converted from the function H5C_remove_entry_from_tree() + * to the macro H5C__REMOVE_ENTRY_FROM_TREE in the hopes of + * wringing a little more performance out of the cache. + * + * QAK -- 11/27/04 + * Switched over to using skip list routines. + * + * JRM -- 3/28/07 + * Updated sanity checks for the new is_read_only and + * ro_ref_count fields in H5C_cache_entry_t. + * + *------------------------------------------------------------------------- + */ + +#define H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + HDassert( (entry_ptr)->in_slist ); \ + HDassert( (cache_ptr)->slist_ptr ); \ + \ + if ( H5SL_remove((cache_ptr)->slist_ptr, &(entry_ptr)->addr) \ + != (entry_ptr) ) \ + \ + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, \ + "Can't delete entry from skip list.") \ + \ + HDassert( (cache_ptr)->slist_len > 0 ); \ + (cache_ptr)->slist_len--; \ + HDassert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \ + (cache_ptr)->slist_size -= (entry_ptr)->size; \ + (entry_ptr)->in_slist = FALSE; \ +} /* H5C__REMOVE_ENTRY_FROM_SLIST */ + + +/*------------------------------------------------------------------------- + * + * Function: H5C__UPDATE_SLIST_FOR_SIZE_CHANGE + * + * Purpose: Update cache_ptr->slist_size for a change in the size of + * and entry in the slist. + * + * Return: N/A + * + * Programmer: John Mainzer, 9/07/05 + * + * Modifications: + * + * JRM -- 8/27/06 + * Added the H5C_DO_SANITY_CHECKS version of the macro. + * + * This version maintains the slist_size_increase field + * that are used in sanity checks in the flush routines. + * + * All this is needed as the fractal heap needs to be + * able to dirty, resize and/or rename entries during the + * flush. + * + *------------------------------------------------------------------------- + */ + +#if H5C_DO_SANITY_CHECKS + +#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (old_size) > 0 ); \ + HDassert( (new_size) > 0 ); \ + HDassert( (old_size) <= (cache_ptr)->slist_size ); \ + HDassert( (cache_ptr)->slist_len > 0 ); \ + HDassert( ((cache_ptr)->slist_len > 1) || \ + ( (cache_ptr)->slist_size == (old_size) ) ); \ + \ + (cache_ptr)->slist_size -= (old_size); \ + (cache_ptr)->slist_size += (new_size); \ + \ + (cache_ptr)->slist_size_increase -= (int64_t)(old_size); \ + (cache_ptr)->slist_size_increase += (int64_t)(new_size); \ + \ + HDassert( (new_size) <= (cache_ptr)->slist_size ); \ + HDassert( ( (cache_ptr)->slist_len > 1 ) || \ + ( (cache_ptr)->slist_size == (new_size) ) ); \ +} /* H5C__REMOVE_ENTRY_FROM_SLIST */ + +#else /* H5C_DO_SANITY_CHECKS */ + +#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (old_size) > 0 ); \ + HDassert( (new_size) > 0 ); \ + HDassert( (old_size) <= (cache_ptr)->slist_size ); \ + HDassert( (cache_ptr)->slist_len > 0 ); \ + HDassert( ((cache_ptr)->slist_len > 1) || \ + ( (cache_ptr)->slist_size == (old_size) ) ); \ + \ + (cache_ptr)->slist_size -= (old_size); \ + (cache_ptr)->slist_size += (new_size); \ + \ + HDassert( (new_size) <= (cache_ptr)->slist_size ); \ + HDassert( ( (cache_ptr)->slist_len > 1 ) || \ + ( (cache_ptr)->slist_size == (new_size) ) ); \ +} /* H5C__REMOVE_ENTRY_FROM_SLIST */ + +#endif /* H5C_DO_SANITY_CHECKS */ + + +/************************************************************************** + * + * Replacement policy update macros: + * + * These used to be functions, but I converted them to macros to avoid some + * function call overhead. + * + **************************************************************************/ + +/*------------------------------------------------------------------------- + * + * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS + * + * Purpose: For efficiency, we sometimes change the order of flushes -- + * but doing so can confuse the replacement policy. This + * macro exists to allow us to specify an entry as the + * most recently touched so we can repair any such + * confusion. + * + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the macro + * should switch on the current policy and act accordingly. + * + * Return: N/A + * + * Programmer: John Mainzer, 10/13/05 + * + * Modifications: + * + * JRM -- 3/20/06 + * Modified macro to ignore pinned entries. Pinned entries + * do not appear in the data structures maintained by the + * replacement policy code, and thus this macro has nothing + * to do if called for such an entry. + * + * JRM -- 3/28/07 + * Added sanity checks using the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. + * + *------------------------------------------------------------------------- + */ + +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + +#define H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( ! ((entry_ptr)->is_pinned) ) { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list, and re-insert it at the head.\ + */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* Use the dirty flag to infer whether the entry is on the clean or \ + * dirty LRU list, and remove it. Then insert it at the head of \ + * the same LRU list. \ + * \ + * At least initially, all entries should be clean. That may \ + * change, so we may as well deal with both cases now. \ + */ \ + \ + if ( (entry_ptr)->is_dirty ) { \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + } else { \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ + /* End modified LRU specific code. */ \ + } \ +} /* H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS */ + +#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + +#define H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( ! ((entry_ptr)->is_pinned) ) { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list, and re-insert it at the head \ + */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* End modified LRU specific code. */ \ + } \ +} /* H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS */ + +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + + +/*------------------------------------------------------------------------- + * + * Macro: H5C__UPDATE_RP_FOR_EVICTION + * + * Purpose: Update the replacement policy data structures for an + * eviction of the specified cache entry. + * + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 5/10/04 + * + * Modifications: + * + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_eviction() to the + * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze + * a bit more performance out of the cache. + * + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause dificulties with + * the pre-processor, I'll have to remove them. + * + * JRM - 7/28/04 + * Split macro into two version, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. + * + * JRM - 3/20/06 + * Pinned entries can't be evicted, so this entry should never + * be called on a pinned entry. Added assert to verify this. + * + * JRM -- 3/28/07 + * Added sanity checks for the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. + * + *------------------------------------------------------------------------- + */ + +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + +#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( !((entry_ptr)->is_pinned) ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list. */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* If the entry is clean when it is evicted, it should be on the \ + * clean LRU list, if it was dirty, it should be on the dirty LRU list. \ + * Remove it from the appropriate list according to the value of the \ + * dirty flag. \ + */ \ + \ + if ( (entry_ptr)->is_dirty ) { \ + \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + } else { \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ +} /* H5C__UPDATE_RP_FOR_EVICTION */ + +#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + +#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( !((entry_ptr)->is_pinned) ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list. */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ +} /* H5C__UPDATE_RP_FOR_EVICTION */ + +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + + +/*------------------------------------------------------------------------- + * + * Macro: H5C__UPDATE_RP_FOR_FLUSH + * + * Purpose: Update the replacement policy data structures for a flush + * of the specified cache entry. + * + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. + * + * Return: N/A + * + * Programmer: John Mainzer, 5/6/04 + * + * Modifications: + * + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_flush() to the + * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze + * a bit more performance out of the cache. + * + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause dificulties with + * pre-processor, I'll have to remove them. + * + * JRM - 7/28/04 + * Split macro into two versions, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. + * + * JRM - 3/20/06 + * While pinned entries can be flushed, they don't reside in + * the replacement policy data structures when unprotected. + * Thus I modified this macro to do nothing if the entry is + * pinned. + * + * JRM - 3/28/07 + * Added sanity checks based on the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. + * + *------------------------------------------------------------------------- + */ + +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + +#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( ! ((entry_ptr)->is_pinned) ) { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list, and re-insert it at the \ + * head. \ + */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* since the entry is being flushed or cleared, one would think \ + * that it must be dirty -- but that need not be the case. Use the \ + * dirty flag to infer whether the entry is on the clean or dirty \ + * LRU list, and remove it. Then insert it at the head of the \ + * clean LRU list. \ + * \ + * The function presumes that a dirty entry will be either cleared \ + * or flushed shortly, so it is OK if we put a dirty entry on the \ + * clean LRU list. \ + */ \ + \ + if ( (entry_ptr)->is_dirty ) { \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + } else { \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + \ + /* End modified LRU specific code. */ \ + } \ +} /* H5C__UPDATE_RP_FOR_FLUSH */ + +#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + +#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( ! ((entry_ptr)->is_pinned) ) { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list, and re-insert it at the \ + * head. \ + */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* End modified LRU specific code. */ \ + } \ +} /* H5C__UPDATE_RP_FOR_FLUSH */ + +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + + +/*------------------------------------------------------------------------- + * + * Macro: H5C__UPDATE_RP_FOR_INSERTION + * + * Purpose: Update the replacement policy data structures for an + * insertion of the specified cache entry. + * + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. + * + * Return: N/A + * + * Programmer: John Mainzer, 5/17/04 + * + * Modifications: + * + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_insertion() to the + * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze + * a bit more performance out of the cache. + * + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause dificulties with + * pre-processor, I'll have to remove them. + * + * JRM - 7/28/04 + * Split macro into two version, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. + * + * JRM - 3/10/06 + * This macro should never be called on a pinned entry. + * Inserted an assert to verify this. + * + * JRM - 8/9/06 + * Not any more. We must now allow insertion of pinned + * entries. Updated macro to support this. + * + * JRM - 3/28/07 + * Added sanity checks using the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. + * + *------------------------------------------------------------------------- + */ + +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + +#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( (entry_ptr)->is_pinned ) { \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, (fail_val)) \ + \ + } else { \ + \ + /* modified LRU specific code */ \ + \ + /* insert the entry at the head of the LRU list. */ \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* insert the entry at the head of the clean or dirty LRU list as \ + * appropriate. \ + */ \ + \ + if ( entry_ptr->is_dirty ) { \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + } else { \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ + /* End modified LRU specific code. */ \ + } \ +} + +#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + +#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( (entry_ptr)->is_pinned ) { \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, (fail_val)) \ + \ + } else { \ + \ + /* modified LRU specific code */ \ + \ + /* insert the entry at the head of the LRU list. */ \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* End modified LRU specific code. */ \ + } \ +} + +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + + +/*------------------------------------------------------------------------- + * + * Macro: H5C__UPDATE_RP_FOR_PROTECT + * + * Purpose: Update the replacement policy data structures for a + * protect of the specified cache entry. + * + * To do this, unlink the specified entry from any data + * structures used by the replacement policy, and add the + * entry to the protected list. + * + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. + * + * Return: N/A + * + * Programmer: John Mainzer, 5/17/04 + * + * Modifications: + * + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_protect() to the + * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze + * a bit more performance out of the cache. + * + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause dificulties with + * pre-processor, I'll have to remove them. + * + * JRM - 7/28/04 + * Split macro into two version, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. + * + * JRM - 3/17/06 + * Modified macro to attempt to remove pinned entriese from + * the pinned entry list instead of from the data structures + * maintained by the replacement policy. + * + * JRM - 3/28/07 + * Added sanity checks based on the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. + * + *------------------------------------------------------------------------- + */ + +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + +#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( (entry_ptr)->is_pinned ) { \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, (fail_val)) \ + HDassert( (cache_ptr)->pel_len >= 0 ); \ + \ + } else { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list. */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* Similarly, remove the entry from the clean or dirty LRU list \ + * as appropriate. \ + */ \ + \ + if ( (entry_ptr)->is_dirty ) { \ + \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + \ + } else { \ + \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ + /* End modified LRU specific code. */ \ + } \ + \ + /* Regardless of the replacement policy, or whether the entry is \ + * pinned, now add the entry to the protected list. \ + */ \ + \ + H5C__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \ + (cache_ptr)->pl_tail_ptr, \ + (cache_ptr)->pl_len, \ + (cache_ptr)->pl_size, (fail_val)) \ +} /* H5C__UPDATE_RP_FOR_PROTECT */ + +#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + +#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( (entry_ptr)->is_pinned ) { \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, (fail_val)) \ + HDassert( (cache_ptr)->pel_len >= 0 ); \ + \ + } else { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list. */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* End modified LRU specific code. */ \ + } \ + \ + /* Regardless of the replacement policy, or whether the entry is \ + * pinned, now add the entry to the protected list. \ + */ \ + \ + H5C__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \ + (cache_ptr)->pl_tail_ptr, \ + (cache_ptr)->pl_len, \ + (cache_ptr)->pl_size, (fail_val)) \ +} /* H5C__UPDATE_RP_FOR_PROTECT */ + +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + + +/*------------------------------------------------------------------------- + * + * Macro: H5C__UPDATE_RP_FOR_RENAME + * + * Purpose: Update the replacement policy data structures for a + * rename of the specified cache entry. + * + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. + * + * Return: N/A + * + * Programmer: John Mainzer, 5/17/04 + * + * Modifications: + * + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_rename() to the + * macro H5C__UPDATE_RP_FOR_RENAME in an effort to squeeze + * a bit more performance out of the cache. + * + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause dificulties with + * pre-processor, I'll have to remove them. + * + * JRM - 7/28/04 + * Split macro into two version, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. + * + * JRM - 6/23/05 + * Added the was_dirty parameter. It is possible that + * the entry was clean when it was renamed -- if so it + * it is in the clean LRU regardless of the current + * value of the is_dirty field. + * + * At present, all renamed entries are forced to be + * dirty. This macro is a bit more general that that, + * to allow it to function correctly should that policy + * be relaxed in the future. + * + * JRM - 3/17/06 + * Modified macro to do nothing if the entry is pinned. + * In this case, the entry is on the pinned entry list, not + * in the replacement policy data structures, so there is + * nothing to be done. + * + * JRM - 3/28/07 + * Added sanity checks using the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. + * + *------------------------------------------------------------------------- + */ + +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + +#define H5C__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( ! ((entry_ptr)->is_pinned) ) { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list, and re-insert it at the head. \ + */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* remove the entry from either the clean or dirty LUR list as \ + * indicated by the was_dirty parameter \ + */ \ + if ( was_dirty ) { \ + \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + \ + } else { \ + \ + H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ + /* insert the entry at the head of either the clean or dirty LRU \ + * list as appropriate. \ + */ \ + \ + if ( (entry_ptr)->is_dirty ) { \ + \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + \ + } else { \ + \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ + /* End modified LRU specific code. */ \ + } \ +} /* H5C__UPDATE_RP_FOR_RENAME */ + +#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + +#define H5C__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + if ( ! ((entry_ptr)->is_pinned) ) { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list, and re-insert it at the head. \ + */ \ + \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* End modified LRU specific code. */ \ + } \ +} /* H5C__UPDATE_RP_FOR_RENAME */ + +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + + +/*------------------------------------------------------------------------- + * + * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE + * + * Purpose: Update the replacement policy data structures for a + * size change of the specified cache entry. + * + * To do this, determine if the entry is pinned. If it is, + * update the size of the pinned entry list. + * + * If it isn't pinned, the entry must handled by the + * replacement policy. Update the appropriate replacement + * policy data structures. + * + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. + * + * Return: N/A + * + * Programmer: John Mainzer, 8/23/06 + * + * Modifications: + * + * JRM -- 3/28/07 + * Added sanity checks based on the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. + * + *------------------------------------------------------------------------- + */ + +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + +#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + HDassert( new_size > 0 ); \ + \ + if ( (entry_ptr)->is_pinned ) { \ + \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ + } else { \ + \ + /* modified LRU specific code */ \ + \ + /* Update the size of the LRU list */ \ + \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ + /* Similarly, update the size of the clean or dirty LRU list as \ + * appropriate. At present, the entry must be clean, but that \ + * could change. \ + */ \ + \ + if ( (entry_ptr)->is_dirty ) { \ + \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ + } else { \ + \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ + } \ + \ + /* End modified LRU specific code. */ \ + } \ + \ +} /* H5C__UPDATE_RP_FOR_SIZE_CHANGE */ + +#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + +#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + HDassert( new_size > 0 ); \ + \ + if ( (entry_ptr)->is_pinned ) { \ + \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ + } else { \ + \ + /* modified LRU specific code */ \ + \ + /* Update the size of the LRU list */ \ + \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ + /* End modified LRU specific code. */ \ + } \ + \ +} /* H5C__UPDATE_RP_FOR_SIZE_CHANGE */ + +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + + +/*------------------------------------------------------------------------- + * + * Macro: H5C__UPDATE_RP_FOR_UNPIN + * + * Purpose: Update the replacement policy data structures for an + * unpin of the specified cache entry. + * + * To do this, unlink the specified entry from the protected + * entry list, and re-insert it in the data structures used + * by the current replacement policy. + * + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the macro + * should switch on the current policy and act accordingly. + * + * Return: N/A + * + * Programmer: John Mainzer, 3/22/06 + * + * Modifications: + * + * JRM -- 3/28/07 + * Added sanity checks based on the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. + * + *------------------------------------------------------------------------- + */ + +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + +#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->is_pinned); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + /* Regardless of the replacement policy, remove the entry from the \ + * pinned entry list. \ + */ \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ + (cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, (fail_val)) \ + HDassert( (cache_ptr)->pel_len >= 0 ); \ + \ + /* modified LRU specific code */ \ + \ + /* insert the entry at the head of the LRU list. */ \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* Similarly, insert the entry at the head of either the clean or \ + * dirty LRU list as appropriate. \ + */ \ + \ + if ( (entry_ptr)->is_dirty ) { \ + \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + \ + } else { \ + \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ + /* End modified LRU specific code. */ \ + \ +} /* H5C__UPDATE_RP_FOR_UNPIN */ + +#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + +#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->is_pinned); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + /* Regardless of the replacement policy, remove the entry from the \ + * pinned entry list. \ + */ \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ + (cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, (fail_val)) \ + HDassert( (cache_ptr)->pel_len >= 0 ); \ + \ + /* modified LRU specific code */ \ + \ + /* insert the entry at the head of the LRU list. */ \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* End modified LRU specific code. */ \ + \ +} /* H5C__UPDATE_RP_FOR_UNPIN */ + +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + + +/*------------------------------------------------------------------------- + * + * Macro: H5C__UPDATE_RP_FOR_UNPROTECT + * + * Purpose: Update the replacement policy data structures for an + * unprotect of the specified cache entry. + * + * To do this, unlink the specified entry from the protected + * list, and re-insert it in the data structures used by the + * current replacement policy. + * + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. + * + * Return: N/A + * + * Programmer: John Mainzer, 5/19/04 + * + * Modifications: + * + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_unprotect() to + * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to + * squeeze a bit more performance out of the cache. + * + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause dificulties with + * pre-processor, I'll have to remove them. + * + * JRM - 7/28/04 + * Split macro into two version, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. + * + * JRM - 3/17/06 + * Modified macro to put pinned entries on the pinned entry + * list instead of inserting them in the data structures + * maintained by the replacement policy. + * + *------------------------------------------------------------------------- + */ + +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + +#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( (entry_ptr)->is_protected); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + /* Regardless of the replacement policy, remove the entry from the \ + * protected list. \ + */ \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \ + (cache_ptr)->pl_tail_ptr, (cache_ptr)->pl_len, \ + (cache_ptr)->pl_size, (fail_val)) \ + \ + if ( (entry_ptr)->is_pinned ) { \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, (fail_val)) \ + \ + } else { \ + \ + /* modified LRU specific code */ \ + \ + /* insert the entry at the head of the LRU list. */ \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* Similarly, insert the entry at the head of either the clean or \ + * dirty LRU list as appropriate. \ + */ \ + \ + if ( (entry_ptr)->is_dirty ) { \ + \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + \ + } else { \ + \ + H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ + /* End modified LRU specific code. */ \ + } \ + \ +} /* H5C__UPDATE_RP_FOR_UNPROTECT */ + +#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + +#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( (entry_ptr)->is_protected); \ + HDassert( (entry_ptr)->size > 0 ); \ + \ + /* Regardless of the replacement policy, remove the entry from the \ + * protected list. \ + */ \ + H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \ + (cache_ptr)->pl_tail_ptr, (cache_ptr)->pl_len, \ + (cache_ptr)->pl_size, (fail_val)) \ + \ + if ( (entry_ptr)->is_pinned ) { \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, (fail_val)) \ + \ + } else { \ + \ + /* modified LRU specific code */ \ + \ + /* insert the entry at the head of the LRU list. */ \ + \ + H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* End modified LRU specific code. */ \ + } \ +} /* H5C__UPDATE_RP_FOR_UNPROTECT */ + +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ + + #endif /* _H5Cpkg_H */ diff --git a/src/H5Cpublic.h b/src/H5Cpublic.h index 7ef959a..0a3742b 100644 --- a/src/H5Cpublic.h +++ b/src/H5Cpublic.h @@ -15,7 +15,7 @@ /*------------------------------------------------------------------------- * - * Created: H5Cproto.h + * Created: H5Cpublic.h * June 4, 2005 * John Mainzer * diff --git a/src/H5D.c b/src/H5D.c index bb5e772..597ca77 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -667,7 +667,7 @@ done: * to the default. The chunk cache properties in the returned list * are considered to be “set”, and any use of this list will override * the corresponding properties in the file’s file access property - * list. + * list. * * All link access properties in the returned list will be set to the * default values. @@ -1068,20 +1068,20 @@ H5Dset_extent(hid_t dset_id, const hsize_t size[]) { H5D_t *dset; /* Dataset for this operation */ herr_t ret_value = SUCCEED; /* Return value */ - + FUNC_ENTER_API(H5Dset_extent, FAIL) H5TRACE2("e", "i*h", dset_id, size); - + /* Check args */ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") if(!size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified") - + /* Private function */ if(H5D_set_extent(dset, size, H5AC_dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set extend dataset") - + done: FUNC_LEAVE_API(ret_value) } /* end H5Dset_extent() */ diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 5eec112..c11c0e1 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -26,7 +26,6 @@ /* Module Setup */ /****************/ -#define H5B_PACKAGE /*suppress error about including H5Bpkg */ #define H5D_PACKAGE /*suppress error about including H5Dpkg */ @@ -34,7 +33,7 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5Bpkg.h" /* B-link trees */ +#include "H5Bprivate.h" /* B-link trees */ #include "H5Dpkg.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ @@ -42,11 +41,8 @@ #include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ #include "H5MFprivate.h" /* File space management */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ #include "H5Sprivate.h" /* Dataspaces */ -#include "H5SLprivate.h" /* Skip lists */ #include "H5Vprivate.h" /* Vector and array functions */ /****************/ @@ -90,6 +86,12 @@ typedef struct H5D_btree_it_ud_t { void *udata; /* User data for chunk callback routine */ } H5D_btree_it_ud_t; +/* B-tree callback info for debugging */ +typedef struct H5D_btree_dbg_t { + H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */ + unsigned ndims; /* Number of dimensions */ +} H5D_btree_dbg_t; + /********************/ /* Local Prototypes */ @@ -106,10 +108,8 @@ static int H5D_btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_ke static H5RC_t *H5D_btree_get_shared(const H5F_t *f, const void *_udata); static herr_t H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t, void *_lt_key, void *_udata, void *_rt_key, haddr_t *addr_p /*out*/); -static int H5D_btree_cmp2(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, - void *_rt_key); -static int H5D_btree_cmp3(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, - void *_rt_key); +static int H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key); +static int H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key); static htri_t H5D_btree_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_lt_key, void *_udata); static H5B_ins_t H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, @@ -118,12 +118,12 @@ static H5B_ins_t H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, static H5B_ins_t H5D_btree_remove( H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key, hbool_t *lt_key_changed, void *_udata, void *_rt_key, hbool_t *rt_key_changed); -static herr_t H5D_btree_decode_key(const H5F_t *f, const H5B_t *bt, - const uint8_t *raw, void *_key); -static herr_t H5D_btree_encode_key(const H5F_t *f, const H5B_t *bt, - uint8_t *raw, void *_key); -static herr_t H5D_btree_debug_key(FILE *stream, H5F_t *f, hid_t dxpl_id, - int indent, int fwidth, const void *key, const void *udata); +static herr_t H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, + void *_key); +static herr_t H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, + void *_key); +static herr_t H5D_btree_debug_key(FILE *stream, int indent, int fwidth, + const void *key, const void *udata); /* Chunked layout indexing callbacks */ static herr_t H5D_btree_idx_init(const H5D_chk_idx_info_t *idx_info, @@ -192,9 +192,10 @@ H5B_class_t H5B_BTREE[1] = {{ H5D_btree_cmp3, /*cmp3 */ H5D_btree_found, /*found */ H5D_btree_insert, /*insert */ + H5B_LEFT, /*critical key */ FALSE, /*follow min branch? */ FALSE, /*follow max branch? */ - H5D_btree_remove, /*remove */ + H5D_btree_remove, /*remove */ H5D_btree_decode_key, /*decode */ H5D_btree_encode_key, /*encode */ H5D_btree_debug_key, /*debug */ @@ -233,9 +234,6 @@ H5D_btree_get_shared(const H5F_t UNUSED *f, const void *_udata) HDassert(udata->storage->idx_type == H5D_CHUNK_IDX_BTREE); HDassert(udata->storage->u.btree.shared); - /* Increment reference count on B-tree info */ - H5RC_INC(udata->storage->u.btree.shared); - /* Return the pointer to the ref-count object */ FUNC_LEAVE_NOAPI(udata->storage->u.btree.shared) } /* end H5D_btree_get_shared() */ @@ -334,10 +332,8 @@ done: * *------------------------------------------------------------------------- */ -/* ARGSUSED */ static int -H5D_btree_cmp2(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_udata, - void *_rt_key) +H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key) { H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key; H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key; @@ -385,10 +381,8 @@ H5D_btree_cmp2(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_udat * *------------------------------------------------------------------------- */ -/* ARGSUSED */ static int -H5D_btree_cmp3(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_udata, - void *_rt_key) +H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key) { H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key; H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key; @@ -542,7 +536,7 @@ H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key, HDassert(rt_key); HDassert(new_node_p); - cmp = H5D_btree_cmp3(f, dxpl_id, lt_key, udata, rt_key); + cmp = H5D_btree_cmp3(lt_key, udata, rt_key); HDassert(cmp <= 0); if(cmp < 0) { @@ -676,19 +670,15 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5D_btree_decode_key(const H5F_t UNUSED *f, const H5B_t *bt, const uint8_t *raw, void *_key) +H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key) { H5D_btree_key_t *key = (H5D_btree_key_t *) _key; - H5B_shared_t *shared; /* Pointer to shared B-tree info */ size_t ndims; unsigned u; FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_decode_key) /* check args */ - HDassert(f); - HDassert(bt); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); HDassert(shared); HDassert(raw); HDassert(key); @@ -718,19 +708,15 @@ H5D_btree_decode_key(const H5F_t UNUSED *f, const H5B_t *bt, const uint8_t *raw, *------------------------------------------------------------------------- */ static herr_t -H5D_btree_encode_key(const H5F_t UNUSED *f, const H5B_t *bt, uint8_t *raw, void *_key) +H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, void *_key) { H5D_btree_key_t *key = (H5D_btree_key_t *) _key; - H5B_shared_t *shared; /* Pointer to shared B-tree info */ size_t ndims; unsigned u; FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_encode_key) /* check args */ - HDassert(f); - HDassert(bt); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); HDassert(shared); HDassert(raw); HDassert(key); @@ -761,11 +747,11 @@ H5D_btree_encode_key(const H5F_t UNUSED *f, const H5B_t *bt, uint8_t *raw, void */ /* ARGSUSED */ static herr_t -H5D_btree_debug_key(FILE *stream, H5F_t UNUSED *f, hid_t UNUSED dxpl_id, int indent, - int fwidth, const void *_key, const void *_udata) +H5D_btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key, + const void *_udata) { const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key; - const unsigned *ndims = (const unsigned *)_udata; + const H5D_btree_dbg_t *udata = (const H5D_btree_dbg_t *)_udata; unsigned u; FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_debug_key) @@ -775,7 +761,7 @@ H5D_btree_debug_key(FILE *stream, H5F_t UNUSED *f, hid_t UNUSED dxpl_id, int ind HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)key->nbytes); HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask); HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); - for(u = 0; u < *ndims; u++) + for(u = 0; u < udata->ndims; u++) HDfprintf(stream, "%s%Hd", u?", ":"", key->offset[u]); HDfputs("}\n", stream); @@ -1463,7 +1449,7 @@ herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int fwidth, unsigned ndims) { - H5D_chunk_common_ud_t udata; /* User data for B-tree callback */ + H5D_btree_dbg_t udata; /* User data for B-tree callback */ H5O_storage_chunk_t storage; /* Storage information for B-tree callback */ hbool_t shared_init = FALSE; /* Whether B-tree shared info is initialized */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1480,9 +1466,10 @@ H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent shared_init = TRUE; /* Set up user data for callback */ - udata.layout = NULL; - udata.storage = &storage; - udata.offset = NULL; + udata.common.layout = NULL; + udata.common.storage = &storage; + udata.common.offset = NULL; + udata.ndims = ndims; /* Dump the records for the B-tree */ (void)H5B_debug(f, dxpl_id, addr, stream, indent, fwidth, H5B_BTREE, &udata); diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 296d79a..8e0f387 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1801,8 +1801,8 @@ done: * * Modification:Raymond Lu * 4 Feb 2009 - * One case that was considered cacheable was when the chunk - * was bigger than the cache size but not allocated on disk. + * One case that was considered cacheable was when the chunk + * was bigger than the cache size but not allocated on disk. * I moved it to uncacheable branch to bypass the cache to * improve performance. *------------------------------------------------------------------------- @@ -2858,7 +2858,9 @@ H5D_chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk(s) from cache") /* Create a new entry */ - ent = H5FL_MALLOC(H5D_rdcc_ent_t); + if(NULL == (ent = H5FL_MALLOC(H5D_rdcc_ent_t))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate raw data chunk entry") + ent->locked = 0; ent->dirty = FALSE; ent->chunk_addr = chunk_addr; @@ -3163,10 +3165,13 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite) +H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite, + hsize_t old_dim[]) { H5D_chk_idx_info_t idx_info; /* Chunked index info */ const H5D_chunk_ops_t *ops = dset->shared->layout.storage.u.chunk.ops; /* Chunk operations */ + hsize_t min_unalloc[H5O_LAYOUT_NDIMS]; /* First chunk in each dimension that is unallocated */ + hsize_t max_unalloc[H5O_LAYOUT_NDIMS]; /* Last chunk in each dimension that is unallocated */ hsize_t chunk_offset[H5O_LAYOUT_NDIMS]; /* Offset of current chunk */ size_t orig_chunk_size; /* Original size of chunk in bytes */ unsigned filter_mask = 0; /* Filter mask for chunks that have them */ @@ -3187,6 +3192,8 @@ H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite) hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */ int space_ndims; /* Dataset's space rank */ hsize_t space_dim[H5O_LAYOUT_NDIMS]; /* Dataset's dataspace dimensions */ + const uint32_t *chunk_dim = layout->u.chunk.dim; /* Convenience pointer to chunk dimensions */ + int op_dim; /* Current operationg dimension */ H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */ hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */ hid_t data_dxpl_id; /* DXPL ID to use for raw data I/O operations */ @@ -3210,6 +3217,15 @@ H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get simple dataspace info") space_dim[space_ndims] = layout->u.chunk.dim[space_ndims]; + /* Check if any space dimensions are 0, if so we do not have to do anything + */ + for(op_dim=0; op_dimshared->cache.chunk.last); + HGOTO_DONE(SUCCEED) + } /* end if */ + #ifdef H5_HAVE_PARALLEL /* Retrieve MPI parameters */ if(IS_H5FD_MPI(dset->oloc.file)) { @@ -3294,135 +3310,161 @@ H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite) idx_info.layout = &dset->shared->layout.u.chunk; idx_info.storage = &dset->shared->layout.storage.u.chunk; - /* Reset the chunk offset indices */ - HDmemset(chunk_offset, 0, (layout->u.chunk.ndims * sizeof(chunk_offset[0]))); + /* Calculate the minimum and maximum chunk offsets in each dimension */ + for(op_dim=0; op_dimshared->cache.chunk); /* Raw data chunk cache */ - H5D_rdcc_ent_t *ent; /* Cache entry */ - hbool_t chunk_exists; /* Flag to indicate whether a chunk exists already */ - unsigned u; /* Local index variable */ - - /* Didn't find the chunk on disk */ - chunk_exists = FALSE; - - /* Look for chunk in cache */ - for(ent = rdcc->head; ent && !chunk_exists; ent = ent->next) { - /* Assume a match */ - chunk_exists = TRUE; - for(u = 0; u < layout->u.chunk.ndims; u++) - if(ent->offset[u] != chunk_offset[u]) { - chunk_exists = FALSE; /* Reset if no match */ - break; - } /* end if */ - } /* end for */ - - /* Chunk wasn't in cache either, create it now */ - if(!chunk_exists) { - size_t chunk_size; /* Size of chunk in bytes, possibly filtered */ - - /* Check for VL datatype & non-default fill value */ - if(fb_info_init && fb_info.has_vlen_fill_type) { - /* Sanity check */ - HDassert(should_fill); + /* Check if allocation along this dimension is really necessary */ + if(min_unalloc[op_dim] > max_unalloc[op_dim]) + carry = TRUE; + else { + /* Reset the chunk offset indices */ + HDmemset(chunk_offset, 0, (layout->u.chunk.ndims * sizeof(chunk_offset[0]))); + chunk_offset[op_dim] = min_unalloc[op_dim]; - /* Fill the buffer with VL datatype fill values */ - if(H5D_fill_refill_vl(&fb_info, fb_info.elmts_per_buf, data_dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer") + carry = FALSE; + } /* end if */ - /* Check if there are filters which need to be applied to the chunk */ - if(pline->nused > 0) { - size_t buf_size = orig_chunk_size; - size_t nbytes = fb_info.fill_buf_size; + while(!carry) { + size_t chunk_size; /* Size of chunk in bytes, possibly filtered */ - /* Push the chunk through the filters */ - if(H5Z_pipeline(pline, 0, &filter_mask, dxpl_cache->err_detect, dxpl_cache->filter_cb, &nbytes, &buf_size, &fb_info.fill_buf) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed") +#ifndef NDEBUG + /* None of the chunks should be allocated */ + if(H5D_chunk_get_info(dset, dxpl_id, chunk_offset, &udata) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HDassert(!H5F_addr_defined(udata.addr)); +#endif /* NDEBUG */ + + /* Check for VL datatype & non-default fill value */ + if(fb_info_init && fb_info.has_vlen_fill_type) { + /* Sanity check */ + HDassert(should_fill); + + /* Fill the buffer with VL datatype fill values */ + if(H5D_fill_refill_vl(&fb_info, fb_info.elmts_per_buf, data_dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer") + + /* Check if there are filters which need to be applied to the chunk */ + if(pline->nused > 0) { + size_t buf_size = orig_chunk_size; + size_t nbytes = fb_info.fill_buf_size; + + /* Push the chunk through the filters */ + if(H5Z_pipeline(pline, 0, &filter_mask, dxpl_cache->err_detect, dxpl_cache->filter_cb, &nbytes, &buf_size, &fb_info.fill_buf) < 0) + HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed") #if H5_SIZEOF_SIZE_T > 4 - /* Check for the chunk expanding too much to encode in a 32-bit value */ - if(nbytes > ((size_t)0xffffffff)) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") + /* Check for the chunk expanding too much to encode in a 32-bit value */ + if(nbytes > ((size_t)0xffffffff)) + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") #endif /* H5_SIZEOF_SIZE_T > 4 */ - /* Keep the number of bytes the chunk turned in to */ - chunk_size = nbytes; - } /* end if */ - else - H5_ASSIGN_OVERFLOW(chunk_size, layout->u.chunk.size, uint32_t, size_t); + /* Keep the number of bytes the chunk turned in to */ + chunk_size = nbytes; } /* end if */ else - chunk_size = orig_chunk_size; - - /* Initialize the chunk information */ - udata.common.layout = &layout->u.chunk; - udata.common.storage = &layout->storage.u.chunk; - udata.common.offset = chunk_offset; - H5_ASSIGN_OVERFLOW(udata.nbytes, chunk_size, size_t, uint32_t); - udata.filter_mask = filter_mask; - udata.addr = HADDR_UNDEF; - - /* Allocate the chunk with all processes */ - if((ops->insert)(&idx_info, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert record into chunk index") - HDassert(H5F_addr_defined(udata.addr)); - - /* Check if fill values should be written to chunks */ - if(should_fill) { - /* Sanity check */ - HDassert(fb_info_init); - HDassert(udata.nbytes == chunk_size); + H5_ASSIGN_OVERFLOW(chunk_size, layout->u.chunk.size, uint32_t, size_t); + } /* end if */ + else + chunk_size = orig_chunk_size; + + /* Initialize the chunk information */ + udata.common.layout = &layout->u.chunk; + udata.common.storage = &layout->storage.u.chunk; + udata.common.offset = chunk_offset; + H5_ASSIGN_OVERFLOW(udata.nbytes, chunk_size, size_t, uint32_t); + udata.filter_mask = filter_mask; + udata.addr = HADDR_UNDEF; + + /* Allocate the chunk with all processes */ + if((ops->insert)(&idx_info, &udata) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert record into chunk index") + HDassert(H5F_addr_defined(udata.addr)); + + /* Check if fill values should be written to chunks */ + if(should_fill) { + /* Sanity check */ + HDassert(fb_info_init); + HDassert(udata.nbytes == chunk_size); #ifdef H5_HAVE_PARALLEL - /* Check if this file is accessed with an MPI-capable file driver */ - if(using_mpi) { - /* Write the chunks out from only one process */ - /* !! Use the internal "independent" DXPL!! -QAK */ - if(H5_PAR_META_WRITE == mpi_rank) - if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, chunk_size, data_dxpl_id, fb_info.fill_buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file") - - /* Indicate that blocks are being written */ - blocks_written = TRUE; - } /* end if */ - else { -#endif /* H5_HAVE_PARALLEL */ + /* Check if this file is accessed with an MPI-capable file driver */ + if(using_mpi) { + /* Write the chunks out from only one process */ + /* !! Use the internal "independent" DXPL!! -QAK */ + if(H5_PAR_META_WRITE == mpi_rank) if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, chunk_size, data_dxpl_id, fb_info.fill_buf) < 0) HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file") + + /* Indicate that blocks are being written */ + blocks_written = TRUE; + } /* end if */ + else { +#endif /* H5_HAVE_PARALLEL */ + if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, chunk_size, data_dxpl_id, fb_info.fill_buf) < 0) + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file") #ifdef H5_HAVE_PARALLEL - } /* end else */ + } /* end else */ #endif /* H5_HAVE_PARALLEL */ - } /* end if */ - - /* Release the fill buffer if we need to re-allocate it each time */ - if(fb_info_init && fb_info.has_vlen_fill_type && pline->nused > 0) - H5D_fill_release(&fb_info); } /* end if */ - } /* end if */ - /* Increment indices */ - carry = TRUE; - for(i = (int)(space_ndims - 1); i >= 0; --i) { - chunk_offset[i] += layout->u.chunk.dim[i]; - if(chunk_offset[i] >= space_dim[i]) - chunk_offset[i] = 0; - else { - carry = FALSE; - break; - } /* end else */ - } /* end for */ - } /* end while */ + /* Release the fill buffer if we need to re-allocate it each time */ + if(fb_info_init && fb_info.has_vlen_fill_type && pline->nused > 0) + H5D_fill_release(&fb_info); + + /* Increment indices */ + carry = TRUE; + for(i = (int)(space_ndims - 1); i >= 0; --i) { + chunk_offset[i] += chunk_dim[i]; + if(chunk_offset[i] > max_unalloc[i]) + if(i == op_dim) + chunk_offset[i] = min_unalloc[i]; + else + chunk_offset[i] = 0; + else { + carry = FALSE; + break; + } /* end else */ + } /* end for */ + } /* end while(!carry) */ + + /* Adjust max_unalloc_dim_idx so we don't allocate the same chunk twice. + * Also check if this dimension started from 0 (and hence allocated all + * of the chunks. */ + if(min_unalloc[op_dim] == 0) + break; + else + max_unalloc[op_dim] = min_unalloc[op_dim] - chunk_dim[op_dim]; + } /* end for(op_dim=0...) */ #ifdef H5_HAVE_PARALLEL /* Only need to block at the barrier if we actually initialized a chunk */ @@ -3508,7 +3550,7 @@ H5D_chunk_prune_fill(const H5D_chunk_rec_t *chunk_rec, H5D_chunk_it_ud1_t *udata /* Calculate the index of this chunk */ if(H5V_chunk_index(rank, chunk_rec->offset, layout->u.chunk.dim, layout->u.chunk.down_chunks, &io_info->store->chunk.index) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5_ITER_ERROR, "can't get chunk index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get chunk index") /* Lock the chunk into the cache, to get a pointer to the chunk buffer */ /* (Casting away const OK -QAK) */ @@ -3638,7 +3680,7 @@ H5D_chunk_prune_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to write fill value") done: - /* It is currently impossible to fail after the stack node has been + /* It is currently impossible to fail after the stack node has been * malloc'ed. No need to free it here on failure. */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_chunk_prune_cb() */ @@ -3873,7 +3915,7 @@ H5D_chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dims) if(needs_fill) { /* Allocate space for the stack node */ if(NULL == (tmp_stack = H5FL_MALLOC(H5D_chunk_prune_stack_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, "memory allocation failed for stack node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for stack node") /* Set up chunk record for fill routine */ tmp_stack->rec.nbytes = dset->shared->layout.u.chunk.size; @@ -3893,7 +3935,7 @@ H5D_chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dims) while(tmp_stack) { /* Write the fill value */ if(H5D_chunk_prune_fill(&(tmp_stack->rec), &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to write fill value") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write fill value") /* Advance the stack pointer */ tmp_stack = tmp_stack->next; @@ -3914,7 +3956,7 @@ H5D_chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dims) /* Remove the chunk from disk */ if((layout->storage.u.chunk.ops->remove)(&idx_info, &idx_udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, H5_ITER_ERROR, "unable to remove chunk entry from index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to remove chunk entry from index") /* Advance the stack pointer */ tmp_stack = tmp_stack->next; @@ -4262,7 +4304,7 @@ H5D_chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) else if((H5T_get_class(udata->dt_src, FALSE) == H5T_REFERENCE) && (udata->file_src != udata->idx_info_dst->f)) fix_ref = TRUE; else - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy dataset elements") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy dataset elements") } /* end if */ /* Check for filtered chunks */ @@ -4346,7 +4388,7 @@ H5D_chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Copy the reference elements */ if(H5O_copy_expand_ref(udata->file_src, buf, udata->idx_info_dst->dxpl_id, udata->idx_info_dst->f, bkg, ref_count, H5T_get_ref_type(udata->dt_src), udata->cpy_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy reference attribute") } /* end if */ /* After fix ref, copy the new reference elements to the buffer to write out */ @@ -4368,7 +4410,7 @@ H5D_chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) #if H5_SIZEOF_SIZE_T > 4 /* Check for the chunk expanding too much to encode in a 32-bit value */ if(nbytes > ((size_t)0xffffffff)) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, H5_ITER_ERROR, "chunk too large for 32-bit length") #endif /* H5_SIZEOF_SIZE_T > 4 */ H5_ASSIGN_OVERFLOW(udata_dst.nbytes, nbytes, size_t, uint32_t); udata->buf = buf; @@ -4377,7 +4419,7 @@ H5D_chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Insert chunk into the destination index */ if((udata->idx_info_dst->storage->ops->insert)(udata->idx_info_dst, &udata_dst) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk into index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5_ITER_ERROR, "unable to insert chunk into index") /* Write chunk data to destination file */ HDassert(H5F_addr_defined(udata_dst.addr)); @@ -4955,9 +4997,9 @@ done: * Function: H5D_nonexistent_readvv * * Purpose: When the chunk doesn't exist on disk and the chunk is bigger - * than the cache size, performs fill value I/O operation on - * memory buffer, advancing through two I/O vectors, until one - * runs out. + * than the cache size, performs fill value I/O operation on + * memory buffer, advancing through two I/O vectors, until one + * runs out. * * Note: This algorithm is pretty inefficient about initializing and * terminating the fill buffer info structure and it would be @@ -5013,7 +5055,7 @@ H5D_nonexistent_readvv(const H5D_io_info_t *io_info, HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info") fb_info_init = TRUE; - /* Check for VL datatype & fill the buffer with VL datatype fill values */ + /* Check for VL datatype & fill the buffer with VL datatype fill values */ if(fb_info.has_vlen_fill_type && H5D_fill_refill_vl(&fb_info, fb_info.elmts_per_buf, io_info->dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer") diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index e2fe420..7c1b87c 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -217,8 +217,8 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id) store.contig.dset_size = dset->shared->layout.storage.u.contig.size; /* Get the number of elements in the dataset's dataspace */ - snpoints = H5S_GET_EXTENT_NPOINTS(dset->shared->space); - HDassert(snpoints >= 0); + if((snpoints = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "dataset has negative number of elements") H5_ASSIGN_OVERFLOW(npoints, snpoints, hssize_t, size_t); /* Initialize the fill value buffer */ diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c index 637cb70..923b888 100644 --- a/src/H5Ddeprec.c +++ b/src/H5Ddeprec.c @@ -319,6 +319,8 @@ H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id) { htri_t changed; /* Flag to indicate that the dataspace was successfully extended */ H5S_t *space; /* Dataset's dataspace */ + int rank; /* Dataspace # of dimensions */ + hsize_t curr_dims[H5O_LAYOUT_NDIMS];/* Current dimension sizes */ H5O_fill_t *fill; /* Dataset's fill value */ herr_t ret_value = SUCCEED; /* Return value */ @@ -338,8 +340,12 @@ H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id) * able to muck things up. */ - /* Increase the size of the data space */ + /* Retrieve the current dimensions */ space = dataset->shared->space; + if((rank = H5S_get_simple_extent_dims(space, curr_dims, NULL)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions") + + /* Increase the size of the data space */ if((changed = H5S_extend(space, size)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to increase size of data space") @@ -356,7 +362,8 @@ H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id) /* Allocate space for the new parts of the dataset, if appropriate */ fill = &dataset->shared->dcpl_cache.fill; if(fill->alloc_time == H5D_ALLOC_TIME_EARLY) - if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_EXTEND, FALSE) < 0) + if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_EXTEND, FALSE, + curr_dims) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value") /* Mark the dataspace as dirty, for later writing to the file */ diff --git a/src/H5Dint.c b/src/H5Dint.c index da73890..228fe83 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -29,6 +29,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Dpkg.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ #include "H5FOprivate.h" /* File objects */ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ @@ -56,7 +57,8 @@ typedef struct { /********************/ /* General stuff */ -static herr_t H5D_init_storage(H5D_t *dataset, hbool_t full_overwrite, hid_t dxpl_id); +static herr_t H5D_init_storage(H5D_t *dataset, hbool_t full_overwrite, + hsize_t old_dim[], hid_t dxpl_id); static herr_t H5D_get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache); static H5D_shared_t *H5D_new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type); @@ -1305,7 +1307,7 @@ H5D_open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id) if((H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR) && !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage) && IS_H5FD_MPI(dataset->oloc.file)) { - if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_OPEN, FALSE) < 0) + if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_OPEN, FALSE, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file storage") } /* end if */ @@ -1313,17 +1315,19 @@ done: if(ret_value < 0) { if(H5F_addr_defined(dataset->oloc.addr) && H5O_close(&(dataset->oloc)) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release object header") - if(dataset->shared->space && H5S_close(dataset->shared->space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace") - if(dataset->shared->type) { - if(dataset->shared->type_id > 0) { - if(H5I_dec_ref(dataset->shared->type_id, FALSE) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") + if(dataset->shared) { + if(dataset->shared->space && H5S_close(dataset->shared->space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace") + if(dataset->shared->type) { + if(dataset->shared->type_id > 0) { + if(H5I_dec_ref(dataset->shared->type_id, FALSE) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") + } /* end if */ + else { + if(H5T_close(dataset->shared->type) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") + } /* end else */ } /* end if */ - else { - if(H5T_close(dataset->shared->type) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") - } /* end else */ } /* end if */ } /* end if */ @@ -1560,7 +1564,7 @@ H5D_typeof(const H5D_t *dset) */ herr_t H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_alloc, - hbool_t full_overwrite) + hbool_t full_overwrite, hsize_t old_dim[]) { H5F_t *f = dset->oloc.file; /* The dataset's file pointer */ H5O_layout_t *layout; /* The dataset's layout information */ @@ -1655,7 +1659,7 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al * this is icky. -QAK */ if(!(dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_INCR && time_alloc == H5D_ALLOC_WRITE)) - if(H5D_init_storage(dset, full_overwrite, dxpl_id) < 0) + if(H5D_init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value") } /* end if */ else { @@ -1669,7 +1673,7 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al * the fill value _is_ set, do that now */ if(dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC || (dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED)) { - if(H5D_init_storage(dset, full_overwrite, dxpl_id) < 0) + if(H5D_init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value") } /* end if */ } /* end else */ @@ -1706,7 +1710,8 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hid_t dxpl_id) +H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[], + hid_t dxpl_id) { herr_t ret_value = SUCCEED; /* Return value */ @@ -1737,9 +1742,17 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hid_t dxpl_id) * Allocate file space * for all chunks now and initialize each chunk with the fill value. */ - if(H5D_chunk_allocate(dset, dxpl_id, full_overwrite) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset") - break; + { + hsize_t zero_dim[H5O_LAYOUT_NDIMS] = {0}; + + /* Use zeros for old dimensions if not specified */ + if(old_dim == NULL) + old_dim = zero_dim; + + if(H5D_chunk_allocate(dset, dxpl_id, full_overwrite, old_dim) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset") + break; + } /* end block */ default: HDassert("not implemented yet" && 0); @@ -2113,7 +2126,7 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataset has compact storage") if(H5D_CONTIGUOUS == dset->shared->layout.type && 0 == dset->shared->dcpl_cache.efl.nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "dataset has contiguous storage") - + /* Check if the filters in the DCPL will need to encode, and if so, can they? */ if(H5D_check_filters(dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't apply filters") @@ -2157,14 +2170,13 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) /* Allocate space for the new parts of the dataset, if appropriate */ if(expand && dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY) - if(H5D_alloc_storage(dset, dxpl_id, H5D_ALLOC_EXTEND, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset storage") - + if(H5D_alloc_storage(dset, dxpl_id, H5D_ALLOC_EXTEND, FALSE, curr_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to extend dataset storage") /*------------------------------------------------------------------------- * Remove chunk information in the case of chunked datasets * This removal takes place only in case we are shrinking the dateset - * and if the chunks are written + * and if the chunks are written *------------------------------------------------------------------------- */ if(shrink && H5D_CHUNKED == dset->shared->layout.type && @@ -2281,7 +2293,7 @@ H5D_flush_real(H5D_t *dataset, hid_t dxpl_id) } /* end if */ /* Flush cached raw data for each kind of dataset layout */ - if(dataset->shared->layout.ops->flush && + if(dataset->shared->layout.ops->flush && (dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data") diff --git a/src/H5Dio.c b/src/H5Dio.c index 5723847..d3120b1 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -549,7 +549,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, full_overwrite = (hbool_t)((hsize_t)file_nelmts == nelmts ? TRUE : FALSE); /* Allocate storage */ - if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_WRITE, full_overwrite) < 0) + if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage") } /* end if */ diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index c76bfc8..0a5fc6e 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -390,7 +390,7 @@ H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset, * allocation until later. */ if(fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY) - if(H5D_alloc_storage(dset, dxpl_id, H5D_ALLOC_CREATE, FALSE) < 0) + if(H5D_alloc_storage(dset, dxpl_id, H5D_ALLOC_CREATE, FALSE, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage") /* Update external storage message, if it's used */ diff --git a/src/H5Doh.c b/src/H5Doh.c index 30f1829..de4fb17 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -369,6 +369,11 @@ static herr_t H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) { H5O_layout_t layout; /* Data storage layout message */ + H5O_pline_t pline; /* I/O pipeline message */ + H5O_efl_t efl; /* External File List message */ + hbool_t layout_read = FALSE; /* Whether the layout message was read */ + hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read */ + hbool_t efl_read = FALSE; /* Whether the external file list message was read */ htri_t exists; /* Flag if header message of interest exists */ herr_t ret_value = SUCCEED; /* Return value */ @@ -382,6 +387,7 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) /* Get the layout message from the object header */ if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout)) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find layout message") + layout_read = TRUE; /* Check for newer version of the layout message, which indicates that some * information is stored in the 'storage' message. @@ -394,14 +400,13 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) /* Check for chunked dataset storage */ if(layout.type == H5D_CHUNKED && H5D_chunk_is_space_alloc(&layout.storage)) { - H5O_pline_t pline; /* I/O pipeline message */ - /* Check for I/O pipeline message */ if((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header") else if(exists) { if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_PLINE_ID, &pline)) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find I/O pipeline message") + pline_read = TRUE; } /* end else if */ else HDmemset(&pline, 0, sizeof(pline)); @@ -415,14 +420,13 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for EFL message") if(exists && H5D_efl_is_space_alloc(&layout.storage)) { - H5O_efl_t efl; /* External File List message */ - /* Start with clean EFL info */ HDmemset(&efl, 0, sizeof(efl)); /* Get External File List message from the object header */ if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_EFL_ID, &efl)) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find EFL message") + efl_read = TRUE; /* Get size of local heap for EFL message's file list */ if(H5D_efl_bh_info(f, dxpl_id, &efl, &(bh_info->heap_size)) < 0) @@ -430,6 +434,14 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) } /* end if */ done: + /* Free messages, if they've been read in */ + if(layout_read && H5O_msg_reset(H5O_LAYOUT_ID, &layout) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset data storage layout message") + if(pline_read && H5O_msg_reset(H5O_PLINE_ID, &pline) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset I/O pipeline message") + if(efl_read && H5O_msg_reset(H5O_EFL_ID, &efl) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset external file list message") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_dset_bh_info() */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 3e03ffd..68b5835 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -32,6 +32,7 @@ #include "H5Dprivate.h" /* Other private headers needed by this file */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Gprivate.h" /* Groups */ #include "H5SLprivate.h" /* Skip lists */ #include "H5Tprivate.h" /* Datatypes */ @@ -557,7 +558,7 @@ H5_DLL H5D_t *H5D_create_named(const H5G_loc_t *loc, const char *name, H5_DLL herr_t H5D_get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id); H5_DLL herr_t H5D_alloc_storage(H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc, - hbool_t full_overwrite); + hbool_t full_overwrite, hsize_t old_dim[]); H5_DLL hsize_t H5D_get_storage_size(H5D_t *dset, hid_t dxpl_id); H5_DLL haddr_t H5D_get_offset(const H5D_t *dset); H5_DLL herr_t H5D_iterate(void *buf, hid_t type_id, const H5S_t *space, @@ -643,7 +644,8 @@ H5_DLL herr_t H5D_chunk_unlock(const H5D_io_info_t *io_info, H5_DLL herr_t H5D_chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *dxpl_cache, H5D_rdcc_ent_t *ent, hbool_t reset); H5_DLL herr_t H5D_chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes); -H5_DLL herr_t H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite); +H5_DLL herr_t H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, + hbool_t full_overwrite, hsize_t old_dim[]); H5_DLL herr_t H5D_chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dims); #ifdef H5_HAVE_PARALLEL diff --git a/src/H5Dproxy.c b/src/H5Dproxy.c index 592bdaf..da5ef0a 100644 --- a/src/H5Dproxy.c +++ b/src/H5Dproxy.c @@ -46,6 +46,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Dpkg.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ #include "H5MFprivate.h" /* File memory management */ diff --git a/src/H5EA.c b/src/H5EA.c index 2af407d..8a8cee6 100644 --- a/src/H5EA.c +++ b/src/H5EA.c @@ -560,7 +560,7 @@ if(sblock->dblk_npages) /* Compute data block page address */ dblk_page_addr = sblock->dblk_addrs[dblk_idx] + - H5EA_DBLOCK_PREFIX_SIZE(sblock) + + H5EA_DBLOCK_PREFIX_SIZE(sblock) + (page_idx * sblock->dblk_page_size); #ifdef QAK HDfprintf(stderr, "%s: sblock->addr = %a\n", FUNC, sblock->addr); diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c index 6967413..45bb498 100644 --- a/src/H5EAhdr.c +++ b/src/H5EAhdr.c @@ -411,7 +411,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); dblk_nelmts = H5EA_SBLK_DBLK_NELMTS(sblk_idx, cparam->data_blk_min_elmts); if(dblk_page_nelmts < dblk_nelmts) H5E_THROW(H5E_BADVALUE, "max. # of elements per data block page bits must be > # of elements in first data block from super block") - + if(cparam->max_dblk_page_nelmts_bits > cparam->max_nelmts_bits) H5E_THROW(H5E_BADVALUE, "max. # of elements per data block page bits must be <= max. # of elements bits") } diff --git a/src/H5F.c b/src/H5F.c index efa4091..274ec72 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -71,7 +71,7 @@ static H5F_t *H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf); static herr_t H5F_build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *name, char ** /*out*/ actual_name); -static herr_t H5F_dest(H5F_t *f, hid_t dxpl_id); +static herr_t H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush); static herr_t H5F_close(H5F_t *f); /* Declare a free list to manage the H5F_t struct */ @@ -374,8 +374,8 @@ done: * Modification: * Raymond Lu * 24 September 2008 - * Changed the return value to ssize_t to accommadate - * potential large number of objects. + * Changed the return value to ssize_t to accommadate + * potential large number of objects. * *------------------------------------------------------------------------- */ @@ -415,8 +415,8 @@ done: * Modification: * Raymond Lu * 24 September 2008 - * Changed the return value to size_t to accommadate - * potential large number of objects. + * Changed the return value to size_t to accommadate + * potential large number of objects. * *------------------------------------------------------------------------- */ @@ -447,8 +447,8 @@ H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref) * Modification: * Raymond Lu * 24 September 2008 - * Changed the return value to ssize_t and MAX_OBJTS to size_t to - * accommadate potential large number of objects. + * Changed the return value to ssize_t and MAX_OBJTS to size_t to + * accommadate potential large number of objects. * *------------------------------------------------------------------------- */ @@ -466,7 +466,7 @@ H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *oid_list) if(0 == (types & H5F_OBJ_ALL)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not an object type") HDassert(oid_list); - + /* H5F_get_objects doesn't fail */ ret_value = (ssize_t)H5F_get_obj_ids(f, types, max_objs, oid_list, TRUE); @@ -489,7 +489,7 @@ done: * Raymond Lu * 24 September 2008 * Changed the return value and MAX_OBJTS to size_t to accommadate - * potential large number of objects. + * potential large number of objects. * *------------------------------------------------------------------------- */ @@ -546,7 +546,7 @@ H5F_get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_ } /* end else */ /* Search through file IDs to count the number, and put their - * IDs on the object list. H5I_search returns NULL if no object + * IDs on the object list. H5I_search returns NULL if no object * is found, so don't return failure in this function. */ if(types & H5F_OBJ_FILE) { olist.obj_type = H5I_FILE; @@ -633,7 +633,7 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) (*olist->obj_id_count)++; /* Check if we've filled up the array. Return TRUE only if - * we have filled up the array. Otherwise return FALSE(RET_VALUE is + * we have filled up the array. Otherwise return FALSE(RET_VALUE is * preset to FALSE) because H5I_search needs the return value of FALSE * to continue searching. */ if(olist->max_index>0 && olist->list_index>=olist->max_index) @@ -686,7 +686,7 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) (*olist->obj_id_count)++; /* Check if we've filled up the array. Return TRUE only if - * we have filled up the array. Otherwise return FALSE(RET_VALUE is + * we have filled up the array. Otherwise return FALSE(RET_VALUE is * preset to FALSE) because H5I_search needs the return value of FALSE * to continue searching. */ if(olist->max_index>0 && olist->list_index>=olist->max_index) @@ -967,7 +967,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5F_dest(H5F_t *f, hid_t dxpl_id) +H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush) { herr_t ret_value = SUCCEED; /* Return value */ @@ -978,17 +978,16 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) HDassert(f->shared); if(1 == f->shared->nrefs) { - /* Flush at this point since the file will be closed */ - /* (Only try to flush here if the file structure was successfully - * initialized (i.e., the file struct is being shutdown in an - * orderly manner with the 'closing' flag set) + /* Flush at this point since the file will be closed. + * Only try to flush the file if it was opened with write access, and if + * the caller requested a flush. */ - if(f->closing) { -#if H5AC_DUMP_STATS_ON_CLOSE - /* Dump debugging info */ - H5AC_stats(f); -#endif /* H5AC_DUMP_STATS_ON_CLOSE */ + if((f->shared->flags & H5F_ACC_RDWR) && flush) + if(H5F_flush(f, dxpl_id) < 0) + HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache") + /* Release objects that depend on the superblock being initialized */ + if(f->shared->sblock) { /* Shutdown file free space manager(s) */ /* (We should release the free space information now (before truncating * the file and before the metadata cache is shut down) since the @@ -1008,7 +1007,7 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) HDONE_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin superblock") f->shared->sblock = NULL; } /* end if */ - + /* Remove shared file struct from list of open files */ if(H5F_sfile_remove(f->shared) < 0) /* Push error, but keep going*/ @@ -1330,7 +1329,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, done: if(!ret_value && file) - if(H5F_dest(file, dxpl_id) < 0) + if(H5F_dest(file, dxpl_id, FALSE) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "problems closing file") FUNC_LEAVE_NOAPI(ret_value) @@ -1879,24 +1878,16 @@ H5F_try_close(H5F_t *f) if(H5F_close_mounts(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't unmount child files") - /* Flush at this point since the file will be closed. Don't invalidate - * the cache, since this file might still be open using another handle. - * However, make sure we flush in case that handle is read-only; its - * copy of the cache needs to be clean. - * Only try to flush the file if it was opened with write access. - */ - if(f->intent & H5F_ACC_RDWR) { - /* Flush all caches */ - if(H5F_flush(f, H5AC_dxpl_id) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache") - } /* end if */ + /* Delay flush until the shared file struct is closed, in H5F_dest. If the + * application called H5Fclose, it would have been flushed in that function + * (unless it will have been flushed in H5F_dest anyways). */ /* * Destroy the H5F_t struct and decrement the reference count for the * shared H5F_file_t struct. If the reference count for the H5F_file_t * struct reaches zero then destroy it also. */ - if(H5F_dest(f, H5AC_dxpl_id) < 0) + if(H5F_dest(f, H5AC_dxpl_id, TRUE) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problems closing file") done: @@ -1928,6 +1919,8 @@ done: herr_t H5Fclose(hid_t file_id) { + H5F_t *f = NULL; + int nref; herr_t ret_value = SUCCEED; FUNC_ENTER_API(H5Fclose, FAIL) @@ -1937,6 +1930,20 @@ H5Fclose(hid_t file_id) if(H5I_FILE != H5I_get_type(file_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID") + /* Flush file if this is the last reference to this id and we have write + * intent, unless it will be flushed by the "shared" file being closed. + * This is only necessary to replicate previous behaviour, and could be + * disabled by an option/property to improve performance. */ + if(NULL == (f = (H5F_t *)H5I_object(file_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + if((f->shared->nrefs > 1) && (H5F_INTENT(f) & H5F_ACC_RDWR)) { + if((nref = H5I_get_ref(file_id, FALSE)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get ID ref count") + if(nref == 1) + if(H5F_flush(f, H5AC_dxpl_id) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache") + } /* end if */ + /* * Decrement reference count on atom. When it reaches zero the file will * be closed. @@ -2004,7 +2011,7 @@ H5Freopen(hid_t file_id) done: if(ret_value < 0 && new_file) - if(H5F_dest(new_file, H5AC_dxpl_id) < 0) + if(H5F_dest(new_file, H5AC_dxpl_id, FALSE) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file") FUNC_LEAVE_API(ret_value) @@ -2861,7 +2868,7 @@ H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo) /* Set version # fields */ finfo->super.version = f->shared->sblock->super_vers; finfo->sohm.version = f->shared->sohm_vers; - finfo->free.version = HDF5_FREESPACE_VERSION; + finfo->free.version = HDF5_FREESPACE_VERSION; done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5FA.c b/src/H5FA.c index 1e2bd1a..35b7a5b 100644 --- a/src/H5FA.c +++ b/src/H5FA.c @@ -29,7 +29,7 @@ /* Module Declaration */ /**********************/ -#define H5FA_MODULE +#define H5FA_MODULE /***********************/ /* Other Packages Used */ @@ -702,7 +702,7 @@ herr_t, SUCCEED, FAIL, H5FA_iterate(H5FA_t *fa, hid_t dxpl_id, H5FA_operator_t op, void *udata)) /* Local variables */ - uint8_t *elmt = NULL; + uint8_t *elmt = NULL; hsize_t u; /* diff --git a/src/H5FAcache.c b/src/H5FAcache.c index 3488531..9fa9941 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -218,8 +218,8 @@ H5FA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *u /* General array creation/configuration information */ hdr->cparam.raw_elmt_size = *p++; /* Element size in file (in bytes) */ - hdr->cparam.max_dblk_page_nelmts_bits = *p++; /* Log2(Max. # of elements in data block page) - - i.e. # of bits needed to store max. # of + hdr->cparam.max_dblk_page_nelmts_bits = *p++; /* Log2(Max. # of elements in data block page) - + i.e. # of bits needed to store max. # of elements in data block page. */ /* Array statistics */ @@ -790,7 +790,7 @@ H5FA__cache_dblock_size(const H5F_t UNUSED *f, const H5FA_dblock_t *dblock, else *size_ptr = H5FA_DBLOCK_PREFIX_SIZE(dblock); -END_FUNC(STATIC) /* end H5FA__cache_dblock_size() */ +END_FUNC(STATIC) /* end H5FA__cache_dblock_size() */ /*------------------------------------------------------------------------- diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c index dde299f..a1bd90e 100644 --- a/src/H5FAdblkpage.c +++ b/src/H5FAdblkpage.c @@ -168,7 +168,7 @@ HDfprintf(stderr, "%s: Called, addr = %a\n", FUNC, addr); /* Set info about data block page on disk */ dblk_page->addr = addr; dblk_page->size = H5FA_DBLK_PAGE_SIZE(dblk_page, nelmts); -#ifdef H5FA_DEBUG +#ifdef H5FA_DEBUG HDfprintf(stderr, "%s: dblk_page->size = %Zu\n", FUNC, dblk_page->size); #endif /* H5FA_DEBUG */ diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c index 372caf8..644b4c9 100644 --- a/src/H5FAhdr.c +++ b/src/H5FAhdr.c @@ -197,9 +197,9 @@ HDfprintf(stderr, "%s: Called\n", FUNC); /* Check for valid parameters */ if(cparam->raw_elmt_size == 0) H5E_THROW(H5E_BADVALUE, "element size must be greater than zero") - if(cparam->max_dblk_page_nelmts_bits == 0) + if(cparam->max_dblk_page_nelmts_bits == 0) H5E_THROW(H5E_BADVALUE, "max. # of elements bits must be greater than zero") - if(cparam->nelmts == 0) + if(cparam->nelmts == 0) H5E_THROW(H5E_BADVALUE, "# of elements must be greater than zero") } #endif /* NDEBUG */ @@ -478,7 +478,7 @@ H5FA__hdr_dest(H5FA_hdr_t *hdr)) H5E_THROW(H5E_CANTRELEASE, "unable to destroy fixed array client callback context") } /* end if */ hdr->cb_ctx = NULL; - + /* Free the shared info itself */ hdr = H5FL_FREE(H5FA_hdr_t, hdr); diff --git a/src/H5FApkg.h b/src/H5FApkg.h index 8e2a515..eb224a6 100644 --- a/src/H5FApkg.h +++ b/src/H5FApkg.h @@ -14,7 +14,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: + * Programmer: * * Purpose: This file contains declarations which are visible only within * the H5FA package. Source files outside the H5FA package should diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h index 08e6e50..f8a4619 100644 --- a/src/H5FAprivate.h +++ b/src/H5FAprivate.h @@ -79,8 +79,8 @@ typedef struct H5FA_class_t { typedef struct H5FA_create_t { const H5FA_class_t *cls; /* Class of Fixed Array to create */ uint8_t raw_elmt_size; /* Element size in file (in bytes) */ - uint8_t max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in a data block page) - - i.e. # of bits needed to store max. # of elements + uint8_t max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in a data block page) - + i.e. # of bits needed to store max. # of elements in a data block page */ hsize_t nelmts; /* # of elements in array */ } H5FA_create_t; diff --git a/src/H5FAtest.c b/src/H5FAtest.c index 187b5be..1828fa4 100644 --- a/src/H5FAtest.c +++ b/src/H5FAtest.c @@ -13,8 +13,8 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* - * Programmer: +/* + * Programmer: * * Purpose: Fixed array testing functions. * diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 7324afb..f91c6b5 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -52,6 +52,31 @@ typedef struct H5FD_core_t { size_t increment; /*multiples for mem allocation */ hbool_t backing_store; /*write to file name on flush */ int fd; /*backing store file descriptor */ + /* Information for determining uniqueness of a file with a backing store */ +#ifndef _WIN32 + /* + * On most systems the combination of device and i-node number uniquely + * identify a file. + */ + dev_t device; /*file device number */ +#ifdef H5_VMS + ino_t inode[3]; /*file i-node number */ +#else + ino_t inode; /*file i-node number */ +#endif /*H5_VMS*/ +#else + /* + * On _WIN32 the low-order word of a unique identifier associated with the + * file and the volume serial number uniquely identify a file. This number + * (which, both? -rpm) may change when the system is restarted or when the + * file is opened. After a process opens a file, the identifier is + * constant until the file is closed. An application can use this + * identifier and the volume serial number to determine whether two + * handles refer to the same file. + */ + DWORD fileindexlo; + DWORD fileindexhi; +#endif hbool_t dirty; /*changes not saved? */ /* Information from file open flags, for SWMR access */ @@ -394,6 +419,10 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, H5FD_core_t *file=NULL; H5FD_core_fapl_t *fa=NULL; H5P_genplist_t *plist; /* Property list pointer */ +#ifdef _WIN32 + HFILE filehandle; + struct _BY_HANDLE_FILE_INFORMATION fileinfo; +#endif h5_stat_t sb; int fd=-1; H5FD_t *ret_value; @@ -418,11 +447,14 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, if(H5F_ACC_CREAT & flags) o_flags |= O_CREAT; if(H5F_ACC_EXCL & flags) o_flags |= O_EXCL; - /* Open backing store. The only case that backing store is off is when - * the backing_store flag is off and H5F_ACC_CREAT is on. */ + /* Open backing store, and get stat() from file. The only case that backing + * store is off is when the backing_store flag is off and H5F_ACC_CREAT is + * on. */ if(fa->backing_store || !(H5F_ACC_CREAT & flags)) { if(fa && (fd = HDopen(name, o_flags, 0666)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file") + if(HDfstat(fd, &sb) < 0) + HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file") } /* end if */ /* Create the new file struct */ @@ -442,13 +474,31 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, /* If save data in backing store. */ file->backing_store = fa->backing_store; + if(fd >= 0) { + /* Retrieve information for determining uniqueness of file */ +#ifdef _WIN32 + filehandle = _get_osfhandle(fd); + (void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo); + file->fileindexhi = fileinfo.nFileIndexHigh; + file->fileindexlo = fileinfo.nFileIndexLow; +#else /* _WIN32 */ + file->device = sb.st_dev; +#ifdef H5_VMS + file->inode[0] = sb.st_ino[0]; + file->inode[1] = sb.st_ino[1]; + file->inode[2] = sb.st_ino[2]; +#else + file->inode = sb.st_ino; +#endif /* H5_VMS */ + +#endif /* _WIN32 */ + } /* end if */ + /* If an existing file is opened, load the whole file into memory. */ if(!(H5F_ACC_CREAT & flags)) { size_t size; - /* stat() file to retrieve its size */ - if(HDfstat(file->fd, &sb) < 0) - HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file") + /* Retrieve file size */ size = (size_t)sb.st_size; /* Check if we should allocate the memory buffer and read in existing data */ @@ -536,6 +586,11 @@ done: * Thursday, July 29, 1999 * * Modifications: + * Neil Fortner + * Tuesday, March 9, 2010 + * Modified function to compare low level file information if + * a backing store is opened for both files, similar to the + * sec2 file driver. * *------------------------------------------------------------------------- */ @@ -544,28 +599,62 @@ H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2) { const H5FD_core_t *f1 = (const H5FD_core_t*)_f1; const H5FD_core_t *f2 = (const H5FD_core_t*)_f2; - int ret_value; + int ret_value = 0; FUNC_ENTER_NOAPI(H5FD_core_cmp, FAIL) - if (NULL==f1->name && NULL==f2->name) { - if (f1fd >= 0 && f2->fd >= 0) { + /* Compare low level file information for backing store */ +#ifdef _WIN32 + if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1) + if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1) + + if (f1->fileindexlo < f2->fileindexlo) HGOTO_DONE(-1) + if (f1->fileindexlo > f2->fileindexlo) HGOTO_DONE(1) + +#else +#ifdef H5_DEV_T_IS_SCALAR + if (f1->device < f2->device) HGOTO_DONE(-1) + if (f1->device > f2->device) HGOTO_DONE(1) +#else /* H5_DEV_T_IS_SCALAR */ + /* If dev_t isn't a scalar value on this system, just use memcmp to + * determine if the values are the same or not. The actual return value + * shouldn't really matter... + */ + if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))<0) HGOTO_DONE(-1) + if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) HGOTO_DONE(1) +#endif /* H5_DEV_T_IS_SCALAR */ + +#ifndef H5_VMS + if (f1->inode < f2->inode) HGOTO_DONE(-1) + if (f1->inode > f2->inode) HGOTO_DONE(1) +#else + if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))<0) HGOTO_DONE(-1) + if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))>0) HGOTO_DONE(1) +#endif /* H5_VMS */ + +#endif /*_WIN32*/ + } /* end if */ + else { + if (NULL==f1->name && NULL==f2->name) { + if (f1f2) + HGOTO_DONE(1) + HGOTO_DONE(0) + } /* end if */ + + if (NULL==f1->name) HGOTO_DONE(-1) - if (f1>f2) + if (NULL==f2->name) HGOTO_DONE(1) - HGOTO_DONE(0) - } - if (NULL==f1->name) - HGOTO_DONE(-1) - if (NULL==f2->name) - HGOTO_DONE(1) - - ret_value = HDstrcmp(f1->name, f2->name); + ret_value = HDstrcmp(f1->name, f2->name); + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) -} +} /* end H5FD_core_cmp() */ /*------------------------------------------------------------------------- diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 3c25426..67bb107 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -632,9 +632,9 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out* name[8] = '\0'; /* Store member file size. Use the member file size from the property here. - * This is to guarantee backward compatibility. If a file is created with + * This is to guarantee backward compatibility. If a file is created with * v1.6 library and the driver info isn't saved in the superblock. We open - * it with v1.8, the FILE->MEMB_SIZE will be the actual size of the first + * it with v1.8, the FILE->MEMB_SIZE will be the actual size of the first * member file (see H5FD_family_open). So it isn't safe to use FILE->MEMB_SIZE. * If the file is created with v1.8, the correctness of FILE->PMEM_SIZE is * checked in H5FD_family_sb_decode. SLU - 2009/3/21 @@ -894,45 +894,43 @@ done: * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t H5FD_family_close(H5FD_t *_file) { - H5FD_family_t *file = (H5FD_family_t*)_file; - unsigned nerrors=0; /* Number of errors while closing member files */ - unsigned u; /* Local index variable */ - herr_t ret_value=SUCCEED; /* Return value */ + H5FD_family_t *file = (H5FD_family_t*)_file; + unsigned nerrors = 0; /* Number of errors while closing member files */ + unsigned u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5FD_family_close, FAIL) /* Close as many members as possible. Use private function here to avoid clearing * the error stack. We need the error message to indicate wrong member file size. */ - for (u=0; unmembs; u++) { - if (file->memb[u]) { - if (H5FD_close(file->memb[u])<0) + for(u = 0; u < file->nmembs; u++) { + if(file->memb[u]) { + if(H5FD_close(file->memb[u]) < 0) nerrors++; else file->memb[u] = NULL; - } - } - if (nerrors) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close member files") + } /* end if */ + } /* end for */ + if(nerrors) + /* Push error, but keep going*/ + HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close member files") /* Clean up other stuff */ - if(H5I_dec_ref(file->memb_fapl_id, FALSE)<0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID") - if (file->memb) - H5MM_xfree(file->memb); - if (file->name) - H5MM_xfree(file->name); + if(H5I_dec_ref(file->memb_fapl_id, FALSE) < 0) + /* Push error, but keep going*/ + HDONE_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID") + H5MM_xfree(file->memb); + H5MM_xfree(file->name); H5MM_xfree(file); done: FUNC_LEAVE_NOAPI(ret_value) -} +} /* end H5FD_family_close() */ /*------------------------------------------------------------------------- diff --git a/src/H5FS.c b/src/H5FS.c index 8ee6db4..bb3f251 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -835,8 +835,8 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) haddr_t saved_addr; hsize_t saved_size; unsigned cache_flags; - unsigned sinfo_status = 0; - unsigned hdr_status = 0; + unsigned sinfo_status = 0; + unsigned hdr_status = 0; FUNC_ENTER_NOAPI(H5FS_free, FAIL) @@ -881,7 +881,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) /* Check whether free-space manager header is in cache or not */ if(H5AC_get_entry_status(f, fspace->addr, &hdr_status) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "unable to check metadata cache status for free-space section info") - + if(hdr_status & H5AC_ES__IN_CACHE) { /* Unpin the free-space manager header */ if(H5AC_unpin_entry(fspace) < 0) @@ -902,7 +902,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) if(H5MF_xfree(f, H5FD_MEM_FSPACE_HDR, dxpl_id, saved_addr, (hsize_t)H5FS_HEADER_SIZE(f)) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space header") } - + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_free() */ diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h index 145c374..ca7104c 100644 --- a/src/H5FSprivate.h +++ b/src/H5FSprivate.h @@ -187,7 +187,7 @@ H5_DLL herr_t H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id); /* Free space section routines */ H5_DLL herr_t H5FS_sect_add(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *node, unsigned flags, void *op_data); -H5_DLL htri_t H5FS_sect_try_merge(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, +H5_DLL htri_t H5FS_sect_try_merge(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags, void *op_data); H5_DLL htri_t H5FS_sect_try_extend(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize_t extra_requested); diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 26aac37..a9b8e3b 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -1574,7 +1574,7 @@ done: /*------------------------------------------------------------------------- * Function: H5FS_sect_try_merge * - * Purpose: Try to merge/shrink a block + * Purpose: Try to merge/shrink a block * * Return: TRUE: merged/shrunk * FALSE: not merged/not shrunk diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 9a63b6a..7075683 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -36,6 +36,7 @@ /* Other private headers needed by this file */ #include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5FLprivate.h" /* Free Lists */ #include "H5FOprivate.h" /* File objects */ #include "H5FSprivate.h" /* File free space */ diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index eb739dc..f42c7f6 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -240,7 +240,7 @@ done: /*------------------------------------------------------------------------- * Function: H5F_super_ext_close - * + * * Purpose: Close superblock extension * * Return: Success: non-negative on success @@ -250,7 +250,7 @@ done: * *------------------------------------------------------------------------- */ -herr_t +herr_t H5F_super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr) { herr_t ret_value = SUCCEED; /* Return value */ @@ -321,7 +321,7 @@ H5F_super_read(H5F_t *f, hid_t dxpl_id) /* Look up the superblock */ if(NULL == (sblock = (H5F_super_t *)H5AC_protect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, NULL, &dirtied, rw))) HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "unable to load superblock") - + /* Mark the superblock dirty if it was modified during loading or VFD indicated to do so */ if((H5AC_WRITE == rw) && (dirtied || H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_SBLK_LOAD))) sblock_flags |= H5AC__DIRTIED_FLAG; @@ -401,8 +401,8 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id) /* Bump superblock version to create superblock extension for SOHM info */ else if(f->shared->sohm_nindexes > 0) super_vers = HDF5_SUPERBLOCK_VERSION_2; - /* Bump superblock version to create superblock extension for - * non-default file space strategy or non-default free-space threshold + /* Bump superblock version to create superblock extension for + * non-default file space strategy or non-default free-space threshold */ else if(f->shared->fs_strategy != H5F_FILE_SPACE_STRATEGY_DEF || f->shared->fs_threshold != H5F_FREE_SPACE_THRESHOLD_DEF) @@ -804,7 +804,6 @@ done: * * Programmer: Vailin Choi; Feb 2009 * - * *------------------------------------------------------------------------- */ herr_t diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index e6e980b..a103351 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -152,7 +152,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, const void UNUSED /* Allocate space for the superblock */ if(NULL == (sblock = H5FL_CALLOC(H5F_super_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - + /* Read fixed-size portion of the superblock */ p = sbuf; H5_CHECK_OVERFLOW(fixed_size, size_t, haddr_t); @@ -659,24 +659,24 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, HDmemcpy(p, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN); p += H5F_SIGNATURE_LEN; *p++ = (uint8_t)sblock->super_vers; - + /* Check for older version of superblock format */ if(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) { *p++ = (uint8_t)HDF5_FREESPACE_VERSION; /* (hard-wired) */ *p++ = (uint8_t)HDF5_OBJECTDIR_VERSION; /* (hard-wired) */ *p++ = 0; /* reserved*/ - + *p++ = (uint8_t)HDF5_SHAREDHEADER_VERSION; /* (hard-wired) */ HDassert(H5F_SIZEOF_ADDR(f) <= 255); *p++ = (uint8_t)H5F_SIZEOF_ADDR(f); HDassert(H5F_SIZEOF_SIZE(f) <= 255); *p++ = (uint8_t)H5F_SIZEOF_SIZE(f); *p++ = 0; /* reserved */ - + UINT16ENCODE(p, sblock->sym_leaf_k); UINT16ENCODE(p, sblock->btree_k[H5B_SNODE_ID]); UINT32ENCODE(p, (uint32_t)sblock->status_flags); - + /* * Versions of the superblock >0 have the indexed storage B-tree * internal 'K' value stored @@ -686,37 +686,37 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, *p++ = 0; /*reserved */ *p++ = 0; /*reserved */ } /* end if */ - + H5F_addr_encode(f, &p, sblock->base_addr); H5F_addr_encode(f, &p, sblock->ext_addr); rel_eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER); H5F_addr_encode(f, &p, (rel_eoa + sblock->base_addr)); H5F_addr_encode(f, &p, sblock->driver_addr); - + /* Encode the root group object entry, including the cached stab info */ if(H5G_ent_encode(f, &p, sblock->root_ent) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTENCODE, FAIL, "can't encode root group symbol table entry") - + /* Encode the driver information block. */ H5_ASSIGN_OVERFLOW(driver_size, H5FD_sb_size(f->shared->lf), hsize_t, size_t); - + /* Checking whether driver block address is defined here is to handle backward * compatibility. If the file was created with v1.6 library or earlier and no * driver info block was written in the superblock, we don't write it either even * though there's some driver info. Otherwise, the driver block extended will * overwrite the (meta)data right after the superblock. This situation happens to - * the family driver particularly. SLU - 2009/3/24 + * the family driver particularly. SLU - 2009/3/24 */ if(driver_size > 0 && H5F_addr_defined(sblock->driver_addr)) { char driver_name[9]; /* Name of driver, for driver info block */ uint8_t *dbuf = p; /* Pointer to beginning of driver info */ - + /* Encode the driver information block */ *p++ = HDF5_DRIVERINFO_VERSION_0; /* Version */ *p++ = 0; /* reserved */ *p++ = 0; /* reserved */ *p++ = 0; /* reserved */ - + /* Driver info size, excluding header */ UINT32ENCODE(p, driver_size); @@ -726,7 +726,7 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, /* Store driver name (set in 'H5FD_sb_encode' call above) */ HDmemcpy(p, driver_name, (size_t)8); - + /* Advance buffer pointer past name & variable-sized portion of driver info */ /* (for later use in computing the superblock size) */ p += 8 + driver_size; @@ -735,40 +735,40 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, else { uint32_t chksum; /* Checksum temporary variable */ H5O_loc_t *root_oloc; /* Pointer to root group's object location */ - + /* Size of file addresses & offsets, and status flags */ HDassert(H5F_SIZEOF_ADDR(f) <= 255); *p++ = (uint8_t)H5F_SIZEOF_ADDR(f); HDassert(H5F_SIZEOF_SIZE(f) <= 255); *p++ = (uint8_t)H5F_SIZEOF_SIZE(f); *p++ = sblock->status_flags; - + /* Base, superblock extension & end of file addresses */ H5F_addr_encode(f, &p, sblock->base_addr); H5F_addr_encode(f, &p, sblock->ext_addr); rel_eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER); H5F_addr_encode(f, &p, (rel_eoa + sblock->base_addr)); - + /* Retrieve information for root group */ if(NULL == (root_oloc = H5G_oloc(f->shared->root_grp))) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to retrieve root group information") - + /* Encode address of root group's object header */ H5F_addr_encode(f, &p, root_oloc->addr); - + /* Compute superblock checksum */ chksum = H5_checksum_metadata(buf, (size_t)(H5F_SUPERBLOCK_SIZE(sblock->super_vers, f) - H5F_SIZEOF_CHKSUM), 0); - + /* Superblock checksum */ UINT32ENCODE(p, chksum); - + /* Sanity check */ HDassert((size_t)(p - buf) == H5F_SUPERBLOCK_SIZE(sblock->super_vers, f)); } /* end else */ - + /* Retrieve the total size of the superblock info */ H5_ASSIGN_OVERFLOW(superblock_size, (p - buf), int, size_t); - + /* Double check we didn't overrun the block (unlikely) */ HDassert(superblock_size <= sizeof(buf)); @@ -776,7 +776,7 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, /* (always at relative address 0) */ if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_SUPER, (haddr_t)0, superblock_size, buf) < 0) HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write superblock") - + /* Check for newer version of superblock format & superblock extension */ if(sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2 && H5F_addr_defined(sblock->ext_addr)) { /* Check for ignoring the driver info for this file */ @@ -787,10 +787,10 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, H5O_drvinfo_t drvinfo; /* Driver info */ H5O_loc_t ext_loc; /* "Object location" for superblock extension */ uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */ - + /* Sanity check */ HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE); - + /* Encode driver-specific data */ if(H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") @@ -798,7 +798,7 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, /* Open the superblock extension's object header */ if(H5F_super_ext_open(f, sblock->ext_addr, &ext_loc) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension") - + /* Write driver info information to the superblock extension */ drvinfo.len = driver_size; drvinfo.buf = dbuf; diff --git a/src/H5Gdense.c b/src/H5Gdense.c index 9a8e764..0bb29d5 100644 --- a/src/H5Gdense.c +++ b/src/H5Gdense.c @@ -698,7 +698,7 @@ H5G_dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, /* Determine the address of the index to use */ if(idx_type == H5_INDEX_NAME) { - /* Since names are hashed, getting them in strictly increasing or + /* Since names are hashed, getting them in strictly increasing or * decreasing order requires building a table and sorting it. * If the order is native, use the B-tree for names. */ @@ -716,7 +716,7 @@ H5G_dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, } /* end else */ /* If the order is native and there's no B-tree for indexing the links, - * use the B-tree for names instead of building a table to speed up the + * use the B-tree for names instead of building a table to speed up the * process. */ if(order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) { @@ -1004,7 +1004,7 @@ H5G_dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, /* Determine the address of the index to use */ if(idx_type == H5_INDEX_NAME) { - /* Since names are hashed, getting them in strictly increasing or + /* Since names are hashed, getting them in strictly increasing or * decreasing order requires building a table and sorting it. If * the order is native, use the B-tree for names. */ @@ -1022,7 +1022,7 @@ H5G_dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, } /* end else */ /* If the order is native and there's no B-tree for indexing the links, - * use the B-tree for names instead of building a table to speed up the + * use the B-tree for names instead of building a table to speed up the * process. */ if(order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) { @@ -1209,7 +1209,7 @@ H5G_dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, /* Determine the address of the index to use */ if(idx_type == H5_INDEX_NAME) { - /* Since names are hashed, getting them in strictly increasing or + /* Since names are hashed, getting them in strictly increasing or * decreasing order requires building a table and sorting it. If * the order is native, use the B-tree for names. */ @@ -1227,7 +1227,7 @@ H5G_dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, } /* end else */ /* If the order is native and there's no B-tree for indexing the links, - * use the B-tree for names instead of building a table to speed up the + * use the B-tree for names instead of building a table to speed up the * process. */ if(order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) { @@ -1647,7 +1647,7 @@ H5G_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, /* Determine the address of the index to use */ if(idx_type == H5_INDEX_NAME) { - /* Since names are hashed, getting them in strictly increasing or + /* Since names are hashed, getting them in strictly increasing or * decreasing order requires building a table and sorting it. If * the order is native, use the B-tree for names. */ @@ -1665,14 +1665,14 @@ H5G_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, } /* end else */ /* If the order is native and there's no B-tree for indexing the links, - * use the B-tree for names instead of building a table to speed up the + * use the B-tree for names instead of building a table to speed up the * process. */ if(order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) { bt2_addr = linfo->name_bt2_addr; HDassert(H5F_addr_defined(bt2_addr)); } /* end if */ - + /* If there is an index defined for the field, use it */ if(H5F_addr_defined(bt2_addr)) { H5G_bt2_ud_rmbi_t udata; /* User data for v2 B-tree record removal */ diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c index a18339b..0eb4764 100644 --- a/src/H5Gdeprec.c +++ b/src/H5Gdeprec.c @@ -250,7 +250,7 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint) done: if(tmp_gcpl > 0 && tmp_gcpl != H5P_GROUP_CREATE_DEFAULT) - if(H5I_dec_ref(tmp_gcpl, TRUE) < 0) + if(H5I_dec_ref(tmp_gcpl, FALSE) < 0) HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release property list") if(ret_value < 0) diff --git a/src/H5Glink.c b/src/H5Glink.c index f5ad7d9..05df268 100644 --- a/src/H5Glink.c +++ b/src/H5Glink.c @@ -403,6 +403,10 @@ H5G_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk, H5O_link_t tmp_src_lnk; /* Temporary copy of src link, when needed */ const H5O_link_t *src_lnk = _src_lnk; /* Source link */ hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */ + hbool_t expanded_link_open = FALSE; /* Whether the target location has been opened */ + H5G_loc_t tmp_src_loc; /* Group location holding target object */ + H5G_name_t tmp_src_path; /* Path for target object */ + H5O_loc_t tmp_src_oloc; /* Object location for target object */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5G_link_copy_file, FAIL) @@ -413,61 +417,79 @@ H5G_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk, HDassert(dst_lnk); HDassert(cpy_info); - /* Expand soft link */ - if(H5L_TYPE_SOFT == src_lnk->type && cpy_info->expand_soft_link) { - H5O_info_t oinfo; /* Information about object pointed to by soft link */ - H5G_loc_t grp_loc; /* Group location holding soft link */ - H5G_name_t grp_path; /* Path for group holding soft link */ - - /* Make a temporary copy, so that it will not change the info in the cache */ - if(NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, &tmp_src_lnk)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy message") - - /* Set up group location for soft link to start in */ - H5G_name_reset(&grp_path); - grp_loc.path = &grp_path; - grp_loc.oloc = (H5O_loc_t *)src_oloc; /* Casting away const OK -QAK */ - - /* Check if the object pointed by the soft link exists in the source file */ - if(H5G_loc_info(&grp_loc, tmp_src_lnk.u.soft.name, FALSE, &oinfo, H5P_DEFAULT, dxpl_id) >= 0) { - /* Convert soft link to hard link */ - tmp_src_lnk.u.soft.name = (char *)H5MM_xfree(tmp_src_lnk.u.soft.name); + /* Expand soft or external link, if requested */ + if((H5L_TYPE_SOFT == src_lnk->type && cpy_info->expand_soft_link) + || (H5L_TYPE_EXTERNAL == src_lnk->type + && cpy_info->expand_ext_link)) { + H5G_loc_t lnk_grp_loc; /* Group location holding link */ + H5G_name_t lnk_grp_path; /* Path for link */ + htri_t tar_exists; /* Whether the target object exists */ + + /* Set up group location for link */ + H5G_name_reset(&lnk_grp_path); + lnk_grp_loc.path = &lnk_grp_path; + lnk_grp_loc.oloc = (H5O_loc_t *)src_oloc; /* Casting away const OK -QAK */ + + /* Check if the target object exists */ + if((tar_exists = H5G_loc_exists(&lnk_grp_loc, src_lnk->name, H5P_DEFAULT, + dxpl_id)) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to check if target object exists") + + if(tar_exists) { + /* Make a temporary copy of the link, so that it will not change the + * info in the cache when we change it to a hard link */ + if(NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, &tmp_src_lnk)) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy message") + + /* Set up group location for target object. Let H5G_traverse expand + * the link. */ + tmp_src_loc.path = &tmp_src_path; + tmp_src_loc.oloc = &tmp_src_oloc; + if(H5G_loc_reset(&tmp_src_loc) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to reset location") + + /* Find the target object */ + if(H5G_loc_find(&lnk_grp_loc, src_lnk->name, &tmp_src_loc, + H5P_DEFAULT, dxpl_id) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to find target object") + expanded_link_open = TRUE; + + /* Convert symbolic link to hard link */ + if(tmp_src_lnk.type == H5L_TYPE_SOFT) + tmp_src_lnk.u.soft.name = + (char *)H5MM_xfree(tmp_src_lnk.u.soft.name); + else if(tmp_src_lnk.u.ud.size > 0) + tmp_src_lnk.u.ud.udata = H5MM_xfree(tmp_src_lnk.u.ud.udata); tmp_src_lnk.type = H5L_TYPE_HARD; - tmp_src_lnk.u.hard.addr = oinfo.addr; + tmp_src_lnk.u.hard.addr = tmp_src_oloc.addr; src_lnk = &tmp_src_lnk; } /* end if */ - else { - /* Discard any errors from a dangling soft link */ - H5E_clear_stack(NULL); - - /* Release any information copied for temporary src link */ - H5O_msg_reset(H5O_LINK_ID, &tmp_src_lnk); - } /* end else */ } /* end if */ /* Copy src link information to dst link information */ if(NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, dst_lnk)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy message") dst_lnk_init = TRUE; /* Check if object in source group is a hard link & copy it */ if(H5L_TYPE_HARD == src_lnk->type) { H5O_loc_t new_dst_oloc; /* Copied object location in destination */ - H5O_loc_t tmp_src_oloc; /* Temporary object location for source object */ /* Set up copied object location to fill in */ H5O_loc_reset(&new_dst_oloc); new_dst_oloc.file = dst_file; - /* Build temporary object location for source */ - H5O_loc_reset(&tmp_src_oloc); - tmp_src_oloc.file = src_oloc->file; - HDassert(H5F_addr_defined(src_lnk->u.hard.addr)); - tmp_src_oloc.addr = src_lnk->u.hard.addr; + if(!expanded_link_open) { + /* Build temporary object location for source */ + H5O_loc_reset(&tmp_src_oloc); + tmp_src_oloc.file = src_oloc->file; + tmp_src_oloc.addr = src_lnk->u.hard.addr; + } /* end if */ + HDassert(H5F_addr_defined(tmp_src_oloc.addr)); /* Copy the shared object from source to destination */ if(H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, dxpl_id, cpy_info, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") /* Copy new destination object's information for eventual insertion */ dst_lnk->u.hard.addr = new_dst_oloc.addr; @@ -482,6 +504,10 @@ done: if(ret_value < 0) if(dst_lnk_init) H5O_msg_reset(H5O_LINK_ID, dst_lnk); + /* Check if we need to free the temp source oloc */ + if(expanded_link_open) + if(H5G_loc_free(&tmp_src_loc) < 0) + HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free object") FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_link_copy_file() */ diff --git a/src/H5Gloc.c b/src/H5Gloc.c index 47214a4..6145839 100644 --- a/src/H5Gloc.c +++ b/src/H5Gloc.c @@ -40,6 +40,8 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Gpkg.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ +#include "H5Lprivate.h" /* Links */ + /****************/ /* Local Macros */ @@ -56,6 +58,12 @@ typedef struct { H5G_loc_t *loc; /* Group location to set */ } H5G_loc_fnd_t; +/* User data for checking if an object exists */ +typedef struct { + /* upward */ + hbool_t exists; /* Whether the object exists */ +} H5G_loc_exists_t; + /* User data for looking up an object in a group by index */ typedef struct { /* downward */ @@ -493,8 +501,9 @@ H5G_loc_find_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name, H5G_loc_fbi_t *udata = (H5G_loc_fbi_t *)_udata; /* User data passed in */ H5O_link_t fnd_lnk; /* Link within group */ hbool_t lnk_copied = FALSE; /* Whether the link was copied */ - size_t links_left = 1; /* # of links left to traverse (somewhat bogus... :-/ ) */ + size_t links_left = H5L_NUM_LINKS; /* # of links left to traverse */ hbool_t obj_loc_valid = FALSE; /* Flag to indicate that the object location is valid */ + hbool_t obj_exists = FALSE; /* Whether the object exists (unused) */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5G_loc_find_by_idx_cb) @@ -517,7 +526,7 @@ H5G_loc_find_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name, /* Perform any special traversals that the link needs */ /* (soft links, user-defined links, file mounting, etc.) */ /* (may modify the object location) */ - if(H5G_traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, &links_left, TRUE, udata->loc, udata->lapl_id, udata->dxpl_id) < 0) + if(H5G_traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, &links_left, TRUE, udata->loc, &obj_exists, udata->lapl_id, udata->dxpl_id) < 0) HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed") done: @@ -631,6 +640,84 @@ done: /*------------------------------------------------------------------------- + * Function: H5G_loc_exists_cb + * + * Purpose: Callback for checking if an object exists + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * Tuesday, February 2, 2010 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5G_loc_exists_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name, + const H5O_link_t UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, + H5G_own_loc_t *own_loc/*out*/) +{ + H5G_loc_exists_t *udata = (H5G_loc_exists_t *)_udata; /* User data passed in */ + + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_loc_exists_cb) + + /* Check if the name in this group resolved to a valid object */ + if(obj_loc == NULL) + if(lnk) + udata->exists = FALSE; + else + udata->exists = FAIL; + else + udata->exists = TRUE; + + /* Indicate that this callback didn't take ownership of the group * + * location for the object */ + *own_loc = H5G_OWN_NONE; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5G_loc_exists_cb() */ + + +/*------------------------------------------------------------------------- + * Function: H5G_loc_exists + * + * Purpose: Check if an object actually exists at a location + * + * Return: Success: TRUE/FALSE + * Failure: Negative + * + * Programmer: Quincey Koziol + * Tuesday, February 2, 2010 + * + *------------------------------------------------------------------------- + */ +htri_t +H5G_loc_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id) +{ + H5G_loc_exists_t udata; /* User data for traversal callback */ + htri_t ret_value; /* Return value */ + + FUNC_ENTER_NOAPI(H5G_loc_exists, FAIL) + + /* Check args. */ + HDassert(loc); + HDassert(name && *name); + + /* Set up user data for locating object */ + udata.exists = FALSE; + + /* Traverse group hierarchy to locate object */ + if(H5G_traverse(loc, name, H5G_TARGET_EXISTS, H5G_loc_exists_cb, &udata, lapl_id, dxpl_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't check if object exists") + + /* Set return value */ + ret_value = (htri_t)udata.exists; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5G_loc_exists() */ + + +/*------------------------------------------------------------------------- * Function: H5G_loc_info_cb * * Purpose: Callback for retrieving object info for an object in a group diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 18125df..1df2fe4 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -51,7 +51,6 @@ typedef struct H5G_node_key_t { size_t offset; /*offset into heap for name */ } H5G_node_key_t; - /* Private macros */ #define H5G_NODE_SIZEOF_HDR(F) (H5_SIZEOF_MAGIC + 4) @@ -63,10 +62,8 @@ static H5RC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata); static herr_t H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t op, void *_lt_key, void *_udata, void *_rt_key, haddr_t *addr_p/*out*/); -static int H5G_node_cmp2(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, - void *_rt_key); -static int H5G_node_cmp3(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, - void *_rt_key); +static int H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key); +static int H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key); static htri_t H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_lt_key, void *_udata); static H5B_ins_t H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key, @@ -77,13 +74,10 @@ static H5B_ins_t H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_l static H5B_ins_t H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *lt_key, hbool_t *lt_key_changed, void *udata, void *rt_key, hbool_t *rt_key_changed); -static herr_t H5G_node_decode_key(const H5F_t *f, const H5B_t *bt, const uint8_t *raw, - void *_key); -static herr_t H5G_node_encode_key(const H5F_t *f, const H5B_t *bt, uint8_t *raw, - void *_key); -static herr_t H5G_node_debug_key(FILE *stream, H5F_t *f, hid_t dxpl_id, - int indent, int fwidth, const void *key, - const void *udata); +static herr_t H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key); +static herr_t H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key); +static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth, + const void *key, const void *udata); /* H5G inherits B-tree like properties from H5B */ H5B_class_t H5B_SNODE[1] = {{ @@ -95,6 +89,7 @@ H5B_class_t H5B_SNODE[1] = {{ H5G_node_cmp3, /*cmp3 */ H5G_node_found, /*found */ H5G_node_insert, /*insert */ + H5B_RIGHT, /*critical key */ TRUE, /*follow min branch? */ TRUE, /*follow max branch? */ H5G_node_remove, /*remove */ @@ -130,18 +125,12 @@ H5FL_SEQ_DEFINE(H5G_entry_t); static H5RC_t * H5G_node_get_shared(const H5F_t *f, const void UNUSED *_udata) { - H5RC_t *rc; - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_get_shared) HDassert(f); - /* Increment reference count on shared B-tree node */ - rc = H5F_GRP_BTREE_SHARED(f); - H5RC_INC(rc); - /* Return the pointer to the ref-count object */ - FUNC_LEAVE_NOAPI(rc) + FUNC_LEAVE_NOAPI(H5F_GRP_BTREE_SHARED(f)) } /* end H5G_node_get_shared() */ @@ -159,17 +148,17 @@ H5G_node_get_shared(const H5F_t *f, const void UNUSED *_udata) *------------------------------------------------------------------------- */ static herr_t -H5G_node_decode_key(const H5F_t *f, const H5B_t UNUSED *bt, const uint8_t *raw, void *_key) +H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key) { H5G_node_key_t *key = (H5G_node_key_t *) _key; FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_decode_key) - HDassert(f); + HDassert(shared); HDassert(raw); HDassert(key); - H5F_DECODE_LENGTH(f, raw, key->offset); + H5F_DECODE_LENGTH_LEN(raw, key->offset, shared->sizeof_len); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5G_node_decode_key() */ @@ -189,17 +178,17 @@ H5G_node_decode_key(const H5F_t *f, const H5B_t UNUSED *bt, const uint8_t *raw, *------------------------------------------------------------------------- */ static herr_t -H5G_node_encode_key(const H5F_t *f, const H5B_t UNUSED *bt, uint8_t *raw, void *_key) +H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key) { - H5G_node_key_t *key = (H5G_node_key_t *) _key; + const H5G_node_key_t *key = (const H5G_node_key_t *) _key; FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_encode_key) - HDassert(f); + HDassert(shared); HDassert(raw); HDassert(key); - H5F_ENCODE_LENGTH(f, raw, key->offset); + H5F_ENCODE_LENGTH_LEN(raw, key->offset, shared->sizeof_len); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5G_node_encode_key() */ @@ -218,8 +207,8 @@ H5G_node_encode_key(const H5F_t *f, const H5B_t UNUSED *bt, uint8_t *raw, void * *------------------------------------------------------------------------- */ static herr_t -H5G_node_debug_key(FILE *stream, H5F_t UNUSED *f, hid_t UNUSED dxpl_id, - int indent, int fwidth, const void *_key, const void *_udata) +H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key, + const void *_udata) { const H5G_node_key_t *key = (const H5G_node_key_t *) _key; const H5G_bt_common_t *udata = (const H5G_bt_common_t *) _udata; @@ -367,8 +356,7 @@ done: *------------------------------------------------------------------------- */ static int -H5G_node_cmp2(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_udata, - void *_rt_key) +H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key) { H5G_bt_common_t *udata = (H5G_bt_common_t *) _udata; H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key; @@ -427,8 +415,7 @@ H5G_node_cmp2(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_udata *------------------------------------------------------------------------- */ static int -H5G_node_cmp3(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_udata, - void *_rt_key) +H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key) { H5G_bt_common_t *udata = (H5G_bt_common_t *) _udata; H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key; @@ -860,14 +847,11 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, /* Remove the entry from the symbol table node */ if(1 == sn->nsyms) { /* - * We are about to remove the only symbol in this node. Copy the left - * key to the right key and mark the right key as dirty. Free this + * We are about to remove the only symbol in this node. Free this * node and indicate that the pointer to this node in the B-tree * should be removed also. */ HDassert(0 == idx); - *rt_key = *lt_key; - *rt_key_changed = TRUE; sn->nsyms = 0; sn_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; ret_value = H5B_INS_REMOVE; @@ -925,13 +909,10 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, } /* end for */ /* - * We are about to remove all the symbols in this node. Copy the left - * key to the right key and mark the right key as dirty. Free this + * We are about to remove all the symbols in this node. Free this * node and indicate that the pointer to this node in the B-tree * should be removed also. */ - *rt_key = *lt_key; - *rt_key_changed = TRUE; sn->nsyms = 0; sn_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; ret_value = H5B_INS_REMOVE; diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index 33ec680..b80b1b1 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -34,6 +34,7 @@ /* Other private headers needed by this file */ #include "H5ACprivate.h" /* Metadata cache */ #include "H5B2private.h" /* v2 B-trees */ +#include "H5FLprivate.h" /* Free Lists */ #include "H5HFprivate.h" /* Fractal heaps */ #include "H5HLprivate.h" /* Local Heaps */ #include "H5Oprivate.h" /* Object headers */ @@ -55,7 +56,8 @@ #define H5G_TARGET_SLINK 0x0001 #define H5G_TARGET_MOUNT 0x0002 #define H5G_TARGET_UDLINK 0x0004 -#define H5G_CRT_INTMD_GROUP 0x0008 +#define H5G_TARGET_EXISTS 0x0008 +#define H5G_CRT_INTMD_GROUP 0x0010 /****************************/ /* Package Private Typedefs */ @@ -369,7 +371,7 @@ H5_DLL herr_t H5G_iterate(hid_t loc_id, const char *group_name, H5_DLL herr_t H5G_traverse_term_interface(void); H5_DLL herr_t H5G_traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned target, size_t *nlinks, hbool_t last_comp, - H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id); + H5G_loc_t *obj_loc, hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id); H5_DLL herr_t H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traverse_t op, void *op_data, hid_t lapl_id, hid_t dxpl_id); diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index dec40f3..3e66777 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -210,6 +210,8 @@ H5_DLL herr_t H5G_loc_find(const H5G_loc_t *loc, const char *name, H5_DLL herr_t H5G_loc_find_by_idx(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_loc_t *obj_loc/*out*/, hid_t lapl_id, hid_t dxpl_id); +H5_DLL htri_t H5G_loc_exists(const H5G_loc_t *loc, const char *name, + hid_t lapl_id, hid_t dxpl_id); H5_DLL herr_t H5G_loc_info(H5G_loc_t *loc, const char *name, hbool_t want_ih_info, H5O_info_t *oinfo/*out*/, hid_t lapl_id, hid_t dxpl_id); diff --git a/src/H5Groot.c b/src/H5Groot.c index e4cdc46..0d21bfe 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -99,6 +99,7 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root) H5G_loc_t root_loc; /* Root location information */ htri_t stab_exists = -1; /* Whether the symbol table exists */ hbool_t sblock_dirty = FALSE; /* Whether superblock was dirtied */ + hbool_t path_init = FALSE; /* Whether path was initialized */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5G_mkroot, FAIL) @@ -235,6 +236,7 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root) /* Create the path names for the root group's entry */ H5G_name_init(root_loc.path, "/"); + path_init = TRUE; f->shared->root_grp->shared->fo_count = 1; /* The only other open object should be the superblock extension, if it @@ -250,13 +252,14 @@ done: * allocated */ if(ret_value < 0) { if(f->shared->root_grp) { + if(path_init) + H5G_name_free(root_loc.path); if(f->shared->root_grp->shared) f->shared->root_grp->shared = H5FL_FREE(H5G_shared_t, f->shared->root_grp->shared); f->shared->root_grp = H5FL_FREE(H5G_t, f->shared->root_grp); } /* end if */ if(f->shared->sblock) f->shared->sblock->root_ent = (H5G_entry_t *)H5MM_xfree(f->shared->sblock->root_ent); - H5G_name_free(root_loc.path); } /* end if */ /* Mark superblock dirty in cache, if necessary */ diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index 4c287d5..e9f3010 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -43,8 +43,13 @@ /* User data for path traversal routine */ typedef struct { + /* down */ + hbool_t chk_exists; /* Flag to indicate we are checking if object exists */ + + /* up */ H5G_loc_t *obj_loc; /* Object location */ -} H5G_trav_ud1_t; + hbool_t exists; /* Indicate if object exists */ +} H5G_trav_slink_t; /* Private macros */ @@ -53,15 +58,15 @@ static char *H5G_comp_g = NULL; /*component buffer */ static size_t H5G_comp_alloc_g = 0; /*sizeof component buffer */ /* PRIVATE PROTOTYPES */ -static herr_t H5G_traverse_link_cb(H5G_loc_t *grp_loc, const char *name, +static herr_t H5G_traverse_slink_cb(H5G_loc_t *grp_loc, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); static herr_t H5G_traverse_ud(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, - H5G_loc_t *obj_loc/*in,out*/, size_t *nlinks/*in,out*/, hid_t lapl_id, - hid_t dxpl_id); + H5G_loc_t *obj_loc/*in,out*/, unsigned target, size_t *nlinks/*in,out*/, + hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id); static herr_t H5G_traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, - H5G_loc_t *obj_loc/*in,out*/, size_t *nlinks/*in,out*/, hid_t lapl_id, - hid_t dxpl_id); + H5G_loc_t *obj_loc/*in,out*/, unsigned target, size_t *nlinks/*in,out*/, + hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id); static herr_t H5G_traverse_mount(H5G_loc_t *loc/*in,out*/); static herr_t H5G_traverse_real(const H5G_loc_t *loc, const char *name, unsigned target, size_t *nlinks, H5G_traverse_t op, void *op_data, @@ -97,9 +102,9 @@ H5G_traverse_term_interface(void) /*------------------------------------------------------------------------- - * Function: H5G_traverse_link_cb + * Function: H5G_traverse_slink_cb * - * Purpose: Callback for link traversal. This routine sets the + * Purpose: Callback for soft link traversal. This routine sets the * correct information for the object location. * * Return: Non-negative on success/Negative on failure @@ -110,20 +115,29 @@ H5G_traverse_term_interface(void) *------------------------------------------------------------------------- */ static herr_t -H5G_traverse_link_cb(H5G_loc_t UNUSED *grp_loc, const char UNUSED *name, const H5O_link_t UNUSED *lnk, - H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/) +H5G_traverse_slink_cb(H5G_loc_t UNUSED *grp_loc, const char UNUSED *name, + const H5O_link_t UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, + H5G_own_loc_t *own_loc/*out*/) { - H5G_trav_ud1_t *udata = (H5G_trav_ud1_t *)_udata; /* User data passed in */ + H5G_trav_slink_t *udata = (H5G_trav_slink_t *)_udata; /* User data passed in */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5G_traverse_link_cb) + FUNC_ENTER_NOAPI_NOINIT(H5G_traverse_slink_cb) /* Check for dangling soft link */ - if(obj_loc == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found") + if(obj_loc == NULL) { + if(udata->chk_exists) + udata->exists = FALSE; + else + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found") + } /* end if */ + else { + /* Copy new location information for resolved object */ + H5O_loc_copy(udata->obj_loc->oloc, obj_loc->oloc, H5_COPY_DEEP); - /* Copy new location information for resolved object */ - H5O_loc_copy(udata->obj_loc->oloc, obj_loc->oloc, H5_COPY_DEEP); + /* Indicate that the object exists */ + udata->exists = TRUE; + } /* end else */ done: /* Indicate that this callback didn't take ownership of the group * @@ -131,7 +145,7 @@ done: *own_loc = H5G_OWN_NONE; FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_traverse_link_cb() */ +} /* end H5G_traverse_slink_cb() */ /*------------------------------------------------------------------------- @@ -149,8 +163,8 @@ done: */ static herr_t H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk, - H5G_loc_t *obj_loc/*in,out*/, size_t *nlinks/*in,out*/, hid_t _lapl_id, - hid_t dxpl_id) + H5G_loc_t *obj_loc/*in,out*/, unsigned target, size_t *nlinks/*in,out*/, + hbool_t *obj_exists, hid_t _lapl_id, hid_t dxpl_id) { const H5L_class_t *link_class; /* User-defined link class */ hid_t cb_return = -1; /* The ID the user-defined callback returned */ @@ -222,8 +236,25 @@ H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk, HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set nlink info") /* User-defined callback function */ - if((cb_return = (link_class->trav_func)(lnk->name, cur_grp, lnk->u.ud.udata, lnk->u.ud.size, lapl_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADATOM, FAIL, "traversal callback returned invalid ID") + cb_return = (link_class->trav_func)(lnk->name, cur_grp, lnk->u.ud.udata, lnk->u.ud.size, lapl_id); + + /* Check for failing to locate the object */ + if(cb_return < 0) { + /* Check if we just needed to know if the object exists */ + if(target & H5G_TARGET_EXISTS) { + /* Clear any errors from the stack */ + H5E_clear_stack(NULL); + + /* Indicate that the object doesn't exist */ + *obj_exists = FALSE; + + /* Get out now */ + HGOTO_DONE(SUCCEED); + } /* end if */ + /* else, we really needed to open the object */ + else + HGOTO_ERROR(H5E_ARGS, H5E_BADATOM, FAIL, "traversal callback returned invalid ID") + } /* end if */ /* Get the oloc from the ID the user callback returned */ switch(H5I_get_type(cb_return)) { @@ -306,10 +337,10 @@ done: */ static herr_t H5G_traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, - H5G_loc_t *obj_loc/*in,out*/, size_t *nlinks/*in,out*/, hid_t lapl_id, - hid_t dxpl_id) + H5G_loc_t *obj_loc/*in,out*/, unsigned target, size_t *nlinks/*in,out*/, + hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id) { - H5G_trav_ud1_t udata; /* User data to pass to link traversal callback */ + H5G_trav_slink_t udata; /* User data to pass to link traversal callback */ H5G_name_t tmp_obj_path; /* Temporary copy of object's path */ hbool_t tmp_obj_path_set = FALSE; /* Flag to indicate that tmp object path is initialized */ H5O_loc_t tmp_grp_oloc; /* Temporary copy of group entry */ @@ -347,12 +378,17 @@ H5G_traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, tmp_obj_path_set = TRUE; /* Set up user data for traversal callback */ + udata.chk_exists = (target & H5G_TARGET_EXISTS) ? TRUE : FALSE; + udata.exists = FALSE; udata.obj_loc = obj_loc; /* Traverse the link */ - if(H5G_traverse_real(&tmp_grp_loc, lnk->u.soft.name, H5G_TARGET_NORMAL, nlinks, H5G_traverse_link_cb, &udata, lapl_id, dxpl_id) < 0) + if(H5G_traverse_real(&tmp_grp_loc, lnk->u.soft.name, target, nlinks, H5G_traverse_slink_cb, &udata, lapl_id, dxpl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to follow symbolic link") + /* Pass back information about whether the object exists */ + *obj_exists = udata.exists; + done: /* Restore object's group hier. path */ if(tmp_obj_path_set) { @@ -464,7 +500,7 @@ done: herr_t H5G_traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned target, size_t *nlinks, hbool_t last_comp, - H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id) + H5G_loc_t *obj_loc, hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id) { herr_t ret_value = SUCCEED; /* Return value */ @@ -485,7 +521,7 @@ H5G_traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, (0 == (target & H5G_TARGET_SLINK) || !last_comp)) { if((*nlinks)-- <= 0) HGOTO_ERROR(H5E_LINK, H5E_NLINKS, FAIL, "too many links") - if(H5G_traverse_slink(grp_loc, lnk, obj_loc, nlinks, lapl_id, dxpl_id) < 0) + if(H5G_traverse_slink(grp_loc, lnk, obj_loc, (target & H5G_TARGET_EXISTS), nlinks, obj_exists, lapl_id, dxpl_id) < 0) HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "symbolic link traversal failed") } /* end if */ @@ -498,7 +534,7 @@ H5G_traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, (0 == (target & H5G_TARGET_UDLINK) || !last_comp) ) { if((*nlinks)-- <= 0) HGOTO_ERROR(H5E_LINK, H5E_NLINKS, FAIL, "too many links") - if(H5G_traverse_ud(grp_loc, lnk, obj_loc, nlinks, lapl_id, dxpl_id) < 0) + if(H5G_traverse_ud(grp_loc, lnk, obj_loc, (target & H5G_TARGET_EXISTS), nlinks, obj_exists, lapl_id, dxpl_id) < 0) HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "user-defined link traversal failed") } /* end if */ @@ -634,6 +670,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, while((name = H5G_component(name, &nchars)) && *name) { const char *s; /* Temporary string pointer */ htri_t lookup_status; /* Status from object lookup */ + hbool_t obj_exists; /* Whether the object exists */ /* * Copy the component name into a null-terminated buffer so @@ -663,6 +700,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, /* Get information for object in current group */ if((lookup_status = H5G_obj_lookup(grp_loc.oloc, H5G_comp_g, &lnk/*out*/, dxpl_id)) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't look up component") + obj_exists = FALSE; /* If the lookup was OK, build object location and traverse special links, etc. */ if(lookup_status) { @@ -676,9 +714,12 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location") obj_loc_valid = TRUE; + /* Assume object exists */ + obj_exists = TRUE; + /* Perform any special traversals that the link needs */ /* (soft links, user-defined links, file mounting, etc.) */ - if(H5G_traverse_special(&grp_loc, &lnk, target, nlinks, last_comp, &obj_loc, lapl_id, dxpl_id) < 0) + if(H5G_traverse_special(&grp_loc, &lnk, target, nlinks, last_comp, &obj_loc, &obj_exists, lapl_id, dxpl_id) < 0) HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed") } /* end if */ @@ -690,7 +731,10 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, /* Set callback parameters appropriately, based on link being found */ if(lookup_status) { cb_lnk = &lnk; - cb_loc = &obj_loc; + if(obj_exists) + cb_loc = &obj_loc; + else + cb_loc = NULL; } /* end if */ else { HDassert(!obj_loc_valid); diff --git a/src/H5HF.c b/src/H5HF.c index 0856d89..18e1cdb 100644 --- a/src/H5HF.c +++ b/src/H5HF.c @@ -867,10 +867,10 @@ HDfprintf(stderr, "%s; After iterator reset fh->hdr->rc = %Zu\n", FUNC, fh->hdr- HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to delete fractal heap") } /* end if */ +done: /* Release the fractal heap wrapper */ - (void)H5FL_FREE(H5HF_t, fh); + fh = H5FL_FREE(H5HF_t, fh); -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5HF_close() */ diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index 027146c..7a511a0 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -312,7 +312,7 @@ H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock, done: /* Unprotect the indirect block, with appropriate flags */ - if(dblock && H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, cache_flags) < 0) + if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, cache_flags) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block") FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c index 8652f90..e55f472 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -1454,7 +1454,7 @@ H5HF_hdr_delete(H5HF_hdr_t *hdr, hid_t dxpl_id) done: /* Unprotect the header with appropriate flags */ - if(hdr && H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, cache_flags) < 0) + if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, cache_flags) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap header") FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c index 5490c22..7577583 100644 --- a/src/H5HFhuge.c +++ b/src/H5HFhuge.c @@ -710,7 +710,7 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, /* Call the user's 'op' callback */ if(op(read_buf, (size_t)obj_size, op_data) < 0) { /* Release buffer */ - H5MM_xfree(read_buf); + read_buf = H5MM_xfree(read_buf); /* Indicate error */ HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed") @@ -720,7 +720,7 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, done: /* Release the buffer for reading */ if(read_buf && read_buf != op_data) - H5MM_xfree(read_buf); + read_buf = H5MM_xfree(read_buf); FUNC_LEAVE_NOAPI(ret_value) } /* end H5HF_huge_op_real() */ diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c index 809a720..26c60a3 100644 --- a/src/H5HFiblock.c +++ b/src/H5HFiblock.c @@ -852,7 +852,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5HF_man_iblock_alloc_indirect2 + * Function: H5HF_man_iblock_alloc_row * * Purpose: Allocate a "single" section for an object, out of a * "row" section. @@ -872,7 +872,7 @@ H5HF_man_iblock_alloc_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t ** { H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */ H5HF_free_section_t *old_sec_node = *sec_node; /* Pointer to old indirect section node */ - unsigned dblock_entry; /* Entry for direct block */ + unsigned dblock_entry; /* Entry for direct block */ hbool_t iblock_held = FALSE; /* Flag to indicate that indirect block is held */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5HFiter.c b/src/H5HFiter.c index a3c61d7..f7178a1 100644 --- a/src/H5HFiter.c +++ b/src/H5HFiter.c @@ -315,7 +315,7 @@ herr_t H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indirect_t *iblock, unsigned start_entry) { - H5HF_block_loc_t *new_loc; /* Pointer to new block location */ + H5HF_block_loc_t *new_loc = NULL; /* Pointer to new block location */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iter_start_entry) @@ -350,6 +350,9 @@ H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, biter->ready = TRUE; done: + if(ret_value < 0 && new_loc) + new_loc = H5FL_FREE(H5HF_block_loc_t, new_loc); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5HF_man_iter_start_entry() */ @@ -397,7 +400,7 @@ H5HF_man_iter_reset(H5HF_block_iter_t *biter) HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block") /* Free the current location context */ - (void)H5FL_FREE(H5HF_block_loc_t, curr_loc); + curr_loc = H5FL_FREE(H5HF_block_loc_t, curr_loc); /* Advance to next location */ curr_loc = next_loc; @@ -489,7 +492,7 @@ H5HF_man_iter_up(H5HF_block_iter_t *biter) up_loc = biter->curr->up; /* Release this location */ - (void)H5FL_FREE(H5HF_block_loc_t, biter->curr); + biter->curr = H5FL_FREE(H5HF_block_loc_t, biter->curr); /* Point location to next location up */ biter->curr = up_loc; @@ -515,7 +518,7 @@ done: herr_t H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock) { - H5HF_block_loc_t *down_loc; /* Pointer to new 'down' block location */ + H5HF_block_loc_t *down_loc = NULL; /* Pointer to new 'down' block location */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iter_down) @@ -547,6 +550,9 @@ H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock) biter->curr = down_loc; done: + if(ret_value < 0 && down_loc) + down_loc = H5FL_FREE(H5HF_block_loc_t, down_loc); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5HF_man_iter_down() */ diff --git a/src/H5HFman.c b/src/H5HFman.c index 47478e6..0ec6f5f 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -482,7 +482,7 @@ done: herr_t H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id) { - H5HF_free_section_t *sec_node; /* Pointer to free space section for block */ + H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */ H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */ hbool_t did_protect; /* Whether we protected the indirect block or not */ hsize_t obj_off; /* Object's offset in heap */ @@ -571,24 +571,29 @@ H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id) iblock = NULL; } /* end if */ - /* Update statistics about heap */ - hdr->man_nobjs--; - /* Increase space available in heap (marks header dirty) */ if(H5HF_hdr_adj_free(hdr, (ssize_t)obj_len) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't adjust free space for heap") + /* Update statistics about heap */ + hdr->man_nobjs--; + /* Return free space to the heap's list of space */ if(H5HF_space_add(hdr, dxpl_id, sec_node, H5FS_ADD_RETURNED_SPACE) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add direct block free space to global list") + sec_node = NULL; done: if(ret_value < 0) { - /* Unlock indirect block */ - if(iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0) - HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + /* Release section node */ + if(sec_node && H5HF_sect_single_free((H5FS_section_info_t *)sec_node) < 0) + HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release section node") } /* end if */ + /* Unlock indirect block */ + if(iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0) + HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5HF_man_remove() */ diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index 3c5567c..61f018f 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -169,7 +169,7 @@ #define H5HF_FSPACE_SECT_SINGLE 0 /* Section is a range of actual bytes in a direct block */ #define H5HF_FSPACE_SECT_FIRST_ROW 1 /* Section is first range of blocks in an indirect block row */ #define H5HF_FSPACE_SECT_NORMAL_ROW 2 /* Section is a range of blocks in an indirect block row */ -#define H5HF_FSPACE_SECT_INDIRECT 3 /* Section is a span of blocks in an indirect block */ +#define H5HF_FSPACE_SECT_INDIRECT 3 /* Section is a span of blocks in an indirect block */ /* Flags for 'op' operations */ #define H5HF_OP_MODIFY 0x0001 /* Operation will modify object */ @@ -721,6 +721,7 @@ H5_DLL herr_t H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5_DLL H5HF_indirect_t *H5HF_sect_row_get_iblock(H5HF_free_section_t *sect); H5_DLL herr_t H5HF_sect_indirect_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *iblock, unsigned start_entry, unsigned nentries); +H5_DLL herr_t H5HF_sect_single_free(H5FS_section_info_t *sect); /* Internal operator callbacks */ H5_DLL herr_t H5HF_op_read(const void *obj, size_t obj_len, void *op_data); diff --git a/src/H5HFsection.c b/src/H5HFsection.c index 102dc7c..d763897 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -97,7 +97,6 @@ static htri_t H5HF_sect_single_can_shrink(const H5FS_section_info_t *sect, void *udata); static herr_t H5HF_sect_single_shrink(H5FS_section_info_t **_sect, void *udata); -static herr_t H5HF_sect_single_free(H5FS_section_info_t *sect); static herr_t H5HF_sect_single_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *sect); @@ -465,7 +464,7 @@ H5HF_sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock) HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on section's indirect block") /* Release the section */ - (void)H5FL_FREE(H5HF_free_section_t, sect); + sect = H5FL_FREE(H5HF_free_section_t, sect); done: FUNC_LEAVE_NOAPI(ret_value) @@ -517,7 +516,7 @@ H5HF_sect_single_new(hsize_t sect_off, size_t sect_size, done: if(!ret_value && sect) { /* Release the section */ - (void)H5FL_FREE(H5HF_free_section_t, sect); + sect = H5FL_FREE(H5HF_free_section_t, sect); } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -1169,7 +1168,7 @@ done: * *------------------------------------------------------------------------- */ -static herr_t +herr_t H5HF_sect_single_free(H5FS_section_info_t *_sect) { H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Pointer to section to free */ @@ -1372,7 +1371,7 @@ H5HF_sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, /* Release single section's hold on underlying indirect block */ if(H5HF_iblock_decr(dblock->parent) < 0) - HDONE_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block") done: FUNC_LEAVE_NOAPI(ret_value) @@ -3756,7 +3755,7 @@ static herr_t H5HF_sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) { H5HF_indirect_t *par_iblock; /* Indirect block for parent section */ - H5HF_free_section_t *par_sect; /* Parent indirect section */ + H5HF_free_section_t *par_sect = NULL; /* Parent indirect section */ unsigned par_row, par_col; /* Row & column in parent indirect section */ unsigned par_entry; /* Entry within parent indirect section */ herr_t ret_value = SUCCEED; /* Return value */ @@ -3802,6 +3801,10 @@ H5HF_sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) par_sect->u.indirect.rc = 1; done: + if(ret_value < 0) + if(par_sect && H5HF_sect_indirect_free(par_sect) < 0) + HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5HF_sect_indirect_build_parent() */ diff --git a/src/H5HG.c b/src/H5HG.c index 0e3f0e9..f1edb71 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -640,10 +640,11 @@ void * H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object/*out*/, size_t *buf_size) { - H5HG_heap_t *heap = NULL; - size_t size; - uint8_t *p = NULL; - void *ret_value; + H5HG_heap_t *heap = NULL; /* Pointer to global heap object */ + size_t size; /* Size of the heap object */ + uint8_t *p; /* Pointer to object in heap buffer */ + void *orig_object = object; /* Keep a copy of the original object pointer */ + void *ret_value; /* Return value */ FUNC_ENTER_NOAPI(H5HG_read, NULL) @@ -659,6 +660,7 @@ H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object/*out*/, HDassert(heap->obj[hobj->idx].begin); size = heap->obj[hobj->idx].size; p = heap->obj[hobj->idx].begin + H5HG_SIZEOF_OBJHDR(f); + /* Allocate a buffer for the object read in, if the user didn't give one */ if(!object && NULL == (object = H5MM_malloc(size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") @@ -692,6 +694,9 @@ done: if(heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, hobj->addr, heap, H5AC__NO_FLAGS_SET)<0) HDONE_ERROR(H5E_HEAP, H5E_PROTECT, NULL, "unable to release object header") + if(NULL == ret_value && NULL == orig_object && object) + H5MM_free(object); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5HG_read() */ diff --git a/src/H5HLcache.c b/src/H5HLcache.c index 6e725ac..47d5d6f 100644 --- a/src/H5HLcache.c +++ b/src/H5HLcache.c @@ -138,13 +138,14 @@ const H5AC_class_t H5AC_LHEAP_DBLK[1] = {{ static herr_t H5HL_fl_deserialize(H5HL_t *heap, hsize_t free_block) { - H5HL_free_t *fl, *tail = NULL; /* Heap free block nodes */ + H5HL_free_t *fl = NULL, *tail = NULL; /* Heap free block nodes */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5HL_fl_deserialize) /* check arguments */ HDassert(heap); + HDassert(!heap->freelist); /* Build free list */ while(H5HL_FREE_NULL != free_block) { @@ -161,13 +162,6 @@ H5HL_fl_deserialize(H5HL_t *heap, hsize_t free_block) fl->prev = tail; fl->next = NULL; - /* Insert node into list */ - if(tail) - tail->next = fl; - tail = fl; - if(!heap->freelist) - heap->freelist = fl; - /* Decode offset of next free block */ p = heap->dblk_image + free_block; H5F_DECODE_LENGTH_LEN(p, free_block, heap->sizeof_size); @@ -178,9 +172,21 @@ H5HL_fl_deserialize(H5HL_t *heap, hsize_t free_block) H5F_DECODE_LENGTH_LEN(p, fl->size, heap->sizeof_size); if(fl->offset + fl->size > heap->dblk_size) HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "bad heap free list") + + /* Append node onto list */ + if(tail) + tail->next = fl; + else + heap->freelist = fl; + tail = fl; + fl = NULL; } /* end while */ done: + if(ret_value < 0) + if(fl) + fl = H5FL_FREE(H5HL_free_t, fl); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5HL_fl_deserialize() */ diff --git a/src/H5I.c b/src/H5I.c index cf78d3b..25770ff 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -42,6 +42,7 @@ #include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ #include "H5Ipkg.h" /* IDs */ @@ -924,6 +925,44 @@ done: /*------------------------------------------------------------------------- + * Function: H5I_subst + * + * Purpose: Substitute a new object pointer for the specified ID. + * + * Return: Success: Non-null previsou object pointer associated + * with the specified ID. + * Failure: NULL + * + * Programmer: Quincey Koziol + * Saturday, February 27, 2010 + * + *------------------------------------------------------------------------- + */ +void * +H5I_subst(hid_t id, const void *new_object) +{ + H5I_id_info_t *id_ptr; /* Ptr to the atom */ + void *ret_value; /* Return value */ + + FUNC_ENTER_NOAPI(H5I_subst, NULL) + + /* General lookup of the ID */ + if(NULL == (id_ptr = H5I_find_id(id))) + HGOTO_ERROR(H5E_ATOM, H5E_NOTFOUND, NULL, "can't get ID ref count") + + /* Get the old object pointer to return */ + /* (Casting away const OK -QAK) */ + ret_value = (void *)id_ptr->obj_ptr; + + /* Set the new object pointer for the ID */ + id_ptr->obj_ptr = new_object; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end if */ + + +/*------------------------------------------------------------------------- * Function: H5I_object * * Purpose: Find an object pointer for the specified ID. diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h index 475871b..ef83908 100644 --- a/src/H5Iprivate.h +++ b/src/H5Iprivate.h @@ -55,6 +55,7 @@ H5_DLL int H5I_nmembers(H5I_type_t type); H5_DLL herr_t H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref); H5_DLL int H5I_destroy_type(H5I_type_t type); H5_DLL hid_t H5I_register(H5I_type_t type, const void *object, hbool_t app_ref); +H5_DLL void *H5I_subst(hid_t id, const void *new_object); H5_DLL void *H5I_object(hid_t id); H5_DLL void *H5I_object_verify(hid_t id, H5I_type_t id_type); H5_DLL H5I_type_t H5I_get_type(hid_t id); diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index db762cf..7ccdb68 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -412,19 +412,15 @@ H5L_extern_traverse(const char UNUSED *link_name, hid_t cur_group, /* get last component of file_name */ GET_LAST_DELIMITER(actual_file_name, ptr) - if(ptr) { - /* Truncate filename portion from actual file name path */ - *ptr = '\0'; + if(!ptr) + HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s', temp_file_name = '%s'", file_name, temp_file_name) - /* Build new file name for the external file */ - if(H5L_build_name(actual_file_name, temp_file_name, &full_name/*out*/) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename") - } /* end if */ - else { - /* Transfer ownership of actual file name to 'full_name' variable */ - full_name = actual_file_name; - actual_file_name = NULL; - } /* end else */ + /* Truncate filename portion from actual file name path */ + *ptr = '\0'; + + /* Build new file name for the external file */ + if(H5L_build_name(actual_file_name, temp_file_name, &full_name/*out*/) < 0) + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename") /* Try opening with the resolved name */ if(NULL == (ext_file = H5F_open(full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) diff --git a/src/H5MF.c b/src/H5MF.c index 0129c1d..5475df4 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -254,7 +254,7 @@ done: /*------------------------------------------------------------------------- * Function: H5MF_alloc_create * - * Purpose: Create free space manager of TYPE for the file by creating + * Purpose: Create free space manager of TYPE for the file by creating * a free-space structure * * Return: Success: non-negative @@ -652,7 +652,7 @@ HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, a * Note: this drops the space to free on the floor... * */ - if(f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING || + if(f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING || !H5F_HAVE_FREE_SPACE_MANAGER(f)) { #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, addr, size); @@ -991,6 +991,7 @@ HDfprintf(stderr, "%s: Entering\n", FUNC); HDassert(f); HDassert(f->shared); HDassert(f->shared->lf); + HDassert(f->shared->sblock); /* Free the space in aggregators */ /* (for space not at EOF, it may be put into free space managers) */ diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c index db13408..9936c3b 100644 --- a/src/H5MFaggr.c +++ b/src/H5MFaggr.c @@ -77,8 +77,8 @@ /*------------------------------------------------------------------------- * Function: H5MF_aggr_vfd_alloc * - * Purpose: Allocate SIZE bytes of file memory via H5MF_aggr_alloc() - * and return the relative address where that contiguous chunk + * Purpose: Allocate SIZE bytes of file memory via H5MF_aggr_alloc() + * and return the relative address where that contiguous chunk * of file memory exists. * The TYPE argument describes the purpose for which the storage * is being requested. @@ -178,7 +178,7 @@ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size); /* * If the aggregation feature is enabled for this file and strategy is not H5F_FILE_SPACE_VFD, - * allocate "generic" space and sub-allocate out of that, if possible. + * allocate "generic" space and sub-allocate out of that, if possible. * Otherwise just allocate through H5FD_alloc(). */ if((f->shared->feature_flags & aggr->feature_flag) && f->shared->fs_strategy != H5F_FILE_SPACE_VFD) { @@ -722,6 +722,6 @@ H5MF_free_aggrs(H5F_t *f, hid_t dxpl_id) if(H5MF_aggr_reset(f, dxpl_id, second_aggr) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't reset 'small data' block") done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF_free_aggrs() */ diff --git a/src/H5MFsection.c b/src/H5MFsection.c index d10b6b1..888ce62 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -480,7 +480,7 @@ H5MF_sect_simple_free(H5FS_section_info_t *_sect) */ static herr_t H5MF_sect_simple_valid(const H5FS_section_class_t UNUSED *cls, - const H5FS_section_info_t + const H5FS_section_info_t #ifdef NDEBUG UNUSED #endif /* NDEBUG */ diff --git a/src/H5MM.c b/src/H5MM.c index 14e847b..1de4880 100644 --- a/src/H5MM.c +++ b/src/H5MM.c @@ -112,14 +112,12 @@ H5MM_calloc(size_t size) * Return: Success: Ptr to new memory or NULL if the memory * was freed. * - * Failure: abort() + * Failure: NULL * * Programmer: Robb Matzke * matzke@llnl.gov * Jul 10 1997 * - * Modifications: - * *------------------------------------------------------------------------- */ void * @@ -128,27 +126,24 @@ H5MM_realloc(void *mem, size_t size) void *ret_value; /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MM_realloc); - - if (!mem) { - if (0 == size) - HGOTO_DONE(NULL); - mem = H5MM_malloc(size); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MM_realloc) - } else if (0 == size) { + if(NULL == mem) { + if(0 == size) + mem = NULL; + else + mem = H5MM_malloc(size); + } /* end if */ + else if(0 == size) mem = H5MM_xfree(mem); - - } else { + else mem = HDrealloc(mem, size); - assert(mem); - } /* Set return value */ - ret_value=mem; + ret_value = mem; -done: - FUNC_LEAVE_NOAPI(ret_value); -} + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5MM_realloc() */ /*------------------------------------------------------------------------- diff --git a/src/H5MP.c b/src/H5MP.c index 63a65ae..dd54316 100644 --- a/src/H5MP.c +++ b/src/H5MP.c @@ -87,16 +87,16 @@ H5FL_DEFINE(H5MP_pool_t); *------------------------------------------------------------------------- */ H5MP_pool_t * -H5MP_create (size_t page_size, unsigned flags) +H5MP_create(size_t page_size, unsigned flags) { - H5MP_pool_t *mp; /* New memory pool header */ + H5MP_pool_t *mp = NULL; /* New memory pool header */ H5MP_pool_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI(H5MP_create, NULL) /* Allocate space for the pool header */ - if (NULL==(mp = H5FL_MALLOC(H5MP_pool_t))) - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for memory pool header") + if(NULL == (mp = H5FL_MALLOC(H5MP_pool_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for memory pool header") /* Assign information */ mp->page_size = H5MP_BLOCK_ALIGN(page_size); @@ -108,13 +108,17 @@ H5MP_create (size_t page_size, unsigned flags) mp->max_size = mp->page_size - H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t)); /* Create factory for pool pages */ - if((mp->page_fac=H5FL_fac_init(page_size))==NULL) - HGOTO_ERROR (H5E_RESOURCE, H5E_CANTINIT, NULL, "can't create page factory") + if(NULL == (mp->page_fac = H5FL_fac_init(page_size))) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't create page factory") /* Set return value */ ret_value = mp; done: + if(NULL == ret_value && mp) + if(H5MP_close(mp) < 0) + HDONE_ERROR(H5E_RESOURCE, H5E_CANTFREE, NULL, "unable to free memory pool header") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MP_create() */ @@ -271,7 +275,7 @@ HDfprintf(stderr,"%s: request = %Zu, needed = %Zu\n", FUNC, request, needed); /* Allocate new page */ if(NULL == (alloc_page = H5MP_new_page(mp, page_size))) - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for page") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for page") /* Set the block to allocate from */ alloc_free = alloc_page->free_blk; @@ -343,7 +347,7 @@ done: *------------------------------------------------------------------------- */ void * -H5MP_free (H5MP_pool_t *mp, void *spc) +H5MP_free(H5MP_pool_t *mp, void *spc) { H5MP_page_blk_t *spc_blk; /* Block for space to free */ H5MP_page_t *spc_page; /* Page containing block to free */ @@ -430,7 +434,7 @@ HDfprintf(stderr,"%s: Freeing from page = %p\n", "H5MP_free", spc_page); *------------------------------------------------------------------------- */ herr_t -H5MP_close (H5MP_pool_t *mp) +H5MP_close(H5MP_pool_t *mp) { herr_t ret_value = SUCCEED; /* Return value */ @@ -447,9 +451,9 @@ H5MP_close (H5MP_pool_t *mp) /* Free the page appropriately */ if(page->fac_alloc) - H5FL_FAC_FREE(mp->page_fac,page); + page = H5FL_FAC_FREE(mp->page_fac, page); else - H5MM_xfree(page); + page = H5MM_xfree(page); page = next_page; } /* end while */ @@ -457,13 +461,13 @@ H5MP_close (H5MP_pool_t *mp) /* Release page factory */ if(mp->page_fac) - if(H5FL_fac_term(mp->page_fac)<0) - HGOTO_ERROR (H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't destroy page factory") + if(H5FL_fac_term(mp->page_fac) < 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't destroy page factory") +done: /* Free the memory pool itself */ - (void)H5FL_FREE(H5MP_pool_t, mp); + mp = H5FL_FREE(H5MP_pool_t, mp); -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5MP_close() */ diff --git a/src/H5O.c b/src/H5O.c index 4d8c9c9..508e7c9 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -538,6 +538,48 @@ done: /*------------------------------------------------------------------------- + * Function: H5Oexists_by_name + * + * Purpose: Determine if a linked-to object exists + * + * Return: Success: TRUE/FALSE + * Failure: Negative + * + * Programmer: Quincey Koziol + * February 2 2010 + * + *------------------------------------------------------------------------- + */ +htri_t +H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id) +{ + H5G_loc_t loc; /* Location info */ + hid_t ret_value = FAIL; /* Return value */ + + FUNC_ENTER_API(H5Oexists_by_name, FAIL) + H5TRACE3("t", "i*si", loc_id, name, lapl_id); + + /* Check args */ + if(H5G_loc(loc_id, &loc) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + if(!name || !*name) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") + if(H5P_DEFAULT == lapl_id) + lapl_id = H5P_LINK_ACCESS_DEFAULT; + else + if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS)) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") + + /* Check if the object exists */ + if((ret_value = H5G_loc_exists(&loc, name, lapl_id, H5AC_dxpl_id)) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", name) + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Oexists_by_name() */ + + +/*------------------------------------------------------------------------- * Function: H5Oget_info * * Purpose: Retrieve information about an object. @@ -1134,7 +1176,7 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, hid_t ocpl_id, #if H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T if(size_hint > 4294967295) oh->flags |= H5O_HDR_CHUNK0_8; - else + else #endif /* H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T */ if(size_hint > 65535) oh->flags |= H5O_HDR_CHUNK0_4; diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index 0984cd4..1d9caaa 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -396,13 +396,13 @@ H5O_ainfo_pre_copy_file(H5F_t UNUSED *file_src, const void UNUSED *native_src, * Return: Success: Ptr to _DEST * Failure: NULL * - * Programmer: Peter Cao + * Programmer: Peter Cao * July 18, 2007 * *------------------------------------------------------------------------- */ static void * -H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, +H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, void UNUSED *udata, hid_t dxpl_id) { H5O_ainfo_t *ainfo_src = (H5O_ainfo_t *)mesg_src; @@ -475,7 +475,7 @@ H5O_ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, HDassert(ainfo_src); if(H5F_addr_defined(ainfo_src->fheap_addr)) { - if ( H5A_dense_post_copy_file_all(src_oloc, ainfo_src, dst_oloc, + if ( H5A_dense_post_copy_file_all(src_oloc, ainfo_src, dst_oloc, (H5O_ainfo_t *)mesg_dst, dxpl_id, cpy_info) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute") } diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index dc72799..bcd0749 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -1186,7 +1186,7 @@ H5O_move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u, hid_t dxpl_id) /* Check arguments. */ HDassert(f); HDassert(oh); - + cont_msg = &oh->mesg[cont_u]; H5O_LOAD_NATIVE(f, dxpl_id, 0, oh, cont_msg, FAIL) deleted_chunkno = ((H5O_cont_t *)(cont_msg->native))->chunkno; diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 4d8b17a..35f02a8 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -234,7 +234,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned UNUSED mesg_fl ret_value = attr; done: - if(NULL == ret_value) { + if(NULL == ret_value) if(attr) { if(attr->shared) { /* Free any dynamicly allocated items */ @@ -244,10 +244,9 @@ done: /* Destroy shared attribute struct */ attr->shared = H5FL_FREE(H5A_shared_t, attr->shared); } /* end if */ - } /* end if */ - attr = H5FL_FREE(H5A_t, attr); - } /* end if */ + attr = H5FL_FREE(H5A_t, attr); + } /* end if */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_attr_decode() */ @@ -662,8 +661,8 @@ H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t UNUSED *mesg_type, HDassert(cpy_info); HDassert(!cpy_info->copy_without_attr); - /* Mark datatype as being on disk now. This step used to be done in a lower level - * by H5O_dtype_decode. But it has been moved up. Not an ideal place, but no better + /* Mark datatype as being on disk now. This step used to be done in a lower level + * by H5O_dtype_decode. But it has been moved up. Not an ideal place, but no better * place than here. */ if(H5T_set_loc(((H5A_t *)native_src)->shared->dt, file_src, H5T_LOC_DISK) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location") diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 8bdbed5..da91782 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -661,12 +661,14 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, /* Insert the address mapping for the new object into the copied list */ /* (Do this here, because "post copy" possibly checks it) */ - addr_map->src_addr = oloc_src->addr; + H5F_GET_FILENO(oloc_src->file, addr_map->src_obj_pos.fileno); + addr_map->src_obj_pos.addr = oloc_src->addr; addr_map->dst_addr = oloc_dst->addr; addr_map->is_locked = TRUE; /* We've locked the object currently */ addr_map->inc_ref_count = 0; /* Start with no additional ref counts to add */ - if(H5SL_insert(cpy_info->map_list, addr_map, &(addr_map->src_addr)) < 0) + /* Insert into skip list */ + if(H5SL_insert(cpy_info->map_list, addr_map, &(addr_map->src_obj_pos)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list") /* "post copy" loop over messages, to fix up any messages which require a complete @@ -765,20 +767,27 @@ herr_t H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t dxpl_id, H5O_copy_t *cpy_info, hbool_t inc_depth) { - H5O_addr_map_t *addr_map; /* Address mapping of object copied */ + H5O_addr_map_t *addr_map = NULL; /* Address mapping of object copied */ + H5_obj_t src_obj_pos; /* Position of source object */ hbool_t inc_link; /* Whether to increment the link count for the object */ - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(H5O_copy_header_map, FAIL) /* Sanity check */ HDassert(oloc_src); + HDassert(oloc_src->file); HDassert(oloc_dst); HDassert(oloc_dst->file); HDassert(cpy_info); - /* Look up the address of the object to copy in the skip list */ - addr_map = (H5O_addr_map_t *)H5SL_search(cpy_info->map_list, &(oloc_src->addr)); + /* Create object "position" struct */ + H5F_GET_FILENO(oloc_src->file, src_obj_pos.fileno); + src_obj_pos.addr = oloc_src->addr; + + /* Search for the object in the skip list of copied objects */ + addr_map = (H5O_addr_map_t *)H5SL_search(cpy_info->map_list, + &src_obj_pos); /* Check if address is already in list of objects copied */ if(addr_map == NULL) { @@ -910,7 +919,7 @@ H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, cpy_info.preserve_null = TRUE; /* Create a skip list to keep track of which objects are copied */ - if((cpy_info.map_list = H5SL_create(H5SL_TYPE_HADDR)) == NULL) + if((cpy_info.map_list = H5SL_create(H5SL_TYPE_OBJ)) == NULL) HGOTO_ERROR(H5E_SLIST, H5E_CANTCREATE, FAIL, "cannot make skip list") /* copy the object from the source file to the destination file */ @@ -946,6 +955,7 @@ H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, H5G_name_t new_path; /* Copied object group hier. path */ H5O_loc_t new_oloc; /* Copied object object location */ H5G_loc_t new_loc; /* Group location of object copied */ + H5F_t *cached_dst_file; /* Cached destination file */ hbool_t entry_inserted=FALSE; /* Flag to indicate that the new entry was inserted into a group */ unsigned cpy_option = 0; /* Copy options */ herr_t ret_value = SUCCEED; /* Return value */ @@ -972,10 +982,19 @@ H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, H5G_loc_reset(&new_loc); new_oloc.file = dst_loc->oloc->file; + /* Make a copy of the destination file, in case the original is changed by + * H5O_copy_header. If and when oloc's point to the shared file struct, + * this will no longer be necessary, so this code can be removed. */ + cached_dst_file = dst_loc->oloc->file; + /* Copy the object from the source file to the destination file */ if(H5O_copy_header(src_loc->oloc, &new_oloc, dxpl_id, cpy_option) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + /* Patch dst_loc. Again, this can be removed once oloc's point to shared + * file structs. */ + dst_loc->oloc->file = cached_dst_file; + /* Insert the new object in the destination file's group */ if(H5L_link(dst_loc, dst_name, &new_loc, lcpl_id, H5P_DEFAULT, dxpl_id) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert link") diff --git a/src/H5Odbg.c b/src/H5Odbg.c index b731ce9..9285f4b 100644 --- a/src/H5Odbg.c +++ b/src/H5Odbg.c @@ -280,7 +280,7 @@ herr_t H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth) { size_t mesg_total = 0, chunk_total = 0, gap_total = 0; - unsigned *sequence; + unsigned *sequence = NULL; unsigned i; /* Local index variable */ herr_t ret_value = SUCCEED; @@ -508,12 +508,15 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i else HDfprintf(stream, "%*s\n", indent + 6, ""); } /* end for */ - sequence = (unsigned *)H5MM_xfree(sequence); if((mesg_total + gap_total) != chunk_total) HDfprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n"); done: + /* Release resources */ + if(sequence) + sequence = H5MM_xfree(sequence); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_debug_real() */ diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 0eb4ba2..25cac88 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -262,27 +262,58 @@ H5O_efl_copy(const void *_mesg, void *_dest) /* check args */ HDassert(mesg); if(!dest) { - if(NULL == (dest = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))) || - NULL == (dest->slot = (H5O_efl_entry_t *)H5MM_malloc(mesg->nalloc * sizeof(H5O_efl_entry_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - } else if(dest->nalloc < mesg->nalloc) { - H5MM_xfree(dest->slot); - if(NULL == (dest->slot = (H5O_efl_entry_t *)H5MM_malloc(mesg->nalloc * sizeof(H5O_efl_entry_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - } + if(NULL == (dest = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t)))) + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message") + if(NULL == (dest->slot = (H5O_efl_entry_t *)H5MM_calloc(mesg->nalloc * sizeof(H5O_efl_entry_t)))) + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slots") + } /* end if */ + else if(dest->nalloc < mesg->nalloc) { + H5O_efl_entry_t *temp_slot; /* Temporary pointer to new slot information */ + + /* Allocate new 'slot' information */ + if(NULL == (temp_slot = (H5O_efl_entry_t *)H5MM_calloc(mesg->nalloc * sizeof(H5O_efl_entry_t)))) + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slots") + + /* Release old 'slot' information */ + for(u = 0; u < dest->nused; u++) + dest->slot[u].name = (char *)H5MM_xfree(dest->slot[u].name); + dest->slot = (H5O_efl_entry_t *)H5MM_xfree(dest->slot); + + /* Point to new 'slot' information */ + dest->slot = temp_slot; + } /* end if */ + else { + /* Release old 'slot' information */ + for(u = 0; u < dest->nused; u++) + dest->slot[u].name = (char *)H5MM_xfree(dest->slot[u].name); + } /* end else */ dest->heap_addr = mesg->heap_addr; dest->nalloc = mesg->nalloc; dest->nused = mesg->nused; for(u = 0; u < mesg->nused; u++) { dest->slot[u] = mesg->slot[u]; - dest->slot[u].name = H5MM_xstrdup(mesg->slot[u].name); + if(NULL == (dest->slot[u].name = H5MM_xstrdup(mesg->slot[u].name))) + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slot name") } /* end for */ /* Set return value */ ret_value = dest; done: + if(NULL == ret_value) { + if(dest && NULL == _dest) { + if(dest->slot) { + for(u = 0; u < mesg->nused; u++) { + if(dest->slot[u].name != NULL && dest->slot[u].name != mesg->slot[u].name) + dest->slot[u].name = (char *)H5MM_xfree(dest->slot[u].name); + } /* end for */ + dest->slot = (H5O_efl_entry_t *)H5MM_xfree(dest->slot); + } /* end if */ + dest = (H5O_efl_t *)H5MM_xfree(dest); + } /* end if */ + } /* end if */ + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_efl_copy() */ @@ -353,12 +384,13 @@ H5O_efl_reset(void *_mesg) HDassert(mesg); /* reset */ - for(u = 0; u < mesg->nused; u++) - mesg->slot[u].name = (char *)H5MM_xfree(mesg->slot[u].name); + if(mesg->slot) { + for(u = 0; u < mesg->nused; u++) + mesg->slot[u].name = (char *)H5MM_xfree(mesg->slot[u].name); + mesg->slot = (H5O_efl_entry_t *)H5MM_xfree(mesg->slot); + } /* end if */ mesg->heap_addr = HADDR_UNDEF; mesg->nused = mesg->nalloc = 0; - if(mesg->slot) - mesg->slot = (H5O_efl_entry_t *)H5MM_xfree(mesg->slot); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_efl_reset() */ diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index fb0151f..0e4fe75 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -84,7 +84,7 @@ H5FL_DEFINE_STATIC(H5O_fsinfo_t); *------------------------------------------------------------------------- */ static void * -H5O_fsinfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, +H5O_fsinfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, unsigned UNUSED mesg_flags, unsigned UNUSED *ioflags, const uint8_t *p) { H5O_fsinfo_t *fsinfo = NULL; /* free-space manager info */ diff --git a/src/H5Olink.c b/src/H5Olink.c index 4ddfbf6..7ddb1e9 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -437,6 +437,14 @@ H5O_link_copy(const void *_mesg, void *_dest) ret_value = dest; done: + if(NULL == ret_value) + if(dest) { + if(dest->name && dest->name != lnk->name) + dest->name = H5MM_xfree(dest->name); + if(NULL == _dest) + dest = H5FL_FREE(H5O_link_t ,dest); + } /* end if */ + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_link_copy() */ diff --git a/src/H5Oname.c b/src/H5Oname.c index 5ffa870..01df68c 100644 --- a/src/H5Oname.c +++ b/src/H5Oname.c @@ -185,12 +185,16 @@ H5O_name_copy(const void *_mesg, void *_dest) /* copy */ *dest = *mesg; if(NULL == (dest->s = H5MM_xstrdup(mesg->s))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Set return value */ ret_value = dest; done: + if(NULL == ret_value) + if(dest && NULL == _dest) + dest = H5MM_xfree(dest); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_name_copy() */ diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 3b738a4..0bab7aa 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -25,6 +25,7 @@ /* Other private headers needed by this file */ #include "H5ACprivate.h" /* Metadata cache */ +#include "H5FLprivate.h" /* Free Lists */ /* Object header macros */ #define H5O_NMESGS 8 /*initial number of messages */ @@ -325,7 +326,7 @@ typedef struct H5O_obj_class_t { /* Node in skip list to map addresses from one file to another during object header copy */ typedef struct H5O_addr_map_t { - haddr_t src_addr; /* Address of object in source file */ + H5_obj_t src_obj_pos; /* Location of source object */ haddr_t dst_addr; /* Address of object in destination file */ hbool_t is_locked; /* Indicate that the destination object is locked currently */ hsize_t inc_ref_count; /* Number of deferred increments to reference count */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index d7e4e04..04338e9 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -119,7 +119,10 @@ typedef struct H5O_t H5O_t; /* Fractal heap ID type for shared message & attribute heap IDs. */ -typedef uint64_t H5O_fheap_id_t; +typedef union { + uint8_t id[H5O_FHEAP_ID_LEN]; /* Buffer to hold ID, for encoding/decoding */ + uint64_t val; /* Value, for quick comparisons */ +} H5O_fheap_id_t; /* The object location information for an object */ typedef struct H5O_loc_t { @@ -622,7 +625,7 @@ typedef unsigned H5O_unknown_t; /* Original message type ID */ /* * Free space manager info Message. - * Contains file space management info and + * Contains file space management info and * addresses of free space managers for file memory * (Data structure in memory) */ diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 84fdecc..c5ae3c1 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -148,6 +148,7 @@ H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr); H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); +H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id); H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo); H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id); diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index d7dccbd..231de3b 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -287,9 +287,9 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg) PURPOSE Copies a message from MESG to DEST, allocating DEST if necessary. USAGE - void *H5O_sdspace_copy(mesg, dest) - const void *mesg; IN: Pointer to the source extent dimensionality struct - const void *dest; IN: Pointer to the destination extent dimensionality struct + void *H5O_sdspace_copy(_mesg, _dest) + const void *_mesg; IN: Pointer to the source extent dimensionality struct + const void *_dest; IN: Pointer to the destination extent dimensionality struct RETURNS Pointer to DEST on success, NULL on failure DESCRIPTION @@ -297,27 +297,31 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg) allocating the destination structure if necessary. --------------------------------------------------------------------------*/ static void * -H5O_sdspace_copy(const void *mesg, void *dest) +H5O_sdspace_copy(const void *_mesg, void *_dest) { - const H5S_extent_t *src = (const H5S_extent_t *) mesg; - H5S_extent_t *dst = (H5S_extent_t *) dest; + const H5S_extent_t *mesg = (const H5S_extent_t *)_mesg; + H5S_extent_t *dest = (H5S_extent_t *)_dest; void *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5O_sdspace_copy) /* check args */ - HDassert(src); - if(!dst && NULL == (dst = H5FL_MALLOC(H5S_extent_t))) + HDassert(mesg); + if(!dest && NULL == (dest = H5FL_MALLOC(H5S_extent_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Copy extent information */ - if(H5S_extent_copy(dst, src, TRUE) < 0) + if(H5S_extent_copy(dest, mesg, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent") /* Set return value */ - ret_value = dst; + ret_value = dest; done: + if(NULL == ret_value) + if(dest && NULL != _dest) + dest = H5FL_FREE(H5S_extent_t, dest); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_sdspace_copy() */ diff --git a/src/H5Oshared.c b/src/H5Oshared.c index fd7cc8b..cdd9778 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -731,7 +731,7 @@ H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth) "SOHM"); HDfprintf(stream, "%*s%-*s %016llx\n", indent, "", fwidth, "Heap ID:", - (unsigned long long)mesg->u.heap_id); + (unsigned long long)mesg->u.heap_id.val); break; case H5O_SHARE_TYPE_HERE: diff --git a/src/H5P.c b/src/H5P.c index 212b308..2e69461 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -217,7 +217,7 @@ H5Pcreate_class(hid_t parent, const char *name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't retrieve parent class") /* Create the new property list class */ - if(NULL == (pclass = H5P_create_class(par_class, name, 0, cls_create, create_data, cls_copy, copy_data, cls_close, close_data))) + if(NULL == (pclass = H5P_create_class(par_class, name, FALSE, cls_create, create_data, cls_copy, copy_data, cls_close, close_data))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list class") /* Get an atom for the class */ @@ -437,27 +437,43 @@ H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value, H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close) { - H5P_genclass_t *pclass; /* Property list class to modify */ - herr_t ret_value; /* return value */ + H5P_genclass_t *pclass; /* Property list class to modify */ + H5P_genclass_t *orig_pclass; /* Original property class */ + herr_t ret_value; /* Return value */ - FUNC_ENTER_API(H5Pregister2, FAIL); + FUNC_ENTER_API(H5Pregister2, FAIL) H5TRACE11("e", "i*sz*xxxxxxxx", cls_id, name, size, def_value, prp_create, prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close); /* Check arguments. */ if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(cls_id, H5I_GENPROP_CLS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class") if(!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid class name"); - if(size>0 && def_value==NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid class name") + if(size > 0 && def_value == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default") /* Create the new property list class */ - if((ret_value = H5P_register(pclass,name,size,def_value,prp_create,prp_set,prp_get,prp_delete,prp_copy,prp_cmp,prp_close)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in class"); + orig_pclass = pclass; + if((ret_value = H5P_register(&pclass, name, size, def_value, prp_create, prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in class") + + /* Check if the property class changed and needs to be substituted in the ID */ + if(pclass != orig_pclass) { + H5P_genclass_t *old_pclass; /* Old property class */ + + /* Substitute the new property class in the ID */ + if(NULL == (old_pclass = (H5P_genclass_t *)H5I_subst(cls_id, pclass))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID") + HDassert(old_pclass == orig_pclass); + + /* Close the previous class */ + if(H5P_close_class(orig_pclass) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "unable to close original property class after substitution") + } /* end if */ done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value) } /* H5Pregister2() */ @@ -1259,36 +1275,38 @@ done: herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name) { - void *src_obj, *dst_obj; /* Property objects to copy between */ - herr_t ret_value=SUCCEED; /* return value */ + H5I_type_t src_id_type, dst_id_type; /* ID types */ + herr_t ret_value = SUCCEED; /* return value */ - FUNC_ENTER_API(H5Pcopy_prop, FAIL); + FUNC_ENTER_API(H5Pcopy_prop, FAIL) H5TRACE3("e", "ii*s", dst_id, src_id, name); /* Check arguments. */ - if((H5I_GENPROP_LST != H5I_get_type(src_id) && H5I_GENPROP_CLS != H5I_get_type(src_id)) - || (H5I_GENPROP_LST != H5I_get_type(dst_id) && H5I_GENPROP_CLS != H5I_get_type(dst_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property objects"); - if(H5I_get_type(src_id) != H5I_get_type(dst_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not the same kind of property objects"); + if((src_id_type = H5I_get_type(src_id)) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid source ID") + if((dst_id_type = H5I_get_type(dst_id)) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid destination ID") + if((H5I_GENPROP_LST != src_id_type && H5I_GENPROP_CLS != src_id_type) + || (H5I_GENPROP_LST != dst_id_type && H5I_GENPROP_CLS != dst_id_type)) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property objects") + if(src_id_type != dst_id_type) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not the same kind of property objects") if(!name || !*name) - HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "no name given"); - if(NULL == (src_obj = H5I_object(src_id)) || NULL == (dst_obj = H5I_object(dst_id))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist"); + HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") /* Compare property lists */ - if(H5I_GENPROP_LST == H5I_get_type(src_id)) { + if(H5I_GENPROP_LST == src_id_type) { if(H5P_copy_prop_plist(dst_id, src_id, name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between lists"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between lists") } /* end if */ /* Must be property classes */ else { - if(H5P_copy_prop_pclass((H5P_genclass_t *)dst_obj, (H5P_genclass_t *)src_obj, name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between classes"); + if(H5P_copy_prop_pclass(dst_id, src_id, name) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between classes") } /* end else */ done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value) } /* H5Pcopy_prop() */ diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index db66366..356c42d 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -129,15 +129,15 @@ H5P_dacc_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI_NOINIT(H5P_dacc_reg_prop) /* Register the size of raw data chunk cache (elements) */ - if(H5P_register(pclass, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, H5D_ACS_DATA_CACHE_NUM_SLOTS_SIZE, &rdcc_nslots, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, H5D_ACS_DATA_CACHE_NUM_SLOTS_SIZE, &rdcc_nslots, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the size of raw data chunk cache(bytes) */ - if(H5P_register(pclass, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, H5D_ACS_DATA_CACHE_BYTE_SIZE_SIZE, &rdcc_nbytes, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, H5D_ACS_DATA_CACHE_BYTE_SIZE_SIZE, &rdcc_nbytes, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the preemption for reading chunks */ - if(H5P_register(pclass, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, H5D_ACS_PREEMPT_READ_CHUNKS_SIZE, &rdcc_w0, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, H5D_ACS_PREEMPT_READ_CHUNKS_SIZE, &rdcc_w0, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index f62d47c..0f16fd3 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -36,8 +36,9 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5Dpkg.h" /* Datasets */ +#include "H5Dpkg.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Ppkg.h" /* Property lists */ @@ -185,19 +186,19 @@ H5P_dcrt_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI_NOINIT(H5P_dcrt_reg_prop) /* Register the storage layout property */ - if(H5P_register(pclass, H5D_CRT_LAYOUT_NAME, H5D_CRT_LAYOUT_SIZE, &layout, NULL, NULL, NULL, NULL, NULL, H5D_CRT_LAYOUT_CMP, NULL) < 0) + if(H5P_register_real(pclass, H5D_CRT_LAYOUT_NAME, H5D_CRT_LAYOUT_SIZE, &layout, NULL, NULL, NULL, NULL, NULL, H5D_CRT_LAYOUT_CMP, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the fill value property */ - if(H5P_register(pclass, H5D_CRT_FILL_VALUE_NAME, H5D_CRT_FILL_VALUE_SIZE, &fill, NULL, NULL, NULL, NULL, NULL, H5D_CRT_FILL_VALUE_CMP, NULL) < 0) + if(H5P_register_real(pclass, H5D_CRT_FILL_VALUE_NAME, H5D_CRT_FILL_VALUE_SIZE, &fill, NULL, NULL, NULL, NULL, NULL, H5D_CRT_FILL_VALUE_CMP, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the space allocation time state property */ - if(H5P_register(pclass, H5D_CRT_ALLOC_TIME_STATE_NAME, H5D_CRT_ALLOC_TIME_STATE_SIZE, &alloc_time_state, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_CRT_ALLOC_TIME_STATE_NAME, H5D_CRT_ALLOC_TIME_STATE_SIZE, &alloc_time_state, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the external file list property */ - if(H5P_register(pclass, H5D_CRT_EXT_FILE_LIST_NAME, H5D_CRT_EXT_FILE_LIST_SIZE, &efl, NULL, NULL, NULL, NULL, NULL, H5D_CRT_EXT_FILE_LIST_CMP, NULL) < 0) + if(H5P_register_real(pclass, H5D_CRT_EXT_FILE_LIST_NAME, H5D_CRT_EXT_FILE_LIST_SIZE, &efl, NULL, NULL, NULL, NULL, NULL, H5D_CRT_EXT_FILE_LIST_CMP, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c index 5c72247..1528df5 100644 --- a/src/H5Pdeprec.c +++ b/src/H5Pdeprec.c @@ -249,8 +249,9 @@ H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close) { - H5P_genclass_t *pclass; /* Property list class to modify */ - herr_t ret_value; /* return value */ + H5P_genclass_t *pclass; /* Property list class to modify */ + H5P_genclass_t *orig_pclass; /* Original property class */ + herr_t ret_value; /* Return value */ FUNC_ENTER_API(H5Pregister1, FAIL); H5TRACE10("e", "i*sz*xxxxxxx", cls_id, name, size, def_value, prp_create, @@ -265,9 +266,24 @@ H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default"); /* Create the new property list class */ - if((ret_value = H5P_register(pclass, name, size, def_value, prp_create, prp_set, prp_get, prp_delete, prp_copy, NULL, prp_close)) < 0) + orig_pclass = pclass; + if((ret_value = H5P_register(&pclass, name, size, def_value, prp_create, prp_set, prp_get, prp_delete, prp_copy, NULL, prp_close)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in class"); + /* Check if the property class changed and needs to be substituted in the ID */ + if(pclass != orig_pclass) { + H5P_genclass_t *old_pclass; /* Old property class */ + + /* Substitute the new property class in the ID */ + if(NULL == (old_pclass = (H5P_genclass_t *)H5I_subst(cls_id, pclass))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID") + HDassert(old_pclass == orig_pclass); + + /* Close the previous class */ + if(H5P_close_class(orig_pclass) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "unable to close original property class after substitution") + } /* end if */ + done: FUNC_LEAVE_API(ret_value); } /* H5Pregister1() */ diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index aab8b57..1186868 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -210,81 +210,81 @@ H5P_dxfr_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI_NOINIT(H5P_dxfr_reg_prop) /* Register the max. temp buffer size property */ - if(H5P_register(pclass, H5D_XFER_MAX_TEMP_BUF_NAME, H5D_XFER_MAX_TEMP_BUF_SIZE, &def_max_temp_buf, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_MAX_TEMP_BUF_NAME, H5D_XFER_MAX_TEMP_BUF_SIZE, &def_max_temp_buf, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the type conversion buffer property */ - if(H5P_register(pclass, H5D_XFER_TCONV_BUF_NAME, H5D_XFER_TCONV_BUF_SIZE, &def_tconv_buf, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_TCONV_BUF_NAME, H5D_XFER_TCONV_BUF_SIZE, &def_tconv_buf, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the background buffer property */ - if(H5P_register(pclass, H5D_XFER_BKGR_BUF_NAME, H5D_XFER_BKGR_BUF_SIZE, &def_bkgr_buf, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_BKGR_BUF_NAME, H5D_XFER_BKGR_BUF_SIZE, &def_bkgr_buf, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the background buffer type property */ - if(H5P_register(pclass, H5D_XFER_BKGR_BUF_TYPE_NAME, H5D_XFER_BKGR_BUF_TYPE_SIZE, &def_bkgr_buf_type, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_BKGR_BUF_TYPE_NAME, H5D_XFER_BKGR_BUF_TYPE_SIZE, &def_bkgr_buf_type, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the B-Tree node splitting ratios property */ - if(H5P_register(pclass, H5D_XFER_BTREE_SPLIT_RATIO_NAME, H5D_XFER_BTREE_SPLIT_RATIO_SIZE, def_btree_split_ratio, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_BTREE_SPLIT_RATIO_NAME, H5D_XFER_BTREE_SPLIT_RATIO_SIZE, def_btree_split_ratio, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vlen allocation function property */ - if(H5P_register(pclass, H5D_XFER_VLEN_ALLOC_NAME, H5D_XFER_VLEN_ALLOC_SIZE, &def_vlen_alloc, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_VLEN_ALLOC_NAME, H5D_XFER_VLEN_ALLOC_SIZE, &def_vlen_alloc, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vlen allocation information property */ - if(H5P_register(pclass, H5D_XFER_VLEN_ALLOC_INFO_NAME, H5D_XFER_VLEN_ALLOC_INFO_SIZE, &def_vlen_alloc_info, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_VLEN_ALLOC_INFO_NAME, H5D_XFER_VLEN_ALLOC_INFO_SIZE, &def_vlen_alloc_info, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vlen free function property */ - if(H5P_register(pclass, H5D_XFER_VLEN_FREE_NAME, H5D_XFER_VLEN_FREE_SIZE, &def_vlen_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_VLEN_FREE_NAME, H5D_XFER_VLEN_FREE_SIZE, &def_vlen_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vlen free information property */ - if(H5P_register(pclass, H5D_XFER_VLEN_FREE_INFO_NAME, H5D_XFER_VLEN_FREE_INFO_SIZE, &def_vlen_free_info, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_VLEN_FREE_INFO_NAME, H5D_XFER_VLEN_FREE_INFO_SIZE, &def_vlen_free_info, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the file driver ID property */ - if(H5P_register(pclass, H5D_XFER_VFL_ID_NAME, H5D_XFER_VFL_ID_SIZE, &def_vfl_id, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_VFL_ID_NAME, H5D_XFER_VFL_ID_SIZE, &def_vfl_id, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the file driver info property */ - if(H5P_register(pclass, H5D_XFER_VFL_INFO_NAME, H5D_XFER_VFL_INFO_SIZE, &def_vfl_info, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_VFL_INFO_NAME, H5D_XFER_VFL_INFO_SIZE, &def_vfl_info, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the vector size property */ - if(H5P_register(pclass, H5D_XFER_HYPER_VECTOR_SIZE_NAME, H5D_XFER_HYPER_VECTOR_SIZE_SIZE, &def_hyp_vec_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_HYPER_VECTOR_SIZE_NAME, H5D_XFER_HYPER_VECTOR_SIZE_SIZE, &def_hyp_vec_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") #ifdef H5_HAVE_PARALLEL /* Register the I/O transfer mode property */ - if(H5P_register(pclass, H5D_XFER_IO_XFER_MODE_NAME, H5D_XFER_IO_XFER_MODE_SIZE, &def_io_xfer_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_IO_XFER_MODE_NAME, H5D_XFER_IO_XFER_MODE_SIZE, &def_io_xfer_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P_register(pclass, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, H5D_XFER_MPIO_COLLECTIVE_OPT_SIZE, &def_mpio_collective_opt_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, H5D_XFER_MPIO_COLLECTIVE_OPT_SIZE, &def_mpio_collective_opt_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P_register(pclass, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME, H5D_XFER_MPIO_CHUNK_OPT_HARD_SIZE, &def_mpio_chunk_opt_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME, H5D_XFER_MPIO_CHUNK_OPT_HARD_SIZE, &def_mpio_chunk_opt_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P_register(pclass, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME, H5D_XFER_MPIO_CHUNK_OPT_NUM_SIZE, &def_mpio_chunk_opt_num, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME, H5D_XFER_MPIO_CHUNK_OPT_NUM_SIZE, &def_mpio_chunk_opt_num, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P_register(pclass, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE, &def_mpio_chunk_opt_ratio, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE, &def_mpio_chunk_opt_ratio, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") #endif /* H5_HAVE_PARALLEL */ /* Register the EDC property */ - if(H5P_register(pclass, H5D_XFER_EDC_NAME, H5D_XFER_EDC_SIZE, &enable_edc, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_EDC_NAME, H5D_XFER_EDC_SIZE, &enable_edc, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the filter callback property */ - if(H5P_register(pclass, H5D_XFER_FILTER_CB_NAME, H5D_XFER_FILTER_CB_SIZE, &filter_cb, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_FILTER_CB_NAME, H5D_XFER_FILTER_CB_SIZE, &filter_cb, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the type conversion callback property */ - if(H5P_register(pclass, H5D_XFER_CONV_CB_NAME, H5D_XFER_CONV_CB_SIZE, &conv_cb, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5D_XFER_CONV_CB_NAME, H5D_XFER_CONV_CB_SIZE, &conv_cb, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the data transform property */ - if(H5P_register(pclass, H5D_XFER_XFORM_NAME, H5D_XFER_XFORM_SIZE, &def_xfer_xform, NULL, NULL, NULL, H5D_XFER_XFORM_DEL, H5D_XFER_XFORM_COPY, NULL, H5D_XFER_XFORM_CLOSE) < 0) + if(H5P_register_real(pclass, H5D_XFER_XFORM_NAME, H5D_XFER_XFORM_SIZE, &def_xfer_xform, NULL, NULL, NULL, H5D_XFER_XFORM_DEL, H5D_XFER_XFORM_COPY, NULL, H5D_XFER_XFORM_CLOSE) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 5d73afe..07b66e7 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -34,6 +34,7 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ @@ -215,80 +216,80 @@ H5P_facc_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI_NOINIT(H5P_facc_reg_prop) /* Register the initial metadata cache resize configuration */ - if(H5P_register(pclass, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, H5F_ACS_META_CACHE_INIT_CONFIG_SIZE, &mdc_initCacheCfg, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, H5F_ACS_META_CACHE_INIT_CONFIG_SIZE, &mdc_initCacheCfg, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the size of raw data chunk cache (elements) */ - if(H5P_register(pclass, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, H5F_ACS_DATA_CACHE_NUM_SLOTS_SIZE, &rdcc_nslots, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, H5F_ACS_DATA_CACHE_NUM_SLOTS_SIZE, &rdcc_nslots, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the size of raw data chunk cache(bytes) */ - if(H5P_register(pclass, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, H5F_ACS_DATA_CACHE_BYTE_SIZE_SIZE, &rdcc_nbytes, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, H5F_ACS_DATA_CACHE_BYTE_SIZE_SIZE, &rdcc_nbytes, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the preemption for reading chunks */ - if(H5P_register(pclass, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, H5F_ACS_PREEMPT_READ_CHUNKS_SIZE, &rdcc_w0, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, H5F_ACS_PREEMPT_READ_CHUNKS_SIZE, &rdcc_w0, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the threshold for alignment */ - if(H5P_register(pclass, H5F_ACS_ALIGN_THRHD_NAME, H5F_ACS_ALIGN_THRHD_SIZE, &threshold, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_ALIGN_THRHD_NAME, H5F_ACS_ALIGN_THRHD_SIZE, &threshold, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the alignment */ - if(H5P_register(pclass, H5F_ACS_ALIGN_NAME, H5F_ACS_ALIGN_SIZE, &alignment, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_ALIGN_NAME, H5F_ACS_ALIGN_SIZE, &alignment, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the minimum metadata allocation block size */ - if(H5P_register(pclass, H5F_ACS_META_BLOCK_SIZE_NAME, H5F_ACS_META_BLOCK_SIZE_SIZE, &meta_block_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_META_BLOCK_SIZE_NAME, H5F_ACS_META_BLOCK_SIZE_SIZE, &meta_block_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the maximum sieve buffer size */ - if(H5P_register(pclass, H5F_ACS_SIEVE_BUF_SIZE_NAME, H5F_ACS_SIEVE_BUF_SIZE_SIZE, &sieve_buf_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_SIEVE_BUF_SIZE_NAME, H5F_ACS_SIEVE_BUF_SIZE_SIZE, &sieve_buf_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the minimum "small data" allocation block size */ - if(H5P_register(pclass, H5F_ACS_SDATA_BLOCK_SIZE_NAME, H5F_ACS_SDATA_BLOCK_SIZE_SIZE, &sdata_block_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_SDATA_BLOCK_SIZE_NAME, H5F_ACS_SDATA_BLOCK_SIZE_SIZE, &sdata_block_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the garbage collection reference */ - if(H5P_register(pclass, H5F_ACS_GARBG_COLCT_REF_NAME, H5F_ACS_GARBG_COLCT_REF_SIZE, &gc_ref, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_GARBG_COLCT_REF_NAME, H5F_ACS_GARBG_COLCT_REF_SIZE, &gc_ref, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the file driver ID */ - if(H5P_register(pclass, H5F_ACS_FILE_DRV_ID_NAME, H5F_ACS_FILE_DRV_ID_SIZE, &driver_id, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_FILE_DRV_ID_NAME, H5F_ACS_FILE_DRV_ID_SIZE, &driver_id, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the file driver info */ - if(H5P_register(pclass, H5F_ACS_FILE_DRV_INFO_NAME, H5F_ACS_FILE_DRV_INFO_SIZE, &driver_info, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_FILE_DRV_INFO_NAME, H5F_ACS_FILE_DRV_INFO_SIZE, &driver_info, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the file close degree */ - if(H5P_register(pclass, H5F_ACS_CLOSE_DEGREE_NAME, H5F_CLOSE_DEGREE_SIZE, &close_degree, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_CLOSE_DEGREE_NAME, H5F_CLOSE_DEGREE_SIZE, &close_degree, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the offset of family driver info */ - if(H5P_register(pclass, H5F_ACS_FAMILY_OFFSET_NAME, H5F_ACS_FAMILY_OFFSET_SIZE, &family_offset, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_FAMILY_OFFSET_NAME, H5F_ACS_FAMILY_OFFSET_SIZE, &family_offset, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the private property of new family file size. It's used by h5repart only. */ - if(H5P_register(pclass, H5F_ACS_FAMILY_NEWSIZE_NAME, H5F_ACS_FAMILY_NEWSIZE_SIZE, &family_newsize, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_FAMILY_NEWSIZE_NAME, H5F_ACS_FAMILY_NEWSIZE_SIZE, &family_newsize, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the private property of whether convert family to sec2 driver. It's used by h5repart only. */ - if(H5P_register(pclass, H5F_ACS_FAMILY_TO_SEC2_NAME, H5F_ACS_FAMILY_TO_SEC2_SIZE, &family_to_sec2, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_FAMILY_TO_SEC2_NAME, H5F_ACS_FAMILY_TO_SEC2_SIZE, &family_to_sec2, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the data type of multi driver info */ - if(H5P_register(pclass, H5F_ACS_MULTI_TYPE_NAME, H5F_ACS_MULTI_TYPE_SIZE, &mem_type, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_MULTI_TYPE_NAME, H5F_ACS_MULTI_TYPE_SIZE, &mem_type, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the 'use the latest version of the format' flag */ - if(H5P_register(pclass, H5F_ACS_LATEST_FORMAT_NAME, H5F_ACS_LATEST_FORMAT_SIZE, &latest_format, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_LATEST_FORMAT_NAME, H5F_ACS_LATEST_FORMAT_SIZE, &latest_format, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the private property of whether to retrieve the file descriptor from the core VFD */ /* (used internally to the library only) */ - if(H5P_register(pclass, H5F_ACS_WANT_POSIX_FD_NAME, H5F_ACS_WANT_POSIX_FD_SIZE, &want_posix_fd, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_ACS_WANT_POSIX_FD_NAME, H5F_ACS_WANT_POSIX_FD_SIZE, &want_posix_fd, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c index cb3bccd..a0f2f89 100644 --- a/src/H5Pfcpl.c +++ b/src/H5Pfcpl.c @@ -162,49 +162,49 @@ H5P_fcrt_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI_NOINIT(H5P_fcrt_reg_prop) /* Register the user block size */ - if(H5P_register(pclass, H5F_CRT_USER_BLOCK_NAME, H5F_CRT_USER_BLOCK_SIZE, &userblock_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_CRT_USER_BLOCK_NAME, H5F_CRT_USER_BLOCK_SIZE, &userblock_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the 1/2 rank for symbol table leaf nodes */ - if(H5P_register(pclass, H5F_CRT_SYM_LEAF_NAME, H5F_CRT_SYM_LEAF_SIZE, &sym_leaf_k, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_CRT_SYM_LEAF_NAME, H5F_CRT_SYM_LEAF_SIZE, &sym_leaf_k, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the 1/2 rank for btree internal nodes */ - if(H5P_register(pclass, H5F_CRT_BTREE_RANK_NAME, H5F_CRT_BTREE_RANK_SIZE, btree_k, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_CRT_BTREE_RANK_NAME, H5F_CRT_BTREE_RANK_SIZE, btree_k, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the byte number for an address */ - if(H5P_register(pclass, H5F_CRT_ADDR_BYTE_NUM_NAME, H5F_CRT_ADDR_BYTE_NUM_SIZE, &sizeof_addr, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_CRT_ADDR_BYTE_NUM_NAME, H5F_CRT_ADDR_BYTE_NUM_SIZE, &sizeof_addr, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the byte number for object size */ - if(H5P_register(pclass, H5F_CRT_OBJ_BYTE_NUM_NAME, H5F_CRT_OBJ_BYTE_NUM_SIZE, &sizeof_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_CRT_OBJ_BYTE_NUM_NAME, H5F_CRT_OBJ_BYTE_NUM_SIZE, &sizeof_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the superblock version number */ - if(H5P_register(pclass, H5F_CRT_SUPER_VERS_NAME, H5F_CRT_SUPER_VERS_SIZE, &superblock_ver, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_CRT_SUPER_VERS_NAME, H5F_CRT_SUPER_VERS_SIZE, &superblock_ver, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the shared OH message information */ - if(H5P_register(pclass,H5F_CRT_SHMSG_NINDEXES_NAME, H5F_CRT_SHMSG_NINDEXES_SIZE, &num_sohm_indexes,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) + if(H5P_register_real(pclass,H5F_CRT_SHMSG_NINDEXES_NAME, H5F_CRT_SHMSG_NINDEXES_SIZE, &num_sohm_indexes,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P_register(pclass,H5F_CRT_SHMSG_INDEX_TYPES_NAME, H5F_CRT_SHMSG_INDEX_TYPES_SIZE, &sohm_index_flags,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) + if(H5P_register_real(pclass,H5F_CRT_SHMSG_INDEX_TYPES_NAME, H5F_CRT_SHMSG_INDEX_TYPES_SIZE, &sohm_index_flags,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P_register(pclass,H5F_CRT_SHMSG_INDEX_MINSIZE_NAME, H5F_CRT_SHMSG_INDEX_MINSIZE_SIZE, &sohm_index_minsizes,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) + if(H5P_register_real(pclass,H5F_CRT_SHMSG_INDEX_MINSIZE_NAME, H5F_CRT_SHMSG_INDEX_MINSIZE_SIZE, &sohm_index_minsizes,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the shared OH cutoff size information */ - if(H5P_register(pclass,H5F_CRT_SHMSG_LIST_MAX_NAME, H5F_CRT_SHMSG_LIST_MAX_SIZE, &sohm_list_max,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) + if(H5P_register_real(pclass,H5F_CRT_SHMSG_LIST_MAX_NAME, H5F_CRT_SHMSG_LIST_MAX_SIZE, &sohm_list_max,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - if(H5P_register(pclass,H5F_CRT_SHMSG_BTREE_MIN_NAME, H5F_CRT_SHMSG_BTREE_MIN_SIZE, &sohm_btree_min,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) + if(H5P_register_real(pclass,H5F_CRT_SHMSG_BTREE_MIN_NAME, H5F_CRT_SHMSG_BTREE_MIN_SIZE, &sohm_btree_min,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the file space handling strategy */ - if(H5P_register(pclass, H5F_CRT_FILE_SPACE_STRATEGY_NAME, H5F_CRT_FILE_SPACE_STRATEGY_SIZE, &file_space_strategy, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_CRT_FILE_SPACE_STRATEGY_NAME, H5F_CRT_FILE_SPACE_STRATEGY_SIZE, &file_space_strategy, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the free space section threshold */ - if(H5P_register(pclass, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, H5F_CRT_FREE_SPACE_THRESHOLD_SIZE, &free_space_threshold, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, H5F_CRT_FREE_SPACE_THRESHOLD_SIZE, &free_space_threshold, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c index ab405ca..43c6055 100644 --- a/src/H5Pfmpl.c +++ b/src/H5Pfmpl.c @@ -113,7 +113,7 @@ H5P_fmnt_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI_NOINIT(H5P_fmnt_reg_prop) /* Register property of whether symlinks is local to file */ - if(H5P_register(pclass, H5F_MNT_SYM_LOCAL_NAME, H5F_MNT_SYM_LOCAL_SIZE, &local, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5F_MNT_SYM_LOCAL_NAME, H5F_MNT_SYM_LOCAL_SIZE, &local, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c index 913c5f1..72784eb 100644 --- a/src/H5Pgcpl.c +++ b/src/H5Pgcpl.c @@ -113,13 +113,11 @@ H5P_gcrt_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI_NOINIT(H5P_gcrt_reg_prop) /* Register group info property */ - if(H5P_register(pclass, H5G_CRT_GROUP_INFO_NAME, H5G_CRT_GROUP_INFO_SIZE, - &ginfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5G_CRT_GROUP_INFO_NAME, H5G_CRT_GROUP_INFO_SIZE, &ginfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register link info property */ - if(H5P_register(pclass, H5G_CRT_LINK_INFO_NAME, H5G_CRT_LINK_INFO_SIZE, - &linfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5G_CRT_LINK_INFO_NAME, H5G_CRT_LINK_INFO_SIZE, &linfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Pint.c b/src/H5Pint.c index 7111cba..46a4ee3 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -265,29 +265,29 @@ H5P_do_prop_cb1(H5SL_t *slist, H5P_genprop_t *prop, H5P_prp_cb1_t cb) H5P_genprop_t *pcopy=NULL; /* Copy of property to insert into skip list */ herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_do_prop_cb1); + FUNC_ENTER_NOAPI_NOINIT(H5P_do_prop_cb1) /* Allocate space for a temporary copy of the property value */ if(NULL == (tmp_value = H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for temporary property value"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for temporary property value") HDmemcpy(tmp_value,prop->value,prop->size); /* Call "type 1" callback ('create', 'copy' or 'close') */ if(cb(prop->name,prop->size,tmp_value) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINIT, FAIL,"Property callback failed"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL,"Property callback failed") /* Check if the property value changed */ if((prop->cmp)(tmp_value,prop->value,prop->size)) { /* Make a copy of the class's property */ if((pcopy=H5P_dup_prop(prop,H5P_PROP_WITHIN_LIST)) == NULL) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property") /* Copy the changed value into the new property */ HDmemcpy(pcopy->value,tmp_value,prop->size); /* Insert the changed property into the property list */ if(H5P_add_prop(slist,pcopy) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into skip list"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into skip list") } /* end if */ done: @@ -301,7 +301,7 @@ done: H5P_free_prop(pcopy); } /* end if */ - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_do_prop_cb1() */ @@ -451,7 +451,7 @@ H5P_term_interface(void) int nclass=0; int n=0; - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_term_interface); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_term_interface) if(H5_interface_initialize_g) { /* Destroy HDF5 library property classes & lists */ @@ -520,7 +520,7 @@ H5P_term_interface(void) H5_interface_initialize_g = 0; } } - FUNC_LEAVE_NOAPI(n); + FUNC_LEAVE_NOAPI(n) } @@ -551,9 +551,9 @@ H5P_copy_pclass(H5P_genclass_t *pclass) H5P_genprop_t *pcopy; /* Copy of property to insert into class */ H5P_genclass_t *ret_value=NULL; /* return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_copy_pclass); + FUNC_ENTER_NOAPI_NOINIT(H5P_copy_pclass) - assert(pclass); + HDassert(pclass); /* * Create new property class object @@ -561,7 +561,7 @@ H5P_copy_pclass(H5P_genclass_t *pclass) /* Create the new property list class */ if(NULL==(new_pclass=H5P_create_class(pclass->parent, pclass->name, 0, pclass->create_func, pclass->create_data, pclass->copy_func, pclass->copy_data, pclass->close_func, pclass->close_data))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "unable to create property list class"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "unable to create property list class") /* Copy the properties registered for this class */ if(pclass->nprops>0) { @@ -572,11 +572,11 @@ H5P_copy_pclass(H5P_genclass_t *pclass) while(curr_node!=NULL) { /* Make a copy of the class's property */ if(NULL == (pcopy = H5P_dup_prop((H5P_genprop_t *)H5SL_item(curr_node), H5P_PROP_WITHIN_CLASS))) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCOPY, NULL,"Can't copy property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL,"Can't copy property") /* Insert the initialized property into the property list */ if(H5P_add_prop(new_pclass->props,pcopy) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, NULL,"Can't insert property into class"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, NULL,"Can't insert property into class") /* Increment property count for class */ new_pclass->nprops++; @@ -593,7 +593,7 @@ done: if(ret_value==NULL && new_pclass) H5P_close_class(new_pclass); - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_copy_pclass() */ @@ -632,9 +632,9 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) hbool_t has_parent_class; /* Flag to indicate that this property list's class has a parent */ hid_t ret_value=FAIL; /* return value */ - FUNC_ENTER_NOAPI(H5P_copy_plist, FAIL); + FUNC_ENTER_NOAPI(H5P_copy_plist, FAIL) - assert(old_plist); + HDassert(old_plist); /* * Create new property list object @@ -642,20 +642,20 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) /* Allocate room for the property list */ if(NULL==(new_plist = H5FL_CALLOC(H5P_genplist_t))) - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,"memory allocation failed"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,"memory allocation failed") /* Set class state */ new_plist->pclass = old_plist->pclass; new_plist->nprops = 0; /* Initially the plist has the same number of properties as the class */ - new_plist->class_init = 0; /* Initially, wait until the class callback finishes to set */ + new_plist->class_init = FALSE; /* Initially, wait until the class callback finishes to set */ /* Initialize the skip list to hold the changed properties */ if((new_plist->props = H5SL_create(H5SL_TYPE_STR)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for changed properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for changed properties") /* Create the skip list for deleted properties */ if((new_plist->del = H5SL_create(H5SL_TYPE_STR)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for deleted properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for deleted properties") /* Create the skip list to hold names of properties already seen * (This prevents a property in the class hierarchy from having it's @@ -663,7 +663,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) * already been seen) */ if((seen = H5SL_create(H5SL_TYPE_STR))== NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties") nseen = 0; /* Cycle through the deleted properties & copy them into the new list's deleted section */ @@ -674,15 +674,15 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) /* Duplicate string for insertion into new deleted property skip list */ if((new_name=H5MM_xstrdup((char *)H5SL_item(curr_node))) == NULL) - HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,FAIL,"memory allocation failed"); + HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,FAIL,"memory allocation failed") /* Insert property name into deleted list */ if(H5SL_insert(new_plist->del,new_name,new_name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into deleted skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into deleted skip list") /* Add property name to "seen" list */ if(H5SL_insert(seen,new_name,new_name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list") nseen++; /* Get the next property node in the skip list */ @@ -705,19 +705,19 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) if(new_prop->copy) { if((new_prop->copy)(new_prop->name,new_prop->size,new_prop->value) < 0) { H5P_free_prop(new_prop); - HGOTO_ERROR (H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property") } /* end if */ } /* end if */ /* Insert the initialized property into the property list */ if(H5P_add_prop(new_plist->props,new_prop) < 0) { H5P_free_prop(new_prop); - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into list"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into list") } /* end if */ /* Add property name to "seen" list */ if(H5SL_insert(seen,new_prop->name,new_prop->name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list") nseen++; /* Increment the number of properties in list */ @@ -748,13 +748,13 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) if(tmp->copy) { /* Call the callback & insert changed value into skip list (if necessary) */ if(H5P_do_prop_cb1(new_plist->props,tmp,tmp->copy) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't create property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't create property") } /* end if */ /* Add property name to "seen" list, if we have other classes to work on */ if(has_parent_class) { if(H5SL_insert(seen,tmp->name,tmp->name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list") nseen++; } /* end if */ @@ -772,12 +772,12 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) } /* end while */ /* Increment the number of property lists derived from class */ - if(H5P_access_class(new_plist->pclass,H5P_MOD_INC_LST) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINIT, FAIL,"Can't increment class ref count"); + if(H5P_access_class(new_plist->pclass, H5P_MOD_INC_LST) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Can't increment class ref count") /* Get an atom for the property list */ if((new_plist_id = H5I_register(H5I_GENPROP_LST, new_plist, app_ref)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list") /* Save the property list ID in the property list struct, for use in the property class's 'close' callback */ new_plist->plist_id=new_plist_id; @@ -800,7 +800,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) } /* end while */ /* Set the class initialization flag */ - new_plist->class_init=1; + new_plist->class_init = TRUE; /* Set the return value */ ret_value=new_plist_id; @@ -813,7 +813,7 @@ done: if(ret_value<0 && new_plist) H5P_close(new_plist); - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_copy_plist() */ @@ -859,7 +859,7 @@ H5P_dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type) /* Duplicating property for a class */ if(type == H5P_PROP_WITHIN_CLASS) { HDassert(oprop->type == H5P_PROP_WITHIN_CLASS); - HDassert(oprop->shared_name == 0); + HDassert(oprop->shared_name == FALSE); /* Duplicate name */ prop->name = H5MM_xstrdup(oprop->name); @@ -877,10 +877,10 @@ H5P_dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type) /* Duplicating a property from a class */ else { HDassert(oprop->type == H5P_PROP_WITHIN_CLASS); - HDassert(oprop->shared_name == 0); + HDassert(oprop->shared_name == FALSE); /* Share the name */ - prop->shared_name = 1; + prop->shared_name = TRUE; /* Set the type */ prop->type = type; @@ -956,26 +956,26 @@ H5P_create_prop(const char *name, size_t size, H5P_prop_within_t type, H5P_genprop_t *prop=NULL; /* Pointer to new property copied */ H5P_genprop_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_create_prop); + FUNC_ENTER_NOAPI_NOINIT(H5P_create_prop) - assert(name); - assert((size>0 && value!=NULL) || (size==0)); - assert(type!=H5P_PROP_WITHIN_UNKNOWN); + HDassert(name); + HDassert((size>0 && value!=NULL) || (size==0)); + HDassert(type!=H5P_PROP_WITHIN_UNKNOWN); /* Allocate the new property */ if(NULL==(prop = H5FL_MALLOC (H5P_genprop_t))) - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Set the property initial values */ prop->name = H5MM_xstrdup(name); /* Duplicate name */ - prop->shared_name=0; - prop->size=size; - prop->type=type; + prop->shared_name = FALSE; + prop->size = size; + prop->type = type; /* Duplicate value, if it exists */ if(value!=NULL) { if(NULL==(prop->value = H5MM_malloc (prop->size))) - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") HDmemcpy(prop->value,value,prop->size); } /* end if */ else @@ -1009,7 +1009,7 @@ done: } /* end if */ } /* end if */ - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_create_prop() */ @@ -1034,21 +1034,21 @@ done: herr_t H5P_add_prop(H5SL_t *slist, H5P_genprop_t *prop) { - herr_t ret_value=SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5P_add_prop,FAIL); + FUNC_ENTER_NOAPI(H5P_add_prop, FAIL) - assert(slist); - assert(prop); - assert(prop->type!=H5P_PROP_WITHIN_UNKNOWN); + HDassert(slist); + HDassert(prop); + HDassert(prop->type != H5P_PROP_WITHIN_UNKNOWN); /* Insert property into skip list */ - if(H5SL_insert(slist,prop,prop->name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into skip list"); + if(H5SL_insert(slist, prop, prop->name) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into skip list") done: - FUNC_LEAVE_NOAPI(ret_value); -} /* H5P_add_prop() */ + FUNC_LEAVE_NOAPI(ret_value) +} /* H5P_add_prop() */ /*-------------------------------------------------------------------------- @@ -1169,21 +1169,21 @@ done: static herr_t H5P_free_prop(H5P_genprop_t *prop) { - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_free_prop); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_free_prop) - assert(prop); + HDassert(prop); /* Release the property value if it exists */ if(prop->value) H5MM_xfree(prop->value); /* Only free the name if we own it */ - if(prop->shared_name==0) + if(!prop->shared_name) H5MM_xfree(prop->name); - (void)H5FL_FREE(H5P_genprop_t, prop); + prop = H5FL_FREE(H5P_genprop_t, prop); - FUNC_LEAVE_NOAPI(SUCCEED); + FUNC_LEAVE_NOAPI(SUCCEED) } /* H5P_free_prop() */ @@ -1210,21 +1210,21 @@ H5P_free_prop(H5P_genprop_t *prop) static herr_t H5P_free_prop_cb(void *item, void UNUSED *key, void *op_data) { - H5P_genprop_t *tprop=(H5P_genprop_t *)item; /* Temporary pointer to property */ - unsigned make_cb=*(unsigned *)op_data; /* Whether to make property 'close' callback */ + H5P_genprop_t *tprop=(H5P_genprop_t *)item; /* Temporary pointer to property */ + hbool_t make_cb = *(hbool_t *)op_data; /* Whether to make property 'close' callback */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_free_prop_cb); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_free_prop_cb) - assert(tprop); + HDassert(tprop); /* Call the close callback and ignore the return value, there's nothing we can do about it */ - if(make_cb && tprop->close!=NULL) - (tprop->close)(tprop->name,tprop->size,tprop->value); + if(make_cb && tprop->close != NULL) + (tprop->close)(tprop->name, tprop->size, tprop->value); /* Free the property, ignoring return value, nothing we can do */ H5P_free_prop(tprop); - FUNC_LEAVE_NOAPI(0); + FUNC_LEAVE_NOAPI(0) } /* H5P_free_prop_cb() */ @@ -1252,14 +1252,14 @@ H5P_free_del_name_cb(void *item, void UNUSED *key, void UNUSED *op_data) { char *del_name=(char *)item; /* Temporary pointer to deleted name */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_free_del_name_cb); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_free_del_name_cb) - assert(del_name); + HDassert(del_name); /* Free the name */ H5MM_xfree(del_name); - FUNC_LEAVE_NOAPI(0); + FUNC_LEAVE_NOAPI(0) } /* H5P_free_del_name_cb() */ @@ -1288,10 +1288,10 @@ H5P_free_del_name_cb(void *item, void UNUSED *key, void UNUSED *op_data) herr_t H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod) { - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_access_class); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_access_class) - assert(pclass); - assert(mod>H5P_MOD_ERR && mod H5P_MOD_ERR && mod < H5P_MOD_MAX); switch(mod) { case H5P_MOD_INC_CLS: /* Increment the dependant class count*/ @@ -1313,7 +1313,7 @@ H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod) case H5P_MOD_INC_REF: /* Increment the ID reference count*/ /* Reset the deleted flag if incrementing the reference count */ if(pclass->deleted) - pclass->deleted=0; + pclass->deleted = FALSE; pclass->ref_count++; break; @@ -1321,8 +1321,8 @@ H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod) pclass->ref_count--; /* Mark the class object as deleted if reference count drops to zero */ - if(pclass->ref_count==0) - pclass->deleted=1; + if(pclass->ref_count == 0) + pclass->deleted = TRUE; break; case H5P_MOD_ERR: @@ -1332,27 +1332,27 @@ H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod) } /* end switch */ /* Check if we can release the class information now */ - if(pclass->deleted && pclass->plists==0 && pclass->classes==0 ) { - H5P_genclass_t *par_class=pclass->parent; /* Pointer to class's parent */ + if(pclass->deleted && pclass->plists == 0 && pclass->classes == 0) { + H5P_genclass_t *par_class = pclass->parent; /* Pointer to class's parent */ - assert(pclass->name); + HDassert(pclass->name); H5MM_xfree(pclass->name); /* Free the class properties without making callbacks */ if(pclass->props) { - unsigned make_cb=0; + hbool_t make_cb = FALSE; - H5SL_destroy(pclass->props,H5P_free_prop_cb,&make_cb); + H5SL_destroy(pclass->props, H5P_free_prop_cb, &make_cb); } /* end if */ - (void)H5FL_FREE(H5P_genclass_t, pclass); + pclass = H5FL_FREE(H5P_genclass_t, pclass); /* Reduce the number of dependent classes on parent class also */ - if(par_class!=NULL) + if(par_class != NULL) H5P_access_class(par_class, H5P_MOD_DEC_CLS); } /* end if */ - FUNC_LEAVE_NOAPI(SUCCEED); + FUNC_LEAVE_NOAPI(SUCCEED) } /* H5P_access_class() */ @@ -1384,11 +1384,11 @@ H5P_check_class(void *_obj, hid_t UNUSED id, void *_key) const H5P_check_class_t *key=(const H5P_check_class_t *)_key; /* Pointer to key information for comparison */ int ret_value=0; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_check_class); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_check_class) - assert(obj); - assert(H5I_GENPROP_CLS==H5I_get_type(id)); - assert(key); + HDassert(obj); + HDassert(H5I_GENPROP_CLS==H5I_get_type(id)); + HDassert(key); /* Check if the class object has the same parent as the new class */ if(obj->parent==key->parent) { @@ -1397,7 +1397,7 @@ H5P_check_class(void *_obj, hid_t UNUSED id, void *_key) ret_value=1; /* Indicate a match */ } /* end if */ - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_check_class() */ @@ -1411,7 +1411,7 @@ H5P_check_class(void *_obj, hid_t UNUSED id, void *_key) cls_create, create_data, cls_close, close_data) H5P_genclass_t *par_class; IN: Pointer to parent class const char *name; IN: Name of class we are creating - unsigned internal; IN: Whether this is an internal class or not + hbool_t internal; IN: Whether this is an internal class or not H5P_cls_create_func_t; IN: The callback function to call when each property list in this class is created. void *create_data; IN: Pointer to user data to pass along to class @@ -1435,7 +1435,7 @@ H5P_check_class(void *_obj, hid_t UNUSED id, void *_key) REVISION LOG --------------------------------------------------------------------------*/ H5P_genclass_t * -H5P_create_class(H5P_genclass_t *par_class, const char *name, unsigned internal, +H5P_create_class(H5P_genclass_t *par_class, const char *name, hbool_t internal, H5P_cls_create_func_t cls_create, void *create_data, H5P_cls_copy_func_t cls_copy, void *copy_data, H5P_cls_close_func_t cls_close, void *close_data) @@ -1445,31 +1445,31 @@ H5P_create_class(H5P_genclass_t *par_class, const char *name, unsigned internal, FUNC_ENTER_NOAPI(H5P_create_class, NULL) - assert(name); + HDassert(name); /* Allow internal classes to break some rules */ /* (This allows the root of the tree to be created with this routine -QAK) */ - if(!internal) { - assert(par_class); - } + if(!internal) + HDassert(par_class); /* Allocate room for the class */ - if(NULL==(pclass = H5FL_CALLOC(H5P_genclass_t))) - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,"memory allocation failed"); + if(NULL == (pclass = H5FL_CALLOC(H5P_genclass_t))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, NULL, "propery list class allocation failed") /* Set class state */ pclass->parent = par_class; - pclass->name = H5MM_xstrdup(name); + if(NULL == (pclass->name = H5MM_xstrdup(name))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, NULL, "propery list class name allocation failed") pclass->nprops = 0; /* Classes are created without properties initially */ pclass->plists = 0; /* No properties lists of this class yet */ pclass->classes = 0; /* No classes derived from this class yet */ pclass->ref_count = 1; /* This is the first reference to the new class */ pclass->internal = internal; - pclass->deleted = 0; /* Not deleted yet... :-) */ + pclass->deleted = FALSE; /* Not deleted yet... :-) */ pclass->revision = H5P_GET_NEXT_REV; /* Get a revision number for the class */ /* Create the skip list for properties */ - if((pclass->props = H5SL_create(H5SL_TYPE_STR)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for properties"); + if(NULL == (pclass->props = H5SL_create(H5SL_TYPE_STR))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for properties") /* Set callback functions and pass-along data */ pclass->create_func = cls_create; @@ -1480,19 +1480,27 @@ H5P_create_class(H5P_genclass_t *par_class, const char *name, unsigned internal, pclass->close_data = close_data; /* Increment parent class's derived class value */ - if(par_class!=NULL) { - if(H5P_access_class(par_class,H5P_MOD_INC_CLS) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINIT, NULL,"Can't increment parent class ref count"); + if(par_class != NULL) { + if(H5P_access_class(par_class, H5P_MOD_INC_CLS) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, NULL, "Can't increment parent class ref count") } /* end if */ /* Set return value */ - ret_value=pclass; + ret_value = pclass; done: /* Free any resources allocated */ - if(ret_value==NULL) - if(pclass!=NULL) - (void)H5FL_FREE(H5P_genclass_t, pclass); + if(ret_value == NULL) + if(pclass) { + if(pclass->name) + H5MM_xfree(pclass->name); + if(pclass->props) { + hbool_t make_cb = FALSE; + + H5SL_destroy(pclass->props, H5P_free_prop_cb, &make_cb); + } /* end if */ + pclass = H5FL_FREE(H5P_genclass_t, pclass); + } /* end if */ FUNC_LEAVE_NOAPI(ret_value) } /* H5P_create_class() */ @@ -1532,9 +1540,9 @@ H5P_create(H5P_genclass_t *pclass) H5SL_t *seen=NULL; /* Skip list to hold names of properties already seen */ H5P_genplist_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_create); + FUNC_ENTER_NOAPI_NOINIT(H5P_create) - assert(pclass); + HDassert(pclass); /* * Create new property list object @@ -1542,20 +1550,20 @@ H5P_create(H5P_genclass_t *pclass) /* Allocate room for the property list */ if(NULL==(plist = H5FL_CALLOC(H5P_genplist_t))) - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,"memory allocation failed"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,"memory allocation failed") /* Set class state */ plist->pclass = pclass; plist->nprops = 0; /* Initially the plist has the same number of properties as the class */ - plist->class_init = 0; /* Initially, wait until the class callback finishes to set */ + plist->class_init = FALSE; /* Initially, wait until the class callback finishes to set */ /* Create the skip list for changed properties */ if((plist->props = H5SL_create(H5SL_TYPE_STR)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for changed properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for changed properties") /* Create the skip list for deleted properties */ if((plist->del = H5SL_create(H5SL_TYPE_STR)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for deleted properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for deleted properties") /* Create the skip list to hold names of properties already seen * (This prevents a property in the class hierarchy from having it's @@ -1563,7 +1571,7 @@ H5P_create(H5P_genclass_t *pclass) * already been seen) */ if((seen = H5SL_create(H5SL_TYPE_STR)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for seen properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for seen properties") /* * Check if we should copy class properties (up through list of parent classes also), @@ -1586,12 +1594,12 @@ H5P_create(H5P_genclass_t *pclass) if(tmp->create) { /* Call the callback & insert changed value into skip list (if necessary) */ if(H5P_do_prop_cb1(plist->props,tmp,tmp->create) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCOPY, NULL,"Can't create property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL,"Can't create property") } /* end if */ /* Add property name to "seen" list */ if(H5SL_insert(seen,tmp->name,tmp->name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,NULL,"can't insert property into seen skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,NULL,"can't insert property into seen skip list") /* Increment the number of properties in list */ plist->nprops++; @@ -1608,7 +1616,7 @@ H5P_create(H5P_genclass_t *pclass) /* Increment the number of property lists derived from class */ if(H5P_access_class(plist->pclass,H5P_MOD_INC_LST) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINIT, NULL,"Can't increment class ref count"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, NULL,"Can't increment class ref count") /* Set return value */ ret_value=plist; @@ -1637,7 +1645,7 @@ done: } /* end if */ } /* end if */ - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_create() */ @@ -1671,17 +1679,17 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref) hid_t plist_id = FAIL; /* Property list ID */ hid_t ret_value; /* return value */ - FUNC_ENTER_NOAPI(H5P_create_id, FAIL); + FUNC_ENTER_NOAPI(H5P_create_id, FAIL) - assert(pclass); + HDassert(pclass); /* Create the new property list */ if((plist=H5P_create(pclass)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list") /* Get an atom for the property list */ if((plist_id = H5I_register(H5I_GENPROP_LST, plist, app_ref)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list") /* Save the property list ID in the property list struct, for use in the property class's 'close' callback */ plist->plist_id=plist_id; @@ -1704,7 +1712,7 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref) } /* end while */ /* Set the class initialization flag */ - plist->class_init=1; + plist->class_init = TRUE; /* Set the return value */ ret_value=plist_id; @@ -1713,18 +1721,18 @@ done: if(ret_value<0 && plist) H5P_close(plist); - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_create_id() */ /*-------------------------------------------------------------------------- NAME - H5P_register + H5P_register_real PURPOSE Internal routine to register a new property in a property list class. USAGE - herr_t H5P_register(class, name, size, default, prp_create, prp_set, prp_get, prp_close) - H5P_genclass_t *class; IN: Property list class to close + herr_t H5P_register_real(class, name, size, default, prp_create, prp_set, prp_get, prp_close) + H5P_genclass_t *class; IN: Property list class to modify const char *name; IN: Name of property to register size_t size; IN: Size of property in bytes void *def_value; IN: Pointer to buffer containing default value @@ -1872,89 +1880,274 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5P_register(H5P_genclass_t *pclass, const char *name, size_t size, +H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size, const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close) { - H5P_genclass_t *new_class; /* New class pointer */ - H5P_genprop_t *new_prop=NULL; /* Temporary property pointer */ - H5P_genprop_t *pcopy; /* Property copy */ - herr_t ret_value=SUCCEED; /* Return value */ + H5P_genprop_t *new_prop = NULL; /* Temporary property pointer */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5P_register, FAIL); + FUNC_ENTER_NOAPI(H5P_register_real, FAIL) - assert(pclass); - assert(name); - assert((size>0 && def_value!=NULL) || (size==0)); + HDassert(pclass); + HDassert(0 == pclass->plists); + HDassert(0 == pclass->classes); + HDassert(name); + HDassert((size > 0 && def_value != NULL) || (size == 0)); /* Check for duplicate named properties */ - if(H5SL_search(pclass->props,name)!=NULL) - HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists"); + if(NULL != H5SL_search(pclass->props, name)) + HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists") + + /* Create property object from parameters */ + if(NULL == (new_prop = H5P_create_prop(name, size, H5P_PROP_WITHIN_CLASS, def_value, prp_create, prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL,"Can't create property") + + /* Insert property into property list class */ + if(H5P_add_prop(pclass->props, new_prop) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class") + + /* Increment property count for class */ + pclass->nprops++; + + /* Update the revision for the class */ + pclass->revision = H5P_GET_NEXT_REV; + +done: + if(ret_value < 0) + if(new_prop && H5P_free_prop(new_prop) < 0) + HDONE_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close property") + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5P_register_real() */ + + +/*-------------------------------------------------------------------------- + NAME + H5P_register + PURPOSE + Internal routine to register a new property in a property list class. + USAGE + herr_t H5P_register(class, name, size, default, prp_create, prp_set, prp_get, prp_close) + H5P_genclass_t **class; IN: Property list class to modify + const char *name; IN: Name of property to register + size_t size; IN: Size of property in bytes + void *def_value; IN: Pointer to buffer containing default value + for property in newly created property lists + H5P_prp_create_func_t prp_create; IN: Function pointer to property + creation callback + H5P_prp_set_func_t prp_set; IN: Function pointer to property set callback + H5P_prp_get_func_t prp_get; IN: Function pointer to property get callback + H5P_prp_delete_func_t prp_delete; IN: Function pointer to property delete callback + H5P_prp_copy_func_t prp_copy; IN: Function pointer to property copy callback + H5P_prp_compare_func_t prp_cmp; IN: Function pointer to property compare callback + H5P_prp_close_func_t prp_close; IN: Function pointer to property close + callback + RETURNS + Returns non-negative on success, negative on failure. + DESCRIPTION + Registers a new property with a property list class. The property will + exist in all property list objects of that class after this routine is + finished. The name of the property must not already exist. The default + property value must be provided and all new property lists created with this + property will have the property value set to the default provided. Any of + the callback routines may be set to NULL if they are not needed. + + Zero-sized properties are allowed and do not store any data in the + property list. These may be used as flags to indicate the presence or + absence of a particular piece of information. The 'default' pointer for a + zero-sized property may be set to NULL. The property 'create' & 'close' + callbacks are called for zero-sized properties, but the 'set' and 'get' + callbacks are never called. + + The 'create' callback is called when a new property list with this + property is being created. H5P_prp_create_func_t is defined as: + typedef herr_t (*H5P_prp_create_func_t)(hid_t prop_id, const char *name, + size_t size, void *initial_value); + where the parameters to the callback function are: + hid_t prop_id; IN: The ID of the property list being created. + const char *name; IN: The name of the property being modified. + size_t size; IN: The size of the property value + void *initial_value; IN/OUT: The initial value for the property being created. + (The 'default' value passed to H5Pregister2) + The 'create' routine may modify the value to be set and those changes will + be stored as the initial value of the property. If the 'create' routine + returns a negative value, the new property value is not copied into the + property and the property list creation routine returns an error value. + + The 'set' callback is called before a new value is copied into the + property. H5P_prp_set_func_t is defined as: + typedef herr_t (*H5P_prp_set_func_t)(hid_t prop_id, const char *name, + size_t size, void *value); + where the parameters to the callback function are: + hid_t prop_id; IN: The ID of the property list being modified. + const char *name; IN: The name of the property being modified. + size_t size; IN: The size of the property value + void *new_value; IN/OUT: The value being set for the property. + The 'set' routine may modify the value to be set and those changes will be + stored as the value of the property. If the 'set' routine returns a + negative value, the new property value is not copied into the property and + the property list set routine returns an error value. + + The 'get' callback is called before a value is retrieved from the + property. H5P_prp_get_func_t is defined as: + typedef herr_t (*H5P_prp_get_func_t)(hid_t prop_id, const char *name, + size_t size, void *value); + where the parameters to the callback function are: + hid_t prop_id; IN: The ID of the property list being queried. + const char *name; IN: The name of the property being queried. + size_t size; IN: The size of the property value + void *value; IN/OUT: The value being retrieved for the property. + The 'get' routine may modify the value to be retrieved and those changes + will be returned to the calling function. If the 'get' routine returns a + negative value, the property value is returned and the property list get + routine returns an error value. + + The 'delete' callback is called when a property is deleted from a + property list. H5P_prp_del_func_t is defined as: + typedef herr_t (*H5P_prp_del_func_t)(hid_t prop_id, const char *name, + size_t size, void *value); + where the parameters to the callback function are: + hid_t prop_id; IN: The ID of the property list the property is deleted from. + const char *name; IN: The name of the property being deleted. + size_t size; IN: The size of the property value + void *value; IN/OUT: The value of the property being deleted. + The 'delete' routine may modify the value passed in, but the value is not + used by the library when the 'delete' routine returns. If the + 'delete' routine returns a negative value, the property list deletion + routine returns an error value but the property is still deleted. + + The 'copy' callback is called when a property list with this + property is copied. H5P_prp_copy_func_t is defined as: + typedef herr_t (*H5P_prp_copy_func_t)(const char *name, size_t size, + void *value); + where the parameters to the callback function are: + const char *name; IN: The name of the property being copied. + size_t size; IN: The size of the property value + void *value; IN: The value of the property being copied. + The 'copy' routine may modify the value to be copied and those changes will be + stored as the value of the property. If the 'copy' routine returns a + negative value, the new property value is not copied into the property and + the property list copy routine returns an error value. + + The 'compare' callback is called when a property list with this + property is compared to another property list. H5P_prp_compare_func_t is + defined as: + typedef int (*H5P_prp_compare_func_t)( void *value1, void *value2, + size_t size); + where the parameters to the callback function are: + const void *value1; IN: The value of the first property being compared. + const void *value2; IN: The value of the second property being compared. + size_t size; IN: The size of the property value + The 'compare' routine may not modify the values to be compared. The + 'compare' routine should return a positive value if VALUE1 is greater than + VALUE2, a negative value if VALUE2 is greater than VALUE1 and zero if VALUE1 + and VALUE2 are equal. + + The 'close' callback is called when a property list with this + property is being destroyed. H5P_prp_close_func_t is defined as: + typedef herr_t (*H5P_prp_close_func_t)(const char *name, size_t size, + void *value); + where the parameters to the callback function are: + const char *name; IN: The name of the property being closed. + size_t size; IN: The size of the property value + void *value; IN: The value of the property being closed. + The 'close' routine may modify the value passed in, but the value is not + used by the library when the 'close' routine returns. If the + 'close' routine returns a negative value, the property list close + routine returns an error value but the property list is still closed. + + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + The 'set' callback function may be useful to range check the value being + set for the property or may perform some tranformation/translation of the + value set. The 'get' callback would then [probably] reverse the + transformation, etc. A single 'get' or 'set' callback could handle + multiple properties by performing different actions based on the property + name or other properties in the property list. + + I would like to say "the property list is not closed" when a 'close' + routine fails, but I don't think that's possible due to other properties in + the list being successfully closed & removed from the property list. I + suppose that it would be possible to just remove the properties which have + successful 'close' callbacks, but I'm not happy with the ramifications + of a mangled, un-closable property list hanging around... Any comments? -QAK + + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5P_register(H5P_genclass_t **ppclass, const char *name, size_t size, + const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, + H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, + H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, + H5P_prp_close_func_t prp_close) +{ + H5P_genclass_t *pclass = *ppclass; /* Pointer to class to modify */ + H5P_genclass_t *new_class = NULL; /* New class pointer */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5P_register, FAIL) + + /* Sanity check */ + HDassert(ppclass); + HDassert(pclass); /* Check if class needs to be split because property lists or classes have * been created since the last modification was made to the class. */ - if(pclass->plists>0 || pclass->classes>0) { - if((new_class=H5P_create_class(pclass->parent,pclass->name, - pclass->internal,pclass->create_func,pclass->create_data, - pclass->copy_func,pclass->copy_data, - pclass->close_func,pclass->close_data)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy class"); + if(pclass->plists > 0 || pclass->classes > 0) { + if(NULL == (new_class = H5P_create_class(pclass->parent, pclass->name, + pclass->internal, pclass->create_func, pclass->create_data, + pclass->copy_func, pclass->copy_data, + pclass->close_func, pclass->close_data))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy class") /* Walk through the skip list of the old class and copy properties */ - if(pclass->nprops>0) { + if(pclass->nprops > 0) { H5SL_node_t *curr_node; /* Current node in skip list */ /* Walk through the properties in the old class */ - curr_node=H5SL_first(pclass->props); + curr_node = H5SL_first(pclass->props); while(curr_node != NULL) { + H5P_genprop_t *pcopy; /* Property copy */ + /* Make a copy of the class's property */ if(NULL == (pcopy = H5P_dup_prop((H5P_genprop_t *)H5SL_item(curr_node), H5P_PROP_WITHIN_CLASS))) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property") - /* Insert the initialized property into the property list */ - if(H5P_add_prop(new_class->props,pcopy) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class"); + /* Insert the initialized property into the property class */ + if(H5P_add_prop(new_class->props, pcopy) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class") /* Increment property count for class */ new_class->nprops++; /* Get the next property node in the skip list */ - curr_node=H5SL_next(curr_node); + curr_node = H5SL_next(curr_node); } /* end while */ } /* end if */ /* Use the new class instead of the old one */ - pclass=new_class; + pclass = new_class; } /* end if */ - /* Create property object from parameters */ - if((new_prop=H5P_create_prop(name,size,H5P_PROP_WITHIN_CLASS,def_value,prp_create,prp_set,prp_get,prp_delete,prp_copy,prp_cmp,prp_close)) == NULL) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCREATE, FAIL,"Can't create property"); - - /* Insert property into property list class */ - if(H5P_add_prop(pclass->props,new_prop) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class"); - - /* Increment property count for class */ - pclass->nprops++; + /* Really register the property in the class */ + if(H5P_register_real(pclass, name, size, def_value, prp_create, prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "can't register property") - /* Update the revision for the class */ - pclass->revision = H5P_GET_NEXT_REV; + /* Update pointer to pointer to class, if a new one was generated */ + if(new_class) + *ppclass = pclass; done: - if(ret_value==FAIL) { - if(new_prop!=NULL) { - if(new_prop->name!=NULL) - H5MM_xfree(new_prop->name); - if(new_prop->value!=NULL) - H5MM_xfree(new_prop->value); - (void)H5FL_FREE(H5P_genprop_t, new_prop); - } /* end if */ - } /* end if */ - FUNC_LEAVE_NOAPI(ret_value); + if(ret_value < 0) + if(new_class && H5P_close_class(new_class) < 0) + HDONE_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close new property class") + + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_register() */ @@ -2103,72 +2296,62 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close) { - H5P_genprop_t *new_prop=NULL; /* Temporary property pointer */ - herr_t ret_value=SUCCEED; /* Return value */ + H5P_genprop_t *new_prop = NULL; /* Temporary property pointer */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_insert); + FUNC_ENTER_NOAPI_NOINIT(H5P_insert) - assert(plist); - assert(name); - assert((size>0 && value!=NULL) || (size==0)); + HDassert(plist); + HDassert(name); + HDassert((size > 0 && value != NULL) || (size == 0)); /* Check for duplicate named properties */ - if(H5SL_search(plist->props,name)!=NULL) - HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists"); + if(NULL != H5SL_search(plist->props, name)) + HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists") /* Check if the property has been deleted */ - if(H5SL_search(plist->del,name)!=NULL) { + if(NULL != H5SL_search(plist->del, name)) { /* Remove the property name from the deleted property skip list */ - if(H5SL_remove(plist->del,name) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTDELETE,FAIL,"can't remove property from deleted skip list"); - - /* Fall through to add property to list */ + if(NULL == H5SL_remove(plist->del, name)) + HGOTO_ERROR(H5E_PLIST,H5E_CANTDELETE,FAIL,"can't remove property from deleted skip list") } /* end if */ else { H5P_genclass_t *tclass; /* Temporary class pointer */ /* Check if the property is already in the class hierarchy */ - tclass=plist->pclass; - while(tclass!=NULL) { - if(tclass->nprops>0) { + tclass = plist->pclass; + while(tclass) { + if(tclass->nprops > 0) { /* Find the property in the class */ - if(H5SL_search(tclass->props,name)!=NULL) - HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists"); + if(NULL != H5SL_search(tclass->props, name)) + HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists") } /* end if */ /* Go up to parent class */ - tclass=tclass->parent; + tclass = tclass->parent; } /* end while */ - - /* Fall through to add property to list */ } /* end else */ /* Ok to add to property list */ /* Create property object from parameters */ - if((new_prop=H5P_create_prop(name,size,H5P_PROP_WITHIN_LIST,value,NULL,prp_set,prp_get,prp_delete,prp_copy,prp_cmp,prp_close)) == NULL) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCREATE, FAIL,"Can't create property"); + if(NULL == (new_prop = H5P_create_prop(name, size, H5P_PROP_WITHIN_LIST, value, NULL, prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "Can't create property") /* Insert property into property list class */ - if(H5P_add_prop(plist->props,new_prop) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class"); + if(H5P_add_prop(plist->props, new_prop) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class") /* Increment property count for class */ plist->nprops++; done: - if(ret_value==FAIL) { - if(new_prop!=NULL) { - if(new_prop->name!=NULL) - H5MM_xfree(new_prop->name); - if(new_prop->value!=NULL) - H5MM_xfree(new_prop->value); - (void)H5FL_FREE(H5P_genprop_t, new_prop); - } /* end if */ - } /* end if */ + if(ret_value < 0) + if(new_prop && H5P_free_prop(new_prop) < 0) + HDONE_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close property") - FUNC_LEAVE_NOAPI(ret_value); -} /* H5P_insert() */ + FUNC_LEAVE_NOAPI(ret_value) +} /* H5P_insert() */ /*-------------------------------------------------------------------------- @@ -2209,21 +2392,21 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value) H5P_genprop_t *prop; /* Temporary property pointer */ herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5P_set, FAIL); + FUNC_ENTER_NOAPI(H5P_set, FAIL) - assert(plist); - assert(name); - assert(value); + HDassert(plist); + HDassert(name); + HDassert(value); /* Check if the property has been deleted */ if(H5SL_search(plist->del,name)!=NULL) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") /* Find property in changed list */ if(NULL != (prop = (H5P_genprop_t *)H5SL_search(plist->props, name))) { /* Check for property size >0 */ if(prop->size==0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") /* Make a copy of the value and pass to 'set' callback */ if(prop->set!=NULL) { @@ -2231,13 +2414,13 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value) /* Make a copy of the current value, in case the callback fails */ if(NULL==(tmp_value=H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed temporary property value"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed temporary property value") HDmemcpy(tmp_value,value,prop->size); /* Call user's callback */ if((*(prop->set))(plist->plist_id,name,prop->size,tmp_value) < 0) { H5MM_xfree(tmp_value); - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value") } /* end if */ /* Copy new [possibly unchanged] value into property value */ @@ -2264,7 +2447,7 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value) /* Check for property size >0 */ if(prop->size==0) - HGOTO_ERROR(H5E_PLIST,H5E_BADVALUE,FAIL,"property has zero size"); + HGOTO_ERROR(H5E_PLIST,H5E_BADVALUE,FAIL,"property has zero size") /* Make a copy of the value and pass to 'set' callback */ if(prop->set!=NULL) { @@ -2272,26 +2455,26 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value) /* Make a copy of the current value, in case the callback fails */ if(NULL==(tmp_value=H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed temporary property value"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed temporary property value") HDmemcpy(tmp_value,value,prop->size); /* Call user's callback */ if((*(prop->set))(plist->plist_id,name,prop->size,tmp_value) < 0) { H5MM_xfree(tmp_value); - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value") } /* end if */ if((prop->cmp)(tmp_value,prop->value,prop->size)) { /* Make a copy of the class's property */ if((pcopy=H5P_dup_prop(prop,H5P_PROP_WITHIN_LIST)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCOPY,FAIL,"Can't copy property"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCOPY,FAIL,"Can't copy property") /* Copy new value into property value */ HDmemcpy(pcopy->value,tmp_value,pcopy->size); /* Insert the changed property into the property list */ if(H5P_add_prop(plist->props,pcopy) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert changed property into skip list"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert changed property into skip list") } /* end if */ /* Free the temporary value buffer */ @@ -2302,13 +2485,13 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value) if((prop->cmp)(value,prop->value,prop->size)) { /* Make a copy of the class's property */ if((pcopy=H5P_dup_prop(prop,H5P_PROP_WITHIN_LIST)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCOPY,FAIL,"Can't copy property"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCOPY,FAIL,"Can't copy property") HDmemcpy(pcopy->value,value,pcopy->size); /* Insert the changed property into the property list */ if(H5P_add_prop(plist->props,pcopy) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert changed property into skip list"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert changed property into skip list") } /* end if */ } /* end else */ @@ -2324,11 +2507,11 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value) /* If we get this far, then it wasn't in the list of changed properties, * nor in the properties in the class hierarchy, indicate an error */ - HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list") } /* end else */ done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_set() */ @@ -2356,39 +2539,39 @@ done: htri_t H5P_exist_plist(H5P_genplist_t *plist, const char *name) { - htri_t ret_value=FAIL; /* return value */ + htri_t ret_value = FAIL; /* return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_exist_plist); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_exist_plist) - assert(plist); - assert(name); + HDassert(plist); + HDassert(name); /* Check for property in deleted property list */ - if(H5SL_search(plist->del,name)!=NULL) - ret_value=0; + if(H5SL_search(plist->del, name) != NULL) + ret_value = FALSE; else { /* Check for property in changed property list */ - if(H5SL_search(plist->props,name)!=NULL) - ret_value=1; + if(H5SL_search(plist->props, name) != NULL) + ret_value = TRUE; else { H5P_genclass_t *tclass; /* Temporary class pointer */ - tclass=plist->pclass; - while(tclass!=NULL) { - if(H5SL_search(tclass->props,name)!=NULL) - HGOTO_DONE(1); + tclass = plist->pclass; + while(tclass != NULL) { + if(H5SL_search(tclass->props, name) != NULL) + HGOTO_DONE(TRUE) /* Go up to parent class */ - tclass=tclass->parent; + tclass = tclass->parent; } /* end while */ /* If we've reached here, we couldn't find the property */ - ret_value=0; + ret_value = FALSE; } /* end else */ } /* end else */ done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_exist_plist() */ @@ -2402,11 +2585,11 @@ done: H5P_genclass_t *pclass; IN: Property class to check const char *name; IN: Name of property to check for RETURNS - Success: Positive if the property exists in the property list, zero + Success: Positive if the property exists in the property class, zero if the property does not exist. Failure: negative value DESCRIPTION - This routine checks if a property exists within a property list. + This routine checks if a property exists within a property class. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS @@ -2416,20 +2599,34 @@ done: htri_t H5P_exist_pclass(H5P_genclass_t *pclass, const char *name) { - htri_t ret_value=FAIL; /* return value */ + htri_t ret_value = FAIL; /* return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_exist_pclass); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_exist_pclass) - assert(pclass); - assert(name); + HDassert(pclass); + HDassert(name); /* Check for property in property list */ - if(H5SL_search(pclass->props,name) == NULL) - ret_value=0; - else - ret_value=1; + if(H5SL_search(pclass->props, name) != NULL) + ret_value = TRUE; + else { + H5P_genclass_t *tclass; /* Temporary class pointer */ + + tclass = pclass->parent; + while(tclass != NULL) { + if(H5SL_search(tclass->props, name) != NULL) + HGOTO_DONE(TRUE) + + /* Go up to parent class */ + tclass = tclass->parent; + } /* end while */ - FUNC_LEAVE_NOAPI(ret_value); + /* If we've reached here, we couldn't find the property */ + ret_value = FALSE; + } /* end else */ + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_exist_pclass() */ @@ -2461,21 +2658,21 @@ H5P_get_size_plist(H5P_genplist_t *plist, const char *name, size_t *size) H5P_genprop_t *prop; /* Temporary property pointer */ herr_t ret_value=SUCCEED; /* return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_get_size_plist); + FUNC_ENTER_NOAPI_NOINIT(H5P_get_size_plist) - assert(plist); - assert(name); - assert(size); + HDassert(plist); + HDassert(name); + HDassert(size); /* Find property */ if((prop=H5P_find_prop_plist(plist,name)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") /* Get property size */ *size=prop->size; done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_get_size_plist() */ @@ -2507,21 +2704,21 @@ H5P_get_size_pclass(H5P_genclass_t *pclass, const char *name, size_t *size) H5P_genprop_t *prop; /* Temporary property pointer */ herr_t ret_value=SUCCEED; /* return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_get_size_pclass); + FUNC_ENTER_NOAPI_NOINIT(H5P_get_size_pclass) - assert(pclass); - assert(name); - assert(size); + HDassert(pclass); + HDassert(name); + HDassert(size); /* Find property */ if((prop=H5P_find_prop_pclass(pclass,name)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") /* Get property size */ *size=prop->size; done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_get_size_pclass() */ @@ -2549,14 +2746,14 @@ H5P_get_class(const H5P_genplist_t *plist) { H5P_genclass_t *ret_value; /* return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_class); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_class) HDassert(plist); /* Get property size */ ret_value = plist->pclass; - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_get_class() */ @@ -2583,7 +2780,7 @@ H5P_get_class(const H5P_genplist_t *plist) herr_t H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops) { - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_nprops_plist); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_nprops_plist) HDassert(plist); HDassert(nprops); @@ -2591,7 +2788,7 @@ H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops) /* Get property size */ *nprops = plist->nprops; - FUNC_LEAVE_NOAPI(SUCCEED); + FUNC_LEAVE_NOAPI(SUCCEED) } /* H5P_get_nprops_plist() */ @@ -2669,7 +2866,7 @@ H5P_cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2) int cmp_value; /* Value from comparison */ int ret_value = 0; /* return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_cmp_prop); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_cmp_prop) HDassert(prop1); HDassert(prop2); @@ -2727,7 +2924,7 @@ H5P_cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2) } /* end if */ done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_cmp_prop() */ @@ -2760,7 +2957,7 @@ H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2) int cmp_value; /* Value from comparison */ int ret_value = 0; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_cmp_class); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_cmp_class) HDassert(pclass1); HDassert(pclass2); @@ -2833,7 +3030,7 @@ H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2) } /* end while */ done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_cmp_class() */ @@ -2866,7 +3063,7 @@ H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2) int cmp_value; /* Value from comparison */ int ret_value = 0; /* return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_cmp_plist); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_cmp_plist) HDassert(plist1); HDassert(plist2); @@ -2940,7 +3137,7 @@ H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2) HGOTO_DONE(cmp_value); done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_cmp_plist() */ @@ -2972,10 +3169,10 @@ H5P_isa_class_real(H5P_genclass_t *pclass1, H5P_genclass_t *pclass2) { htri_t ret_value; - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_isa_class_real); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_isa_class_real) - assert(pclass1); - assert(pclass2); + HDassert(pclass1); + HDassert(pclass2); /* Compare property classes */ if(H5P_cmp_class(pclass1, pclass2) == 0) { @@ -2989,7 +3186,7 @@ H5P_isa_class_real(H5P_genclass_t *pclass1, H5P_genclass_t *pclass2) } /* end else */ done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_isa_class_real() */ @@ -3025,20 +3222,20 @@ H5P_isa_class(hid_t plist_id, hid_t pclass_id) H5P_genclass_t *pclass; /* Property list class */ htri_t ret_value; /* return value */ - FUNC_ENTER_NOAPI(H5P_isa_class, FAIL); + FUNC_ENTER_NOAPI(H5P_isa_class, FAIL) /* Check arguments. */ if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class") /* Compare the property list's class against the other class */ if((ret_value = H5P_isa_class_real(plist->pclass, pclass)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to compare property list classes"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to compare property list classes") done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_isa_class() */ @@ -3152,18 +3349,18 @@ H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func, void *iter_ int curr_idx = 0; /* Current iteration index */ int ret_value = FAIL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_iterate_plist); + FUNC_ENTER_NOAPI_NOINIT(H5P_iterate_plist) HDassert(idx); HDassert(iter_func); /* Get the property list object */ if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") /* Create the skip list to hold names of properties already seen */ if((seen = H5SL_create(H5SL_TYPE_STR)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties") /* Walk through the changed properties in the list */ if(H5SL_count(plist->props) > 0) { @@ -3186,7 +3383,7 @@ H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func, void *iter_ /* Add property name to "seen" list */ if(H5SL_insert(seen,tmp->name,tmp->name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list") /* Get the next property node in the skip list */ curr_node=H5SL_next(curr_node); @@ -3224,7 +3421,7 @@ H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func, void *iter_ /* Add property name to "seen" list */ if(H5SL_insert(seen,tmp->name,tmp->name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list") } /* end if */ /* Get the next property node in the skip list */ @@ -3244,7 +3441,7 @@ done: if(seen!=NULL) H5SL_close(seen); - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_iterate_plist() */ @@ -3308,14 +3505,14 @@ H5P_iterate_pclass(hid_t pclass_id, int *idx, H5P_iterate_t iter_func, void *ite int curr_idx=0; /* Current iteration index */ int ret_value=FAIL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_iterate_pclass); + FUNC_ENTER_NOAPI_NOINIT(H5P_iterate_pclass) - assert(idx); - assert(iter_func); + HDassert(idx); + HDassert(iter_func); /* Get the property list object */ if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class") /* Cycle through the properties and call the callback */ curr_idx=0; @@ -3344,7 +3541,7 @@ done: /* Set the index we stopped at */ *idx=curr_idx; - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_iterate_pclass() */ @@ -3380,16 +3577,16 @@ H5P_peek_unsigned(H5P_genplist_t *plist, const char *name) { unsigned ret_value; /* return value */ - FUNC_ENTER_NOAPI(H5P_peek_unsigned, UFAIL); + FUNC_ENTER_NOAPI(H5P_peek_unsigned, UFAIL) - assert(plist); - assert(name); + HDassert(plist); + HDassert(name); /* Get the value to return, don't worry about the return value, we can't return it */ H5P_get(plist,name,&ret_value); done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_peek_unsigned() */ @@ -3425,16 +3622,16 @@ H5P_peek_hid_t(H5P_genplist_t *plist, const char *name) { hid_t ret_value; /* return value */ - FUNC_ENTER_NOAPI(H5P_peek_hid_t, FAIL); + FUNC_ENTER_NOAPI(H5P_peek_hid_t, FAIL) - assert(plist); - assert(name); + HDassert(plist); + HDassert(name); /* Get the value to return, don't worry about the return value, we can't return it */ H5P_get(plist,name,&ret_value); done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_peek_hid_t() */ @@ -3470,16 +3667,16 @@ H5P_peek_voidp(H5P_genplist_t *plist, const char *name) { void * ret_value; /* return value */ - FUNC_ENTER_NOAPI(H5P_peek_voidp, NULL); + FUNC_ENTER_NOAPI(H5P_peek_voidp, NULL) - assert(plist); - assert(name); + HDassert(plist); + HDassert(name); /* Get the value to return, don't worry about the return value, we can't return it */ H5P_get(plist,name,&ret_value); done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_peek_voidp() */ @@ -3515,16 +3712,16 @@ H5P_peek_size_t(H5P_genplist_t *plist, const char *name) { size_t ret_value; /* return value */ - FUNC_ENTER_NOAPI(H5P_peek_size_t, UFAIL); + FUNC_ENTER_NOAPI(H5P_peek_size_t, UFAIL) - assert(plist); - assert(name); + HDassert(plist); + HDassert(name); /* Get the value to return, don't worry about the return value, we can't return it */ H5P_get(plist,name,&ret_value); done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_peek_size_t() */ @@ -3563,21 +3760,21 @@ H5P_get(const H5P_genplist_t *plist, const char *name, void *value) H5P_genprop_t *prop; /* Temporary property pointer */ herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5P_get, FAIL); + FUNC_ENTER_NOAPI(H5P_get, FAIL) - assert(plist); - assert(name); - assert(value); + HDassert(plist); + HDassert(name); + HDassert(value); /* Check if the property has been deleted */ if(H5SL_search(plist->del,name)!=NULL) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") /* Find property */ if((prop = (H5P_genprop_t *)H5SL_search(plist->props,name))!=NULL) { /* Check for property size >0 */ if(prop->size==0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") /* Make a copy of the value and pass to 'get' callback */ if(prop->get!=NULL) { @@ -3585,12 +3782,12 @@ H5P_get(const H5P_genplist_t *plist, const char *name, void *value) /* Make a copy of the current value, in case the callback fails */ if(NULL==(tmp_value=H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed temporary property value"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed temporary property value") HDmemcpy(tmp_value,prop->value,prop->size); /* Call user's callback */ if((*(prop->get))(plist->plist_id,name,prop->size,tmp_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't get property value"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't get property value") /* Copy new [possibly unchanged] value into return value */ HDmemcpy(value,tmp_value,prop->size); @@ -3614,7 +3811,7 @@ H5P_get(const H5P_genplist_t *plist, const char *name, void *value) if((prop = (H5P_genprop_t *)H5SL_search(tclass->props,name))!=NULL) { /* Check for property size >0 */ if(prop->size==0) - HGOTO_ERROR(H5E_PLIST,H5E_BADVALUE,FAIL,"property has zero size"); + HGOTO_ERROR(H5E_PLIST,H5E_BADVALUE,FAIL,"property has zero size") /* Call the 'get' callback, if there is one */ if(prop->get!=NULL) { @@ -3622,13 +3819,13 @@ H5P_get(const H5P_genplist_t *plist, const char *name, void *value) /* Make a copy of the current value, in case the callback fails */ if(NULL==(tmp_value=H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed temporary property value"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed temporary property value") HDmemcpy(tmp_value,prop->value,prop->size); /* Call user's callback */ if((*(prop->get))(plist->plist_id,name,prop->size,tmp_value) < 0) { H5MM_xfree(tmp_value); - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value") } /* end if */ if((prop->cmp)(tmp_value,prop->value,prop->size)) { @@ -3636,14 +3833,14 @@ H5P_get(const H5P_genplist_t *plist, const char *name, void *value) /* Make a copy of the class's property */ if((pcopy=H5P_dup_prop(prop,H5P_PROP_WITHIN_LIST)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCOPY,FAIL,"Can't copy property"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCOPY,FAIL,"Can't copy property") /* Copy new value into property value */ HDmemcpy(pcopy->value,tmp_value,prop->size); /* Insert the changed property into the property list */ if(H5P_add_prop(plist->props,pcopy) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert changed property into skip list"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert changed property into skip list") } /* end if */ /* Copy new [possibly unchanged] value into return value */ @@ -3668,11 +3865,11 @@ H5P_get(const H5P_genplist_t *plist, const char *name, void *value) /* If we get this far, then it wasn't in the list of changed properties, * nor in the properties in the class hierarchy, indicate an error */ - HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list") } /* end else */ done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_get() */ @@ -3710,14 +3907,14 @@ H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name) char *del_name; /* Pointer to deleted name */ herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5P_remove,FAIL); + FUNC_ENTER_NOAPI(H5P_remove, FAIL) - assert(plist); - assert(name); + HDassert(plist); + HDassert(name); /* Indicate that the property isn't in the list if it has been deleted already */ if(H5SL_search(plist->del,name)!=NULL) - HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list") /* Get the property node from the changed property skip list */ if((prop = (H5P_genprop_t *)H5SL_search(plist->props,name))!=NULL) { @@ -3725,20 +3922,20 @@ H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name) if(prop->del!=NULL) { /* Call user's callback */ if((*(prop->del))(plist_id,name,prop->size,prop->value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't close property value"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't close property value") } /* end if */ /* Duplicate string for insertion into new deleted property skip list */ if((del_name=H5MM_xstrdup(name)) == NULL) - HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,FAIL,"memory allocation failed"); + HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,FAIL,"memory allocation failed") /* Insert property name into deleted list */ if(H5SL_insert(plist->del,del_name,del_name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into deleted skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into deleted skip list") /* Remove the property from the skip list */ if(H5SL_remove(plist->props,prop->name) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTDELETE,FAIL,"can't remove property from skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTDELETE,FAIL,"can't remove property from skip list") /* Free the property, ignoring return value, nothing we can do */ H5P_free_prop(prop); @@ -3763,13 +3960,13 @@ H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name) /* Allocate space for a temporary copy of the property value */ if(NULL==(tmp_value=H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for temporary property value"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for temporary property value") HDmemcpy(tmp_value,prop->value,prop->size); /* Call user's callback */ if((*(prop->del))(plist_id,name,prop->size,tmp_value) < 0) { H5MM_xfree(tmp_value); - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't close property value"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't close property value") } /* end if */ /* Release the temporary value buffer */ @@ -3778,11 +3975,11 @@ H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name) /* Duplicate string for insertion into new deleted property skip list */ if((del_name=H5MM_xstrdup(name)) == NULL) - HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,FAIL,"memory allocation failed"); + HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,FAIL,"memory allocation failed") /* Insert property name into deleted list */ if(H5SL_insert(plist->del,del_name,del_name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into deleted skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into deleted skip list") /* Decrement the number of properties in list */ plist->nprops--; @@ -3799,11 +3996,11 @@ H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name) /* If we get this far, then it wasn't in the list of changed properties, * nor in the properties in the class hierarchy, indicate an error */ - HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list") } /* end else */ done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_remove() */ @@ -3847,36 +4044,36 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name) H5P_genprop_t *new_prop=NULL; /* Pointer to new property */ herr_t ret_value=SUCCEED; /* return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_copy_prop_plist); + FUNC_ENTER_NOAPI_NOINIT(H5P_copy_prop_plist) - assert(name); + HDassert(name); /* Get the objects to operate on */ if(NULL == (src_plist = (H5P_genplist_t *)H5I_object(src_id)) || NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_id))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist"); + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist") /* If the property exists in the destination alread */ if(H5P_find_prop_plist(dst_plist,name)!=NULL) { /* Delete the property from the destination list, calling the 'close' callback if necessary */ if(H5P_remove(dst_id,dst_plist,name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property") /* Get the pointer to the source property */ prop=H5P_find_prop_plist(src_plist,name); /* Make a copy of the source property */ if((new_prop=H5P_dup_prop(prop,H5P_PROP_WITHIN_LIST)) == NULL) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property") /* Call property copy callback, if it exists */ if(new_prop->copy) { if((new_prop->copy)(new_prop->name,new_prop->size,new_prop->value) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property") } /* end if */ /* Insert the initialized property into the property list */ if(H5P_add_prop(dst_plist->props,new_prop) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into list"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into list") /* Increment the number of properties in list */ dst_plist->nprops++; @@ -3888,17 +4085,17 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name) /* Create property object from parameters */ if((new_prop=H5P_create_prop(prop->name,prop->size,H5P_PROP_WITHIN_LIST,prop->value,prop->create,prop->set,prop->get,prop->del,prop->copy,prop->cmp,prop->close)) == NULL) - HGOTO_ERROR (H5E_PLIST, H5E_CANTCREATE, FAIL,"Can't create property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL,"Can't create property") /* Call property creation callback, if it exists */ if(new_prop->create) { if((new_prop->create)(new_prop->name,new_prop->size,new_prop->value) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINIT, FAIL,"Can't initialize property"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL,"Can't initialize property") } /* end if */ /* Insert property into property list class */ if(H5P_add_prop(dst_plist->props,new_prop) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class") /* Increment property count for class */ dst_plist->nprops++; @@ -3912,7 +4109,7 @@ done: H5P_free_prop(new_prop); } /* end if */ - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_copy_prop_plist() */ @@ -3946,36 +4143,59 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5P_copy_prop_pclass(H5P_genclass_t *dst_pclass, H5P_genclass_t *src_pclass, const char *name) +H5P_copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name) { + H5P_genclass_t *src_pclass; /* Source property class, containing property to copy */ + H5P_genclass_t *dst_pclass; /* Destination property class */ + H5P_genclass_t *orig_dst_pclass; /* Original destination property class */ H5P_genprop_t *prop; /* Temporary property pointer */ - herr_t ret_value=SUCCEED; /* return value */ + herr_t ret_value = SUCCEED; /* return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_copy_prop_pclass); + FUNC_ENTER_NOAPI_NOINIT(H5P_copy_prop_pclass) - assert(dst_pclass); - assert(src_pclass); - assert(name); + /* Sanity check */ + HDassert(name); + + /* Get propery list classes */ + if(NULL == (src_pclass = (H5P_genclass_t *)H5I_object(src_id))) + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "source property class object doesn't exist") + if(NULL == (dst_pclass = (H5P_genclass_t *)H5I_object(dst_id))) + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "destination property class object doesn't exist") + + /* Get the property from the source */ + if(NULL == (prop = H5P_find_prop_pclass(src_pclass, name))) + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "unable to locate property") /* If the property exists in the destination already */ - if(H5P_exist_pclass(dst_pclass,name)) { + if(H5P_exist_pclass(dst_pclass, name)) { /* Delete the old property from the destination class */ - if(H5P_unregister(dst_pclass,name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property"); + if(H5P_unregister(dst_pclass, name) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property") } /* end if */ - /* Get the property from the source */ - if((prop=H5P_find_prop_pclass(src_pclass,name)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "unable to locate property"); - /* Register the property into the destination */ - if(H5P_register(dst_pclass,name,prop->size,prop->value,prop->create,prop->set,prop->get,prop->del,prop->copy,prop->cmp,prop->close) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property"); + orig_dst_pclass = dst_pclass; + if(H5P_register(&dst_pclass, name, prop->size, prop->value, prop->create, prop->set, prop->get, prop->del, prop->copy, prop->cmp, prop->close) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property") + + /* Check if the property class changed and needs to be substituted in the ID */ + if(dst_pclass != orig_dst_pclass) { + H5P_genclass_t *old_dst_pclass; /* Old destination property class */ + + /* Substitute the new destination property class in the ID */ + if(NULL == (old_dst_pclass = (H5P_genclass_t *)H5I_subst(dst_id, dst_pclass))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID") + HDassert(old_dst_pclass == orig_dst_pclass); + + /* Close the previous class */ + if(H5P_close_class(orig_dst_pclass) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "unable to close original property class after substitution") + } /* end if */ done: /* Cleanup, if necessary */ - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_copy_prop_pclass() */ @@ -4006,18 +4226,18 @@ H5P_unregister(H5P_genclass_t *pclass, const char *name) H5P_genprop_t *prop; /* Temporary property pointer */ herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_unregister); + FUNC_ENTER_NOAPI_NOINIT(H5P_unregister) - assert(pclass); - assert(name); + HDassert(pclass); + HDassert(name); /* Get the property node from the skip list */ if((prop = (H5P_genprop_t *)H5SL_search(pclass->props,name)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_NOTFOUND,FAIL,"can't find property in skip list") /* Remove the property from the skip list */ if(H5SL_remove(pclass->props,prop->name) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTDELETE,FAIL,"can't remove property from skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTDELETE,FAIL,"can't remove property from skip list") /* Free the property, ignoring return value, nothing we can do */ H5P_free_prop(prop); @@ -4029,7 +4249,7 @@ H5P_unregister(H5P_genclass_t *pclass, const char *name) pclass->revision = H5P_GET_NEXT_REV; done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_unregister() */ @@ -4071,14 +4291,14 @@ H5P_close(void *_plist) unsigned make_cb=0; /* Operator data for property free callback */ herr_t ret_value=SUCCEED; /* return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_close); + FUNC_ENTER_NOAPI_NOINIT(H5P_close) - assert(plist); + HDassert(plist); /* Make call to property list class close callback, if needed * (up through chain of parent classes also) */ - if(plist->class_init !=0) { + if(plist->class_init) { tclass = plist->pclass; while(NULL != tclass) { if(NULL != tclass->close_func) { @@ -4097,7 +4317,7 @@ H5P_close(void *_plist) * already been seen) */ if((seen = H5SL_create(H5SL_TYPE_STR)) == NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties") nseen = 0; /* Walk through the changed properties in the list */ @@ -4115,7 +4335,7 @@ H5P_close(void *_plist) /* Add property name to "seen" list */ if(H5SL_insert(seen,tmp->name,tmp->name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list") nseen++; /* Get the next property node in the skip list */ @@ -4152,7 +4372,7 @@ H5P_close(void *_plist) /* Allocate space for a temporary copy of the property value */ if(NULL==(tmp_value=H5MM_malloc(tmp->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for temporary property value"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for temporary property value") HDmemcpy(tmp_value,tmp->value,tmp->size); /* Call the 'close' callback */ @@ -4165,7 +4385,7 @@ H5P_close(void *_plist) /* Add property name to "seen" list, if we have other classes to work on */ if(has_parent_class) { if(H5SL_insert(seen,tmp->name,tmp->name) < 0) - HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list") nseen++; } /* end if */ } /* end if */ @@ -4181,7 +4401,7 @@ H5P_close(void *_plist) /* Decrement class's dependant property list value! */ if(H5P_access_class(plist->pclass,H5P_MOD_DEC_LST) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_CANTINIT, FAIL, "Can't decrement class ref count"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Can't decrement class ref count") /* Free the list of 'seen' properties */ H5SL_close(seen); @@ -4201,7 +4421,7 @@ done: if(seen != NULL) H5SL_close(seen); - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_close() */ @@ -4230,15 +4450,15 @@ H5P_get_class_name(H5P_genclass_t *pclass) { char *ret_value; /* return value */ - FUNC_ENTER_NOAPI(H5P_get_class_name, NULL); + FUNC_ENTER_NOAPI(H5P_get_class_name, NULL) - assert(pclass); + HDassert(pclass); /* Get class name */ ret_value=H5MM_xstrdup(pclass->name); done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_get_class_name() */ @@ -4271,9 +4491,9 @@ H5P_get_class_path(H5P_genclass_t *pclass) size_t my_path_len; /* This class's name's length */ char *ret_value; /* return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_get_class_path); + FUNC_ENTER_NOAPI_NOINIT(H5P_get_class_path) - assert(pclass); + HDassert(pclass); /* Recursively build the full path */ if(pclass->parent!=NULL) { @@ -4288,7 +4508,7 @@ H5P_get_class_path(H5P_genclass_t *pclass) * separator, this class's name and the string terminator */ if(NULL == (ret_value = (char *)H5MM_malloc(par_path_len + 1 + my_path_len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for class name"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for class name") /* Build the full path for this class */ HDstrcpy(ret_value,par_path); @@ -4305,7 +4525,7 @@ H5P_get_class_path(H5P_genclass_t *pclass) ret_value=H5MM_xstrdup(pclass->name); done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_get_class_path() */ @@ -4359,7 +4579,7 @@ H5P_open_class_path(const char *path) /* Find the class with this name & parent by iterating over the open classes */ if(NULL == (curr_class = (H5P_genclass_t *)H5I_search(H5I_GENPROP_CLS, H5P_check_class, &check_info, FALSE))) - HGOTO_ERROR (H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class"); + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class") /* Advance the pointer in the path to the start of the next component */ curr_name=delimit+1; @@ -4411,14 +4631,14 @@ H5P_get_class_parent(const H5P_genclass_t *pclass) { H5P_genclass_t *ret_value; /* return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_class_parent); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_class_parent) - assert(pclass); + HDassert(pclass); /* Get property size */ ret_value = pclass->parent; - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_get_class_parent() */ @@ -4442,18 +4662,18 @@ H5P_get_class_parent(const H5P_genclass_t *pclass) herr_t H5P_close_class(void *_pclass) { - H5P_genclass_t *pclass=(H5P_genclass_t *)_pclass; - herr_t ret_value=SUCCEED; /* Return value */ + H5P_genclass_t *pclass = (H5P_genclass_t *)_pclass; + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5P_close_class); + FUNC_ENTER_NOAPI_NOINIT(H5P_close_class) - assert(pclass); + HDassert(pclass); /* Decrement the reference count & check if the object should go away */ - if(H5P_access_class(pclass,H5P_MOD_DEC_REF) < 0) - HGOTO_ERROR (H5E_PLIST, H5E_NOTFOUND, FAIL, "Can't decrement ID ref count"); + if(H5P_access_class(pclass, H5P_MOD_DEC_REF) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't decrement ID ref count") done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5P_close_class() */ diff --git a/src/H5Plapl.c b/src/H5Plapl.c index 608240f..22cef28 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -158,27 +158,23 @@ H5P_lacc_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI_NOINIT(H5P_lacc_reg_prop) /* Register property for number of links traversed */ - if(H5P_register(pclass, H5L_ACS_NLINKS_NAME, H5L_ACS_NLINKS_SIZE, - &nlinks, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5L_ACS_NLINKS_NAME, H5L_ACS_NLINKS_SIZE, &nlinks, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register property for external link prefix */ - if(H5P_register(pclass, H5L_ACS_ELINK_PREFIX_NAME, H5L_ACS_ELINK_PREFIX_SIZE, - &elink_prefix, NULL, NULL, NULL, H5L_ACS_ELINK_PREFIX_DEL, H5L_ACS_ELINK_PREFIX_COPY, NULL, H5L_ACS_ELINK_PREFIX_CLOSE) < 0) + if(H5P_register_real(pclass, H5L_ACS_ELINK_PREFIX_NAME, H5L_ACS_ELINK_PREFIX_SIZE, &elink_prefix, NULL, NULL, NULL, H5L_ACS_ELINK_PREFIX_DEL, H5L_ACS_ELINK_PREFIX_COPY, NULL, H5L_ACS_ELINK_PREFIX_CLOSE) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register fapl for link access */ - if(H5P_register(pclass, H5L_ACS_ELINK_FAPL_NAME, H5L_ACS_ELINK_FAPL_SIZE, &def_fapl_id, NULL, NULL, NULL, H5L_ACS_ELINK_FAPL_DEL, H5L_ACS_ELINK_FAPL_COPY, NULL, H5L_ACS_ELINK_FAPL_CLOSE) < 0) + if(H5P_register_real(pclass, H5L_ACS_ELINK_FAPL_NAME, H5L_ACS_ELINK_FAPL_SIZE, &def_fapl_id, NULL, NULL, NULL, H5L_ACS_ELINK_FAPL_DEL, H5L_ACS_ELINK_FAPL_COPY, NULL, H5L_ACS_ELINK_FAPL_CLOSE) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register property for external link file access flags */ - if(H5P_register(pclass, H5L_ACS_ELINK_FLAGS_NAME, H5L_ACS_ELINK_FLAGS_SIZE, - &elink_flags, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5L_ACS_ELINK_FLAGS_NAME, H5L_ACS_ELINK_FLAGS_SIZE, &elink_flags, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register property for external link file traversal callback */ - if(H5P_register(pclass, H5L_ACS_ELINK_CB_NAME, H5L_ACS_ELINK_CB_SIZE, - &elink_cb, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5L_ACS_ELINK_CB_NAME, H5L_ACS_ELINK_CB_SIZE, &elink_cb, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c index 1e4355e..ffc68fa 100644 --- a/src/H5Plcpl.c +++ b/src/H5Plcpl.c @@ -119,8 +119,7 @@ H5P_lcrt_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI(H5P_lcrt_reg_prop, FAIL) /* Register create intermediate groups property */ - if(H5P_register(pclass, H5L_CRT_INTERMEDIATE_GROUP_NAME, H5L_CRT_INTERMEDIATE_GROUP_SIZE, - &intmd_group, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5L_CRT_INTERMEDIATE_GROUP_NAME, H5L_CRT_INTERMEDIATE_GROUP_SIZE, &intmd_group, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 9f144f1..ac46228 100755 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -136,23 +136,19 @@ H5P_ocrt_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI_NOINIT(H5P_ocrt_reg_prop) /* Register max. compact attribute storage property */ - if(H5P_register(pclass, H5O_CRT_ATTR_MAX_COMPACT_NAME, H5O_CRT_ATTR_MAX_COMPACT_SIZE, - &attr_max_compact, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5O_CRT_ATTR_MAX_COMPACT_NAME, H5O_CRT_ATTR_MAX_COMPACT_SIZE, &attr_max_compact, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register min. dense attribute storage property */ - if(H5P_register(pclass, H5O_CRT_ATTR_MIN_DENSE_NAME, H5O_CRT_ATTR_MIN_DENSE_SIZE, - &attr_min_dense, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5O_CRT_ATTR_MIN_DENSE_NAME, H5O_CRT_ATTR_MIN_DENSE_SIZE, &attr_min_dense, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register object header flags property */ - if(H5P_register(pclass, H5O_CRT_OHDR_FLAGS_NAME, H5O_CRT_OHDR_FLAGS_SIZE, - &ohdr_flags, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5O_CRT_OHDR_FLAGS_NAME, H5O_CRT_OHDR_FLAGS_SIZE, &ohdr_flags, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the pipeline property */ - if(H5P_register(pclass, H5O_CRT_PIPELINE_NAME, H5O_CRT_PIPELINE_SIZE, - &pline, NULL, NULL, NULL, NULL, NULL, H5O_CRT_PIPELINE_CMP, NULL) < 0) + if(H5P_register_real(pclass, H5O_CRT_PIPELINE_NAME, H5O_CRT_PIPELINE_SIZE, &pline, NULL, NULL, NULL, NULL, NULL, H5O_CRT_PIPELINE_CMP, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c index 2b43428..963dddc 100755 --- a/src/H5Pocpypl.c +++ b/src/H5Pocpypl.c @@ -118,8 +118,7 @@ H5P_ocpy_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI(H5P_ocpy_reg_prop, FAIL) /* Register copy options property */ - if(H5P_register(pclass, H5O_CPY_OPTION_NAME, H5O_CPY_OPTION_SIZE, - &ocpy_option, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5O_CPY_OPTION_NAME, H5O_CPY_OPTION_SIZE, &ocpy_option, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index fd9c65a..1e71049 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -69,7 +69,7 @@ typedef struct H5P_genprop_t { size_t size; /* Size of property value */ void *value; /* Pointer to property value */ H5P_prop_within_t type; /* Type of object the property is within */ - unsigned shared_name; /* Boolean: whether the name is shared or not */ + hbool_t shared_name; /* Whether the name is shared or not */ /* Callback function pointers & info */ H5P_prp_create_func_t create; /* Function to call when a property is created */ @@ -89,8 +89,8 @@ struct H5P_genclass_t { unsigned plists; /* Number of property lists that have been created since the last modification to the class */ unsigned classes; /* Number of classes that have been derived since the last modification to the class */ unsigned ref_count; /* Number of oustanding ID's open on this class object */ - unsigned internal; /* Whether this class is internal to the library or not */ - unsigned deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists to close */ + hbool_t internal; /* Whether this class is internal to the library or not */ + hbool_t deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists to close */ unsigned revision; /* Revision number of a particular class (global) */ H5SL_t *props; /* Skip list containing properties */ @@ -106,9 +106,9 @@ struct H5P_genclass_t { /* Define structure to hold property list information */ struct H5P_genplist_t { H5P_genclass_t *pclass; /* Pointer to class info */ - hid_t plist_id; /* Copy of the property list ID (for use in close callback) */ - size_t nprops; /* Number of properties in class */ - unsigned class_init:1; /* Whether the class initialization callback finished successfully */ + hid_t plist_id; /* Copy of the property list ID (for use in close callback) */ + size_t nprops; /* Number of properties in class */ + hbool_t class_init; /* Whether the class initialization callback finished successfully */ H5SL_t *del; /* Skip list containing names of deleted properties */ H5SL_t *props; /* Skip list containing properties */ }; @@ -155,6 +155,16 @@ H5_DLL H5P_genclass_t *H5P_create_class(H5P_genclass_t *par_class, H5P_cls_copy_func_t cls_copy, void *copy_data, H5P_cls_close_func_t cls_close, void *close_data); H5_DLL H5P_genclass_t *H5P_copy_pclass(H5P_genclass_t *pclass); +H5_DLL herr_t H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size, + const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, + H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, + H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, + H5P_prp_close_func_t prp_close); +H5_DLL herr_t H5P_register(H5P_genclass_t **pclass, const char *name, size_t size, + const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, + H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, + H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, + H5P_prp_close_func_t prp_close); H5_DLL herr_t H5P_add_prop(H5SL_t *props, H5P_genprop_t *prop); H5_DLL herr_t H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod); H5_DLL htri_t H5P_exist_pclass(H5P_genclass_t *pclass, const char *name); @@ -171,8 +181,7 @@ H5_DLL int H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func, H5_DLL int H5P_iterate_pclass(hid_t pclass_id, int *idx, H5P_iterate_t iter_func, void *iter_data); H5_DLL herr_t H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name); -H5_DLL herr_t H5P_copy_prop_pclass(H5P_genclass_t *dst_pclass, H5P_genclass_t *src_pclass, - const char *name); +H5_DLL herr_t H5P_copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name); H5_DLL herr_t H5P_unregister(H5P_genclass_t *pclass, const char *name); H5_DLL char *H5P_get_class_path(H5P_genclass_t *pclass); H5_DLL H5P_genclass_t *H5P_open_class_path(const char *path); diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index f544dbc..ab3f1d0 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -70,11 +70,6 @@ H5_DLL htri_t H5P_exist_plist(H5P_genplist_t *plist, const char *name); H5_DLL char *H5P_get_class_name(H5P_genclass_t *pclass); H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, hbool_t recurse); -H5_DLL herr_t H5P_register(H5P_genclass_t *pclass, const char *name, size_t size, - const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, - H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, - H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, - H5P_prp_close_func_t prp_close); H5_DLL hid_t H5P_get_driver(H5P_genplist_t *plist); H5_DLL void * H5P_get_driver_info(H5P_genplist_t *plist); H5_DLL herr_t H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c index 7e3195e..5125511 100644 --- a/src/H5Pstrcpl.c +++ b/src/H5Pstrcpl.c @@ -117,8 +117,7 @@ H5P_strcrt_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_NOAPI(H5P_strcrt_reg_prop, FAIL) /* Register character encoding */ - if(H5P_register(pclass, H5P_STRCRT_CHAR_ENCODING_NAME, H5P_STRCRT_CHAR_ENCODING_SIZE, - &char_encoding, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + if(H5P_register_real(pclass, H5P_STRCRT_CHAR_ENCODING_NAME, H5P_STRCRT_CHAR_ENCODING_SIZE, &char_encoding, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: diff --git a/src/H5R.c b/src/H5R.c index 933f983..36391a8 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -20,6 +20,7 @@ #include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Gprivate.h" /* Groups */ diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c index 9dcfa45..0e2acc8 100644 --- a/src/H5Rdeprec.c +++ b/src/H5Rdeprec.c @@ -41,6 +41,7 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Gprivate.h" /* Groups */ #include "H5Oprivate.h" /* Object headers */ diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c index 9a214ea..32ded03 100644 --- a/src/H5SMmessage.c +++ b/src/H5SMmessage.c @@ -201,7 +201,7 @@ H5SM_message_compare(const void *rec1, const void *rec2) * message in the index, we've found the message. */ if(mesg->location == H5SM_IN_HEAP && key->message.location == H5SM_IN_HEAP) { - if(key->message.u.heap_loc.fheap_id == mesg->u.heap_loc.fheap_id) + if(key->message.u.heap_loc.fheap_id.val == mesg->u.heap_loc.fheap_id.val) HGOTO_DONE(0); } /* end if */ else if(mesg->location == H5SM_IN_OH && key->message.location == H5SM_IN_OH) { @@ -301,7 +301,7 @@ H5SM_message_encode(uint8_t *raw, const void *_nrecord, void *_ctx) if(message->location == H5SM_IN_HEAP) { UINT32ENCODE(raw, message->u.heap_loc.ref_count); - UINT64ENCODE(raw, message->u.heap_loc.fheap_id); + HDmemcpy(raw, message->u.heap_loc.fheap_id.id, (size_t)H5O_FHEAP_ID_LEN); } /* end if */ else { HDassert(message->location == H5SM_IN_OH); @@ -342,7 +342,7 @@ H5SM_message_decode(const uint8_t *raw, void *_nrecord, void *_ctx) if(message->location == H5SM_IN_HEAP) { UINT32DECODE(raw, message->u.heap_loc.ref_count); - UINT64DECODE(raw, message->u.heap_loc.fheap_id); + HDmemcpy(message->u.heap_loc.fheap_id.id, raw, (size_t)H5O_FHEAP_ID_LEN); } /* end if */ else { HDassert(message->location == H5SM_IN_OH); diff --git a/src/H5Shyper.c b/src/H5Shyper.c index bdcdc28..0565cf3 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -5421,17 +5421,17 @@ H5S_hyper_spans_nelem (H5S_hyper_span_info_t *spans) REVISION LOG --------------------------------------------------------------------------*/ static H5S_hyper_span_info_t * -H5S_hyper_make_spans (unsigned rank, const hsize_t *start, const hsize_t *stride, +H5S_hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride, const hsize_t *count, const hsize_t *block) { - H5S_hyper_span_info_t *down; /* Pointer to spans in next dimension down */ - H5S_hyper_span_t *span; /* New hyperslab span */ - H5S_hyper_span_t *last_span; /* Current position in hyperslab span list */ - H5S_hyper_span_t *head; /* Head of new hyperslab span list */ - hsize_t stride_iter; /* Iterator over the stride values */ - int i; /* Counters */ - unsigned u; /* Counters */ - H5S_hyper_span_info_t *ret_value = NULL; + H5S_hyper_span_info_t *down; /* Pointer to spans in next dimension down */ + H5S_hyper_span_t *span; /* New hyperslab span */ + H5S_hyper_span_t *last_span; /* Current position in hyperslab span list */ + H5S_hyper_span_t *head; /* Head of new hyperslab span list */ + hsize_t stride_iter; /* Iterator over the stride values */ + int i; /* Counters */ + unsigned u; /* Counters */ + H5S_hyper_span_info_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_make_spans); @@ -5446,6 +5446,10 @@ H5S_hyper_make_spans (unsigned rank, const hsize_t *start, const hsize_t *stride down = NULL; for(i = (rank - 1); i >= 0; i--) { + /* Sanity check */ + if(0 == count[i]) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, NULL, "count == 0 is invalid") + /* Start a new list in this dimension */ head = NULL; last_span = NULL; @@ -5454,11 +5458,11 @@ H5S_hyper_make_spans (unsigned rank, const hsize_t *start, const hsize_t *stride for(u = 0, stride_iter = 0; u < count[i]; u++, stride_iter += stride[i]) { /* Allocate a span node */ if(NULL == (span = H5FL_MALLOC(H5S_hyper_span_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") /* Set the span's basic information */ span->low = start[i] + stride_iter; - span->high = span->low + (block[i]-1); + span->high = span->low + (block[i] - 1); span->nelem = block[i]; span->pstride = stride[i]; span->next = NULL; @@ -5484,7 +5488,7 @@ H5S_hyper_make_spans (unsigned rank, const hsize_t *start, const hsize_t *stride /* Allocate a span info node */ if(NULL == (down = H5FL_MALLOC(H5S_hyper_span_info_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span"); + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") /* Set the reference count */ down->count = 0; @@ -5509,17 +5513,17 @@ done: if(head && down) if(down->head != head) down = NULL; - + do { if(down) { head = down->head; - (void)H5FL_FREE(H5S_hyper_span_info_t, down); + down = H5FL_FREE(H5S_hyper_span_info_t, down); } /* end if */ down = head->down; - + while(head) { last_span = head->next; - (void)H5FL_FREE(H5S_hyper_span_t, head); + head = H5FL_FREE(H5S_hyper_span_t, head); head = last_span; } /* end while */ } while(down); @@ -7374,74 +7378,70 @@ H5S_hyper_get_seq_list_gen(const H5S_t *space,H5S_sel_iter_t *iter, /* Advance the hyperslab iterator */ /* Check if we are done */ - if(io_bytes_left>0) { + if(io_bytes_left > 0) { /* Move to next span in fastest changing dimension */ - curr_span=curr_span->next; + curr_span = curr_span->next; - if(curr_span!=NULL) { + if(NULL != curr_span) { /* Move location offset of destination */ - loc_off+=(curr_span->low-abs_arr[fast_dim])*elem_size; + loc_off += (curr_span->low - abs_arr[fast_dim]) * elem_size; /* Move iterator for fastest changing dimension */ - abs_arr[fast_dim]=curr_span->low; + abs_arr[fast_dim] = curr_span->low; } /* end if */ } /* end if */ else { - abs_arr[fast_dim]+=span_size/elem_size; + abs_arr[fast_dim] += span_size / elem_size; /* Check if we are still within the span */ - if(abs_arr[fast_dim]<=curr_span->high) { - iter->u.hyp.span[fast_dim]=curr_span; - - goto partial_done; /* finished with partial span */ + if(abs_arr[fast_dim] <= curr_span->high) { + iter->u.hyp.span[fast_dim] = curr_span; } /* end if */ /* If we walked off that span, advance to the next span */ else { /* Advance span in this dimension */ - curr_span=curr_span->next; + curr_span = curr_span->next; /* Check if we have a valid span in this dimension still */ - if(curr_span!=NULL) { + if(NULL != curr_span) { /* Reset absolute position */ - abs_arr[fast_dim]=curr_span->low; - iter->u.hyp.span[fast_dim]=curr_span; - - goto partial_done; /* finished with partial span */ + abs_arr[fast_dim] = curr_span->low; + iter->u.hyp.span[fast_dim] = curr_span; } /* end if */ } /* end else */ } /* end else */ /* Adjust iterator pointers */ - if(curr_span==NULL) { + if(NULL == curr_span) { /* Same as code in main loop */ /* Start at the next fastest dim */ - curr_dim=fast_dim-1; + curr_dim = fast_dim - 1; /* Work back up through the dimensions */ - while(curr_dim>=0) { + while(curr_dim >= 0) { /* Reset the current span */ - curr_span=iter->u.hyp.span[curr_dim]; + curr_span = iter->u.hyp.span[curr_dim]; /* Increment absolute position */ abs_arr[curr_dim]++; /* Check if we are still within the span */ - if(abs_arr[curr_dim]<=curr_span->high) { + if(abs_arr[curr_dim] <= curr_span->high) { break; } /* end if */ /* If we walked off that span, advance to the next span */ else { /* Advance span in this dimension */ - curr_span=curr_span->next; + curr_span = curr_span->next; /* Check if we have a valid span in this dimension still */ - if(curr_span!=NULL) { + if(NULL != curr_span) { /* Reset the span in the current dimension */ - ispan[curr_dim]=curr_span; + ispan[curr_dim] = curr_span; /* Reset absolute position */ - abs_arr[curr_dim]=curr_span->low; + abs_arr[curr_dim] = curr_span->low; break; } /* end if */ @@ -7452,63 +7452,61 @@ H5S_hyper_get_seq_list_gen(const H5S_t *space,H5S_sel_iter_t *iter, } /* end else */ } /* end while */ - /* Check if we are finished with the spans in the tree */ - if(curr_dim<0) { - /* We had better be done with I/O or bad things are going to happen... */ - assert(io_bytes_left==0); - - goto partial_done; /* finished with partial span */ - } /* end if */ - else { + /* Check if we have more spans in the tree */ + if(curr_dim >= 0) { /* Walk back down the iterator positions, reseting them */ - while(curr_dimdown); - assert(curr_span->down->head); + while(curr_dim < fast_dim) { + HDassert(curr_span); + HDassert(curr_span->down); + HDassert(curr_span->down->head); /* Increment current dimension */ curr_dim++; /* Set the new span_info & span for this dimension */ - iter->u.hyp.span[curr_dim]=curr_span->down->head; + iter->u.hyp.span[curr_dim] = curr_span->down->head; /* Advance span down the tree */ - curr_span=curr_span->down->head; + curr_span = curr_span->down->head; /* Reset the absolute offset for the dim */ - abs_arr[curr_dim]=curr_span->low; + abs_arr[curr_dim] = curr_span->low; } /* end while */ /* Verify that the curr_span points to the fastest dim */ - assert(curr_span==iter->u.hyp.span[fast_dim]); - } /* end else */ + HDassert(curr_span == iter->u.hyp.span[fast_dim]); - /* Reset the buffer offset */ - for(i=0, loc_off=0; i0 && curr_seq 0 && curr_seq < maxseq) { + /* Sanity check */ + HDassert(curr_span); + /* Adjust location offset of destination to compensate for initial increment below */ - loc_off-=curr_span->pstride; + loc_off -= curr_span->pstride; /* Loop over all the spans in the fastest changing dimension */ - while(curr_span!=NULL) { + while(curr_span != NULL) { /* Move location offset of destination */ - loc_off+=curr_span->pstride; + loc_off += curr_span->pstride; /* Compute the number of elements to attempt in this span */ - H5_ASSIGN_OVERFLOW(span_size,curr_span->nelem,hsize_t,size_t); + H5_ASSIGN_OVERFLOW(span_size, curr_span->nelem, hsize_t, size_t); /* Check number of elements against upper bounds allowed */ - if(span_size>=io_bytes_left) { + if(span_size >= io_bytes_left) { /* Trim the number of bytes to output */ - span_size=io_bytes_left; - io_bytes_left=0; + span_size = io_bytes_left; + io_bytes_left = 0; /* COMMON */ /* Store the I/O information for the span */ diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 5f4c74d..d2e46cf 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -384,8 +384,8 @@ H5S_point_iter_release (H5S_sel_iter_t UNUSED * iter) static herr_t H5S_point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *coord) { - H5S_pnt_node_t *top, *curr, *new_node; /* Point selection nodes */ - unsigned i; /* Counter */ + H5S_pnt_node_t *top = NULL, *curr = NULL, *new_node = NULL; /* Point selection nodes */ + unsigned u; /* Counter */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5S_point_add) @@ -395,26 +395,27 @@ H5S_point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *co HDassert(coord); HDassert(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND); - top = curr = NULL; - for(i = 0; i < num_elem; i++) { + for(u = 0; u < num_elem; u++) { /* Allocate space for the new node */ if(NULL == (new_node = H5FL_MALLOC(H5S_pnt_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate point node") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate point node") + /* Initialize fields in node */ + new_node->next = NULL; if(NULL == (new_node->pnt = (hsize_t *)H5MM_malloc(space->extent.rank * sizeof(hsize_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate coordinate information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate coordinate information") /* Copy over the coordinates */ - HDmemcpy(new_node->pnt, coord + (i * space->extent.rank), (space->extent.rank * sizeof(hsize_t))); + HDmemcpy(new_node->pnt, coord + (u * space->extent.rank), (space->extent.rank * sizeof(hsize_t))); /* Link into list */ - new_node->next = NULL; if(top == NULL) top = new_node; else curr->next = new_node; curr = new_node; } /* end for */ + new_node = NULL; /* Insert the list of points selected in the proper place */ if(op == H5S_SELECT_SET || op == H5S_SELECT_PREPEND) { @@ -426,13 +427,15 @@ H5S_point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *co space->select.sel_info.pnt_lst->head = top; } /* end if */ else { /* op==H5S_SELECT_APPEND */ - new_node = space->select.sel_info.pnt_lst->head; - if(new_node != NULL) { - while(new_node->next != NULL) - new_node = new_node->next; + H5S_pnt_node_t *tmp_node; /* Temporary point selection node */ + + tmp_node = space->select.sel_info.pnt_lst->head; + if(tmp_node != NULL) { + while(tmp_node->next != NULL) + tmp_node = tmp_node->next; /* Append new list to point selection */ - new_node->next = top; + tmp_node->next = top; } /* end if */ else space->select.sel_info.pnt_lst->head = top; @@ -445,6 +448,20 @@ H5S_point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *co space->select.num_elem += num_elem; done: + if(ret_value < 0) { + /* Release possibly partially initialized new node */ + if(new_node) + new_node = H5FL_FREE(H5S_pnt_node_t, new_node); + + /* Release possible linked list of nodes */ + while(top) { + curr = top->next; + H5MM_xfree(top->pnt); + top = H5FL_FREE(H5S_pnt_node_t, top); + top = curr; + } /* end while */ + } /* end if */ + FUNC_LEAVE_NOAPI(ret_value) } /* H5S_point_add() */ @@ -477,20 +494,19 @@ H5S_point_release (H5S_t *space) HDassert(space); /* Delete all the nodes from the list */ - curr=space->select.sel_info.pnt_lst->head; - while(curr!=NULL) { - next=curr->next; + curr = space->select.sel_info.pnt_lst->head; + while(curr != NULL) { + next = curr->next; H5MM_xfree(curr->pnt); - (void)H5FL_FREE(H5S_pnt_node_t, curr); - curr=next; + curr = H5FL_FREE(H5S_pnt_node_t, curr); + curr = next; } /* end while */ /* Free & reset the point list header */ - (void)H5FL_FREE(H5S_pnt_list_t, space->select.sel_info.pnt_lst); - space->select.sel_info.pnt_lst=NULL; + space->select.sel_info.pnt_lst = H5FL_FREE(H5S_pnt_list_t, space->select.sel_info.pnt_lst); /* Reset the number of elements in the selection */ - space->select.num_elem=0; + space->select.num_elem = 0; FUNC_LEAVE_NOAPI(SUCCEED) } /* H5S_point_release() */ diff --git a/src/H5T.c b/src/H5T.c index 0a7eec4..8ecbd68 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -34,6 +34,7 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ @@ -1937,9 +1938,9 @@ done: * Raymond Lu * 4 December 2009 * Added a flag as a parameter to indicate whether the caller is - * H5Tdetect_class. I also added the check for VL string type + * H5Tdetect_class. I also added the check for VL string type * just like the public function. Because we want to tell users - * VL string is a string type but we treat it as a VL type + * VL string is a string type but we treat it as a VL type * internally, H5T_detect_class needs to know where the caller * is from. *------------------------------------------------------------------------- @@ -1962,7 +1963,7 @@ H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api) */ if(from_api && H5T_IS_VL_STRING(dt->shared)) HGOTO_DONE(H5T_STRING == cls); - + /* Check if this type is the correct type */ if(dt->shared->type==cls) HGOTO_DONE(TRUE); @@ -3852,7 +3853,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) /* Sanity check */ HDassert(dt1); HDassert(dt2); - + /* the easy case */ if(dt1 == dt2) HGOTO_DONE(0); diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 46a1ac8..2320b28 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -32,6 +32,7 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5FOprivate.h" /* File objects */ #include "H5Iprivate.h" /* IDs */ diff --git a/src/H5Tconv.c b/src/H5Tconv.c index bfa5d56..cda9011 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -10501,6 +10501,8 @@ H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, sfirst = (ssize_t)(src.prec - 1); is_max_neg = 0; } + if(sfirst < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "zero bit not found") /* Sign bit has been negated if bit vector isn't 0x80...00. Set all bits in front of * sign bit to 0 in the temporary buffer because they're all negated from the previous diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c index 9d9ad36..07d3865 100644 --- a/src/H5Tdeprec.c +++ b/src/H5Tdeprec.c @@ -41,6 +41,7 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5FOprivate.h" /* File objects */ #include "H5Iprivate.h" /* IDs */ diff --git a/src/H5Tenum.c b/src/H5Tenum.c index f955a7e..6da6931 100644 --- a/src/H5Tenum.c +++ b/src/H5Tenum.c @@ -466,10 +466,11 @@ H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t si /* Set return value */ ret_value=name; - if (H5T_close(copied_dt)<0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close data type"); - done: + if(copied_dt) + if(H5T_close(copied_dt) < 0) + HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close data type"); + FUNC_LEAVE_NOAPI(ret_value) } @@ -591,9 +592,11 @@ H5T_enum_valueof(const H5T_t *dt, const char *name, void *value/*out*/) HDmemcpy(value, copied_dt->shared->u.enumer.value+md*copied_dt->shared->size, copied_dt->shared->size); - if (H5T_close(copied_dt)<0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close data type"); - done: + if(copied_dt) + if(H5T_close(copied_dt) < 0) + HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close data type") + FUNC_LEAVE_NOAPI(ret_value) } + diff --git a/src/H5Tnative.c b/src/H5Tnative.c index 8d8920b..b22e3e5 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -38,7 +38,7 @@ static H5T_t *H5T_get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction size_t *struct_align, size_t *offset, size_t *comp_size); static H5T_t *H5T_get_native_float(size_t size, H5T_direction_t direction, size_t *struct_align, size_t *offset, size_t *comp_size); -static H5T_t* H5T_get_native_bitfield(size_t prec, H5T_direction_t direction, +static H5T_t* H5T_get_native_bitfield(size_t prec, H5T_direction_t direction, size_t *struct_align, size_t *offset, size_t *comp_size); static herr_t H5T_cmp_offset(size_t *comp_size, size_t *offset, size_t elem_size, size_t nelems, size_t align, size_t *struct_align); @@ -795,7 +795,7 @@ done: *------------------------------------------------------------------------- */ static H5T_t* -H5T_get_native_bitfield(size_t prec, H5T_direction_t direction, size_t *struct_align, +H5T_get_native_bitfield(size_t prec, H5T_direction_t direction, size_t *struct_align, size_t *offset, size_t *comp_size) { H5T_t *dt; /* Appropriate native datatype to copy */ diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index 412012a..8a6ee05 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -161,7 +161,7 @@ H5T_vlen_create(const H5T_t *base) /* Build new type */ if(NULL == (dt = H5T_alloc())) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "memory allocation failed") dt->shared->type = H5T_VLEN; /* @@ -169,7 +169,8 @@ H5T_vlen_create(const H5T_t *base) * data, not point to the same VL sequences) */ dt->shared->force_conv = TRUE; - dt->shared->parent = H5T_copy(base, H5T_COPY_ALL); + if(NULL == (dt->shared->parent = H5T_copy(base, H5T_COPY_ALL))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy base datatype") /* Inherit encoding version from base type */ dt->shared->version = base->shared->version; @@ -185,6 +186,10 @@ H5T_vlen_create(const H5T_t *base) ret_value = dt; done: + if(!ret_value) + if(dt && H5T_close(dt) < 0) + HDONE_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, NULL, "unable to release datatype info") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_vlen_create() */ @@ -280,11 +285,11 @@ H5T_vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc) /* Set file ID (since this VL is on disk) */ dt->shared->u.vlen.f = f; break; - + case H5T_LOC_BADLOC: /* Allow undefined location. In H5Odtype.c, H5O_dtype_decode sets undefined * location for VL type and leaves it for the caller to decide. - */ + */ break; default: diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index 8e32ab7..5927713 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -16,6 +16,7 @@ #define H5Z_PACKAGE /*suppress error about including H5Zpkg */ #include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ diff --git a/src/H5detect.c b/src/H5detect.c index ebd042d..8fc1690 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -109,7 +109,6 @@ static void detect_C99_integers32(void); static void detect_C99_integers64(void); static void detect_alignments(void); static void insert_libhdf5_settings(FILE *flibinfo); -static void make_libinfo(void); static size_t align_g[] = {1, 2, 4, 8, 16}; static jmp_buf jbuf_g; @@ -504,99 +503,6 @@ sigbus_handler(int UNUSED signo) /*------------------------------------------------------------------------- - * Function: insert_libhdf5_settings - * - * Purpose: insert the contents of libhdf5.settings into a file - * represented by flibinfo. - * Make it an empty string if H5_HAVE_EMBEDDED_LIBINFO is not - * defined, i.e., not enabled. - * - * Return: void - * - * Programmer: Albert Cheng - * Apr 20, 2009 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -#define LIBSETTINGSFNAME "libhdf5.settings" -static void -insert_libhdf5_settings(FILE *flibinfo) -{ -#ifdef H5_HAVE_EMBEDDED_LIBINFO - FILE *fsettings; /* for files libhdf5.settings */ - int inchar; - int bol=0; /* indicates the beginning of a new line */ - - if (NULL==(fsettings=HDfopen(LIBSETTINGSFNAME, "r"))){ - perror(LIBSETTINGSFNAME); - exit(1); - } - /* print variable definition and the string */ - fprintf(flibinfo, "char H5libhdf5_settings[]=\n"); - bol++; - while (EOF != (inchar = getc(fsettings))){ - if (bol){ - /* Start a new line */ - fprintf(flibinfo, "\t\""); - bol = 0; - } - if (inchar == '\n'){ - /* end of a line */ - fprintf(flibinfo, "\\n\"\n"); - bol++; - }else{ - putc(inchar, flibinfo); - } - } - if (feof(fsettings)){ - /* wrap up */ - if (!bol){ - /* EOF found without a new line */ - fprintf(flibinfo, "\\n\"\n"); - }; - fprintf(flibinfo, ";\n\n"); - }else{ - fprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME); - exit(1); - } - if (0 != fclose(fsettings)){ - perror(LIBSETTINGSFNAME); - exit(1); - } -#else - /* print variable definition and an empty string */ - fprintf(flibinfo, "char H5libhdf5_settings[]=\"\";\n"); -#endif -} - - -/*------------------------------------------------------------------------- - * Function: make_libinfo - * - * Purpose: Create the embedded library information definition. - * This sets up for a potential extension that the declaration - * is printed to a file different from stdout. - * - * Return: void - * - * Programmer: Albert Cheng - * Sep 15, 2009 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -static void -make_libinfo(void) -{ - /* print variable definition and then the string as a macro. */ - insert_libhdf5_settings(stdout); -} - - -/*------------------------------------------------------------------------- * Function: print_results * * Purpose: Prints information about the detected data types. @@ -677,9 +583,6 @@ print_results(int nd, detected_t *d, int na, malign_t *misc_align) /*******************/\n\ \n"); - /* Generate embedded library information variable definition */ - make_libinfo(); - /* The interface initialization function */ printf("\n\ \n\ @@ -1154,8 +1057,8 @@ find_bias(int epos, int esize, int *perm, void *_a) /*------------------------------------------------------------------------- * Function: print_header - * - * Purpose: Prints the C file header for the generated file. + * + * Purpose: Prints the C file header for the generated file. * * Return: void * diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c new file mode 100644 index 0000000..771c510 --- /dev/null +++ b/src/H5make_libsettings.c @@ -0,0 +1,278 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*keep this declaration near the top of this file -RPM*/ +static const char *FileHeader = "\n\ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\ + * Copyright by The HDF Group. *\n\ + * Copyright by the Board of Trustees of the University of Illinois. *\n\ + * All rights reserved. *\n\ + * *\n\ + * This file is part of HDF5. The full HDF5 copyright notice, including *\n\ + * terms governing use, modification, and redistribution, is contained in *\n\ + * the files COPYING and Copyright.html. COPYING can be found at the root *\n\ + * of the source code distribution tree; Copyright.html can be found at the *\n\ + * root level of an installed copy of the electronic HDF5 document set and *\n\ + * is linked from the top-level documents page. It can also be found at *\n\ + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n\ + * access to either file, you may request a copy from help@hdfgroup.org. *\n\ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"; +/* + * + * Created: H5make_libsettings.c + * 17 Mar 2010 + * Quincey Koziol + * + * Purpose: Generate the H5libsettings.h header file from the + * libhdf5.settings file. + * + *------------------------------------------------------------------------- + */ +#include +#include +#include "H5private.h" + +#define LIBSETTINGSFNAME "libhdf5.settings" + + +/*------------------------------------------------------------------------- + * Function: insert_libhdf5_settings + * + * Purpose: insert the contents of libhdf5.settings into a file + * represented by flibinfo. + * Make it an empty string if H5_HAVE_EMBEDDED_LIBINFO is not + * defined, i.e., not enabled. + * + * Return: void + * + * Programmer: Albert Cheng + * Apr 20, 2009 + * + *------------------------------------------------------------------------- + */ +static void +insert_libhdf5_settings(FILE *flibinfo) +{ +#ifdef H5_HAVE_EMBEDDED_LIBINFO + FILE *fsettings; /* for files libhdf5.settings */ + int inchar; + int bol=0; /* indicates the beginning of a new line */ + + if (NULL==(fsettings=HDfopen(LIBSETTINGSFNAME, "r"))){ + perror(LIBSETTINGSFNAME); + exit(1); + } + /* print variable definition and the string */ + fprintf(flibinfo, "static const char H5libhdf5_settings[]=\n"); + bol++; + while (EOF != (inchar = getc(fsettings))){ + if (bol){ + /* Start a new line */ + fprintf(flibinfo, "\t\""); + bol = 0; + } + if (inchar == '\n'){ + /* end of a line */ + fprintf(flibinfo, "\\n\"\n"); + bol++; + }else{ + putc(inchar, flibinfo); + } + } + if (feof(fsettings)){ + /* wrap up */ + if (!bol){ + /* EOF found without a new line */ + fprintf(flibinfo, "\\n\"\n"); + }; + fprintf(flibinfo, ";\n\n"); + }else{ + fprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME); + exit(1); + } + if (0 != fclose(fsettings)){ + perror(LIBSETTINGSFNAME); + exit(1); + } +#else + /* print variable definition and an empty string */ + fprintf(flibinfo, "static const char H5libhdf5_settings[]=\"\";\n"); +#endif +} /* insert_libhdf5_settings() */ + + +/*------------------------------------------------------------------------- + * Function: make_libinfo + * + * Purpose: Create the embedded library information definition. + * This sets up for a potential extension that the declaration + * is printed to a file different from stdout. + * + * Return: void + * + * Programmer: Albert Cheng + * Sep 15, 2009 + * + *------------------------------------------------------------------------- + */ +static void +make_libinfo(void) +{ + /* print variable definition and then the string as a macro. */ + insert_libhdf5_settings(stdout); +} + + +/*------------------------------------------------------------------------- + * Function: print_header + * + * Purpose: Prints the C file header for the generated file. + * + * Return: void + * + * Programmer: Robb Matzke + * matzke@llnl.gov + * Mar 12 1997 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void +print_header(void) +{ + time_t now = time(NULL); + struct tm *tm = localtime(&now); + char real_name[30]; + char host_name[256]; + int i; + const char *s; +#ifdef H5_HAVE_GETPWUID + struct passwd *pwd = NULL; +#else + int pwd = 1; +#endif + static const char *month_name[] = + { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + static const char *purpose = "\ +This machine-generated source code contains\n\ +information about the library build configuration\n"; + + /* + * The real name is the first item from the passwd gecos field. + */ +#ifdef H5_HAVE_GETPWUID + { + size_t n; + char *comma; + if ((pwd = getpwuid(getuid()))) { + if ((comma = strchr(pwd->pw_gecos, ','))) { + n = MIN(sizeof(real_name)-1, (unsigned)(comma-pwd->pw_gecos)); + strncpy(real_name, pwd->pw_gecos, n); + real_name[n] = '\0'; + } else { + strncpy(real_name, pwd->pw_gecos, sizeof(real_name)); + real_name[sizeof(real_name) - 1] = '\0'; + } + } else { + real_name[0] = '\0'; + } + } +#else + real_name[0] = '\0'; +#endif + + /* + * The FQDM of this host or the empty string. + */ +#ifdef H5_HAVE_GETHOSTNAME + if (gethostname(host_name, sizeof(host_name)) < 0) { + host_name[0] = '\0'; + } +#else + host_name[0] = '\0'; +#endif + + /* + * The file header: warning, copyright notice, build information. + */ + printf("/* Generated automatically by H5make_libsettings -- do not edit */\n\n\n"); + puts(FileHeader); /*the copyright notice--see top of this file */ + + printf(" *\n * Created:\t\t%s %2d, %4d\n", + month_name[tm->tm_mon], tm->tm_mday, 1900 + tm->tm_year); + if (pwd || real_name[0] || host_name[0]) { + printf(" *\t\t\t"); + if (real_name[0]) printf("%s <", real_name); +#ifdef H5_HAVE_GETPWUID + if (pwd) fputs(pwd->pw_name, stdout); +#endif + if (host_name[0]) printf("@%s", host_name); + if (real_name[0]) printf(">"); + putchar('\n'); + } + printf(" *\n * Purpose:\t\t"); + for (s = purpose; *s; s++) { + putchar(*s); + if ('\n' == *s && s[1]) printf(" *\t\t\t"); + } + + printf(" *\n * Modifications:\n *\n"); + printf(" *\tDO NOT MAKE MODIFICATIONS TO THIS FILE!\n"); + printf(" *\tIt was generated by code in `H5make_libsettings.c'.\n"); + + printf(" *\n *"); + for (i = 0; i < 73; i++) putchar('-'); + printf("\n */\n\n"); + +} + + +/*------------------------------------------------------------------------- + * Function: main + * + * Purpose: Main entry point. + * + * Return: Success: exit(0) + * + * Failure: exit(1) + * + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 12, 1996 + * + * Modifications: + * Albert Cheng, 2004/05/20 + * Some compilers, e.g., Intel C v7.0, took a long time to compile + * with optimization when a module routine contains many code lines. + * Divide up all those types detections macros into subroutines, both + * to avoid the compiler optimization error and cleaner codes. + * + *------------------------------------------------------------------------- + */ +int +main(void) +{ + + print_header(); + + /* Generate embedded library information variable definition */ + make_libinfo(); + + return 0; +} + diff --git a/src/H5private.h b/src/H5private.h index c0b5054..277fe70 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1143,7 +1143,7 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #ifndef HDsrandom #define HDsrandom(S) HDsrand(S) #endif /* HDsrandom */ - #elif H5_HAVE_RANDOM +#elif H5_HAVE_RANDOM #ifndef HDsrand #define HDsrand(S) srandom(S) #endif /* HDsrand */ @@ -1535,7 +1535,6 @@ typedef struct H5_debug_t { extern H5_debug_t H5_debug_g; #define H5DEBUG(X) (H5_debug_g.pkg[H5_PKG_##X].stream) -extern char H5libhdf5_settings[]; /* embedded library information */ /*------------------------------------------------------------------------- * Purpose: These macros are inserted automatically just after the diff --git a/src/H5public.h b/src/H5public.h index 5c1aff8..7213909 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -71,10 +71,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 59 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 64 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "FA_a4" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.59-FA_a4" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.64-FA_a4" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/H5system.c b/src/H5system.c index 9d93d9c..5725218 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -592,7 +592,7 @@ HDremove_all(const char *fname) * This implementation is taken from the Cygwin source distribution at * src/winsup/mingw/mingwex/gettimeofday.c * - * The original source code was contributed by + * The original source code was contributed by * Danny Smith * and released in the public domain. * @@ -606,7 +606,7 @@ HDremove_all(const char *fname) /* Offset between 1/1/1601 and 1/1/1970 in 100 nanosec units */ #define _W32_FT_OFFSET (116444736000000000ULL) -int +int HDgettimeofday(struct timeval *tv, void *tz) { union { diff --git a/src/H5trace.c b/src/H5trace.c index b554b80..8c83505 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -916,172 +916,189 @@ H5_trace (const double *returning, const char *func, const char *type, ...) break; case 'i': - if (ptr) { - if (vp) { - fprintf (out, "0x%lx", (unsigned long)vp); - } else { + if(ptr) { + if(vp) + fprintf(out, "0x%lx", (unsigned long)vp); + else fprintf(out, "NULL"); - } - } else { + } /* end if */ + else { hid_t obj = va_arg (ap, hid_t); - if (H5P_DEFAULT == obj) { - fprintf (out, "H5P_DEFAULT"); - } else if (obj<0) { - fprintf (out, "FAIL"); - } else { - switch (H5I_TYPE(obj)) { /* Use internal H5I macro instead of function call */ + + if(H5P_DEFAULT == obj) + fprintf(out, "H5P_DEFAULT"); + else if(obj < 0) + fprintf(out, "FAIL"); + else { + switch(H5I_TYPE(obj)) { /* Use internal H5I macro instead of function call */ case H5I_UNINIT: - fprintf (out, "%ld (uninit - error)", (long)obj); + fprintf(out, "%ld (uninit - error)", (long)obj); break; + case H5I_BADID: - fprintf (out, "%ld (error)", (long)obj); + fprintf(out, "%ld (error)", (long)obj); break; + case H5I_FILE: fprintf(out, "%ld (file)", (long)obj); break; + case H5I_GROUP: fprintf(out, "%ld (group)", (long)obj); break; + case H5I_DATATYPE: - if (obj==H5T_NATIVE_SCHAR_g) { + if(obj == H5T_NATIVE_SCHAR_g) fprintf(out, "H5T_NATIVE_SCHAR"); - } else if (obj==H5T_NATIVE_UCHAR_g) { + else if(obj == H5T_NATIVE_UCHAR_g) fprintf(out, "H5T_NATIVE_UCHAR"); - } else if (obj==H5T_NATIVE_SHORT_g) { + else if(obj == H5T_NATIVE_SHORT_g) fprintf(out, "H5T_NATIVE_SHORT"); - } else if (obj==H5T_NATIVE_USHORT_g) { + else if(obj == H5T_NATIVE_USHORT_g) fprintf(out, "H5T_NATIVE_USHORT"); - } else if (obj==H5T_NATIVE_INT_g) { + else if(obj == H5T_NATIVE_INT_g) fprintf(out, "H5T_NATIVE_INT"); - } else if (obj==H5T_NATIVE_UINT_g) { + else if(obj == H5T_NATIVE_UINT_g) fprintf(out, "H5T_NATIVE_UINT"); - } else if (obj==H5T_NATIVE_LONG_g) { + else if(obj == H5T_NATIVE_LONG_g) fprintf(out, "H5T_NATIVE_LONG"); - } else if (obj==H5T_NATIVE_ULONG_g) { + else if(obj == H5T_NATIVE_ULONG_g) fprintf(out, "H5T_NATIVE_ULONG"); - } else if (obj==H5T_NATIVE_LLONG_g) { + else if(obj == H5T_NATIVE_LLONG_g) fprintf(out, "H5T_NATIVE_LLONG"); - } else if (obj==H5T_NATIVE_ULLONG_g) { + else if(obj == H5T_NATIVE_ULLONG_g) fprintf(out, "H5T_NATIVE_ULLONG"); - } else if (obj==H5T_NATIVE_FLOAT_g) { + else if(obj == H5T_NATIVE_FLOAT_g) fprintf(out, "H5T_NATIVE_FLOAT"); - } else if (obj==H5T_NATIVE_DOUBLE_g) { + else if(obj == H5T_NATIVE_DOUBLE_g) fprintf(out, "H5T_NATIVE_DOUBLE"); #if H5_SIZEOF_LONG_DOUBLE !=0 - } else if (obj==H5T_NATIVE_LDOUBLE_g) { + else if(obj == H5T_NATIVE_LDOUBLE_g) fprintf(out, "H5T_NATIVE_LDOUBLE"); #endif - } else if (obj==H5T_IEEE_F32BE_g) { + else if(obj == H5T_IEEE_F32BE_g) fprintf(out, "H5T_IEEE_F32BE"); - } else if (obj==H5T_IEEE_F32LE_g) { + else if(obj == H5T_IEEE_F32LE_g) fprintf(out, "H5T_IEEE_F32LE"); - } else if (obj==H5T_IEEE_F64BE_g) { + else if(obj == H5T_IEEE_F64BE_g) fprintf(out, "H5T_IEEE_F64BE"); - } else if (obj==H5T_IEEE_F64LE_g) { + else if(obj == H5T_IEEE_F64LE_g) fprintf(out, "H5T_IEEE_F64LE"); - } else if (obj==H5T_STD_I8BE_g) { + else if(obj == H5T_STD_I8BE_g) fprintf(out, "H5T_STD_I8BE"); - } else if (obj==H5T_STD_I8LE_g) { + else if(obj == H5T_STD_I8LE_g) fprintf(out, "H5T_STD_I8LE"); - } else if (obj==H5T_STD_I16BE_g) { + else if(obj == H5T_STD_I16BE_g) fprintf(out, "H5T_STD_I16BE"); - } else if (obj==H5T_STD_I16LE_g) { + else if(obj == H5T_STD_I16LE_g) fprintf(out, "H5T_STD_I16LE"); - } else if (obj==H5T_STD_I32BE_g) { + else if(obj == H5T_STD_I32BE_g) fprintf(out, "H5T_STD_I32BE"); - } else if (obj==H5T_STD_I32LE_g) { + else if(obj == H5T_STD_I32LE_g) fprintf(out, "H5T_STD_I32LE"); - } else if (obj==H5T_STD_I64BE_g) { + else if(obj == H5T_STD_I64BE_g) fprintf(out, "H5T_STD_I64BE"); - } else if (obj==H5T_STD_I64LE_g) { + else if(obj == H5T_STD_I64LE_g) fprintf(out, "H5T_STD_I64LE"); - } else if (obj==H5T_STD_U8BE_g) { + else if(obj == H5T_STD_U8BE_g) fprintf(out, "H5T_STD_U8BE"); - } else if (obj==H5T_STD_U8LE_g) { + else if(obj == H5T_STD_U8LE_g) fprintf(out, "H5T_STD_U8LE"); - } else if (obj==H5T_STD_U16BE_g) { + else if(obj == H5T_STD_U16BE_g) fprintf(out, "H5T_STD_U16BE"); - } else if (obj==H5T_STD_U16LE_g) { + else if(obj == H5T_STD_U16LE_g) fprintf(out, "H5T_STD_U16LE"); - } else if (obj==H5T_STD_U32BE_g) { + else if(obj == H5T_STD_U32BE_g) fprintf(out, "H5T_STD_U32BE"); - } else if (obj==H5T_STD_U32LE_g) { + else if(obj == H5T_STD_U32LE_g) fprintf(out, "H5T_STD_U32LE"); - } else if (obj==H5T_STD_U64BE_g) { + else if(obj == H5T_STD_U64BE_g) fprintf(out, "H5T_STD_U64BE"); - } else if (obj==H5T_STD_U64LE_g) { + else if(obj == H5T_STD_U64LE_g) fprintf(out, "H5T_STD_U64LE"); - } else if (obj==H5T_STD_B8BE_g) { + else if(obj == H5T_STD_B8BE_g) fprintf(out, "H5T_STD_B8BE"); - } else if (obj==H5T_STD_B8LE_g) { + else if(obj == H5T_STD_B8LE_g) fprintf(out, "H5T_STD_B8LE"); - } else if (obj==H5T_STD_B16BE_g) { + else if(obj == H5T_STD_B16BE_g) fprintf(out, "H5T_STD_B16BE"); - } else if (obj==H5T_STD_B16LE_g) { + else if(obj == H5T_STD_B16LE_g) fprintf(out, "H5T_STD_B16LE"); - } else if (obj==H5T_STD_B32BE_g) { + else if(obj == H5T_STD_B32BE_g) fprintf(out, "H5T_STD_B32BE"); - } else if (obj==H5T_STD_B32LE_g) { + else if(obj == H5T_STD_B32LE_g) fprintf(out, "H5T_STD_B32LE"); - } else if (obj==H5T_STD_B64BE_g) { + else if(obj == H5T_STD_B64BE_g) fprintf(out, "H5T_STD_B64BE"); - } else if (obj==H5T_STD_B64LE_g) { + else if(obj == H5T_STD_B64LE_g) fprintf(out, "H5T_STD_B64LE"); - } else if (obj==H5T_C_S1_g) { + else if(obj == H5T_C_S1_g) fprintf(out, "H5T_C_S1"); - } else if (obj==H5T_FORTRAN_S1_g) { + else if(obj == H5T_FORTRAN_S1_g) fprintf(out, "H5T_FORTRAN_S1"); - } else { + else fprintf(out, "%ld (dtype)", (long)obj); - } break; + case H5I_DATASPACE: fprintf(out, "%ld (dspace)", (long)obj); /* Save the rank of simple data spaces for arrays */ /* This may generate recursive call to the library... -QAK */ { - H5S_t *space = (H5S_t *)H5I_object(obj); - if (H5S_SIMPLE==H5S_GET_EXTENT_TYPE(space)) { - asize[argno] = H5S_GET_EXTENT_NDIMS(space); - } + H5S_t *space; + + if(NULL != (space = (H5S_t *)H5I_object(obj))) + if(H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space)) + asize[argno] = H5S_GET_EXTENT_NDIMS(space); } break; + case H5I_DATASET: fprintf(out, "%ld (dset)", (long)obj); break; + case H5I_ATTR: fprintf(out, "%ld (attr)", (long)obj); break; + case H5I_REFERENCE: fprintf(out, "%ld (reference)", (long)obj); break; + case H5I_VFL: fprintf(out, "%ld (file driver)", (long)obj); break; + case H5I_GENPROP_CLS: fprintf(out, "%ld (genprop class)", (long)obj); break; + case H5I_GENPROP_LST: fprintf(out, "%ld (genprop list)", (long)obj); break; + case H5I_ERROR_CLASS: fprintf(out, "%ld (err class)", (long)obj); break; + case H5I_ERROR_MSG: fprintf(out, "%ld (err msg)", (long)obj); break; + case H5I_ERROR_STACK: fprintf(out, "%ld (err stack)", (long)obj); break; + case H5I_NTYPES: fprintf (out, "%ld (ntypes - error)", (long)obj); break; + default: fprintf(out, "%ld (unknown class)", (long)obj); break; - } - } - } + } /* end switch */ + } /* end else */ + } /* end else */ break; case 'I': diff --git a/src/Makefile.am b/src/Makefile.am index 5c5a7aa..899cdde 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,7 @@ include $(top_srcdir)/config/lt_vers.am # Use -g to force no optimization since many compilers (e.g., Intel) takes # a long time to compile it with any optimization on. H5detect is used # to generate H5Tinit.c once. So, optimization is not critical. -noinst_PROGRAMS = H5detect +noinst_PROGRAMS = H5detect H5make_libsettings H5detect_CFLAGS = -g $(AM_CFLAGS) # Our main target, the HDF5 library @@ -36,7 +36,7 @@ lib_LTLIBRARIES=libhdf5.la libhdf5_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) # H5Tinit.c is a generated file, and should be cleaned. -MOSTLYCLEANFILES=H5Tinit.c +MOSTLYCLEANFILES=H5Tinit.c H5lib_settings.h # H5pubconf.h is generated by configure, and should be cleaned. DISTCLEANFILES=H5pubconf.h @@ -137,6 +137,20 @@ H5Tinit.c: H5detect$(EXEEXT) (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ ($(RM) $@ ; exit 1) +H5.o H5.lo: H5lib_settings.h + +# Build configuration header file generation +# The LD_LIBRARY_PATH setting is a kludge. +# Things should have been all set during H5make_libsettings making. +# Remove the generated .h file if errors occur unless HDF5_Make_Ignore +# is set to ignore the error. +H5lib_settings.h: H5make_libsettings$(EXEEXT) libhdf5.settings + LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ + sed -e 's/-L/:/g' -e 's/ //g'`" \ + $(RUNSERIAL) ./H5make_libsettings$(EXEEXT) > H5lib_settings.h || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + ($(RM) $@ ; exit 1) + # Error header generation # # Actually, H5Einit.h, H5Eterm.h, H5Edefin.h and H5Epubgen.h all diff --git a/src/Makefile.in b/src/Makefile.in index dcabcfe..059176a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -59,7 +59,7 @@ DIST_COMMON = $(include_HEADERS) $(srcdir)/H5config.h.in \ $(srcdir)/libhdf5.settings.in $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am \ $(top_srcdir)/config/lt_vers.am COPYING -noinst_PROGRAMS = H5detect$(EXEEXT) +noinst_PROGRAMS = H5detect$(EXEEXT) H5make_libsettings$(EXEEXT) TESTS = subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -158,6 +158,9 @@ H5detect_LDADD = $(LDADD) H5detect_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(H5detect_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ +H5make_libsettings_SOURCES = H5make_libsettings.c +H5make_libsettings_OBJECTS = H5make_libsettings.$(OBJEXT) +H5make_libsettings_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles @@ -171,8 +174,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libhdf5_la_SOURCES) H5detect.c -DIST_SOURCES = $(libhdf5_la_SOURCES) H5detect.c +SOURCES = $(libhdf5_la_SOURCES) H5detect.c H5make_libsettings.c +DIST_SOURCES = $(libhdf5_la_SOURCES) H5detect.c H5make_libsettings.c DATA = $(settings_DATA) HEADERS = $(include_HEADERS) ETAGS = etags @@ -441,7 +444,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 49 +LT_VERS_REVISION = 54 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) @@ -452,7 +455,7 @@ lib_LTLIBRARIES = libhdf5.la libhdf5_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) # H5Tinit.c is a generated file, and should be cleaned. -MOSTLYCLEANFILES = H5Tinit.c +MOSTLYCLEANFILES = H5Tinit.c H5lib_settings.h # H5pubconf.h is generated by configure, and should be cleaned. DISTCLEANFILES = H5pubconf.h @@ -656,6 +659,9 @@ clean-noinstPROGRAMS: H5detect$(EXEEXT): $(H5detect_OBJECTS) $(H5detect_DEPENDENCIES) @rm -f H5detect$(EXEEXT) $(H5detect_LINK) $(H5detect_OBJECTS) $(H5detect_LDADD) $(LIBS) +H5make_libsettings$(EXEEXT): $(H5make_libsettings_OBJECTS) $(H5make_libsettings_DEPENDENCIES) + @rm -f H5make_libsettings$(EXEEXT) + $(LINK) $(H5make_libsettings_OBJECTS) $(H5make_libsettings_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -919,6 +925,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5checksum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5dbg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5detect-H5detect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5make_libsettings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5system.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5timer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5trace.Plo@am__quote@ @@ -1250,6 +1257,20 @@ H5Tinit.c: H5detect$(EXEEXT) (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ ($(RM) $@ ; exit 1) +H5.o H5.lo: H5lib_settings.h + +# Build configuration header file generation +# The LD_LIBRARY_PATH setting is a kludge. +# Things should have been all set during H5make_libsettings making. +# Remove the generated .h file if errors occur unless HDF5_Make_Ignore +# is set to ignore the error. +H5lib_settings.h: H5make_libsettings$(EXEEXT) libhdf5.settings + LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ + sed -e 's/-L/:/g' -e 's/ //g'`" \ + $(RUNSERIAL) ./H5make_libsettings$(EXEEXT) > H5lib_settings.h || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + ($(RM) $@ ; exit 1) + # Error header generation # # Actually, H5Einit.h, H5Eterm.h, H5Edefin.h and H5Epubgen.h all diff --git a/test/H5srcdir.h b/test/H5srcdir.h new file mode 100644 index 0000000..55700cb --- /dev/null +++ b/test/H5srcdir.h @@ -0,0 +1,74 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Programmer: Quincey Koziol + * Wednesday, March 17, 2010 + * + * Purpose: srcdir querying support. + */ +#ifndef _H5SRCDIR_H +#define _H5SRCDIR_H + +/* Include the header file with the correct relative path for the srcdir string */ +#include "H5srcdir_str.h" + +/* Buffer to construct path in and return pointer to */ +static char srcdir_path[1024] = ""; + +/* Buffer to construct file in and return pointer to */ +static char srcdir_testpath[1024] = ""; + +/* Append the test file name to the srcdir path and return the whole string */ +static const char *H5_get_srcdir_filename(const char *filename) +{ + const char *srcdir = HDgetenv("srcdir"); + + /* Check for using the srcdir from configure time */ + if(NULL == srcdir) + srcdir = config_srcdir; + + /* Build path to test file */ + if((HDstrlen(srcdir) + HDstrlen(filename) + 2) < sizeof(srcdir_testpath)) { + HDstrcpy(srcdir_testpath, srcdir); + HDstrcat(srcdir_testpath, "/"); + HDstrcat(srcdir_testpath, filename); + return(srcdir_testpath); + } /* end if */ + else + return(NULL); +} + +/* Just return the srcdir path */ +static const char *H5_get_srcdir(void) +{ + const char *srcdir = HDgetenv("srcdir"); + + /* Check for using the srcdir from configure time */ + if(NULL == srcdir) + srcdir = config_srcdir; + + /* Build path to all test files */ + if((HDstrlen(srcdir) + 2) < sizeof(srcdir_path)) { + HDstrcpy(srcdir_path, srcdir); + HDstrcat(srcdir_path, "/"); + return(srcdir_path); + } /* end if */ + else + return(NULL); +} +#endif /* _H5SRCDIR_H */ + + diff --git a/test/H5srcdir_str.h.in b/test/H5srcdir_str.h.in new file mode 100644 index 0000000..d472124 --- /dev/null +++ b/test/H5srcdir_str.h.in @@ -0,0 +1,22 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* If you are reading this file and it has a '.h' suffix, it was automatically + * generated from the '.in' version. Make changes there. + */ + +/* Set the 'srcdir' path from configure time */ +static const char *config_srcdir = "@srcdir@"; + diff --git a/test/Makefile.am b/test/Makefile.am index accd774..4ce0b0c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -110,7 +110,7 @@ CHECK_CLEANFILES+=cmpd_dset.h5 compact_dataset.h5 dataset.h5 \ max_compact_dataset.h5 simple.h5 set_local.h5 random_chunks.h5 \ huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_fast.h5 \ chunk_expand.h5 \ - extend.h5 istore.h5 extlinks*.h5 frspace.h5 links*.h5 \ + copy_dcpl_newfile.h5 extend.h5 istore.h5 extlinks*.h5 frspace.h5 links*.h5 \ sys_file1 tfile[1-4].h5 th5s[1-3].h5 lheap.h5 fheap.h5 ohdr.h5 \ stab.h5 extern_[1-3].h5 extern_[1-4][ab].raw gheap[0-4].h5 \ dt_arith[1-2] links.h5 links[0-6]*.h5 extlinks[0-15].h5 tmp \ diff --git a/test/Makefile.in b/test/Makefile.in index 609c79d..ab9e3ee 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -52,9 +52,10 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/testcheck_version.sh.in $(srcdir)/testerror.sh.in \ - $(srcdir)/testlibinfo.sh.in $(top_srcdir)/config/commence.am \ +DIST_COMMON = $(srcdir)/H5srcdir_str.h.in $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/testcheck_version.sh.in \ + $(srcdir)/testerror.sh.in $(srcdir)/testlibinfo.sh.in \ + $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am COPYING bin_PROGRAMS = swmr_generator$(EXEEXT) swmr_reader$(EXEEXT) \ swmr_writer$(EXEEXT) @@ -69,7 +70,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h -CONFIG_CLEAN_FILES = testcheck_version.sh testerror.sh testlibinfo.sh +CONFIG_CLEAN_FILES = testcheck_version.sh testerror.sh H5srcdir_str.h \ + testlibinfo.sh CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libh5test_la_LIBADD = @@ -691,25 +693,25 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog cmpd_dset.h5 \ compact_dataset.h5 dataset.h5 dset_offset.h5 \ max_compact_dataset.h5 simple.h5 set_local.h5 random_chunks.h5 \ huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_fast.h5 \ - chunk_expand.h5 extend.h5 istore.h5 extlinks*.h5 frspace.h5 \ - links*.h5 sys_file1 tfile[1-4].h5 th5s[1-3].h5 lheap.h5 \ - fheap.h5 ohdr.h5 stab.h5 extern_[1-3].h5 extern_[1-4][ab].raw \ - gheap[0-4].h5 dt_arith[1-2] links.h5 links[0-6]*.h5 \ - extlinks[0-15].h5 tmp big.data big[0-9][0-9][0-9][0-9][0-9].h5 \ - stdio.h5 sec2.h5 dtypes[1-8].h5 dt_arith[1-2].h5 tattr.h5 \ - tselect.h5 mtime.h5 unlink.h5 unicode.h5 coord.h5 \ - fillval_[0-9].h5 fillval.raw mount_[0-9].h5 testmeta.h5 \ - ttime.h5 trefer[1-3].h5 tvltypes.h5 tvlstr.h5 tvlstr2.h5 \ - flush.h5 enum1.h5 titerate.h5 ttsafe.h5 tarray1.h5 tgenprop.h5 \ - tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin getname.h5 \ - getname[1-3].h5 sec2_file.h5 direct_file.h5 \ - family_file000[0-3][0-9].h5 new_family_v16_000[0-3][0-9].h5 \ - multi_file-[rs].h5 core_file new_move_[ab].h5 ntypes.h5 \ - dangle.h5 error_test.h5 err_compat.h5 dtransform.h5 \ - test_filters.h5 get_file_name.h5 tstint[1-2].h5 \ - unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \ - objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 farray.h5 \ - earray.h5 swmr_data.h5 + chunk_expand.h5 copy_dcpl_newfile.h5 extend.h5 istore.h5 \ + extlinks*.h5 frspace.h5 links*.h5 sys_file1 tfile[1-4].h5 \ + th5s[1-3].h5 lheap.h5 fheap.h5 ohdr.h5 stab.h5 extern_[1-3].h5 \ + extern_[1-4][ab].raw gheap[0-4].h5 dt_arith[1-2] links.h5 \ + links[0-6]*.h5 extlinks[0-15].h5 tmp big.data \ + big[0-9][0-9][0-9][0-9][0-9].h5 stdio.h5 sec2.h5 \ + dtypes[1-8].h5 dt_arith[1-2].h5 tattr.h5 tselect.h5 mtime.h5 \ + unlink.h5 unicode.h5 coord.h5 fillval_[0-9].h5 fillval.raw \ + mount_[0-9].h5 testmeta.h5 ttime.h5 trefer[1-3].h5 tvltypes.h5 \ + tvlstr.h5 tvlstr2.h5 flush.h5 enum1.h5 titerate.h5 ttsafe.h5 \ + tarray1.h5 tgenprop.h5 tmisc[0-9]*.h5 set_extent[1-5].h5 \ + ext[12].bin getname.h5 getname[1-3].h5 sec2_file.h5 \ + direct_file.h5 family_file000[0-3][0-9].h5 \ + new_family_v16_000[0-3][0-9].h5 multi_file-[rs].h5 core_file \ + new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 \ + err_compat.h5 dtransform.h5 test_filters.h5 get_file_name.h5 \ + tstint[1-2].h5 unlink_chunked.h5 btree2.h5 objcopy_src.h5 \ + objcopy_dst.h5 objcopy_ext.dat trefer1.h5 trefer2.h5 \ + app_ref.h5 farray.h5 earray.h5 swmr_data.h5 INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src # Test script for error_test and err_compat @@ -822,6 +824,8 @@ testcheck_version.sh: $(top_builddir)/config.status $(srcdir)/testcheck_version. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ testerror.sh: $(top_builddir)/config.status $(srcdir)/testerror.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +H5srcdir_str.h: $(top_builddir)/config.status $(srcdir)/H5srcdir_str.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ testlibinfo.sh: $(top_builddir)/config.status $(srcdir)/testlibinfo.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ diff --git a/test/cache.c b/test/cache.c index 74900ec..e02f14a 100644 --- a/test/cache.c +++ b/test/cache.c @@ -3011,7 +3011,7 @@ check_flush_cache(void) if ( show_progress ) { - HDfprintf(stdout, "%s: calling check_flush_cache__empty_cache().\n", + HDfprintf(stdout, "%s: calling check_flush_cache__empty_cache().\n", fcn_name); } @@ -6139,7 +6139,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) */ if ( pass ) { - spec[0].flush_ops[0].flag = TRUE; + spec[0].flush_ops[1].flag = TRUE; test_num = 10; check_flush_cache__flush_op_test(file_ptr, @@ -9263,7 +9263,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(1).\n", + HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(1).\n", fcn_name, test_num, (int)pass); } @@ -9296,7 +9296,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(2).\n", + HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(2).\n", fcn_name, test_num, (int)pass); } @@ -9324,7 +9324,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(3).\n", + HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(3).\n", fcn_name, test_num, (int)pass); } @@ -9367,7 +9367,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: Setting up the test.\n", + HDfprintf(stdout, "%s:%d:%d: Setting up the test.\n", fcn_name, test_num, (int)pass); } @@ -9378,7 +9378,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s:%d: Inserting entry(%d,%d) with flags 0x%x.\n", fcn_name, test_num, (int)(spec[i].entry_type), @@ -9393,7 +9393,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s:%d: Protecting entry(%d,%d).\n", fcn_name, test_num, (int)(spec[i].entry_type), @@ -9404,7 +9404,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s:%d: Unprotecting entry(%d,%d) with flags 0x%x ns = %d.\n", fcn_name, test_num, (int)(spec[i].entry_type), @@ -9457,7 +9457,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: Running the test.\n", + HDfprintf(stdout, "%s:%d:%d: Running the test.\n", fcn_name, test_num, (int)pass); } @@ -9478,7 +9478,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: Checking test results(1).\n", + HDfprintf(stdout, "%s:%d:%d: Checking test results(1).\n", fcn_name, test_num, (int)pass); } @@ -9521,7 +9521,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: Checking test results(2).\n", + HDfprintf(stdout, "%s:%d:%d: Checking test results(2).\n", fcn_name, test_num, (int)pass); } @@ -9645,7 +9645,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: Checking test results(3).\n", + HDfprintf(stdout, "%s:%d:%d: Checking test results(3).\n", fcn_name, test_num, (int)pass); } @@ -9680,7 +9680,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(1).\n", + HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(1).\n", fcn_name, test_num, (int)pass); } @@ -9723,7 +9723,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(2).\n", + HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(2).\n", fcn_name, test_num, (int)pass); } @@ -9745,7 +9745,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( show_progress ) { - HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(3).\n", + HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(3).\n", fcn_name, test_num, (int)pass); } @@ -9886,7 +9886,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) { pass = FALSE; - failure_mssg = + failure_mssg = "unexpected cache config at start of flush op eviction test."; } else { @@ -9922,39 +9922,39 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) */ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0); - unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 0, + unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 0, H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1); - unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 1, + unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET, (size_t)0); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2); - unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 2, + unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET, (size_t)0); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3); - unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 3, + unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 3, H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4); - unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 4, + unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 4, H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5); - unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 5, + unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 5, H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6); - unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 6, + unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 6, H5C__NO_FLAGS_SET, (size_t)0); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7); - unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 7, + unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 7, H5C__NO_FLAGS_SET, (size_t)0); if ( ( cache_ptr->index_len != 8 ) || @@ -10057,14 +10057,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 0; i < 31; i++ ) { protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 1; i++ ) { protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10132,7 +10132,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 2; protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 1, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG, (size_t)0); if ( ( cache_ptr->index_len != 40 ) || @@ -10198,7 +10198,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 3; protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 2, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__DIRTIED_FLAG, (size_t)0); if ( ( cache_ptr->index_len != 40 ) || @@ -10271,11 +10271,11 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 5; protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 3, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 3, H5C__DIRTIED_FLAG, (size_t)0); protect_entry(file_ptr, LARGE_ENTRY_TYPE, 4); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 4, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 4, H5C__DIRTIED_FLAG, (size_t)0); /* verify cache size */ @@ -10312,14 +10312,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 0; i < 31; i++ ) { protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 5; i++ ) { protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10379,7 +10379,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 5; i < 8; i++ ) { protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10441,7 +10441,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 8; i < 9; i++ ) { protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10507,7 +10507,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 9; i < 10; i++ ) { protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10543,14 +10543,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 0; i < 31; i++ ) { protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 10; i++ ) { protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10654,7 +10654,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 10; i < 12; i++ ) { protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10687,14 +10687,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 0; i < num_monster_entries; i++ ) { protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < num_large_entries; i++ ) { protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10781,7 +10781,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 12; i < 14; i++ ) { protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -13534,8 +13534,8 @@ check_get_entry_status(void) hbool_t is_pinned; size_t entry_size; H5F_t * file_ptr = NULL; - test_entry_t * base_addr; - test_entry_t * entry_ptr; + test_entry_t * base_addr = NULL; + test_entry_t * entry_ptr = NULL; TESTING("H5C_get_entry_status() functionality"); @@ -13548,8 +13548,18 @@ check_get_entry_status(void) file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024)); - base_addr = entries[0]; - entry_ptr = &(base_addr[0]); + if ( file_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; + + } + else { + + base_addr = entries[0]; + entry_ptr = &(base_addr[0]); + + } } if ( pass ) { @@ -13576,9 +13586,13 @@ check_get_entry_status(void) } } - protect_entry(file_ptr, 0, 0); + if ( pass ) { - unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET); + protect_entry(file_ptr, 0, 0); + + unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET); + + } if ( pass ) { @@ -13600,7 +13614,11 @@ check_get_entry_status(void) } } - protect_entry(file_ptr, 0, 0); + if ( pass ) { + + protect_entry(file_ptr, 0, 0); + + } if ( pass ) { @@ -13622,7 +13640,11 @@ check_get_entry_status(void) } } - unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG); + if ( pass ) { + + unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG); + + } if ( pass ) { @@ -13644,7 +13666,11 @@ check_get_entry_status(void) } } - mark_pinned_entry_dirty(0, 0, FALSE, (size_t)0); + if ( pass ) { + + mark_pinned_entry_dirty(0, 0, FALSE, (size_t)0); + + } if ( pass ) { @@ -13666,7 +13692,11 @@ check_get_entry_status(void) } } - unpin_entry(0, 0); + if ( pass ) { + + unpin_entry(0, 0); + + } if ( pass ) { @@ -14736,9 +14766,20 @@ check_pin_protected_entry(void) file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024)); + + if ( file_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; + + } } - protect_entry(file_ptr, 0, 0); + if ( pass ) { + + protect_entry(file_ptr, 0, 0); + + } if ( pass ) { @@ -14862,11 +14903,20 @@ check_resize_entry(void) file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024)); - cache_ptr = file_ptr->shared->cache; + if ( file_ptr == NULL ) { - base_addr = entries[LARGE_ENTRY_TYPE]; - entry_ptr = &(base_addr[0]); - entry_size = LARGE_ENTRY_SIZE; + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; + + } + else + { + cache_ptr = file_ptr->shared->cache; + + base_addr = entries[LARGE_ENTRY_TYPE]; + entry_ptr = &(base_addr[0]); + entry_size = LARGE_ENTRY_SIZE; + } } if ( pass ) { @@ -14883,7 +14933,11 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + + } if ( pass ) { @@ -14902,8 +14956,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -14935,7 +14989,7 @@ check_resize_entry(void) if ( pass ) { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, + &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2)); if ( result < 0 ) { @@ -14971,8 +15025,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -15002,12 +15056,16 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + + } if ( pass ) { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, + &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE); if ( result < 0 ) { @@ -15043,8 +15101,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -15074,9 +15132,13 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__PIN_ENTRY_FLAG); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__PIN_ENTRY_FLAG); + } if ( pass ) { @@ -15108,8 +15170,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -15169,8 +15231,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -15200,10 +15262,14 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + if ( pass ) { - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, - H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, + H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); + + } if ( pass ) { @@ -15270,14 +15336,18 @@ check_resize_entry(void) entry_size = LARGE_ENTRY_SIZE; } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__NO_FLAGS_SET); + if ( pass ) { - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, TRUE, H5C__NO_FLAGS_SET); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__NO_FLAGS_SET); - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__NO_FLAGS_SET); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, TRUE, H5C__NO_FLAGS_SET); + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__NO_FLAGS_SET); + + } if ( pass ) { @@ -15294,7 +15364,11 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + + } if ( pass ) { @@ -15313,8 +15387,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -15346,7 +15420,7 @@ check_resize_entry(void) if ( pass ) { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, + &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2)); if ( result < 0 ) { @@ -15384,8 +15458,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -15415,12 +15489,16 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + + } if ( pass ) { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, + &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE); if ( result < 0 ) { @@ -15456,8 +15534,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -15487,9 +15565,13 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE, H5C__PIN_ENTRY_FLAG); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE, H5C__PIN_ENTRY_FLAG); + + } if ( pass ) { @@ -15523,8 +15605,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -15584,8 +15666,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL); @@ -15615,10 +15697,14 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + if ( pass ) { - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE, - H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE, + H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); + + } if ( pass ) { @@ -15665,15 +15751,18 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__DELETED_FLAG); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__DELETED_FLAG); - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, FALSE, H5C__DELETED_FLAG); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, FALSE, H5C__DELETED_FLAG); - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__DELETED_FLAG); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__DELETED_FLAG); + } if ( pass ) { @@ -15738,7 +15827,7 @@ check_evictions_enabled(void) int mile_stone = 1; H5F_t * file_ptr = NULL; H5C_t * cache_ptr = NULL; - test_entry_t * base_addr; + test_entry_t * base_addr = NULL; test_entry_t * entry_ptr; TESTING("evictions enabled/disabled functionality"); @@ -15791,9 +15880,18 @@ check_evictions_enabled(void) file_ptr = setup_cache((size_t)(1 * 1024 * 1024), (size_t)( 512 * 1024)); - cache_ptr = file_ptr->shared->cache; + if ( file_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; - base_addr = entries[MONSTER_ENTRY_TYPE]; + } + else + { + cache_ptr = file_ptr->shared->cache; + + base_addr = entries[MONSTER_ENTRY_TYPE]; + } } if ( show_progress ) /* 2 */ @@ -15837,12 +15935,16 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* fill the cache */ - for ( i = 0; i < 16 ; i++ ) - { - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, - FALSE, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* fill the cache */ + for ( i = 0; i < 16 ; i++ ) + { + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, + FALSE, H5C__NO_FLAGS_SET); + } + } if ( show_progress ) /* 5 */ @@ -15870,10 +15972,14 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect another entry */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16, - FALSE, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* protect and unprotect another entry */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16, + FALSE, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 7 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -15903,7 +16009,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[0]); - result = H5C_get_entry_status(file_ptr, entry_ptr->addr, + result = H5C_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL, NULL, NULL); @@ -15936,8 +16042,12 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* insert an entry */ - insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 17, TRUE, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* insert an entry */ + insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 17, TRUE, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 10 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -16036,10 +16146,14 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect another entry */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18, - FALSE, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* protect and unprotect another entry */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18, + FALSE, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 15 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -16065,8 +16179,12 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* insert another entry */ - insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, TRUE, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* insert another entry */ + insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, TRUE, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 17 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -16109,10 +16227,14 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect an entry that is in the cache */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, - FALSE, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* protect and unprotect an entry that is in the cache */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, + FALSE, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 20 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -16138,10 +16260,14 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect an entry that isn't in the cache */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20, - FALSE, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* protect and unprotect an entry that isn't in the cache */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20, + FALSE, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 22 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -16259,13 +16385,16 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect an entry that isn't in the cache, forcing - * the cache to grow. - */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21, - FALSE, H5C__NO_FLAGS_SET); + if ( pass ) { + /* protect and unprotect an entry that isn't in the cache, forcing + * the cache to grow. + */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21, + FALSE, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 27 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -16308,8 +16437,12 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* insert an entry */ - insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 22, TRUE, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* insert an entry */ + insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 22, TRUE, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 30 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -21635,11 +21768,11 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__NO_FLAGS_SET); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__NO_FLAGS_SET); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12); @@ -21808,7 +21941,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE); @@ -21847,7 +21980,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE); @@ -21868,7 +22001,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE); @@ -21892,15 +22025,15 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); if ( ( pass ) && @@ -21960,7 +22093,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024); @@ -21999,7 +22132,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024); @@ -22020,7 +22153,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024); @@ -22044,15 +22177,15 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); if ( ( pass ) && @@ -22173,7 +22306,7 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, H5C__NO_FLAGS_SET); if ( ( pass ) && @@ -22200,7 +22333,7 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE, + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE, H5C__NO_FLAGS_SET); if ( ( pass ) && @@ -22226,10 +22359,10 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE, + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE, H5C__NO_FLAGS_SET); protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE, + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE, H5C__NO_FLAGS_SET); if ( ( pass ) && @@ -22283,7 +22416,7 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, H5C__NO_FLAGS_SET); if ( ( pass ) && @@ -22445,7 +22578,17 @@ check_auto_cache_resize_disable(void) file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024)); - cache_ptr = file_ptr->shared->cache; + + if ( file_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; + + } + else { + + cache_ptr = file_ptr->shared->cache; + } } if ( pass ) { @@ -23506,8 +23649,11 @@ check_auto_cache_resize_disable(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* flush the cache and destroy all entries so we start from a known point */ - flush_cache(file_ptr, TRUE, FALSE, FALSE); + if ( pass ) { + + /* flush the cache and destroy all entries so we start from a known point */ + flush_cache(file_ptr, TRUE, FALSE, FALSE); + } if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); @@ -23734,8 +23880,11 @@ check_auto_cache_resize_disable(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* flush the cache and destroy all entries so we start from a known point */ - flush_cache(file_ptr, TRUE, FALSE, FALSE); + if ( pass ) { + + /* flush the cache and destroy all entries so we start from a known point */ + flush_cache(file_ptr, TRUE, FALSE, FALSE); + } if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); @@ -23969,8 +24118,11 @@ check_auto_cache_resize_disable(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* flush the cache and destroy all entries so we start from a known point */ - flush_cache(file_ptr, TRUE, FALSE, FALSE); + if ( pass ) { + + /* flush the cache and destroy all entries so we start from a known point */ + flush_cache(file_ptr, TRUE, FALSE, FALSE); + } if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); @@ -28786,7 +28938,7 @@ check_auto_cache_resize_aux_fcns(void) failure_mssg = "H5C_get_cache_size reports unexpected cur_size 5.\n"; - } + } } if ( pass ) { @@ -28836,13 +28988,13 @@ check_auto_cache_resize_aux_fcns(void) * * A 'metadata blizzard' in this context occurs when the cache * gets completely filled with all dirty entries. Upon needing - * to make space in the cache, the cache then has no clean + * to make space in the cache, the cache then has no clean * entries ready to evict, and must clean every dirty entry * in the cache first, due to the second chance replacement * policy. (i.e. after cleaning an entry, it is bumped to the * top of the LRU to make a second pass before eviction). - * The massive amount of sequential writes to disk while - * flushing the entire cache is what constitutes a 'metadata + * The massive amount of sequential writes to disk while + * flushing the entire cache is what constitutes a 'metadata * blizzard'. * * Return: void @@ -28865,11 +29017,11 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) H5F_t * file_ptr = NULL; H5C_t * cache_ptr = NULL; hbool_t show_progress = FALSE; - int32_t checkpoint = 0; + int32_t checkpoint = 0; int32_t entry_idx = 0; int32_t i; - /* Expected loaded status of entries depends on how they get into + /* Expected loaded status of entries depends on how they get into * the cache. Insertions = not loaded, protect/unprotect = loaded. */ hbool_t loaded = (hbool_t)!(fill_via_insertion); @@ -29045,19 +29197,19 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 0 */ - HDfprintf(stdout, "\n%s: check point %d -- pass %d\n", + HDfprintf(stdout, "\n%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); if ( pass ) { - + /* Set up the cache. * - * The max_cache_size should have room for 50 entries. - * The min_clean_size is half of that, or 25 entries. + * The max_cache_size should have room for 50 entries. + * The min_clean_size is half of that, or 25 entries. */ file_ptr = setup_cache((size_t)(50 * entry_size), /* max_cache_size */ (size_t)(25 * entry_size)); /* min_clean_size */ - + if ( file_ptr == NULL) { pass = FALSE; @@ -29066,37 +29218,37 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } else cache_ptr = file_ptr->shared->cache; - } + } if ( show_progress) /* 1 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); /* ======================================================================== * ======================================================================== * Phase 1: - * - * Inserting dirty entries into an empty cache, until the cache + * + * Inserting dirty entries into an empty cache, until the cache * violates the min_clean_size requirement. The expected result is * that none of the inserted entries during this phase will get * flushed or evicted. - * + * * This verifies that while maintaining min_clean_size, we don't go * overboard and flush entries that we don't need to flush. - * + * * ======================================================================== * ======================================================================== */ if ( pass ) { - /* Insert 26 entries (indexes 0 through 25) into the cache. + /* Insert 26 entries (indexes 0 through 25) into the cache. * - * Note that we are inserting 26 entries, and not 25, because the cache - * will only try to adhere to the min_clean_size if it's currently - * being violated. Thus, on insertion of the 26th entry, since the - * min_clean_size will not be violated, it will accept the insertion - * without having to make clean space. + * Note that we are inserting 26 entries, and not 25, because the cache + * will only try to adhere to the min_clean_size if it's currently + * being violated. Thus, on insertion of the 26th entry, since the + * min_clean_size will not be violated, it will accept the insertion + * without having to make clean space. */ for (entry_idx = 0; entry_idx < 26; entry_idx++) { @@ -29120,8 +29272,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) H5C__NO_FLAGS_SET); /* unsigned int flags */ } - /* Change expected values, and verify the status of the entries - * after each insertion + /* Change expected values, and verify the status of the entries + * after each insertion */ expected[entry_idx].in_cache = TRUE; expected[entry_idx].is_dirty = TRUE; @@ -29135,30 +29287,30 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 2 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); /* ======================================================================== * ======================================================================== * Phase 2: - * + * * Inserting entries into a cache that violates the min_clean_size, * until the cache is full. The expected result is that each insertion - * will result in the flushing of a dirty entry in the cache. + * will result in the flushing of a dirty entry in the cache. * * This verifies that we maintain the min_clean_size. By doing so, we * prevent building the situation in which a 'metadata blizzard' would * occur (i.e., the cache being completely filled with dirty entries). - * + * * ======================================================================== * ======================================================================== */ - + if ( pass ) { /* Insert the 27th entry (index = 26) into the cache. - * - * This should cause the cache to flush its least recently used entry + * + * This should cause the cache to flush its least recently used entry * before the insertion because it doesn't satisfy the min_clean_size * constraint. */ @@ -29181,15 +29333,15 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } /* Verify the status of the entries. - * + * * Expected status is that there are 27 entries in the cache, and * entry number 0 has been cleaned. - * + * * Changes from last entry verification: * - entry w/ index 0 has now been flushed and is now clean. * - entry w/ index 26 is now in the cache and dirty. */ - + /* entry w/ index 0 has now been flushed and is now clean. */ expected[0].flushed = TRUE; expected[0].is_dirty = FALSE; @@ -29207,7 +29359,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 3 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); if ( pass ) { @@ -29237,10 +29389,10 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } /* Verify the status of the entries. - * + * * Expected status is that there are 28 entries in the cache, and * entry numbers 0 and 1 have been cleaned. - * + * * Changes from last entry verification: * - entry w/ index 1 has now been flushed and is now clean. * - entry w/ index 27 is now in the cache and dirty. @@ -29263,7 +29415,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 4 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); if ( pass ) { @@ -29291,7 +29443,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } /* Expected staus is that after each insertion, the entry - * inserted 26 insertions ago has been flushed, and the + * inserted 26 insertions ago has been flushed, and the * entry currently getting inserted is now in the cache and * dirty. */ @@ -29301,7 +29453,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) expected[entry_idx].in_cache = TRUE; expected[entry_idx].is_dirty = TRUE; expected[entry_idx].loaded = (unsigned char)loaded; - + /* verify the status */ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ entry_idx, /* int tag */ @@ -29318,23 +29470,23 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 5 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); /* ======================================================================== * ======================================================================== * Phase 3: - * - * Inserting entries into a cache that is completely full. Insertions + * + * Inserting entries into a cache that is completely full. Insertions * of new entries will force evictions of old entries, but since the - * min_clean_size has been maintained, doing so will not result in + * min_clean_size has been maintained, doing so will not result in * the entire cache getting flushed in order to evict a single entry, * as a clean entry will be available to flush reasonably close to * the bottom of the LRU. - * + * * This verifies that with a maintained min_clean_size, a metadata * blizzard does not occur on insertion. - * + * * ======================================================================== * ======================================================================== */ @@ -29342,7 +29494,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) if ( pass ) { /* Insert the 51st entry (index = 50) into the cache. - * + * * The cache is full prior to the insertion, so it will * have to evict in order to make room for the new entry. */ @@ -29365,13 +29517,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } /* Verify the status of the entries. - * + * * Changes from last entry verification: * - entry w/ index 0 has been evicted. * - entries w/ indices 24,25 have now been flushed and are clean. * - entry w/ index 50 is now in the cache and dirty. */ - + /* entry w/ index 0 has been evicted. */ expected[0].in_cache = FALSE; expected[0].destroyed = TRUE; @@ -29395,16 +29547,16 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 6 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); if ( pass ) { /* Insert 49 more entries (indices 51-99) into the cache. - * - * The cache will be flushing an entry on each insertion, and - * evicting an entry on each insertion. + * + * The cache will be flushing an entry on each insertion, and + * evicting an entry on each insertion. * * After each insertion, verify the expected status of the * entries in the cache. @@ -29421,7 +29573,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) protect_entry(file_ptr, /* H5F_t * file_ptr */ entry_type, /* int32_t type */ entry_idx); /* int32-t idx */ - + unprotect_entry(file_ptr, /* H5F_t * file_ptr */ entry_type, /* int32_t type */ entry_idx, /* int32_t idx */ @@ -29438,21 +29590,21 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) expected[entry_idx - 50].in_cache = FALSE; expected[entry_idx - 50].destroyed = TRUE; - /* If the newly inserted entry is among the first 24 + /* If the newly inserted entry is among the first 24 * insertions in this loop, then the insertion will * have resulted in a flush of the entry inserted * 25 insertions ago. */ if (entry_idx < 75) { - + expected[entry_idx - 25].flushed = TRUE; expected[entry_idx - 25].is_dirty = FALSE; } /* If the newly inserted entry is among the last * 25 insertions in this loop, then the insertion will * have resulted in a flush of the entry inserted 26 - * insertions ago. This switch is because there was two + * insertions ago. This switch is because there was two * consecutive clean entries in the cache (due to 51/49 - * dirty/clean ratio when full), so instead of + * dirty/clean ratio when full), so instead of * flush-then-evict, it switches to evict-then-flush. */ else { @@ -29469,13 +29621,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 7 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); /* ======================================================================== * ======================================================================== * Phase 4: - * + * * Flushing the entire cache, and then inserting entries into a cache * that is completely full, but all clean. * @@ -29483,18 +29635,18 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) * into an empty cache, we're inserting into a full cache that's all * clean, thus an eviction occurs before each insertion. * - * When the cache finally hits the point of violating the + * When the cache finally hits the point of violating the * min_clean_size, the bottom half of the LRU will be filled with * clean entries and the top half will be filled with recently inserted * dirty entries. We'll then verify that an insertion will only evict * one entry and flush one entry, and no more. - * + * * ======================================================================== * ======================================================================== */ if ( pass ) { - + /* Flush the cache. * * We're doing this so we can repeat the above insertions, but @@ -29506,12 +29658,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) FALSE, /* hbool_t destory_entries */ FALSE, /* hbool_t dump_stats */ FALSE); /* hbool_t dump_detailed_stats */ - + /* Verify that the cache is clean */ verify_clean(); /* Verify the status of the entries. - * + * * Changes from last entry verification: * - entries w/ indices 74-99 have been flushed. */ @@ -29529,7 +29681,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 8 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); if ( pass ) { @@ -29580,7 +29732,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 9 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); if ( pass ) { @@ -29605,7 +29757,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } /* Verify the status of the entries. - * + * * Changes from last entry verification: * - entry w/ index 76 is evicted. * - entry w/ index 100 is cleaned. @@ -29615,7 +29767,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) /* entry w/ index 76 has been evicted. */ expected[76].in_cache = FALSE; expected[76].destroyed = TRUE; - + /* entry w/ index 100 has now been flushed and is now clean. */ expected[100].flushed = TRUE; expected[100].is_dirty = FALSE; @@ -29633,7 +29785,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 10 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); if ( pass ) { @@ -29683,18 +29835,18 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) } if ( show_progress) /* 11 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); if ( pass ) { - + /* We're done with testing. We can take down the cache. */ takedown_cache(file_ptr, FALSE, FALSE); reset_entries(); } if ( show_progress) /* 12 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", + HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); if ( pass ) { PASSED(); } else { H5_FAILED(); } @@ -29756,8 +29908,8 @@ check_flush_deps(void) insert_entry(file_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET); if ( !pass ) CACHE_ERROR("insert_entry failed") - /* Change expected values, and verify the status of the entries - * after each insertion + /* Change expected values, and verify the status of the entries + * after each insertion */ expected[u].in_cache = TRUE; expected[u].is_dirty = TRUE; @@ -29779,7 +29931,7 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + /* Check the parent's entry status */ entry_ptr = &(base_addr[1]); if(H5C_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache, @@ -29815,7 +29967,7 @@ check_flush_deps(void) if(!in_cache || is_flush_dep_parent || !is_flush_dep_child) CACHE_ERROR("invalid entry status") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -29845,7 +29997,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].flush_dep_par_type = -1; @@ -29869,14 +30021,14 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -29911,7 +30063,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].flush_dep_par_type = -1; @@ -29939,11 +30091,11 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -29962,11 +30114,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[1].flush_dep_par_type = entry_type; @@ -29985,11 +30137,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 3); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 3, entry_type, 2); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[2].flush_dep_par_type = entry_type; @@ -30019,7 +30171,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[2].flush_dep_par_type = -1; @@ -30046,7 +30198,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[1].flush_dep_par_type = -1; @@ -30073,7 +30225,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -30099,11 +30251,11 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -30122,11 +30274,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[1].flush_dep_par_type = entry_type; @@ -30145,11 +30297,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 3); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 3, entry_type, 2); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[2].flush_dep_par_type = entry_type; @@ -30179,7 +30331,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -30212,7 +30364,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[1].flush_dep_par_type = -1; @@ -30242,7 +30394,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[2].flush_dep_par_type = -1; @@ -30268,11 +30420,11 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 3); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 3, entry_type, 2); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[2].flush_dep_par_type = entry_type; @@ -30291,11 +30443,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[1].flush_dep_par_type = entry_type; @@ -30317,11 +30469,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -30357,7 +30509,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[2].flush_dep_par_type = -1; @@ -30384,7 +30536,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[1].flush_dep_par_type = -1; @@ -30411,7 +30563,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -30437,11 +30589,11 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 3); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 3, entry_type, 2); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[2].flush_dep_par_type = entry_type; @@ -30460,11 +30612,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[1].flush_dep_par_type = entry_type; @@ -30486,11 +30638,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -30526,7 +30678,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -30559,7 +30711,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[1].flush_dep_par_type = -1; @@ -30589,7 +30741,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[2].flush_dep_par_type = -1; @@ -30613,12 +30765,12 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 4); if ( !pass ) CACHE_ERROR("protect_entry failed") - + for(u = 0; u < 4; u++) { create_flush_dependency(entry_type, 4, entry_type, (int32_t)u); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[u].flush_dep_par_type = entry_type; @@ -30643,7 +30795,7 @@ check_flush_deps(void) destroy_flush_dependency(entry_type, 4, entry_type, (int32_t)u); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[u].flush_dep_par_type = -1; @@ -30659,7 +30811,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[4].is_protected = FALSE; @@ -30686,11 +30838,11 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -30709,11 +30861,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 4); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 4, entry_type, 3); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[3].flush_dep_par_type = entry_type; @@ -30732,11 +30884,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 0); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 0, entry_type, 4); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[4].flush_dep_par_type = entry_type; @@ -30770,7 +30922,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[4].flush_dep_par_type = -1; @@ -30800,7 +30952,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[3].flush_dep_par_type = -1; @@ -30827,7 +30979,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -30855,11 +31007,11 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -30878,11 +31030,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[1].flush_dep_par_type = entry_type; @@ -30901,11 +31053,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 4); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 4, entry_type, 3); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[3].flush_dep_par_type = entry_type; @@ -30925,7 +31077,7 @@ check_flush_deps(void) create_flush_dependency(entry_type, 1, entry_type, 4); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[4].flush_dep_par_type = entry_type; @@ -30950,7 +31102,7 @@ check_flush_deps(void) destroy_flush_dependency(entry_type, 1, entry_type, 4); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[4].flush_dep_par_type = -1; @@ -30978,7 +31130,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[3].flush_dep_par_type = -1; @@ -31005,7 +31157,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[1].flush_dep_par_type = -1; @@ -31032,7 +31184,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -31060,11 +31212,11 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -31083,11 +31235,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[1].flush_dep_par_type = entry_type; @@ -31106,11 +31258,11 @@ check_flush_deps(void) protect_entry(file_ptr, entry_type, 4); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 4, entry_type, 3); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[3].flush_dep_par_type = entry_type; @@ -31130,7 +31282,7 @@ check_flush_deps(void) create_flush_dependency(entry_type, 2, entry_type, 4); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[4].flush_dep_par_type = entry_type; @@ -31151,7 +31303,7 @@ check_flush_deps(void) destroy_flush_dependency(entry_type, 2, entry_type, 4); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[4].flush_dep_par_type = -1; @@ -31175,7 +31327,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[3].flush_dep_par_type = -1; @@ -31202,7 +31354,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[1].flush_dep_par_type = -1; @@ -31229,7 +31381,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -31255,14 +31407,14 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + pin_entry(entry_type, 1); if ( !pass ) CACHE_ERROR("pin_entry failed") create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -31295,7 +31447,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].flush_dep_par_type = -1; @@ -31321,14 +31473,14 @@ check_flush_deps(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + pin_entry(entry_type, 1); if ( !pass ) CACHE_ERROR("pin_entry failed") create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -31368,7 +31520,7 @@ check_flush_deps(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].flush_dep_par_type = -1; @@ -31388,7 +31540,7 @@ check_flush_deps(void) done: - if(file_ptr) + if(file_ptr) takedown_cache(file_ptr, FALSE, FALSE); if ( pass ) @@ -31456,7 +31608,7 @@ check_flush_deps_err(void) case 1: protect_entry(file_ptr, entry_type, 0); if ( !pass ) CACHE_ERROR("protect_entry failed") - + result = H5C_create_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[0])); if( result != FAIL ) CACHE_ERROR("Creating flush dependency with parent == child") @@ -31472,13 +31624,13 @@ check_flush_deps_err(void) case 2: protect_entry(file_ptr, entry_type, 0); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 0, entry_type, 2); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + result = H5C_create_flush_dependency(&((entries[entry_type])[1]), &((entries[entry_type])[2])); if( result != FAIL ) CACHE_ERROR("Creating second flush dependency for child") @@ -31504,43 +31656,43 @@ check_flush_deps_err(void) case 3: protect_entry(file_ptr, entry_type, 0); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 0, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 2); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 3); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") protect_entry(file_ptr, entry_type, 3); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 3, entry_type, 4); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") protect_entry(file_ptr, entry_type, 4); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 4, entry_type, 5); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") protect_entry(file_ptr, entry_type, 5); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 5, entry_type, 6); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") protect_entry(file_ptr, entry_type, 6); if ( !pass ) CACHE_ERROR("protect_entry failed") - + result = H5C_create_flush_dependency(&((entries[entry_type])[6]), &((entries[entry_type])[7])); if( result != FAIL ) CACHE_ERROR("Creating flush dependency that's too tall") @@ -31553,7 +31705,7 @@ check_flush_deps_err(void) protect_entry(file_ptr, entry_type, 7); if ( !pass ) CACHE_ERROR("protect_entry failed") - + result = H5C_create_flush_dependency(&((entries[entry_type])[7]), &((entries[entry_type])[0])); if( result != FAIL ) CACHE_ERROR("Creating flush dependency that's too tall") @@ -31630,7 +31782,7 @@ check_flush_deps_err(void) result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[1])); if( result != FAIL ) CACHE_ERROR("Destroying [non-existant] dependency when parent isn't protected") break; - + /* Verify that parent entry has flush dependency */ case 5: protect_entry(file_ptr, entry_type, 0); @@ -31646,7 +31798,7 @@ check_flush_deps_err(void) H5C__NO_FLAGS_SET); /* unsigned int flags */ if ( !pass ) CACHE_ERROR("unprotect_entry failed") break; - + /* Verify that child entry is in flush dependency relationship */ case 6: protect_entry(file_ptr, entry_type, 0); @@ -31773,7 +31925,7 @@ check_flush_deps_err(void) done: - if(file_ptr) + if(file_ptr) takedown_cache(file_ptr, FALSE, FALSE); if ( pass ) @@ -31839,8 +31991,8 @@ check_flush_deps_order(void) insert_entry(file_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET); if ( !pass ) CACHE_ERROR("insert_entry failed") - /* Change expected values, and verify the status of the entries - * after each insertion + /* Change expected values, and verify the status of the entries + * after each insertion */ expected[u].in_cache = TRUE; expected[u].is_dirty = TRUE; @@ -31859,11 +32011,11 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -31903,7 +32055,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -31933,7 +32085,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].flush_dep_par_type = -1; @@ -31956,11 +32108,11 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 0); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 0, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].is_protected = TRUE; @@ -32011,7 +32163,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -32035,7 +32187,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 0, entry_type, 1); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_pinned = FALSE; @@ -32060,14 +32212,14 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -32125,7 +32277,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -32155,7 +32307,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].flush_dep_par_type = -1; @@ -32182,14 +32334,14 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 0); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 0, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") create_flush_dependency(entry_type, 0, entry_type, 2); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].is_protected = TRUE; @@ -32247,7 +32399,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -32277,7 +32429,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 0, entry_type, 2); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_pinned = FALSE; @@ -32304,11 +32456,11 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -32327,11 +32479,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[1].flush_dep_par_type = entry_type; @@ -32350,11 +32502,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 3); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 3, entry_type, 2); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[2].flush_dep_par_type = entry_type; @@ -32429,7 +32581,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -32460,7 +32612,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 3, entry_type, 2); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[2].flush_dep_par_type = -1; @@ -32479,7 +32631,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[1].flush_dep_par_type = -1; @@ -32498,7 +32650,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -32523,11 +32675,11 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 0); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 0, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].is_protected = TRUE; @@ -32546,11 +32698,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 2); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].child_flush_dep_height_rc[0] = 0; @@ -32572,11 +32724,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 3); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].child_flush_dep_height_rc[1] = 0; @@ -32657,7 +32809,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -32689,7 +32841,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 2, entry_type, 3); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].child_flush_dep_height_rc[2] = 0; @@ -32714,7 +32866,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 1, entry_type, 2); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].child_flush_dep_height_rc[1] = 0; @@ -32736,7 +32888,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 0, entry_type, 1); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].is_pinned = FALSE; @@ -32759,12 +32911,12 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 4); if ( !pass ) CACHE_ERROR("protect_entry failed") - + for(u = 0; u < 4; u++) { create_flush_dependency(entry_type, 4, entry_type, (int32_t)u); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[u].flush_dep_par_type = entry_type; @@ -32831,7 +32983,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -32865,7 +33017,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 4, entry_type, (int32_t)u); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[u].flush_dep_par_type = -1; @@ -32874,7 +33026,7 @@ check_flush_deps_order(void) /* Check for destroying flush dependency on last entry */ if(3 == u) { - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[4].is_pinned = FALSE; @@ -32896,12 +33048,12 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 0); if ( !pass ) CACHE_ERROR("protect_entry failed") - + for(u = 1; u < 5; u++) { create_flush_dependency(entry_type, 0, entry_type, (int32_t)u); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[u].flush_dep_par_type = entry_type; @@ -32968,7 +33120,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -33002,7 +33154,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 0, entry_type, (int32_t)u); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[u].flush_dep_par_type = -1; @@ -33011,7 +33163,7 @@ check_flush_deps_order(void) /* Check for destroying flush dependency on last entry */ if(4 == u) { - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].is_pinned = FALSE; @@ -33037,11 +33189,11 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -33060,11 +33212,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 4); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 4, entry_type, 3); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[3].flush_dep_par_type = entry_type; @@ -33083,11 +33235,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 0); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 0, entry_type, 4); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[4].flush_dep_par_type = entry_type; @@ -33169,7 +33321,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -33203,7 +33355,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 0, entry_type, 4); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[4].flush_dep_par_type = -1; @@ -33225,7 +33377,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 4, entry_type, 3); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[3].flush_dep_par_type = -1; @@ -33244,7 +33396,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -33271,11 +33423,11 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -33294,11 +33446,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[1].flush_dep_par_type = entry_type; @@ -33317,11 +33469,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 4); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 4, entry_type, 3); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[3].flush_dep_par_type = entry_type; @@ -33341,7 +33493,7 @@ check_flush_deps_order(void) create_flush_dependency(entry_type, 1, entry_type, 4); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[4].flush_dep_par_type = entry_type; @@ -33423,7 +33575,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -33459,7 +33611,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 1, entry_type, 4); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[4].flush_dep_par_type = -1; @@ -33480,7 +33632,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 4, entry_type, 3); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[3].flush_dep_par_type = -1; @@ -33499,7 +33651,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[1].flush_dep_par_type = -1; @@ -33518,7 +33670,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -33545,11 +33697,11 @@ check_flush_deps_order(void) { protect_entry(file_ptr, entry_type, 1); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[0].flush_dep_par_type = entry_type; @@ -33568,11 +33720,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 2); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[1].flush_dep_par_type = entry_type; @@ -33591,11 +33743,11 @@ check_flush_deps_order(void) protect_entry(file_ptr, entry_type, 4); if ( !pass ) CACHE_ERROR("protect_entry failed") - + create_flush_dependency(entry_type, 4, entry_type, 3); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[3].flush_dep_par_type = entry_type; @@ -33615,7 +33767,7 @@ check_flush_deps_order(void) create_flush_dependency(entry_type, 2, entry_type, 4); if ( !pass ) CACHE_ERROR("create_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after creating flush dependency */ expected[4].flush_dep_par_type = entry_type; @@ -33693,7 +33845,7 @@ check_flush_deps_order(void) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; @@ -33729,7 +33881,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 2, entry_type, 4); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[4].flush_dep_par_type = -1; @@ -33746,7 +33898,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 4, entry_type, 3); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[3].flush_dep_par_type = -1; @@ -33765,7 +33917,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 2, entry_type, 1); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[1].flush_dep_par_type = -1; @@ -33784,7 +33936,7 @@ check_flush_deps_order(void) destroy_flush_dependency(entry_type, 1, entry_type, 0); if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed") - /* Change expected values, and verify the status of the entries + /* Change expected values, and verify the status of the entries * after destroying flush dependency */ expected[0].flush_dep_par_type = -1; @@ -33803,7 +33955,7 @@ check_flush_deps_order(void) done: - if(file_ptr) + if(file_ptr) takedown_cache(file_ptr, FALSE, FALSE); if ( pass ) @@ -33870,8 +34022,8 @@ check_notify_cb(void) insert_entry(file_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET); if ( !pass ) CACHE_ERROR("insert_entry failed") - /* Change expected values, and verify the status of the entries - * after each insertion + /* Change expected values, and verify the status of the entries + * after each insertion */ expected[u].in_cache = TRUE; expected[u].is_dirty = TRUE; @@ -33896,8 +34048,8 @@ check_notify_cb(void) expunge_entry(file_ptr, entry_type, (int32_t)u); if ( !pass ) CACHE_ERROR("expunge_entry failed") - /* Change expected values, and verify the status of the entries - * after each insertion + /* Change expected values, and verify the status of the entries + * after each insertion */ expected[u].in_cache = FALSE; expected[u].is_dirty = FALSE; @@ -33924,8 +34076,8 @@ check_notify_cb(void) protect_entry(file_ptr, entry_type, (int32_t)u); if ( !pass ) CACHE_ERROR("protect_entry failed") - /* Change expected values, and verify the status of the entries - * after each insertion + /* Change expected values, and verify the status of the entries + * after each insertion */ expected[u].in_cache = TRUE; expected[u].is_dirty = FALSE; @@ -33952,8 +34104,8 @@ check_notify_cb(void) unprotect_entry(file_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET); if ( !pass ) CACHE_ERROR("unprotect_entry failed") - /* Change expected values, and verify the status of the entries - * after each insertion + /* Change expected values, and verify the status of the entries + * after each insertion */ expected[u].in_cache = TRUE; expected[u].is_dirty = TRUE; @@ -33979,8 +34131,8 @@ check_notify_cb(void) expunge_entry(file_ptr, entry_type, (int32_t)u); if ( !pass ) CACHE_ERROR("expunge_entry failed") - /* Change expected values, and verify the status of the entries - * after each insertion + /* Change expected values, and verify the status of the entries + * after each insertion */ expected[u].in_cache = FALSE; expected[u].is_dirty = FALSE; @@ -34003,7 +34155,7 @@ check_notify_cb(void) } /* end for */ done: - if(file_ptr) + if(file_ptr) takedown_cache(file_ptr, FALSE, FALSE); if ( pass ) @@ -34091,8 +34243,8 @@ main(void) nerrs += check_auto_cache_resize_epoch_markers(); nerrs += check_auto_cache_resize_input_errs(); nerrs += check_auto_cache_resize_aux_fcns(); - nerrs += check_metadata_blizzard_absence(TRUE); - nerrs += check_metadata_blizzard_absence(FALSE); + nerrs += check_metadata_blizzard_absence(TRUE); + nerrs += check_metadata_blizzard_absence(FALSE); nerrs += check_flush_deps(); nerrs += check_flush_deps_err(); nerrs += check_flush_deps_order(); diff --git a/test/cache_common.c b/test/cache_common.c index 335704d..0c94a22 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -35,20 +35,20 @@ const char *FILENAME[] = { NULL }; -hid_t saved_fapl_id = H5P_DEFAULT; /* store the fapl id here between - * cache setup and takedown. Note +hid_t saved_fapl_id = H5P_DEFAULT; /* store the fapl id here between + * cache setup and takedown. Note * that if saved_fapl_id == H5P_DEFAULT, - * we assume that there is no fapl to + * we assume that there is no fapl to * close. */ -hid_t saved_fid = -1; /* store the file id here between cache setup +hid_t saved_fid = -1; /* store the file id here between cache setup * and takedown. */ -H5C_t * saved_cache = NULL; /* store the pointer to the instance of - * of H5C_t created by H5Fcreate() - * here between test cache setup and +H5C_t * saved_cache = NULL; /* store the pointer to the instance of + * of H5C_t created by H5Fcreate() + * here between test cache setup and * shutdown. */ @@ -1626,7 +1626,7 @@ execute_flush_op(H5F_t * file_ptr, /* change the size of some other entry */ - resize_entry(file_ptr, op_ptr->type, op_ptr->idx, + resize_entry(file_ptr, op_ptr->type, op_ptr->idx, op_ptr->size, op_ptr->flag); } break; @@ -1695,7 +1695,7 @@ entry_in_cache(H5C_t * cache_ptr, HDassert( entry_ptr->type == type ); HDassert( entry_ptr == entry_ptr->self ); - H5C__SEARCH_INDEX(cache_ptr, entry_ptr->addr, test_ptr) + H5C_TEST__SEARCH_INDEX(cache_ptr, entry_ptr->addr, test_ptr) if ( test_ptr != NULL ) { @@ -2011,7 +2011,7 @@ resize_pinned_entry(H5C_t * cache_ptr, entry_ptr->size = new_size; - result = H5C_resize_pinned_entry((void *)entry_ptr, + result = H5C_resize_pinned_entry((void *)entry_ptr, new_size); if ( result != SUCCEED ) { @@ -2586,13 +2586,13 @@ setup_cache(size_t max_cache_size, < 0 ) { core_file_driver_failed = TRUE; - + if ( verbose ) { HDfprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", fcn_name); } } else { - + saved_fapl_id = fapl_id; } } @@ -2601,12 +2601,12 @@ setup_cache(size_t max_cache_size, HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* if we either aren't using the core file driver, or a create + /* if we either aren't using the core file driver, or a create * with the core file driver failed, try again with a regular file. * If this fails, we are cooked. */ if ( ( pass ) && ( fid < 0 ) ) { - + fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); saved_fid = fid; @@ -2615,7 +2615,7 @@ setup_cache(size_t max_cache_size, pass = FALSE; failure_mssg = "H5Fcreate() failed."; - + if ( verbose ) { HDfprintf(stdout, "%s: H5Fcreate() failed.\n", fcn_name); } @@ -2636,7 +2636,7 @@ setup_cache(size_t max_cache_size, pass = FALSE; failure_mssg = "H5Fflush() failed."; - + if ( verbose ) { HDfprintf(stdout, "%s: H5Fflush() failed.\n", fcn_name); } @@ -2649,7 +2649,7 @@ setup_cache(size_t max_cache_size, pass = FALSE; failure_mssg = "Can't get file_ptr."; - + if ( verbose ) { HDfprintf(stdout, "%s: H5Fflush() failed.\n", fcn_name); } @@ -2679,15 +2679,15 @@ setup_cache(size_t max_cache_size, * and we have modified many cache routines to use a file * pointer to look up the target cache. * - * Thus we now make note of the address of the instance of - * H5C_t created by the call to H5Fcreate(), set + * Thus we now make note of the address of the instance of + * H5C_t created by the call to H5Fcreate(), set * file_ptr->shared->cache to NULL, call H5C_create() * to allocate a new instance of H5C_t for test purposes, - * and store than new instance's address in + * and store than new instance's address in * file_ptr->shared->cache. * * On shut down, we call H5C_dest on our instance of H5C_t, - * set file_ptr->shared->cache to point to the original + * set file_ptr->shared->cache to point to the original * instance, and then close the file normally. */ @@ -2714,7 +2714,7 @@ setup_cache(size_t max_cache_size, fcn_name, mile_stone++, (int)pass); if ( pass ) { - + if ( cache_ptr == NULL ) { pass = FALSE; @@ -2741,14 +2741,14 @@ setup_cache(size_t max_cache_size, if ( pass ) { /* allocate space for test entries */ - actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT, + actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT, (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR)); if ( actual_base_addr == HADDR_UNDEF ) { pass = FALSE; failure_mssg = "H5MF_alloc() failed."; - + if ( verbose ) { HDfprintf(stdout, "%s: H5MF_alloc() failed.\n", fcn_name); } @@ -2763,7 +2763,7 @@ setup_cache(size_t max_cache_size, failure_mssg = "actual_base_addr > BASE_ADDR"; if ( verbose ) { - HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n", + HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n", fcn_name); } } @@ -2820,7 +2820,7 @@ takedown_cache(H5F_t * file_ptr, H5C_stats(cache_ptr, "test cache", dump_detailed_stats); } - + flush_cache(file_ptr, TRUE, FALSE, FALSE); H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT); @@ -2846,7 +2846,7 @@ takedown_cache(H5F_t * file_ptr, if ( NULL == file_ptr ) { file_ptr = (H5F_t *)H5I_object_verify(saved_fid, H5I_FILE); HDassert ( file_ptr ); - } + } H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT, saved_actual_base_addr, (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR)); @@ -2977,61 +2977,59 @@ flush_cache(H5F_t * file_ptr, hbool_t dump_detailed_stats) { const char * fcn_name = "flush_cache()"; - H5C_t * cache_ptr; - herr_t result = 0; hbool_t verbose = FALSE; verify_unprotected(); - if ( pass ) { + if(pass) { + H5C_t * cache_ptr = NULL; + herr_t result = 0; HDassert(file_ptr); cache_ptr = file_ptr->shared->cache; - if ( destroy_entries ) { + if(destroy_entries) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_INVALIDATE_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); - } else { + } + else { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); } - } - if ( dump_stats ) { + if(dump_stats) { - H5C_stats(cache_ptr, "test cache", dump_detailed_stats); - } + H5C_stats(cache_ptr, "test cache", dump_detailed_stats); + } - if ( result < 0 ) { + if(result < 0) { - pass = FALSE; - failure_mssg = "error in H5C_flush_cache()."; - } - else if ( ( destroy_entries ) && - ( ( cache_ptr->index_len != 0 ) || - ( cache_ptr->index_size != 0 ) || - ( cache_ptr->clean_index_size != 0 ) || - ( cache_ptr->dirty_index_size != 0 ) ) ) { - - if ( verbose ) { - HDfprintf(stdout, - "%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n", - fcn_name, - (long long)(cache_ptr->index_len), - (long long)(cache_ptr->index_size), - (long long)(cache_ptr->clean_index_size), - (long long)(cache_ptr->dirty_index_size)); - } - pass = FALSE; - failure_mssg = - "non zero index len/sizes after H5C_flush_cache() with invalidate."; + pass = FALSE; + failure_mssg = "error in H5C_flush_cache()."; + } + else if((destroy_entries) && ((cache_ptr->index_len != 0) + || (cache_ptr->index_size != 0) + || (cache_ptr->clean_index_size != 0) + || (cache_ptr->dirty_index_size != 0))) { + + if(verbose) { + HDfprintf(stdout, + "%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n", + fcn_name, + (long long)(cache_ptr->index_len), + (long long)(cache_ptr->index_size), + (long long)(cache_ptr->clean_index_size), + (long long)(cache_ptr->dirty_index_size)); + } + pass = FALSE; + failure_mssg = "non zero index len/sizes after H5C_flush_cache() with invalidate."; + } } - return; } /* flush_cache() */ @@ -4020,7 +4018,7 @@ unprotect_entry_with_size_change(H5F_t * file_ptr, if ( result < 0 ) HDfprintf(stdout, "%s: H5C_unprotect() failed.\n", fcn_name); - if ( entry_ptr->header.is_protected ) + if ( entry_ptr->header.is_protected ) HDfprintf(stdout, "%s: entry still protected?!?.\n", fcn_name); if ( entry_ptr->header.type != &(types[type]) ) @@ -4549,7 +4547,7 @@ row_major_scan_backward(H5F_t * file_ptr, if ( pass ) { cache_ptr = file_ptr->shared->cache; - + HDassert( cache_ptr != NULL ); HDassert( lag >= 10 ); @@ -5324,7 +5322,7 @@ hl_col_major_scan_backward(H5F_t * file_ptr, if ( pass ) { cache_ptr = file_ptr->shared->cache; - + HDassert( cache_ptr != NULL ); HDassert( lag > 5 ); HDassert( max_index >= 500 ); diff --git a/test/cache_common.h b/test/cache_common.h index 7f2af16..0e20b97 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -81,10 +81,10 @@ #define MAX_ENTRIES (10 * 1024) -/* The choice of the BASE_ADDR below is arbitrary -- it just has to be +/* The choice of the BASE_ADDR below is arbitrary -- it just has to be * larger than the superblock. */ -#define BASE_ADDR (haddr_t)1024 +#define BASE_ADDR (haddr_t)1024 #define PICO_BASE_ADDR BASE_ADDR #define NANO_BASE_ADDR (haddr_t)(PICO_BASE_ADDR + \ (PICO_ENTRY_SIZE * NUM_PICO_ENTRIES)) @@ -337,21 +337,25 @@ typedef struct test_entry_t #define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3) #define H5C__HASH_FCN(x) (int)(((x) & H5C__HASH_MASK) >> 3) -#define H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr) \ +#define H5C_TEST__PRE_HT_SEARCH_SC(cache_ptr, Addr) \ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ ( ! H5F_addr_defined(Addr) ) || \ ( H5C__HASH_FCN(Addr) < 0 ) || \ ( H5C__HASH_FCN(Addr) >= H5C__HASH_TABLE_LEN ) ) { \ HDfprintf(stdout, "Pre HT search SC failed.\n"); \ } -#define H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k) \ +#define H5C_TEST__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k) \ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ ( (cache_ptr)->index_len < 1 ) || \ ( (entry_ptr) == NULL ) || \ ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ ( H5F_addr_ne((entry_ptr)->addr, (Addr)) ) || \ ( (entry_ptr)->size <= 0 ) || \ ( ((cache_ptr)->index)[k] == NULL ) || \ @@ -366,12 +370,18 @@ if ( ( (cache_ptr) == NULL ) || \ HDfprintf(stdout, "Post successful HT search SC failed.\n"); \ } +#define H5C_TEST__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k) \ +if ( ( (cache_ptr) == NULL ) || \ + ( ((cache_ptr)->index)[k] != (entry_ptr) ) || \ + ( (entry_ptr)->ht_prev != NULL ) ) { \ + HDfprintf(stdout, "Post HT shift to front failed.\n"); \ +} -#define H5C__SEARCH_INDEX(cache_ptr, Addr, entry_ptr) \ +#define H5C_TEST__SEARCH_INDEX(cache_ptr, Addr, entry_ptr) \ { \ int k; \ int depth = 0; \ - H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr) \ + H5C_TEST__PRE_HT_SEARCH_SC(cache_ptr, Addr) \ k = H5C__HASH_FCN(Addr); \ entry_ptr = ((cache_ptr)->index)[k]; \ while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \ @@ -381,7 +391,7 @@ if ( ( (cache_ptr) == NULL ) || \ } \ if ( entry_ptr ) \ { \ - H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k) \ + H5C_TEST__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k) \ if ( entry_ptr != ((cache_ptr)->index)[k] ) \ { \ if ( (entry_ptr)->ht_next ) \ @@ -394,6 +404,7 @@ if ( ( (cache_ptr) == NULL ) || \ (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ (entry_ptr)->ht_prev = NULL; \ ((cache_ptr)->index)[k] = (entry_ptr); \ + H5C_TEST__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k) \ } \ } \ } diff --git a/test/cross_read.c b/test/cross_read.c index b036217..6b2badf 100755 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -22,6 +22,7 @@ */ #include "h5test.h" +#include "H5srcdir.h" const char *FILENAME[] = { "vms_data", @@ -37,8 +38,7 @@ const char *FILENAME[] = { static int read_data(char *fname) { - char pathname[1024]; - char *srcdir = getenv("srcdir"); /*where the src code is located*/ + const char *pathname = H5_get_srcdir_filename(fname); /* Corrected test file name */ hid_t file, dataset; /* handles */ hid_t datatype; hid_t dt; @@ -47,14 +47,6 @@ static int read_data(char *fname) int i, j; unsigned nerrors = 0; - pathname[0] = '\0'; - /* Generate correct name for test file by prepending the source path */ - if(srcdir && ((strlen(srcdir) + strlen(fname) + 1) < sizeof(pathname))) { - strcpy(pathname, srcdir); - strcat(pathname, "/"); - } - strcat(pathname, fname); - /* * Data and output buffer initialization. */ diff --git a/test/dsets.c b/test/dsets.c index 84b40bb..b7ba484 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -24,6 +24,7 @@ #include #include "h5test.h" +#include "H5srcdir.h" #include "H5Vprivate.h" #ifdef H5_HAVE_SZLIB_H # include "szlib.h" @@ -57,6 +58,7 @@ const char *FILENAME[] = { "chunk_fast", /* 10 */ "chunk_expand", /* 11 */ "chunk_fixed", /* 12 */ + "copy_dcpl_newfile", NULL }; #define FILENAME_BUF_SIZE 1024 @@ -107,6 +109,9 @@ const char *FILENAME[] = { #define DSET_SCALEOFFSET_DOUBLE_NAME_2 "scaleoffset_double_2" #define DSET_COMPARE_DCPL_NAME "compare_dcpl" #define DSET_COMPARE_DCPL_NAME_2 "compare_dcpl_2" +#define DSET_COPY_DCPL_NAME_1 "copy_dcpl_1" +#define DSET_COPY_DCPL_NAME_2 "copy_dcpl_2" +#define COPY_DCPL_EXTFILE_NAME "ext_file" #define DSET_DEPREC_NAME "deprecated" #define DSET_DEPREC_NAME_CHUNKED "deprecated_chunked" #define DSET_DEPREC_NAME_COMPACT "deprecated_compact" @@ -714,93 +719,100 @@ test_compact_io(hid_t fapl) * Purpose: Tests compact dataset of maximal size. * * Return: Success: 0 - * * Failure: -1 * * Programmer: Raymond Lu * August 8, 2002 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t test_max_compact(hid_t fapl) { - hid_t file, dataset, space, plist; + hid_t file = -1; + hid_t dataset = -1; + hid_t space = -1; + hid_t plist = -1; hsize_t dims[1]; - hsize_t compact_size; - herr_t status; - int *wbuf, *rbuf; + size_t compact_size; + int *wbuf = NULL; + int *rbuf = NULL; char filename[FILENAME_BUF_SIZE]; - int i, n; + int n; + size_t u; TESTING("compact dataset of maximal size"); /* Test compact dataset of size 64KB-64 */ /* Initialize data */ - compact_size = (SIXTY_FOUR_KB-64)/sizeof(int); + compact_size = (SIXTY_FOUR_KB - 64) / sizeof(int); - wbuf = (int*)HDmalloc(sizeof(int)*(size_t)compact_size); - assert(wbuf); - rbuf = (int*)HDmalloc(sizeof(int)*(size_t)compact_size); - assert(rbuf); + if(NULL == (wbuf = (int *)HDmalloc(sizeof(int) * compact_size))) + TEST_ERROR + if(NULL == (rbuf = (int *)HDmalloc(sizeof(int) * compact_size))) + TEST_ERROR - n=0; - for(i=0; i<(int)compact_size; i++) - wbuf[i] = n++; + n = 0; + for(u = 0; u < compact_size; u++) + wbuf[u] = n++; /* Create a small data space for compact dataset */ - dims[0] = compact_size; - space = H5Screate_simple(1, dims, NULL); - assert(space>=0); + dims[0] = (hsize_t)compact_size; + if((space = H5Screate_simple(1, dims, NULL)) < 0) + FAIL_STACK_ERROR /* Create a file */ h5_fixname(FILENAME[3], fapl, filename, sizeof filename); - if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + FAIL_STACK_ERROR /* Create property list for compact dataset creation */ - plist = H5Pcreate(H5P_DATASET_CREATE); - assert(plist >= 0); - status = H5Pset_layout(plist, H5D_COMPACT); - assert(status >= 0); + if((plist = H5Pcreate(H5P_DATASET_CREATE)) < 0) + FAIL_STACK_ERROR + if(H5Pset_layout(plist, H5D_COMPACT) < 0) + FAIL_STACK_ERROR /* Create and write to a compact dataset */ if((dataset = H5Dcreate2(file, DSET_COMPACT_MAX_NAME, H5T_NATIVE_INT, space, H5P_DEFAULT, plist, H5P_DEFAULT)) < 0) - goto error; + FAIL_STACK_ERROR if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) - goto error; + FAIL_STACK_ERROR /* Close file */ - if(H5Sclose(space) < 0) goto error; - if(H5Pclose(plist) < 0) goto error; - if(H5Dclose(dataset) < 0) goto error; - if(H5Fclose(file) < 0) goto error; + if(H5Sclose(space) < 0) + FAIL_STACK_ERROR + if(H5Pclose(plist) < 0) + FAIL_STACK_ERROR + if(H5Dclose(dataset) < 0) + FAIL_STACK_ERROR + if(H5Fclose(file) < 0) + FAIL_STACK_ERROR /* * Open the file and check data */ if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) - goto error; + FAIL_STACK_ERROR if((dataset = H5Dopen2(file, DSET_COMPACT_MAX_NAME, H5P_DEFAULT)) < 0) - goto error; + FAIL_STACK_ERROR if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) - goto error; + FAIL_STACK_ERROR /* Check that the values read are the same as the values written */ - for(i = 0; i < (int)compact_size; i++) - if(rbuf[i] != wbuf[i]) { + for(u = 0; u < compact_size; u++) + if(rbuf[u] != wbuf[u]) { H5_FAILED(); printf(" Read different values than written.\n"); - printf(" At index %d\n", i); + printf(" At index %u\n", (unsigned)u); goto error; } /* end if */ - if(H5Dclose(dataset) < 0) goto error; - if(H5Fclose(file) < 0) goto error; + if(H5Dclose(dataset) < 0) + FAIL_STACK_ERROR + if(H5Fclose(file) < 0) + FAIL_STACK_ERROR HDfree(wbuf); wbuf = NULL; HDfree(rbuf); @@ -809,20 +821,20 @@ test_max_compact(hid_t fapl) /* Test compact dataset of size 64KB */ /* Create a data space for compact dataset */ - compact_size = SIXTY_FOUR_KB/sizeof(int); - dims[0] = compact_size; - space = H5Screate_simple(1, dims, NULL); - assert(space>=0); + compact_size = SIXTY_FOUR_KB / sizeof(int); + dims[0] = (hsize_t)compact_size; + if((space = H5Screate_simple(1, dims, NULL)) < 0) + FAIL_STACK_ERROR /* Open file */ - if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) + if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) goto error; /* Create property list for compact dataset creation */ - plist = H5Pcreate(H5P_DATASET_CREATE); - assert(plist >= 0); - status = H5Pset_layout(plist, H5D_COMPACT); - assert(status >= 0); + if((plist = H5Pcreate(H5P_DATASET_CREATE)) < 0) + FAIL_STACK_ERROR + if(H5Pset_layout(plist, H5D_COMPACT) < 0) + FAIL_STACK_ERROR /* Create and write to a compact dataset */ H5E_BEGIN_TRY { @@ -830,9 +842,12 @@ test_max_compact(hid_t fapl) } H5E_END_TRY; /* Close file */ - H5Sclose(space); - H5Pclose(plist); - H5Fclose(file); + if(H5Sclose(space) < 0) + FAIL_STACK_ERROR + if(H5Pclose(plist) < 0) + FAIL_STACK_ERROR + if(H5Fclose(file) < 0) + FAIL_STACK_ERROR PASSED(); return 0; @@ -842,7 +857,7 @@ error: HDfree(wbuf); if(rbuf) HDfree(rbuf); - + H5E_BEGIN_TRY { /* Close file */ H5Sclose(space); @@ -852,7 +867,7 @@ error: } H5E_END_TRY; return -1; -} +} /* end test_max_compact() */ /*------------------------------------------------------------------------- @@ -1027,10 +1042,10 @@ test_tconv(hid_t file) hid_t space = -1, dataset = -1; int i; - out = (char *)HDmalloc((size_t)(4 * 1000 * 1000)); - HDassert(out); - in = (char *)HDmalloc((size_t)(4 * 1000 * 1000)); - HDassert(in); + if ((out = (char *)HDmalloc((size_t)(4 * 1000 * 1000))) == NULL) + goto error; + if ((in = (char *)HDmalloc((size_t)(4 * 1000 * 1000))) == NULL) + goto error; TESTING("data type conversion"); @@ -1080,16 +1095,16 @@ test_tconv(hid_t file) return 0; error: - if(out) + if(out) HDfree(out); - if(in) + if(in) HDfree(in); - + H5E_BEGIN_TRY { H5Dclose(dataset); H5Sclose(space); } H5E_END_TRY; - + return -1; } @@ -1293,8 +1308,6 @@ const H5Z_class2_t H5Z_CORRUPT[1] = {{ * Programmer: Raymond Lu * Jan 14, 2003 * - * Modifications: - * *------------------------------------------------------------------------- */ static size_t @@ -1302,7 +1315,7 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf) { - void *data; + void *data = NULL; unsigned char *dst = (unsigned char*)(*buf); unsigned int offset; unsigned int length; @@ -1310,20 +1323,21 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts, size_t ret_value = 0; if(cd_nelmts != 3 || !cd_values) - return 0; + TEST_ERROR offset = cd_values[0]; length = cd_values[1]; value = cd_values[2]; if(offset > nbytes || (offset + length) > nbytes || length < sizeof(unsigned int)) - return 0; + TEST_ERROR - data = HDmalloc((size_t)length); + if(NULL == (data = HDmalloc((size_t)length))) + TEST_ERROR HDmemset(data, (int)value, (size_t)length); if(flags & H5Z_FLAG_REVERSE) { /* Varify data is actually corrupted during read */ dst += offset; if(HDmemcmp(data, dst, (size_t)length) != 0) - ret_value = 0; + TEST_ERROR else { *buf_size = nbytes; ret_value = nbytes; @@ -1336,11 +1350,12 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts, ret_value = *buf_size; } /* end else */ +error: if(data) HDfree(data); return ret_value; -} +} /* end filter_corrupt() */ /*------------------------------------------------------------------------- @@ -1759,7 +1774,7 @@ error: * * Modifications: * Make copy of data file since the test writes to the file. - * Larry Knox, October 14, 2009 + * Larry Knox, October 14, 2009 * *------------------------------------------------------------------------- */ @@ -1777,12 +1792,12 @@ test_filter_noencoder(const char *dset_name) int test_ints[10] = { 12 }; int read_buf[10]; int i; - + /* Make a local copy of the file since this test writes to the data file - from svn. */ - if (h5_make_local_copy(NOENCODER_FILENAME, NOENCODER_COPY_FILENAME) < 0) + from svn. */ + if (h5_make_local_copy(NOENCODER_FILENAME, NOENCODER_COPY_FILENAME) < 0) goto error; - + /* Open file */ file_id = H5Fopen(NOENCODER_COPY_FILENAME, H5F_ACC_RDWR, H5P_DEFAULT); if(file_id < 0) goto error; @@ -2275,8 +2290,7 @@ test_missing_filter(hid_t file) hsize_t dset_size; /* Dataset size */ size_t i,j; /* Local index variables */ herr_t ret; /* Generic return value */ - char testfile[512]=""; /* Buffer to hold name of existing test file */ - char *srcdir = HDgetenv("srcdir"); /* The source directory, if we are using the --srcdir configure option */ + const char *testfile = H5_get_srcdir_filename(FILE_DEFLATE_NAME); /* Corrected test file name */ TESTING("dataset access with missing filter"); @@ -2422,13 +2436,6 @@ test_missing_filter(hid_t file) /* Try reading existing dataset with deflate filter */ - /* Compose the name of the file to open, using the srcdir, if appropriate */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(FILE_DEFLATE_NAME) + 1) < sizeof(testfile))){ - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, FILE_DEFLATE_NAME); - /* Open existing file */ if((fid = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5588,6 +5595,138 @@ error: /*------------------------------------------------------------------------- + * Function: test_copy_dcpl + * + * Purpose: Verifies whether the copy of dataset creation property + * list works. It tests the DCPL for chunked layout with + * filter and for contiguous layout with external storage. + * (Please see #1608 in Bugzilla) + * + * Return: Success: 0 + * Failure: -1 + * + * Programmer: Raymond Lu + * 28 January 2010 + * + *------------------------------------------------------------------------- + */ +static herr_t +test_copy_dcpl(hid_t file, hid_t fapl) +{ + hid_t dsid1=(-1), dsid2=(-1); /* Dataset ID */ + hid_t new_dsid1=(-1), new_dsid2=(-1); /* Dataset ID */ + hid_t sid=(-1); /* Dataspace ID */ + hid_t dcpl=(-1); /* Dataset creation property list ID */ + hid_t dcpl1=(-1),dcpl2=(-1); /* Copies of creation property list IDs */ + hid_t dcpl1_copy=(-1),dcpl2_copy=(-1);/* Copies of creation property list IDs */ + const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */ + const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */ + char filename[FILENAME_BUF_SIZE]; + hid_t new_file=(-1); + + TESTING("copying dataset creation property lists"); + + /* Create the data space */ + if((sid = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR + + /* Create dcpl with special filter */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR + if(H5Pset_fletcher32(dcpl) < 0) TEST_ERROR + + /* Create first dataset of chunking with filter */ + if((dsid1 = H5Dcreate2(file, DSET_COPY_DCPL_NAME_1, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, + H5P_DEFAULT)) < 0) TEST_ERROR + + /* Close dataset */ + if(H5Dclose (dsid1) < 0) TEST_ERROR + + /* Reopen the first dataset */ + if((dsid1 = H5Dopen2(file, DSET_COPY_DCPL_NAME_1, H5P_DEFAULT)) < 0) TEST_ERROR + + /* Get the copy of dataset's creation property list */ + if((dcpl1=H5Dget_create_plist(dsid1)) < 0) TEST_ERROR + if((dcpl1_copy = H5Pcopy(dcpl1)) < 0) TEST_ERROR + + /* Close dataset */ + if(H5Dclose (dsid1) < 0) TEST_ERROR + + /* Change the DCPL for contiguous layout with external storage. The size of the reserved + * space in the external file is the size of the dataset - 500*4096*sizeof(int). + * There's no need to clean up the external file since the library doesn't create it + * until the data is written to it. */ + if(H5Pset_layout(dcpl, H5D_CONTIGUOUS) < 0) TEST_ERROR + if(H5Premove_filter(dcpl, H5Z_FILTER_FLETCHER32) < 0) TEST_ERROR + if(H5Pset_external(dcpl, COPY_DCPL_EXTFILE_NAME, 0, 500*4096*sizeof(int)) < 0) TEST_ERROR + + /* Create second dataset of contiguous layout with external storage */ + if((dsid2 = H5Dcreate2(file, DSET_COPY_DCPL_NAME_2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, + H5P_DEFAULT)) < 0) TEST_ERROR + + /* Close dataset */ + if(H5Dclose (dsid2) < 0) TEST_ERROR + + /* Reopen the second dataset */ + if((dsid2 = H5Dopen2(file, DSET_COPY_DCPL_NAME_2, H5P_DEFAULT)) < 0) TEST_ERROR + + /* Get copy of dataset's dataset creation property list */ + if((dcpl2=H5Dget_create_plist(dsid2)) < 0) TEST_ERROR + if((dcpl2_copy = H5Pcopy(dcpl2)) < 0) TEST_ERROR + + /* Close dataset */ + if(H5Dclose (dsid2) < 0) TEST_ERROR + + /* Create a second file and create 2 datasets with the copies of the DCPLs in the first + * file. Test whether the copies of DCPLs work. */ + h5_fixname(FILENAME[11], fapl, filename, sizeof filename); + if((new_file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + if((new_dsid1 = H5Dcreate2(new_file, DSET_COPY_DCPL_NAME_1, H5T_NATIVE_INT, sid, + H5P_DEFAULT, dcpl1_copy, H5P_DEFAULT)) < 0) TEST_ERROR + + if((new_dsid2 = H5Dcreate2(new_file, DSET_COPY_DCPL_NAME_2, H5T_NATIVE_INT, sid, + H5P_DEFAULT, dcpl2_copy, H5P_DEFAULT)) < 0) TEST_ERROR + + /* Close dataspace */ + if(H5Sclose(sid) < 0) TEST_ERROR + + /* Close datasets */ + if(H5Dclose (new_dsid1) < 0) TEST_ERROR + if(H5Dclose (new_dsid2) < 0) TEST_ERROR + + /* Close the second file */ + if(H5Fclose (new_file) < 0) TEST_ERROR + + /* Close dataset creation property lists */ + if(H5Pclose(dcpl) < 0) TEST_ERROR + if(H5Pclose(dcpl1) < 0) TEST_ERROR + if(H5Pclose(dcpl2) < 0) TEST_ERROR + if(H5Pclose(dcpl1_copy) < 0) TEST_ERROR + if(H5Pclose(dcpl2_copy) < 0) TEST_ERROR + + PASSED(); + + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dsid1); + H5Dclose(dsid2); + H5Dclose(new_dsid1); + H5Dclose(new_dsid2); + H5Sclose(sid); + H5Pclose(dcpl); + H5Pclose(dcpl1); + H5Pclose(dcpl2); + H5Pclose(dcpl1_copy); + H5Pclose(dcpl2_copy); + } H5E_END_TRY; + return -1; +} /* end test_copy_dcpl() */ + + +/*------------------------------------------------------------------------- * Function: test_filter_delete * * Purpose: Tests deletion of filters from a dataset creation property list @@ -5822,8 +5961,7 @@ test_filters_endianess(void) hid_t dsid=-1; /* dataset ID */ hid_t sid=-1; /* dataspace ID */ hid_t dcpl=-1; /* dataset creation property list ID */ - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing file */ + const char *data_file = H5_get_srcdir_filename("test_filters_le.hdf5"); /* Corrected test file name */ TESTING("filters with big-endian/little-endian data"); @@ -5833,14 +5971,6 @@ test_filters_endianess(void) *------------------------------------------------------------------------- */ - /* compose the name of the file to open, using the srcdir, if appropriate */ - HDstrcpy(data_file, ""); - if(srcdir) { - HDstrcpy(data_file, srcdir); - HDstrcat(data_file, "/"); - } - HDstrcat(data_file, "test_filters_le.hdf5"); - /* open */ if((fid = H5Fopen(data_file, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR @@ -5856,12 +5986,7 @@ test_filters_endianess(void) */ /* compose the name of the file to open, using the srcdir, if appropriate */ - HDstrcpy(data_file, ""); - if(srcdir) { - HDstrcpy(data_file, srcdir); - HDstrcat(data_file, "/"); - } - HDstrcat(data_file, "test_filters_be.hdf5"); + data_file = H5_get_srcdir_filename("test_filters_be.hdf5"); /* Corrected test file name */ /* open */ if((fid = H5Fopen(data_file, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR @@ -6803,7 +6928,7 @@ error: * * Purpose: When the chunk size is bigger than the cache size and the * chunk isn't on disk, this test verifies that the library - * bypasses the cache. + * bypasses the cache. * * Note: This test is not very conclusive - it doesn't actually check * if the chunks bypass the cache... :-( -QAK @@ -6829,7 +6954,7 @@ test_big_chunks_bypass_cache(hid_t fapl) size_t rdcc_nelmts, rdcc_nbytes; int fvalue = BYPASS_FILL_VALUE; hsize_t count, stride, offset, block; - static int wdata[BYPASS_CHUNK_DIM/2], rdata1[BYPASS_DIM], + static int wdata[BYPASS_CHUNK_DIM/2], rdata1[BYPASS_DIM], rdata2[BYPASS_CHUNK_DIM/2]; int i, j; @@ -6873,7 +6998,7 @@ test_big_chunks_bypass_cache(hid_t fapl) count = 1; stride = 1; block = BYPASS_CHUNK_DIM / 2; - if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &offset, &stride, &count, &block) < 0) + if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &offset, &stride, &count, &block) < 0) FAIL_STACK_ERROR /* Initialize data to write */ @@ -6889,9 +7014,9 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Reopen the dataset */ if((dsid = H5Dopen2(fid, BYPASS_DATASET1, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Reads both 2 chunks. Reading the second chunk should bypass the cache because the + /* Reads both 2 chunks. Reading the second chunk should bypass the cache because the * chunk is bigger than the cache size and it isn't allocated on disk. */ - if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata1) < 0) + if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata1) < 0) FAIL_STACK_ERROR for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++) @@ -6910,9 +7035,9 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Close the first dataset */ if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR - + /* Create a second dataset without fill value. This time, both write - * and read should bypass the cache because the chunk is bigger than the + * and read should bypass the cache because the chunk is bigger than the * cache size and it's not allocated on disk. */ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) FAIL_STACK_ERROR @@ -6927,10 +7052,10 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Reopen the dataset */ if((dsid = H5Dopen2(fid, BYPASS_DATASET2, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Read back only the part that was written to the file. Reading the + /* Read back only the part that was written to the file. Reading the * half chunk should bypass the cache because the chunk is bigger than * the cache size. */ - if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, rdata2) < 0) + if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, rdata2) < 0) for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++) if(rdata2[i] != i) { @@ -8326,6 +8451,7 @@ main(void) nerrors += (test_set_local(my_fapl) < 0 ? 1 : 0); nerrors += (test_can_apply_szip(file) < 0 ? 1 : 0); nerrors += (test_compare_dcpl(file) < 0 ? 1 : 0); + nerrors += (test_copy_dcpl(file, my_fapl) < 0 ? 1 : 0); nerrors += (test_filter_delete(file) < 0 ? 1 : 0); nerrors += (test_filters_endianess() < 0 ? 1 : 0); nerrors += (test_zero_dims(file) < 0 ? 1 : 0); @@ -8355,7 +8481,7 @@ main(void) printf("All dataset tests passed.\n"); #ifdef H5_HAVE_FILTER_SZIP if (GetTestCleanup()) - HDremove(NOENCODER_COPY_FILENAME); + HDremove(NOENCODER_COPY_FILENAME); #endif /* H5_HAVE_FILTER_SZIP */ h5_cleanup(FILENAME, fapl); diff --git a/test/dtransform.c b/test/dtransform.c index cb58a6c..9af1dfb 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -27,10 +27,10 @@ static int test_set(void); static int test_getset(const hid_t dxpl_id_simple); /* These are needed for multiple tests, so are declared here globally and are init'ed in init_test */ -hid_t dset_id_int; -hid_t dset_id_float; -hid_t dset_id_int_chunk; -hid_t dset_id_float_chunk; +hid_t dset_id_int = -1; +hid_t dset_id_float = -1; +hid_t dset_id_int_chunk = -1; +hid_t dset_id_float_chunk = -1; const float windchillFfloat[ROWS][COLS] = @@ -68,15 +68,15 @@ const int transformData[ROWS][COLS] = size_t i,j; \ \ for(i=0; i= (TYPE)((VAR2)[i][j])) && ( ((VAR1)[i][j] - TOL) < (TYPE)((VAR2)[i][j]))) || ( ((VAR1)[i][j] <= (TYPE)((VAR2)[i][j])) && ( ((VAR1)[i][j] + TOL) > (TYPE)((VAR2)[i][j]))))) \ - { \ - H5_FAILED(); \ - fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \ - goto error; \ - } \ - } \ + for(j=0; j= (TYPE)((VAR2)[i][j])) && ( ((VAR1)[i][j] - TOL) < (TYPE)((VAR2)[i][j]))) || ( ((VAR1)[i][j] <= (TYPE)((VAR2)[i][j])) && ( ((VAR1)[i][j] + TOL) > (TYPE)((VAR2)[i][j]))))) \ + { \ + H5_FAILED(); \ + fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \ + goto error; \ + } \ + } \ PASSED(); \ } @@ -85,15 +85,15 @@ const int transformData[ROWS][COLS] = size_t i,j; \ \ for(i=0; i= ((TYPE)(VAR2)[i][j] - TOL))) ) \ - { \ - H5_FAILED(); \ - fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \ - goto error; \ - } \ - } \ + for(j=0; j= ((TYPE)(VAR2)[i][j] - TOL))) ) \ + { \ + H5_FAILED(); \ + fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \ + goto error; \ + } \ + } \ PASSED(); \ } @@ -172,17 +172,17 @@ const int transformData[ROWS][COLS] = \ hid_t dataspace, dxpl_id_f_to_c, dxpl_id_utrans, cparms, memspace, dset_chunk, filespace; \ hsize_t dim[2] = {ROWS, COLS}; \ - hsize_t offset[2] = {0, 0}; \ + hsize_t offset[2] = {0, 0}; \ \ \ if((dataspace = H5Screate_simple(2, dim, NULL)) < 0) TEST_ERROR; \ \ - cparms = H5Pcreate(H5P_DATASET_CREATE); \ - if(H5Pset_chunk(cparms, 2, dim) < 0) TEST_ERROR; \ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; \ + if(H5Pset_chunk(cparms, 2, dim) < 0) TEST_ERROR; \ \ if((dset_chunk = H5Dcreate2(file_id, "/transformtest_chunk_"TEST_STR, HDF_TYPE, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0) TEST_ERROR; \ - filespace = H5Dget_space (dset_chunk); \ - memspace = H5Screate_simple(2, dim, NULL); \ + if((filespace = H5Dget_space(dset_chunk)) < 0) TEST_ERROR \ + if((memspace = H5Screate_simple(2, dim, NULL)) < 0) TEST_ERROR \ if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dim, NULL) < 0) TEST_ERROR; \ \ if(SIGNED) \ @@ -190,14 +190,14 @@ const int transformData[ROWS][COLS] = if((dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; \ if(H5Pset_data_transform(dxpl_id_f_to_c, f_to_c) < 0) TEST_ERROR; \ if(H5Dwrite(dset_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, dxpl_id_f_to_c, windchillFfloat) < 0) TEST_ERROR; \ - if(H5Pclose(dxpl_id_f_to_c) < 0) TEST_ERROR; \ + if(H5Pclose(dxpl_id_f_to_c) < 0) TEST_ERROR; \ } \ else \ { \ if((dxpl_id_utrans = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; \ if(H5Pset_data_transform(dxpl_id_utrans, utrans) < 0) TEST_ERROR; \ if(H5Dwrite(dset_chunk, H5T_NATIVE_INT, dataspace, filespace, dxpl_id_utrans, transformData) < 0) TEST_ERROR; \ - if(H5Pclose(dxpl_id_utrans) < 0) TEST_ERROR; \ + if(H5Pclose(dxpl_id_utrans) < 0) TEST_ERROR; \ } \ \ \ @@ -211,17 +211,17 @@ const int transformData[ROWS][COLS] = \ if(SIGNED) \ { \ - TESTING("chunked, with type conversion (float->"TEST_STR")") \ + TESTING("chunked, with type conversion (float->"TEST_STR")") \ \ if(H5Dread(dset_id_float_chunk, HDF_TYPE, memspace, filespace, XFORM, array) < 0) TEST_ERROR; \ - COMPARE(TYPE, array, COMPARE_DATA, 2) \ + COMPARE(TYPE, array, COMPARE_DATA, 2) \ } \ \ - \ - if(H5Pclose(cparms) < 0) TEST_ERROR; \ + \ + if(H5Pclose(cparms) < 0) TEST_ERROR; \ if(H5Dclose(dset_chunk) < 0) TEST_ERROR; \ - if(H5Sclose(dataspace) < 0) TEST_ERROR; \ - if(H5Sclose(memspace) < 0) TEST_ERROR; \ + if(H5Sclose(dataspace) < 0) TEST_ERROR; \ + if(H5Sclose(memspace) < 0) TEST_ERROR; \ } #define INVALID_SET_TEST(TRANSFORM) \ @@ -240,7 +240,13 @@ const int transformData[ROWS][COLS] = int main(void) { - hid_t dxpl_id_c_to_f, dxpl_id_c_to_f_copy, dxpl_id_simple, dxpl_id_polynomial, dxpl_id_polynomial_copy, dxpl_id_utrans_inv, file_id; + hid_t dxpl_id_c_to_f = -1; + hid_t dxpl_id_c_to_f_copy = 1; + hid_t dxpl_id_simple = -1; + hid_t dxpl_id_polynomial = -1; + hid_t dxpl_id_polynomial_copy = -1; + hid_t dxpl_id_utrans_inv = -1; + hid_t file_id = -1; const char* c_to_f = "(9/5.0)*x + 32"; const char* simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */ @@ -344,6 +350,19 @@ int main(void) return 0; error: + H5E_BEGIN_TRY { + H5Dclose(dset_id_int); + H5Dclose(dset_id_int_chunk); + H5Dclose(dset_id_float); + H5Dclose(dset_id_float_chunk); + H5Fclose(file_id); + H5Pclose(dxpl_id_c_to_f); + H5Pclose(dxpl_id_c_to_f_copy); + H5Pclose(dxpl_id_polynomial); + H5Pclose(dxpl_id_polynomial_copy); + H5Pclose(dxpl_id_simple); + H5Pclose(dxpl_id_utrans_inv); + } H5E_END_TRY return -1; } @@ -354,93 +373,132 @@ init_test(hid_t file_id) /* utrans is a transform for unsigned types: no negative numbers involved and results are < 255 to fit into uchar */ const char* utrans = "((x+100)/4)*3"; - hid_t dataspace, dxpl_id_f_to_c, dxpl_id_utrans, cparms, filespace; - hsize_t dim[2] = {ROWS, COLS}; - hsize_t offset[2] = {0, 0}; - - if((dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; - if((dxpl_id_utrans = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; + hid_t dataspace = -1; + hid_t dxpl_id_f_to_c = -1; + hid_t dxpl_id_utrans = -1; + hid_t cparms = -1; + hid_t filespace = -1; + hsize_t dim[2] = { ROWS, COLS }; + hsize_t offset[2] = { 0, 0 }; - if(H5Pset_data_transform(dxpl_id_f_to_c, f_to_c) < 0) TEST_ERROR; - if(H5Pset_data_transform(dxpl_id_utrans, utrans) < 0) TEST_ERROR; + if((dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER)) < 0) + TEST_ERROR + if((dxpl_id_utrans = H5Pcreate(H5P_DATASET_XFER)) < 0) + TEST_ERROR + if(H5Pset_data_transform(dxpl_id_f_to_c, f_to_c) < 0) + TEST_ERROR + if(H5Pset_data_transform(dxpl_id_utrans, utrans) < 0) + TEST_ERROR cparms = H5Pcreate(H5P_DATASET_CREATE); - if(H5Pset_chunk(cparms, 2, dim) < 0) TEST_ERROR; + if(H5Pset_chunk(cparms, 2, dim) < 0) + TEST_ERROR - if((dataspace = H5Screate_simple(2, dim, NULL)) < 0) TEST_ERROR; + if((dataspace = H5Screate_simple(2, dim, NULL)) < 0) + TEST_ERROR TESTING("Intializing test...") - if((dset_id_int = H5Dcreate2(file_id, "/default_int", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR; - if(H5Dwrite(dset_id_int, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_f_to_c, windchillFfloat) < 0) TEST_ERROR; - - if((dset_id_float = H5Dcreate2(file_id, "/default_float", H5T_NATIVE_FLOAT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR; - if(H5Dwrite(dset_id_float, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_f_to_c, windchillFfloat) < 0) TEST_ERROR; - - if((dset_id_int_chunk = H5Dcreate2(file_id, "/default_chunk_int", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0) TEST_ERROR; - - filespace = H5Dget_space (dset_id_int_chunk); - if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dim, NULL) < 0) TEST_ERROR; - if(H5Dwrite(dset_id_int_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, dxpl_id_f_to_c, windchillFfloat) < 0) TEST_ERROR; - - if((dset_id_float_chunk = H5Dcreate2(file_id, "/default_chunk_float", H5T_NATIVE_FLOAT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0) TEST_ERROR; - if(H5Dwrite(dset_id_float_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, dxpl_id_f_to_c, windchillFfloat) < 0) TEST_ERROR; - + if((dset_id_int = H5Dcreate2(file_id, "/default_int", H5T_NATIVE_INT, + dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if(H5Dwrite(dset_id_int, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, + dxpl_id_f_to_c, windchillFfloat) < 0) + TEST_ERROR + + if((dset_id_float = H5Dcreate2(file_id, "/default_float", + H5T_NATIVE_FLOAT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if(H5Dwrite(dset_id_float, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, + dxpl_id_f_to_c, windchillFfloat) < 0) + TEST_ERROR + + if((dset_id_int_chunk = H5Dcreate2(file_id, "/default_chunk_int", + H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0) + TEST_ERROR + + if((filespace = H5Dget_space(dset_id_int_chunk)) < 0) + TEST_ERROR + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dim, NULL) < 0) + TEST_ERROR + if(H5Dwrite(dset_id_int_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, + dxpl_id_f_to_c, windchillFfloat) < 0) + TEST_ERROR + + if((dset_id_float_chunk = H5Dcreate2(file_id, "/default_chunk_float", + H5T_NATIVE_FLOAT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0) + TEST_ERROR + if(H5Dwrite(dset_id_float_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, + dxpl_id_f_to_c, windchillFfloat) < 0) + TEST_ERROR + + if(H5Pclose(cparms) < 0) + TEST_ERROR + if(H5Pclose(dxpl_id_f_to_c) < 0) + TEST_ERROR + if(H5Pclose(dxpl_id_utrans) < 0) + TEST_ERROR + if(H5Sclose(dataspace) < 0) + TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Pclose(cparms); + H5Pclose(dxpl_id_f_to_c); + H5Pclose(dxpl_id_utrans); + H5Sclose(dataspace); + H5Sclose(filespace); + } H5E_END_TRY - if(H5Pclose(cparms) < 0) TEST_ERROR; - if(H5Pclose(dxpl_id_f_to_c) < 0) TEST_ERROR; - if(H5Pclose(dxpl_id_utrans) < 0) TEST_ERROR; - if(H5Sclose(dataspace) < 0) TEST_ERROR; - - return 0; -error: - return -1; + return -1; } static int test_poly(const hid_t dxpl_id_polynomial) { float polyflres[ROWS][COLS]; - int polyintread[ROWS][COLS]; + int polyintread[ROWS][COLS]; float polyflread[ROWS][COLS]; int windchillC; int row, col; - for(row = 0; rowfloat)") - if(H5Dread(dset_id_int, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_polynomial, polyflread) < 0) TEST_ERROR; + if(H5Dread(dset_id_int, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, + dxpl_id_polynomial, polyflread) < 0) + TEST_ERROR + COMPARE(float, polyflread, polyflres, 2.0) - - for(row = 0; rowint)") - if(H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id_polynomial, polyintread) < 0) TEST_ERROR; + if(H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + dxpl_id_polynomial, polyintread) < 0) + TEST_ERROR + COMPARE(int, polyintread, polyflres, 4) return 0; -error: - return -1; +error: + return -1; } static int @@ -452,27 +510,29 @@ test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_copy) int windchillFintread[ROWS][COLS]; int row, col; - for(row = 0; row FLOAT_TOL) - { - H5_FAILED(); - fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); - goto error; - } - } - } - PASSED(); + if(H5Dread(dset_id_float, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, + dxpl_id_simple, windchillFfloatread) < 0) + TEST_ERROR + for(row = 0; row < ROWS; row++) + for(col = 0; col < COLS; col++) { + if((windchillFfloatread[row][col] - 4.8) > FLOAT_TOL) + FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n"); + } + + PASSED() TESTING("data transform, trivial transform, with type conversion") - if(H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id_simple, windchillFintread) < 0) TEST_ERROR; - for(row = 0; row FLOAT_TOL) - { - H5_FAILED(); - fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); - goto error; - } - } - } - PASSED(); + if(H5Pset_data_transform(dxpl_id_c_to_f, simple) < 0) + TEST_ERROR + + if(H5Dread(dset_id_float, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, + dxpl_id_c_to_f, windchillFfloatread) < 0) + TEST_ERROR + + for(row = 0; row < ROWS; row++) + for(col = 0; col < COLS; col++) { + if((windchillFfloatread[row][col] - 4.8) > FLOAT_TOL) + FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n") + } - ptrgetTest = (char *) malloc(strlen(simple)+1); + PASSED() - HDmemset(ptrgetTest, 0, strlen(simple)+1); TESTING("H5Pget_data_transform, after resetting transform property") - H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(simple)+1); - if(strcmp(simple, ptrgetTest) != 0) - { - H5_FAILED(); - fprintf(stderr, " ERROR: Data transform failed to match what was set\n"); - goto error; - } - else - PASSED(); - - free(ptrgetTest); + + if(NULL == (ptrgetTest = (char *)HDcalloc(1, HDstrlen(simple) + 1))) + TEST_ERROR + if(H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(simple) + 1) < 0) + TEST_ERROR + if(HDstrcmp(simple, ptrgetTest) != 0) + FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n") + + PASSED() + + HDfree(ptrgetTest); + ptrgetTest = NULL; return 0; error: - return -1; + if(ptrgetTest) + HDfree(ptrgetTest); + + return -1; } static int test_set(void) { - hid_t dxpl_id; + hid_t dxpl_id = -1; H5E_auto2_t func; - const char* str = "(9/5.0)*x + 32"; - char* ptrgetTest = (char *) malloc(strlen(str)+1); + const char *str = "(9/5.0)*x + 32"; + char *ptrgetTest = NULL; + + TESTING("H5Pget_data_transform (get before set)") + + if(NULL == (ptrgetTest = (char *)HDmalloc(HDstrlen(str) + 1))) + TEST_ERROR - if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; + if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + TEST_ERROR /* Test get before set */ - H5Eget_auto2(H5E_DEFAULT,&func,NULL); + H5Eget_auto2(H5E_DEFAULT, &func, NULL); H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - TESTING("H5Pget_data_transform (get before set)") - if(H5Pget_data_transform(dxpl_id, ptrgetTest, strlen(str)+1) < 0) - { - PASSED(); - } - else - { - H5_FAILED(); - fprintf(stderr, " ERROR: Data transform get before set succeeded (it shouldn't have)\n"); - free(ptrgetTest); - goto error; - } - free(ptrgetTest); + + if(H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0) + PASSED() + else + FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n"); + + HDfree(ptrgetTest); + ptrgetTest = NULL; TESTING("H5Pset_data_transform (set with NULL transform)"); INVALID_SET_TEST(NULL); @@ -639,9 +695,18 @@ test_set(void) H5Eset_auto2(H5E_DEFAULT, func, NULL); + if(H5Pclose(dxpl_id) < 0) + TEST_ERROR + return 0; error: - return -1; + if(ptrgetTest) + HDfree(ptrgetTest); + H5E_BEGIN_TRY { + H5Pclose(dxpl_id); + } H5E_END_TRY + return -1; } + diff --git a/test/dtypes.c b/test/dtypes.c index f32afe5..3af2b8a 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -34,9 +34,6 @@ /* For test_compound_8 and test_compound_10 */ #define ARRAY_DIM 4 -/* Epsilon for floating-point comparisons */ -#define FP_EPSILON 0.000001 - /* * Offset from alinged memory returned by malloc(). This can be used to test * that type conversions handle non-aligned buffers correctly. @@ -92,13 +89,6 @@ typedef struct complex_t { double im; } complex_t; -/* - * Count up or down depending on whether the machine is big endian or little - * endian. If local variable `endian' is H5T_ORDER_BE then the result will - * be I, otherwise the result will be Z-(I+1). - */ -#define ENDIAN(Z,I) (H5T_ORDER_BE==endian?(I):(Z)-((I)+1)) - typedef enum dtype_t { INT_SCHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT, INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, FLT_FLOAT, FLT_DOUBLE, @@ -327,7 +317,7 @@ test_copy(void) * Modifications: * Raymond Lu * 8 December 2009 - * I added a field of VL string in the compound type to test + * I added a field of VL string in the compound type to test * H5Tdetect_class correctly detect it as string type. *------------------------------------------------------------------------- */ @@ -523,12 +513,12 @@ test_compound_1(void) TESTING("compound datatypes"); /* Create the empty type */ - if ((complex_id = H5Tcreate(H5T_COMPOUND, sizeof(complex_t))) < 0) + if ((complex_id = H5Tcreate(H5T_COMPOUND, sizeof(complex_t))) < 0) goto error; /* Attempt to add the new compound datatype as a field within itself */ H5E_BEGIN_TRY { - ret=H5Tinsert(complex_id, "compound", 0, complex_id); + ret=H5Tinsert(complex_id, "compound", (size_t)0, complex_id); } H5E_END_TRY; if (ret>=0) { FAIL_PUTS_ERROR("Inserted compound datatype into itself?"); @@ -626,7 +616,7 @@ test_compound_1(void) FAIL_PUTS_ERROR("Operation not allowed for this type."); } /* end if */ - if (H5Tclose (complex_id) < 0) + if (H5Tclose (complex_id) < 0) goto error; PASSED(); @@ -1045,8 +1035,8 @@ test_compound_5(void) {"two", 202, {204, 205, 206, 207}}}; dst_type_t *dst; - void *buf = calloc(2, sizeof(dst_type_t)); - void *bkg = calloc(2, sizeof(dst_type_t)); + void *buf = HDcalloc((size_t)2, sizeof(dst_type_t)); + void *bkg = HDcalloc((size_t)2, sizeof(dst_type_t)); int retval = 1; #if 1 @@ -1061,16 +1051,16 @@ test_compound_5(void) /* Build datatypes */ short_array = H5Tcreate(H5T_COMPOUND, 4*sizeof(short)); array_dt = H5Tarray_create2(H5T_NATIVE_SHORT, 1, dims); - H5Tinsert(short_array, "_", 0, array_dt); + H5Tinsert(short_array, "_", (size_t)0, array_dt); H5Tclose(array_dt); int_array = H5Tcreate(H5T_COMPOUND, 4*sizeof(int)); array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, dims); - H5Tinsert(int_array, "_", 0, array_dt); + H5Tinsert(int_array, "_", (size_t)0, array_dt); H5Tclose(array_dt); string = H5Tcopy(H5T_C_S1); - H5Tset_size(string, 16); + H5Tset_size(string, (size_t)16); src_type = H5Tcreate(H5T_COMPOUND, sizeof(src_type_t)); H5Tinsert(src_type, "name", HOFFSET(src_type_t, name), string ); @@ -1084,7 +1074,7 @@ test_compound_5(void) /* Convert data */ HDmemcpy(buf, src, sizeof(src)); - H5Tconvert(src_type, dst_type, 2, buf, bkg, H5P_DEFAULT); + H5Tconvert(src_type, dst_type, (size_t)2, buf, bkg, H5P_DEFAULT); dst = (dst_type_t*)buf; /* Cleanup */ @@ -2072,14 +2062,14 @@ test_compound_11(void) if((bkg=HDmalloc(sizeof(big_t)*NTESTELEM))==NULL) TEST_ERROR /* Initialize buffer */ - for(u=0; u=0) { H5_FAILED(); @@ -3435,8 +3425,8 @@ test_transient (hid_t fapl) } /* Copying a predefined type results in a modifiable copy */ - if ((type=H5Tcopy (H5T_NATIVE_INT)) < 0) goto error; - if (H5Tset_precision (type, 256) < 0) goto error; + if((type=H5Tcopy(H5T_NATIVE_INT)) < 0) goto error; + if(H5Tset_precision(type, (size_t)256) < 0) goto error; /* It should not be possible to create an attribute for a transient type */ H5E_BEGIN_TRY { @@ -3457,7 +3447,7 @@ test_transient (hid_t fapl) /* The type returned from a dataset should not be modifiable */ if((t2 = H5Dget_type(dset)) < 0) goto error; H5E_BEGIN_TRY { - status = H5Tset_precision(t2, 256); + status = H5Tset_precision(t2, (size_t)256); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -3474,7 +3464,7 @@ test_transient (hid_t fapl) if((dset = H5Dopen2(file, "dset1", H5P_DEFAULT)) < 0) goto error; if((t2 = H5Dget_type(dset)) < 0) goto error; H5E_BEGIN_TRY { - status = H5Tset_precision(t2, 256); + status = H5Tset_precision(t2, (size_t)256); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -3488,7 +3478,7 @@ test_transient (hid_t fapl) * result should be modifiable. */ if((t2=H5Tcopy(dset)) < 0) goto error; - if(H5Tset_precision(t2, 256) < 0) goto error; + if(H5Tset_precision(t2, (size_t)256) < 0) goto error; if(H5Tclose(t2) < 0) goto error; @@ -3568,7 +3558,7 @@ test_named (hid_t fapl) /* We should not be able to modify a type after it has been committed. */ H5E_BEGIN_TRY { - status = H5Tset_precision (type, 256); + status = H5Tset_precision (type, (size_t)256); } H5E_END_TRY; if (status>=0) { H5_FAILED(); @@ -3606,7 +3596,7 @@ test_named (hid_t fapl) HDputs (" Copying a named type should result in a transient type!"); goto error; } - if(H5Tset_precision(t2, 256) < 0) goto error; + if(H5Tset_precision(t2, (size_t)256) < 0) goto error; if(H5Tclose(t2) < 0) goto error; /* @@ -3674,7 +3664,7 @@ test_named (hid_t fapl) * result should be modifiable. */ if((t2 = H5Tcopy(dset)) < 0) goto error; - if(H5Tset_precision(t2, 256) < 0) goto error; + if(H5Tset_precision(t2, (size_t)256) < 0) goto error; if(H5Tclose(t2) < 0) goto error; if(H5Dclose(dset) < 0) goto error; @@ -3756,14 +3746,11 @@ error: * Purpose: Create a new string datatype * * Return: Success: New type - * * Failure: -1 * * Programmer: Robb Matzke * Monday, August 10, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ static hid_t @@ -3771,9 +3758,13 @@ mkstr(size_t len, H5T_str_t strpad) { hid_t t; - if ((t=H5Tcopy(H5T_C_S1)) < 0) return -1; - if (H5Tset_size(t, len) < 0) return -1; - if (H5Tset_strpad(t, strpad) < 0) return -1; + if((t = H5Tcopy(H5T_C_S1)) < 0) + return -1; + if(H5Tset_size(t, len) < 0) + return -1; + if(H5Tset_strpad(t, strpad) < 0) + return -1; + return t; } @@ -3784,21 +3775,19 @@ mkstr(size_t len, H5T_str_t strpad) * Purpose: Test string conversions * * Return: Success: 0 - * * Failure: number of errors * * Programmer: Robb Matzke * Monday, August 10, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ static int test_conv_str_1(void) { - char *buf=NULL; - hid_t src_type, dst_type; + char *buf = NULL; + hid_t src_type = -1; + hid_t dst_type = -1; TESTING("string conversions"); @@ -3806,69 +3795,72 @@ test_conv_str_1(void) * Convert a null-terminated string to a shorter and longer null * terminated string. */ - src_type = mkstr(10, H5T_STR_NULLTERM); - dst_type = mkstr(5, H5T_STR_NULLTERM); - buf = (char*)HDcalloc(2, 10); - HDmemcpy(buf, "abcdefghi\0abcdefghi\0", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0abcd\0abcdefghi\0", 20)) { + if((src_type = mkstr((size_t)10, H5T_STR_NULLTERM)) < 0) goto error; + if((dst_type = mkstr((size_t)5, H5T_STR_NULLTERM)) < 0) goto error; + if(NULL == (buf = (char*)HDcalloc((size_t)2, (size_t)10))) goto error; + HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20)) { H5_FAILED(); HDputs(" Truncated C-string test failed"); goto error; } - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", 20)) { + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20)) { H5_FAILED(); HDputs(" Extended C-string test failed"); goto error; } HDfree(buf); + buf = NULL; if (H5Tclose(src_type) < 0) goto error; if (H5Tclose(dst_type) < 0) goto error; /* * Convert a null padded string to a shorter and then longer string. */ - src_type = mkstr(10, H5T_STR_NULLPAD); - dst_type = mkstr(5, H5T_STR_NULLPAD); - buf = (char*)HDcalloc(2, 10); - HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdeabcdeabcdefghij", 20)) { + if((src_type = mkstr((size_t)10, H5T_STR_NULLPAD)) < 0) goto error; + if((dst_type = mkstr((size_t)5, H5T_STR_NULLPAD)) < 0) goto error; + if(NULL == (buf = (char*)HDcalloc((size_t)2, (size_t)10))) goto error; + HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20)) { H5_FAILED(); HDputs(" Truncated C buffer test failed"); goto error; } - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) { + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) { H5_FAILED(); HDputs(" Extended C buffer test failed"); goto error; } HDfree(buf); + buf = NULL; if (H5Tclose(src_type) < 0) goto error; if (H5Tclose(dst_type) < 0) goto error; /* * Convert a space-padded string to a shorter and then longer string. */ - src_type = mkstr(10, H5T_STR_SPACEPAD); - dst_type = mkstr(5, H5T_STR_SPACEPAD); - buf = (char*)HDcalloc(2, 10); - HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdeabcdeabcdefghij", 20)) { + if((src_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0) goto error; + if((dst_type = mkstr((size_t)5, H5T_STR_SPACEPAD)) < 0) goto error; + if(NULL == (buf = (char*)HDcalloc((size_t)2, (size_t)10))) goto error; + HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20)) { H5_FAILED(); HDputs(" Truncated Fortran-string test failed"); goto error; } - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde abcde ", 20)) { + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcde abcde ", (size_t)20)) { H5_FAILED(); HDputs(" Extended Fortran-string test failed"); goto error; } HDfree(buf); + buf = NULL; if (H5Tclose(src_type) < 0) goto error; if (H5Tclose(dst_type) < 0) goto error; @@ -3878,151 +3870,161 @@ test_conv_str_1(void) * the destination is a different size or type of string then the right * thing should happen. */ - src_type = mkstr(10, H5T_STR_NULLTERM); - dst_type = mkstr(10, H5T_STR_NULLTERM); - buf = (char*)HDcalloc(2, 10); - HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghijabcdefghij", 20)) { + if((src_type = mkstr((size_t)10, H5T_STR_NULLTERM)) < 0) goto error; + if((dst_type = mkstr((size_t)10, H5T_STR_NULLTERM)) < 0) goto error; + if(NULL == (buf = (char*)HDcalloc((size_t)2, (size_t)10))) goto error; + HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20)) { H5_FAILED(); HDputs(" Non-terminated string test 1"); goto error; } H5Tclose(dst_type); - dst_type = mkstr(5, H5T_STR_NULLTERM); - HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0abcd\0abcdefghij", 20)) { + if((dst_type = mkstr((size_t)5, H5T_STR_NULLTERM)) < 0) goto error; + HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20)) { H5_FAILED(); HDputs(" Non-terminated string test 2"); goto error; } - HDmemcpy(buf, "abcdeabcdexxxxxxxxxx", 20); - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) { + HDmemcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20); + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) { H5_FAILED(); HDputs(" Non-terminated string test 2"); goto error; } HDfree(buf); + buf = NULL; if (H5Tclose(src_type) < 0) goto error; if (H5Tclose(dst_type) < 0) goto error; /* * Test C string to Fortran and vice versa. */ - src_type = mkstr(10, H5T_STR_NULLTERM); - dst_type = mkstr(10, H5T_STR_SPACEPAD); - buf = (char*)HDcalloc(2, 10); - HDmemcpy(buf, "abcdefghi\0abcdefghi\0", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghi abcdefghi ", 20)) { + if((src_type = mkstr((size_t)10, H5T_STR_NULLTERM)) < 0) goto error; + if((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0) goto error; + if(NULL == (buf = (char*)HDcalloc((size_t)2, (size_t)10))) goto error; + HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcdefghi abcdefghi ", (size_t)20)) { H5_FAILED(); HDputs(" C string to Fortran test 1"); goto error; } - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghi\0abcdefghi\0", 20)) { + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20)) { H5_FAILED(); HDputs(" Fortran to C string test 1"); goto error; } if (H5Tclose(dst_type) < 0) goto error; - dst_type = mkstr(5, H5T_STR_SPACEPAD); - HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", 20)) { + if((dst_type = mkstr((size_t)5, H5T_STR_SPACEPAD)) < 0) goto error; + HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20)) { H5_FAILED(); HDputs(" C string to Fortran test 2"); goto error; } - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) { + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) { H5_FAILED(); HDputs(" Fortran to C string test 2"); goto error; } if (H5Tclose(src_type) < 0) goto error; if (H5Tclose(dst_type) < 0) goto error; - src_type = mkstr(5, H5T_STR_NULLTERM); - dst_type = mkstr(10, H5T_STR_SPACEPAD); - HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd abcd ", 20)) { + if((src_type = mkstr((size_t)5, H5T_STR_NULLTERM)) < 0) goto error; + if((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0) goto error; + HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcd abcd ", (size_t)20)) { H5_FAILED(); HDputs(" C string to Fortran test 3"); goto error; } - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0abcd\0abcd ", 20)) { + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20)) { H5_FAILED(); HDputs(" Fortran to C string test 3"); goto error; } HDfree(buf); + buf = NULL; if (H5Tclose(src_type) < 0) goto error; if (H5Tclose(dst_type) < 0) goto error; /* * Test C buffer to Fortran and vice versa. */ - src_type = mkstr(10, H5T_STR_NULLPAD); - dst_type = mkstr(10, H5T_STR_SPACEPAD); - buf = (char*)HDcalloc(2, 10); - HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghijabcdefghij", 20)) { + if((src_type = mkstr((size_t)10, H5T_STR_NULLPAD)) < 0) goto error; + if((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0) goto error; + if(NULL == (buf = (char*)HDcalloc((size_t)2, (size_t)10))) goto error; + HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20)) { H5_FAILED(); HDputs(" C buffer to Fortran test 1"); goto error; } - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghijabcdefghij", 20)) { + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20)) { H5_FAILED(); HDputs(" Fortran to C buffer test 1"); goto error; } if (H5Tclose(dst_type) < 0) goto error; - dst_type = mkstr(5, H5T_STR_SPACEPAD); - HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", 20)) { + if((dst_type = mkstr((size_t)5, H5T_STR_SPACEPAD)) < 0) goto error; + HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20)) { H5_FAILED(); HDputs(" C buffer to Fortran test 2"); goto error; } - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) { + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) { H5_FAILED(); HDputs(" Fortran to C buffer test 2"); goto error; } if (H5Tclose(src_type) < 0) goto error; if (H5Tclose(dst_type) < 0) goto error; - src_type = mkstr(5, H5T_STR_NULLPAD); - dst_type = mkstr(10, H5T_STR_SPACEPAD); - HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", 20); - if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd abcd ", 20)) { + if((src_type = mkstr((size_t)5, H5T_STR_NULLPAD)) < 0) goto error; + if((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0) goto error; + HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20); + if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcd abcd ", (size_t)20)) { H5_FAILED(); HDputs(" C buffer to Fortran test 3"); goto error; } - if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0abcd\0abcd ", 20)) { + if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20)) { H5_FAILED(); HDputs(" Fortran to C buffer test 3"); goto error; } + if(H5Tclose(src_type) < 0) goto error; + if(H5Tclose(dst_type) < 0) goto error; HDfree(buf); - if (H5Tclose(src_type) < 0) goto error; - if (H5Tclose(dst_type) < 0) goto error; PASSED(); reset_hdf5(); return 0; - error: +error: + H5E_BEGIN_TRY { + H5Tclose(src_type); + H5Tclose(dst_type); + } H5E_END_TRY; + + if(buf) + HDfree(buf); + reset_hdf5(); return 1; } @@ -4034,21 +4036,19 @@ test_conv_str_1(void) * Purpose: Tests C-to-Fortran and Fortran-to-C string conversion speed. * * Return: Success: 0 - * * Failure: number of errors * * Programmer: Robb Matzke * Monday, August 10, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ static int test_conv_str_2(void) { - char *buf=NULL, s[80]; - hid_t c_type, f_type; + char *buf = NULL, s[80]; + hid_t c_type = -1; + hid_t f_type = -1; const size_t nelmts = NTESTELEM, ntests=NTESTS; size_t i, j, nchars; int ret_value = 1; @@ -4056,37 +4056,43 @@ test_conv_str_2(void) /* * Initialize types and buffer. */ - c_type = mkstr(8, H5T_STR_NULLPAD); - f_type = mkstr(8, H5T_STR_SPACEPAD); - buf = (char*)HDcalloc(nelmts, 8); - for (i=0; i1) { - sprintf(s, "Testing random string conversion speed (test %d/%d)", - (int)(i+1), (int)ntests); - } else { + for(i = 0; i < ntests; i++) { + if(ntests > 1) + sprintf(s, "Testing random string conversion speed (test %d/%d)", (int)(i + 1), (int)ntests); + else sprintf(s, "Testing random string conversion speed"); - } - printf("%-70s", s); - HDfflush(stdout); - if (H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT) < 0) + printf("%-70s", s); + HDfflush(stdout); + if(H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (H5Tconvert(f_type, c_type, nelmts, buf, NULL, H5P_DEFAULT) < 0) + if(H5Tconvert(f_type, c_type, nelmts, buf, NULL, H5P_DEFAULT) < 0) goto error; - PASSED(); - } + PASSED(); + } /* end for */ + ret_value = 0; - error: - if (buf) HDfree(buf); +error: + H5E_BEGIN_TRY { + H5Tclose(c_type); + H5Tclose(f_type); + } H5E_END_TRY; + + if(buf) + HDfree(buf); + reset_hdf5(); return ret_value; } @@ -4099,21 +4105,19 @@ test_conv_str_2(void) * for string type. * * Return: Success: 0 - * * Failure: number of errors * * Programmer: Raymond Lu * Tuesday, April 4, 2006 * - * Modifications: - * *------------------------------------------------------------------------- */ static int test_conv_str_3(void) { char *buf=NULL; - hid_t type, super; + hid_t type = -1; + hid_t super = -1; const size_t nelmts = NTESTELEM; size_t i, j, nchars; int ret_value = 1; @@ -4128,63 +4132,64 @@ test_conv_str_3(void) /* * Initialize types and buffer. */ - type = mkstr(8, H5T_STR_NULLPAD); - buf = (char*)HDcalloc(nelmts, 8); - for (i=0; i=0) { + if(ret >= 0) { FAIL_PUTS_ERROR("Operation not allowed for this type."); } /* end if */ H5E_BEGIN_TRY { size = H5Tget_ebias(type); } H5E_END_TRY; - if (size>0) { + if(size > 0) { FAIL_PUTS_ERROR("Operation not allowed for this type."); } /* end if */ H5E_BEGIN_TRY { - inpad=H5Tget_inpad(type); + inpad = H5Tget_inpad(type); } H5E_END_TRY; - if (inpad>-1) { + if(inpad > -1) { FAIL_PUTS_ERROR("Operation not allowed for this type."); } /* end if */ H5E_BEGIN_TRY { - sign=H5Tget_sign(type); + sign = H5Tget_sign(type); } H5E_END_TRY; - if (sign>-1) { + if(sign > -1) { FAIL_PUTS_ERROR("Operation not allowed for this type."); } /* end if */ H5E_BEGIN_TRY { tag = H5Tget_tag(type); } H5E_END_TRY; - if (tag) { + if(tag) { FAIL_PUTS_ERROR("Operation not allowed for this type."); } /* end if */ H5E_BEGIN_TRY { super = H5Tget_super(type); } H5E_END_TRY; - if (super>=0) { + if(super >= 0) { FAIL_PUTS_ERROR("Operation not allowed for this type."); } /* end if */ @@ -4192,10 +4197,16 @@ test_conv_str_3(void) ret_value = 0; error: + H5E_BEGIN_TRY { + H5Tclose(type); + H5Tclose(super); + } H5E_END_TRY; + if(buf) HDfree(buf); - if(tag) + if(tag) HDfree(tag); + reset_hdf5(); return ret_value; /* Number of errors */ } @@ -4223,57 +4234,62 @@ test_conv_enum_1(void) const size_t nelmts=NTESTELEM; const int ntests=NTESTS; int i, val, *buf=NULL; - hid_t t1, t2; + hid_t t1 = -1; + hid_t t2 = -1; char s[80]; int ret_value = 1; + size_t u; /* Build the datatypes */ - t1 = H5Tcreate(H5T_ENUM, sizeof(int)); - t2 = H5Tenum_create(H5T_NATIVE_INT); + if((t1 = H5Tcreate(H5T_ENUM, sizeof(int))) < 0) goto error; + if((t2 = H5Tenum_create(H5T_NATIVE_INT)) < 0) goto error; s[1] = '\0'; - for (i=0; i<26; i++) { - s[0] = 'A'+i; + for(i = 0; i < 26; i++) { + s[0] = 'A' + i; H5Tenum_insert(t1, s, &i); - H5Tenum_insert(t2, s, (val=i*1000+i, &val)); - } + H5Tenum_insert(t2, s, (val = i * 1000 + i, &val)); + } /* end for */ /* Initialize the buffer */ - buf = (int*)HDmalloc(nelmts*MAX(H5Tget_size(t1), H5Tget_size(t2))); - for (i=0; i<(int)nelmts; i++) - buf[i] = HDrand() % 26; + if(NULL == (buf = (int*)HDmalloc(nelmts * MAX(H5Tget_size(t1), H5Tget_size(t2))))) + goto error; + for(u = 0; u < nelmts; u++) + buf[u] = HDrand() % 26; /* Conversions */ - for (i=0; i1) { - sprintf(s, "Testing random enum conversion O(N) (test %d/%d)", - i+1, ntests); - } else { + for(i = 0; i < ntests; i++) { + if(ntests > 1) + sprintf(s, "Testing random enum conversion O(N) (test %d/%d)", i + 1, ntests); + else sprintf(s, "Testing random enum conversion O(N)"); - } - printf("%-70s", s); - HDfflush(stdout); - if (H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT) < 0) goto error; - PASSED(); - } + printf("%-70s", s); + HDfflush(stdout); + if(H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT) < 0) goto error; + PASSED(); + } /* end for */ - for (i=0; i1) { - sprintf(s, "Testing random enum conversion O(N log N) " - "(test %d/%d)", i+1, ntests); - } else { + for(i = 0; i < ntests; i++) { + if(ntests > 1) + sprintf(s, "Testing random enum conversion O(N log N) (test %d/%d)", i + 1, ntests); + else sprintf(s, "Testing random enum conversion O(N log N)"); - } - printf("%-70s", s); - HDfflush(stdout); - if (H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT) < 0) goto error; - PASSED(); + printf("%-70s", s); + HDfflush(stdout); + if(H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT) < 0) goto error; + PASSED(); } + ret_value = 0; - error: - H5Tclose(t1); - H5Tclose(t2); - if (buf) HDfree(buf); +error: + H5E_BEGIN_TRY { + H5Tclose(t1); + H5Tclose(t2); + } H5E_END_TRY; + + if(buf) + HDfree(buf); + reset_hdf5(); return ret_value; } @@ -4311,7 +4327,7 @@ test_conv_enum_2(void) /* Source enum type */ oddsize = H5Tcopy(H5T_STD_I32BE); - H5Tset_size(oddsize, 3); /*reduce to 24 bits, not corresponding to any native size*/ + H5Tset_size(oddsize, (size_t)3); /*reduce to 24 bits, not corresponding to any native size*/ srctype = H5Tenum_create(oddsize); for (i=7; i>=0; --i) { char pattern[3]; @@ -4322,7 +4338,7 @@ test_conv_enum_2(void) /* Destination enum type */ dsttype = H5Tenum_create(H5T_NATIVE_INT); - assert(H5Tget_size(dsttype)>H5Tget_size(srctype)); + assert(H5Tget_size(dsttype) > H5Tget_size(srctype)); for (i=0; i<8; i++) H5Tenum_insert(dsttype, mname[i], &i); @@ -4335,7 +4351,7 @@ test_conv_enum_2(void) } /* Convert to destination type */ - H5Tconvert(srctype, dsttype, NTESTELEM, data, NULL, H5P_DEFAULT); + H5Tconvert(srctype, dsttype, (size_t)NTESTELEM, data, NULL, H5P_DEFAULT); /* Check results */ for (i=0; i=0) { H5_FAILED(); @@ -4702,7 +4713,7 @@ opaque_check(int tag_it) goto error; /* Try the conversion again, this time it should work */ - if (H5Tconvert(st, dt, OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT) < 0) goto error; + if (H5Tconvert(st, dt, (size_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT) < 0) goto error; if (saved+1 != num_opaque_conversions_g) { H5_FAILED(); printf(" unexpected number of opaque conversions\n"); @@ -4731,14 +4742,11 @@ opaque_check(int tag_it) * Purpose: Test named (committed) opaque datatypes w/very long tags * * Return: Success: 0 - * * Failure: number of errors * * Programmer: Quincey Koziol * Tuesday, June 14, 2005 * - * Modifications: - * *------------------------------------------------------------------------- */ static int @@ -4749,18 +4757,18 @@ opaque_long(void) herr_t ret; /* Build opaque type */ - if ((dt=H5Tcreate(H5T_OPAQUE, 4)) < 0) TEST_ERROR + if((dt=H5Tcreate(H5T_OPAQUE, (size_t)4)) < 0) TEST_ERROR /* Create long tag */ - long_tag = HDmalloc(16384+1); - HDmemset(long_tag, 'a', 16384); + if(NULL == (long_tag = (char *)HDmalloc((size_t)(16384 + 1)))) TEST_ERROR + HDmemset(long_tag, 'a', (size_t)16384); long_tag[16384] = '\0'; /* Set opaque type's tag */ H5E_BEGIN_TRY { ret = H5Tset_tag(dt, long_tag); } H5E_END_TRY; - if(ret!=FAIL) TEST_ERROR + if(ret != FAIL) TEST_ERROR /* Close datatype */ if(H5Tclose(dt) < 0) TEST_ERROR @@ -4770,9 +4778,11 @@ opaque_long(void) return 0; - error: - if (dt>0) H5Tclose(dt); - if (long_tag != NULL) HDfree(long_tag); +error: + if(dt>0) + H5Tclose(dt); + if(long_tag) + HDfree(long_tag); H5_FAILED(); return 1; } @@ -4807,13 +4817,13 @@ opaque_funcs(void) herr_t ret; /* Build opaque type */ - if ((type=H5Tcreate(H5T_OPAQUE, 4)) < 0) TEST_ERROR + if ((type=H5Tcreate(H5T_OPAQUE, (size_t)4)) < 0) TEST_ERROR if (H5Tset_tag(type, "opaque source type") < 0) TEST_ERROR if ((size=H5Tget_size(type))==0) goto error; H5E_BEGIN_TRY { - ret=H5Tset_precision(type, 32); + ret=H5Tset_precision(type, (size_t)32); } H5E_END_TRY; if (ret>=0) { printf("Operation not allowed for this type.\n"); @@ -4861,7 +4871,7 @@ opaque_funcs(void) } /* end if */ H5E_BEGIN_TRY { - ret=H5Tset_offset(type, 16); + ret=H5Tset_offset(type, (size_t)16); } H5E_END_TRY; if (ret>=0) { printf("Operation not allowed for this type.\n"); @@ -5016,7 +5026,7 @@ test_encode(void) printf("Can't copy a string type\n"); goto error; } /* end if */ - if(H5Tset_size(tid3, H5T_VARIABLE) < 0) { + if(H5Tset_size(tid3, H5T_VARIABLE) < 0) { H5_FAILED(); printf("Can't the string type to be variable-length\n"); goto error; @@ -5034,7 +5044,7 @@ test_encode(void) } /* end if */ if(cmpd_buf_size>0) - cmpd_buf = (unsigned char*)calloc(1, cmpd_buf_size); + cmpd_buf = (unsigned char*)HDcalloc((size_t)1, cmpd_buf_size); /* Try decoding bogus buffer */ H5E_BEGIN_TRY { @@ -5084,7 +5094,7 @@ test_encode(void) } /* end if */ if(enum_buf_size>0) - enum_buf = (unsigned char*)calloc(1, enum_buf_size); + enum_buf = (unsigned char*)HDcalloc((size_t)1, enum_buf_size); if(H5Tencode(tid2, enum_buf, &enum_buf_size) < 0) { H5_FAILED(); @@ -5127,7 +5137,7 @@ test_encode(void) } /* end if */ if(vlstr_buf_size>0) - vlstr_buf = (unsigned char*)calloc(1, vlstr_buf_size); + vlstr_buf = (unsigned char*)HDcalloc((size_t)1, vlstr_buf_size); if(H5Tencode(tid3, vlstr_buf, &vlstr_buf_size) < 0) { H5_FAILED(); @@ -5235,7 +5245,7 @@ test_encode(void) } /* end if */ if(cmpd_buf_size>0) - cmpd_buf = (unsigned char*)calloc(1, cmpd_buf_size); + cmpd_buf = (unsigned char*)HDcalloc((size_t)1, cmpd_buf_size); if(H5Tencode(tid1, cmpd_buf, &cmpd_buf_size) < 0) { H5_FAILED(); @@ -5274,7 +5284,7 @@ test_encode(void) } /* end if */ if(enum_buf_size>0) - enum_buf = (unsigned char*)calloc(1, enum_buf_size); + enum_buf = (unsigned char*)HDcalloc((size_t)1, enum_buf_size); if(H5Tencode(tid2, enum_buf, &enum_buf_size) < 0) { H5_FAILED(); @@ -5316,7 +5326,7 @@ test_encode(void) } /* end if */ if(vlstr_buf_size>0) - vlstr_buf = (unsigned char*)calloc(1, vlstr_buf_size); + vlstr_buf = (unsigned char*)HDcalloc((size_t)1, vlstr_buf_size); if(H5Tencode(tid3, vlstr_buf, &vlstr_buf_size) < 0) { H5_FAILED(); @@ -5829,7 +5839,7 @@ test_set_order(void) /* Fixed length string */ if ((dtype = H5Tcopy(H5T_C_S1)) < 0) TEST_ERROR - if (H5Tset_size(dtype, 5) < 0) TEST_ERROR + if (H5Tset_size(dtype, (size_t)5) < 0) TEST_ERROR if (H5T_ORDER_NONE != H5Tget_order(dtype)) TEST_ERROR; if (H5Tset_order(dtype, H5T_ORDER_NONE) < 0) TEST_ERROR; if (H5T_ORDER_NONE != H5Tget_order(dtype)) TEST_ERROR; @@ -5856,7 +5866,7 @@ test_set_order(void) if (H5Tclose(dtype) < 0) TEST_ERROR /* Opaque - functions should fail */ - if ((dtype = H5Tcreate(H5T_OPAQUE, 96)) < 0) TEST_ERROR + if ((dtype = H5Tcreate(H5T_OPAQUE, (size_t)96)) < 0) TEST_ERROR H5E_BEGIN_TRY ret = H5Tset_order(dtype, H5T_ORDER_LE); order = H5Tget_order(dtype); @@ -5866,7 +5876,7 @@ test_set_order(void) if (H5Tclose(dtype) < 0) TEST_ERROR /* Compound - functions should fail */ - if ((dtype = H5Tcreate(H5T_COMPOUND, 48)) < 0) TEST_ERROR + if ((dtype = H5Tcreate(H5T_COMPOUND, (size_t)48)) < 0) TEST_ERROR H5E_BEGIN_TRY ret = H5Tset_order(dtype, H5T_ORDER_LE); order = H5Tget_order(dtype); @@ -5976,7 +5986,7 @@ test_named_indirect_reopen(hid_t fapl) if((strtype = H5Tcopy(H5T_C_S1)) < 0) TEST_ERROR if(H5Tset_size(strtype, H5T_VARIABLE) < 0) TEST_ERROR if((type = H5Tcreate(H5T_COMPOUND, sizeof(char *))) < 0) TEST_ERROR - if(H5Tinsert(type, "vlstr", 0, strtype) < 0) TEST_ERROR + if(H5Tinsert(type, "vlstr", (size_t)0, strtype) < 0) TEST_ERROR if(H5Tclose(strtype) < 0) TEST_ERROR /* Get size of compound type */ @@ -6059,7 +6069,7 @@ test_named_indirect_reopen(hid_t fapl) */ /* Create opaque type */ - if((type = H5Tcreate(H5T_OPAQUE, 13)) < 0) TEST_ERROR + if((type = H5Tcreate(H5T_OPAQUE, (size_t)13)) < 0) TEST_ERROR if(H5Tset_tag(type, tag) < 0) TEST_ERROR /* Get size of opaque type */ @@ -6228,7 +6238,7 @@ test_deprec(hid_t fapl) /* We should not be able to modify a type after it has been committed. */ H5E_BEGIN_TRY { - status = H5Tset_precision(type, 256); + status = H5Tset_precision(type, (size_t)256); } H5E_END_TRY; if(status >= 0) FAIL_PUTS_ERROR(" Committed type is not constant!") diff --git a/test/err_compat.c b/test/err_compat.c index 33c172f..be86a2d 100644 --- a/test/err_compat.c +++ b/test/err_compat.c @@ -186,10 +186,10 @@ dump_error(void) herr_t custom_print_cb(int n, H5E_error1_t *err_desc, void* client_data) { - FILE *stream = (FILE *)client_data; - char *maj; - char *min; - const int indent = 4; + FILE *stream = (FILE *)client_data; + char *maj = NULL; + char *min = NULL; + const int indent = 4; if(NULL == (min = H5Eget_minor(err_desc->min_num))) TEST_ERROR; @@ -200,14 +200,21 @@ custom_print_cb(int n, H5E_error1_t *err_desc, void* client_data) fprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name, err_desc->func_name, err_desc->line); - fprintf(stream, "%*smajor: %s\n", indent*2, "", maj); + + fprintf(stream, "%*smajor: %s\n", indent * 2, "", maj); + fprintf(stream, "%*sminor: %s\n", indent * 2, "", min); + HDfree(maj); - fprintf (stream, "%*sminor: %s\n", indent*2, "", min); HDfree(min); return 0; error: + if(maj) + HDfree(maj); + if(min) + HDfree(min); + return -1; } diff --git a/test/error_test.c b/test/error_test.c index 89a81a3..e784eb9 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -186,11 +186,16 @@ test_error(hid_t file) static herr_t init_error(void) { - ssize_t cls_size = (ssize_t)HDstrlen(ERR_CLS_NAME)+1; - char *cls_name = (char*)HDmalloc(HDstrlen(ERR_CLS_NAME)+1); + ssize_t cls_size = (ssize_t)HDstrlen(ERR_CLS_NAME) + 1; ssize_t msg_size = (ssize_t)HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1; - char *msg = (char*)HDmalloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG)+1); - H5E_type_t *msg_type= (H5E_type_t *)HDmalloc(sizeof(H5E_type_t)); + char *cls_name = NULL; + char *msg = NULL; + H5E_type_t msg_type; + + if(NULL == (cls_name = (char *)HDmalloc(HDstrlen(ERR_CLS_NAME) + 1))) + TEST_ERROR + if(NULL == (msg = (char *)HDmalloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1))) + TEST_ERROR if((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0) TEST_ERROR; @@ -218,24 +223,28 @@ init_error(void) if((ERR_MIN_GETNUM = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_GETNUM_MSG)) < 0) TEST_ERROR; - if(msg_size != H5Eget_msg(ERR_MIN_SUBROUTINE, msg_type, msg, (size_t)msg_size) + 1) + if(msg_size != H5Eget_msg(ERR_MIN_SUBROUTINE, &msg_type, msg, (size_t)msg_size) + 1) TEST_ERROR; - if(*msg_type != H5E_MINOR) + if(msg_type != H5E_MINOR) TEST_ERROR; if(HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG)) TEST_ERROR; - HDfree(cls_name); - HDfree(msg); - HDfree(msg_type); - /* Register another class for later testing. */ if((ERR_CLS2 = H5Eregister_class(ERR_CLS2_NAME, PROG2_NAME, PROG_VERS)) < 0) TEST_ERROR; + HDfree(cls_name); + HDfree(msg); + return 0; error: + if(cls_name) + HDfree(cls_name); + if(msg) + HDfree(msg); + return -1; } /* end init_error() */ @@ -586,7 +595,7 @@ main(void) /* Delete an error from the top of error stack */ H5Epop(ERR_STACK, 1); - /* Make sure we can use other class's major or minor errors. */ + /* Make sure we can use other class's major or minor errors. */ H5Epush(ERR_STACK, __FILE__, FUNC_main, __LINE__, ERR_CLS2, ERR_MAJ_TEST, ERR_MIN_ERRSTACK, "Error stack test failed"); diff --git a/test/external.c b/test/external.c index b3831ad..7fd344e 100644 --- a/test/external.c +++ b/test/external.c @@ -20,6 +20,7 @@ * Purpose: Tests datasets stored in external raw files. */ #include "h5test.h" +#include "H5srcdir.h" /* File for external link test. Created with gen_udlinks.c */ #define LINKED_FILE "be_extlink2.h5" @@ -60,14 +61,14 @@ same_contents (const char *name1, const char *name2) fd2 = HDopen(name2, O_RDONLY, 0666); assert(fd1 >= 0 && fd2 >= 0); - while(1) { + while(1) { /* Asserts will catch negative return values */ n1 = HDread(fd1, buf1, sizeof(buf1)); n2 = HDread(fd2, buf2, sizeof(buf2)); assert(n1 >= 0 && (size_t)n1 <= sizeof(buf1)); assert(n2 >= 0 && (size_t)n2 <= sizeof(buf2)); assert(n1 == n2); - + if(n1 == 0 && n2 == 0) break; if(HDmemcmp(buf1, buf2, (size_t)n1)) { @@ -845,8 +846,7 @@ test_4 (hid_t fapl) hid_t xid = -1; hid_t xid2 = -1; char filename[1024]; /*file name */ - char pathname[1024]; - char *srcdir = getenv("srcdir"); /*where the src code is located*/ + const char *pathname = H5_get_srcdir_filename(LINKED_FILE); /* Corrected test file name */ TESTING("opening external link twice"); @@ -865,14 +865,6 @@ test_4 (hid_t fapl) if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) goto error; - pathname[0] = '\0'; - /* Generate correct name for test file by prepending the source path */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(LINKED_FILE) + 1) < sizeof(pathname))) { - HDstrcpy(pathname, srcdir); - HDstrcat(pathname, "/"); - } - HDstrcat(pathname, LINKED_FILE); - /* Create an external link to an existing file*/ if(H5Lcreate_external(pathname, "/group", gid, " link", H5P_DEFAULT, H5P_DEFAULT) < 0) goto error; diff --git a/test/farray.c b/test/farray.c index b949263..60a2200 100644 --- a/test/farray.c +++ b/test/farray.c @@ -13,7 +13,7 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* +/* * This file is modified based on earray.c. */ #include "h5test.h" @@ -37,7 +37,7 @@ #define FARRAY_FILENAME_LEN 1024 /* Fixed array creation values */ -#define ELMT_SIZE sizeof(uint64_t) +#define ELMT_SIZE sizeof(uint64_t) #define MAX_DBLOCK_PAGE_NELMTS_BITS 10 /* 2^10 = 1024 elements per data block page */ /* Testing # of elements in the Fixed Array */ @@ -130,8 +130,8 @@ init_cparam(H5FA_create_t *cparam, farray_test_param_t *tparam) cparam->cls = H5FA_CLS_TEST; cparam->raw_elmt_size = ELMT_SIZE; - cparam->max_dblk_page_nelmts_bits = MAX_DBLOCK_PAGE_NELMTS_BITS; - cparam->nelmts = tparam->nelmts; + cparam->max_dblk_page_nelmts_bits = MAX_DBLOCK_PAGE_NELMTS_BITS; + cparam->nelmts = tparam->nelmts; return(0); } /* init_cparam() */ @@ -187,19 +187,19 @@ check_stats(const H5FA_t *fa, const farray_state_t *state) /* Compare information */ if(farray_stats.hdr_size != state->hdr_size) { - HDfprintf(stdout, "farray_stats.hdr_size = %Hu, state->hdr_size = %Hu\n", + HDfprintf(stdout, "farray_stats.hdr_size = %Hu, state->hdr_size = %Hu\n", farray_stats.hdr_size, state->hdr_size); TEST_ERROR } /* end if */ if(farray_stats.dblk_size != state->dblk_size) { - HDfprintf(stdout, "farray_stats.dblk_size = %Hu, state->dblk_size = %Hu\n", + HDfprintf(stdout, "farray_stats.dblk_size = %Hu, state->dblk_size = %Hu\n", farray_stats.dblk_size, state->dblk_size); TEST_ERROR } /* end if */ if(farray_stats.nelmts != state->nelmts) { - HDfprintf(stdout, "farray_stats.nelmts = %Hu, state->nelmts = %Hu\n", + HDfprintf(stdout, "farray_stats.nelmts = %Hu, state->nelmts = %Hu\n", farray_stats.nelmts, state->nelmts); TEST_ERROR } /* end if */ @@ -242,9 +242,9 @@ set_fa_state(const H5FA_create_t *cparam, farray_state_t *state) size_t dblk_page_init_size = (npages + 7) / 8; hsize_t checksum_size = npages * 4; - state->dblk_size = DBLOCK_PREFIX + dblk_page_init_size + checksum_size + + state->dblk_size = DBLOCK_PREFIX + dblk_page_init_size + checksum_size + state->nelmts * cparam->raw_elmt_size; - } else + } else state->dblk_size = DBLOCK_PREFIX + state->nelmts * cparam->raw_elmt_size; return(0); @@ -392,7 +392,7 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5FA_t *fa, haddr_t fa_addr) h5_stat_size_t file_size; /* File size, after deleting array */ /* Close the fixed array */ - if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0) + if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0) FAIL_STACK_ERROR /* Delete array */ @@ -1229,7 +1229,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, uint64_t welmt; /* Element to write */ uint64_t relmt; /* Element to read */ hsize_t cnt; /* Count of array indices */ - hssize_t sidx; /* Index value of next element in the fixed array */ + hssize_t sidx; /* Index value of next element in the fixed array */ hsize_t idx; /* Index value of next element in the fixed array */ hsize_t fa_nelmts; /* # of elements in fixed array */ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */ @@ -1625,7 +1625,7 @@ main(void) nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), TRUE, "skipping to last element"); /* Create Fixed Array of MAX_NELMTS elements */ - /* + /* * MAX_NELMTS succeeds on jam and smirom. * The value was adjusted for linew due to the following: Linew failed with "H5FD_sec2_truncate(): unable to extend file properly" diff --git a/test/fillval.c b/test/fillval.c index 2f58380..81856de 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -20,6 +20,7 @@ * Purpose: Tests dataset fill values. */ #include "h5test.h" +#include "H5srcdir.h" /* * Define NO_FILLING if you want to compare how this test works when there is @@ -1974,19 +1975,10 @@ test_compatible(void) hsize_t dims[2], one[2]={1,1}; hsize_t hs_offset[2]={3,4}; H5D_fill_value_t status; - char *srcdir = getenv("srcdir"); /*where the src code is located*/ - char testfile[512]=""; /* test file name */ + const char *testfile = H5_get_srcdir_filename(FILE_COMPATIBLE); /* Corrected test file name */ TESTING("contiguous dataset compatibility with v. 1.4"); - /* Generate correct name for test file by prepending the source path */ - if(srcdir && ((strlen(srcdir) + strlen(FILE_COMPATIBLE) + 1) < - sizeof(testfile))) { - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, FILE_COMPATIBLE); - if((file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) { printf(" Could not open file %s. Try set $srcdir to point at the " "source directory of test\n", testfile); diff --git a/test/gen_filespace.c b/test/gen_filespace.c index e9dee1c..293e3df 100644 --- a/test/gen_filespace.c +++ b/test/gen_filespace.c @@ -24,22 +24,22 @@ const char *FILENAMES[] = { "filespace_aggr_vfd.h5", /* H5F_FILE_SPACE_AGGR_VFD */ "filespace_vfd.h5", /* H5F_FILE_SPACE_VFD */ "filespace_threshold.h5" /* H5F_FILE_SPACE_ALL, non-default threshold */ -}; +}; #define DATASET "dset" #define NUM_ELMTS 100 /* - * Compile and run this program in file-space branch to generate + * Compile and run this program in file-space branch to generate * HDF5 files with different kinds of file space strategies - * Move the HDF5 files to the 1.6 and 1.8 branch for compatibility + * Move the HDF5 files to the 1.6 and 1.8 branch for compatibility * testing:test_filespace_compatible() will use the files */ static void gen_file(void) { hid_t fid; hid_t fcpl; - hid_t dataset, space; + hid_t dataset, space; hsize_t dim[1]; int data[NUM_ELMTS]; unsigned i, j; /* Local index variable */ diff --git a/test/h5test.c b/test/h5test.c index a5b50d3..10ca47e 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -25,6 +25,7 @@ #include #include #include "h5test.h" +#include "H5srcdir.h" #ifdef _WIN32 #include @@ -72,7 +73,7 @@ MPI_Info h5_io_info_g=MPI_INFO_NULL;/* MPI INFO object for IO */ #endif #define FILENAME_BUF_SIZE 1024 -#define READ_BUF_SIZE 4096 +#define READ_BUF_SIZE 4096 /* * These are the letters that are appended to the file name when generating @@ -872,10 +873,10 @@ h5_get_file_size(const char *filename, hid_t fapl) driver == H5FD_MPIO || driver == H5FD_MPIPOSIX || #endif /* H5_HAVE_PARALLEL */ #ifdef H5_HAVE_WINDOWS - driver == H5FD_WINDOWS || + driver == H5FD_WINDOWS || #endif /* H5_HAVE_WINDOWS */ #ifdef H5_HAVE_DIRECT - driver == H5FD_DIRECT || + driver == H5FD_DIRECT || #endif /* H5_HAVE_DIRECT */ driver == H5FD_LOG) { /* Get the file's statistics */ @@ -1096,9 +1097,9 @@ getenv_all(MPI_Comm comm, int root, const char* name) * * Purpose: Make copy of file. Some tests write to data files under that * are under version control. Those tests should make a copy of - * the versioned file and write to the copy. This function + * the versioned file and write to the copy. This function * prepends srcdir to the name of the file to be copied and uses - * the name of the copy as is. + * the name of the copy as is. * * Return: Success: 0 * @@ -1114,22 +1115,14 @@ getenv_all(MPI_Comm comm, int root, const char* name) hid_t h5_make_local_copy(char *origfilename, char *local_copy_name) { - char filename[FILENAME_BUF_SIZE] = ""; + const char *filename = H5_get_srcdir_filename(origfilename); /* Corrected test file name */ int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */ ssize_t nread; /* Number of bytes read in */ char buf[READ_BUF_SIZE]; /* Buffer for copying data */ - char * srcdir = HDgetenv("srcdir"); /* The source directory */ - - if(srcdir && ((HDstrlen(srcdir) + - HDstrlen(origfilename) + 6) < FILENAME_BUF_SIZE)) { - HDstrcpy(filename, srcdir); - HDstrcat(filename, "/"); - } - HDstrcat(filename, origfilename); /* Copy old file into temporary file */ if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1; - if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666)) + if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0) return -1; /* Copy data */ @@ -1139,7 +1132,7 @@ h5_make_local_copy(char *origfilename, char *local_copy_name) /* Close files */ if(HDclose(fd_old) < 0) return -1; if(HDclose(fd_new) < 0) return -1; - - return 0; + + return 0; } diff --git a/test/h5test.h b/test/h5test.h index 315b504..f984751 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -61,11 +61,16 @@ * Verbose queries * Only None needs an exact match. The rest are at least as much. */ -#define VERBOSE_NONE (GetTestVerbosity()==VERBO_NONE) -#define VERBOSE_DEF (GetTestVerbosity()>=VERBO_DEF) -#define VERBOSE_LO (GetTestVerbosity()>=VERBO_LO) -#define VERBOSE_MED (GetTestVerbosity()>=VERBO_MED) -#define VERBOSE_HI (GetTestVerbosity()>=VERBO_HI) + +/* A macro version of HDGetTestVerbosity(). */ +/* Should be used internally by the libtest.a only. */ +#define HDGetTestVerbosity() (TestVerbosity) + +#define VERBOSE_NONE (HDGetTestVerbosity()==VERBO_NONE) +#define VERBOSE_DEF (HDGetTestVerbosity()>=VERBO_DEF) +#define VERBOSE_LO (HDGetTestVerbosity()>=VERBO_LO) +#define VERBOSE_MED (HDGetTestVerbosity()>=VERBO_MED) +#define VERBOSE_HI (HDGetTestVerbosity()>=VERBO_HI) /* * Test controls definitions. @@ -152,7 +157,7 @@ H5TEST_DLL void h5_reset(void); H5TEST_DLL void h5_show_hostname(void); H5TEST_DLL h5_stat_size_t h5_get_file_size(const char *filename, hid_t fapl); H5TEST_DLL int print_func(const char *format, ...); -H5TEST_DLL int h5_make_local_copy(char *origfilename, char *local_copy_name); +H5TEST_DLL int h5_make_local_copy(char *origfilename, char *local_copy_name); /* Routines for operating on the list of tests (for the "all in one" tests) */ H5TEST_DLL void TestUsage(void); @@ -189,6 +194,9 @@ H5TEST_DLL void h5_dump_info_object(MPI_Info info); H5TEST_DLL char* getenv_all(MPI_Comm comm, int root, const char* name); #endif +/* Extern global variables */ +H5TEST_DLLVAR int TestVerbosity; + #ifdef __cplusplus } #endif diff --git a/test/hyperslab.c b/test/hyperslab.c index b756449..e216b95 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -48,29 +48,27 @@ * Programmer: Robb Matzke * Friday, October 10, 1997 * - * Modifications: - * *------------------------------------------------------------------------- */ static unsigned init_full(uint8_t *array, size_t nx, size_t ny, size_t nz) { - size_t i, j, k; uint8_t acc = 128; unsigned total = 0; + size_t i, j, k; - for (i=0; i1) { + for(i = 0; i < nx; i++) { + if(nz > 1) printf("i=%lu:\n", (unsigned long)i); - } else { + else printf("%03lu:", (unsigned long)i); - } - for (j=0; j1) + for(j = 0; j < ny; j++) { + if(nz > 1) printf("%03lu:", (unsigned long)j); - for (k=0; k1) + if(nz > 1) printf("\n"); - } + } /* end for */ printf("\n"); - } -} + } /* end for */ +} /* end print_array() */ + /*------------------------------------------------------------------------- * Function: print_ref @@ -123,21 +118,21 @@ print_array(uint8_t *array, size_t nx, size_t ny, size_t nz) * Programmer: Robb Matzke * Friday, October 10, 1997 * - * Modifications: - * *------------------------------------------------------------------------- */ static void print_ref(size_t nx, size_t ny, size_t nz) { - uint8_t *array; + uint8_t *array; - array = HDcalloc(nx*ny*nz,sizeof(uint8_t)); + if(NULL != (array = HDmalloc(nx * ny * nz))) { + printf("Reference array:\n"); + init_full(array, nx, ny, nz); + print_array(array, nx, ny, nz); + HDfree(array); + } /* end if */ +} /* end print_ref() */ - printf("Reference array:\n"); - init_full(array, nx, ny, nz); - print_array(array, nx, ny, nz); -} /*------------------------------------------------------------------------- * Function: test_fill @@ -151,8 +146,6 @@ print_ref(size_t nx, size_t ny, size_t nz) * Programmer: Robb Matzke * Saturday, October 11, 1997 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -160,142 +153,134 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size_t ddx, size_t ddy, size_t ddz) { - uint8_t *dst = NULL; /*destination array */ - hsize_t hs_size[3]; /*hyperslab size */ - hsize_t dst_size[3]; /*destination total size */ - hsize_t dst_offset[3]; /*offset of hyperslab in dest */ - unsigned ref_value; /*reference value */ - unsigned acc; /*accumulator */ - size_t i, j, k, dx, dy, dz; /*counters */ - size_t u, v, w; - unsigned ndims; /*hyperslab dimensionality */ - char dim[64], s[256]; /*temp string */ - unsigned fill_value; /*fill value */ + uint8_t *dst = NULL; /*destination array */ + hsize_t hs_size[3]; /*hyperslab size */ + hsize_t dst_size[3]; /*destination total size */ + hsize_t dst_offset[3]; /*offset of hyperslab in dest */ + unsigned ref_value; /*reference value */ + unsigned acc; /*accumulator */ + size_t i, j, k, dx, dy, dz; /*counters */ + size_t u, v, w; + unsigned ndims; /*hyperslab dimensionality */ + char dim[64], s[256]; /*temp string */ + unsigned fill_value; /*fill value */ /* * Dimensionality. */ - if (0 == nz) { - if (0 == ny) { - ndims = 1; - ny = nz = 1; - sprintf(dim, "%lu", (unsigned long) nx); - } else { - ndims = 2; - nz = 1; - sprintf(dim, "%lux%lu", (unsigned long) nx, (unsigned long) ny); - } - } else { - ndims = 3; - sprintf(dim, "%lux%lux%lu", - (unsigned long) nx, (unsigned long) ny, (unsigned long) nz); - } + if(0 == nz) { + if(0 == ny) { + ndims = 1; + ny = nz = 1; + sprintf(dim, "%lu", (unsigned long) nx); + } /* end if */ + else { + ndims = 2; + nz = 1; + sprintf(dim, "%lux%lu", (unsigned long) nx, (unsigned long) ny); + } /* end else */ + } /* end if */ + else { + ndims = 3; + sprintf(dim, "%lux%lux%lu", (unsigned long) nx, (unsigned long) ny, + (unsigned long) nz); + } /* end else */ sprintf(s, "Testing hyperslab fill %-11s variable hyperslab", dim); printf("%-70s", s); fflush(stdout); /* Allocate array */ - dst = HDcalloc((size_t)1, nx * ny * nz); + if(NULL == (dst = HDcalloc((size_t)1, nx * ny * nz))) + TEST_ERROR + init_full(dst, nx, ny, nz); - for (i = 0; i < nx; i += di) { - for (j = 0; j < ny; j += dj) { - for (k = 0; k < nz; k += dk) { - for (dx = 1; dx <= nx - i; dx += ddx) { - for (dy = 1; dy <= ny - j; dy += ddy) { - for (dz = 1; dz <= nz - k; dz += ddz) { - - /* Describe the hyperslab */ - dst_size[0] = nx; - dst_size[1] = ny; - dst_size[2] = nz; - dst_offset[0] = i; - dst_offset[1] = j; - dst_offset[2] = k; - hs_size[0] = dx; - hs_size[1] = dy; - hs_size[2] = dz; - - for (fill_value=0; - fill_value<256; - fill_value+=64) { - /* - * Initialize the full array, then subtract the - * original * fill values and add the new ones. - */ - ref_value = init_full(dst, nx, ny, nz); - for (u=(size_t)dst_offset[0]; - u file1 -> file1 -> file3 - */ + /* Complicate things. Use this file as an intermediate file in a chain + * of external links that will go: file2 -> file1 -> file1 -> file3 + */ - /* Create file2 with an external link to file1 */ - if((fid=H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + /* Create file2 with an external link to file1 */ + if((fid=H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if(H5Lcreate_external(filename1, "/A", fid, "ext_link", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external(filename1, "/A", fid, "ext_link", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - /* Close file2 */ - if(H5Fclose(fid) < 0) TEST_ERROR + /* Close file2 */ + if(H5Fclose(fid) < 0) TEST_ERROR - /* Create file3 as a target */ - if((fid=H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if((gid = H5Gcreate2(fid, "end", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Fclose(fid) < 0) TEST_ERROR + /* Create file3 as a target */ + if((fid=H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((gid = H5Gcreate2(fid, "end", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + if(H5Fclose(fid) < 0) TEST_ERROR - /* Open file1 and create an extlink pointing to file3 */ - if((fid=H5Fopen(filename1, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR + /* Open file1 and create an extlink pointing to file3 */ + if((fid=H5Fopen(filename1, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if(H5Lcreate_external(filename3, "/", fid, "/X/Y/Z", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external(filename3, "/", fid, "/X/Y/Z", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - /* Close file1 */ - if(H5Fclose(fid) < 0) TEST_ERROR + /* Close file1 */ + if(H5Fclose(fid) < 0) TEST_ERROR - /* Re-open file2 and traverse through file1 (with its recursive extlink) to file3 */ - if((fid=H5Fopen(filename2, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR + /* Re-open file2 and traverse through file1 (with its recursive extlink) to file3 */ + if((fid=H5Fopen(filename2, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((gid = H5Gopen2(fid, "ext_link/B/C/Y/Z/end", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if((gid = H5Gopen2(fid, "ext_link/B/C/Y/Z/end", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Create object through external link */ - if((gid2 = H5Gcreate2(gid, "newer_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + /* Create object through external link */ + if((gid2 = H5Gcreate2(gid, "newer_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* Cleanup */ - if(H5Gclose(gid2) < 0) TEST_ERROR - if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Fclose(fid) < 0) TEST_ERROR + /* Cleanup */ + if(H5Gclose(gid2) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + if(H5Fclose(fid) < 0) TEST_ERROR - /* Open up file3 and make sure the object was created successfully */ - if((fid = H5Fopen(filename3, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR + /* Open up file3 and make sure the object was created successfully */ + if((fid = H5Fopen(filename3, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR - if((gid = H5Gopen2(fid, "end/newer_group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if((gid = H5Gopen2(fid, "end/newer_group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Cleanup */ - if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Fclose(fid) < 0) TEST_ERROR + /* Cleanup */ + if(H5Gclose(gid) < 0) TEST_ERROR + if(H5Fclose(fid) < 0) TEST_ERROR - PASSED(); - } /* end if */ - else { - SKIPPED(); - puts(" Current VFD can't reopen same file through external link"); - } /* end else */ + PASSED(); return 0; error: H5E_BEGIN_TRY { - H5Fclose(gid2); - H5Fclose(gid); + H5Gclose(gid2); + H5Gclose(gid); H5Pclose(lcpl_id); H5Fclose(fid); } H5E_END_TRY; @@ -2356,7 +2348,7 @@ external_link_self(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) *------------------------------------------------------------------------- */ static int -external_link_pingpong(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) +external_link_pingpong(hid_t fapl, hbool_t new_format) { hid_t fid = (-1); /* File ID */ hid_t gid = (-1), gid2 = (-1); /* Group IDs */ @@ -2369,86 +2361,77 @@ external_link_pingpong(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) else TESTING("external links back and forth") - /* Skip test when using core VFD, since it doesn't re-open file when linking - * to same file. - */ - if(HDstrcmp(env_h5_drvr, "core")) { - /* Set up filenames */ - h5_fixname(FILENAME[3], fapl, filename1, sizeof filename1); - h5_fixname(FILENAME[4], fapl, filename2, sizeof filename2); + /* Set up filenames */ + h5_fixname(FILENAME[3], fapl, filename1, sizeof filename1); + h5_fixname(FILENAME[4], fapl, filename2, sizeof filename2); - /* Create first file */ - if((fid=H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + /* Create first file */ + if((fid=H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - /* Create external links for chain */ - if(H5Lcreate_external(filename2, "/link2", fid, "link1", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Lcreate_external(filename2, "/link4", fid, "link3", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Lcreate_external(filename2, "/link6", fid, "link5", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + /* Create external links for chain */ + if(H5Lcreate_external(filename2, "/link2", fid, "link1", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external(filename2, "/link4", fid, "link3", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external(filename2, "/link6", fid, "link5", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - /* Create final object */ - if((gid = H5Gcreate2(fid, "final", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Gclose(gid) < 0) TEST_ERROR + /* Create final object */ + if((gid = H5Gcreate2(fid, "final", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR - /* Close file */ - if(H5Fclose(fid) < 0) TEST_ERROR + /* Close file */ + if(H5Fclose(fid) < 0) TEST_ERROR - /* Create second file */ - if((fid=H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + /* Create second file */ + if((fid=H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - /* Create external links for chain */ - if(H5Lcreate_external(filename1, "/link3", fid, "link2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Lcreate_external(filename1, "/link5", fid, "link4", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Lcreate_external(filename1, "/final", fid, "link6", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + /* Create external links for chain */ + if(H5Lcreate_external(filename1, "/link3", fid, "link2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external(filename1, "/link5", fid, "link4", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external(filename1, "/final", fid, "link6", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - /* Close file */ - if(H5Fclose(fid) < 0) TEST_ERROR + /* Close file */ + if(H5Fclose(fid) < 0) TEST_ERROR - /* Open first file */ - if((fid=H5Fopen(filename1, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR + /* Open first file */ + if((fid=H5Fopen(filename1, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - /* Open object through external link */ - if((gid = H5Gopen2(fid, "link1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* Open object through external link */ + if((gid = H5Gopen2(fid, "link1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Check name */ - if(H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if(HDstrcmp(objname, "/final")) TEST_ERROR + /* Check name */ + if(H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR + if(HDstrcmp(objname, "/final")) TEST_ERROR - /* Create object in external file */ - if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + /* Create object in external file */ + if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* Close group in external file */ - if(H5Gclose(gid2) < 0) TEST_ERROR + /* Close group in external file */ + if(H5Gclose(gid2) < 0) TEST_ERROR - /* Close external object (lets first file close) */ - if(H5Gclose(gid) < 0) TEST_ERROR + /* Close external object (lets first file close) */ + if(H5Gclose(gid) < 0) TEST_ERROR - /* Close first file */ - if(H5Fclose(fid) < 0) TEST_ERROR + /* Close first file */ + if(H5Fclose(fid) < 0) TEST_ERROR - /* Open first file again and check on object created */ - if((fid = H5Fopen(filename1, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + /* Open first file again and check on object created */ + if((fid = H5Fopen(filename1, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR - /* Open object created through external link */ - if((gid = H5Gopen2(fid, "/final/new_group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* Open object created through external link */ + if((gid = H5Gopen2(fid, "/final/new_group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Check name */ - if(H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if(HDstrcmp(objname, "/final/new_group")) TEST_ERROR + /* Check name */ + if(H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR + if(HDstrcmp(objname, "/final/new_group")) TEST_ERROR - /* Close opened object */ - if(H5Gclose(gid) < 0) TEST_ERROR + /* Close opened object */ + if(H5Gclose(gid) < 0) TEST_ERROR - /* Close first file */ - if(H5Fclose(fid) < 0) TEST_ERROR + /* Close first file */ + if(H5Fclose(fid) < 0) TEST_ERROR - PASSED(); - } /* end if */ - else { - SKIPPED(); - puts(" Current VFD can't reopen same file through external link"); - } /* end else */ + PASSED(); return 0; @@ -5993,7 +5976,7 @@ error: *------------------------------------------------------------------------- */ static int -external_link_closing(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) +external_link_closing(hid_t fapl, hbool_t new_format) { hid_t fid1 = (-1), fid2 = (-1), fid3 = (-1), fid4=(-1); hid_t gid=(-1), tid=(-1), tid2=(-1), sid=(-1), did=(-1); @@ -6013,194 +5996,185 @@ external_link_closing(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) else TESTING("that external files are closed during traversal") - /* Skip test when using core VFD, since it doesn't re-open file when linking - * to same file. + /* In this test, external links will go from file1 to file2 and from + * file2 to file3. + * Test that all functions that can traverse external files close + * the files they open. + * Test that providing unusual paths containing external links can't + * make HDF5 forget to close a file it opened. */ - if(HDstrcmp(env_h5_drvr, "core")) { - /* In this test, external links will go from file1 to file2 and from - * file2 to file3. - * Test that all functions that can traverse external files close - * the files they open. - * Test that providing unusual paths containing external links can't - * make HDF5 forget to close a file it opened. - */ - /* Set up filenames */ - h5_fixname(FILENAME[3], fapl, filename1, sizeof filename1); - h5_fixname(FILENAME[4], fapl, filename2, sizeof filename2); - h5_fixname(FILENAME[5], fapl, filename3, sizeof filename3); - h5_fixname(FILENAME[6], fapl, filename4, sizeof filename4); - - /* Create four files */ - if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if((fid4 = H5Fcreate(filename4, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - - /* Create a dataspace and a datatype so we can create/commit a dataset/datatype in the files */ - dims[0] = 2; - dims[1] = 2; - if((sid = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR - if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR - if((tid2 = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR - - /* Create external links from each file to the next */ - if(H5Lcreate_external(filename2, "/", fid1, "elink", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Lcreate_external(filename3, "/", fid2, "elink", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Lcreate_external(filename4, "/", fid3, "elink", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - - /* Close all files but the first */ - if(H5Fclose(fid4) < 0) TEST_ERROR - if(H5Fclose(fid3) < 0) TEST_ERROR - if(H5Fclose(fid2) < 0) TEST_ERROR - - /* Test creating each kind of object */ - if((gid = H5Gcreate2(fid1, "elink/elink/elink/group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Tcommit2(fid1, "elink/elink/elink/type1", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if((did = H5Dcreate2(fid1, "elink/elink/elink/dataset1", tid2, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - - /* Close objects */ - if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Tclose(tid) < 0) TEST_ERROR - if(H5Dclose(did) < 0) TEST_ERROR - - /* Test that getting info works */ - if(H5Lget_info(fid1, "elink/elink/elink/type1", &li, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Lget_info(fid1, "elink/elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink/elink/type1", &oi, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink/elink", &oi, H5P_DEFAULT) < 0) TEST_ERROR - - /* Test move */ - if(H5Lmove(fid1, "elink/elink/elink/group1", fid1, - "elink/elink/elink/group1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - - /* Open file 4 so we can do some fancy things */ - if((fid4 = H5Fopen(filename4, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR - if(H5Lmove(fid1, "elink/elink/elink/type1", fid4, - "type1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Lmove(fid4, "dataset1", fid1, - "elink/elink/elink/dataset1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - - /* Close file 4 again */ - if(H5Fclose(fid4) < 0) FAIL_STACK_ERROR - - /* Test copy (as of this test, it uses the same code as move) */ - if(H5Lcopy(fid1, "elink/elink/elink", fid1, - "elink/elink/elink_copied", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Lcopy(fid1, "elink/elink/elink", fid1, - "elink/elink/elink/elink_copied2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - - /* Test H5Gset and get comment */ - if(H5Oset_comment_by_name(fid1, "elink/elink/elink/group1_moved", "comment", H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(HDstrcmp(buf, "comment")) TEST_ERROR - - /* Test H5*open */ - if((gid = H5Gopen2(fid1, "elink/elink/elink/group1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - if((tid = H5Topen2(fid1, "elink/elink/elink/type1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - if((did = H5Dopen2(fid1, "elink/elink/elink/dataset1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Close objects */ - if(H5Gclose(gid) < 0) FAIL_STACK_ERROR - if(H5Tclose(tid) < 0) FAIL_STACK_ERROR - if(H5Dclose(did) < 0) FAIL_STACK_ERROR - - /* Test H5*open2 */ - if((gid = H5Gopen2(fid1, "elink/elink/elink/group1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - if((tid = H5Topen2(fid1, "elink/elink/elink/type1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - if((did = H5Dopen2(fid1, "elink/elink/elink/dataset1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Close objects */ - if(H5Gclose(gid) < 0) FAIL_STACK_ERROR - if(H5Tclose(tid) < 0) FAIL_STACK_ERROR - if(H5Dclose(did) < 0) FAIL_STACK_ERROR - - /* Test H5Oopen */ - if((did = H5Oopen(fid1, "elink/elink/elink/dataset1_moved", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Dclose(did) < 0) TEST_ERROR - - /* Test H5Fmount */ - if((gid = H5Gcreate2(fid1, "elink/elink/elink/mnt", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Gclose(gid) < 0) TEST_ERROR - H5E_BEGIN_TRY { - if(H5Fmount(fid1, "elink/elink/elink/mnt", fid1, H5P_DEFAULT) >= 0) TEST_ERROR - if(H5Funmount(fid1, "elink/elink/elink/mnt") >= 0) TEST_ERROR - } H5E_END_TRY - - /* Test H5Rcreate */ - if(H5Rcreate(&obj_ref, fid1, "elink/elink/elink/type1_moved", H5R_OBJECT, (-1)) < 0) TEST_ERROR - - /* Test unlink */ - if(H5Ldelete(fid1, "elink/elink/elink/group1_moved", H5P_DEFAULT) < 0) TEST_ERROR - if(H5Ldelete(fid1, "elink/elink/elink/type1_moved", H5P_DEFAULT) < 0) TEST_ERROR - if(H5Ldelete(fid1, "elink/elink/elink/dataset1_moved", H5P_DEFAULT) < 0) TEST_ERROR - if(H5Ldelete(fid1, "elink/elink/elink_copied", H5P_DEFAULT) < 0) TEST_ERROR - if(H5Ldelete(fid1, "elink/elink/elink/elink_copied2", H5P_DEFAULT) < 0) TEST_ERROR - - /* We've tested that the various functions above don't leave files open. - * Now test that we can't confuse HDF5 by giving unusual paths with external links - */ - /* Create an external link that points to another external link */ - if((fid2 = H5Fopen(filename2, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if(H5Lcreate_external(filename3, "/elink", fid2, "elink2", - H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Fclose(fid2) < 0) TEST_ERROR - - /* Do an external link traversal that recursively calls another external link. */ - if((gid = H5Gcreate2(fid1, "elink/elink2/group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Gclose(gid) < 0) TEST_ERROR - - /* Create two more groups so that the last three elements in the path are - * all within the same external file - */ - if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Gclose(gid) < 0) TEST_ERROR - if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3/group4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink2/group2/group3/group4", &oi, H5P_DEFAULT) < 0) TEST_ERROR - - /* Add a few regular groups and a soft link in file2 using intermediate group creation */ - if((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) TEST_ERROR - if(H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0) TEST_ERROR - if(H5Lcreate_soft("/elink2", fid1, "elink/file2group1/file2group2/slink", - lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR - - /* Try to traverse this path. There are three soft traversals in a row; - * slink points to (file2)/elink2, which points to (file3)/elink, which - * points to file 4. - */ - if((gid = H5Gcreate2(fid1, "elink/file2group1/file2group2/slink/group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Lget_info(fid1, "elink/file2group1/file2group2/slink/group3", &li, H5P_DEFAULT) < 0) TEST_ERROR - - /* Some simpler tests */ - if((gid = H5Gcreate2(fid1, "elink/file2group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Lget_info(fid1, "elink/file2group3", &li, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Lget_info(fid1, "elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR - - - /* Close file1, the only file that should still be open */ - if(H5Fclose(fid1) < 0) TEST_ERROR - - /* Re-create each file. If they are hanging open, these creates will fail */ - if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if((fid4 = H5Fcreate(filename4, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - - /* Cleanup */ - if(H5Sclose(sid) < 0) TEST_ERROR - if(H5Tclose(tid2) < 0) TEST_ERROR - if(H5Fclose(fid4) < 0) TEST_ERROR - if(H5Fclose(fid3) < 0) TEST_ERROR - if(H5Fclose(fid2) < 0) TEST_ERROR - if(H5Fclose(fid1) < 0) TEST_ERROR + /* Set up filenames */ + h5_fixname(FILENAME[3], fapl, filename1, sizeof filename1); + h5_fixname(FILENAME[4], fapl, filename2, sizeof filename2); + h5_fixname(FILENAME[5], fapl, filename3, sizeof filename3); + h5_fixname(FILENAME[6], fapl, filename4, sizeof filename4); - PASSED(); - } /* end if */ - else { - SKIPPED(); - puts(" Current VFD can't reopen same file through external link"); - } /* end else */ + /* Create four files */ + if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((fid4 = H5Fcreate(filename4, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + + /* Create a dataspace and a datatype so we can create/commit a dataset/datatype in the files */ + dims[0] = 2; + dims[1] = 2; + if((sid = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR + if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR + if((tid2 = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR + + /* Create external links from each file to the next */ + if(H5Lcreate_external(filename2, "/", fid1, "elink", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external(filename3, "/", fid2, "elink", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external(filename4, "/", fid3, "elink", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Close all files but the first */ + if(H5Fclose(fid4) < 0) TEST_ERROR + if(H5Fclose(fid3) < 0) TEST_ERROR + if(H5Fclose(fid2) < 0) TEST_ERROR + + /* Test creating each kind of object */ + if((gid = H5Gcreate2(fid1, "elink/elink/elink/group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Tcommit2(fid1, "elink/elink/elink/type1", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if((did = H5Dcreate2(fid1, "elink/elink/elink/dataset1", tid2, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + + /* Close objects */ + if(H5Gclose(gid) < 0) TEST_ERROR + if(H5Tclose(tid) < 0) TEST_ERROR + if(H5Dclose(did) < 0) TEST_ERROR + + /* Test that getting info works */ + if(H5Lget_info(fid1, "elink/elink/elink/type1", &li, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lget_info(fid1, "elink/elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(fid1, "elink/elink/elink/type1", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(fid1, "elink/elink/elink", &oi, H5P_DEFAULT) < 0) TEST_ERROR + + /* Test move */ + if(H5Lmove(fid1, "elink/elink/elink/group1", fid1, + "elink/elink/elink/group1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Open file 4 so we can do some fancy things */ + if((fid4 = H5Fopen(filename4, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR + if(H5Lmove(fid1, "elink/elink/elink/type1", fid4, + "type1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Lmove(fid4, "dataset1", fid1, + "elink/elink/elink/dataset1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Close file 4 again */ + if(H5Fclose(fid4) < 0) FAIL_STACK_ERROR + + /* Test copy (as of this test, it uses the same code as move) */ + if(H5Lcopy(fid1, "elink/elink/elink", fid1, + "elink/elink/elink_copied", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Lcopy(fid1, "elink/elink/elink", fid1, + "elink/elink/elink/elink_copied2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Test H5Gset and get comment */ + if(H5Oset_comment_by_name(fid1, "elink/elink/elink/group1_moved", "comment", H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(HDstrcmp(buf, "comment")) TEST_ERROR + + /* Test H5*open */ + if((gid = H5Gopen2(fid1, "elink/elink/elink/group1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if((tid = H5Topen2(fid1, "elink/elink/elink/type1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if((did = H5Dopen2(fid1, "elink/elink/elink/dataset1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* Close objects */ + if(H5Gclose(gid) < 0) FAIL_STACK_ERROR + if(H5Tclose(tid) < 0) FAIL_STACK_ERROR + if(H5Dclose(did) < 0) FAIL_STACK_ERROR + + /* Test H5*open2 */ + if((gid = H5Gopen2(fid1, "elink/elink/elink/group1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if((tid = H5Topen2(fid1, "elink/elink/elink/type1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if((did = H5Dopen2(fid1, "elink/elink/elink/dataset1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* Close objects */ + if(H5Gclose(gid) < 0) FAIL_STACK_ERROR + if(H5Tclose(tid) < 0) FAIL_STACK_ERROR + if(H5Dclose(did) < 0) FAIL_STACK_ERROR + + /* Test H5Oopen */ + if((did = H5Oopen(fid1, "elink/elink/elink/dataset1_moved", H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Dclose(did) < 0) TEST_ERROR + + /* Test H5Fmount */ + if((gid = H5Gcreate2(fid1, "elink/elink/elink/mnt", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + H5E_BEGIN_TRY { + if(H5Fmount(fid1, "elink/elink/elink/mnt", fid1, H5P_DEFAULT) >= 0) TEST_ERROR + if(H5Funmount(fid1, "elink/elink/elink/mnt") >= 0) TEST_ERROR + } H5E_END_TRY + + /* Test H5Rcreate */ + if(H5Rcreate(&obj_ref, fid1, "elink/elink/elink/type1_moved", H5R_OBJECT, (-1)) < 0) TEST_ERROR + + /* Test unlink */ + if(H5Ldelete(fid1, "elink/elink/elink/group1_moved", H5P_DEFAULT) < 0) TEST_ERROR + if(H5Ldelete(fid1, "elink/elink/elink/type1_moved", H5P_DEFAULT) < 0) TEST_ERROR + if(H5Ldelete(fid1, "elink/elink/elink/dataset1_moved", H5P_DEFAULT) < 0) TEST_ERROR + if(H5Ldelete(fid1, "elink/elink/elink_copied", H5P_DEFAULT) < 0) TEST_ERROR + if(H5Ldelete(fid1, "elink/elink/elink/elink_copied2", H5P_DEFAULT) < 0) TEST_ERROR + + /* We've tested that the various functions above don't leave files open. + * Now test that we can't confuse HDF5 by giving unusual paths with external links + */ + /* Create an external link that points to another external link */ + if((fid2 = H5Fopen(filename2, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR + if(H5Lcreate_external(filename3, "/elink", fid2, "elink2", + H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Fclose(fid2) < 0) TEST_ERROR + + /* Do an external link traversal that recursively calls another external link. */ + if((gid = H5Gcreate2(fid1, "elink/elink2/group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + + /* Create two more groups so that the last three elements in the path are + * all within the same external file + */ + if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3/group4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + if(H5Oget_info_by_name(fid1, "elink/elink2/group2/group3/group4", &oi, H5P_DEFAULT) < 0) TEST_ERROR + + /* Add a few regular groups and a soft link in file2 using intermediate group creation */ + if((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) TEST_ERROR + if(H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0) TEST_ERROR + if(H5Lcreate_soft("/elink2", fid1, "elink/file2group1/file2group2/slink", + lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR + + /* Try to traverse this path. There are three soft traversals in a row; + * slink points to (file2)/elink2, which points to (file3)/elink, which + * points to file 4. + */ + if((gid = H5Gcreate2(fid1, "elink/file2group1/file2group2/slink/group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + if(H5Lget_info(fid1, "elink/file2group1/file2group2/slink/group3", &li, H5P_DEFAULT) < 0) TEST_ERROR + + /* Some simpler tests */ + if((gid = H5Gcreate2(fid1, "elink/file2group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + if(H5Lget_info(fid1, "elink/file2group3", &li, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lget_info(fid1, "elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR + + + /* Close file1, the only file that should still be open */ + if(H5Fclose(fid1) < 0) TEST_ERROR + + /* Re-create each file. If they are hanging open, these creates will fail */ + if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((fid4 = H5Fcreate(filename4, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + + /* Cleanup */ + if(H5Sclose(sid) < 0) TEST_ERROR + if(H5Tclose(tid2) < 0) TEST_ERROR + if(H5Fclose(fid4) < 0) TEST_ERROR + if(H5Fclose(fid3) < 0) TEST_ERROR + if(H5Fclose(fid2) < 0) TEST_ERROR + if(H5Fclose(fid1) < 0) TEST_ERROR + + PASSED(); return 0; @@ -6241,34 +6215,19 @@ external_link_endian(hbool_t new_format) hid_t fid = (-1); /* File ID */ hid_t gid = (-1), gid2 = (-1); /* Group IDs */ hid_t lapl_id = (-1); /* Prop List ID */ - char * srcdir = getenv("srcdir"); /* The source directory */ - char pathbuf[NAME_BUF_SIZE]; /* Path to the files */ - char namebuf[NAME_BUF_SIZE]; + const char *pathbuf = H5_get_srcdir(); /* Path to the files */ + const char *namebuf; if(new_format) TESTING("endianness of external links (w/new group format)") else TESTING("endianness of external links") - /* - * Create the name of the file to open (in case we are using the --srcdir - * option and the file is in a different directory from this test). - */ - if (srcdir && ((HDstrlen(srcdir) + 2) < sizeof(pathbuf)) ) - { - HDstrcpy(pathbuf, srcdir); - HDstrcat(pathbuf, "/"); - } - else - HDstrcpy(pathbuf, ""); - /* Create a link access property list with the path to the srcdir */ if((lapl_id = H5Pcreate(H5P_LINK_ACCESS)) < 0) TEST_ERROR if(H5Pset_elink_prefix(lapl_id, pathbuf) < 0) TEST_ERROR - if(HDstrlen(pathbuf) + HDstrlen(LE_FILENAME) >= sizeof(namebuf)) TEST_ERROR - HDstrcpy(namebuf, pathbuf); - HDstrcat(namebuf, LE_FILENAME); + namebuf = H5_get_srcdir_filename(LE_FILENAME); /* Corrected test file name */ /* Test LE file; try to open a group through the external link */ if((fid = H5Fopen(namebuf, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) TEST_ERROR @@ -6282,9 +6241,7 @@ external_link_endian(hbool_t new_format) if(H5Gclose(gid) < 0) TEST_ERROR if(H5Fclose(fid) < 0) TEST_ERROR - if(HDstrlen(pathbuf) + HDstrlen(BE_FILENAME) >= sizeof(namebuf)) TEST_ERROR - HDstrcpy(namebuf, pathbuf); - HDstrcat(namebuf, BE_FILENAME); + namebuf = H5_get_srcdir_filename(BE_FILENAME); /* Corrected test file name */ /* Test BE file; try to open a group through the external link */ if((fid = H5Fopen(namebuf, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) TEST_ERROR @@ -6611,6 +6568,143 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- + * Function: external_copy_invalid_object + * + * Purpose: Check that attempting to copy an object through an + * external link to the source file but with an invalid + * object name fails gracefully, and does not leave lingering + * file ids. + * + * Return: Success: 0 + * Failure: -1 + * + * Programmer: Neil Fortner + * Wednesday, March 3, 2010 + * + *------------------------------------------------------------------------- + */ +static int +external_copy_invalid_object(hid_t fapl, hbool_t new_format) +{ + hid_t fid = (-1); /* File ID */ + hid_t gid = (-1); /* Group ID */ + hid_t ocpyplid = (-1); /* Object copy plist ID */ + char filename[NAME_BUF_SIZE]; + + if(new_format) + TESTING("copying invalid external links to the source file (w/new group format)") + else + TESTING("copying invalid external links to the source file") + + /* Set up filename */ + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + + /* Create object copy plist, set expand external flag */ + if((ocpyplid = H5Pcreate(H5P_OBJECT_COPY)) < 0) TEST_ERROR + if(H5Pset_copy_object(ocpyplid, H5O_COPY_EXPAND_EXT_LINK_FLAG) < 0) TEST_ERROR + + /* Create file and group */ + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((gid = H5Gcreate2(fid, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + + /* Create an external link in the group to the source file with an invalid + * object name */ + if(H5Lcreate_external(filename, "no_object", fid, "/group1/link", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Copy the group containing the external link */ + if(H5Ocopy(fid, "group1", fid, "group2", ocpyplid, H5P_DEFAULT) < 0) TEST_ERROR + + /* Close file */ + if(H5Fclose(fid) < 0) TEST_ERROR + + /* Attempt to truncate the file again. If there is a lingering id for this + * file this will fail */ + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + + /* Close */ + if(H5Fclose(fid) < 0) TEST_ERROR + if(H5Pclose(ocpyplid) < 0) TEST_ERROR + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Gclose(gid); + H5Fclose(fid); + H5Pclose(ocpyplid); + } H5E_END_TRY + + return -1; +} /* end external_copy_invalid_object */ + + +/*------------------------------------------------------------------------- + * Function: external_dont_fail_to_source + * + * Purpose: Check that external links with invalid target file names + * work properly and do not attempt to (re)open the source + * file. + * + * Return: Success: 0 + * Failure: -1 + * + * Programmer: Neil Fortner + * Wednesday, March 3, 2010 + * + *------------------------------------------------------------------------- + */ +static int +external_dont_fail_to_source(hid_t fapl, hbool_t new_format) +{ + hid_t fid = (-1); /* File ID */ + hid_t gid = (-1); /* Group ID */ + hid_t oid = (-1); /* Object ID */ + char filename[NAME_BUF_SIZE]; + + if(new_format) + TESTING("that invalid external links don't open the source file (w/new group format)") + else + TESTING("that invalid external links don't open the source file") + + /* Set up filename */ + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + + /* Create file and group */ + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + + /* Create an external link with an invalid file name, but the same object + * name as the group. This way, if the external link is interpreted to + * refer to the source file, it will link to the group */ + if(H5Lcreate_external("no_file", "/group", fid, "link", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Attempt to open the object the link points to. This should fail */ + H5E_BEGIN_TRY { + oid = H5Oopen(fid, "link", H5P_DEFAULT); + } H5E_END_TRY + if(oid >= 0) FAIL_PUTS_ERROR("Succeeded in opening target of invalid external link") + + /* Close */ + if(H5Fclose(fid) < 0) TEST_ERROR + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Gclose(gid); + H5Oclose(oid); + H5Fclose(fid); + } H5E_END_TRY + + return -1; +} /* end external_dont_fail_to_source */ + + +/*------------------------------------------------------------------------- * Function: ud_hard_links * * Purpose: Check that the functionality of hard links can be duplicated @@ -8190,8 +8284,7 @@ build_visit_file(hid_t fapl) hid_t did = (-1); /* Dataset ID */ hid_t tid = (-1); /* Datatype ID */ char filename[NAME_BUF_SIZE]; - char pathname[1024]; /* Path of external link file */ - char *srcdir = getenv("srcdir"); /* where the src code is located */ + const char *pathname = H5_get_srcdir_filename(LINKED_FILE); /* Corrected test file name */ h5_fixname(FILENAME[9], fapl, filename, sizeof filename); @@ -8227,17 +8320,9 @@ build_visit_file(hid_t fapl) if(H5Lcreate_hard(fid, "/", fid, "/Group1/Group2/hard_zero", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR /* Create external link to existing file */ - pathname[0] = '\0'; - /* Generate correct name for test file by prepending the source path */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(LINKED_FILE) + 1) < sizeof(pathname))) { - HDstrcpy(pathname, srcdir); - HDstrcat(pathname, "/"); - } - HDstrcat(pathname, LINKED_FILE); - if(H5Lcreate_external(pathname, "/group", fid, "/ext_one", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - /* Create dangling external link to non-existant file */ + /* Create dangling external link to non-existent file */ if(H5Lcreate_external("foo.h5", "/group", fid, "/ext_dangle", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR /* Create dataset in each group */ @@ -8370,7 +8455,7 @@ link_visit(hid_t fapl, hbool_t new_format) error: H5E_BEGIN_TRY { - H5Fclose(gid); + H5Gclose(gid); H5Fclose(fid); } H5E_END_TRY; return -1; @@ -8448,7 +8533,7 @@ link_visit_by_name(hid_t fapl, hbool_t new_format) error: H5E_BEGIN_TRY { - H5Fclose(gid); + H5Gclose(gid); H5Fclose(fid); } H5E_END_TRY; return -1; @@ -8548,7 +8633,7 @@ obj_visit(hid_t fapl, hbool_t new_format) error: H5E_BEGIN_TRY { - H5Fclose(gid); + H5Gclose(gid); H5Fclose(fid); } H5E_END_TRY; return -1; @@ -8627,7 +8712,7 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format) error: H5E_BEGIN_TRY { - H5Fclose(gid); + H5Gclose(gid); H5Fclose(fid); } H5E_END_TRY; return -1; @@ -9099,6 +9184,294 @@ error: /*------------------------------------------------------------------------- + * Function: obj_exists + * + * Purpose: Test the 'object exists' routine + * + * Return: Success: 0 + * Failure: -1 + * + * Programmer: Quincey Koziol + * Tuesday, February 2, 2010 + * + *------------------------------------------------------------------------- + */ +static int +obj_exists(hid_t fapl, hbool_t new_format) +{ + char filename[NAME_BUF_SIZE]; /* Buffer for file name */ + hid_t fid = -1; /* File ID */ + hid_t gid = -1; /* Group ID */ + herr_t status; /* Generic return value */ + + if(new_format) + TESTING("object exists (w/new group format)") + else + TESTING("object exists") + + /* Set up filename and create file*/ + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + FAIL_STACK_ERROR + +/* Hard links */ + /* Verify that H5Oexists_by_name() fails for non-existent link in root group */ + H5E_BEGIN_TRY { + status = H5Oexists_by_name(fid, "foo", H5P_DEFAULT); + } H5E_END_TRY + if(status >= 0) TEST_ERROR + + /* Create a group, as a destination for testing */ + if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + if(H5Gclose(gid) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() succeeds for hard linked object */ + if(TRUE != H5Oexists_by_name(fid, "group", H5P_DEFAULT)) + TEST_ERROR + + /* Verify that H5Oexists_by_name() fails for non-existent link in non-root group */ + H5E_BEGIN_TRY { + status = H5Oexists_by_name(fid, "group/foo", H5P_DEFAULT); + } H5E_END_TRY + if(status >= 0) TEST_ERROR + + +/* Soft links */ + /* Create dangling soft-link in root group */ + if(H5Lcreate_soft("dangle", fid, "soft1", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE for dangling soft-link in root group */ + if(FALSE != H5Oexists_by_name(fid, "soft1", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in root group that points to object */ + if(H5Lcreate_soft("/group", fid, "soft2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE for soft-link in root group that points to object */ + if(TRUE != H5Oexists_by_name(fid, "soft2", H5P_DEFAULT)) + TEST_ERROR + + /* Create dangling soft-link in non-root group */ + if(H5Lcreate_soft("dangle", fid, "group/soft1", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE for dangling soft-link in non-root group */ + if(FALSE != H5Oexists_by_name(fid, "group/soft1", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in non-root group that points to object */ + if(H5Lcreate_soft("/group", fid, "group/soft2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE for soft-link in non-root group that points to object */ + if(TRUE != H5Oexists_by_name(fid, "group/soft2", H5P_DEFAULT)) + TEST_ERROR + + +/* External links */ + /* Create dangling (file doesn't exist) external link in root group */ + if(H5Lcreate_external("nofile", "dangle", fid, "external1", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE for dangling (file doesn't exist) external link in root group */ + if(FALSE != H5Oexists_by_name(fid, "external1", H5P_DEFAULT)) + TEST_ERROR + + /* Create dangling (object doesn't exist) external link in root group */ + if(H5Lcreate_external(filename, "dangle", fid, "external2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE for dangling (object doesn't exist) external link in root group */ + if(FALSE != H5Oexists_by_name(fid, "external2", H5P_DEFAULT)) + TEST_ERROR + + /* Create external link in root group that points to object */ + if(H5Lcreate_external(filename, "group", fid, "external3", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE for external link in root group that points to object */ + if(TRUE != H5Oexists_by_name(fid, "external3", H5P_DEFAULT)) + TEST_ERROR + + /* Create dangling (file doesn't exist) external link in non-root group */ + if(H5Lcreate_external("nofile", "dangle", fid, "group/external1", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE for dangling (file doesn't exist) external link in non-root group */ + if(FALSE != H5Oexists_by_name(fid, "group/external1", H5P_DEFAULT)) + TEST_ERROR + + /* Create dangling (object doesn't exist) external link in non-root group */ + if(H5Lcreate_external(filename, "dangle", fid, "group/external2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE for dangling (object doesn't exist) external link in non-root group */ + if(FALSE != H5Oexists_by_name(fid, "group/external2", H5P_DEFAULT)) + TEST_ERROR + + /* Create external link in non-root group that points to object */ + if(H5Lcreate_external(filename, "group", fid, "group/external3", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE for external link in non-root group that points to object */ + if(TRUE != H5Oexists_by_name(fid, "group/external3", H5P_DEFAULT)) + TEST_ERROR + + +/* Soft->External links */ + /* Create soft-link in root group that points to dangling (file doesn't exist) external link */ + if(H5Lcreate_soft("external1", fid, "soft-elink1", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "soft-elink1", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in root group that points to dangling (object doesn't exist) external link */ + if(H5Lcreate_soft("external2", fid, "soft-elink2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "soft-elink2", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in root group that points to external link that points to object */ + if(H5Lcreate_soft("external3", fid, "soft-elink3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE */ + if(TRUE != H5Oexists_by_name(fid, "soft-elink3", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in root group that points to dangling (file doesn't exist) external link in non-root group */ + if(H5Lcreate_soft("group/external1", fid, "soft-elink4", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "soft-elink4", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in root group that points to dangling (object doesn't exist) external link in non-root group */ + if(H5Lcreate_soft("group/external2", fid, "soft-elink5", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "soft-elink5", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in root group that points to external link in non-root group that points to object */ + if(H5Lcreate_soft("group/external3", fid, "soft-elink6", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE */ + if(TRUE != H5Oexists_by_name(fid, "soft-elink6", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in non-root group that points to dangling (file doesn't exist) external link */ + if(H5Lcreate_soft("/external1", fid, "group/soft-elink1", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "group/soft-elink1", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in non-root group that points to dangling (object doesn't exist) external link */ + if(H5Lcreate_soft("/external2", fid, "group/soft-elink2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "group/soft-elink2", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in non-root group that points to external link that points to object */ + if(H5Lcreate_soft("/external3", fid, "group/soft-elink3", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE */ + if(TRUE != H5Oexists_by_name(fid, "group/soft-elink3", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in non-root group that points to dangling (file doesn't exist) external link in non-root group */ + if(H5Lcreate_soft("/group/external1", fid, "group/soft-elink4", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "group/soft-elink4", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in non-root group that points to dangling (object doesn't exist) external link in non-root group */ + if(H5Lcreate_soft("/group/external2", fid, "group/soft-elink5", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "group/soft-elink5", H5P_DEFAULT)) + TEST_ERROR + + /* Create soft-link in non-root group that points to external link in non-root group that points to object */ + if(H5Lcreate_soft("/group/external3", fid, "group/soft-elink6", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE */ + if(TRUE != H5Oexists_by_name(fid, "group/soft-elink6", H5P_DEFAULT)) + TEST_ERROR + + +/* External->Soft links */ + /* Create external link in root group that points to dangling soft link in root group */ + if(H5Lcreate_external(filename, "soft1", fid, "elink-soft1", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "elink-soft1", H5P_DEFAULT)) + TEST_ERROR + + /* Create external link in root group that points to soft link in root group that points to object */ + if(H5Lcreate_external(filename, "soft2", fid, "elink-soft2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE */ + if(TRUE != H5Oexists_by_name(fid, "elink-soft2", H5P_DEFAULT)) + TEST_ERROR + + /* Create external link in root group that points to dangling soft link in non-root group */ + if(H5Lcreate_external(filename, "group/soft1", fid, "elink-soft3", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "elink-soft3", H5P_DEFAULT)) + TEST_ERROR + + /* Create external link in root group that points to soft link in root group that points to object */ + if(H5Lcreate_external(filename, "group/soft2", fid, "elink-soft4", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE */ + if(TRUE != H5Oexists_by_name(fid, "elink-soft4", H5P_DEFAULT)) + TEST_ERROR + + /* Create external link in non-root group that points to dangling soft link in root group */ + if(H5Lcreate_external(filename, "soft1", fid, "group/elink-soft1", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "group/elink-soft1", H5P_DEFAULT)) + TEST_ERROR + + /* Create external link in non-root group that points to soft link in root group that points to object */ + if(H5Lcreate_external(filename, "soft2", fid, "group/elink-soft2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE */ + if(TRUE != H5Oexists_by_name(fid, "group/elink-soft2", H5P_DEFAULT)) + TEST_ERROR + + /* Create external link in non-root group that points to dangling soft link in non-root group */ + if(H5Lcreate_external(filename, "group/soft1", fid, "group/elink-soft3", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns FALSE */ + if(FALSE != H5Oexists_by_name(fid, "group/elink-soft3", H5P_DEFAULT)) + TEST_ERROR + + /* Create external link in non-root group that points to soft link in non-root group that points to object */ + if(H5Lcreate_external(filename, "group/soft2", fid, "group/elink-soft4", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Verify that H5Oexists_by_name() returns TRUE */ + if(TRUE != H5Oexists_by_name(fid, "group/elink-soft4", H5P_DEFAULT)) + TEST_ERROR + + + /* Close file created */ + if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Gclose(gid); + H5Fclose(fid); + } H5E_END_TRY; + return -1; +} /* end obj_exists() */ + + +/*------------------------------------------------------------------------- * Function: corder_create_empty * * Purpose: Create an empty group with creation order indices @@ -10887,13 +11260,6 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info_t *info, char objname[NAME_BUF_SIZE]; /* Object name */ H5L_info_t my_info; /* Local link info */ -#ifdef QAK -HDfprintf(stderr, "link_name = '%s'\n", link_name); -if(info) - HDfprintf(stderr, "info->corder = %Hd\n", info->corder); -HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr); -#endif /* QAK */ - /* Increment # of times the callback was called */ op_data->ncalled++; @@ -11372,13 +11738,6 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info_t *inf char objname[NAME_BUF_SIZE]; /* Object name */ H5L_info_t my_info; /* Local link info */ -#ifdef QAK -HDfprintf(stderr, "link_name = '%s'\n", link_name); -if(info) - HDfprintf(stderr, "info->corder = %Hd\n", info->corder); -HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr); -#endif /* QAK */ - /* Increment # of times the callback was called */ op_data->ncalled++; @@ -13571,8 +13930,8 @@ main(void) nerrors += external_link_path(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_mult(my_fapl, new_format) < 0 ? 1 : 0; #ifndef H5_CANNOT_OPEN_TWICE - nerrors += external_link_self(env_h5_drvr, my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_pingpong(env_h5_drvr, my_fapl, new_format) < 0 ? 1 : 0; + nerrors += external_link_self(my_fapl, new_format) < 0 ? 1 : 0; + nerrors += external_link_pingpong(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_toomany(my_fapl, new_format) < 0 ? 1 : 0; #endif /* H5_CANNOT_OPEN_TWICE */ nerrors += external_link_dangling(my_fapl, new_format) < 0 ? 1 : 0; @@ -13583,7 +13942,7 @@ main(void) nerrors += external_link_move(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_ride(my_fapl, new_format) < 0 ? 1 : 0; #ifndef H5_CANNOT_OPEN_TWICE - nerrors += external_link_closing(env_h5_drvr, my_fapl, new_format) < 0 ? 1 : 0; + nerrors += external_link_closing(my_fapl, new_format) < 0 ? 1 : 0; #endif /* H5_CANNOT_OPEN_TWICE */ nerrors += external_link_endian(new_format) < 0 ? 1 : 0; nerrors += external_link_strong(my_fapl, new_format) < 0 ? 1 : 0; @@ -13615,6 +13974,8 @@ main(void) nerrors += external_link_win9(my_fapl, new_format) < 0 ? 1 : 0; #endif nerrors += external_symlink(env_h5_drvr, my_fapl, new_format) < 0 ? 1 : 0; + nerrors += external_copy_invalid_object(my_fapl, new_format) < 0 ? 1 : 0; + nerrors += external_dont_fail_to_source(my_fapl, new_format) < 0 ? 1 : 0; /* These tests assume that external links are a form of UD links, * so assume that everything that passed for external links @@ -13637,6 +13998,9 @@ main(void) nerrors += obj_visit_by_name(my_fapl, new_format) < 0 ? 1 : 0; nerrors += obj_visit_stop(my_fapl, new_format) < 0 ? 1 : 0; nerrors += link_filters(my_fapl, new_format) < 0 ? 1 : 0; +#ifndef H5_CANNOT_OPEN_TWICE + nerrors += obj_exists(my_fapl, new_format) < 0 ? 1 : 0; +#endif /* H5_CANNOT_OPEN_TWICE */ /* Keep this test last, it's testing files that are used above */ /* do not do this for files used by external link tests */ diff --git a/test/mf.c b/test/mf.c index ca89b79..6bfa44e 100644 --- a/test/mf.c +++ b/test/mf.c @@ -19,7 +19,7 @@ * test_mf_fs_*() tests for file memory that interact with the free-space manager * test_mf_aggr_*() tests for file memory that interact with the aggregators * test_mf_align_*() tests for file memory with alignment setting - * test_filespace_*() tests for file space management + * test_filespace_*() tests for file space management */ #include "h5test.h" @@ -3688,7 +3688,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Skip test when using VFDs that have their own 'alloc' callback, which * don't push mis-aligned space fragments on the file free space list */ - have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") + have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")); if(have_alloc_vfd) { /* Set the filename to use for this test (dependent on fapl) */ @@ -4127,7 +4127,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Skip test when using VFDs that have their own 'alloc' callback, which * don't push mis-aligned space fragments on the file free space list */ - have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") + have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")); if(have_alloc_vfd) { if((file_size = h5_get_file_size(filename, new_fapl)) < 0) @@ -4335,7 +4335,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Skip test when using VFDs that have their own 'alloc' callback, which * don't push mis-aligned space fragments on the file free space list */ - have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") + have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")); if(have_alloc_vfd) { /* Set the filename to use for this test (dependent on fapl) */ @@ -4592,7 +4592,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Skip test when using VFDs that have their own 'alloc' callback, which * don't push mis-aligned space fragments on the file free space list */ - have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") + have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")); if(have_alloc_vfd) { /* Set the filename to use for this test (dependent on fapl) */ @@ -4921,7 +4921,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Skip test when using VFDs that have their own 'alloc' callback, which * don't push mis-aligned space fragments on the file free space list */ - have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") + have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")); if(have_alloc_vfd) { /* Set the filename to use for this test (dependent on fapl) */ @@ -5217,7 +5217,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Skip test when using VFDs that have their own 'alloc' callback, which * don't push mis-aligned space fragments on the file free space list */ - have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") + have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")); if(have_alloc_vfd) { /* Set the filename to use for this test (dependent on fapl) */ @@ -5424,7 +5424,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Skip test when using VFDs that have their own 'alloc' callback, which * don't push mis-aligned space fragments on the file free space list */ - have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") + have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")); if(have_alloc_vfd) { /* Set the filename to use for this test (dependent on fapl) */ @@ -5693,7 +5693,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Skip test when using VFDs that have their own 'alloc' callback, which * don't push mis-aligned space fragments on the file free space list */ - have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") + have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")); if(have_alloc_vfd) { /* Set the filename to use for this test (dependent on fapl) */ @@ -5993,7 +5993,7 @@ error: } /* test_mf_fs_persist() */ /* - * Verify that the free-space manager goes away + * Verify that the free-space manager goes away */ static unsigned test_mf_fs_gone(hid_t fapl_new, hid_t fcpl) @@ -6365,7 +6365,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl) hid_t file = -1; /* File ID */ char filename[FILENAME_LEN]; /* Filename to use */ H5F_t *f = NULL; /* Internal file object pointer */ - H5FD_mem_t type, stype, btype, gtype; /* File allocation type */ + H5FD_mem_t type, stype, btype, gtype; /* File allocation type */ H5FS_stat_t fs_stat; /* Information for free-space manager */ haddr_t addr1, addr2, addr3, addr4; /* File allocation type */ haddr_t saddr1, saddr2, saddr3, saddr4; /* File address for H5FD_MEM_SUPER */ @@ -6591,7 +6591,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl) (hsize_t)TEST_BLOCK_SIZE1, (H5FS_section_info_t **)&node)) < 0) FAIL_STACK_ERROR if(node_found) TEST_ERROR - + if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (hsize_t)TEST_BLOCK_SIZE3, (H5FS_section_info_t **)&node)) < 0) FAIL_STACK_ERROR @@ -6691,7 +6691,7 @@ test_mf_fs_drivers(hid_t fapl) if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR /* Set the "use the latest version of the format" bounds for creating objects in the file */ - if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) TEST_ERROR /* Test with old and new format */ @@ -6713,7 +6713,7 @@ test_mf_fs_drivers(hid_t fapl) ret += test_mf_fs_gone(fapl_new, fcpl); ret += test_mf_fs_persist(fapl_new, fcpl); - h5_cleanup(FILENAME, fapl_new); + h5_cleanup(FILENAME, fapl_new); /* STDIO */ @@ -6727,13 +6727,13 @@ test_mf_fs_drivers(hid_t fapl) ret += test_mf_fs_gone(fapl_new, fcpl); ret += test_mf_fs_persist(fapl_new, fcpl); - h5_cleanup(FILENAME, fapl_new); + h5_cleanup(FILENAME, fapl_new); /* CORE */ HDputs("Testing free-space managers with core driver"); /* create fapl to be a "core" file */ - if((fapl_new = H5Pcopy(new_format?fapl2:fapl)) < 0) + if((fapl_new = H5Pcopy(new_format?fapl2:fapl)) < 0) FAIL_STACK_ERROR if(H5Pset_fapl_core(fapl_new, (size_t)CORE_INCREMENT, TRUE) < 0) FAIL_STACK_ERROR @@ -6741,7 +6741,7 @@ test_mf_fs_drivers(hid_t fapl) ret += test_mf_fs_gone(fapl_new, fcpl); ret += test_mf_fs_persist(fapl_new, fcpl); - h5_cleanup(FILENAME, fapl_new); + h5_cleanup(FILENAME, fapl_new); /* FAMILY */ HDputs("Testing free-space managers with family driver"); @@ -6753,7 +6753,7 @@ test_mf_fs_drivers(hid_t fapl) ret += test_mf_fs_persist(fapl_new, fcpl); - h5_cleanup(FILENAME, fapl_new); + h5_cleanup(FILENAME, fapl_new); /* SPLIT */ HDputs("Testing free-space managers with split driver"); @@ -6766,27 +6766,27 @@ test_mf_fs_drivers(hid_t fapl) ret += test_mf_fs_persist(fapl_new, fcpl); ret += test_mf_fs_split(fapl_new, fcpl); - h5_cleanup(FILENAME, fapl_new); + h5_cleanup(FILENAME, fapl_new); /* MULTI */ HDputs("Testing free-space managers with multi driver"); MULTI_SETUP(memb_map, memb_fapl, memb_name, memb_addr, sv) - if((fapl_new = H5Pcopy(new_format?fapl2:fapl)) < 0) + if((fapl_new = H5Pcopy(new_format?fapl2:fapl)) < 0) FAIL_STACK_ERROR if(H5Pset_fapl_multi(fapl_new, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0) TEST_ERROR; ret += test_mf_fs_multi(fapl_new, fcpl); - h5_cleanup(FILENAME, fapl_new); + h5_cleanup(FILENAME, fapl_new); } /* end for new_format */ - if (H5Pclose(fcpl) < 0) + if (H5Pclose(fcpl) < 0) FAIL_STACK_ERROR - if (H5Pclose(fapl2) < 0) + if (H5Pclose(fapl2) < 0) FAIL_STACK_ERROR return(ret); @@ -6827,7 +6827,7 @@ test_filespace_strategy_threshold(hid_t fapl_new) /* Create file-creation template */ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) FAIL_STACK_ERROR - + /* Set default file space information */ if(H5Pset_file_space(fcpl, fs_type, fs_threshold) < 0) FAIL_STACK_ERROR @@ -6864,14 +6864,14 @@ test_filespace_strategy_threshold(hid_t fapl_new) FAIL_STACK_ERROR /* Retrieve the total amount of free space and # of free-space sections */ - if(f->shared->fs_man[type] && + if(f->shared->fs_man[type] && H5FS_sect_stats(f->shared->fs_man[type], &saved_tot_space, &saved_tot_sect_count) < 0) FAIL_STACK_ERROR /* H5F_FILE_SPACE_AGGR_VFD and H5F_FILE_SPACE_VFD: should not have free-space manager */ if(fs_type > H5F_FILE_SPACE_ALL && f->shared->fs_man[type]) TEST_ERROR - + /* Close the file */ if(H5Fclose(file) < 0) FAIL_STACK_ERROR @@ -6904,7 +6904,7 @@ test_filespace_strategy_threshold(hid_t fapl_new) TEST_ERROR /* Retrieve block #5 from H5FD_MEM_SUPER free-space manager */ - if(HADDR_UNDEF == + if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE5))) FAIL_STACK_ERROR @@ -6929,7 +6929,7 @@ test_filespace_strategy_threshold(hid_t fapl_new) /* Closing */ if(H5Fclose(file) < 0) FAIL_STACK_ERROR - if(H5Pclose(fcpl) < 0) + if(H5Pclose(fcpl) < 0) FAIL_STACK_ERROR } /* end for fs_type */ @@ -6947,7 +6947,7 @@ error: } /* test_filespace_strategy_threshold() */ /* - * Verify section is merged/shrunk away for + * Verify section is merged/shrunk away for * H5F_FILE_SPACE_ALL_PERSIST and H5F_FILE_SPACE_ALL strategy. */ static unsigned @@ -7063,7 +7063,7 @@ test_filespace_gone(hid_t fapl_new) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - if(H5Pclose(fcpl) < 0) + if(H5Pclose(fcpl) < 0) FAIL_STACK_ERROR } /* end for fs_type */ @@ -7100,7 +7100,7 @@ test_filespace_drivers(hid_t fapl) if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR /* Set the "use the latest version of the format" bounds for creating objects in the file */ - if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) TEST_ERROR /* Test with old and new format */ @@ -7141,7 +7141,7 @@ test_filespace_drivers(hid_t fapl) HDputs("Testing file space management with core driver"); /* create fapl to be a "core" file */ - if((fapl_new = H5Pcopy(new_format?fapl2:fapl)) < 0) + if((fapl_new = H5Pcopy(new_format?fapl2:fapl)) < 0) FAIL_STACK_ERROR if(H5Pset_fapl_core(fapl_new, (size_t)CORE_INCREMENT, TRUE) < 0) FAIL_STACK_ERROR @@ -7183,7 +7183,7 @@ test_filespace_drivers(hid_t fapl) MULTI_SETUP(memb_map, memb_fapl, memb_name, memb_addr, sv) - if((fapl_new = H5Pcopy(new_format?fapl2:fapl)) < 0) + if((fapl_new = H5Pcopy(new_format?fapl2:fapl)) < 0) TEST_ERROR if(H5Pset_fapl_multi(fapl_new, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0) TEST_ERROR; @@ -7195,7 +7195,7 @@ test_filespace_drivers(hid_t fapl) } /* end for new_format */ - if (H5Pclose(fapl2) < 0) + if (H5Pclose(fapl2) < 0) FAIL_STACK_ERROR return(ret); @@ -7294,7 +7294,7 @@ main(void) /* tests for file space management */ nerrors += test_filespace_drivers(fapl); - if (H5Pclose(new_fapl) < 0) + if (H5Pclose(new_fapl) < 0) FAIL_STACK_ERROR h5_cleanup(FILENAME, fapl); diff --git a/test/mtime.c b/test/mtime.c index 741f09a..cc04e42 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -23,6 +23,7 @@ * working properly. */ #include "h5test.h" +#include "H5srcdir.h" const char *FILENAME[] = { "mtime", @@ -131,14 +132,8 @@ main(void) TESTING("accessing old modification time messages"); { - char testfile[512]=""; - char *srcdir = HDgetenv("srcdir"); + const char *testfile = H5_get_srcdir_filename(TESTFILE1); /* Corrected test file name */ - if(srcdir && ((HDstrlen(srcdir) + strlen(TESTFILE1) + 1) < sizeof(testfile))){ - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, TESTFILE1); file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); if(file >= 0){ if(H5Oget_info_by_name(file, "/Dataset1", &oi1, H5P_DEFAULT) < 0) @@ -167,14 +162,8 @@ main(void) TESTING("accessing new modification time messages"); { - char testfile[512]=""; - char *srcdir = HDgetenv("srcdir"); + const char *testfile = H5_get_srcdir_filename(TESTFILE2); /* Corrected test file name */ - if(srcdir && ((HDstrlen(srcdir) + strlen(TESTFILE2) + 1) < sizeof(testfile))){ - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, TESTFILE2); file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); if(file >= 0){ if(H5Oget_info_by_name(file, "/Dataset1", &oi2, H5P_DEFAULT) < 0) diff --git a/test/ntypes.c b/test/ntypes.c index 6efabc6..781dfef 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -2401,7 +2401,7 @@ test_refer_dtype2(hid_t file) PASSED(); return 0; -error: +error: /* Free memory buffers */ if(dwbuf) HDfree(dwbuf); @@ -2546,7 +2546,7 @@ test_bitfield_dtype(hid_t file) if((space = H5Screate_simple(1, &nelmts, NULL)) < 0) TEST_ERROR; /* Create and write to dataset1 with a unsigned char buffer */ - if((dset1 = H5Dcreate2(file, DSET1_BITFIELD_NAME, type, space, H5P_DEFAULT, H5P_DEFAULT, + if((dset1 = H5Dcreate2(file, DSET1_BITFIELD_NAME, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR; for(i = 0; i < BITFIELD_ENUMB*sizeof(int); i++) @@ -2556,7 +2556,7 @@ test_bitfield_dtype(hid_t file) if(H5Dclose(dset1) < 0) TEST_ERROR; /* Create and write to dataset2 with a unsigned int buffer */ - if((dset2 = H5Dcreate2(file, DSET2_BITFIELD_NAME, type, space, H5P_DEFAULT, H5P_DEFAULT, + if((dset2 = H5Dcreate2(file, DSET2_BITFIELD_NAME, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR; for(i = 0; i < BITFIELD_ENUMB; i++) @@ -2587,7 +2587,7 @@ test_bitfield_dtype(hid_t file) H5_FAILED(); printf(" Read different values than written.\n"); printf(" At index %d\n", i); - TEST_ERROR; + TEST_ERROR; } p++; } @@ -2612,14 +2612,14 @@ test_bitfield_dtype(hid_t file) H5_FAILED(); printf(" Read different values than written.\n"); printf(" At index %d\n", i); - TEST_ERROR; + TEST_ERROR; } } if(H5Tclose(dtype) < 0) TEST_ERROR; if(H5Tclose(native_type) < 0) TEST_ERROR; if(H5Dclose(dataset2) < 0) TEST_ERROR; - + PASSED(); return 0; diff --git a/test/objcopy.c b/test/objcopy.c index 493274a..b8579a8 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -22,6 +22,7 @@ #include #include "h5test.h" +#include "H5srcdir.h" /* * This file needs to access private information from the H5S package. @@ -109,8 +110,11 @@ const char *FILENAME[] = { #define NAME_LINK_SOFT "/g_links/soft_link_to_dataset_simple" #define NAME_LINK_SOFT2 "/g_links2/soft_link_to_dataset_simple" #define NAME_LINK_EXTERN "/g_links/external_link_to_dataset_simple" +#define NAME_LINK_EXTERN2 "/g_links2/external_link_to_dataset_simple" #define NAME_LINK_SOFT_DANGLE "/g_links/soft_link_to_nowhere" #define NAME_LINK_SOFT_DANGLE2 "/g_links2/soft_link_to_nowhere" +#define NAME_LINK_EXTERN_DANGLE "/g_links/external_link_to_nowhere" +#define NAME_LINK_EXTERN_DANGLE2 "/g_links2/external_link_to_nowhere" #define NAME_OLD_FORMAT "/dset1" #define NAME_BUF_SIZE 1024 @@ -5297,21 +5301,32 @@ error: * Friday, September 30, 2005 * * Modifications: + * Neil Fortner + * Tuesday, February 16, 2010 + * Modified test to test flags for expanding soft and external + * links. * *------------------------------------------------------------------------- */ static int test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) { - hid_t fid_src = -1, fid_dst = -1; /* File IDs */ + hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ - hid_t did = -1; /* Dataset ID */ + hid_t did = -1, did2 = -1; /* Dataset ID */ hid_t gid = -1, gid2 = -1; /* Group IDs */ + hid_t plid = -1; /* Object copy plist ID */ hsize_t dim2d[2]; + hsize_t dim1d[1]; + H5L_info_t linfo; int buf[DIM_SIZE_1][DIM_SIZE_2]; int i, j; + unsigned expand_soft; + unsigned expand_ext; + unsigned copy_options; char src_filename[NAME_BUF_SIZE]; char dst_filename[NAME_BUF_SIZE]; + char ext_filename[NAME_BUF_SIZE]; TESTING("H5Ocopy(): group with links"); @@ -5323,6 +5338,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* Initialize the filenames */ h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[2], fapl, ext_filename, sizeof ext_filename); /* Reset file address checking info */ addr_reset(); @@ -5330,11 +5346,16 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* create source file */ if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR - /* create group at the SRC file */ + /* create file to hold external dataset */ + if((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + + /* create groups at the SRC file. Group 2 will hold dangling links. */ if((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if((gid2 = H5Gcreate2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* attach attributes to the group */ + /* attach attributes to the groups */ if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR + if(test_copy_attach_attributes(gid2, H5T_NATIVE_INT) < 0) TEST_ERROR /* Set dataspace dimensions */ dim2d[0]=DIM_SIZE_1; @@ -5353,57 +5374,162 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR + /* Now create a 1-D dataset in an external file */ + /* Set dataspace dimensions */ + dim1d[0]=DIM_SIZE_2; + + /* create dataspace */ + if((sid = H5Screate_simple(1, dim1d, NULL)) < 0) TEST_ERROR + + /* add a dataset to the external file */ + if((did = H5Dcreate2(fid_ext, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR + + /* close dataspace */ + if(H5Sclose(sid) < 0) TEST_ERROR + + /* close the dataset */ + if(H5Dclose(did) < 0) TEST_ERROR + /* make a hard link to the dataset */ if(H5Lcreate_hard(fid_src, NAME_LINK_DATASET, H5L_SAME_LOC, NAME_LINK_HARD, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* make a soft link to the dataset */ if(H5Lcreate_soft(NAME_LINK_DATASET, fid_src, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - /* make a soft link to nowhere */ - if(H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + /* make an external link to the external dataset */ + if(H5Lcreate_external(ext_filename, NAME_DATASET_SIMPLE, fid_src, NAME_LINK_EXTERN, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* make a dangling soft link */ + if(H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* make a dangling external link */ - if(H5Lcreate_external("filename", "obj_name", fid_src, NAME_LINK_EXTERN, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - /* close the group */ + /* close the groups */ if(H5Gclose(gid) < 0) TEST_ERROR + if(H5Gclose(gid2) < 0) TEST_ERROR - /* close the SRC file */ + /* close the SRC and EXT files */ if(H5Fclose(fid_src) < 0) TEST_ERROR + if(H5Fclose(fid_ext) < 0) TEST_ERROR - /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + /* Create the object copy plist */ + if((plid = H5Pcreate(H5P_OBJECT_COPY)) < 0) TEST_ERROR - /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + /* Loop over all configurations (expand soft/external links) */ + for(expand_soft=0; expand_soft<=1; expand_soft++) { + for(expand_ext=0; expand_ext<=1; expand_ext++) { + /* Set the correct copy options on the obj copy plist */ + copy_options = 0; + if(expand_soft) + copy_options |= H5O_COPY_EXPAND_SOFT_LINK_FLAG; + if(expand_ext) + copy_options |= H5O_COPY_EXPAND_EXT_LINK_FLAG; + if(H5Pset_copy_object(plid, copy_options) < 0) TEST_ERROR - /* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */ - if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + /* open the source file with read-only */ + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR - /* copy the group from SRC to DST */ - if(H5Ocopy(fid_src, NAME_GROUP_LINK, fid_dst, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + /* create destination file */ + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR - /* open the group for copy */ - if((gid = H5Gopen2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */ + if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* open the destination group */ - if((gid2 = H5Gopen2(fid_dst, NAME_GROUP_LINK, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* copy the group from SRC to DST */ + if(H5Ocopy(fid_src, NAME_GROUP_LINK, fid_dst, NAME_GROUP_LINK, plid, H5P_DEFAULT) < 0) TEST_ERROR - /* Check if the groups are equal */ - if(compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) TEST_ERROR + /* open the group for copy */ + if((gid = H5Gopen2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* close the destination group */ - if(H5Gclose(gid2) < 0) TEST_ERROR + /* open the destination group */ + if((gid2 = H5Gopen2(fid_dst, NAME_GROUP_LINK, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* close the source group */ - if(H5Gclose(gid) < 0) TEST_ERROR + /* If expand_soft is set to true, verify that the soft link is now a + * hard link, and compare the expanded dataset, then delete it and + * re-add it as a soft link so compare_groups() works */ + if(expand_soft) { + /* Check link type */ + if(H5Lget_info(fid_dst, NAME_LINK_SOFT, &linfo, H5P_DEFAULT) < 0) TEST_ERROR + if(linfo.type != H5L_TYPE_HARD) + FAIL_PUTS_ERROR("Soft link was not expanded to a hard link") - /* close the SRC file */ - if(H5Fclose(fid_src) < 0) TEST_ERROR + /* Compare datasets */ + if((did = H5Dopen2(fid_src, NAME_LINK_DATASET, H5P_DEFAULT)) < 0) TEST_ERROR + if((did2 = H5Dopen2(fid_dst, NAME_LINK_SOFT, H5P_DEFAULT)) < 0) TEST_ERROR + if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR - /* close the DST file */ - if(H5Fclose(fid_dst) < 0) TEST_ERROR + /* Delete expanded dataset, add soft link */ + if(H5Ldelete(fid_dst, NAME_LINK_SOFT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_soft(NAME_LINK_DATASET, fid_dst, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Close datasets */ + if(H5Dclose(did) < 0) TEST_ERROR + if(H5Dclose(did2) < 0) TEST_ERROR + } /* end if */ + + /* If expand_ext is set to true, verify that the external link is + * now a hard link, and compare the expanded dataset, then delete it + * and re-add it as an external link so compare_groups() works */ + if(expand_ext) { + /* Check link type */ + if(H5Lget_info(fid_dst, NAME_LINK_EXTERN, &linfo, H5P_DEFAULT) < 0) TEST_ERROR + if(linfo.type != H5L_TYPE_HARD) + FAIL_PUTS_ERROR("External link was not expanded to a hard link") + + /* Compare datasets */ + if((fid_ext = H5Fopen(ext_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((did = H5Dopen2(fid_ext, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR + if((did2 = H5Dopen2(fid_dst, NAME_LINK_EXTERN, H5P_DEFAULT)) < 0) TEST_ERROR + if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR + + /* Delete expanded dataset, add external link */ + if(H5Ldelete(fid_dst, NAME_LINK_EXTERN, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external(ext_filename, NAME_DATASET_SIMPLE, fid_dst, NAME_LINK_EXTERN, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Close datasets and external file */ + if(H5Dclose(did) < 0) TEST_ERROR + if(H5Dclose(did2) < 0) TEST_ERROR + if(H5Fclose(fid_ext) < 0) TEST_ERROR + } /* end if */ + + /* Check if the groups are equal */ + if(compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) TEST_ERROR + + /* close the destination group */ + if(H5Gclose(gid2) < 0) TEST_ERROR + + /* close the source group */ + if(H5Gclose(gid) < 0) TEST_ERROR + + /* Now try to copy the group containing the dangling link. They + * should always be copied as the same type of link, never expanded + * to hard links. */ + if(H5Ocopy(fid_src, NAME_GROUP_LINK2, fid_dst, NAME_GROUP_LINK2, plid, H5P_DEFAULT) < 0) TEST_ERROR + + /* Open the original and copied groups */ + if((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0) TEST_ERROR + if((gid2 = H5Gopen2(fid_dst, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0) TEST_ERROR + + /* Compare the groups */ + if(compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) TEST_ERROR + + /* Close groups */ + if(H5Gclose(gid2) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + + /* close the SRC file */ + if(H5Fclose(fid_src) < 0) TEST_ERROR + + /* close the DST file */ + if(H5Fclose(fid_dst) < 0) TEST_ERROR + } /* end for */ + } /* end for */ + + /* Close the object copy plist */ + if(H5Pclose(plid) < 0) TEST_ERROR PASSED(); return 0; @@ -5411,11 +5537,14 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) error: H5E_BEGIN_TRY { H5Sclose(sid); + H5Dclose(did2); H5Dclose(did); H5Gclose(gid2); H5Gclose(gid); + H5Fclose(fid_ext); H5Fclose(fid_dst); H5Fclose(fid_src); + H5Pclose(plid); } H5E_END_TRY; return 1; } /* end test_copy_group_links */ @@ -5584,7 +5713,7 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* Initialize the filenames */ h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); - h5_fixname(FILENAME[2], fapl, ext_filename, sizeof dst_filename); + h5_fixname(FILENAME[2], fapl, ext_filename, sizeof ext_filename); /* Reset file address checking info */ addr_reset(); @@ -6016,19 +6145,11 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t did = -1, did2 = -1; /* Dataset IDs */ - char *srcdir = HDgetenv("srcdir"); /* Where the src code is located */ - char src_filename[NAME_BUF_SIZE] = ""; + const char *src_filename = H5_get_srcdir_filename(FILE_OLD_LAYOUT); /* Corrected test file name */ char dst_filename[NAME_BUF_SIZE]; TESTING("H5Ocopy(): dataset with old layout format"); - /* Generate correct name for source file by prepending the source path */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(FILE_OLD_LAYOUT) + 1) < sizeof(src_filename))) { - HDstrcpy(src_filename, srcdir); - HDstrcat(src_filename, "/"); - } /* end if */ - HDstrcat(src_filename, FILE_OLD_LAYOUT); - /* Initialize the destination filename */ h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); @@ -7317,7 +7438,7 @@ static int test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ - hid_t tid = -1; /* Datatype ID */ + hid_t tid = -1; /* Datatype ID */ hid_t tid2 = -1; /* Datatype ID */ hid_t sid = -1; /* Dataspace ID */ hid_t did = -1; /* Dataset ID */ @@ -7747,7 +7868,7 @@ error: static int test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hbool_t crt_intermediate_grp, const char* test_desciption) { - hid_t fid_src = -1, fid_dst = -1; /* File IDs */ + hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ hid_t did = -1; /* Dataset ID */ hid_t gid=-1, gid2=-1, gid_ref=-1; /* Group IDs */ @@ -7838,6 +7959,45 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hboo if(H5Gclose(gid) < 0) FAIL_STACK_ERROR } /* end if */ + if((flag & H5O_COPY_EXPAND_EXT_LINK_FLAG) > 0) { + char ext_filename[NAME_BUF_SIZE]; + + h5_fixname(FILENAME[2], fapl, ext_filename, sizeof ext_filename); + + /* Create the external file and dataset */ + if((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) TEST_ERROR + if((did = H5Dcreate2(fid_ext, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR + if(H5Dclose(did) < 0) TEST_ERROR + if(H5Fclose(fid_ext) < 0) TEST_ERROR + + /* Create group to copy */ + if(!(flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG)) { + if((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + } /* end if */ + else + if((gid = H5Gopen2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Lcreate_external(ext_filename, NAME_DATASET_SIMPLE, fid_src, NAME_LINK_EXTERN, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + + /* Create group to compare with */ + if(!(flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG)) { + if((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + } /* end if */ + else + if((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0) TEST_ERROR + if((did = H5Dcreate2(fid_src, NAME_LINK_EXTERN2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR + if(H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Dclose(did) < 0) TEST_ERROR + if(H5Gclose(gid) < 0) TEST_ERROR + + /* Close dataspace */ + if(H5Sclose(sid) < 0) TEST_ERROR + } /* end if */ + if((flag & H5O_COPY_EXPAND_REFERENCE_FLAG) > 0) { if((gid_ref = H5Gcreate2(fid_src, NAME_GROUP_REF, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -7898,12 +8058,14 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hboo /* open the destination group */ if((gid2 = H5Gopen2(fid_dst, "/new_g0/new_g00", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - } else if((flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0) { + } else if(((flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0) + || ((flag & H5O_COPY_EXPAND_EXT_LINK_FLAG) > 0)) { if(H5Ocopy(fid_src, NAME_GROUP_LINK, fid_dst, NAME_GROUP_LINK, pid, H5P_DEFAULT) < 0) TEST_ERROR - /* Unlink dataset to copy from original location */ - /* (So group comparison works properly) */ - if(H5Ldelete(fid_src, NAME_DATASET_SUB_SUB, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if((flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0) + /* Unlink dataset to copy from original location */ + /* (So group comparison works properly) */ + if(H5Ldelete(fid_src, NAME_DATASET_SUB_SUB, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* open the group for copy */ if((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR @@ -7972,6 +8134,7 @@ error: H5Gclose(gid); H5Fclose(fid_dst); H5Fclose(fid_src); + H5Fclose(fid_ext); } H5E_END_TRY; return 1; } /* end test_copy_option */ @@ -8111,6 +8274,11 @@ main(void) "H5Ocopy(): with missing groups"); nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_SOFT_LINK_FLAG, FALSE, "H5Ocopy(): expand soft link"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_EXT_LINK_FLAG, + FALSE, "H5Ocopy: expand external link"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, + H5O_COPY_EXPAND_SOFT_LINK_FLAG | H5O_COPY_EXPAND_EXT_LINK_FLAG, + FALSE, "H5Ocopy: expand soft and external links"); nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_SHALLOW_HIERARCHY_FLAG, FALSE, "H5Ocopy(): shallow group copy"); nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG, @@ -8154,7 +8322,6 @@ main(void) } /* TODO: not implemented - nerrors += test_copy_option(my_fapl, H5O_COPY_EXPAND_EXT_LINK_FLAG, FALSE, "H5Ocopy: expand external link"); nerrors += test_copy_mount(my_fapl); */ } /* end for */ diff --git a/test/ohdr.c b/test/ohdr.c index f59dace..5bccf6e 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -17,7 +17,9 @@ * Tuesday, November 24, 1998 */ #include "h5test.h" +#include "H5srcdir.h" #include "H5Iprivate.h" + /* * This file needs to access private datatypes from the H5O package. * This file also needs to access the object header testing code. @@ -48,7 +50,7 @@ const char *FILENAME[] = { * Create an object header with several continuation chunks * Remove a message in the last chunk * The remaining message(s) in the last chunk should be moved forward into the continuation message - * The process will repeat when the continuation message is big enough to hold all the + * The process will repeat when the continuation message is big enough to hold all the * messages in the last chunk. * Result: the number of chunks should be reduced */ @@ -57,7 +59,7 @@ test_cont(char *filename, hid_t fapl) { hid_t file=-1; H5F_t *f = NULL; - H5O_hdr_info_t hdr_info; + H5O_hdr_info_t hdr_info; H5O_loc_t oh_locA, oh_locB; time_t time_new; const char *short_name = "T"; @@ -181,7 +183,7 @@ main(void) /* Display info about testing */ if(b) HDputs("Using new file format:"); - else + else HDputs("Using default file format:"); /* Set the format to use for the file */ @@ -362,20 +364,7 @@ main(void) HDputs("Accessing objects with unknown header messages:"); { hid_t file2; /* File ID for 'bogus' object file */ - char testpath[512] = ""; - char testfile[512] = ""; - char *srcdir = HDgetenv("srcdir"); - - /* Build path to all test files */ - if(srcdir && ((HDstrlen(srcdir) + 2) < sizeof(testpath))) { - HDstrcpy(testpath, srcdir); - HDstrcat(testpath, "/"); - } /* end if */ - - /* Build path to test file */ - if(srcdir && ((HDstrlen(testpath) + HDstrlen(FILE_BOGUS) + 1) < sizeof(testfile))) - HDstrcpy(testfile, testpath); - HDstrcat(testfile, FILE_BOGUS); + const char *testfile = H5_get_srcdir_filename(FILE_BOGUS); TESTING("object with unknown header message and no flags set"); diff --git a/test/set_extent.c b/test/set_extent.c index b4e61b4..9d669a2 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -20,6 +20,8 @@ * Purpose: Tests the H5Dset_extent call */ +#include +#include #include "hdf5.h" #include "h5test.h" @@ -36,6 +38,7 @@ const char *FILENAME[] = { "set_extent3", "set_extent4", "set_extent5", + "set_extent6", NULL }; @@ -43,6 +46,22 @@ const char *FILENAME[] = { #define EXT_FILE_NAME1 "ext1.bin" #define EXT_FILE_NAME2 "ext2.bin" +#define CONFIG_COMPRESS 0x01u +#define CONFIG_FILL 0x02u +#define CONFIG_EARLY_ALLOC 0x04u +#define CONFIG_ALL (CONFIG_COMPRESS + CONFIG_FILL \ + + CONFIG_EARLY_ALLOC) +#define FILL_VALUE -1 +#define DO_RANKS_PRINT_CONFIG(TEST) { \ + printf(" Config:\n"); \ + printf(" Test: %s\n", TEST); \ + printf(" Compression: %s\n", (config & CONFIG_COMPRESS ? "yes" \ + : "no")); \ + printf(" Fill value: %s\n", (do_fillvalue ? "yes" : "no")); \ + printf(" Early allocation: %s\n", (config & CONFIG_EARLY_ALLOC \ + ? "yes" : "no")); \ +} /* end DO_RANKS_PRINT_CONFIG */ + #define RANK1 1 #define RANK2 2 #define RANK3 3 @@ -56,28 +75,36 @@ const char *FILENAME[] = { #define DIME1 7 #define DIME2 7 #define ISTORE_IK 64 +#define RAND4_NITER 100 +#define RAND4_FAIL_DUMP(NDIM_SETS, J, K, L, M) { \ + H5_FAILED(); AT(); \ + test_random_rank4_dump(NDIM_SETS, dim_log, cdims, J, K, L, M); \ + goto error; \ +} /* end RAND4_FAIL_DUMP */ static int do_ranks( hid_t fapl ); static int do_layouts( hid_t fapl ); -static int test_rank1( hbool_t do_compress, - hbool_t do_fill_value, - hbool_t set_istore_k, - H5D_fill_time_t fill_time, - hid_t fapl); -static int test_rank2( hbool_t do_compress, - hbool_t do_fill_value, - hbool_t set_istore_k, - H5D_fill_time_t fill_time, - hid_t fapl); -static int test_rank3( hbool_t do_compress, - hbool_t do_fill_value, - hbool_t set_istore_k, - H5D_fill_time_t fill_time, - hid_t fapl); +static int test_rank1( hid_t fapl, + hid_t dcpl, + hbool_t do_fill_value, + hbool_t set_istore_k); +static int test_rank2( hid_t fapl, + hid_t dcpl, + hbool_t do_fill_value, + hbool_t set_istore_k); +static int test_rank3( hid_t fapl, + hid_t dcpl, + hbool_t do_fill_value, + hbool_t set_istore_k); +static int test_random_rank4( hid_t fapl, + hid_t dcpl, + hbool_t do_fillvalue); static int test_external( hid_t fapl ); static int test_layouts( H5D_layout_t layout, hid_t fapl ); +static void test_random_rank4_dump( unsigned ndim_sets, hsize_t dim_log[][4], + hsize_t cdims[4], int j, int k, int l, int m ); /*------------------------------------------------------------------------- * main @@ -92,6 +119,9 @@ int main( void ) hbool_t chunk_cache; /* Whether to enable chunk caching */ int nerrors = 0; + /* Initialize random number seed */ + HDsrandom((unsigned)HDtime(NULL)); + h5_reset(); fapl = h5_fileaccess(); @@ -152,7 +182,7 @@ int main( void ) if(H5Pclose(fapl2) < 0) TEST_ERROR h5_cleanup(FILENAME, fapl); - + HDremove(EXT_FILE_NAME1); HDremove(EXT_FILE_NAME2); @@ -177,148 +207,140 @@ error: static int do_ranks( hid_t fapl ) { - hbool_t do_compress = 0; - hbool_t do_fillvalue = 0; - hbool_t set_istore_k = 0; - - - TESTING_2("with fill value, no compression"); - - do_fillvalue = 1; - - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) - { - goto error; - } - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) - { - goto error; - } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) - { - goto error; - } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) - { - goto error; - } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) - { - goto error; - } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) - { - goto error; - } - - - - PASSED(); - - - TESTING_2("no fill value, no compression"); + hbool_t do_fillvalue = 0; + hid_t dcpl = -1; + int fillvalue = FILL_VALUE; + unsigned config; - do_fillvalue = 0; + TESTING_2("datasets with ranks 1 to 4 (all configurations)"); - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) - { - goto error; - } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) - { - goto error; - } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) - { - goto error; - } - - - - PASSED(); - - TESTING_2("with fill value, with compression"); + /* Loop over different configurations for tests */ + for(config=0; config<=CONFIG_ALL; config++) { + /* Create DCPL and add appropriate settings */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + if(config & CONFIG_COMPRESS) { #ifdef H5_HAVE_FILTER_DEFLATE + if(H5Pset_deflate(dcpl, 9) < 0) + TEST_ERROR +#else /* H5_HAVE_FILTER_DEFLATE */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + continue; +#endif /* H5_HAVE_FILTER_DEFLATE */ + } /* end if */ - do_compress = 1; - do_fillvalue = 1; - - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) - { - goto error; - } - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) - { - goto error; - } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) - { - goto error; - } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) - { - goto error; - } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) - { - goto error; - } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0) - { - goto error; - } - - - PASSED(); -#else - SKIPPED(); -#endif - - TESTING_2("no fill value, with compression"); + if(config & CONFIG_FILL) { + do_fillvalue = TRUE; + if(H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue) < 0) + TEST_ERROR + } /* end if */ + else + do_fillvalue = FALSE; -#ifdef H5_HAVE_FILTER_DEFLATE + if(config & CONFIG_EARLY_ALLOC) + if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) + TEST_ERROR - do_fillvalue = 0; + /* Run tests */ + if(do_fillvalue) { + unsigned ifset; + + /* Iterate over different fill times */ + for(ifset=0; ifset<=1; ifset++) { + if(ifset) { + if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0) + TEST_ERROR + } /* end if */ + else + if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) + TEST_ERROR + + if(test_rank1(fapl, dcpl, do_fillvalue, FALSE) < 0) + { + DO_RANKS_PRINT_CONFIG("Rank 1") + printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" + : "H5D_FILL_TIME_ALLOC")); + goto error; + } /* end if */ + if(test_rank2(fapl, dcpl, do_fillvalue, FALSE) < 0) + { + DO_RANKS_PRINT_CONFIG("Rank 2") + printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" + : "H5D_FILL_TIME_ALLOC")); + goto error; + } /* end if */ + if(test_rank3(fapl, dcpl, do_fillvalue, FALSE) < 0) + { + DO_RANKS_PRINT_CONFIG("Rank 3") + printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" + : "H5D_FILL_TIME_ALLOC")); + goto error; + } /* end if */ + if(test_rank2(fapl, dcpl, do_fillvalue, TRUE) < 0) + { + DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree") + printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" + : "H5D_FILL_TIME_ALLOC")); + goto error; + } /* end if */ + } /* end for */ + } /* end if */ + else { + /* These tests expect fill values to be written even if there is no + * fill value defined */ + if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) + TEST_ERROR - if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) - { - goto error; - } - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) - { - goto error; - } - if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ERROR, fapl ) < 0) - { - goto error; - } - - PASSED(); -#else - SKIPPED(); -#endif + if(test_rank1(fapl, dcpl, do_fillvalue, FALSE) < 0) + { + DO_RANKS_PRINT_CONFIG("Rank 1") + goto error; + } /* end if */ + if(test_rank2(fapl, dcpl, do_fillvalue, FALSE) < 0) + { + DO_RANKS_PRINT_CONFIG("Rank 2") + goto error; + } /* end if */ + if(test_rank3(fapl, dcpl, do_fillvalue, FALSE) < 0) + { + DO_RANKS_PRINT_CONFIG("Rank 3") + goto error; + } /* end if */ + if(test_rank2(fapl, dcpl, do_fillvalue, TRUE) < 0) + { + DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree") + goto error; + } /* end if */ + } /* end else */ - TESTING_2("with non-default indexed storage B-tree"); + /* The rank 4 test expects the fill value to be written only if + * defined */ + if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0) + TEST_ERROR - do_fillvalue = 1; - set_istore_k = 1; + if(test_random_rank4(fapl, dcpl, do_fillvalue) < 0) { + DO_RANKS_PRINT_CONFIG("Randomized rank 4") + goto error; + } /* end if */ - if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0) - { - goto error; - } - + /* Close dcpl */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + } /* end for */ PASSED(); - - + return 0; - - + error: + H5E_BEGIN_TRY { + H5Pclose(dcpl); + } H5E_END_TRY + return -1; -} +} /* end do_ranks */ /*------------------------------------------------------------------------- @@ -327,23 +349,23 @@ error: */ static int do_layouts( hid_t fapl ) { - - TESTING_2("storage layout use"); - + + TESTING("storage layout use"); + if (test_layouts( H5D_COMPACT, fapl ) < 0) { goto error; - } - + } + if (test_layouts( H5D_CONTIGUOUS, fapl ) < 0) { goto error; - } - + } + PASSED(); - + return 0; - + error: return -1; } @@ -353,270 +375,240 @@ error: *------------------------------------------------------------------------- */ -static int test_rank1( hbool_t do_compress, - hbool_t do_fill_value, - hbool_t set_istore_k, - H5D_fill_time_t fill_time, - hid_t fapl) +static int test_rank1( hid_t fapl, + hid_t dcpl, + hbool_t do_fill_value, + hbool_t set_istore_k) { - hid_t fid=-1; + hid_t fid=-1; hid_t did=-1; hid_t sid=-1; - hid_t dcpl=-1; + hid_t my_dcpl=-1; hid_t fcpl; - hsize_t dims_o[RANK1] = {DIM0}; /* original dimensions */ - hsize_t dims_s[RANK1] = {DIMS0}; /* shrinking dimensions */ - hsize_t dims_e[RANK1] = {DIME0}; /* extended dimensions */ - hsize_t dims_c[RANK1] = {2}; /* chunk dimensions */ - hsize_t dims_r[RANK1]; /* read dimensions */ + hsize_t dims_o[RANK1] = {DIM0}; /* original dimensions */ + hsize_t dims_s[RANK1] = {DIMS0}; /* shrinking dimensions */ + hsize_t dims_e[RANK1] = {DIME0}; /* extended dimensions */ + hsize_t dims_c[RANK1] = {2}; /* chunk dimensions */ + hsize_t dims_r[RANK1]; /* read dimensions */ hsize_t maxdims[RANK1] = {H5S_UNLIMITED}; int buf_o[DIM0]; int buf_s[DIMS0]; int buf_e[DIME0]; int buf_r[DIM0]; int i; - int fillvalue = 1; - int comp_value; + int comp_value; char filename[NAME_BUF_SIZE]; - + if ( do_fill_value ) { - comp_value = fillvalue; + comp_value = FILL_VALUE; } else { comp_value = 0; } - + for( i = 0; i < DIM0; i++ ) { - + buf_o[i] = 2; } /* create a file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { - goto error; + TEST_ERROR } - + if ( set_istore_k ) { /* set non-default indexed storage B-tree internal 'K' value */ - if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0) + if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0) { - goto error; + TEST_ERROR } - + } /* create a new file */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) + if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { - goto error; + TEST_ERROR } /* close property list */ - if(H5Pclose(fcpl) < 0) + if(H5Pclose(fcpl) < 0) { - goto error; + TEST_ERROR } - + /* create the data space with unlimited dimensions. */ - if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0) + if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0) { - goto error; + TEST_ERROR } - + /* modify dataset creation properties, i.e. enable chunking. */ - if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0) + if ((my_dcpl = H5Pcopy (dcpl)) < 0) { - goto error; + TEST_ERROR } - if (H5Pset_chunk(dcpl, RANK1, dims_c) < 0) + if (H5Pset_chunk(my_dcpl, RANK1, dims_c) < 0) { - goto error; + TEST_ERROR } - if ( do_fill_value ) - { - if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue) < 0) - { - goto error; - } - if(H5Pset_fill_time(dcpl, fill_time) < 0) - { - goto error; - } - } - else - { - - if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) - { - goto error; - } - - } - if (do_compress) - { - if(H5Pset_deflate(dcpl, 9) < 0) - { - goto error; - } - } - /*------------------------------------------------------------------------- * create, write dataset *------------------------------------------------------------------------- */ - + /* create a dataset */ - if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0) { - goto error; + TEST_ERROR } - + /* write */ - if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) + if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) { - goto error; + TEST_ERROR } - - + + #if defined (H5_SET_EXTENT_DEBUG) printf("\n"); for (i = 0; i < (int)dims_o[0]; i++ ) { - + printf("%d ", buf_o[i]); - + } printf("\n"); -#endif +#endif + - if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /*------------------------------------------------------------------------- * set new dimensions for the array; expand it *------------------------------------------------------------------------- */ - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_e) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - - + + /* check dimensions */ for( i = 0; i < RANK1; i++ ) { - if (dims_r[i] != dims_e[i]) - goto error; + if (dims_r[i] != dims_e[i]) + TEST_ERROR } - + /* read */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0) - goto error; + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0) + TEST_ERROR + + - - #if defined (H5_SET_EXTENT_DEBUG) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) { - + printf("%d ", buf_e[i]); - + } printf("\n"); -#endif +#endif + + + - - - /* compare the read array with the expanded array */ for (i = 0; i < (int)dims_r[0]; i++ ) { - - if ( i >= DIM0 ) + + if ( i >= DIM0 ) { - if(buf_e[i] != comp_value) + if(buf_e[i] != comp_value) { printf("buf_e[%d] = %d\n", i, buf_e[i]); printf("value = %d\n", comp_value); - goto error; - } - } - else + TEST_ERROR + } + } + else { - if(buf_e[i] != buf_o[i]) - goto error; + if(buf_e[i] != buf_o[i]) + TEST_ERROR } } - - - - + + + + /*------------------------------------------------------------------------- - * shrink + * shrink * *------------------------------------------------------------------------- */ - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_s) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /* check dimensions */ for( i = 0; i < RANK1; i++ ) { - if (dims_r[i] != dims_s[i]) - goto error; + if (dims_r[i] != dims_s[i]) + TEST_ERROR } @@ -624,143 +616,143 @@ static int test_rank1( hbool_t do_compress, /* for this case we close and reopen file */ if ( set_istore_k ) { - - if (H5Dclose(did) < 0) + + if (H5Dclose(did) < 0) { - goto error; + TEST_ERROR } if (H5Fclose(fid) < 0) { - goto error; + TEST_ERROR } - if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0) + if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0) { - goto error; + TEST_ERROR } - - if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0) + + if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0) { - goto error; + TEST_ERROR } - - - + + + } - - + + /*------------------------------------------------------------------------- * read *------------------------------------------------------------------------- */ - + /* read */ - if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0) + if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0) { - goto error; + TEST_ERROR } - + #if defined (H5_SET_EXTENT_DEBUG) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) { - + printf("%d ", buf_s[i]); } printf("\n"); -#endif +#endif + + - - /* compare the read array with the shrinked array */ for( i = 0; i < (int)dims_r[0]; i++ ) { - - if ( buf_s[i] != buf_o[i] ) + + if ( buf_s[i] != buf_o[i] ) { printf("buf_s[%d] = %d\n", i, buf_s[i]); printf("buf_o[%d] = %d\n", i, buf_o[i]); - goto error; - } + TEST_ERROR + } } - - + + /*------------------------------------------------------------------------- * expand it back to original size *------------------------------------------------------------------------- */ - + /* set new dimensions for the array */ if (H5Dset_extent(did, dims_o) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ - if ((sid = H5Dget_space(did)) < 0) + if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions. */ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - - + + /* check dimensions */ for( i = 0; i < RANK1; i++ ) { - if (dims_r[i] != dims_o[i]) - goto error; + if (dims_r[i] != dims_o[i]) + TEST_ERROR } - - + + /* read */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0) - goto error; - + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0) + TEST_ERROR + #if defined (H5_SET_EXTENT_DEBUG) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) { - + printf("%d ", buf_r[i]); - + } printf("\n"); -#endif +#endif + - /* compare the read array with the original array */ for (i = 0; i < (int)dims_r[0]; i++ ) { - - if (i >= DIMS0 ) + + if (i >= DIMS0 ) { - if(buf_r[i] != comp_value) + if(buf_r[i] != comp_value) { printf("buf_r[%d] = %d\n", i, buf_r[i] ); printf("value = %d\n", comp_value); - goto error; - } - } - else + TEST_ERROR + } + } + else { - if(buf_r[i] != buf_o[i]) - goto error; + if(buf_r[i] != buf_o[i]) + TEST_ERROR } } - + /*------------------------------------------------------------------------- * shrink to 0 @@ -769,119 +761,119 @@ static int test_rank1( hbool_t do_compress, */ dims_s[0] = 0; - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_s) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /* check dimensions */ for( i = 0; i < RANK1; i++ ) { - if (dims_r[i] != dims_s[i]) - goto error; - } - + if (dims_r[i] != dims_s[i]) + TEST_ERROR + } + /*------------------------------------------------------------------------- * close dataset *------------------------------------------------------------------------- */ - - if (H5Dclose(did) < 0) + + if (H5Dclose(did) < 0) { - goto error; + TEST_ERROR } - - - - - + + + + + /*------------------------------------------------------------------------- * test a dataset with non initialized chunks *------------------------------------------------------------------------- */ - - - if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0) + + + if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0) { - goto error; + TEST_ERROR } - if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0) { - goto error; + TEST_ERROR } /* set new dimensions for the array */ dims_o[ 0 ] = 0; - if (H5Dset_extent( did , dims_o ) < 0) + if (H5Dset_extent( did , dims_o ) < 0) { - goto error; + TEST_ERROR } - if (H5Dclose(did) < 0) + if (H5Dclose(did) < 0) { - goto error; + TEST_ERROR } if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - - - + + + /*------------------------------------------------------------------------- * close property list *------------------------------------------------------------------------- */ - - - if (H5Pclose(dcpl) < 0) + + + if (H5Pclose(my_dcpl) < 0) { - goto error; + TEST_ERROR } if (H5Fclose( fid ) < 0) { - goto error; + TEST_ERROR } return 0; - - - + + + error: - - H5E_BEGIN_TRY + + H5E_BEGIN_TRY { H5Dclose( did ); H5Sclose( sid ); - H5Pclose( dcpl ); + H5Pclose( my_dcpl ); H5Pclose( fcpl ); H5Fclose( fid ); } H5E_END_TRY; return -1; - + } /*------------------------------------------------------------------------- @@ -889,43 +881,41 @@ error: *------------------------------------------------------------------------- */ -static int test_rank2( hbool_t do_compress, - hbool_t do_fill_value, - hbool_t set_istore_k, - H5D_fill_time_t fill_time, - hid_t fapl) +static int test_rank2( hid_t fapl, + hid_t dcpl, + hbool_t do_fill_value, + hbool_t set_istore_k) { - hid_t fid=-1; + hid_t fid=-1; hid_t did=-1; hid_t sid=-1; - hid_t dcpl=-1; + hid_t my_dcpl=-1; hid_t fcpl; - hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */ - hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */ - hsize_t dims_e[RANK2] = {DIME0,DIME1}; /* extended dimensions */ - hsize_t dims_c[RANK2] = {2,2}; /* chunk dimensions */ - hsize_t dims_r[RANK2]; /* read dimensions */ + hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */ + hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */ + hsize_t dims_e[RANK2] = {DIME0,DIME1}; /* extended dimensions */ + hsize_t dims_c[RANK2] = {2,2}; /* chunk dimensions */ + hsize_t dims_r[RANK2]; /* read dimensions */ hsize_t maxdims[RANK2] = {H5S_UNLIMITED,H5S_UNLIMITED}; int buf_o[DIM0][DIM1]; int buf_s[DIMS0][DIMS1]; int buf_e[DIME0][DIME1]; int buf_r[DIM0][DIM1]; int i, j; - int fillvalue = 1; - int comp_value; + int comp_value; char filename[NAME_BUF_SIZE]; - + if ( do_fill_value ) { - comp_value = fillvalue; + comp_value = FILL_VALUE; } else { comp_value = 0; } - + for( i = 0; i < DIM0; i++ ) { for( j = 0; j < DIM1; j++ ) @@ -935,79 +925,51 @@ static int test_rank2( hbool_t do_compress, } /* create a file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { - goto error; + TEST_ERROR } - + if ( set_istore_k ) { /* set non-default indexed storage B-tree internal 'K' value */ - if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0) + if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0) { - goto error; + TEST_ERROR } - + } - + /* create a new file */ h5_fixname(FILENAME[1], fapl, filename, sizeof filename); - if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) + if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { - goto error; + TEST_ERROR } - - + + /* create the data space with unlimited dimensions. */ - if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0) + if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0) { - goto error; + TEST_ERROR } - + /* modify dataset creation properties, i.e. enable chunking. */ - if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0) + if ((my_dcpl = H5Pcopy (dcpl)) < 0) { - goto error; + TEST_ERROR } - if (H5Pset_chunk(dcpl, RANK2, dims_c) < 0) + if (H5Pset_chunk(my_dcpl, RANK2, dims_c) < 0) { - goto error; + TEST_ERROR } - if ( do_fill_value ) - { - if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue) < 0) - { - goto error; - } - if(H5Pset_fill_time(dcpl, fill_time) < 0) - { - goto error; - } - } - else - { - - if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) - { - goto error; - } - - } - if (do_compress) - { - if(H5Pset_deflate(dcpl, 9) < 0) - { - goto error; - } - } - /*------------------------------------------------------------------------- * Procedure 1 * a. Write an array AxB. These are the dimensions for creating the dataset * b. Define a greater array CxD where C > A and D > B - * c. Read data back + * c. Read data back * d. Verify if new dimensions are C and D * e. Verify if data from A to C and B to D is what it is to be expected * @@ -1020,20 +982,20 @@ static int test_rank2( hbool_t do_compress, * *------------------------------------------------------------------------- */ - + /* create a dataset */ - if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0) { - goto error; + TEST_ERROR } - + /* write */ - if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) + if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) { - goto error; + TEST_ERROR } - - + + #if defined (H5_SET_EXTENT_DEBUG2) printf("\n"); for (i = 0; i < (int)dims_o[0]; i++ ) @@ -1044,15 +1006,15 @@ static int test_rank2( hbool_t do_compress, } printf("\n"); } -#endif +#endif + - if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /*------------------------------------------------------------------------- * set new dimensions for the array; expand it * data is now, extended space was initialized with fill value or default value @@ -1067,44 +1029,44 @@ static int test_rank2( hbool_t do_compress, * *------------------------------------------------------------------------- */ - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_e) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - - + + /* check dimensions */ for( i = 0; i < RANK2; i++ ) { - if (dims_r[i] != dims_e[i]) - goto error; + if (dims_r[i] != dims_e[i]) + TEST_ERROR } - + /* read */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0) - goto error; + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0) + TEST_ERROR + + - - #if defined (H5_SET_EXTENT_DEBUG2) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -1115,41 +1077,41 @@ static int test_rank2( hbool_t do_compress, } printf("\n"); } -#endif +#endif + + + - - - /* compare the read array with the expanded array */ for (i = 0; i < (int)dims_r[0]; i++ ) { for (j = 0; j < (int)dims_r[1]; j++ ) { - if ( i >= DIM0 || j >= DIM1 ) + if ( i >= DIM0 || j >= DIM1 ) { - if(buf_e[i][j] != comp_value) + if(buf_e[i][j] != comp_value) { printf("buf_e[%d][%d] = %d\n", i, j, buf_e[i][j]); printf("value = %d\n", comp_value); - goto error; - } - } - else + TEST_ERROR + } + } + else { - if(buf_e[i][j] != buf_o[i][j]) - goto error; + if(buf_e[i][j] != buf_o[i][j]) + TEST_ERROR } } } - - - - + + + + /*------------------------------------------------------------------------- * * Procedure 2 * a. Define a smaller array ExF where E < A and F < B - * b. Read data back + * b. Read data back * c. Verify if new dimensions are E and F * d. Verify if data up until E and F is what to be expected * @@ -1160,35 +1122,35 @@ static int test_rank2( hbool_t do_compress, * *------------------------------------------------------------------------- */ - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_s) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /* check dimensions */ for( i = 0; i < RANK2; i++ ) { - if (dims_r[i] != dims_s[i]) - goto error; + if (dims_r[i] != dims_s[i]) + TEST_ERROR } @@ -1196,42 +1158,42 @@ static int test_rank2( hbool_t do_compress, /* for this case we close and reopen file */ if ( set_istore_k ) { - - if (H5Dclose(did) < 0) + + if (H5Dclose(did) < 0) { - goto error; + TEST_ERROR } if (H5Fclose(fid) < 0) { - goto error; + TEST_ERROR } - if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0) + if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0) { - goto error; + TEST_ERROR } - - if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0) + + if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0) { - goto error; + TEST_ERROR } - - - + + + } - - + + /*------------------------------------------------------------------------- * read *------------------------------------------------------------------------- */ - + /* read */ - if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0) + if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0) { - goto error; + TEST_ERROR } - + #if defined (H5_SET_EXTENT_DEBUG2) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -1242,26 +1204,26 @@ static int test_rank2( hbool_t do_compress, } printf("\n"); } -#endif +#endif + + - - /* compare the read array with the shrinked array */ for( i = 0; i < (int)dims_r[0]; i++ ) { for( j = 0; j < (int)dims_r[1]; j++ ) { - if ( buf_s[i][j] != buf_o[i][j] ) + if ( buf_s[i][j] != buf_o[i][j] ) { printf("buf_s[%d][%d] = %d\n", i, j, buf_s[i][j]); printf("buf_o[%d][%d] = %d\n", i, j, buf_o[i][j]); - goto error; - } + TEST_ERROR + } } } - - + + /*------------------------------------------------------------------------- * set new dimensions for the array; expand it back to original size * data is now, extended space was initialized with fill value or default value @@ -1273,47 +1235,47 @@ static int test_rank2( hbool_t do_compress, * *------------------------------------------------------------------------- */ - + /* set new dimensions for the array */ if (H5Dset_extent(did, dims_o) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ - if ((sid = H5Dget_space(did)) < 0) + if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions. */ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /* check dimensions */ for( i = 0; i < RANK2; i++ ) { - if (dims_r[i] != dims_o[i]) - goto error; + if (dims_r[i] != dims_o[i]) + TEST_ERROR } - - + + /*------------------------------------------------------------------------- * read *------------------------------------------------------------------------- */ - + /* read */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0) - goto error; - + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0) + TEST_ERROR + #if defined (H5_SET_EXTENT_DEBUG2) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -1324,28 +1286,28 @@ static int test_rank2( hbool_t do_compress, } printf("\n"); } -#endif +#endif + - /* compare the read array with the original array */ for (i = 0; i < (int)dims_r[0]; i++ ) { for (j = 0; j < (int)dims_r[1]; j++ ) { - if (i >= DIMS0 || j >= DIMS1) + if (i >= DIMS0 || j >= DIMS1) { - if(buf_r[i][j] != comp_value) + if(buf_r[i][j] != comp_value) { printf("buf_r[%d][%d] = %d\n", i, j, buf_r[i][j]); printf("value = %d\n", comp_value); - goto error; - } - } - else + TEST_ERROR + } + } + else { - if(buf_r[i][j] != buf_o[i][j]) - goto error; + if(buf_r[i][j] != buf_o[i][j]) + TEST_ERROR } } } @@ -1358,124 +1320,172 @@ static int test_rank2( hbool_t do_compress, dims_s[0] = 0; dims_s[1] = 0; - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_s) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /* check dimensions */ for( i = 0; i < RANK2; i++ ) { - if (dims_r[i] != dims_s[i]) - goto error; - } - - + if (dims_r[i] != dims_s[i]) + TEST_ERROR + } + + /*------------------------------------------------------------------------- - * close dataset + * expand then shrink to 0 in dimension 1 while expanding again in + * dimension 0 + * *------------------------------------------------------------------------- */ - - if (H5Dclose(did) < 0) + + + /* expand to original dimensions for the array. */ + if (H5Dset_extent(did , dims_o) < 0) { - goto error; + TEST_ERROR + } + + dims_s[0] = dims_e[0]; + dims_s[1] = 0; + + /* set new dimensions for the array. */ + if (H5Dset_extent(did , dims_s) < 0) + { + TEST_ERROR + } + + /* get the space */ + if ((sid = H5Dget_space(did)) < 0) + { + TEST_ERROR } - - + + /* get dimensions */ + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + { + TEST_ERROR + } + + if (H5Sclose(sid) < 0) + { + TEST_ERROR + } + + /* check dimensions */ + for( i = 0; i < RANK2; i++ ) + { + if (dims_r[i] != dims_s[i]) + TEST_ERROR + } + + + /*------------------------------------------------------------------------- + * close dataset + *------------------------------------------------------------------------- + */ + + if (H5Dclose(did) < 0) + { + TEST_ERROR + } + + /*------------------------------------------------------------------------- * test a dataset with non initialized chunks *------------------------------------------------------------------------- */ - - - if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0) + + + if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0) { - goto error; + TEST_ERROR } - if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0) { - goto error; + TEST_ERROR } /* set new dimensions for the array */ dims_o[ 0 ] = 0; dims_o[ 1 ] = 0; - if (H5Dset_extent( did , dims_o ) < 0) + if (H5Dset_extent( did , dims_o ) < 0) { - goto error; + TEST_ERROR } - if (H5Dclose(did) < 0) + if (H5Dclose(did) < 0) { - goto error; + TEST_ERROR } if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - - - + + + /*------------------------------------------------------------------------- * close property list *------------------------------------------------------------------------- */ - - - if (H5Pclose(dcpl) < 0) + + + if (H5Pclose(my_dcpl) < 0) { - goto error; + TEST_ERROR } /* close file creation property list */ - if(H5Pclose(fcpl) < 0) + if(H5Pclose(fcpl) < 0) { - goto error; + TEST_ERROR } if (H5Fclose( fid ) < 0) { - goto error; + TEST_ERROR } return 0; - - - + + + error: - - H5E_BEGIN_TRY + + H5E_BEGIN_TRY { H5Dclose( did ); H5Sclose( sid ); - H5Pclose( dcpl ); + H5Pclose( my_dcpl ); H5Pclose( fcpl ); H5Fclose( fid ); } H5E_END_TRY; return -1; - + } @@ -1486,43 +1496,41 @@ error: *------------------------------------------------------------------------- */ -static int test_rank3( hbool_t do_compress, - hbool_t do_fill_value, - hbool_t set_istore_k, - H5D_fill_time_t fill_time, - hid_t fapl) +static int test_rank3( hid_t fapl, + hid_t dcpl, + hbool_t do_fill_value, + hbool_t set_istore_k) { - hid_t fid=-1; + hid_t fid=-1; hid_t did=-1; hid_t sid=-1; - hid_t dcpl=-1; + hid_t my_dcpl=-1; hid_t fcpl; - hsize_t dims_o[RANK3] = {DIM0,DIM1,DIM2}; /* original dimensions */ - hsize_t dims_s[RANK3] = {DIMS0,DIMS1,DIMS2}; /* shrinking dimensions */ - hsize_t dims_e[RANK3] = {DIME0,DIME1,DIME2}; /* extended dimensions */ - hsize_t dims_c[RANK3] = {2,2,2}; /* chunk dimensions */ - hsize_t dims_r[RANK3]; /* read dimensions */ + hsize_t dims_o[RANK3] = {DIM0,DIM1,DIM2}; /* original dimensions */ + hsize_t dims_s[RANK3] = {DIMS0,DIMS1,DIMS2}; /* shrinking dimensions */ + hsize_t dims_e[RANK3] = {DIME0,DIME1,DIME2}; /* extended dimensions */ + hsize_t dims_c[RANK3] = {2,2,2}; /* chunk dimensions */ + hsize_t dims_r[RANK3]; /* read dimensions */ hsize_t maxdims[RANK3] = {H5S_UNLIMITED,H5S_UNLIMITED,H5S_UNLIMITED}; int buf_o[DIM0][DIM1][DIM2]; int buf_s[DIMS0][DIMS1][DIMS2]; int buf_e[DIME0][DIME1][DIME2]; int buf_r[DIM0][DIM1][DIM2]; int i, j, k; - int fillvalue = 1; - int comp_value; + int comp_value; char filename[NAME_BUF_SIZE]; - + if ( do_fill_value ) { - comp_value = fillvalue; + comp_value = FILL_VALUE; } else { comp_value = 0; } - + for( i = 0; i < DIM0; i++ ) { for( j = 0; j < DIM1; j++ ) @@ -1535,95 +1543,67 @@ static int test_rank3( hbool_t do_compress, } /* create a file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { - goto error; + TEST_ERROR } - + if ( set_istore_k ) { /* set non-default indexed storage B-tree internal 'K' value */ - if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0) + if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0) { - goto error; + TEST_ERROR } - + } /* create a new file */ h5_fixname(FILENAME[2], fapl, filename, sizeof filename); - if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) + if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { - goto error; + TEST_ERROR } /* close property list */ - if(H5Pclose(fcpl) < 0) + if(H5Pclose(fcpl) < 0) { - goto error; + TEST_ERROR } - + /* create the data space with unlimited dimensions. */ - if ((sid = H5Screate_simple(RANK3, dims_o, maxdims)) < 0) + if ((sid = H5Screate_simple(RANK3, dims_o, maxdims)) < 0) { - goto error; + TEST_ERROR } - + /* modify dataset creation properties, i.e. enable chunking. */ - if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0) + if ((my_dcpl = H5Pcopy (dcpl)) < 0) { - goto error; + TEST_ERROR } - if (H5Pset_chunk(dcpl, RANK3, dims_c) < 0) + if (H5Pset_chunk(my_dcpl, RANK3, dims_c) < 0) { - goto error; + TEST_ERROR } - if ( do_fill_value ) - { - if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue) < 0) - { - goto error; - } - if(H5Pset_fill_time(dcpl, fill_time) < 0) - { - goto error; - } - } - else - { - - if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) - { - goto error; - } - - } - if (do_compress) - { - if(H5Pset_deflate(dcpl, 9) < 0) - { - goto error; - } - } - /*------------------------------------------------------------------------- * create, write array *------------------------------------------------------------------------- */ - + /* create a dataset */ - if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0) { - goto error; + TEST_ERROR } - + /* write */ - if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) + if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) { - goto error; + TEST_ERROR } - - + + #if defined (H5_SET_EXTENT_DEBUG3) printf("\n"); for (i = 0; i < (int)dims_o[0]; i++ ) @@ -1637,61 +1617,61 @@ static int test_rank3( hbool_t do_compress, printf("[%d] ", j); } printf("\n"); - + } printf("\n"); -#endif +#endif + - if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /*------------------------------------------------------------------------- * set new dimensions for the array; expand it * *------------------------------------------------------------------------- */ - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_e) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - - + + /* check dimensions */ for( i = 0; i < RANK3; i++ ) { - if (dims_r[i] != dims_e[i]) - goto error; + if (dims_r[i] != dims_e[i]) + TEST_ERROR } - + /* read */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0) - goto error; + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0) + TEST_ERROR + + - - #if defined (H5_SET_EXTENT_DEBUG3) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -1705,14 +1685,14 @@ static int test_rank3( hbool_t do_compress, printf("[%d] ", j); } printf("\n"); - + } printf("\n"); -#endif +#endif + + + - - - /* compare the read array with the expanded array */ for (i = 0; i < (int)dims_r[0]; i++ ) { @@ -1720,60 +1700,60 @@ static int test_rank3( hbool_t do_compress, { for( k = 0; k < (int)dims_r[2]; k++ ) { - if ( i >= DIM0 || j >= DIM1 || k >= DIM2 ) + if ( i >= DIM0 || j >= DIM1 || k >= DIM2 ) { - if(buf_e[i][j][k] != comp_value) + if(buf_e[i][j][k] != comp_value) { printf("buf_e[%d][%d][%d] = %d\n", i, j, k, buf_e[i][j][k] ); printf("value = %d\n", comp_value); - goto error; - } - } - else + TEST_ERROR + } + } + else { - if(buf_e[i][j][k] != buf_o[i][j][k] ) - goto error; + if(buf_e[i][j][k] != buf_o[i][j][k] ) + TEST_ERROR } } } } - - - - + + + + /*------------------------------------------------------------------------- * shrink *------------------------------------------------------------------------- */ - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_s) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /* check dimensions */ for( i = 0; i < RANK3; i++ ) { - if (dims_r[i] != dims_s[i]) - goto error; + if (dims_r[i] != dims_s[i]) + TEST_ERROR } @@ -1781,42 +1761,42 @@ static int test_rank3( hbool_t do_compress, /* for this case we close and reopen file */ if ( set_istore_k ) { - - if (H5Dclose(did) < 0) + + if (H5Dclose(did) < 0) { - goto error; + TEST_ERROR } if (H5Fclose(fid) < 0) { - goto error; + TEST_ERROR } - if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0) + if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0) { - goto error; + TEST_ERROR } - - if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0) + + if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0) { - goto error; + TEST_ERROR } - - - + + + } - - + + /*------------------------------------------------------------------------- * read *------------------------------------------------------------------------- */ - + /* read */ - if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0) + if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0) { - goto error; + TEST_ERROR } - + #if defined (H5_SET_EXTENT_DEBUG3) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -1830,14 +1810,14 @@ static int test_rank3( hbool_t do_compress, printf("[%d] ", j); } printf("\n"); - + } printf("\n"); -#endif +#endif + + - - /* compare the read array with the shrinked array */ for( i = 0; i < (int)dims_r[0]; i++ ) { @@ -1845,56 +1825,56 @@ static int test_rank3( hbool_t do_compress, { for( k = 0; k < (int)dims_r[2]; k++ ) { - if ( buf_s[i][j][k] != buf_o[i][j][k] ) + if ( buf_s[i][j][k] != buf_o[i][j][k] ) { printf("buf_s[%d][%d][%d] = %d\n", i, j, k, buf_s[i][j][k] ); printf("buf_o[%d][%d][%d] = %d\n", i, j, k, buf_o[i][j][k] ); - goto error; - } + TEST_ERROR + } } } } - - + + /*------------------------------------------------------------------------- * set new dimensions for the array; expand it back to original size *------------------------------------------------------------------------- */ - + /* set new dimensions for the array */ if (H5Dset_extent(did, dims_o) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ - if ((sid = H5Dget_space(did)) < 0) + if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions. */ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /* check dimensions */ for( i = 0; i < RANK3; i++ ) { - if (dims_r[i] != dims_o[i]) - goto error; + if (dims_r[i] != dims_o[i]) + TEST_ERROR } - + /* read */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0) - goto error; - + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0) + TEST_ERROR + #if defined (H5_SET_EXTENT_DEBUG3) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -1903,19 +1883,19 @@ static int test_rank3( hbool_t do_compress, { for( k = 0; k < (int)dims_r[2]; k++ ) { - + printf("%d ", buf_r[i][j][k]); } printf("[%d] ", j); } printf("\n"); - + } printf("\n"); -#endif +#endif + - /* compare the read array with the original array */ for (i = 0; i < (int)dims_r[0]; i++ ) { @@ -1923,24 +1903,24 @@ static int test_rank3( hbool_t do_compress, { for( k = 0; k < (int)dims_r[2]; k++ ) { - if (i >= DIMS0 || j >= DIMS1 || k >= DIMS2 ) + if (i >= DIMS0 || j >= DIMS1 || k >= DIMS2 ) { - if( buf_r[i][j][k] != comp_value ) + if( buf_r[i][j][k] != comp_value ) { printf("buf_r[%d][%d][%d] = %d\n", i, j, k, buf_r[i][j][k] ); printf("value = %d\n", comp_value); - goto error; - } - } - else + TEST_ERROR + } + } + else { - if(buf_r[i][j][k] != buf_o[i][j][k]) - goto error; + if(buf_r[i][j][k] != buf_o[i][j][k]) + TEST_ERROR } } } } - + /*------------------------------------------------------------------------- * shrink to 0 @@ -1951,120 +1931,120 @@ static int test_rank3( hbool_t do_compress, dims_s[0] = 0; dims_s[1] = 0; dims_s[2] = 0; - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_s) < 0) { - goto error; + TEST_ERROR } - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /* check dimensions */ for( i = 0; i < RANK3; i++ ) { - if (dims_r[i] != dims_s[i]) - goto error; - } - - - + if (dims_r[i] != dims_s[i]) + TEST_ERROR + } + + + /*------------------------------------------------------------------------- - * close dataset + * close dataset *------------------------------------------------------------------------- */ - - if (H5Dclose(did) < 0) + + if (H5Dclose(did) < 0) { - goto error; + TEST_ERROR } - - + + /*------------------------------------------------------------------------- * test a dataset with non initialized chunks *------------------------------------------------------------------------- */ - - - if ((sid = H5Screate_simple(RANK3, dims_o, maxdims)) < 0) + + + if ((sid = H5Screate_simple(RANK3, dims_o, maxdims)) < 0) { - goto error; + TEST_ERROR } - if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0) { - goto error; + TEST_ERROR } /* set new dimensions for the array */ dims_o[ 0 ] = 0; dims_o[ 1 ] = 0; dims_o[ 2 ] = 0; - if (H5Dset_extent( did , dims_o ) < 0) + if (H5Dset_extent( did , dims_o ) < 0) { - goto error; + TEST_ERROR } - if (H5Dclose(did) < 0) + if (H5Dclose(did) < 0) { - goto error; + TEST_ERROR } if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - - - + + + /*------------------------------------------------------------------------- * close property list *------------------------------------------------------------------------- */ - - - if (H5Pclose(dcpl) < 0) + + + if (H5Pclose(my_dcpl) < 0) { - goto error; + TEST_ERROR } if (H5Fclose( fid ) < 0) { - goto error; + TEST_ERROR } return 0; - - - + + + error: - - H5E_BEGIN_TRY + + H5E_BEGIN_TRY { H5Dclose( did ); H5Sclose( sid ); - H5Pclose( dcpl ); + H5Pclose( my_dcpl ); H5Pclose( fcpl ); H5Fclose( fid ); } H5E_END_TRY; return -1; - + } @@ -2075,32 +2055,32 @@ error: static int test_external( hid_t fapl ) { - hid_t fid=-1; + hid_t fid=-1; hid_t did=-1; hid_t sid=-1; hid_t dcpl=-1; - hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */ - hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */ - hsize_t dims_e[RANK2] = {DIME0,DIM1}; /* extended dimensions, dimension 1 is the original */ - hsize_t dims_r[RANK2]; /* read dimensions */ + hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */ + hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */ + hsize_t dims_e[RANK2] = {DIME0,DIM1}; /* extended dimensions, dimension 1 is the original */ + hsize_t dims_r[RANK2]; /* read dimensions */ hsize_t maxdims[RANK2] = {DIME0,DIM1}; /* only the first dimension can be extendible */ - int buf_o[DIM0][DIM1]; /* original buffer, for writing */ - int buf_s[DIMS0][DIMS1]; /* shrinked buffer, for reading */ - int buf_e[DIME0][DIM1]; /* extended buffer, for writing, dimension 1 is the original */ - int buf_ro[DIM0][DIM1]; /* original buffer for reading */ + int buf_o[DIM0][DIM1]; /* original buffer, for writing */ + int buf_s[DIMS0][DIMS1]; /* shrinked buffer, for reading */ + int buf_e[DIME0][DIM1]; /* extended buffer, for writing, dimension 1 is the original */ + int buf_ro[DIM0][DIM1]; /* original buffer for reading */ int i, j; int comp_value = 0; char filename[NAME_BUF_SIZE]; - + hsize_t size; /* number of bytes reserved in the file for the data */ - hsize_t max_size[2]; - + hsize_t max_size[2]; + max_size[0] = dims_e[0]; max_size[1] = dims_e[1]; size = max_size[0] * max_size[1] * sizeof(int) / 2; - - + + for( i = 0; i < DIM0; i++ ) { for( j = 0; j < DIM1; j++ ) @@ -2109,33 +2089,33 @@ static int test_external( hid_t fapl ) } } - TESTING_2("external file use"); - + TESTING("external file use"); + /* create a new file */ h5_fixname(FILENAME[3], fapl, filename, sizeof filename); - if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR - + /* modify dataset creation properties */ if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR - + if(H5Pset_external(dcpl, EXT_FILE_NAME1, (off_t)0, size) < 0) FAIL_STACK_ERROR if(H5Pset_external(dcpl, EXT_FILE_NAME2, (off_t)0, size) < 0) FAIL_STACK_ERROR - + { - + char name[256]; /*external file name */ off_t file_offset; /*external file offset */ hsize_t file_size; /*sizeof external file segment */ - + if(H5Pget_external(dcpl, 0, sizeof(name), name, &file_offset, &file_size) < 0) FAIL_STACK_ERROR - + } @@ -2155,11 +2135,11 @@ static int test_external( hid_t fapl ) /* create the data space with unlimited dimensions. */ - if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0) + if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0) FAIL_STACK_ERROR - if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) + if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) FAIL_STACK_ERROR if (H5Sclose(sid) < 0) FAIL_STACK_ERROR @@ -2171,9 +2151,9 @@ static int test_external( hid_t fapl ) */ /* read */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ro) < 0) + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ro) < 0) FAIL_STACK_ERROR - + #if defined (H5_SET_EXTENT_DEBUG) printf("\n"); for (i = 0; i < (int)dims_o[0]; i++ ) @@ -2184,10 +2164,10 @@ static int test_external( hid_t fapl ) } printf("\n"); } -#endif +#endif + - /*------------------------------------------------------------------------- * expand *------------------------------------------------------------------------- @@ -2197,13 +2177,13 @@ static int test_external( hid_t fapl ) * set new dimensions for the array; expand it * data is now, extended space was initialized with default value * - * 2 2 2 2 - * 2 2 2 2 - * 2 2 2 2 - * 2 2 2 2 - * 0 0 0 0 - * 0 0 0 0 - * 0 0 0 0 + * 2 2 2 2 + * 2 2 2 2 + * 2 2 2 2 + * 2 2 2 2 + * 0 0 0 0 + * 0 0 0 0 + * 0 0 0 0 * *------------------------------------------------------------------------- */ @@ -2215,28 +2195,28 @@ static int test_external( hid_t fapl ) /* get the space */ if ((sid = H5Dget_space(did)) < 0) FAIL_STACK_ERROR - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) FAIL_STACK_ERROR - + if (H5Sclose(sid) < 0) FAIL_STACK_ERROR - - + + /* check dimensions */ for( i = 0; i < RANK2; i++ ) { - if (dims_r[i] != dims_e[i]) + if (dims_r[i] != dims_e[i]) TEST_ERROR } - + /* read */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0) + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0) FAIL_STACK_ERROR - - + + #if defined (H5_SET_EXTENT_DEBUG) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -2247,33 +2227,33 @@ static int test_external( hid_t fapl ) } printf("\n"); } -#endif +#endif + + + - - - /* compare the read array with the expanded array */ for (i = 0; i < (int)dims_r[0]; i++ ) { for (j = 0; j < (int)dims_r[1]; j++ ) { - if ( i >= DIM0 || j >= DIM1 ) + if ( i >= DIM0 || j >= DIM1 ) { - if(buf_e[i][j] != comp_value) + if(buf_e[i][j] != comp_value) { printf("buf_e[%d][%d] = %d\n", i, j, buf_e[i][j]); printf("value = %d\n", comp_value); TEST_ERROR - } - } - else + } + } + else { - if(buf_e[i][j] != buf_o[i][j]) + if(buf_e[i][j] != buf_o[i][j]) TEST_ERROR } } } - + /*------------------------------------------------------------------------- @@ -2286,41 +2266,41 @@ static int test_external( hid_t fapl ) * *------------------------------------------------------------------------- */ - + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_s) < 0) FAIL_STACK_ERROR - + /* get the space */ if ((sid = H5Dget_space(did)) < 0) FAIL_STACK_ERROR - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) FAIL_STACK_ERROR - + if (H5Sclose(sid) < 0) FAIL_STACK_ERROR - + /* check dimensions */ for( i = 0; i < RANK2; i++ ) { - if (dims_r[i] != dims_s[i]) + if (dims_r[i] != dims_s[i]) TEST_ERROR } - - + + /*------------------------------------------------------------------------- * read *------------------------------------------------------------------------- */ - + /* read */ - if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0) + if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0) FAIL_STACK_ERROR - + #if defined (H5_SET_EXTENT_DEBUG) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -2331,22 +2311,22 @@ static int test_external( hid_t fapl ) } printf("\n"); } -#endif +#endif + + - - /* compare the read array with the shrinked array */ for( i = 0; i < (int)dims_r[0]; i++ ) { for( j = 0; j < (int)dims_r[1]; j++ ) { - if ( buf_s[i][j] != buf_o[i][j] ) + if ( buf_s[i][j] != buf_o[i][j] ) { printf("buf_s[%d][%d] = %d\n", i, j, buf_s[i][j]); printf("buf_o[%d][%d] = %d\n", i, j, buf_o[i][j]); TEST_ERROR - } + } } } @@ -2361,16 +2341,16 @@ static int test_external( hid_t fapl ) dims_e[1] = DIME1; - H5E_BEGIN_TRY + H5E_BEGIN_TRY { - - + + /* set new dimensions for the array. */ if (H5Dset_extent(did , dims_e) == SUCCEED) { TEST_ERROR } - + } H5E_END_TRY; @@ -2379,9 +2359,9 @@ static int test_external( hid_t fapl ) * close property list *------------------------------------------------------------------------- */ - - - if (H5Pclose(dcpl) < 0) + + + if (H5Pclose(dcpl) < 0) FAIL_STACK_ERROR if (H5Dclose( did ) < 0) @@ -2393,10 +2373,10 @@ static int test_external( hid_t fapl ) PASSED(); return 0; - + error: - - H5E_BEGIN_TRY + + H5E_BEGIN_TRY { H5Dclose( did ); H5Sclose( sid ); @@ -2414,19 +2394,20 @@ error: static int test_layouts( H5D_layout_t layout, hid_t fapl ) { - hid_t fid=-1; + hid_t fid=-1; hid_t did=-1; hid_t sid=-1; hid_t dcpl=-1; - hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */ - hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */ - hsize_t dims_e[RANK2] = {DIME0,DIME1}; /* extended dimensions */ - hsize_t dims_r[RANK2]; /* read dimensions */ + herr_t ret; + hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */ + hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */ + hsize_t dims_e[RANK2] = {DIME0,DIME1}; /* extended dimensions */ + hsize_t dims_r[RANK2]; /* read dimensions */ int buf_o[DIM0][DIM1]; int buf_r[DIM0][DIM1]; - int i, j; + int i, j; char filename[NAME_BUF_SIZE]; - + for( i = 0; i < DIM0; i++ ) { for( j = 0; j < DIM1; j++ ) @@ -2435,44 +2416,44 @@ static int test_layouts( H5D_layout_t layout, hid_t fapl ) } } - + /* create a new file */ h5_fixname(FILENAME[4], fapl, filename, sizeof filename); - if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) { - goto error; + TEST_ERROR } /* create the data space with unlimited dimensions. */ - if ((sid = H5Screate_simple(RANK2, dims_o, NULL)) < 0) + if ((sid = H5Screate_simple(RANK2, dims_o, NULL)) < 0) { - goto error; + TEST_ERROR } - + /* modify dataset creation properties */ if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0) { - goto error; + TEST_ERROR } - + if (H5Pset_layout (dcpl, layout) < 0) { - goto error; + TEST_ERROR } - + /* create a dataset */ - if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) { - goto error; + TEST_ERROR } - + /* write */ - if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) + if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0) { - goto error; + TEST_ERROR } - - + + #if defined (H5_SET_EXTENT_DEBUG4) printf("\n"); for (i = 0; i < (int)dims_o[0]; i++ ) @@ -2483,65 +2464,65 @@ static int test_layouts( H5D_layout_t layout, hid_t fapl ) } printf("\n"); } -#endif +#endif + - if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /*------------------------------------------------------------------------- * negative test - * try to extend dimension + * try to extend dimension *------------------------------------------------------------------------- */ - H5E_BEGIN_TRY + H5E_BEGIN_TRY { - - if (H5Dset_extent(did , dims_e) == SUCCEED) - { - goto error; - } - + + ret = H5Dset_extent(did , dims_e); + } H5E_END_TRY; - - - + if(ret >= 0) + TEST_ERROR + + + + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - - + + /* check dimensions */ for( i = 0; i < RANK2; i++ ) { - if (dims_r[i] != dims_o[i]) - goto error; + if (dims_r[i] != dims_o[i]) + TEST_ERROR } - + /* read */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0) - goto error; + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0) + TEST_ERROR + + - - #if defined (H5_SET_EXTENT_DEBUG4) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -2552,63 +2533,63 @@ static int test_layouts( H5D_layout_t layout, hid_t fapl ) } printf("\n"); } -#endif +#endif + + - - /*------------------------------------------------------------------------- * negative test - * try to shrink dimension + * try to shrink dimension *------------------------------------------------------------------------- */ - H5E_BEGIN_TRY + H5E_BEGIN_TRY { - - if (H5Dset_extent(did , dims_s) == SUCCEED) - { - goto error; - } - + + ret = H5Dset_extent(did , dims_s); + } H5E_END_TRY; - + if(ret >= 0) + TEST_ERROR + + /* get the space */ if ((sid = H5Dget_space(did)) < 0) { - goto error; + TEST_ERROR } - + /* get dimensions */ - if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) + if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0) { - goto error; + TEST_ERROR } - + if (H5Sclose(sid) < 0) { - goto error; + TEST_ERROR } - + /* check dimensions */ for( i = 0; i < RANK2; i++ ) { - if (dims_r[i] != dims_o[i]) - goto error; + if (dims_r[i] != dims_o[i]) + TEST_ERROR } - + /*------------------------------------------------------------------------- * read *------------------------------------------------------------------------- */ - + /* read */ - if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r ) < 0) + if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r ) < 0) { - goto error; + TEST_ERROR } - + #if defined (H5_SET_EXTENT_DEBUG4) printf("\n"); for (i = 0; i < (int)dims_r[0]; i++ ) @@ -2619,38 +2600,38 @@ static int test_layouts( H5D_layout_t layout, hid_t fapl ) } printf("\n"); } -#endif +#endif + - /*------------------------------------------------------------------------- - * close + * close *------------------------------------------------------------------------- */ - - if (H5Dclose(did) < 0) + + if (H5Dclose(did) < 0) { - goto error; + TEST_ERROR } - - if (H5Pclose(dcpl) < 0) + + if (H5Pclose(dcpl) < 0) { - goto error; + TEST_ERROR } if (H5Fclose( fid ) < 0) { - goto error; + TEST_ERROR } return 0; - - - + + + error: - - H5E_BEGIN_TRY + + H5E_BEGIN_TRY { H5Dclose( did ); H5Sclose( sid ); @@ -2658,6 +2639,179 @@ error: H5Fclose( fid ); } H5E_END_TRY; return -1; - + } + +/*------------------------------------------------------------------------- + * Function: test_random_rank4 + * + * Purpose: Test expanding and shrinking a rank 4 dataset in a + * randomized fashion. Verifies that data is preserved (and + * filled, if do_fillvalue is true) as expected. + * + * Return: Success: 0 + * Failure: -1 + * + * Programmer: Neil Fortner + * Monday, January 11, 2010 + * + *------------------------------------------------------------------------- + */ +static int test_random_rank4( hid_t fapl, hid_t dcpl, hbool_t do_fillvalue ) +{ + hid_t file = -1; + hid_t dset = -1; + hid_t fspace = -1; + hid_t mspace = -1; + hid_t my_dcpl = -1; + hsize_t dims[4]; /* Dataset's dimensions */ + hsize_t old_dims[4]; /* Old dataset dimensions */ + hsize_t cdims[4]; /* Chunk dimensions */ + const hsize_t mdims[4] = {10, 10, 10, 10}; /* Memory buffer dimensions */ + const hsize_t start[4] = {0, 0, 0, 0}; /* Start for hyperslabe operations on memory */ + static int rbuf[10][10][10][10]; /* Read buffer */ + static int wbuf[10][10][10][10]; /* Write buffer */ + static hsize_t dim_log[RAND4_NITER+1][4]; /* Log of dataset dimensions */ + volatile unsigned i, j, k, l, m; /* Local indices */ + char filename[NAME_BUF_SIZE]; + + /* create a new file */ + h5_fixname(FILENAME[4], fapl, filename, sizeof filename); + if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Generate random chunk dimensions, 2-6 */ + for(i=0; i<4; i++) + cdims[i] = (hsize_t)((HDrandom() % 5) + 2); + + /* Generate initial dataset size, 1-10 */ + for(i=0; i<4; i++) { + dims[i] = (hsize_t)((HDrandom() % 10) + 1); + dim_log[0][i] = dims[i]; + } /* end for */ + + /* Create dataset */ + if((fspace = H5Screate_simple(4, dims, mdims)) < 0) + TEST_ERROR + if((my_dcpl = H5Pcopy(dcpl)) < 0) + TEST_ERROR + if(H5Pset_chunk(my_dcpl, 4, cdims) < 0) + TEST_ERROR + if((dset = H5Dcreate2(file, "dset", H5T_NATIVE_INT, fspace, H5P_DEFAULT, + my_dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + if(H5Sclose(fspace) < 0) + TEST_ERROR + + /* Create memory space, and set initial selection */ + if((mspace = H5Screate_simple(4, mdims, NULL)) < 0) + TEST_ERROR + if(H5Sselect_hyperslab(mspace, H5S_SELECT_SET, start, NULL, dims, NULL) + < 0) + TEST_ERROR + + /* Main loop */ + for(i=0; i= old_dims[0] || k >= old_dims[1] + || l >= old_dims[2] || m >= old_dims[3]) { + if(FILL_VALUE != rbuf[j][k][l][m]) + RAND4_FAIL_DUMP(i+2, (int)j, (int)k, (int)l, (int)m) + } /* end if */ + else + if(wbuf[j][k][l][m] != rbuf[j][k][l][m]) + RAND4_FAIL_DUMP(i+2, (int)j, (int)k, (int)l, (int)m) + } /* end if */ + else { + for(j=0; j=0) + printf(" First incorrect value read: ( %d, %d, %d, %d )\n", j, k, l, + m); + + return; +} /* end test_random_rank4_dump */ + diff --git a/test/tarray.c b/test/tarray.c index 590d48c..f191c95 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -22,6 +22,7 @@ *************************************************************/ #include "testhdf5.h" +#include "H5srcdir.h" #include "hdf5.h" @@ -1802,8 +1803,7 @@ test_compat(void) long l[ARRAY1_DIM1]; double d; } s3_t; - char testfile[512]=""; /* Character buffer for corrected test file name */ - char *srcdir = getenv("srcdir"); /* Pointer to the directory the source code is located within */ + const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */ hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ hid_t tid1; /* Array Datatype ID */ @@ -1831,12 +1831,6 @@ test_compat(void) * changed, follow the instructions in gen_old_array.c for regenerating * the tarrold.h5 file. */ - /* Generate the correct name for the test file, by prepending the source path */ - if (srcdir && ((strlen(srcdir) + strlen(TESTFILE) + 1) < sizeof(testfile))) { - strcpy(testfile, srcdir); - strcat(testfile, "/"); - } - strcat(testfile, TESTFILE); /* Open the testfile */ fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); diff --git a/test/tattr.c b/test/tattr.c index dcf13bc..828b8a8 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -274,60 +274,68 @@ test_attr_basic_write(hid_t fapl) attr_name_size = H5Aget_name(attr, (size_t)0, NULL); CHECK(attr_name_size, FAIL, "H5Aget_name"); - if(attr_name_size > 0) + if(attr_name_size > 0) { attr_name = (char*)HDcalloc((size_t)(attr_name_size + 1), sizeof(char)); - - ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name); - CHECK(ret, FAIL, "H5Aget_name"); - ret = HDstrcmp(attr_name, ATTR_TMP_NAME); - VERIFY(ret, 0, "HDstrcmp"); - - if(attr_name) - HDfree(attr_name); + CHECK(attr_name, NULL, "HDcalloc"); + + if(attr_name) { + ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name); + CHECK(ret, FAIL, "H5Aget_name"); + ret = HDstrcmp(attr_name, ATTR_TMP_NAME); + VERIFY(ret, 0, "HDstrcmp"); + + HDfree(attr_name); + attr_name = NULL; + } /* end if */ + } /* end if */ /* Read attribute information immediately, without closing attribute */ ret = H5Aread(attr, H5T_NATIVE_INT, read_data1); CHECK(ret, FAIL, "H5Aread"); /* Verify values read in */ - for(i=0; i0) + if(attr_name_size > 0) { attr_name = (char*)HDcalloc((size_t)(attr_name_size+1), sizeof(char)); - - ret=(herr_t)H5Aget_name(attr2, (size_t)(attr_name_size+1), attr_name); - CHECK(ret, FAIL, "H5Aget_name"); - ret=HDstrcmp(attr_name, ATTR1A_NAME); - VERIFY(ret, 0, "HDstrcmp"); - - if(attr_name) - HDfree(attr_name); + CHECK(attr_name, NULL, "HDcalloc"); + + if(attr_name) { + ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name); + CHECK(ret, FAIL, "H5Aget_name"); + ret = HDstrcmp(attr_name, ATTR1A_NAME); + VERIFY(ret, 0, "HDstrcmp"); + + HDfree(attr_name); + attr_name = NULL; + } /* end if */ + } /* end if */ /* Read attribute information immediately, without closing attribute */ - ret=H5Aread(attr2,H5T_NATIVE_INT,read_data1); + ret = H5Aread(attr2, H5T_NATIVE_INT, read_data1); CHECK(ret, FAIL, "H5Aread"); /* Verify values read in */ - for(i=0; i=VERBO_HI) print_func(" Call to routine: %15s at line %4d " \ + if (VERBOSE_HI) print_func(" Call to routine: %15s at line %4d " \ "in %s returned %ld \n", \ where, (int)__LINE__, __FILE__, \ (long)(ret)); \ @@ -48,7 +45,7 @@ } while(0) #define CHECK_I(ret,where) { \ - if (HDGetTestVerbosity()>=VERBO_HI) { \ + if (VERBOSE_HI) { \ print_func(" Call to routine: %15s at line %4d in %s returned %ld\n", \ (where), (int)__LINE__, __FILE__, (long)(ret)); \ } \ @@ -60,7 +57,7 @@ } #define CHECK_PTR(ret,where) { \ - if (HDGetTestVerbosity()>=VERBO_HI) { \ + if (VERBOSE_HI) { \ print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \ (where), (int)__LINE__, __FILE__, (ret)); \ } \ @@ -74,7 +71,7 @@ /* Used to make certain a return value _is_ a value */ #define VERIFY(_x, _val, where) do { \ long __x = (long)_x, __val = (long)_val; \ - if(HDGetTestVerbosity() >= VERBO_HI) { \ + if(VERBOSE_HI) { \ print_func(" Call to routine: %15s at line %4d in %s had value " \ "%ld \n", (where), (int)__LINE__, __FILE__, __x); \ } \ @@ -88,7 +85,7 @@ /* Used to make certain a (non-'long' type's) return value _is_ a value */ #define VERIFY_TYPE(_x, _val, _type, _format, where) do { \ _type __x = (_type)_x, __val = (_type)_val; \ - if(HDGetTestVerbosity() >= VERBO_HI) { \ + if(VERBOSE_HI) { \ print_func(" Call to routine: %15s at line %4d in %s had value " \ _format " \n", (where), (int)__LINE__, __FILE__, __x); \ } \ @@ -101,7 +98,7 @@ /* Used to make certain a string return value _is_ a value */ #define VERIFY_STR(x, val, where) do { \ - if (HDGetTestVerbosity()>=VERBO_HI) { \ + if (VERBOSE_HI) { \ print_func(" Call to routine: %15s at line %4d in %s had value " \ "%s \n", (where), (int)__LINE__, __FILE__, x); \ } \ @@ -114,11 +111,11 @@ /* Used to document process through a test and to check for errors */ #define RESULT(ret,func) do { \ - if (HDGetTestVerbosity()>VERBO_MED) { \ + if (VERBOSE_MED) { \ print_func(" Call to routine: %15s at line %4d in %s returned " \ "%ld\n", func, (int)__LINE__, __FILE__, (long)(ret)); \ } \ - if (HDGetTestVerbosity()>=VERBO_HI) \ + if (VERBOSE_HI) \ H5Eprint2(H5E_DEFAULT, stdout); \ if ((ret) == FAIL) { \ TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \ @@ -130,6 +127,15 @@ /* Used to document process through a test */ #define MESSAGE(V,A) {if (HDGetTestVerbosity()>(V)) print_func A;} +/* Used to indicate an error that is complex to check for */ +#define ERROR(where) do { \ + if(VERBOSE_HI) \ + print_func(" Call to routine: %15s at line %4d in %s returned " \ + "invalid result\n", where, (int)__LINE__, __FILE__); \ + TestErrPrintf("*** UNEXPECTED RESULT from %s at line %4d in %s\n" \ + where, (int)__LINE__, __FILE__); \ +} while(0) + /* definitions for command strings */ #define VERBOSITY_STR "Verbosity" #define SKIP_STR "Skip" @@ -189,9 +195,6 @@ void cleanup_sohm(void); void cleanup_misc(void); void cleanup_unicode(void); -/* Extern global variables */ -extern int TestVerbosity; - #ifdef __cplusplus } #endif diff --git a/test/tfile.c b/test/tfile.c index d1cb25d..3b717eb 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -23,6 +23,7 @@ #include "hdf5.h" #include "testhdf5.h" +#include "H5srcdir.h" #include "H5Bprivate.h" #include "H5Pprivate.h" @@ -1148,46 +1149,46 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, oid_count = H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL); CHECK(oid_count, FAIL, "H5Fget_obj_count"); VERIFY(oid_count, OBJ_ID_COUNT_8, "H5Fget_obj_count"); + + if(oid_count > 0) { + hid_t *oid_list; - { - hid_t *oid_list; - int i; - H5I_type_t id_type; - - oid_list = (hid_t*)calloc((size_t)oid_count, sizeof(hid_t)); + oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t)); if(oid_list != NULL) { + int i; + ret_count = H5Fget_obj_ids(H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list); CHECK(ret_count, FAIL, "H5Fget_obj_ids"); - } - - for(i=0; inames[iter_struct->iter_count++])); } @@ -1473,18 +1473,26 @@ test_genprop_class_addprop(void) sid = H5Screate(H5S_SCALAR); CHECK(sid, FAIL, "H5Screate"); - /* Create a new class, dervied from the dataset creation property list class */ - cid = H5Pcreate_class(H5P_DATASET_CREATE,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL); + /* Create a new class, derived from the dataset creation property list class */ + cid = H5Pcreate_class(H5P_DATASET_CREATE, CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL); CHECK_I(cid, "H5Pcreate_class"); /* Check existence of an original property */ - ret = H5Pexist(cid,H5O_CRT_PIPELINE_NAME); - VERIFY(ret, 0, "H5Pexist"); + ret = H5Pexist(cid, H5O_CRT_PIPELINE_NAME); + VERIFY(ret, 1, "H5Pexist"); /* Insert first property into class (with no callbacks) */ ret = H5Pregister2(cid, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL); CHECK_I(ret, "H5Pregister2"); + /* Check existence of an original property */ + ret = H5Pexist(cid, H5O_CRT_PIPELINE_NAME); + VERIFY(ret, 1, "H5Pexist"); + + /* Check existence of added property */ + ret = H5Pexist(cid, PROP1_NAME); + VERIFY(ret, 1, "H5Pexist"); + /* Create a derived dataset creation property list */ pid = H5Pcreate(cid); CHECK(pid, FAIL, "H5Pcreate"); @@ -1502,6 +1510,34 @@ test_genprop_class_addprop(void) CHECK_I(ret, "H5Pget"); VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget"); + /* Insert second property into class (with no callbacks) */ + ret = H5Pregister2(cid, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + CHECK_I(ret, "H5Pregister2"); + + /* Check existence of an original property (in class) */ + ret = H5Pexist(cid, H5O_CRT_PIPELINE_NAME); + VERIFY(ret, 1, "H5Pexist"); + + /* Check existence of first added property (in class) */ + ret = H5Pexist(cid, PROP1_NAME); + VERIFY(ret, 1, "H5Pexist"); + + /* Check existence of second added property (in class) */ + ret = H5Pexist(cid, PROP2_NAME); + VERIFY(ret, 1, "H5Pexist"); + + /* Check existence of an original property (in property list) */ + ret = H5Pexist(pid, H5O_CRT_PIPELINE_NAME); + VERIFY(ret, 1, "H5Pexist"); + + /* Check existence of first added property (in property list) */ + ret = H5Pexist(pid, PROP1_NAME); + VERIFY(ret, 1, "H5Pexist"); + + /* Check existence of second added property (in property list) (should not exist) */ + ret = H5Pexist(pid, PROP2_NAME); + VERIFY(ret, 0, "H5Pexist"); + /* Create a dataset */ did = H5Dcreate2(fid, "Dataset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, pid, H5P_DEFAULT); CHECK(did, FAIL, "H5Dcreate2"); diff --git a/test/th5s.c b/test/th5s.c index a38e384..2de867b 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -22,6 +22,7 @@ *************************************************************/ #include "testhdf5.h" +#include "H5srcdir.h" #include "H5private.h" #include "H5Bprivate.h" @@ -173,13 +174,8 @@ test_h5s_basic(void) * the instructions in space_overflow.c for regenerating the th5s.h5 file. */ { - char testfile[512]=""; - char *srcdir = HDgetenv("srcdir"); - if (srcdir && ((HDstrlen(srcdir) + HDstrlen(TESTFILE) + 1) < sizeof(testfile))){ - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, TESTFILE); + const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */ + fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK_I(fid1, "H5Fopen"); if (fid1 >= 0){ diff --git a/test/tmisc.c b/test/tmisc.c index 450743c..b7ed202 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -30,6 +30,7 @@ #include "hdf5.h" #include "testhdf5.h" +#include "H5srcdir.h" #include "H5Dpkg.h" /* Datasets */ /* Definitions for misc. test #1 */ @@ -1723,20 +1724,12 @@ test_misc10(void) hid_t dataset, dataset_new; /* Dataset IDs for old & new datasets */ hid_t dcpl; /* Dataset creation property list */ hid_t space, type; /* Old dataset's dataspace & datatype */ - char testfile[512]=""; /* Character buffer for corrected test file name */ - char *srcdir = HDgetenv("srcdir"); /* Pointer to the directory the source code is located within */ + const char *testfile = H5_get_srcdir_filename(MISC10_FILE_OLD); /* Corrected test file name */ herr_t ret; /* Output message about test being performed */ MESSAGE(5, ("Testing using old dataset creation property list\n")); - /* Generate the correct name for the test file, by prepending the source path */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(MISC10_FILE_OLD) + 1) < sizeof(testfile))) { - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, MISC10_FILE_OLD); - /* * Open the old file and the dataset and get old settings. */ @@ -3387,8 +3380,7 @@ test_misc20(void) hsize_t small_dims[MISC20_SPACE_RANK]={MISC20_SPACE2_DIM0,MISC20_SPACE2_DIM1}; /* Small dimensions */ unsigned version; /* Version of storage layout info */ hsize_t contig_size; /* Size of contiguous storage size from layout into */ - char testfile[512]=""; /* Character buffer for corrected test file name */ - char *srcdir = HDgetenv("srcdir"); /* Pointer to the directory the source code is located within */ + const char *testfile = H5_get_srcdir_filename(MISC20_FILE_OLD); /* Corrected test file name */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ @@ -3502,13 +3494,6 @@ test_misc20(void) /* Verify that the storage size is computed correctly for older versions of layout info */ - /* Generate the correct name for the test file, by prepending the source path */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(MISC20_FILE_OLD) + 1) < sizeof(testfile))) { - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, MISC20_FILE_OLD); - /* * Open the old file and the dataset and get old settings. */ @@ -4630,20 +4615,12 @@ test_misc25b(void) { hid_t fid; /* File ID */ hid_t gid; /* Group ID */ - char testfile[512]=""; - char *srcdir = HDgetenv("srcdir"); + const char *testfile = H5_get_srcdir_filename(MISC25B_FILE); /* Corrected test file name */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Exercise null object header message bug\n")); - /* Build the name of the file, with the source directory */ - if (srcdir && ((HDstrlen(srcdir) + HDstrlen(MISC25B_FILE) + 1) < sizeof(testfile))){ - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, MISC25B_FILE); - /* Open file */ fid = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK(fid, FAIL, "H5Fopen"); @@ -4895,20 +4872,12 @@ test_misc27(void) { hid_t fid; /* File ID */ hid_t gid; /* Group ID */ - char testfile[512]=""; /* Character buffer for corrected test file name */ - char *srcdir = HDgetenv("srcdir"); /* Pointer to the directory the source code is located within */ + const char *testfile = H5_get_srcdir_filename(MISC27_FILE); /* Corrected test file name */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Corrupt object header handling\n")); - /* Generate the correct name for the test file, by prepending the source path */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(MISC27_FILE) + 1) < sizeof(testfile))) { - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, MISC27_FILE); - /* Open the file */ fid = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK(fid, FAIL, "H5Fopen"); @@ -5132,7 +5101,7 @@ test_misc29(void) CHECK(ret, -1, "h5_make_local_copy"); /* Open the copied file */ - fid = H5Fopen(MISC29_COPY_FILE, H5F_ACC_RDWR, H5P_DEFAULT); + fid = H5Fopen(MISC29_COPY_FILE, H5F_ACC_RDWR, H5P_DEFAULT); CHECK(fid, FAIL, "H5Fopen"); /* Delete the last dataset */ diff --git a/test/trefstr.c b/test/trefstr.c index c39a6eb..dd76cc1 100644 --- a/test/trefstr.c +++ b/test/trefstr.c @@ -301,6 +301,7 @@ test_refstr_own(void) /* Initialize buffer */ s = (char *)H5FL_BLK_MALLOC(str_buf,HDstrlen("foo") + 1); + CHECK(s, NULL, "H5FL_BLK_MALLOC"); HDstrcpy(s, "foo"); /* Transfer ownership of dynamically allocated string to ref-counted string */ diff --git a/test/tselect.c b/test/tselect.c index 5845a9b..b8c59d8 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -76,7 +76,6 @@ #define SPACE5_DIM5 10 /* 1-D dataset with same size as 5-D dataset */ -#define SPACE6_NAME "Space6" #define SPACE6_RANK 1 #define SPACE6_DIM1 (SPACE5_DIM1*SPACE5_DIM2*SPACE5_DIM3*SPACE5_DIM4*SPACE5_DIM5) @@ -99,7 +98,6 @@ #define SPACE8_DIM4 19 /* Another 2-D dataset with easy dimension sizes */ -#define SPACE9_NAME "Space9" #define SPACE9_RANK 2 #define SPACE9_DIM1 12 #define SPACE9_DIM2 12 @@ -222,8 +220,10 @@ test_select_hyper(hid_t xfer_plist) MESSAGE(5, ("Testing Hyperslab Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - rbuf = HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK(wbuf, NULL, "HDmalloc"); + rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK(rbuf, NULL, "HDcalloc"); /* Initialize write buffer */ for(i=0, tbuf=wbuf; ia = i*3 + 1; s_ptr->b = i*3 + 2; } - + /* Write the data to the dataset1 */ ret = H5Dwrite(dataset1, s1_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig); CHECK_I(ret, "H5Dwrite"); @@ -3898,7 +3898,7 @@ test_sohm_external_dtype(void) VERIFY(dmsg_count, 0, "H5F_get_sohm_mesg_count_test"); /* Create a data set using the datatype of the dataset in the first file. */ - dataset2 = H5Dcreate2(file2, "dataset_2", dset1_tid, space, H5P_DEFAULT, H5P_DEFAULT, + dataset2 = H5Dcreate2(file2, "dataset_2", dset1_tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK_I(dataset2, "H5Dcreate2"); @@ -3914,7 +3914,7 @@ test_sohm_external_dtype(void) ret = H5Dclose(dataset2); CHECK_I(ret, "H5Dclose"); - /* Close file 1 and the dataset's datatype in file 1. Verify that the datatype in + /* Close file 1 and the dataset's datatype in file 1. Verify that the datatype in * file 2 is still accessible. */ ret = H5Tclose(dset1_tid); CHECK_I(ret, "H5Tclose"); diff --git a/test/tvlstr.c b/test/tvlstr.c index a411b86..fbced5f 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -573,7 +573,7 @@ static void test_write_vl_string_attribute(void) hid_t file, root, dataspace, att; hid_t type; herr_t ret; - char *string_att_check; + char *string_att_check = NULL; /* Open the file */ file = H5Fopen(DATAFILE, H5F_ACC_RDWR, H5P_DEFAULT); @@ -599,13 +599,21 @@ static void test_write_vl_string_attribute(void) ret = H5Awrite(att, type, &string_att); CHECK(ret, FAIL, "H5Awrite"); - ret = H5Aread(att, type, &string_att_check); - CHECK(ret, FAIL, "H5Aread"); + /* Allocate memory for read buffer */ + if(string_att) + string_att_check = (char*)HDmalloc((strlen(string_att) + 1) * sizeof(char)); + CHECK(string_att_check, NULL, "HDmalloc"); - if(HDstrcmp(string_att_check,string_att)!=0) - TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check); + if(string_att_check) { + ret = H5Aread(att, type, &string_att_check); + CHECK(ret, FAIL, "H5Aread"); - HDfree(string_att_check); + if(HDstrcmp(string_att_check,string_att)!=0) + TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check); + + HDfree(string_att_check); + string_att_check = NULL; + } ret = H5Aclose(att); CHECK(ret, FAIL, "HAclose"); @@ -620,13 +628,23 @@ static void test_write_vl_string_attribute(void) ret = H5Awrite(att, type, &string_att_write); CHECK(ret, FAIL, "H5Awrite"); - ret = H5Aread(att, type, &string_att_check); - CHECK(ret, FAIL, "H5Aread"); + /* Allocate memory for read buffer */ + if(string_att_write) + string_att_check = (char*)HDmalloc((strlen(string_att_write) + 1) * sizeof(char)); + CHECK(string_att_check, NULL, "HDmalloc"); + + if(string_att_check) { + ret = H5Aread(att, type, &string_att_check); + CHECK(ret, FAIL, "H5Aread"); - if(HDstrcmp(string_att_check,string_att_write)!=0) - TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check); + if(HDstrcmp(string_att_check,string_att_write)!=0) + TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check); + + /* The attribute string written is freed below, in the + *test_read_vl_string_attribute() test */ + HDfree(string_att_check); + } - HDfree(string_att_check); /* The attribute string written is freed below, in the test_read_vl_string_attribute() test */ /* HDfree(string_att_write); */ @@ -659,7 +677,7 @@ static void test_read_vl_string_attribute(void) hid_t file, root, att; hid_t type; herr_t ret; - char *string_att_check; + char *string_att_check = NULL; /* Open file */ file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, H5P_DEFAULT); @@ -679,13 +697,21 @@ static void test_read_vl_string_attribute(void) att = H5Aopen(root, "test_scalar", H5P_DEFAULT); CHECK(att, FAIL, "H5Aopen"); - ret = H5Aread(att, type, &string_att_check); - CHECK(ret, FAIL, "H5Aread"); + /* Allocate memory for read buffer */ + if(string_att) + string_att_check = (char*)HDmalloc((strlen(string_att) + 1) * sizeof(char)); + CHECK(string_att_check, NULL, "HDmalloc"); - if(HDstrcmp(string_att_check,string_att)!=0) - TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check); + if(string_att_check) { + ret = H5Aread(att, type, &string_att_check); + CHECK(ret, FAIL, "H5Aread"); - HDfree(string_att_check); + if(HDstrcmp(string_att_check,string_att)!=0) + TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check); + + HDfree(string_att_check); + string_att_check = NULL; + } ret = H5Aclose(att); CHECK(ret, FAIL, "HAclose"); @@ -694,14 +720,24 @@ static void test_read_vl_string_attribute(void) att = H5Aopen(root, "test_scalar_large", H5P_DEFAULT); CHECK(att, FAIL, "H5Aopen"); - ret = H5Aread(att, type, &string_att_check); - CHECK(ret, FAIL, "H5Aread"); + /* Allocate memory for read buffer */ + if(string_att_write) + string_att_check = (char*)HDmalloc((strlen(string_att_write) + 1) * sizeof(char)); + CHECK(string_att_check, NULL, "HDmalloc"); + + if(string_att_check) { + ret = H5Aread(att, type, &string_att_check); + CHECK(ret, FAIL, "H5Aread"); - if(HDstrcmp(string_att_check,string_att_write)!=0) - TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check); + if(HDstrcmp(string_att_check,string_att_write)!=0) + TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check); + + HDfree(string_att_check); + } - HDfree(string_att_check); - HDfree(string_att_write); /* Free string allocated in test_write_vl_string_attribute */ + /* Free string allocated in test_write_vl_string_attribute */ + if(string_att_write) + HDfree(string_att_write); ret = H5Aclose(att); CHECK(ret, FAIL, "HAclose"); diff --git a/test/vfd.c b/test/vfd.c index bd642be..12ce04e 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -873,7 +873,7 @@ test_family_compat(void) error: H5E_BEGIN_TRY { H5Fclose(file); - H5Pclose(fapl); + H5Pclose(fapl); } H5E_END_TRY; return -1; diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 5b0e187..f9d43ef 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -129,10 +129,10 @@ long local_pins = 0; * processes, and thus cannot be marked as dirty unless they * happen to overlap some collective operation. * - * cleared: Boolean flag that is set to true whenever the entry is + * cleared: Boolean flag that is set to true whenever the entry is * dirty, and is cleared via a call to clear_datum(). * - * flushed: Boolean flag that is set to true whenever the entry is + * flushed: Boolean flag that is set to true whenever the entry is * dirty, and is flushed via a call to flush_datum(). * * index: Index of this instance of datum in the data_index[] array @@ -1435,7 +1435,7 @@ serve_read_request(struct mssg_t * mssg_ptr) HDfprintf(stdout, "%d:%s: proc %d read invalid entry. idx/base_addr = %d/%a.\n", world_mpi_rank, fcn_name, - mssg_ptr->src, + mssg_ptr->src, target_index, data[target_index].base_addr); } @@ -1817,7 +1817,7 @@ destroy_datum(H5F_t UNUSED * f, * value for communications with the server. * * JRM -- 2/4/09 - * Added code to set the flushed flag when a dirty entry + * Added code to set the flushed flag when a dirty entry * is flushed. * *------------------------------------------------------------------------- @@ -3674,11 +3674,11 @@ unlock_entry(H5C_t * cache_ptr, HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE ); - if ( ( (flags & H5AC__DIRTIED_FLAG) != 0 ) && + if ( ( (flags & H5AC__DIRTIED_FLAG) != 0 ) && ( (flags & H5C__DELETED_FLAG) == 0 ) && - ( ! ( ( ( world_mpi_rank == 0 ) && ( entry_ptr->flushed ) ) + ( ! ( ( ( world_mpi_rank == 0 ) && ( entry_ptr->flushed ) ) || - ( ( world_mpi_rank != 0 ) && ( entry_ptr->cleared ) ) + ( ( world_mpi_rank != 0 ) && ( entry_ptr->cleared ) ) ) ) ) { @@ -5129,8 +5129,8 @@ smoke_check_5(void) if ( world_mpi_rank == world_server_mpi_rank ) { /* 1 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } if ( ! server_main() ) { @@ -5144,16 +5144,16 @@ smoke_check_5(void) } /* 2 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } } else /* run the clients */ { /* 1 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } if ( ! setup_cache_for_test(&fid, &file_ptr, &cache_ptr) ) { @@ -5168,8 +5168,8 @@ smoke_check_5(void) } /* 2 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } for ( i = 0; i < (virt_num_data_entries / 2); i++ ) @@ -5178,8 +5178,8 @@ smoke_check_5(void) } /* 3 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } /* flush the file so we can lock known clean entries. */ @@ -5192,8 +5192,8 @@ smoke_check_5(void) } /* 4 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } for ( i = 0; i < (virt_num_data_entries / 4); i++ ) @@ -5220,8 +5220,8 @@ smoke_check_5(void) } /* 5 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } for ( i = (virt_num_data_entries / 2) - 1; @@ -5256,8 +5256,8 @@ smoke_check_5(void) } /* 6 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } if ( fid >= 0 ) { @@ -5273,8 +5273,8 @@ smoke_check_5(void) } /* 7 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } /* verify that all instance of datum are back where the started @@ -5288,8 +5288,8 @@ smoke_check_5(void) } /* 8 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } /* compose the done message */ @@ -5317,8 +5317,8 @@ smoke_check_5(void) } /* 9 */ - if ( verbose ) { - HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); + if ( verbose ) { + HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); } } diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index 4c581f6..bb13d4e 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -473,7 +473,7 @@ test_chunk_alloc(void) hid_t file_id, dataset; file_id = dataset = -1; - + /* Initialize MPI */ MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c index cd4c234..e52b700 100644 --- a/tools/h5copy/h5copygentest.c +++ b/tools/h5copy/h5copygentest.c @@ -18,9 +18,17 @@ */ #include #include "hdf5.h" +#include "H5private.h" +#include "h5tools.h" -#define FILENAME "h5copytst.h5" -#define FILENAME_NEW "h5copytst_new.h5" +/* HDF file names */ +#define HDF_FILE1 "h5copytst.h5" +#define HDF_FILE1_NEW "h5copytst_new.h5" +#define HDF_FILE2 "h5copy_ref.h5" +#define HDF_EXT_SRC_FILE "h5copy_extlinks_src.h5" +#define HDF_EXT_TRG_FILE "h5copy_extlinks_trg.h5" + +/* objects in HDF_FILE1 */ #define DATASET_SIMPLE "simple" #define DATASET_CHUNK "chunk" #define DATASET_COMPACT "compact" @@ -34,6 +42,13 @@ #define TRUE 1 #define FALSE 0 +/* Obj reference */ +#define OBJ_REF_DS "Dset1" +#define OBJ_REF_GRP "Group" +/* Region reference */ +#define REG_REF_DS1 "Dset_REGREF" +#define REG_REF_DS2 "Dset2" + /*------------------------------------------------------------------------- * Function: gent_simple @@ -213,7 +228,8 @@ static void gent_compressed(hid_t loc_id) /*------------------------------------------------------------------------- * Function: gent_named_vl * - * Purpose: Generate a variable lenght named datatype for a dataset in LOC_ID + * Purpose: Generate a variable lenght named datatype for a dataset in + LOC_ID * *------------------------------------------------------------------------- */ @@ -389,37 +405,518 @@ static void gent_nested_group(hid_t loc_id) H5Gclose(gid); } + /*------------------------------------------------------------------------- - * Function: main + * Function: gen_obj_ref * - *------------------------------------------------------------------------- - */ + * Purpose: Generate object references to dataset and group + * + * Programmer: Jonathan Kim (Feb 23, 2010) + *------------------------------------------------------------------------*/ +static herr_t gen_obj_ref(hid_t loc_id) +{ + hid_t sid=0, oid=0; + hsize_t dims1[1]={3}; + hsize_t dims2[1]={2}; + int data[3] = {10,20,30}; + int status; + herr_t ret = SUCCEED; + + /*-------------- + * add dataset */ + sid = H5Screate_simple(1, dims1, NULL); + if (sid < 0) + { + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } -int main(void) + oid = H5Dcreate2 (loc_id, OBJ_REF_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (oid < 0) + { + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + H5Dclose(oid); + H5Sclose(sid); + + /*-------------- + * add group */ + oid = H5Gcreate2 (loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (oid < 0) + { + fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + H5Gclose(oid); + + /*--------------------- + * create obj references to the previously created objects. + * Passing -1 as reference is an object.*/ + hobj_ref_t or_data[2]; /* write buffer */ + + status = H5Rcreate (&or_data[0], loc_id, OBJ_REF_DS, H5R_OBJECT, -1); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + status = H5Rcreate (&or_data[1], loc_id, OBJ_REF_GRP, H5R_OBJECT, -1); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + sid = H5Screate_simple (1, dims2, NULL); + if (sid < 0) + { + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + oid = H5Dcreate2 (loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); + if (oid < 0) + { + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, or_data); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + +out: + if(oid > 0) + H5Dclose(oid); + if(sid > 0) + H5Sclose(sid); + + return ret; +} + + +/*------------------------------------------------------------------------- + * Function: gen_region_ref + * + * Purpose: Generate dataset region references + * + * Programmer: Jonathan Kim (Feb 23, 2010) + *------------------------------------------------------------------------*/ +static herr_t gen_region_ref(hid_t loc_id) +{ + hid_t sid=0, oid1=0, oid2=0; + int status; + herr_t ret = SUCCEED; + char data[3][16] = {"The quick brown", "fox jumps over ", "the 5 lazy dogs"}; + hsize_t dims2[2] = {3,16}; + hsize_t coords[4][2] = { {0,1}, {2,11}, {1,0}, {2,4} }; + hdset_reg_ref_t rr_data[2]; + hsize_t start[2] = {0,0}; + hsize_t stride[2] = {2,11}; + hsize_t count[2] = {2,2}; + hsize_t block[2] = {1,3}; + hsize_t dims1[1] = {2}; + + sid = H5Screate_simple (2, dims2, NULL); + if (sid < 0) + { + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* create normal dataset which is refered */ + oid2 = H5Dcreate2 (loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); + if (oid2 < 0) + { + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* write values to dataset */ + status = H5Dwrite (oid2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* select elements space for reference */ + status = H5Sselect_elements (sid, H5S_SELECT_SET, 4, coords[0]); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* create region reference from elements space */ + status = H5Rcreate (&rr_data[0], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* select hyperslab space for reference */ + status = H5Sselect_hyperslab (sid, H5S_SELECT_SET, start, stride, count, block); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* create region reference from hyperslab space */ + status = H5Rcreate (&rr_data[1], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + H5Sclose (sid); + + /* Create dataspace. */ + sid = H5Screate_simple (1, dims1, NULL); + if (sid < 0) + { + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* create region reference dataset */ + oid1 = H5Dcreate2 (loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); + if (oid1 < 0) + { + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* write data as region references */ + status = H5Dwrite (oid1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + +out: + if (oid1 > 0) + H5Dclose (oid1); + if (oid2 > 0) + H5Dclose (oid2); + if (sid > 0) + H5Sclose (sid); + + return ret; +} + +/*------------------------------------------------------------------------- + * Function: Test_Obj_Copy + * + * Purpose: Testing with various objects + * + *------------------------------------------------------------------------*/ +static void Test_Obj_Copy() { - hid_t fid; /* File id */ - hid_t fapl_new; /* File access property id */ - hbool_t new_format; /* New format or old format */ + hid_t fid = (-1); /* File id */ + hid_t fapl_new = (-1); /* File access property id */ + hbool_t new_format; /* New format or old format */ - fapl_new = H5Pcreate(H5P_FILE_ACCESS); - H5Pset_libver_bounds(fapl_new, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); + if((fapl_new = H5Pcreate(H5P_FILE_ACCESS)) < 0) { + fprintf(stderr, "Error: H5Pcreate failed.\n"); + goto out; + } + if(H5Pset_libver_bounds(fapl_new, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) { + fprintf(stderr, "Error: H5Pset_libver_bounds failed.\n"); + goto out; + } /* Test with old & new format groups */ for(new_format = FALSE; new_format <= TRUE; new_format++) { /* Set the FAPL for the type of format */ + /* Create source file */ if(new_format) - fid = H5Fcreate(FILENAME_NEW, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_new); + fid = H5Fcreate(HDF_FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_new); else - fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + fid = H5Fcreate(HDF_FILE1_NEW, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if(fid < 0) { + fprintf(stderr, "Error: H5Fcreate failed.\n"); + goto out; + } + + gent_datasets(fid); + gent_empty_group(fid); + gent_nested_datasets(fid); + gent_nested_group(fid); + + H5Fclose(fid); + fid = (-1); + } /* end for */ + +out: + /*----------------------------------------------------------------------- + * Close + *------------------------------------------------------------------------*/ + if(fid > 0) + H5Fclose(fid); + if(fapl_new > 0) + H5Pclose(fapl_new); +} - gent_datasets(fid); - gent_empty_group(fid); - gent_nested_datasets(fid); - gent_nested_group(fid); - H5Fclose(fid); +/*------------------------------------------------------------------------- + * Function: Test_Ref_Copy + * + * Purpose: Testing with various references + * + *------------------------------------------------------------------------*/ +static void Test_Ref_Copy() +{ + hid_t fid=0; + herr_t status; + + fid = H5Fcreate (HDF_FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE2); + goto out; } - H5Pclose(fapl_new); + + /* add object reference */ + status = gen_obj_ref(fid); + if (status < 0) + fprintf(stderr, "Failed to generate object reference.\n"); + + /* add region reference */ + status = gen_region_ref(fid); + if (status < 0) + fprintf(stderr, "Failed to generate region reference.\n"); + +out: + /*----------------------------------------------------------------------- + * Close + *------------------------------------------------------------------------*/ + if(fid > 0) + H5Fclose(fid); +} + +/*------------------------------------------------------------------------- + * Function: gen_extlink_trg + * + * Purpose: generate target external link objs + * + * Programmer: Jonathan Kim (March 03, 2010) + *------------------------------------------------------------------------*/ +static herr_t gen_extlink_trg(hid_t loc_id) +{ + hid_t gid=0, tid=0; + int status; + herr_t ret = SUCCEED; + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + /*-------------- + * target file */ + gid = H5Gcreate2(loc_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid < 0) + { + fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /*-------------- + * add dataset */ + gent_simple(loc_id); + + /*-------------------- + * add named datatype + */ + tid = H5Tcopy(H5T_NATIVE_INT); + status = H5Tcommit2(loc_id, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + +out: + if(gid > 0) + H5Gclose(gid); + if(tid > 0) + H5Tclose(tid); + + return ret; +} + +/*------------------------------------------------------------------------- + * Function: gen_extlink_src + * + * Purpose: generate source external link objs + * + * Programmer: Jonathan Kim (March 03, 2010) + *------------------------------------------------------------------------*/ +static herr_t gen_extlink_src(hid_t loc_id) +{ + hid_t gid=0; + int status; + herr_t ret = SUCCEED; + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + gid = H5Gcreate2(loc_id, "/group_ext", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid < 0) + { + fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * External links + *------------------------------------------------------------------------*/ + /* link to dataset */ + status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/simple", gid, "extlink_dset", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* link to group */ + status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/group", gid, "extlink_grp", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* link to datatype */ + status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/datatype", gid, "extlink_datatype", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* dangling link - no obj*/ + status = H5Lcreate_external(HDF_EXT_TRG_FILE, "notyet", gid, "extlink_notyet1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + + /* dangling link - no file */ + status = H5Lcreate_external("notyet_file.h5", "notyet", gid, "extlink_notyet2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__); + ret = FAIL; + goto out; + } + +out: + if(gid > 0) + H5Gclose(gid); + + return ret; +} + +/*------------------------------------------------------------------------- + * Function: Test_Extlink_Copy + * + * Purpose: gerenate external link files + * + *------------------------------------------------------------------------*/ +static void Test_Extlink_Copy() +{ + hid_t fid1=0; + hid_t fid2=0; + herr_t status; + + fid1 = H5Fcreate (HDF_EXT_SRC_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_SRC_FILE); + goto out; + } + + fid2 = H5Fcreate (HDF_EXT_TRG_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_TRG_FILE); + goto out; + } + + /* add links to source external link file */ + status = gen_extlink_src(fid1); + if (status < 0) + fprintf(stderr, "Error: %s> gen_extlink_src failed.\n", HDF_EXT_SRC_FILE); + + /* add objs to target external link file */ + status = gen_extlink_trg(fid2); + if (status < 0) + fprintf(stderr, "Error: %s> gen_extlink_trg failed.\n", HDF_EXT_TRG_FILE); + +out: + /*----------------------------------------------------------------------- + * Close + *------------------------------------------------------------------------*/ + if(fid1 > 0) + H5Fclose(fid1); + if(fid2 > 0) + H5Fclose(fid2); +} + +/*------------------------------------------------------------------------- + * Function: main + * + *------------------------------------------------------------------------- + */ + +int main(void) +{ + Test_Obj_Copy(); + Test_Ref_Copy(); + Test_Extlink_Copy(); return 0; } diff --git a/tools/h5copy/testfiles/h5copy_extlinks_src.h5 b/tools/h5copy/testfiles/h5copy_extlinks_src.h5 new file mode 100644 index 0000000..7b8621e Binary files /dev/null and b/tools/h5copy/testfiles/h5copy_extlinks_src.h5 differ diff --git a/tools/h5copy/testfiles/h5copy_extlinks_src.out.ls b/tools/h5copy/testfiles/h5copy_extlinks_src.out.ls new file mode 100644 index 0000000..a9927f8 --- /dev/null +++ b/tools/h5copy/testfiles/h5copy_extlinks_src.out.ls @@ -0,0 +1,42 @@ +############################# +Expected output for 'h5ls ./testfiles/h5copy_extlinks_src.out.h5' +############################# +Opened "./testfiles/h5copy_extlinks_src.out.h5" with sec2 driver. +/ Group + Location: 1:96 + Links: 1 +/copy1_dset Dataset {6/6} + Location: 1:800 + Links: 1 + Storage:
+ Type: 32-bit little-endian integer +/copy1_group Group + Location: 1:4344 + Links: 1 +/copy1_group/extlink_datatype External Link {h5copy_extlinks_trg.h5//datatype} +/copy1_group/extlink_dset External Link {h5copy_extlinks_trg.h5//simple} +/copy1_group/extlink_grp External Link {h5copy_extlinks_trg.h5//group} +/copy1_group/extlink_notyet1 External Link {h5copy_extlinks_trg.h5//notyet} +/copy1_group/extlink_notyet2 External Link {notyet_file.h5//notyet} +/copy2_dset Dataset {6/6} + Location: 1:4216 + Links: 1 + Storage:
+ Type: 32-bit little-endian integer +/copy2_group Group + Location: 1:4712 + Links: 1 +/copy2_group/extlink_datatype Type + Location: 1:5912 + Links: 1 + Type: shared-1:5912 32-bit little-endian integer +/copy2_group/extlink_dset Dataset {6/6} + Location: 1:5080 + Links: 1 + Storage:
+ Type: 32-bit little-endian integer +/copy2_group/extlink_grp Group + Location: 1:5872 + Links: 1 +/copy2_group/extlink_notyet1 External Link {h5copy_extlinks_trg.h5//notyet} +/copy2_group/extlink_notyet2 External Link {notyet_file.h5//notyet} diff --git a/tools/h5copy/testfiles/h5copy_extlinks_trg.h5 b/tools/h5copy/testfiles/h5copy_extlinks_trg.h5 new file mode 100644 index 0000000..3a0242d Binary files /dev/null and b/tools/h5copy/testfiles/h5copy_extlinks_trg.h5 differ diff --git a/tools/h5copy/testfiles/h5copy_ref.h5 b/tools/h5copy/testfiles/h5copy_ref.h5 new file mode 100644 index 0000000..bd727e6 Binary files /dev/null and b/tools/h5copy/testfiles/h5copy_ref.h5 differ diff --git a/tools/h5copy/testfiles/h5copy_ref.out.ls b/tools/h5copy/testfiles/h5copy_ref.out.ls new file mode 100644 index 0000000..8549842 --- /dev/null +++ b/tools/h5copy/testfiles/h5copy_ref.out.ls @@ -0,0 +1,34 @@ +############################# +Expected output for 'h5ls ./testfiles/h5copy_ref.out.h5' +############################# +Opened "./testfiles/h5copy_ref.out.h5" with sec2 driver. +/ Group + Location: 1:96 + Links: 1 +/COPY Group + Location: 1:1464 + Links: 1 +/COPY/Dset1 Dataset {3/3} + Location: 1:1504 + Links: 2 + Storage:
+ Type: 32-bit little-endian integer +/COPY/Dset2 Dataset {3/3, 16/16} + Location: 1:1960 + Links: 3 + Storage:
+ Type: 8-bit integer +/COPY/Dset_OBJREF Dataset {2/2} + Location: 1:5184 + Links: 1 + Storage:
+ Type: object reference +/COPY/Dset_REGREF Dataset {2/2} + Location: 1:9400 + Links: 1 + Storage:
+ Type: dataset region reference +/COPY/Group Group + Location: 1:2096 + Links: 3 +/~obj_pointed_by_2096 Group, same as /COPY/Group diff --git a/tools/h5copy/testfiles/h5copytst.out.ls b/tools/h5copy/testfiles/h5copytst.out.ls index 5ff1e90..af6cd8f 100644 --- a/tools/h5copy/testfiles/h5copytst.out.ls +++ b/tools/h5copy/testfiles/h5copytst.out.ls @@ -1,7 +1,7 @@ ############################# -Expected output for 'h5ls ../testfiles/h5copytst.out.h5' +Expected output for 'h5ls ./testfiles/h5copytst.out.h5' ############################# -Opened "../testfiles/h5copytst.out.h5" with sec2 driver. +Opened "./testfiles/h5copytst.out.h5" with sec2 driver. / Group Location: 1:96 Links: 1 diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh index c330602..4292757 100644 --- a/tools/h5copy/testh5copy.sh +++ b/tools/h5copy/testh5copy.sh @@ -23,6 +23,12 @@ TESTNAME=h5copy EXIT_SUCCESS=0 EXIT_FAILURE=1 +# Test files +HDF_FILE1=h5copytst.h5 +HDF_FILE2=h5copy_ref.h5 +HDF_EXT_SRC_FILE=h5copy_extlinks_src.h5 +HDF_EXT_TRG_FILE=h5copy_extlinks_trg.h5 + H5COPY=h5copy # The tool name H5COPY_BIN=`pwd`/$H5COPY # The path of the tool binary H5DIFF=h5diff # The h5diff tool name @@ -30,21 +36,27 @@ H5DIFF_BIN=`pwd`/../h5diff/$H5DIFF # The path of the h5diff tool binary H5LS=h5ls # The h5ls tool name H5LS_ARGS=-Svr # Arguments to the h5ls tool H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary +CMP='cmp -s' +DIFF='diff -c' nerrors=0 verbose=yes -INDIR=$srcdir/testfiles -OUTDIR=../testfiles -CMP='cmp -s' -DIFF='diff -c' - # The build (current) directory might be different than the source directory. if test -z "$srcdir"; then srcdir=. fi +INDIR=$srcdir/testfiles +OUTDIR=./testfiles + test -d $OUTDIR || mkdir $OUTDIR +# Print a "SKIP" message +SKIP() { + TESTING $H5COPY $@ + echo " -SKIP-" +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". TESTING() @@ -241,10 +253,10 @@ H5LSTEST() # # Assumed arguments: # -COPYOBJECTS() +COPY_OBJECTS() { - TESTFILE="$INDIR/$1" - FILEOUT="$OUTDIR/`basename $1 .h5`.out.h5" + TESTFILE="$INDIR/$HDF_FILE1" + FILEOUT="$OUTDIR/`basename $HDF_FILE1 .h5`.out.h5" # Remove any output file left over from previous test run rm -f $FILEOUT @@ -296,11 +308,90 @@ COPYOBJECTS() fi } +# Copy references in various way. +# adding to the destination file each time compare the result +# +# Assumed arguments: +# +COPY_REFERENCES() +{ + TESTFILE="$INDIR/$HDF_FILE2" + FILEOUT="$OUTDIR/`basename $HDF_FILE2 .h5`.out.h5" + + # Remove any output file left over from previous test run + rm -f $FILEOUT + + echo "Test copying object and region references" + TOOLTEST -f ref -i $TESTFILE -o $FILEOUT -v -s / -d /COPY + + # Verify that the file created above is correct + H5LSTEST $FILEOUT + + # Remove output file created, if the "no cleanup" environment variable is + # not defined + if test -z "$HDF5_NOCLEANUP"; then + rm -f $FILEOUT + fi +} + +# Copy external links. +# adding to the destination file each time compare the result +# +# Assumed arguments: +# +COPY_EXT_LINKS() +{ + TESTFILE="$INDIR/$HDF_EXT_SRC_FILE" + FILEOUT="$OUTDIR/`basename $HDF_EXT_SRC_FILE .h5`.out.h5" + + # Remove any output file left over from previous test run + rm -f $FILEOUT + + echo "Test copying external link directly without -f ext" + TOOLTEST -v -i $TESTFILE -o $FILEOUT -s /group_ext/extlink_dset -d /copy1_dset + + echo "Test copying external link directly with -f ext" + TOOLTEST -f ext -i $TESTFILE -o $FILEOUT -v -s /group_ext/extlink_dset -d /copy2_dset + + echo "Test copying dangling external link (no obj) directly without -f ext" + #TOOLTEST -i $TESTFILE -o $FILEOUT -v -s /copy2_group/extlink_notyet1 -d /copy2_dangle1 + SKIP -s /copy2_group/extlink_notyet1 -d /copy2_dangle1 + + echo "Test copying dangling external link (no obj) directly with -f ext" + #TOOLTEST -f ext -i $TESTFILE -o $FILEOUT -v -s /copy2_group/extlink_notyet1 -d /copy2_dangle1 + SKIP -f ext -s /copy2_group/extlink_notyet1 -d /copy2_dangle1 + + echo "Test copying dangling external link (no file) directly without -f ext" + #TOOLTEST -i $TESTFILE -o $FILEOUT -v -s /copy2_group/extlink_notyet2 -d /copy2_dangle2 + SKIP -s /copy2_group/extlink_notyet2 -d /copy2_dangle2 + + echo "Test copying dangling external link (no file) directly with -f ext" + #TOOLTEST -f ext -i $TESTFILE -o $FILEOUT -v -s /copy2_group/extlink_notyet2 -d /copy2_dangle2 + SKIP -f ext -s /copy2_group/extlink_notyet2 -d /copy2_dangle2 + + echo "Test copying a group contains external links without -f ext" + TOOLTEST -v -i $TESTFILE -o $FILEOUT -s /group_ext -d /copy1_group + + echo "Test copying a group contains external links with -f ext" + TOOLTEST -f ext -i $TESTFILE -o $FILEOUT -v -f ext -s /group_ext -d /copy2_group + + # Verify that the file created above is correct + H5LSTEST $FILEOUT + + # Remove output file created, if the "no cleanup" environment variable is + # not defined + if test -z "$HDF5_NOCLEANUP"; then + rm -f $FILEOUT + fi +} + ############################################################################## ### T H E T E S T S ### ############################################################################## -COPYOBJECTS h5copytst.h5 +COPY_OBJECTS +COPY_REFERENCES +COPY_EXT_LINKS # Add newline for nicer formatting echo " " diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index 64b0097..75e1774 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -31,7 +31,7 @@ const char *progname = "h5diff"; * Command-line options: The user can specify short or long-named * parameters. */ -static const char *s_opts = "hVrvqn:d:p:Ncl"; +static const char *s_opts = "hVrvqn:d:p:Nc"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "version", no_arg, 'V' }, @@ -44,7 +44,8 @@ static struct long_options l_opts[] = { { "nan", no_arg, 'N' }, { "compare", no_arg, 'c' }, { "use-system-epsilon", no_arg, 'e' }, - { "link-follow", no_arg, 'l' }, + { "follow-links", no_arg, 'l' }, + { "no-dangling-links", no_arg, 'x' }, { NULL, 0, '\0' } }; @@ -102,7 +103,10 @@ void parse_command_line(int argc, options->m_report = 1; break; case 'l': - options->linkfollow = 1; + options->follow_links = 1; + break; + case 'x': + options->no_dangle_links = 1; break; case 'd': options->d=1; @@ -114,7 +118,7 @@ void parse_command_line(int argc, h5diff_exit(EXIT_FAILURE); } options->delta = atof( opt_arg ); - + /* -d 0 is the same as default */ if (options->delta == 0) options->d=0; @@ -227,8 +231,8 @@ void parse_command_line(int argc, printf("--------------------------------\n"); printf("Use -c for a list of objects.\n"); } - - + + } } @@ -356,33 +360,68 @@ void usage(void) printf(" file2 File name of the second HDF5 file\n"); printf(" [obj1] Name of an HDF5 object, in absolute path\n"); printf(" [obj2] Name of an HDF5 object, in absolute path\n"); - + printf("\n"); printf(" OPTIONS\n"); - - printf(" -h, --help Print a usage message and exit\n"); - printf(" -V, --version Print version number and exit\n"); - printf(" -r, --report Report mode. Print differences\n"); - printf(" -v, --verbose Verbose mode. Print differences, list of objects\n"); - printf(" -q, --quiet Quiet mode. Do not do output\n"); - printf(" -l, --link-follow Follow link(s)\n"); + printf(" -h, --help Print a usage message and exit.\n"); + printf(" -V, --version Print version number and exit.\n"); + printf(" -r, --report Report mode. Print differences.\n"); + printf(" -v, --verbose Verbose mode. Print differences, list of objects.\n"); + printf(" -q, --quiet Quiet mode. Do not produce output.\n"); + printf(" --follow-links Follow symbolic links (soft links and external links)\n"); + printf(" and compare the links' target objects.\n"); + printf(" If symbolic link(s) with the same name exist in the\n"); + printf(" files being compared, then determine whether the \n"); + printf(" target of each link is an existing object (dataset,\n"); + printf(" group, or named datatype) or the link is a dangling\n"); + printf(" link (a soft or external link pointing to a target\n"); + printf(" object that does not yet exist).\n"); + printf(" - If both symbolic links are dangling links, they\n"); + printf(" are treated as being the same; by default, h5diff\n"); + printf(" returns an exit code of 0. If, however, \n"); + printf(" --no-dangling-links is used with --follow-links, \n"); + printf(" this situation is treated as an error and h5diff \n"); + printf(" returns an exit code of 2.\n"); + printf(" - If only one of the two links is a dangling link,\n"); + printf(" they are treated as being different and h5diff \n"); + printf(" returns an exit code of 1. If, however, \n"); + printf(" --no-dangling-links is used with --follow-links, \n"); + printf(" this situation is treated as an error and h5diff \n"); + printf(" returns an exit code of 2.\n"); + printf(" - If both symbolic links point to existing objects,\n"); + printf(" h5diff compares the two objects.\n"); + printf(" If any symbolic link specified in the call to h5diff\n"); + printf(" does not exist, h5diff treats it as an error and\n"); + printf(" returns an exit code of 2.\n"); + printf(" --no-dangling-links Must be used with --follow-links option;\n"); + printf(" otherwise, h5diff shows error message and returns\n"); + printf(" an exit code of 2.\n"); + printf(" Check for any symbolic links (soft links or external\n"); + printf(" links) that do not resolve to an existing object\n"); + printf(" (dataset, group, or named datatype). If any\n"); + printf(" dangling link is found, this situation is treated as\n"); + printf(" an error and h5diff returns an exit code of 2.\n"); printf(" -c, --compare List objects that are not comparable\n"); printf(" -N, --nan Avoid NaNs detection\n"); - printf(" -n C, --count=C Print differences up to C number, C is a positive integer.\n"); - - printf(" -d D, --delta=D Print difference if (|a-b| > D), D is a positive number.\n"); - printf(" -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number.\n"); + printf(" -n C, --count=C Print differences up to C number, C is a positive\n"); + printf(" integer.\n"); + printf(" -d D, --delta=D Print difference if (|a-b| > D), D is a positive\n"); + printf(" number.\n"); + printf(" -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive\n"); + printf(" number.\n"); printf(" --use-system-epsilon Print difference if (|a-b| > EPSILON),\n"); - printf(" where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. \n"); - printf(" If the system epsilon is not defined, use the value below:\n"); + printf(" where EPSILON (FLT_EPSILON or FLT_EPSILON) is the\n"); + printf(" system epsilon value. \n"); + printf(" If the system epsilon is not defined, use the value\n"); + printf(" below:\n"); printf(" FLT_EPSILON = 1.19209E-07 for float\n"); printf(" DBL_EPSILON = 2.22045E-16 for double\n"); - - printf(" -d, -p, and --use-system-epsilon options are used for comparing floating point values.\n"); - printf(" By default, strict equality is used. Use -p or -d to set specific tolerance.\n"); + printf(" -d, -p, and --use-system-epsilon options are used for\n"); + printf(" comparing floating point values.\n"); + printf(" By default, strict equality is used. Use -p or -d to\n"); + printf(" set specific tolerance.\n"); printf("\n"); printf(" Modes of output:\n"); - printf("\n"); printf(" Default mode: print the number of differences found and where they occured\n"); printf(" -r Report mode: print the above plus the differences\n"); printf(" -v Verbose mode: print the above plus a list of objects and warnings\n"); @@ -391,46 +430,35 @@ void usage(void) printf("\n"); printf(" Compare criteria\n"); - printf("\n"); - printf(" If no objects [obj1[obj2]] are specified, h5diff only compares objects\n"); - printf(" with the same absolute path in both files\n"); + printf(" If no objects [obj1[obj2]] are specified, h5diff only compares objects\n"); + printf(" with the same absolute path in both files\n"); printf("\n"); printf(" The compare criteria is:\n"); - printf(" 1) datasets: numerical array differences 2) groups: name string difference\n"); - printf(" 3) datatypes: the return value of H5Tequal 4) links: name string difference\n"); - printf(" of the linked value\n"); - + printf(" 1) datasets: numerical array differences\n"); + printf(" 2) groups: name string difference\n"); + printf(" 3) datatypes: the return value of H5Tequal\n"); + printf(" 4) links: name string difference of the linked value as default\n"); + printf(" (refer to --follow-links option).\n"); printf("\n"); - - printf(" Return exit code:\n"); - printf("\n"); - printf(" 1 if differences found, 0 if no differences, 2 if error\n"); - + printf(" Exit code:\n"); + printf(" 0 if no differences, 1 if differences found, 2 if error\n"); printf("\n"); - printf(" Examples of use:\n"); - printf("\n"); printf(" 1) h5diff file1 file2 /g1/dset1 /g1/dset2\n"); - printf("\n"); printf(" Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2\n"); printf("\n"); printf(" 2) h5diff file1 file2 /g1/dset1\n"); - printf("\n"); printf(" Compares object '/g1/dset1' in both files\n"); printf("\n"); printf(" 3) h5diff file1 file2\n"); - printf("\n"); printf(" Compares all objects in both files\n"); printf("\n"); - printf(" Note) file1 and file2 can be the same file. Use\n"); - printf("\n"); - printf(" h5diff file1 file1 /g1/dset1 /g1/dset2\n"); + printf(" Notes:\n"); + printf(" file1 and file2 can be the same file.\n"); + printf(" Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare\n"); + printf(" '/g1/dset1' and '/g1/dset2' in the same file\n"); printf("\n"); - printf(" to compare '/g1/dset1' and '/g1/dset2' in the same file\n"); - printf("\n"); - - } diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c index 1cb8f2f..8089161 100644 --- a/tools/h5diff/h5diff_main.c +++ b/tools/h5diff/h5diff_main.c @@ -97,6 +97,7 @@ int main(int argc, const char *argv[]) print_info(&options); +out: /*------------------------------------------------------------------------- * exit code * 1 if differences, 0 if no differences, 2 if error diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 1bfea17..60d7f94 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -43,8 +43,18 @@ #define FILE9 "h5diff_hyper1.h5" #define FILE10 "h5diff_hyper2.h5" #define FILE11 "h5diff_empty.h5" -#define FILE12 "h5diff_dset_idx1.h5" -#define FILE13 "h5diff_dset_idx2.h5" +#define FILE12 "h5diff_links.h5" +#define FILE13 "h5diff_softlinks.h5" +#define FILE14 "h5diff_linked_softlink.h5" +#define FILE15 "h5diff_extlink_src.h5" +#define FILE16 "h5diff_extlink_trg.h5" +#define FILE17 "h5diff_ext2softlink_src.h5" +#define FILE18 "h5diff_ext2softlink_trg.h5" +#define FILE19 "h5diff_dset_idx1.h5" +#define FILE20 "h5diff_dset_idx2.h5" +#define DANGLE_LINK_FILE1 "h5diff_danglelinks1.h5" +#define DANGLE_LINK_FILE2 "h5diff_danglelinks2.h5" + #define UIMAX 4294967295u /*Maximum value for a variable of type unsigned int */ #define STR_SIZE 3 #define GBLL ((unsigned long long) 1024 * 1024 *1024 ) @@ -82,6 +92,13 @@ static int test_datatypes(const char *fname); static int test_attributes(const char *fname,int make_diffs); static int test_datasets(const char *fname,int make_diffs); static int test_hyperslab(const char *fname,int make_diffs); +static int test_link_name(const char *fname1); +static int test_soft_links(const char *fname1); +static int test_linked_softlinks(const char *fname1); +static int test_external_links(const char *fname1, const char *fname2); +static int test_ext2soft_links(const char *fname1, const char *fname2); +static int test_dangle_links(const char *fname1, const char *fname2); + /* called by test_attributes() and test_datasets() */ static void write_attr_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs); static void write_dset_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs); @@ -122,14 +139,26 @@ int main(void) test_hyperslab(FILE9,0); test_hyperslab(FILE10,1); + test_link_name(FILE12); + + test_soft_links(FILE13); + + test_linked_softlinks(FILE14); + + test_external_links(FILE15, FILE16); + + test_ext2soft_links(FILE17, FILE18); + /* * Generate 2 files: FILE12 with old format; FILE13 with new format * Create 2 datasets in each file: * One dataset: chunked layout, w/o filters, fixed dimension * One dataset: chunked layout, w/ filters, fixed dimension */ - gen_dataset_idx(FILE12, 0); - gen_dataset_idx(FILE13, 1); + gen_dataset_idx(FILE19, 0); + gen_dataset_idx(FILE20, 1); + + test_dangle_links(DANGLE_LINK_FILE1, DANGLE_LINK_FILE2); return 0; } @@ -346,7 +375,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) } /*------------------------------------------------------------------------ - * INFINITY values + * INFINITY values *------------------------------------------------------------------------ */ { @@ -905,6 +934,707 @@ int test_datasets(const char *file, } /*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare links, one has longer name than +* the other and short name is subset of long name. +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_link_name(const char *fname1) +{ + hid_t fid1=0; + hid_t gid1=0; + hid_t gid2=0; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + gid1 = H5Gcreate2(fid1, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid1 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + gid2 = H5Gcreate2(fid1, "group_longname", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + if (gid2 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links + *------------------------------------------------------------------------*/ + status = H5Lcreate_soft("group", fid1, "link_g1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("group_longname", fid1, "link_g2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *------------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(gid1) + H5Gclose(gid1); + if(gid2) + H5Gclose(gid2); + + return status; +} + +/*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare soft links in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_soft_links(const char *fname1) +{ + hid_t fid1=0; + hid_t gid1=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid1 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /* file1 */ + status = write_dset(fid1,2,dims2,"target_dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + status = write_dset(fid1,2,dims2,"target_dset2",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + status = write_dset(gid1,2,dims2,"dset",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links + *------------------------------------------------------------------------*/ + /* file 1 */ + status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_dset2", fid1, "softlink_dset2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_group", fid1, "softlink_group1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_group", fid1, "softlink_group2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/no_obj", fid1, "softlink_noexist", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(gid1) + H5Gclose(gid1); + + return status; +} + +/*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare linked soft links in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_linked_softlinks(const char *fname1) +{ + hid_t fid1=0; + hid_t gid1=0; + hid_t gid2=0; + hid_t gid3=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid1 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + gid2 = H5Gcreate2(fid1, "target_group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid2 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + gid3 = H5Gcreate2(fid1, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid3 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /* file1 */ + status = write_dset(fid1,2,dims2,"target_dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + status = write_dset(fid1,2,dims2,"target_dset2",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + status = write_dset(gid1,2,dims2,"dset",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links (Linked) + *------------------------------------------------------------------------*/ + /*--------- + * file 1 */ + status = H5Lcreate_soft("/target_dset1", fid1, "softlink1_to_dset1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink1_to_dset1", fid1, "softlink1_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink1_to_slink1", fid1, "softlink1_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_dset2", fid1, "softlink2_to_dset2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink2_to_dset2", fid1, "softlink2_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink2_to_slink1", fid1, "softlink2_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("target_group1", fid1, "softlink3_to_group1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink3_to_group1", fid1, "softlink3_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink3_to_slink1", fid1, "softlink3_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("target_group2", fid1, "softlink4_to_group2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink4_to_group2", fid1, "softlink4_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink4_to_slink1", fid1, "softlink4_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(gid1) + H5Gclose(gid1); + if(gid2) + H5Gclose(gid2); + if(gid3) + H5Gclose(gid3); + + return status; +} + +/*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare external links in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_external_links(const char *fname1, const char *fname2) +{ + hid_t fid1=0; + hid_t fid2=0; + hid_t gid1=0; + hid_t gid2=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + /* source file */ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /* target file */ + fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + /*-------------- + * target file */ + gid1 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid1 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + status = FAIL; + goto out; + } + + gid2 = H5Gcreate2(fid2, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid2 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + status = FAIL; + goto out; + } + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /*-------------- + * target file */ + status = write_dset(fid2,2,dims2,"target_dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + status = write_dset(gid1,2,dims2,"x_dset",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + status = write_dset(gid2,2,dims2,"x_dset",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * External Links + *------------------------------------------------------------------------*/ + /*-------------- + /* source file */ + status = H5Lcreate_external(fname2, "/target_group/x_dset", fid1, "ext_link_dset1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/target_group2/x_dset", fid1, "ext_link_dset2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/target_group", fid1, "/ext_link_grp1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/target_group2", fid1, "/ext_link_grp2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link_noexist1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link_noexist2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(fid2) + H5Fclose(fid2); + if(gid1) + H5Gclose(gid1); + if(gid2) + H5Gclose(gid2); + + return status; +} + +/*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare external links which point to +* soft link in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_ext2soft_links(const char *fname1, const char *fname2) +{ + hid_t fid1=0; + hid_t fid2=0; + hid_t gid2=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + /* source file */ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /* target file */ + fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + /* target file */ + gid2 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid2 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /*-------------- + * target file */ + status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + status = write_dset(fid2,2,dims2,"dset2",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links (Linked) + *------------------------------------------------------------------------*/ + /*--------------- + * target file */ + status = H5Lcreate_soft("/dset1", fid2, "softlink_to_dset1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/dset2", fid2, "softlink_to_dset2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * External Links + *------------------------------------------------------------------------*/ + /*--------------- + * source file */ + status = H5Lcreate_external(fname2, "/target_group", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/softlink_to_dset1", fid1, "ext_link_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/softlink_to_dset2", fid1, "ext_link_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(fid2) + H5Fclose(fid2); + if(gid2) + H5Gclose(gid2); + + return status; +} + +/*------------------------------------------------------------------------- * Function: gen_dataset_idx * * Purpose: Create a file with either the new or old format @@ -994,6 +1724,212 @@ int gen_dataset_idx(const char *file, int format) } /*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare dangling links in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_dangle_links(const char *fname1, const char *fname2) +{ + hid_t fid1=0; + hid_t fid2=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /* file1 */ + status = write_dset(fid1,2,dims2,"dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + status = write_dset(fid1,2,dims2,"dset2",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + /* file2 */ + status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + status = write_dset(fid2,2,dims2,"dset2",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links + *------------------------------------------------------------------------*/ + /* file 1 */ + status = H5Lcreate_soft("no_obj", fid1, "soft_link1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/dset1", fid1, "soft_link2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("no_obj", fid1, "soft_link3", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + /* file 2 */ + status = H5Lcreate_soft("no_obj", fid2, "soft_link1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("no_obj", fid2, "soft_link2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/dset2", fid2, "soft_link3", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * External Links + *------------------------------------------------------------------------*/ + /* file1 */ + status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/dset1", fid1, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external("no_file1.h5", "no_obj", fid1, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + /* file2 */ + status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname1, "/dset2", fid2, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_external("no_file2.h5", "no_obj", fid2, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(fid2) + H5Fclose(fid2); + + return status; +} + +/*------------------------------------------------------------------------- * Function: write_attr_in * * Purpose: write attributes in LOC_ID (dataset, group, named datatype) @@ -2486,7 +3422,7 @@ void write_dset_in(hid_t loc_id, n = 0; for(i = 0; i < 3; i++) { - for(j = 0; j < 2; j++) + for(j = 0; j < 2; j++) { buf52[i][j].p = malloc((i + 1) * sizeof(int)); buf52[i][j].len = i + 1; @@ -2532,7 +3468,7 @@ void write_dset_in(hid_t loc_id, */ - if (make_diffs) + if (make_diffs) { memset(buf72, 0, sizeof buf72); memset(buf82, 0, sizeof buf82); @@ -2602,13 +3538,13 @@ void write_dset_in(hid_t loc_id, n=1; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { - if (make_diffs) + if (make_diffs) buf23[i][j][k]=0; else buf23[i][j][k]=n++; } @@ -2635,13 +3571,13 @@ void write_dset_in(hid_t loc_id, */ n=1; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { - if (make_diffs) + if (make_diffs) { buf33[i][j][k].a=0; buf33[i][j][k].b=0; @@ -2699,7 +3635,7 @@ void write_dset_in(hid_t loc_id, { for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) + for(k = 0; k < 2; k++) { buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); buf53[i][j][k].len = i + 1; diff --git a/tools/h5diff/testfiles/h5diff_10.txt b/tools/h5diff/testfiles/h5diff_10.txt index a6b637a..aeba845 100644 --- a/tools/h5diff/testfiles/h5diff_10.txt +++ b/tools/h5diff/testfiles/h5diff_10.txt @@ -3,64 +3,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_100.txt b/tools/h5diff/testfiles/h5diff_100.txt index 32ff7ab..363daa3 100644 --- a/tools/h5diff/testfiles/h5diff_100.txt +++ b/tools/h5diff/testfiles/h5diff_100.txt @@ -1035,3 +1035,4 @@ position big big difference [ 268436478 ] 31 0 31 [ 268436479 ] 31 0 31 1024 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_101.txt b/tools/h5diff/testfiles/h5diff_101.txt index 03875b7..1d0f38d 100644 --- a/tools/h5diff/testfiles/h5diff_101.txt +++ b/tools/h5diff/testfiles/h5diff_101.txt @@ -7,3 +7,4 @@ position d1 d2 difference [ 1 1 ] 0 1e-09 1e-09 [ 2 0 ] 1e-09 0 1e-09 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_102.txt b/tools/h5diff/testfiles/h5diff_102.txt index 3d91a36..30a2491 100644 --- a/tools/h5diff/testfiles/h5diff_102.txt +++ b/tools/h5diff/testfiles/h5diff_102.txt @@ -7,3 +7,4 @@ position fp1 fp2 difference [ 1 1 ] 0 1e-05 1e-05 [ 2 0 ] 1e-05 0 1e-05 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_11.txt b/tools/h5diff/testfiles/h5diff_11.txt index e2e33fb..c06305c 100644 --- a/tools/h5diff/testfiles/h5diff_11.txt +++ b/tools/h5diff/testfiles/h5diff_11.txt @@ -1,2 +1,3 @@ dataset: and 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_12.txt b/tools/h5diff/testfiles/h5diff_12.txt index 6b4c747..371df79 100644 --- a/tools/h5diff/testfiles/h5diff_12.txt +++ b/tools/h5diff/testfiles/h5diff_12.txt @@ -1,2 +1,3 @@ dataset: and 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_13.txt b/tools/h5diff/testfiles/h5diff_13.txt index 36676e9..729859b 100644 --- a/tools/h5diff/testfiles/h5diff_13.txt +++ b/tools/h5diff/testfiles/h5diff_13.txt @@ -8,3 +8,4 @@ position dset1 dset1 difference [ 1 1 ] 1 1.001 0.001 [ 2 1 ] 0 1 1 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_14.txt b/tools/h5diff/testfiles/h5diff_14.txt index 3fac3af..454463a 100644 --- a/tools/h5diff/testfiles/h5diff_14.txt +++ b/tools/h5diff/testfiles/h5diff_14.txt @@ -8,3 +8,4 @@ position dset1 dset2 difference [ 1 1 ] 1 1.001 0.001 [ 2 1 ] 0 1 1 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_15.txt b/tools/h5diff/testfiles/h5diff_15.txt index 386c6e1..7685f75 100644 --- a/tools/h5diff/testfiles/h5diff_15.txt +++ b/tools/h5diff/testfiles/h5diff_15.txt @@ -7,3 +7,4 @@ position dset3 dset4 difference [ 2 0 ] 100 80 20 [ 2 1 ] 100 40 60 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_16_1.txt b/tools/h5diff/testfiles/h5diff_16_1.txt index 519f695..482a42f 100644 --- a/tools/h5diff/testfiles/h5diff_16_1.txt +++ b/tools/h5diff/testfiles/h5diff_16_1.txt @@ -8,3 +8,4 @@ position dset5 dset6 difference relative [ 1 1 ] 0 100 100 not comparable [ 2 1 ] 100 50 50 0.500000 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_16_2.txt b/tools/h5diff/testfiles/h5diff_16_2.txt index 233b133..34c1afb 100644 --- a/tools/h5diff/testfiles/h5diff_16_2.txt +++ b/tools/h5diff/testfiles/h5diff_16_2.txt @@ -8,3 +8,4 @@ position dset7 dset8 difference relative [ 1 1 ] 0 100 100 not comparable [ 2 1 ] 100 50 50 0.500000 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_16_3.txt b/tools/h5diff/testfiles/h5diff_16_3.txt index b96c8a4..173a39b 100644 --- a/tools/h5diff/testfiles/h5diff_16_3.txt +++ b/tools/h5diff/testfiles/h5diff_16_3.txt @@ -8,3 +8,4 @@ position dset9 dset10 difference relative [ 1 1 ] 0 100 100 not comparable [ 2 1 ] 100 50 50 0.5 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_17.txt b/tools/h5diff/testfiles/h5diff_17.txt index dce5ef5..5cb604d 100644 --- a/tools/h5diff/testfiles/h5diff_17.txt +++ b/tools/h5diff/testfiles/h5diff_17.txt @@ -51,3 +51,4 @@ position dset1 dset1 difference [ 1 1 ] 1 1.001 0.001 [ 2 1 ] 0 1 1 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_171.txt b/tools/h5diff/testfiles/h5diff_171.txt index 7ee0711..5314a79 100644 --- a/tools/h5diff/testfiles/h5diff_171.txt +++ b/tools/h5diff/testfiles/h5diff_171.txt @@ -1,2 +1,3 @@ dataset: and 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_172.txt b/tools/h5diff/testfiles/h5diff_172.txt index e2d1b7d..0269194 100644 --- a/tools/h5diff/testfiles/h5diff_172.txt +++ b/tools/h5diff/testfiles/h5diff_172.txt @@ -1,2 +1,3 @@ dataset: and 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_18.txt b/tools/h5diff/testfiles/h5diff_18.txt index e69de29..1255241 100644 --- a/tools/h5diff/testfiles/h5diff_18.txt +++ b/tools/h5diff/testfiles/h5diff_18.txt @@ -0,0 +1 @@ +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_18_1.txt b/tools/h5diff/testfiles/h5diff_18_1.txt new file mode 100644 index 0000000..0067075 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_18_1.txt @@ -0,0 +1,2 @@ +Error: -q (quiet mode) cannot be added to verbose or report modes +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_19.txt b/tools/h5diff/testfiles/h5diff_19.txt index 9e84fe8..1155d55 100644 --- a/tools/h5diff/testfiles/h5diff_19.txt +++ b/tools/h5diff/testfiles/h5diff_19.txt @@ -23,3 +23,4 @@ file1 file2 group : and 0 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_20.txt b/tools/h5diff/testfiles/h5diff_20.txt index b2fda7c..6eba851 100644 --- a/tools/h5diff/testfiles/h5diff_20.txt +++ b/tools/h5diff/testfiles/h5diff_20.txt @@ -3,3 +3,4 @@ Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_200.txt b/tools/h5diff/testfiles/h5diff_200.txt index 56d723d..40e3fb6 100644 --- a/tools/h5diff/testfiles/h5diff_200.txt +++ b/tools/h5diff/testfiles/h5diff_200.txt @@ -2,3 +2,4 @@ Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_201.txt b/tools/h5diff/testfiles/h5diff_201.txt index 84d6766..ede94e1 100644 --- a/tools/h5diff/testfiles/h5diff_201.txt +++ b/tools/h5diff/testfiles/h5diff_201.txt @@ -1 +1,2 @@ Not comparable: or is an empty dataset +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_202.txt b/tools/h5diff/testfiles/h5diff_202.txt index fd4a191..53657d3 100644 --- a/tools/h5diff/testfiles/h5diff_202.txt +++ b/tools/h5diff/testfiles/h5diff_202.txt @@ -1,2 +1,3 @@ Not comparable: is of class H5T_FLOAT and is of class H5T_INTEGER Not comparable: has sign H5T_SGN_ERROR and has sign H5T_SGN_2 +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_203.txt b/tools/h5diff/testfiles/h5diff_203.txt index 496523c..61a773a 100644 --- a/tools/h5diff/testfiles/h5diff_203.txt +++ b/tools/h5diff/testfiles/h5diff_203.txt @@ -1,2 +1,3 @@ Not comparable: has rank 1, dimensions [6], max dimensions [6] and has rank 2, dimensions [3x2], max dimensions [3x2] +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_204.txt b/tools/h5diff/testfiles/h5diff_204.txt index 098a203..e02e831 100644 --- a/tools/h5diff/testfiles/h5diff_204.txt +++ b/tools/h5diff/testfiles/h5diff_204.txt @@ -1,2 +1,3 @@ Not comparable: has rank 2, dimensions [3x2], max dimensions [3x2] and has rank 2, dimensions [2x2], max dimensions [2x2] +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_205.txt b/tools/h5diff/testfiles/h5diff_205.txt index 3e2d1f2..d72797b 100644 --- a/tools/h5diff/testfiles/h5diff_205.txt +++ b/tools/h5diff/testfiles/h5diff_205.txt @@ -1,3 +1,4 @@ Not comparable: has rank 2, dimensions [2x2], max dimensions [2x2] and has rank 2, dimensions [3x2], max dimensions [3x2] Not comparable: has sign H5T_SGN_2 and has sign H5T_SGN_NONE +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_206.txt b/tools/h5diff/testfiles/h5diff_206.txt index 164aed9..659321f 100644 --- a/tools/h5diff/testfiles/h5diff_206.txt +++ b/tools/h5diff/testfiles/h5diff_206.txt @@ -1 +1,2 @@ Not comparable: has a class H5T_FLOAT and has a class H5T_INTEGER +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_207.txt b/tools/h5diff/testfiles/h5diff_207.txt index bb8e23f..1ef3dbe 100644 --- a/tools/h5diff/testfiles/h5diff_207.txt +++ b/tools/h5diff/testfiles/h5diff_207.txt @@ -1,2 +1,3 @@ Not comparable: or is an empty dataset Not comparable: has 2 members has 1 members +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_21.txt b/tools/h5diff/testfiles/h5diff_21.txt index 5518e0c..238c8b8 100644 --- a/tools/h5diff/testfiles/h5diff_21.txt +++ b/tools/h5diff/testfiles/h5diff_21.txt @@ -3,3 +3,4 @@ Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_22.txt b/tools/h5diff/testfiles/h5diff_22.txt index 0f9493b..33c3a3d 100644 --- a/tools/h5diff/testfiles/h5diff_22.txt +++ b/tools/h5diff/testfiles/h5diff_22.txt @@ -3,3 +3,4 @@ Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_23.txt b/tools/h5diff/testfiles/h5diff_23.txt index 1342765..5a46ea2 100644 --- a/tools/h5diff/testfiles/h5diff_23.txt +++ b/tools/h5diff/testfiles/h5diff_23.txt @@ -1,2 +1,3 @@ group : and 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_24.txt b/tools/h5diff/testfiles/h5diff_24.txt index cc4f0d0..fa5723a 100644 --- a/tools/h5diff/testfiles/h5diff_24.txt +++ b/tools/h5diff/testfiles/h5diff_24.txt @@ -1,2 +1,3 @@ datatype: and 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_25.txt b/tools/h5diff/testfiles/h5diff_25.txt index 288c4da..e463ba1 100644 --- a/tools/h5diff/testfiles/h5diff_25.txt +++ b/tools/h5diff/testfiles/h5diff_25.txt @@ -1,2 +1,3 @@ link : and 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_26.txt b/tools/h5diff/testfiles/h5diff_26.txt index 916cf63..8e1fcc3 100644 --- a/tools/h5diff/testfiles/h5diff_26.txt +++ b/tools/h5diff/testfiles/h5diff_26.txt @@ -1,2 +1,3 @@ group : and 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_27.txt b/tools/h5diff/testfiles/h5diff_27.txt index 335119a..cbc128e 100644 --- a/tools/h5diff/testfiles/h5diff_27.txt +++ b/tools/h5diff/testfiles/h5diff_27.txt @@ -1,2 +1,3 @@ datatype: and 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_28.txt b/tools/h5diff/testfiles/h5diff_28.txt index 5845fa9..07d01fe 100644 --- a/tools/h5diff/testfiles/h5diff_28.txt +++ b/tools/h5diff/testfiles/h5diff_28.txt @@ -1,2 +1,3 @@ link : and 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_300.txt b/tools/h5diff/testfiles/h5diff_300.txt index 0cfc01b..e51643f 100755 --- a/tools/h5diff/testfiles/h5diff_300.txt +++ b/tools/h5diff/testfiles/h5diff_300.txt @@ -1,2 +1,3 @@ link : and 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_400.txt b/tools/h5diff/testfiles/h5diff_400.txt index 4b910f5..97db70d 100644 --- a/tools/h5diff/testfiles/h5diff_400.txt +++ b/tools/h5diff/testfiles/h5diff_400.txt @@ -16,29 +16,26 @@ file1 file2 group : and 0 differences found link : and -dataset: and +dataset: and 0 differences found 0 differences found link : and -dataset: and +dataset: and 0 differences found 0 differences found link : and -dataset: and +dataset: and 0 differences found 0 differences found link : and -group : and +group : and 0 differences found 0 differences found link : and -group : and +group : and 0 differences found 0 differences found -warn: link target "/no_obj" doesn't exist -warn: link target "/no_obj" doesn't exist -link : and -Comparison not supported: and are of type unknown type +dangling link: and 0 differences found dataset: and 0 differences found @@ -48,7 +45,4 @@ group : and 0 differences found dataset: and 0 differences found --------------------------------- -Some objects are not comparable --------------------------------- -Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_401.txt b/tools/h5diff/testfiles/h5diff_401.txt index 5c599e3..278729e 100644 --- a/tools/h5diff/testfiles/h5diff_401.txt +++ b/tools/h5diff/testfiles/h5diff_401.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position target_dset1 target_dset2 difference +position softlink_dset1_1 target_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position target_dset1 target_dset2 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_402.txt b/tools/h5diff/testfiles/h5diff_402.txt index 228c8cc..b0f30ca 100644 --- a/tools/h5diff/testfiles/h5diff_402.txt +++ b/tools/h5diff/testfiles/h5diff_402.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position target_dset2 target_dset1 difference +position target_dset2 softlink_dset1_1 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position target_dset2 target_dset1 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_403.txt b/tools/h5diff/testfiles/h5diff_403.txt index 5c599e3..068d01d 100644 --- a/tools/h5diff/testfiles/h5diff_403.txt +++ b/tools/h5diff/testfiles/h5diff_403.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position target_dset1 target_dset2 difference +position softlink_dset1_1 softlink_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position target_dset1 target_dset2 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_404.txt b/tools/h5diff/testfiles/h5diff_404.txt index 2a0b856..c9a476d 100644 --- a/tools/h5diff/testfiles/h5diff_404.txt +++ b/tools/h5diff/testfiles/h5diff_404.txt @@ -12,25 +12,23 @@ file1 file2 group : and 0 differences found external link: and -dataset: and +dataset: and 0 differences found 0 differences found external link: and -dataset: and +dataset: and 0 differences found 0 differences found external link: and -group : and +group : and 0 differences found 0 differences found external link: and -group : and +group : and 0 differences found 0 differences found -external link: and -Object could not be found in -Object could not be found in +dangling link: and 0 differences found -external link: and -h5diff: : unable to open file +dangling link: and 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_405.txt b/tools/h5diff/testfiles/h5diff_405.txt index edbf22a..890dd33 100644 --- a/tools/h5diff/testfiles/h5diff_405.txt +++ b/tools/h5diff/testfiles/h5diff_405.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position x_dset x_dset difference +position ext_link_dset1 x_dset difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position x_dset x_dset difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_406.txt b/tools/h5diff/testfiles/h5diff_406.txt index 7c5eb3e..7fa442a 100644 --- a/tools/h5diff/testfiles/h5diff_406.txt +++ b/tools/h5diff/testfiles/h5diff_406.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position x_dset x_dset difference +position x_dset ext_link_dset1 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position x_dset x_dset difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_407.txt b/tools/h5diff/testfiles/h5diff_407.txt index edbf22a..3693ab9 100644 --- a/tools/h5diff/testfiles/h5diff_407.txt +++ b/tools/h5diff/testfiles/h5diff_407.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position x_dset x_dset difference +position ext_link_dset1 ext_link_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position x_dset x_dset difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_408.txt b/tools/h5diff/testfiles/h5diff_408.txt index 11a928a..e941f9b 100644 --- a/tools/h5diff/testfiles/h5diff_408.txt +++ b/tools/h5diff/testfiles/h5diff_408.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position target_dset1 x_dset difference +position softlink_dset1_1 ext_link_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position target_dset1 x_dset difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_409.txt b/tools/h5diff/testfiles/h5diff_409.txt index 3b95e7c..007da7d 100644 --- a/tools/h5diff/testfiles/h5diff_409.txt +++ b/tools/h5diff/testfiles/h5diff_409.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position x_dset target_dset1 difference +position ext_link_dset2 softlink_dset1_1 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position x_dset target_dset1 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_410.txt b/tools/h5diff/testfiles/h5diff_410.txt index 8c645d2..b0924f6 100644 --- a/tools/h5diff/testfiles/h5diff_410.txt +++ b/tools/h5diff/testfiles/h5diff_410.txt @@ -24,51 +24,51 @@ file1 file2 group : and 0 differences found link : and -dataset: and +dataset: and 0 differences found 0 differences found link : and -dataset: and +dataset: and 0 differences found 0 differences found link : and -dataset: and +dataset: and 0 differences found 0 differences found link : and -dataset: and +dataset: and 0 differences found 0 differences found link : and -dataset: and +dataset: and 0 differences found 0 differences found link : and -dataset: and +dataset: and 0 differences found 0 differences found link : and -group : and +group : and 0 differences found 0 differences found link : and -group : and +group : and 0 differences found 0 differences found link : and -group : and +group : and 0 differences found 0 differences found link : and -group : and +group : and 0 differences found 0 differences found link : and -group : and +group : and 0 differences found 0 differences found link : and -group : and +group : and 0 differences found 0 differences found dataset: and @@ -83,3 +83,4 @@ group : and 0 differences found group : and 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_411.txt b/tools/h5diff/testfiles/h5diff_411.txt index 2775677..161ab34 100644 --- a/tools/h5diff/testfiles/h5diff_411.txt +++ b/tools/h5diff/testfiles/h5diff_411.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position target_dset2 softlink1_to_slink1 difference +position target_dset2 softlink1_to_slink2 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position target_dset2 softlink1_to_slink1 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_412.txt b/tools/h5diff/testfiles/h5diff_412.txt index 0924099..bb8209c 100644 --- a/tools/h5diff/testfiles/h5diff_412.txt +++ b/tools/h5diff/testfiles/h5diff_412.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position softlink1_to_slink1 target_dset2 difference +position softlink1_to_slink2 target_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position softlink1_to_slink1 target_dset2 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_413.txt b/tools/h5diff/testfiles/h5diff_413.txt index ae6cfea..8df3d51 100644 --- a/tools/h5diff/testfiles/h5diff_413.txt +++ b/tools/h5diff/testfiles/h5diff_413.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position softlink1_to_slink1 softlink2_to_slink1 difference +position softlink1_to_slink2 softlink2_to_slink2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position softlink1_to_slink1 softlink2_to_slink1 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_414.txt b/tools/h5diff/testfiles/h5diff_414.txt index 0f07a14..e7a991a 100644 --- a/tools/h5diff/testfiles/h5diff_414.txt +++ b/tools/h5diff/testfiles/h5diff_414.txt @@ -1,2 +1,3 @@ -group : and +group : and 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_415.txt b/tools/h5diff/testfiles/h5diff_415.txt index 3a9d863..1e97319 100644 --- a/tools/h5diff/testfiles/h5diff_415.txt +++ b/tools/h5diff/testfiles/h5diff_415.txt @@ -1,2 +1,3 @@ -group : and +group : and 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_416.txt b/tools/h5diff/testfiles/h5diff_416.txt index 39d88bc..e4e98b0 100644 --- a/tools/h5diff/testfiles/h5diff_416.txt +++ b/tools/h5diff/testfiles/h5diff_416.txt @@ -1,2 +1,3 @@ -group : and +group : and 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_417.txt b/tools/h5diff/testfiles/h5diff_417.txt index 56031e9..0ea2542 100644 --- a/tools/h5diff/testfiles/h5diff_417.txt +++ b/tools/h5diff/testfiles/h5diff_417.txt @@ -1,6 +1,3 @@ -warn: link target "/no_obj" doesn't exist - is of type unknown type and is of type H5G_DATASET --------------------------------- -Some objects are not comparable --------------------------------- -Use -c for a list of objects. +obj1 is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_418.txt b/tools/h5diff/testfiles/h5diff_418.txt index 0222174..46222bb 100644 --- a/tools/h5diff/testfiles/h5diff_418.txt +++ b/tools/h5diff/testfiles/h5diff_418.txt @@ -1,6 +1,3 @@ -warn: link target "/no_obj" doesn't exist - is of type H5G_DATASET and is of type unknown type --------------------------------- -Some objects are not comparable --------------------------------- -Use -c for a list of objects. +obj2 is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_419.txt b/tools/h5diff/testfiles/h5diff_419.txt index 836e95f..387c600 100644 --- a/tools/h5diff/testfiles/h5diff_419.txt +++ b/tools/h5diff/testfiles/h5diff_419.txt @@ -1,2 +1,3 @@ -error: : unable to open file -error: unable to get external link info from "/ext_link_noexist2" +obj1 is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_420.txt b/tools/h5diff/testfiles/h5diff_420.txt index 836e95f..f3e65d9 100644 --- a/tools/h5diff/testfiles/h5diff_420.txt +++ b/tools/h5diff/testfiles/h5diff_420.txt @@ -1,2 +1,3 @@ -error: : unable to open file -error: unable to get external link info from "/ext_link_noexist2" +obj2 is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_421.txt b/tools/h5diff/testfiles/h5diff_421.txt index c686b69..833c60c 100644 --- a/tools/h5diff/testfiles/h5diff_421.txt +++ b/tools/h5diff/testfiles/h5diff_421.txt @@ -1,2 +1,3 @@ -error: "/no_obj" doesn't exist -error: unable to get external link info from "/ext_link_noexist1" +obj2 is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_422.txt b/tools/h5diff/testfiles/h5diff_422.txt index c686b69..3e675d5 100644 --- a/tools/h5diff/testfiles/h5diff_422.txt +++ b/tools/h5diff/testfiles/h5diff_422.txt @@ -1,2 +1,3 @@ -error: "/no_obj" doesn't exist -error: unable to get external link info from "/ext_link_noexist1" +obj1 is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_423.txt b/tools/h5diff/testfiles/h5diff_423.txt index 5eb6766..1ebc157 100644 --- a/tools/h5diff/testfiles/h5diff_423.txt +++ b/tools/h5diff/testfiles/h5diff_423.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position dset1 dset2 difference +position ext_link_to_slink1 dset2 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position dset1 dset2 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_424.txt b/tools/h5diff/testfiles/h5diff_424.txt index cd240cf..9099c41 100644 --- a/tools/h5diff/testfiles/h5diff_424.txt +++ b/tools/h5diff/testfiles/h5diff_424.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position dset2 dset1 difference +position dset2 ext_link_to_slink1 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position dset2 dset1 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_425.txt b/tools/h5diff/testfiles/h5diff_425.txt index 5eb6766..03ceb78 100644 --- a/tools/h5diff/testfiles/h5diff_425.txt +++ b/tools/h5diff/testfiles/h5diff_425.txt @@ -1,6 +1,6 @@ -dataset: and +dataset: and size: [2x4] [2x4] -position dset1 dset2 difference +position ext_link_to_slink1 ext_link_to_slink2 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position dset1 dset2 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_450.txt b/tools/h5diff/testfiles/h5diff_450.txt new file mode 100644 index 0000000..bf4f6e9 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_450.txt @@ -0,0 +1,35 @@ + +file1 file2 +--------------------------------------- + x x / + x x /dset1 + x x /dset2 + x x /ext_link1 + x x /ext_link2 + x x /ext_link3 + x x /ext_link4 + x x /soft_link1 + x x /soft_link2 + x x /soft_link3 + +group : and +0 differences found +dataset: and +0 differences found +dataset: and +0 differences found +dangling link: and +0 differences found +obj2 is a dangling link. +1 differences found +obj1 is a dangling link. +1 differences found +dangling link: and +0 differences found +dangling link: and +0 differences found +obj2 is a dangling link. +1 differences found +obj1 is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_451.txt b/tools/h5diff/testfiles/h5diff_451.txt new file mode 100644 index 0000000..0d30023 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_451.txt @@ -0,0 +1,28 @@ + +file1 file2 +--------------------------------------- + x x / + x x /dset1 + x x /dset2 + x x /ext_link1 + x x /ext_link2 + x x /ext_link3 + x x /ext_link4 + x x /soft_link1 + x x /soft_link2 + x x /soft_link3 + +group : and +0 differences found +dataset: and +0 differences found +dataset: and +0 differences found +Warning: is a dangling link. +Warning: is a dangling link. +Warning: is a dangling link. +Warning: is a dangling link. +Warning: is a dangling link. +Warning: is a dangling link. +Warning: is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_452.txt b/tools/h5diff/testfiles/h5diff_452.txt new file mode 100644 index 0000000..76e4457 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_452.txt @@ -0,0 +1,2 @@ +Error: --no-dangling-links must be used along with --follow-links option. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_453.txt b/tools/h5diff/testfiles/h5diff_453.txt new file mode 100644 index 0000000..9c4d61b --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_453.txt @@ -0,0 +1,47 @@ + +file1 file2 +--------------------------------------- + x x / + x x /softlink_dset1_1 + x x /softlink_dset1_2 + x x /softlink_dset2 + x x /softlink_group1 + x x /softlink_group2 + x x /softlink_noexist + x x /target_dset1 + x x /target_dset2 + x x /target_group + x x /target_group/dset + +group : and +0 differences found +link : and +dataset: and +0 differences found +0 differences found +link : and +dataset: and +0 differences found +0 differences found +link : and +dataset: and +0 differences found +0 differences found +link : and +group : and +0 differences found +0 differences found +link : and +group : and +0 differences found +0 differences found +Warning: is a dangling link. +dataset: and +0 differences found +dataset: and +0 differences found +group : and +0 differences found +dataset: and +0 differences found +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_454.txt b/tools/h5diff/testfiles/h5diff_454.txt new file mode 100644 index 0000000..dcc2e9c --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_454.txt @@ -0,0 +1,2 @@ +Warning: is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_455.txt b/tools/h5diff/testfiles/h5diff_455.txt new file mode 100644 index 0000000..dcc2e9c --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_455.txt @@ -0,0 +1,2 @@ +Warning: is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_456.txt b/tools/h5diff/testfiles/h5diff_456.txt new file mode 100644 index 0000000..f20e403 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_456.txt @@ -0,0 +1,32 @@ + +file1 file2 +--------------------------------------- + x x / + x x /ext_link_dset1 + x x /ext_link_dset2 + x x /ext_link_grp1 + x x /ext_link_grp2 + x x /ext_link_noexist1 + x x /ext_link_noexist2 + +group : and +0 differences found +external link: and +dataset: and +0 differences found +0 differences found +external link: and +dataset: and +0 differences found +0 differences found +external link: and +group : and +0 differences found +0 differences found +external link: and +group : and +0 differences found +0 differences found +Warning: is a dangling link. +Warning: is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_457.txt b/tools/h5diff/testfiles/h5diff_457.txt new file mode 100644 index 0000000..762ccdc --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_457.txt @@ -0,0 +1,2 @@ +Warning: is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_458.txt b/tools/h5diff/testfiles/h5diff_458.txt new file mode 100644 index 0000000..067d665 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_458.txt @@ -0,0 +1,2 @@ +Warning: is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_459.txt b/tools/h5diff/testfiles/h5diff_459.txt new file mode 100644 index 0000000..762ccdc --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_459.txt @@ -0,0 +1,2 @@ +Warning: is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_50.txt b/tools/h5diff/testfiles/h5diff_50.txt index 65b563c..434b458 100644 --- a/tools/h5diff/testfiles/h5diff_50.txt +++ b/tools/h5diff/testfiles/h5diff_50.txt @@ -10,3 +10,4 @@ position dset0a dset0b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_51.txt b/tools/h5diff/testfiles/h5diff_51.txt index e6402cc..621ba2a 100644 --- a/tools/h5diff/testfiles/h5diff_51.txt +++ b/tools/h5diff/testfiles/h5diff_51.txt @@ -7,3 +7,4 @@ position dset1a dset1b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_52.txt b/tools/h5diff/testfiles/h5diff_52.txt index 88febb9..6667659 100644 --- a/tools/h5diff/testfiles/h5diff_52.txt +++ b/tools/h5diff/testfiles/h5diff_52.txt @@ -7,3 +7,4 @@ position dset2a dset2b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_53.txt b/tools/h5diff/testfiles/h5diff_53.txt index 554d71a..458d166 100644 --- a/tools/h5diff/testfiles/h5diff_53.txt +++ b/tools/h5diff/testfiles/h5diff_53.txt @@ -7,3 +7,4 @@ position dset3a dset4b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_54.txt b/tools/h5diff/testfiles/h5diff_54.txt index 1e8adfd..2ca60f8 100644 --- a/tools/h5diff/testfiles/h5diff_54.txt +++ b/tools/h5diff/testfiles/h5diff_54.txt @@ -7,3 +7,4 @@ position dset4a dset4b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_55.txt b/tools/h5diff/testfiles/h5diff_55.txt index f895955..1288887 100644 --- a/tools/h5diff/testfiles/h5diff_55.txt +++ b/tools/h5diff/testfiles/h5diff_55.txt @@ -7,3 +7,4 @@ position dset5a dset5b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_56.txt b/tools/h5diff/testfiles/h5diff_56.txt index 402db43..0e82860 100644 --- a/tools/h5diff/testfiles/h5diff_56.txt +++ b/tools/h5diff/testfiles/h5diff_56.txt @@ -7,3 +7,4 @@ position dset6a dset6b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_57.txt b/tools/h5diff/testfiles/h5diff_57.txt index a026077..61aaa57 100644 --- a/tools/h5diff/testfiles/h5diff_57.txt +++ b/tools/h5diff/testfiles/h5diff_57.txt @@ -8,3 +8,4 @@ Not comparable: has sign H5T_SGN_2 and has sign H5T_SGN_NONE Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_58.txt b/tools/h5diff/testfiles/h5diff_58.txt index c46cad3..768dd97 100644 --- a/tools/h5diff/testfiles/h5diff_58.txt +++ b/tools/h5diff/testfiles/h5diff_58.txt @@ -8,3 +8,4 @@ point #1 (2,2) (3,3) point #3 (1,6) (2,5) point #4 (2,8) (1,7) 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_600.txt b/tools/h5diff/testfiles/h5diff_600.txt index 376e530..f76d4d5 100644 --- a/tools/h5diff/testfiles/h5diff_600.txt +++ b/tools/h5diff/testfiles/h5diff_600.txt @@ -3,65 +3,100 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file h5diff error: missing file names +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_603.txt b/tools/h5diff/testfiles/h5diff_603.txt index f8a858d..a5286df 100644 --- a/tools/h5diff/testfiles/h5diff_603.txt +++ b/tools/h5diff/testfiles/h5diff_603.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_604.txt b/tools/h5diff/testfiles/h5diff_604.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_604.txt +++ b/tools/h5diff/testfiles/h5diff_604.txt @@ -1,2 +1,3 @@ dataset: and 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_605.txt b/tools/h5diff/testfiles/h5diff_605.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_605.txt +++ b/tools/h5diff/testfiles/h5diff_605.txt @@ -1,2 +1,3 @@ dataset: and 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_606.txt b/tools/h5diff/testfiles/h5diff_606.txt index ab317bd..ab8039e 100644 --- a/tools/h5diff/testfiles/h5diff_606.txt +++ b/tools/h5diff/testfiles/h5diff_606.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_607.txt b/tools/h5diff/testfiles/h5diff_607.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_607.txt +++ b/tools/h5diff/testfiles/h5diff_607.txt @@ -1,2 +1,3 @@ dataset: and 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_608.txt b/tools/h5diff/testfiles/h5diff_608.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_608.txt +++ b/tools/h5diff/testfiles/h5diff_608.txt @@ -1,2 +1,3 @@ dataset: and 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_609.txt b/tools/h5diff/testfiles/h5diff_609.txt index e69de29..eca5994 100644 --- a/tools/h5diff/testfiles/h5diff_609.txt +++ b/tools/h5diff/testfiles/h5diff_609.txt @@ -0,0 +1 @@ +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_610.txt b/tools/h5diff/testfiles/h5diff_610.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_610.txt +++ b/tools/h5diff/testfiles/h5diff_610.txt @@ -1,2 +1,3 @@ dataset: and 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_612.txt b/tools/h5diff/testfiles/h5diff_612.txt index 875e17e..686ff15 100644 --- a/tools/h5diff/testfiles/h5diff_612.txt +++ b/tools/h5diff/testfiles/h5diff_612.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_613.txt b/tools/h5diff/testfiles/h5diff_613.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_613.txt +++ b/tools/h5diff/testfiles/h5diff_613.txt @@ -1,2 +1,3 @@ dataset: and 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_614.txt b/tools/h5diff/testfiles/h5diff_614.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_614.txt +++ b/tools/h5diff/testfiles/h5diff_614.txt @@ -1,2 +1,3 @@ dataset: and 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_615.txt b/tools/h5diff/testfiles/h5diff_615.txt index 258124a..cf779c5 100644 --- a/tools/h5diff/testfiles/h5diff_615.txt +++ b/tools/h5diff/testfiles/h5diff_615.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_616.txt b/tools/h5diff/testfiles/h5diff_616.txt index 47a1364..3bc194a 100644 --- a/tools/h5diff/testfiles/h5diff_616.txt +++ b/tools/h5diff/testfiles/h5diff_616.txt @@ -1,2 +1,3 @@ dataset: and 2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_617.txt b/tools/h5diff/testfiles/h5diff_617.txt index 47a1364..3bc194a 100644 --- a/tools/h5diff/testfiles/h5diff_617.txt +++ b/tools/h5diff/testfiles/h5diff_617.txt @@ -1,2 +1,3 @@ dataset: and 2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_618.txt b/tools/h5diff/testfiles/h5diff_618.txt index e69de29..eca5994 100644 --- a/tools/h5diff/testfiles/h5diff_618.txt +++ b/tools/h5diff/testfiles/h5diff_618.txt @@ -0,0 +1 @@ +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_619.txt b/tools/h5diff/testfiles/h5diff_619.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_619.txt +++ b/tools/h5diff/testfiles/h5diff_619.txt @@ -1,2 +1,3 @@ dataset: and 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_621.txt b/tools/h5diff/testfiles/h5diff_621.txt index 1fd7f08..041bb7b 100644 --- a/tools/h5diff/testfiles/h5diff_621.txt +++ b/tools/h5diff/testfiles/h5diff_621.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_622.txt b/tools/h5diff/testfiles/h5diff_622.txt index bf15c2a..923bab5 100644 --- a/tools/h5diff/testfiles/h5diff_622.txt +++ b/tools/h5diff/testfiles/h5diff_622.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_623.txt b/tools/h5diff/testfiles/h5diff_623.txt index 5186dcc..405a211 100644 --- a/tools/h5diff/testfiles/h5diff_623.txt +++ b/tools/h5diff/testfiles/h5diff_623.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_624.txt b/tools/h5diff/testfiles/h5diff_624.txt index d646a25..dc7c83b 100644 --- a/tools/h5diff/testfiles/h5diff_624.txt +++ b/tools/h5diff/testfiles/h5diff_624.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_625.txt b/tools/h5diff/testfiles/h5diff_625.txt index 47a1364..3bc194a 100644 --- a/tools/h5diff/testfiles/h5diff_625.txt +++ b/tools/h5diff/testfiles/h5diff_625.txt @@ -1,2 +1,3 @@ dataset: and 2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_626.txt b/tools/h5diff/testfiles/h5diff_626.txt index be392ae..6494066 100644 --- a/tools/h5diff/testfiles/h5diff_626.txt +++ b/tools/h5diff/testfiles/h5diff_626.txt @@ -1,2 +1,3 @@ dataset: and 3 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_627.txt b/tools/h5diff/testfiles/h5diff_627.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_627.txt +++ b/tools/h5diff/testfiles/h5diff_627.txt @@ -1,2 +1,3 @@ dataset: and 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_628.txt b/tools/h5diff/testfiles/h5diff_628.txt index 74decda..e11d8ee 100644 --- a/tools/h5diff/testfiles/h5diff_628.txt +++ b/tools/h5diff/testfiles/h5diff_628.txt @@ -1,2 +1,3 @@ dataset: and 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_629.txt b/tools/h5diff/testfiles/h5diff_629.txt index 4e67f57..962c2b0 100644 --- a/tools/h5diff/testfiles/h5diff_629.txt +++ b/tools/h5diff/testfiles/h5diff_629.txt @@ -1 +1,2 @@ h5diff: : unable to open file +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_70.txt b/tools/h5diff/testfiles/h5diff_70.txt index 30dbefe..7abcddd 100644 --- a/tools/h5diff/testfiles/h5diff_70.txt +++ b/tools/h5diff/testfiles/h5diff_70.txt @@ -2029,3 +2029,4 @@ position float3D of float3D of difference Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_80.txt b/tools/h5diff/testfiles/h5diff_80.txt index 33090df..1c55b1a 100644 --- a/tools/h5diff/testfiles/h5diff_80.txt +++ b/tools/h5diff/testfiles/h5diff_80.txt @@ -878,3 +878,4 @@ point #4 (2,8) (1,7) Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_90.txt b/tools/h5diff/testfiles/h5diff_90.txt index e6bfa14..fb23843 100644 --- a/tools/h5diff/testfiles/h5diff_90.txt +++ b/tools/h5diff/testfiles/h5diff_90.txt @@ -53,3 +53,4 @@ Not comparable: or is an empty dataset Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_danglelinks1.h5 b/tools/h5diff/testfiles/h5diff_danglelinks1.h5 new file mode 100644 index 0000000..8cbaac1 Binary files /dev/null and b/tools/h5diff/testfiles/h5diff_danglelinks1.h5 differ diff --git a/tools/h5diff/testfiles/h5diff_danglelinks2.h5 b/tools/h5diff/testfiles/h5diff_danglelinks2.h5 new file mode 100644 index 0000000..f634210 Binary files /dev/null and b/tools/h5diff/testfiles/h5diff_danglelinks2.h5 differ diff --git a/tools/h5diff/testfiles/h5diff_idx.txt b/tools/h5diff/testfiles/h5diff_idx.txt index 4169afb..754d3ea 100644 --- a/tools/h5diff/testfiles/h5diff_idx.txt +++ b/tools/h5diff/testfiles/h5diff_idx.txt @@ -11,3 +11,4 @@ dataset: and 0 differences found dataset: and 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index 247e3e1..1ed6f88 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -23,6 +23,11 @@ # Pedro Vicente Nunes: # 10/25/2005: Added test #9 # 11/27/2006: Added test #10, #11 +# Jonathan Kim: +# Improved to use single line +# Improved to check exit code (only serial mode, not necessary for parallel) +# Added test 400 - 425 (links with --follow-links option) +# Added test 450 - 459 (dangling links) ############################################################################### @@ -49,6 +54,8 @@ FILE17=h5diff_ext2softlink_src.h5 FILE18=h5diff_ext2softlink_trg.h5 FILE19=h5diff_dset_idx1.h5 FILE20=h5diff_dset_idx2.h5 +DANGLE_LINK_FILE1=h5diff_danglelinks1.h5 +DANGLE_LINK_FILE2=h5diff_danglelinks2.h5 TESTNAME=h5diff EXIT_SUCCESS=0 @@ -194,9 +201,9 @@ TOOLTEST() { actual_err_sav=${actual_err}-sav shift if test -n "$pmode"; then - RUNCMD=$RUNPARALLEL + RUNCMD=$RUNPARALLEL else - RUNCMD=$RUNSERIAL + RUNCMD=$RUNSERIAL fi # Run test. @@ -208,32 +215,44 @@ TOOLTEST() { cd $srcdir/testfiles eval $RUNCMD $H5DIFF_BIN "$@" ) >$actual 2>$actual_err + EXIT_CODE=$? # save actual and actual_err in case they are needed later. cp $actual $actual_sav STDOUT_FILTER $actual cp $actual_err $actual_err_sav STDERR_FILTER $actual_err cat $actual_err >> $actual + # don't add exit code check in pmode, as it causes failure. (exit code + # is from mpirun not tool) + # if any problem occurs relate to an exit code, it will be caught in + # serial mode, so the test is fullfilled. + if test -z "$pmode"; then + echo "EXIT CODE: $EXIT_CODE" >> $actual + fi if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. + # Create the expect file if it doesn't yet exist. echo " CREATED" - cp $actual $expect + cp $actual $expect elif $CMP $expect $actual; then - echo " PASSED" + echo " PASSED" elif test -z "$pmode"; then - echo "*FAILED*" - echo " Expected result ($expect) differs from actual result ($actual)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + echo "*FAILED*" + echo " Expected result ($expect) differs from actual result ($actual)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' else - # parallel mode output are often of different ordering from serial - # output. If the sorted expected and actual files compare the same, - # it is safe to assume the actual output match the expected file. - expect_sorted=expect_sorted - actual_sorted=actual_sorted - sort $expect -o $expect_sorted - sort $actual -o $actual_sorted + # parallel mode output are often of different ordering from serial + # output. If the sorted expected and actual files compare the same, + # it is safe to assume the actual output match the expected file. + expect_sorted=expect_sorted + actual_sorted=actual_sorted + sort $expect -o $expect_sorted + sort $actual -o $actual_sorted + # remove "EXIT CODE:" line from expect file. test for exit code + # is done by serial mode. + grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit + mv $expect_sorted.noexit $expect_sorted if $CMP $expect_sorted $actual_sorted; then echo " PASSED" else @@ -267,6 +286,7 @@ SKIP() { } + ############################################################################## # The tests # To avoid the printing of the complete full path of the test file, that hides @@ -310,15 +330,17 @@ TOOLTEST h5diff_16_3.txt -v -p 0.02 $FILE1 $FILE1 g1/dset9 g1/dset10 # 1.7 verbose mode TOOLTEST h5diff_17.txt -v $FILE1 $FILE2 -# 1.8 test 32-bit INFINITY +# 1.7 test 32-bit INFINITY TOOLTEST h5diff_171.txt -v $FILE1 $FILE1 /g1/fp19 -# 1.8 test 64-bit INFINITY +# 1.7 test 64-bit INFINITY TOOLTEST h5diff_172.txt -v $FILE1 $FILE1 /g1/fp20 # 1.8 quiet mode TOOLTEST h5diff_18.txt -q $FILE1 $FILE2 +# 1.8 -v and -q +TOOLTEST h5diff_18_1.txt -v -q $FILE1 $FILE2 # ############################################################################## @@ -538,133 +560,91 @@ TOOLTEST h5diff_206.txt -c $FILE2 $FILE2 g2/dset7 g2/dset8 TOOLTEST h5diff_207.txt -c $FILE2 $FILE2 g2/dset8 g2/dset9 # ############################################################################## -# # Links compare without -l (link follow) +# # Links compare without --follow-links nor --no-dangling-links # ############################################################################## # test for bug1749 TOOLTEST h5diff_300.txt -v $FILE12 $FILE12 /link_g1 /link_g2 # ############################################################################## -# # Links compare with -l (link follow) +# # Links compare with --follow-links Only # ############################################################################## # soft links file to file -TOOLTEST h5diff_400.txt -l -v $FILE13 $FILE13 +TOOLTEST h5diff_400.txt --follow-links -v $FILE13 $FILE13 # softlink vs dset" -TOOLTEST h5diff_401.txt -l -v $FILE13 $FILE13 /softlink_dset1_1 /target_dset2 - +TOOLTEST h5diff_401.txt --follow-links -v $FILE13 $FILE13 /softlink_dset1_1 /target_dset2 # dset vs softlink" -TOOLTEST h5diff_402.txt -l -v $FILE13 $FILE13 /target_dset2 /softlink_dset1_1 - +TOOLTEST h5diff_402.txt --follow-links -v $FILE13 $FILE13 /target_dset2 /softlink_dset1_1 # softlink vs softlink" -TOOLTEST h5diff_403.txt -l -v $FILE13 $FILE13 /softlink_dset1_1 /softlink_dset2 - +TOOLTEST h5diff_403.txt --follow-links -v $FILE13 $FILE13 /softlink_dset1_1 /softlink_dset2 # extlink vs extlink (FILE)" -if test -n "$pmode"; then - # TODO: Skip below test due to hang in prarllel mode - echo "Skip below test due to hang in prarllel mode" - SKIP -l -v $FILE15 $FILE15 -else - TOOLTEST h5diff_404.txt -l -v $FILE15 $FILE15 -fi - +TOOLTEST h5diff_404.txt --follow-links -v $FILE15 $FILE15 # extlink vs dset" -TOOLTEST h5diff_405.txt -l -v $FILE15 $FILE16 /ext_link_dset1 /target_group2/x_dset - +TOOLTEST h5diff_405.txt --follow-links -v $FILE15 $FILE16 /ext_link_dset1 /target_group2/x_dset # dset vs extlink" -TOOLTEST h5diff_406.txt -l -v $FILE16 $FILE15 /target_group2/x_dset /ext_link_dset1 - +TOOLTEST h5diff_406.txt --follow-links -v $FILE16 $FILE15 /target_group2/x_dset /ext_link_dset1 # extlink vs extlink" -TOOLTEST h5diff_407.txt -l -v $FILE15 $FILE15 /ext_link_dset1 /ext_link_dset2 - +TOOLTEST h5diff_407.txt --follow-links -v $FILE15 $FILE15 /ext_link_dset1 /ext_link_dset2 # softlink vs extlink" -TOOLTEST h5diff_408.txt -l -v $FILE13 $FILE15 /softlink_dset1_1 /ext_link_dset2 - +TOOLTEST h5diff_408.txt --follow-links -v $FILE13 $FILE15 /softlink_dset1_1 /ext_link_dset2 # extlink vs softlink " -TOOLTEST h5diff_409.txt -l -v $FILE15 $FILE13 /ext_link_dset2 /softlink_dset1_1 - +TOOLTEST h5diff_409.txt --follow-links -v $FILE15 $FILE13 /ext_link_dset2 /softlink_dset1_1 # linked_softlink vs linked_softlink (FILE)" -TOOLTEST h5diff_410.txt -l -v $FILE14 $FILE14 - +TOOLTEST h5diff_410.txt --follow-links -v $FILE14 $FILE14 # dset2 vs linked_softlink_dset1" -TOOLTEST h5diff_411.txt -l -v $FILE14 $FILE14 /target_dset2 /softlink1_to_slink2 - +TOOLTEST h5diff_411.txt --follow-links -v $FILE14 $FILE14 /target_dset2 /softlink1_to_slink2 # linked_softlink_dset1 vs dset2" -TOOLTEST h5diff_412.txt -l -v $FILE14 $FILE14 /softlink1_to_slink2 /target_dset2 - +TOOLTEST h5diff_412.txt --follow-links -v $FILE14 $FILE14 /softlink1_to_slink2 /target_dset2 # linked_softlink_to_dset1 vs linked_softlink_to_dset2" -TOOLTEST h5diff_413.txt -l -v $FILE14 $FILE14 /softlink1_to_slink2 /softlink2_to_slink2 - +TOOLTEST h5diff_413.txt --follow-links -v $FILE14 $FILE14 /softlink1_to_slink2 /softlink2_to_slink2 # group vs linked_softlink_group1" -TOOLTEST h5diff_414.txt -l -v $FILE14 $FILE14 /target_group /softlink3_to_slink2 - +TOOLTEST h5diff_414.txt --follow-links -v $FILE14 $FILE14 /target_group /softlink3_to_slink2 # linked_softlink_group1 vs group" -TOOLTEST h5diff_415.txt -l -v $FILE14 $FILE14 /softlink3_to_slink2 /target_group - +TOOLTEST h5diff_415.txt --follow-links -v $FILE14 $FILE14 /softlink3_to_slink2 /target_group # linked_softlink_to_group1 vs linked_softlink_to_group2" -TOOLTEST h5diff_416.txt -l -v $FILE14 $FILE14 /softlink3_to_slink2 /softlink4_to_slink2 - +TOOLTEST h5diff_416.txt --follow-links -v $FILE14 $FILE14 /softlink3_to_slink2 /softlink4_to_slink2 # non-exist-softlink vs softlink" -TOOLTEST h5diff_417.txt -l -v $FILE13 $FILE13 /softlink_noexist /softlink_dset2 - +TOOLTEST h5diff_417.txt --follow-links -v $FILE13 $FILE13 /softlink_noexist /softlink_dset2 # softlink vs non-exist-softlink" -TOOLTEST h5diff_418.txt -l -v $FILE13 $FILE13 /softlink_dset2 /softlink_noexist - +TOOLTEST h5diff_418.txt --follow-links -v $FILE13 $FILE13 /softlink_dset2 /softlink_noexist # non-exist-extlink_file vs extlink" -if test -n "$pmode"; then - # TODO: Skip below test due to hang in prarllel mode - echo "Skip below test due to hang in prarllel mode" - SKIP -l -v $FILE15 $FILE15 /ext_link_noexist2 /ext_link_dset2 -else - TOOLTEST h5diff_419.txt -l -v $FILE15 $FILE15 /ext_link_noexist2 /ext_link_dset2 -fi - +TOOLTEST h5diff_419.txt --follow-links -v $FILE15 $FILE15 /ext_link_noexist2 /ext_link_dset2 # exlink vs non-exist-extlink_file" -if test -n "$pmode"; then - # TODO: Skip below test due to hang in prarllel mode - echo "Skip below test due to hang in prarllel mode" - SKIP -l -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist2 -else - TOOLTEST h5diff_420.txt -l -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist2 -fi - +TOOLTEST h5diff_420.txt --follow-links -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist2 # extlink vs non-exist-extlink_obj" -TOOLTEST h5diff_421.txt -l -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist1 - +TOOLTEST h5diff_421.txt --follow-links -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist1 # non-exist-extlink_obj vs extlink" -TOOLTEST h5diff_422.txt -l -v $FILE15 $FILE15 /ext_link_noexist1 /ext_link_dset2 - +TOOLTEST h5diff_422.txt --follow-links -v $FILE15 $FILE15 /ext_link_noexist1 /ext_link_dset2 # extlink_to_softlink_to_dset1 vs dset2" -TOOLTEST h5diff_423.txt -l -v $FILE17 $FILE18 /ext_link_to_slink1 /dset2 - +TOOLTEST h5diff_423.txt --follow-links -v $FILE17 $FILE18 /ext_link_to_slink1 /dset2 # dset2 vs extlink_to_softlink_to_dset1" -TOOLTEST h5diff_424.txt -l -v $FILE18 $FILE17 /dset2 /ext_link_to_slink1 - +TOOLTEST h5diff_424.txt --follow-links -v $FILE18 $FILE17 /dset2 /ext_link_to_slink1 # extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2" -TOOLTEST h5diff_425.txt -l -v $FILE17 $FILE17 /ext_link_to_slink1 /ext_link_to_slink2 +TOOLTEST h5diff_425.txt --follow-links -v $FILE17 $FILE17 /ext_link_to_slink1 /ext_link_to_slink2 # ############################################################################## # 19. The comparision for the two datasets between the 2 files should be the same @@ -673,6 +653,39 @@ TOOLTEST h5diff_425.txt -l -v $FILE17 $FILE17 /ext_link_to_slink1 /ext_link_to_s # ############################################################################## TOOLTEST h5diff_idx.txt -v $FILE19 $FILE20 +# ############################################################################## +# # Dangling links compare (--follow-links and --no-dangling-links) +# ############################################################################## +# dangling links --follow-links (FILE to FILE) +TOOLTEST h5diff_450.txt --follow-links -v $DANGLE_LINK_FILE1 $DANGLE_LINK_FILE2 + +# dangling links --follow-links and --no-dangling-links (FILE to FILE) +TOOLTEST h5diff_451.txt --follow-links -v --no-dangling-links $DANGLE_LINK_FILE1 $DANGLE_LINK_FILE2 + +# try --no-dangling-links without --follow-links options +TOOLTEST h5diff_452.txt --no-dangling-links $FILE13 $FILE13 + +# dangling link found for soft links (FILE to FILE) +TOOLTEST h5diff_453.txt --follow-links -v --no-dangling-links $FILE13 $FILE13 + +# dangling link found for soft links (obj to obj) +TOOLTEST h5diff_454.txt --follow-links -v --no-dangling-links $FILE13 $FILE13 /softlink_dset2 /softlink_noexist + +# dangling link found for soft links (obj to obj) Both dangle links +TOOLTEST h5diff_455.txt --follow-links -v --no-dangling-links $FILE13 $FILE13 /softlink_noexist /softlink_noexist + +# dangling link found for ext links (FILE to FILE) +TOOLTEST h5diff_456.txt --follow-links -v --no-dangling-links $FILE15 $FILE15 + +# dangling link found for ext links (obj to obj). target file exist +TOOLTEST h5diff_457.txt --follow-links -v --no-dangling-links $FILE15 $FILE15 /ext_link_dset1 /ext_link_noexist1 + +# dangling link found for ext links (obj to obj). target file NOT exist +TOOLTEST h5diff_458.txt --follow-links -v --no-dangling-links $FILE15 $FILE15 /ext_link_dset1 /ext_link_noexist2 + +# dangling link found for ext links (obj to obj). Both dangle links +TOOLTEST h5diff_459.txt --follow-links -v --no-dangling-links $FILE15 $FILE15 /ext_link_noexist1 /ext_link_noexist2 + # ############################################################################## # # END diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 0f25efe..3156ba6 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -717,7 +717,7 @@ usage(const char *prog) /*------------------------------------------------------------------------- * Function: table_list_add * - * Purpose: Add a new set of tables + * Purpose: Add a new set of tables * * Return: index of added table on success, -1 on failure * @@ -1191,17 +1191,17 @@ print_datatype(hid_t type,unsigned in_group) case H5T_REFERENCE: printf("H5T_REFERENCE"); - /* The BNF document states that the type of reference should be - * displayed after "H5T_REFERENCE". Therefore add the missing - * reference type if the region command line option is used. This + /* The BNF document states that the type of reference should be + * displayed after "H5T_REFERENCE". Therefore add the missing + * reference type if the region command line option is used. This * reference type will not be displayed if the region option is not used. */ if(display_region) { if (H5Tequal(type, H5T_STD_REF_DSETREG)==TRUE) { printf(" { H5T_STD_REF_DSETREG }"); - } + } else { printf(" { H5T_STD_REF_OBJECT }"); - } + } } break; @@ -2005,10 +2005,18 @@ dump_named_datatype(hid_t tid, const char *name) /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set in the datatype's create property list for attributes, then, sort by creation order, otherwise by name */ - if( (sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) - H5Aiterate2(tid, sort_by, sort_order, NULL, dump_attr_cb, NULL); - else - H5Aiterate2(tid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL); + if( (sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { + if(H5Aiterate2(tid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end if */ + else { + if(H5Aiterate2(tid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end else */ indent -= COL; @@ -2123,10 +2131,18 @@ dump_group(hid_t gid, const char *name) /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set in the group for attributes, then, sort by creation order, otherwise by name */ - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) - H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL); - else - H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL); + if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { + if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end if */ + else { + if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end else */ /* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set in the group, then, sort by creation order, otherwise by name */ @@ -2146,10 +2162,18 @@ dump_group(hid_t gid, const char *name) /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set in the group for attributes, then, sort by creation order, otherwise by name */ - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) - H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL); - else - H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL); + if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { + if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end if */ + else { + if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end else */ /* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set in the group, then, sort by creation order, otherwise by name */ @@ -2254,10 +2278,18 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset) /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set in the group for attributes, then, sort by creation order, otherwise by name */ - if( (sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) - H5Aiterate2(did, sort_by, sort_order, NULL, dump_attr_cb, NULL); - else - H5Aiterate2(did, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL); + if( (sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { + if(H5Aiterate2(did, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end if */ + else { + if(H5Aiterate2(did, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end else */ } @@ -2500,14 +2532,14 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index) status = h5tools_dump_dset(stdout, outputformat, obj_id, -1, sset, depth); H5Tclose(f_type); - } + } else { /* need to call h5tools_dump_mem for the attribute data */ space = H5Aget_space(obj_id); space_type = H5Sget_simple_extent_type(space); if(space_type == H5S_NULL || space_type == H5S_NO_CLASS) { status = SUCCEED; - } + } else { char string_prefix[64]; h5tool_format_t string_dataformat; @@ -3278,7 +3310,7 @@ set_binary_form(const char *form) int bform=-1; if (strcmp(form,"NATIVE")==0 || - strcmp(form,"MEMORY")==0) + strcmp(form,"MEMORY")==0) {/* native form */ bform = 0; } @@ -4384,7 +4416,7 @@ main(int argc, const char *argv[]) d_status = EXIT_FAILURE; goto done; } - + /* Initialize object tables */ if(table_list_add(fid, oi.fileno) < 0) { error_msg(progname, "internal error (file %s:line %d)\n", __FILE__, __LINE__); @@ -5876,10 +5908,18 @@ xml_dump_group(hid_t gid, const char *name) /* 1. do all the attributes of the group */ - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) - H5Aiterate2(gid, sort_by, sort_order, NULL, dump_function_table->dump_attribute_function, NULL); - else - H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_function_table->dump_attribute_function, NULL); + if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { + if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_function_table->dump_attribute_function, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end if */ + else { + if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_function_table->dump_attribute_function, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end else */ if(isRoot && unamedtype) { unsigned u; @@ -5940,10 +5980,18 @@ xml_dump_group(hid_t gid, const char *name) /* 1. do all the attributes of the group */ - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) - H5Aiterate2(gid, sort_by, sort_order, NULL, dump_function_table->dump_attribute_function, NULL); - else - H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_function_table->dump_attribute_function, NULL); + if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { + if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_function_table->dump_attribute_function, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end if */ + else { + if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_function_table->dump_attribute_function, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end else */ if(isRoot && unamedtype) { @@ -6598,10 +6646,18 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) indent += COL; - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) - H5Aiterate2(did, sort_by, sort_order, NULL, dump_function_table->dump_attribute_function, NULL); - else - H5Aiterate2(did, H5_INDEX_NAME, sort_order, NULL, dump_function_table->dump_attribute_function, NULL); + if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { + if(H5Aiterate2(did, sort_by, sort_order, NULL, dump_function_table->dump_attribute_function, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end if */ + else { + if(H5Aiterate2(did, H5_INDEX_NAME, sort_order, NULL, dump_function_table->dump_attribute_function, NULL) < 0) { + error_msg(progname, "error getting attribute information\n"); + d_status = EXIT_FAILURE; + } /* end if */ + } /* end else */ indent -= COL; tempi = H5Dget_storage_size(did); diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index ab60807..ccc0f22 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -250,7 +250,7 @@ typedef struct s1_t { /* File 65 macros */ #define STRATEGY H5F_FILE_SPACE_AGGR_VFD /* File space handling strategy */ -#define THRESHOLD10 10 /* Free space section threshold */ +#define THRESHOLD10 10 /* Free space section threshold */ /* Declarations for gent_dataset_idx() for "FILE66" */ #define DSET_FIXED "dset_fixed" diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index e9e7dac..24428cb 100755 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -766,7 +766,7 @@ readFloatData(FILE **strm, struct Input *in) /* same as TEXTFP */ case 2: /*TEXTFPE */ - + for (i = 0; i < len; i++, fp32++) { if (fscanf(*strm, "%f", fp32) != 1) @@ -775,7 +775,7 @@ readFloatData(FILE **strm, struct Input *in) return (-1); } } - + fp32 = (H5DT_FLOAT32 *) in->data; break; @@ -815,7 +815,7 @@ readFloatData(FILE **strm, struct Input *in) /* same as TEXTFP */ case 2: /*TEXTFPE */ - + for (i = 0; i < len; i++, fp64++) { if (fscanf(*strm, "%lf", fp64) != 1) @@ -824,7 +824,7 @@ readFloatData(FILE **strm, struct Input *in) return (-1); } } - + fp64 = (H5DT_FLOAT64 *) in->data; break; @@ -1437,7 +1437,7 @@ processConfigurationFile(char *infile, struct Input *in, FILE **strm) if (in->configOptionVector[COMPRESS] == 0) in->compressionType = 0; - + break; case 12: /* EXTERNAL-STORAGE */ @@ -1587,16 +1587,16 @@ static int parsePathInfo(struct path_info *path, char *temp) { const char delimiter[] = "/"; - char *token; + char *token; int i=0; const char *err1 = "Path string larger than MAX_PATH_NAME_LENGTH.\n"; token = HDstrtok (temp, delimiter); - if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) + if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) { (void) fprintf(stderr, err1); return (-1); - } + } HDstrcpy(path->group[i++],token); @@ -1609,7 +1609,7 @@ parsePathInfo(struct path_info *path, char *temp) { (void) fprintf(stderr, err1); return (-1); - } + } HDstrcpy(path->group[i++],token); } path->count = i; @@ -1621,7 +1621,7 @@ parseDimensions(struct Input *in, char *strm) { const char delimiter[] = ","; char temp[255]; - char *token; + char *token; int i=0; const char *err1 = "Unable to allocate dynamic memory.\n"; diff --git a/tools/h5import/h5import.h b/tools/h5import/h5import.h index cbc6bf2..9e4f6e8 100755 --- a/tools/h5import/h5import.h +++ b/tools/h5import/h5import.h @@ -38,7 +38,7 @@ #define ERR 20 /* invalid token */ #define MAX_GROUPS_IN_PATH 20 -#define MAX_PATH_NAME_LENGTH 255 +#define MAX_PATH_NAME_LENGTH 255 #define NUM_KEYS 14 #define MIN_NUM_DIMENSION 1 #define MAX_NUM_DIMENSION 32 diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c index 96d113e..ec79215 100644 --- a/tools/h5jam/h5jamgentest.c +++ b/tools/h5jam/h5jamgentest.c @@ -345,7 +345,7 @@ create_textfile(const char *name, size_t size) HDwrite(fd, buf, size); - free(buf); + free(buf); HDclose(fd); } diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index 3ab2202..5e4d864 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -28,10 +28,11 @@ #define TRUE 1 #define FALSE 0 +#define COPY_BUF_SIZE 1024 hsize_t write_pad( int , hsize_t ); hsize_t compute_pad( hsize_t ); -hsize_t copy_to_file( int , int , ssize_t, ssize_t ); +herr_t copy_to_file( int , int , ssize_t, ssize_t ); const char *progname = "h5unjam"; int d_status = EXIT_SUCCESS; @@ -268,13 +269,19 @@ main(int argc, const char *argv[]) /* copy from 0 to 'usize - 1' into ufid */ if (!do_delete) { - copy_to_file( ifid, ufid, 0, (ssize_t) usize); + if(copy_to_file(ifid, ufid, 0, (ssize_t) usize) < 0) { + error_msg(progname, "unable to copy user block to output file \"%s\"\n", ub_file); + exit(EXIT_FAILURE); + } } /* copy from usize to end of file into h5fid, * starting at end of user block if present */ - copy_to_file( ifid, h5fid, (ssize_t) usize, (ssize_t)(fsize - (ssize_t)usize) ); + if(copy_to_file(ifid, h5fid, (ssize_t) usize, (ssize_t)(fsize - (ssize_t)usize)) < 0) { + error_msg(progname, "unable to copy hdf5 data to output file \"%s\"\n", output_file); + exit(EXIT_FAILURE); + } HDclose(ufid); @@ -288,36 +295,60 @@ main(int argc, const char *argv[]) * Copy 'how_much' bytes from the input file to the output file, * starting at byte 'where' in the input file. * - * Returns the size of the output file. + * Returns 0 on success, -1 on failure. */ -hsize_t +herr_t copy_to_file( int infid, int ofid, ssize_t where, ssize_t how_much ) { - char buf[1024]; + static char buf[COPY_BUF_SIZE]; off_t to; off_t from; ssize_t nchars = -1; + ssize_t wnchars = -1; + herr_t ret_value = 0; /* nothing to copy */ if(how_much <= 0) - return(where); + goto done; from = where; to = 0; - while( how_much > 0) { + while(how_much > 0) { + /* Seek to correct position in input file */ HDlseek(infid,from,SEEK_SET); - if (how_much > 512) - nchars = HDread(infid,buf,(unsigned)512); + + /* Read data to buffer */ + if (how_much > COPY_BUF_SIZE) + nchars = HDread(infid,buf,(unsigned)COPY_BUF_SIZE); else nchars = HDread(infid,buf,(unsigned)how_much); + if(nchars < 0) { + ret_value = -1; + goto done; + } /* end if */ + + /* Seek to correct position in output file */ HDlseek(ofid,to,SEEK_SET); - HDwrite(ofid,buf,(unsigned)nchars); + + /* Update positions/size */ how_much -= nchars; from += nchars; to += nchars; - } - return (where + how_much); -} + /* Write nchars bytes to output file */ + wnchars = nchars; + while(nchars > 0) { + wnchars = HDwrite(ofid,buf,(unsigned)nchars); + if(wnchars < 0) { + ret_value = -1; + goto done; + } /* end if */ + nchars -= wnchars; + } /* end while */ + } /* end while */ + +done: + return ret_value; +} /* end copy_to_file */ diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 9bc0448..c969670 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1544,7 +1544,7 @@ dataset_list2(hid_t dset, const char UNUSED *name) printf(" %-10s ", "Storage:"); switch (tclass) { - + case H5T_VLEN: printf("information not available"); break; @@ -1555,20 +1555,20 @@ dataset_list2(hid_t dset, const char UNUSED *name) printf("information not available"); } break; - + default: printf("%lu logical byte%s, %lu allocated byte%s", (unsigned long)total, 1==total?"":"s", (unsigned long)used, 1==used?"":"s"); - if (used>0) + if (used>0) { utilization = (total*100.0)/used; printf(", %1.2f%% utilization", utilization); } - + } - - + + putchar('\n'); /* Print information about external strorage */ @@ -1937,7 +1937,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) hbool_t orig_grp_literal = grp_literal_g; HDfputc(' ', stdout); - + /* Check if we have already seen this elink */ if(elink_trav_visited(iter->elink_list, filename, path)) { HDfputs("{Already Visited}\n", stdout); @@ -2028,7 +2028,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter) } /* end if */ /* Delay specifying the name start point so the original object name is - * displayed if it is a link or non-group object */ + * displayed if it is a link or non-group object */ iter->name_start = iter->base_len; /* Specified name is a group. List the complete contents of the group. */ @@ -2420,7 +2420,7 @@ main(int argc, const char *argv[]) } *x = '\0'; /* Delay specifying the name start point so the original object name - * is displayed if it is a link or non-group object */ + * is displayed if it is a link or non-group object */ iter.name_start = 1; } if(!oname || !*oname) { diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index addcea3..a82f9b1 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -90,7 +90,7 @@ int h5repack(const char* infile, *------------------------------------------------------------------------- */ -int +int h5repack_init(pack_opt_t *options, int verbose, int latest, H5F_file_space_type_t strategy, hsize_t threshold) { @@ -273,7 +273,7 @@ static int check_options(pack_opt_t *options) if (options->verbose && have_request(options) /* only print if requested */) { printf("Objects to modify layout are...\n"); - if (options->all_layout==1) + if (options->all_layout==1) { switch (options->layout_g) { @@ -295,7 +295,7 @@ static int check_options(pack_opt_t *options) return -1; } printf(" Apply %s layout to all\n", slayout); - if (H5D_CHUNKED==options->layout_g) + if (H5D_CHUNKED==options->layout_g) { printf("with dimension ["); for ( j = 0; j < options->chunk_g.rank; j++) @@ -401,24 +401,24 @@ static int check_options(pack_opt_t *options) *------------------------------------------------------------------------- */ - if (options->grp_compact < 0) + if (options->grp_compact < 0) { error_msg(progname, "invalid maximum number of links to store as header messages\n"); return -1; } - if (options->grp_indexed < 0) + if (options->grp_indexed < 0) { error_msg(progname, "invalid minimum number of links to store in the indexed format\n"); return -1; } - if (options->grp_indexed > options->grp_compact) + if (options->grp_indexed > options->grp_compact) { error_msg(progname, "minimum indexed size is greater than the maximum compact size\n"); return -1; } - for (i=0; i<8; i++) + for (i=0; i<8; i++) { - if (options->msg_size[i]<0) + if (options->msg_size[i]<0) { error_msg(progname, "invalid shared message size\n"); return -1; @@ -518,14 +518,14 @@ static int check_objects(const char* fname, if(options->verbose) printf("Opening file <%s>. Searching for objects to modify...\n", fname); - for(i = 0; i < options->op_tbl->nelems; i++) + for(i = 0; i < options->op_tbl->nelems; i++) { char* name=options->op_tbl->objs[i].path; if(options->verbose) printf(" <%s>",name); /* the input object names are present in the file and are valid */ - if(h5trav_getindext(name, travt) < 0) + if(h5trav_getindext(name, travt) < 0) { error_msg(progname, "%s Could not find <%s> in file <%s>. Exiting...\n", (options->verbose?"\n":""),name,fname); @@ -535,7 +535,7 @@ static int check_objects(const char* fname, printf("...Found\n"); /* check for extra filter conditions */ - switch(options->op_tbl->objs[i].filter->filtn) + switch(options->op_tbl->objs[i].filter->filtn) { /* chunk size must be smaller than pixels per block */ case H5Z_FILTER_SZIP: diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h index 38ce9e4..d02d41c 100644 --- a/tools/h5repack/h5repack.h +++ b/tools/h5repack/h5repack.h @@ -17,6 +17,8 @@ #ifndef H5REPACK_H__ #define H5REPACK_H__ +#include +#include #include "hdf5.h" #include "h5trav.h" @@ -102,11 +104,11 @@ typedef struct { H5D_layout_t layout_g; /*global layout information for the ALL case */ int verbose; /*verbose mode */ hsize_t min_comp; /*minimum size to compress, in bytes */ - int use_native; /*use a native type in write */ + int use_native; /*use a native type in write */ int latest; /*pack file with the latest file format */ int grp_compact; /* Set the maximum number of links to store as header messages in the group */ int grp_indexed; /* Set the minimum number of links to store in the indexed format */ - int msg_size[8]; /* Minimum size of shared messages: dataspace, + int msg_size[8]; /* Minimum size of shared messages: dataspace, datatype, fill value, filter pipleline, attribute */ const char *ublock_filename; /* user block file name */ hsize_t ublock_size; /* user block size */ @@ -161,7 +163,7 @@ int copy_objects (const char* fnamein, int do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, - pack_opt_t *options); + pack_opt_t *options); /*------------------------------------------------------------------------- * filters and verify module diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 69f5059..35fc5fd 100755 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -59,6 +59,7 @@ FILE14=h5repack_layouto.h5 # A file with an older version of the layout mes # (copy of test/tlayouto.h5) FILE15=h5repack_named_dtypes.h5 FILE16=tfamily%05d.h5 # located in common testfiles folder +FILE_REF=h5repack_refs.h5 nerrors=0 @@ -435,7 +436,7 @@ else fi #file -arg="$FILE4 -e $INFO_FILE" +arg="$FILE4 -e $srcdir/$INFO_FILE" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else @@ -531,6 +532,9 @@ TOOLTEST $FILE15 # tests family driver (file is located in common testfiles folder, uses TOOLTEST1 TOOLTEST1 $FILE16 +# test various references (bug 1814) +TOOLTEST $FILE_REF + if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." exit $EXIT_SUCCESS diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 77c03d2..f95db63 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -55,7 +55,7 @@ static hid_t copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named trav_table_t *travt, pack_opt_t *options); static int named_datatype_free(named_dt_t **named_dt_head_p, int ignore_err); static int copy_user_block(const char *infile, const char *outfile, hsize_t size); -#if defined (H5REPACK_DEBUG_USER_BLOCK) +#if defined (H5REPACK_DEBUG_USER_BLOCK) static void print_user_block(const char *filename, hid_t fid); #endif @@ -98,7 +98,7 @@ int copy_objects(const char* fnamein, * open input file *------------------------------------------------------------------------- */ - if((fidin = h5tools_fopen(fnamein, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) + if((fidin = h5tools_fopen(fnamein, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) { error_msg(progname, "<%s>: %s\n", fnamein, H5FOPENERROR ); goto out; @@ -108,17 +108,17 @@ int copy_objects(const char* fnamein, { hid_t fcpl_in; /* file creation property list ID for input file */ - if((fcpl_in = H5Fget_create_plist(fidin)) < 0) + if((fcpl_in = H5Fget_create_plist(fidin)) < 0) { error_msg(progname, "failed to retrieve file creation property list\n"); goto out; - } + } - if(H5Pget_userblock(fcpl_in, &ub_size) < 0) + if(H5Pget_userblock(fcpl_in, &ub_size) < 0) { error_msg(progname, "failed to retrieve userblock size\n"); goto out; - } + } if(!options->fs_strategy) { @@ -138,49 +138,49 @@ int copy_objects(const char* fnamein, } } - if(H5Pclose(fcpl_in) < 0) + if(H5Pclose(fcpl_in) < 0) { error_msg(progname, "failed to close property list\n"); goto out; - } - } + } + } /* Check if we need to create a non-default file creation property list */ - if(options->latest || ub_size > 0) + if(options->latest || ub_size > 0) { /* Create file creation property list */ - if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { error_msg(progname, "fail to create a file creation property list\n"); goto out; - } + } if(ub_size > 0) { - if(H5Pset_userblock(fcpl, ub_size) < 0) + if(H5Pset_userblock(fcpl, ub_size) < 0) { error_msg(progname, "failed to set non-default userblock size\n"); goto out; - } + } } - if(options->latest) + if(options->latest) { unsigned i = 0, nindex = 0, mesg_type_flags[5], min_mesg_sizes[5]; /* Adjust group creation parameters for root group */ /* (So that it is created in "dense storage" form) */ - if(H5Pset_link_phase_change(fcpl, (unsigned)options->grp_compact, (unsigned)options->grp_indexed) < 0) + if(H5Pset_link_phase_change(fcpl, (unsigned)options->grp_compact, (unsigned)options->grp_indexed) < 0) { error_msg(progname, "fail to adjust group creation parameters for root group\n"); goto out; - } + } - for(i = 0; i < 5; i++) + for(i = 0; i < 5; i++) { - if(options->msg_size[i] > 0) + if(options->msg_size[i] > 0) { - switch(i) + switch(i) { case 0: mesg_type_flags[nindex] = H5O_SHMESG_SDSPACE_FLAG; @@ -210,16 +210,16 @@ int copy_objects(const char* fnamein, } /* end if */ } /* end for */ - if(nindex > 0) + if(nindex > 0) { - if(H5Pset_shared_mesg_nindexes(fcpl, nindex) < 0) + if(H5Pset_shared_mesg_nindexes(fcpl, nindex) < 0) { error_msg(progname, "fail to set the number of shared object header message indexes\n"); goto out; - } + } /* msg_size[0]=dataspace, 1=datatype, 2=file value, 3=filter pipleline, 4=attribute */ - for(i = 0; i < (nindex - 1); i++) + for(i = 0; i < (nindex - 1); i++) { if(H5Pset_shared_mesg_index(fcpl, i, mesg_type_flags[i], min_mesg_sizes[i]) < 0) { error_msg(progname, "fail to configure the specified shared object header message index\n"); @@ -229,13 +229,13 @@ int copy_objects(const char* fnamein, } /* if (nindex>0) */ /* Create file access property list */ - if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { error_msg(progname, "Could not create file access property list\n"); goto out; } /* end if */ - if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) { error_msg(progname, "Could not set property for using latest version of the format\n"); goto out; @@ -246,7 +246,7 @@ int copy_objects(const char* fnamein, -#if defined (H5REPACK_DEBUG_USER_BLOCK) +#if defined (H5REPACK_DEBUG_USER_BLOCK) print_user_block(fnamein,fidin); #endif @@ -262,11 +262,11 @@ int copy_objects(const char* fnamein, if(fcpl != H5P_DEFAULT) { /* set user block size */ - if(H5Pset_userblock(fcpl, options->ublock_size) < 0) + if(H5Pset_userblock(fcpl, options->ublock_size) < 0) { error_msg(progname, "failed to set userblock size\n"); goto out; - } + } } @@ -274,18 +274,18 @@ int copy_objects(const char* fnamein, { /* create a file creation property list */ - if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { error_msg(progname, "fail to create a file creation property list\n"); goto out; - } + } /* set user block size */ - if(H5Pset_userblock(fcpl, options->ublock_size) < 0) + if(H5Pset_userblock(fcpl, options->ublock_size) < 0) { error_msg(progname, "failed to set userblock size\n"); goto out; - } + } } @@ -318,11 +318,11 @@ int copy_objects(const char* fnamein, { /* create a file access property list */ - if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { error_msg(progname, "Could not create file access property list\n"); goto out; - } + } if (H5Pset_alignment(fapl, options->threshold, options->alignment) < 0) { @@ -330,7 +330,7 @@ int copy_objects(const char* fnamein, goto out; } - } + } } @@ -338,27 +338,27 @@ int copy_objects(const char* fnamein, if(fcpl != H5P_DEFAULT) { /* set file space strategy and free space threshold */ - if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) + if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) { error_msg(progname, "failed to set file space strategy & threshold\n"); goto out; - } + } } else { /* create a file creation property list */ - if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { error_msg(progname, "fail to create a file creation property list\n"); goto out; - } + } /* set file space strategy and free space threshold */ - if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) + if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) { error_msg(progname, "failed to set file space strategy & threshold \n"); goto out; - } + } } /*------------------------------------------------------------------------- @@ -371,11 +371,11 @@ int copy_objects(const char* fnamein, printf("Making file <%s>...\n",fnameout); - if((fidout = H5Fcreate(fnameout,H5F_ACC_TRUNC, fcpl, fapl)) < 0) + if((fidout = H5Fcreate(fnameout,H5F_ACC_TRUNC, fcpl, fapl)) < 0) { error_msg(progname, "<%s>: Could not create file\n", fnameout ); goto out; - } + } /*------------------------------------------------------------------------- @@ -383,7 +383,7 @@ int copy_objects(const char* fnamein, *------------------------------------------------------------------------- */ if ( options->ublock_size > 0 ) - { + { if ( copy_user_block( options->ublock_filename, fnameout, options->ublock_size) < 0 ) { error_msg(progname, "Could not copy user block. Exiting...\n"); @@ -408,7 +408,7 @@ int copy_objects(const char* fnamein, * do the copy *------------------------------------------------------------------------- */ - if(do_copy_objects(fidin, fidout, travt, options) < 0) + if(do_copy_objects(fidin, fidout, travt, options) < 0) { error_msg(progname, "<%s>: Could not copy data to: %s\n", fnamein, fnameout); goto out; @@ -419,11 +419,11 @@ int copy_objects(const char* fnamein, * and create hard links *------------------------------------------------------------------------- */ - if ( do_copy_refobjs(fidin, fidout, travt, options) < 0 ) + if ( do_copy_refobjs(fidin, fidout, travt, options) < 0 ) { printf("h5repack: <%s>: Could not copy data to: %s\n", fnamein, fnameout); goto out; - } + } /*------------------------------------------------------------------------- * close @@ -466,7 +466,7 @@ int copy_objects(const char* fnamein, */ out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(fapl); H5Pclose(fcpl); @@ -490,7 +490,7 @@ out: * * Date: October, 23, 2003 * -* Modifications: +* Modifications: * * July 2004: Introduced the extra EC or NN option for SZIP * @@ -502,47 +502,47 @@ out: * October 2006: Read by hyperslabs for big datasets. * * A threshold of H5TOOLS_MALLOCSIZE (128 MB) is the limit upon which I/O hyperslab is done -* i.e., if the memory needed to read a dataset is greater than this limit, -* then hyperslab I/O is done instead of one operation I/O +* i.e., if the memory needed to read a dataset is greater than this limit, +* then hyperslab I/O is done instead of one operation I/O * For each dataset, the memory needed is calculated according to * * memory needed = number of elements * size of each element * -* if the memory needed is lower than H5TOOLS_MALLOCSIZE, then the following operations +* if the memory needed is lower than H5TOOLS_MALLOCSIZE, then the following operations * are done * * H5Dread( input_dataset1 ) * H5Dread( input_dataset2 ) * -* with all elements in the datasets selected. If the memory needed is greater than +* with all elements in the datasets selected. If the memory needed is greater than * H5TOOLS_MALLOCSIZE, then the following operations are done instead: * -* a strip mine is defined for each dimension k (a strip mine is defined as a +* a strip mine is defined for each dimension k (a strip mine is defined as a * hyperslab whose size is memory manageable) according to the formula * * (1) strip_mine_size[k ] = MIN(dimension[k ], H5TOOLS_BUFSIZE / size of memory type) * -* where H5TOOLS_BUFSIZE is a constant currently defined as 1MB. This formula assures -* that for small datasets (small relative to the H5TOOLS_BUFSIZE constant), the strip -* mine size k is simply defined as its dimension k, but for larger datasets the +* where H5TOOLS_BUFSIZE is a constant currently defined as 1MB. This formula assures +* that for small datasets (small relative to the H5TOOLS_BUFSIZE constant), the strip +* mine size k is simply defined as its dimension k, but for larger datasets the * hyperslab size is still memory manageable. -* a cycle is done until the number of elements in the dataset is reached. In each -* iteration, two parameters are defined for the function H5Sselect_hyperslab, +* a cycle is done until the number of elements in the dataset is reached. In each +* iteration, two parameters are defined for the function H5Sselect_hyperslab, * the start and size of each hyperslab, according to * * (2) hyperslab_size [k] = MIN(dimension[k] - hyperslab_offset[k], strip_mine_size [k]) * -* where hyperslab_offset [k] is initially set to zero, and later incremented in -* hyperslab_size[k] offsets. The reason for the operation +* where hyperslab_offset [k] is initially set to zero, and later incremented in +* hyperslab_size[k] offsets. The reason for the operation * * dimension[k] - hyperslab_offset[k] * -* in (2) is that, when using the strip mine size, it assures that the "remaining" part +* in (2) is that, when using the strip mine size, it assures that the "remaining" part * of the dataset that does not fill an entire strip mine is processed. * -* November 2006: Use H5Ocopy in the copy of objects. The logic for using -* H5Ocopy or not is if a change of filters or layout is requested by the user -* then use read/write else use H5Ocopy. +* November 2006: Use H5Ocopy in the copy of objects. The logic for using +* H5Ocopy or not is if a change of filters or layout is requested by the user +* then use read/write else use H5Ocopy. * * May, 1, 2008: Add a printing of the compression ratio of old size / new size * @@ -591,18 +591,18 @@ int do_copy_objects(hid_t fidin, *------------------------------------------------------------------------- */ - if (options->verbose) + if (options->verbose) { printf("-----------------------------------------\n"); printf(" Type Filter (Compression) Name\n"); printf("-----------------------------------------\n"); } - for ( i = 0; i < travt->nobjs; i++) + for ( i = 0; i < travt->nobjs; i++) { buf = NULL; - switch ( travt->objs[i].type ) + switch ( travt->objs[i].type ) { case H5TRAV_TYPE_UNKNOWN: @@ -644,7 +644,7 @@ int do_copy_objects(hid_t fidin, * and copy its attributes using that ID *------------------------------------------------------------------------- */ - if(HDstrcmp(travt->objs[i].name, "/") == 0) + if(HDstrcmp(travt->objs[i].name, "/") == 0) { if ((grp_out = H5Gopen2(fidout, "/", H5P_DEFAULT)) < 0) goto error; @@ -653,7 +653,7 @@ int do_copy_objects(hid_t fidin, else { - if (options->grp_compact>0 || options->grp_indexed>0) + if (options->grp_compact>0 || options->grp_indexed>0) { if(H5Pset_link_phase_change(gcpl_out, (unsigned)options->grp_compact, (unsigned)options->grp_indexed) < 0) goto error; @@ -699,7 +699,7 @@ int do_copy_objects(hid_t fidin, /* check if filters were requested for individual objects */ for( u = 0; u < options->op_tbl->nelems; u++) { - int k; + int k; for( k = 0; k < options->op_tbl->objs[u].nfilters; k++) { @@ -740,11 +740,11 @@ int do_copy_objects(hid_t fidin, * otherwise we do a copy using H5Ocopy *------------------------------------------------------------------------- */ - if ( options->op_tbl->nelems || - options->all_filter == 1 || - options->all_layout == 1 || + if ( options->op_tbl->nelems || + options->all_filter == 1 || + options->all_layout == 1 || is_ref || - is_named) + is_named) { int j; @@ -809,7 +809,7 @@ int do_copy_objects(hid_t fidin, apply_s=0; /* apply the filter */ - if (apply_s) + if (apply_s) { if (apply_filters(travt->objs[i].name, rank, @@ -831,7 +831,7 @@ int do_copy_objects(hid_t fidin, dset_out = H5Dcreate2(fidout, travt->objs[i].name, wtype_id, f_space_id, H5P_DEFAULT, dcpl_out, H5P_DEFAULT); } H5E_END_TRY; - if(dset_out == FAIL) + if(dset_out == FAIL) { if(options->verbose) printf(" warning: could not create dataset <%s>. Applying original settings\n", @@ -858,7 +858,7 @@ int do_copy_objects(hid_t fidin, goto error; if (H5Dwrite(dset_out,wtype_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0) goto error; - } + } else /* possibly not enough memory, read/write by hyperslabs */ { @@ -879,7 +879,7 @@ int do_copy_objects(hid_t fidin, hsize_t hs_size[H5S_MAX_RANK]; /*size this pass */ hsize_t hs_nelmts; /*elements in request */ hsize_t zero[8]; /*vector of zeros */ - int k; + int k; /* check if we have VL data in the dataset's datatype */ if (H5Tdetect_class(wtype_id, H5T_VLEN) == TRUE) @@ -891,7 +891,7 @@ int do_copy_objects(hid_t fidin, */ sm_nbytes = p_type_nbytes; - for (k = rank; k > 0; --k) + for (k = rank; k > 0; --k) { hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes; if ( size == 0) /* datum size > H5TOOLS_BUFSIZE */ @@ -909,12 +909,12 @@ int do_copy_objects(hid_t fidin, memset(hs_offset, 0, sizeof hs_offset); memset(zero, 0, sizeof zero); - for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_nelmts) + for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_nelmts) { /* calculate the hyperslab size */ - if (rank > 0) + if (rank > 0) { - for (k = 0, hs_nelmts = 1; k < rank; k++) + for (k = 0, hs_nelmts = 1; k < rank; k++) { hs_size[k] = MIN(dims[k] - hs_offset[k], sm_size[k]); hs_nelmts *= hs_size[k]; @@ -924,8 +924,8 @@ int do_copy_objects(hid_t fidin, goto error; if (H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL) < 0) goto error; - } - else + } + else { H5Sselect_all(f_space_id); H5Sselect_all(sm_space); @@ -933,9 +933,9 @@ int do_copy_objects(hid_t fidin, } /* rank */ /* read/write */ - if (H5Dread(dset_in, wtype_id, sm_space, f_space_id, H5P_DEFAULT, sm_buf) < 0) + if (H5Dread(dset_in, wtype_id, sm_space, f_space_id, H5P_DEFAULT, sm_buf) < 0) goto error; - if (H5Dwrite(dset_out, wtype_id, sm_space, f_space_id, H5P_DEFAULT, sm_buf) < 0) + if (H5Dwrite(dset_out, wtype_id, sm_space, f_space_id, H5P_DEFAULT, sm_buf) < 0) goto error; /* reclaim any VL memory, if necessary */ @@ -943,7 +943,7 @@ int do_copy_objects(hid_t fidin, H5Dvlen_reclaim(wtype_id, sm_space, H5P_DEFAULT, sm_buf); /* calculate the next hyperslab offset */ - for (k = rank, carry = 1; k > 0 && carry; --k) + for (k = rank, carry = 1; k > 0 && carry; --k) { hs_offset[k - 1] += hs_size[k - 1]; if (hs_offset[k - 1] == dims[k - 1]) @@ -967,7 +967,7 @@ int do_copy_objects(hid_t fidin, * amount of compression used *------------------------------------------------------------------------- */ - if (options->verbose) + if (options->verbose) { double ratio=0; @@ -986,7 +986,7 @@ int do_copy_objects(hid_t fidin, else print_dataset_info(dcpl_id,travt->objs[i].name,ratio,0); - /* print a message that the filter was not applied + /* print a message that the filter was not applied (in case there was a filter) */ if ( has_filter && apply_s == 0 ) @@ -1037,16 +1037,16 @@ int do_copy_objects(hid_t fidin, * we do not have request for filter/chunking use H5Ocopy instead *------------------------------------------------------------------------- */ - else + else { hid_t pid; /* create property to pass copy options */ - if ( (pid = H5Pcreate(H5P_OBJECT_COPY)) < 0) + if ( (pid = H5Pcreate(H5P_OBJECT_COPY)) < 0) goto error; /* set options for object copy */ - if(H5Pset_copy_object(pid, H5O_COPY_WITHOUT_ATTR_FLAG) < 0) + if(H5Pset_copy_object(pid, H5O_COPY_WITHOUT_ATTR_FLAG) < 0) goto error; /*------------------------------------------------------------------------- @@ -1059,7 +1059,7 @@ int do_copy_objects(hid_t fidin, fidout, /* Destination file or group identifier */ travt->objs[i].name, /* Name of the destination object */ pid, /* Properties which apply to the copy */ - H5P_DEFAULT) < 0) /* Properties which apply to the new hard link */ + H5P_DEFAULT) < 0) /* Properties which apply to the new hard link */ goto error; /* close property */ @@ -1320,7 +1320,7 @@ int copy_attr(hid_t loc_in, { ; } - else + else { /*------------------------------------------------------------------------- * read to memory @@ -1626,13 +1626,13 @@ error: /*------------------------------------------------------------------------- -* Function: copy_user_block +* Function: copy_user_block * * Purpose: copy user block from one file to another * * Return: 0, ok, -1 no * -* Programmer: Peter Cao +* Programmer: Peter Cao * * Date: October, 25, 2007 * @@ -1706,26 +1706,26 @@ done: if(outfid > 0) HDclose(outfid); - return status; + return status; } /*------------------------------------------------------------------------- -* Function: print_user_block +* Function: print_user_block * * Purpose: print user block * * Return: 0, ok, -1 no * -* Programmer: Pedro Vicente +* Programmer: Pedro Vicente * * Date: August, 20, 2008 * *------------------------------------------------------------------------- */ -#if defined (H5REPACK_DEBUG_USER_BLOCK) -static +#if defined (H5REPACK_DEBUG_USER_BLOCK) +static void print_user_block(const char *filename, hid_t fid) { int fh; /* file handle */ @@ -1734,27 +1734,27 @@ void print_user_block(const char *filename, hid_t fid) hid_t fcpl; /* file creation property list ID for HDF5 file */ int i; - /* get user block size */ - if(( fcpl = H5Fget_create_plist(fid)) < 0) + /* get user block size */ + if(( fcpl = H5Fget_create_plist(fid)) < 0) { error_msg(progname, "failed to retrieve file creation property list\n"); goto done; - } + } - if(H5Pget_userblock(fcpl, &ub_size) < 0) + if(H5Pget_userblock(fcpl, &ub_size) < 0) { error_msg(progname, "failed to retrieve userblock size\n"); goto done; - } + } - if(H5Pclose(fcpl) < 0) + if(H5Pclose(fcpl) < 0) { error_msg(progname, "failed to close property list\n"); goto done; - } + } /* open file */ - if((fh = HDopen(filename, O_RDONLY, 0)) < 0) + if((fh = HDopen(filename, O_RDONLY, 0)) < 0) { goto done; } @@ -1762,7 +1762,7 @@ void print_user_block(const char *filename, hid_t fid) size = ub_size; /* read file */ - while(size > 0) + while(size > 0) { ssize_t nread; /* # of bytes read */ char rbuf[USERBLOCK_XFER_SIZE]; /* buffer for reading */ @@ -1773,7 +1773,7 @@ void print_user_block(const char *filename, hid_t fid) else nread = HDread(fh, rbuf, (size_t)size); - for(i = 0; i < nread; i++) + for(i = 0; i < nread; i++) { printf("%c ", rbuf[i]); @@ -1781,22 +1781,22 @@ void print_user_block(const char *filename, hid_t fid) } printf("\n"); - if(nread < 0) + if(nread < 0) { goto done; - } + } /* update size of userblock left to transfer */ size -= nread; - } + } done: if(fh > 0) HDclose(fh); - return; + return; } #endif diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c index 92b263b..c7d8b1e 100644 --- a/tools/h5repack/h5repack_filters.c +++ b/tools/h5repack/h5repack_filters.c @@ -14,9 +14,16 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" -#include "h5test.h" #include "h5tools.h" +/* number of members in an array */ +#ifndef NELMTS +# define NELMTS(X) (sizeof(X)/sizeof(X[0])) +#endif + +/* minimum of two values */ +#undef MIN +#define MIN(a,b) (((a)<(b)) ? (a) : (b)) /*------------------------------------------------------------------------- * Function: aux_find_obj @@ -300,7 +307,7 @@ int apply_filters(const char* name, /* object name from traverse list */ */ if (obj.layout==-1) { - + /* stripmine info */ hsize_t sm_size[H5S_MAX_RANK]; /*stripmine size */ hsize_t sm_nbytes; /*bytes per stripmine */ @@ -312,10 +319,10 @@ int apply_filters(const char* name, /* object name from traverse list */ * a hyperslab whose size is manageable. */ - - + + sm_nbytes = msize; - for ( i = rank; i > 0; --i) + for ( i = rank; i > 0; --i) { hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes; if ( size == 0) /* datum size > H5TOOLS_BUFSIZE */ @@ -445,18 +452,18 @@ int apply_filters(const char* name, /* object name from traverse list */ if (H5Pset_layout(dcpl_id, obj.layout)<0) return -1; - if (H5D_CHUNKED == obj.layout) - { + if (H5D_CHUNKED == obj.layout) + { if(H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths)<0) return -1; } - else if (H5D_COMPACT == obj.layout) + else if (H5D_COMPACT == obj.layout) { if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY)<0) return -1; } /* remove filters for the H5D_CONTIGUOUS case */ - else if (H5D_CONTIGUOUS == obj.layout) + else if (H5D_CONTIGUOUS == obj.layout) { if (H5Premove_filter(dcpl_id,H5Z_FILTER_ALL)<0) return -1; diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index acbd8ee..8208c0e 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -103,33 +103,33 @@ static struct long_options l_opts[] = { */ int main(int argc, const char **argv) { - + pack_opt_t options; /*the global options */ int ret=-1; - + /* initialize options */ h5repack_init (&options, 0, 0, 0, (hsize_t)0); parse_command_line(argc, argv, &options); - + /* get file names if they were not yet got */ if ( has_i_o == 0 ) { - + if ( argv[ opt_ind ] != NULL && argv[ opt_ind + 1 ] != NULL ) { infile = argv[ opt_ind ]; outfile = argv[ opt_ind + 1 ]; - + if ( strcmp( infile, outfile ) == 0 ) { error_msg(progname, "file names cannot be the same\n"); usage(progname); exit(EXIT_FAILURE); - + } } - + else { error_msg(progname, "file names missing\n"); @@ -137,14 +137,14 @@ int main(int argc, const char **argv) exit(EXIT_FAILURE); } } - - + + /* pack it */ ret=h5repack(infile,outfile,&options); - + /* free tables */ h5repack_end(&options); - + if (ret==-1) return 1; else @@ -291,7 +291,7 @@ static void usage(const char *prog) *------------------------------------------------------------------------- */ -static +static void parse_command_line(int argc, const char **argv, pack_opt_t* options) { @@ -513,18 +513,8 @@ void read_info(const char *filename, FILE *fp; char c; int i, rc=1; - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing file */ - - /* compose the name of the file to open, using the srcdir, if appropriate */ - if (srcdir){ - strcpy(data_file,srcdir); - strcat(data_file,"/"); - } - strcat(data_file,filename); - - if ((fp = fopen(data_file, "r")) == (FILE *)NULL) { + if ((fp = fopen(filename, "r")) == (FILE *)NULL) { error_msg(progname, "cannot open options file %s\n", filename); exit(EXIT_FAILURE); } diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c index 15dc812..2d8f040 100644 --- a/tools/h5repack/h5repack_parse.c +++ b/tools/h5repack/h5repack_parse.c @@ -449,7 +449,7 @@ obj_list_t* parse_filter(const char *str, default: break; - + }; return obj_list; diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c index cd725cd..9945f49 100644 --- a/tools/h5repack/h5repack_refs.c +++ b/tools/h5repack/h5repack_refs.c @@ -74,7 +74,7 @@ int do_copy_refobjs(hid_t fidin, *------------------------------------------------------------------------- */ for(i = 0; i < travt->nobjs; i++) { - switch(travt->objs[i].type) + switch(travt->objs[i].type) { /*------------------------------------------------------------------------- * H5TRAV_TYPE_GROUP @@ -194,8 +194,8 @@ int do_copy_refobjs(hid_t fidin, goto error; if(options->verbose) { - - + + printf(FORMAT_OBJ,"dset",travt->objs[i].name ); printf("object <%s> object reference created to <%s>\n", travt->objs[i].name, @@ -278,9 +278,9 @@ int do_copy_refobjs(hid_t fidin, goto error; if(options->verbose) { - - - + + + printf(FORMAT_OBJ,"dset",travt->objs[i].name ); printf("object <%s> region reference created to <%s>\n", travt->objs[i].name, @@ -441,7 +441,7 @@ static int copy_refs_attr(hid_t loc_in, if(H5Oget_info(loc_in, &oinfo) < 0) goto error; - for(u = 0; u < (unsigned)oinfo.num_attrs; u++) + for(u = 0; u < (unsigned)oinfo.num_attrs; u++) { /*------------------------------------------------------------------------- * open @@ -488,7 +488,7 @@ static int copy_refs_attr(hid_t loc_in, * we cannot just copy the buffers, but instead we recreate the reference *------------------------------------------------------------------------- */ - if(H5Tequal(mtype_id, H5T_STD_REF_OBJ)) + if(H5Tequal(mtype_id, H5T_STD_REF_OBJ)) { hid_t refobj_id; hobj_ref_t *refbuf = NULL; @@ -501,10 +501,10 @@ static int copy_refs_attr(hid_t loc_in, *------------------------------------------------------------------------- */ - if (nelmts) + if (nelmts) { buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize)); - if(buf == NULL) + if(buf == NULL) { printf("cannot read into memory\n"); goto error; @@ -513,15 +513,15 @@ static int copy_refs_attr(hid_t loc_in, goto error; refbuf = (hobj_ref_t *)HDcalloc((unsigned)nelmts, msize); - if(refbuf == NULL) + if(refbuf == NULL) { printf( "cannot allocate memory\n" ); goto error; } /* end if */ - for(k = 0; k < nelmts; k++) + for(k = 0; k < nelmts; k++) { - H5E_BEGIN_TRY + H5E_BEGIN_TRY { if((refobj_id = H5Rdereference(attr_id, H5R_OBJECT, &buf[k])) < 0) goto error; @@ -530,7 +530,7 @@ static int copy_refs_attr(hid_t loc_in, /* get the name. a valid name could only occur in the * second traversal of the file */ - if((refname = MapIdToName(refobj_id, travt)) != NULL) + if((refname = MapIdToName(refobj_id, travt)) != NULL) { /* create the reference */ if(H5Rcreate(&refbuf[k], fidout, refname, H5R_OBJECT, -1) < 0) @@ -565,7 +565,7 @@ static int copy_refs_attr(hid_t loc_in, * dataset region references *------------------------------------------------------------------------- */ - else if(H5Tequal(mtype_id, H5T_STD_REF_DSETREG)) + else if(H5Tequal(mtype_id, H5T_STD_REF_DSETREG)) { hid_t refobj_id; hdset_reg_ref_t *refbuf = NULL; /* input buffer for region references */ @@ -577,10 +577,10 @@ static int copy_refs_attr(hid_t loc_in, * read input to memory *------------------------------------------------------------------------- */ - if(nelmts) + if(nelmts) { buf = (hdset_reg_ref_t *)HDmalloc((unsigned)(nelmts * msize)); - if(buf == NULL) + if(buf == NULL) { printf( "cannot read into memory\n" ); goto error; @@ -593,15 +593,15 @@ static int copy_refs_attr(hid_t loc_in, *------------------------------------------------------------------------- */ refbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */ - if(refbuf == NULL) + if(refbuf == NULL) { printf( "cannot allocate memory\n" ); goto error; } /* end if */ - for(k = 0; k < nelmts; k++) + for(k = 0; k < nelmts; k++) { - H5E_BEGIN_TRY + H5E_BEGIN_TRY { if((refobj_id = H5Rdereference(attr_id, H5R_DATASET_REGION, &buf[k])) < 0) continue; @@ -610,7 +610,7 @@ static int copy_refs_attr(hid_t loc_in, /* get the name. a valid name could only occur in the * second traversal of the file */ - if((refname = MapIdToName(refobj_id, travt)) != NULL) + if((refname = MapIdToName(refobj_id, travt)) != NULL) { hid_t region_id; /* region id of the referenced dataset */ @@ -690,23 +690,31 @@ static const char* MapIdToName(hid_t refobj_id, trav_table_t *travt) { unsigned int i; + const char* ret = NULL; + H5O_info_t ref_oinfo; /* Stat for the refobj id */ /* linear search */ - for(i = 0; i < travt->nobjs; i++) + for(i = 0; i < travt->nobjs; i++) { - if(travt->objs[i].type == H5O_TYPE_DATASET) + if(travt->objs[i].type == H5O_TYPE_DATASET || + travt->objs[i].type == H5O_TYPE_GROUP || + travt->objs[i].type == H5O_TYPE_NAMED_DATATYPE) { H5O_info_t ref_oinfo; /* Stat for the refobj id */ /* obtain information to identify the referenced object uniquely */ if(H5Oget_info(refobj_id, &ref_oinfo) < 0) - return NULL; + goto out; if(ref_oinfo.addr == travt->objs[i].objno) - return(travt->objs[i].name); + { + ret = travt->objs[i].name; + goto out; + } } /* end if */ } /* i */ - return NULL; +out: + return ret; } diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c index fe94148..ac4570b 100644 --- a/tools/h5repack/h5repack_verify.c +++ b/tools/h5repack/h5repack_verify.c @@ -14,13 +14,17 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" -#include "h5test.h" #include "h5tools_utils.h" extern char *progname; static int verify_layout(hid_t pid, pack_info_t *obj); static int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter); +/* number of members in an array */ +#ifndef NELMTS +# define NELMTS(X) (sizeof(X)/sizeof(X[0])) +#endif + /*------------------------------------------------------------------------- * Function: h5repack_verify @@ -230,13 +234,13 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options goto error; } - /* - * If the strategy option is not set, - * file space handling strategy should be the same for both + /* + * If the strategy option is not set, + * file space handling strategy should be the same for both * input & output files. - * If the strategy option is set, + * If the strategy option is set, * the output file's file space handling strategy should be the same - * as what is set via the strategy option + * as what is set via the strategy option */ if(!options->fs_strategy && out_strat != in_strat) { error_msg(progname, "file space strategy not set as unexpected\n"); @@ -247,11 +251,11 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options goto error; } - /* - * If the threshold option is not set, - * the free space section threshold should be the same for both + /* + * If the threshold option is not set, + * the free space section threshold should be the same for both * input & output files. - * If the threshold option is set, + * If the threshold option is set, * the output file's free space section threshold should be the same * as what is set via the threshold option. */ @@ -411,7 +415,7 @@ int h5repack_cmp_pl(const char *fname1, trav_table_init(&trav); if(h5trav_gettable(fid1, trav) < 0) goto error; - + /*------------------------------------------------------------------------- * traverse the suppplied object list *------------------------------------------------------------------------- @@ -551,7 +555,7 @@ error: *------------------------------------------------------------------------- */ -static +static int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) { int nfilters_dcpl; /* number of filters in DCPL*/ diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index aad3df4..50e4cfe 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -78,6 +78,8 @@ #define FNAME_UB "ublock.bin" +/* obj and region references */ +#define FNAME_REF "h5repack_refs.h5" const char *H5REPACK_FILENAMES[] = { "h5repack_big_out", @@ -100,6 +102,13 @@ int d_status = EXIT_SUCCESS; /* Size of userblock (for userblock test) */ #define USERBLOCK_SIZE 2048 +/* obj and region references */ +#define NAME_OBJ_DS "Dset1" +#define NAME_OBJ_GRP "Group" +#define NAME_OBJ_NDTYPE "NamedDatatype" +#define REG_REF_DS1 "Dset_REGREF" +#define REG_REF_DS2 "Dset2" + /*------------------------------------------------------------------------- * prototypes *------------------------------------------------------------------------- @@ -132,6 +141,7 @@ static int make_userblock(void); static int verify_userblock( const char* filename); static int make_userblock_file(void); static int make_named_dtype(hid_t loc_id); +static int make_references(hid_t loc_id); /*------------------------------------------------------------------------- @@ -1618,10 +1628,10 @@ error: * *------------------------------------------------------------------------- */ -static +static int make_testfiles(void) { - hid_t fid; + hid_t fid; /*------------------------------------------------------------------------- * create a file for general copy test @@ -1812,6 +1822,16 @@ int make_testfiles(void) if(H5Fclose(fid) < 0) return -1; + /*------------------------------------------------------------------------- + * create a file with obj and region references + *-------------------------------------------------------------------------*/ + if((fid = H5Fcreate(FNAME_REF,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + return -1; + if (make_references(fid) < 0) + goto out; + if(H5Fclose(fid) < 0) + return -1; + return 0; out: @@ -1828,7 +1848,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_all_objects(hid_t loc_id) { hid_t did=-1; @@ -1836,7 +1856,7 @@ int make_all_objects(hid_t loc_id) hid_t tid=-1; hid_t rid=-1; hid_t sid=-1; - hid_t gcplid=-1; + hid_t gcplid=-1; hsize_t dims[1]={2}; /* compound datatype */ typedef struct s_t @@ -1853,7 +1873,7 @@ int make_all_objects(hid_t loc_id) goto out; if ((did = H5Dcreate2(loc_id, "dset_referenced", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; - + /*------------------------------------------------------------------------- * H5G_GROUP @@ -1862,7 +1882,7 @@ int make_all_objects(hid_t loc_id) if ((gid = H5Gcreate2(loc_id, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; if (H5Gclose(gid) < 0) - goto out; + goto out; /* create a group "g2" with H5P_CRT_ORDER_TRACKED set */ if ((gcplid = H5Pcreate(H5P_GROUP_CREATE)) < 0) @@ -1930,7 +1950,7 @@ int make_all_objects(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Gclose(gid); @@ -1950,7 +1970,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_attributes(hid_t loc_id) { hid_t did=-1; @@ -1966,7 +1986,7 @@ int make_attributes(hid_t loc_id) if ((sid = H5Screate_simple(1, dims, NULL)) < 0) goto out; if ((did = H5Dcreate2(loc_id, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto out; + goto out; /*------------------------------------------------------------------------- * H5G_GROUP @@ -1998,11 +2018,11 @@ int make_attributes(hid_t loc_id) goto out; if (H5Sclose(sid) < 0) goto out; - + return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Gclose(gid); @@ -2020,7 +2040,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_hlinks(hid_t loc_id) { hid_t g1id=-1; @@ -2068,11 +2088,11 @@ int make_hlinks(hid_t loc_id) goto out; if (H5Gclose(g3id) < 0) goto out; - + return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Gclose(g1id); H5Gclose(g2id); @@ -2091,7 +2111,7 @@ out: *------------------------------------------------------------------------- */ #ifdef H5_HAVE_FILTER_SZIP -static +static int make_szip(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2126,19 +2146,19 @@ int make_szip(hid_t loc_id) *------------------------------------------------------------------------- */ /* Make sure encoding is enabled */ - if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) + if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { szip_can_encode = 1; } - if (szip_can_encode) + if (szip_can_encode) { /* set szip data */ if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block) < 0) goto out; if (make_dset(loc_id,"dset_szip",sid,dcpl,buf) < 0) goto out; - } - else + } + else { /* WARNING? SZIP is decoder only, can't generate test files */ } @@ -2168,7 +2188,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_deflate(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2245,7 +2265,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_shuffle(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2311,7 +2331,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_fletcher32(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2381,7 +2401,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_nbit(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2622,11 +2642,11 @@ int make_all_filters(hid_t loc_id) #endif #if defined (H5_HAVE_FILTER_SZIP) - if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) + if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { szip_can_encode = 1; } - if (szip_can_encode) + if (szip_can_encode) { /* set szip data */ if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block) < 0) @@ -2659,7 +2679,7 @@ int make_all_filters(hid_t loc_id) /* Make sure encoding is enabled */ #if defined (H5_HAVE_FILTER_SZIP) - if (szip_can_encode) + if (szip_can_encode) { /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0) @@ -2669,7 +2689,7 @@ int make_all_filters(hid_t loc_id) goto out; if (make_dset(loc_id,"dset_szip",sid,dcpl,buf) < 0) goto out; - } else + } else { /* WARNING? SZIP is decoder only, can't generate test dataset */ } @@ -2733,7 +2753,7 @@ int make_all_filters(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(dcpl); H5Sclose(sid); @@ -2778,7 +2798,7 @@ int make_early(void) if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) goto out; - for(i = 0; i < iter; i++) + for(i = 0; i < iter; i++) { if ((fid = H5Fopen(FNAME5, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) goto out; @@ -2807,7 +2827,7 @@ int make_early(void) if ((fid = H5Fcreate(FNAME6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; - for(i = 0; i < iter; i++) + for(i = 0; i < iter; i++) { if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) goto out; @@ -2828,7 +2848,7 @@ int make_early(void) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Tclose(tid); H5Pclose(dcpl); @@ -2937,7 +2957,7 @@ int make_layout(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(dcpl); H5Sclose(sid); @@ -3123,7 +3143,7 @@ int make_external(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(dcpl); H5Sclose(sid); @@ -3677,9 +3697,9 @@ int write_dset_in(hid_t loc_id, if ((tid = H5Tcopy(H5T_STD_B8LE)) < 0) goto out; if (write_dset(loc_id,2,dims2,"bitfield2D",tid,buf22) < 0) - goto out; + goto out; if (H5Tclose(tid) < 0) - goto out; + goto out; /*------------------------------------------------------------------------- * H5T_OPAQUE @@ -3688,7 +3708,7 @@ int write_dset_in(hid_t loc_id, if ((tid = H5Tcreate(H5T_OPAQUE, (size_t)1)) < 0) goto out; if (H5Tset_tag(tid, "1-byte opaque type") < 0) - goto out; + goto out; if (write_dset(loc_id,2,dims2,"opaque2D",tid,buf22) < 0) goto out; if (H5Tclose(tid) < 0) @@ -3753,7 +3773,7 @@ int write_dset_in(hid_t loc_id, n = 0; for(i = 0; i < 3; i++) { - for(j = 0; j < 2; j++) + for(j = 0; j < 2; j++) { int l; @@ -3974,7 +3994,7 @@ int write_dset_in(hid_t loc_id, { for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) + for(k = 0; k < 2; k++) { int l; @@ -4002,7 +4022,7 @@ int write_dset_in(hid_t loc_id, if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53) < 0) goto out; - + if (H5Dclose(did) < 0) goto out; if (H5Tclose(tid) < 0) @@ -4064,7 +4084,7 @@ int write_dset_in(hid_t loc_id, out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(pid); H5Sclose(sid); @@ -4074,7 +4094,7 @@ out: return -1; } - + /*------------------------------------------------------------------------- * Function: make_dset_reg_ref @@ -4169,7 +4189,7 @@ out: if(dwbuf) free(dwbuf); - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Sclose(sid1); H5Sclose(sid2); @@ -4534,7 +4554,7 @@ int write_attr_in(hid_t loc_id, if(make_diffs) { - for(i = 0; i < 2; i++) + for(i = 0; i < 2; i++) { buf7[i]=0; buf8[i]=0; @@ -4709,9 +4729,9 @@ int write_attr_in(hid_t loc_id, /* Create references to dataset */ if (dset_name) { - for (i = 0; i < 3; i++) + for (i = 0; i < 3; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < 2; j++) { if (H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1) < 0) goto out; @@ -4764,9 +4784,9 @@ int write_attr_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ n=0; - for (i = 0; i < 3; i++) + for (i = 0; i < 3; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < 2; j++) { int l; buf52[i][j].p = malloc((i + 1) * sizeof(int)); @@ -4861,7 +4881,7 @@ int write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if(make_diffs) + if(make_diffs) { HDmemset(buf72, 0, sizeof buf72); HDmemset(buf82, 0, sizeof buf82); @@ -4982,11 +5002,11 @@ int write_attr_in(hid_t loc_id, */ n=1; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { if (make_diffs) buf23[i][j][k]=0; else buf23[i][j][k]=n++; @@ -5051,18 +5071,18 @@ int write_attr_in(hid_t loc_id, */ n=1; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { - if (make_diffs) + if (make_diffs) { buf33[i][j][k].a=0; buf33[i][j][k].b=0; } - else + else { buf33[i][j][k].a=n++; buf33[i][j][k].b=n++; @@ -5143,9 +5163,9 @@ int write_attr_in(hid_t loc_id, /* Create references to dataset */ if (dset_name) { - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { for (k = 0; k < 2; k++) if (H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1) < 0) @@ -5161,17 +5181,17 @@ int write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { - if (make_diffs) + if (make_diffs) { - buf453[i][j][k]=RED; + buf453[i][j][k]=RED; } - else + else { buf453[i][j][k]=GREEN; } @@ -5228,11 +5248,11 @@ int write_attr_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ n=0; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { int l; buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); @@ -5242,7 +5262,7 @@ int write_attr_in(hid_t loc_id, { ((int *)buf53[i][j][k].p)[l] = 0; } - else + else ((int *)buf53[i][j][k].p)[l] = n++; } } @@ -5287,9 +5307,9 @@ int write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ n=1; - for (i = 0; i < 24; i++) + for (i = 0; i < 24; i++) { - for (j = 0; j < (int)dimarray[0]; j++) + for (j = 0; j < (int)dimarray[0]; j++) { if (make_diffs) buf63[i][j]=0; else buf63[i][j]=n++; @@ -5327,12 +5347,12 @@ int write_attr_in(hid_t loc_id, { for(k = 0; k < 2; k++) { - if(make_diffs) + if(make_diffs) { buf73[i][j][k] = 0; buf83[i][j][k] = 0; } - else + else { buf73[i][j][k] = n++; buf83[i][j][k] = f++; @@ -5365,7 +5385,7 @@ int write_attr_in(hid_t loc_id, return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Aclose(aid); H5Sclose(sid); @@ -5621,7 +5641,7 @@ int make_named_dtype(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Tclose(tid); H5Aclose(aid); @@ -5632,3 +5652,307 @@ out: return -1; } /* end make_named_dtype() */ +/*------------------------------------------------------------------------- + * Function: gen_obj_ref + * + * Purpose: + * Generate object references to objects (dataset,group and named datatype) + * + * Note: + * copied from h5copygentest.c and upate to create named datatype + * + * Programmer: Jonathan Kim (March 18, 2010) + *------------------------------------------------------------------------*/ +static herr_t gen_obj_ref(hid_t loc_id) +{ + hid_t sid=0, oid=0, tid=0; + hsize_t dims1[1]={3}; + hsize_t dims2[1]={3}; + int data[3] = {10,20,30}; + hobj_ref_t objref_buf[3]; /* write buffer for obj reference */ + + int status; + herr_t ret = SUCCEED; + + /*-------------- + * add dataset */ + sid = H5Screate_simple(1, dims1, NULL); + if (sid < 0) + { + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + oid = H5Dcreate2 (loc_id, NAME_OBJ_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (oid < 0) + { + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + H5Dclose(oid); + H5Sclose(sid); + + /*-------------- + * add group */ + oid = H5Gcreate2 (loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (oid < 0) + { + fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + H5Gclose(oid); + + /*---------------------- + * add named datatype + */ + tid = H5Tcopy(H5T_NATIVE_INT); + status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /*--------------------------------------------------------- + * create obj references to the previously created objects. + * Passing -1 as reference is an object.*/ + + /* obj ref to dataset */ + status = H5Rcreate (&objref_buf[0], loc_id, NAME_OBJ_DS, H5R_OBJECT, -1); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* obj ref to group */ + status = H5Rcreate (&objref_buf[1], loc_id, NAME_OBJ_GRP, H5R_OBJECT, -1); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* obj ref to named-datatype */ + status = H5Rcreate (&objref_buf[2], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, -1); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /*--------------------------------------------------------- + * create dataset contain references + */ + sid = H5Screate_simple (1, dims2, NULL); + if (sid < 0) + { + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + oid = H5Dcreate2 (loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); + if (oid < 0) + { + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, objref_buf); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + +out: + if(oid > 0) + H5Dclose(oid); + if(tid > 0) + H5Tclose(tid); + if(sid > 0) + H5Sclose(sid); + + return ret; +} + + +/*------------------------------------------------------------------------- + * Function: gen_region_ref + * + * Purpose: Generate dataset region references + * + * Note: + * copied from h5copygentest.c + * + * Programmer: Jonathan Kim (March 18, 2010) + *------------------------------------------------------------------------*/ +static herr_t gen_region_ref(hid_t loc_id) +{ + hid_t sid=0, oid1=0, oid2=0; + int status; + herr_t ret = SUCCEED; + char data[3][16] = {"The quick brown", "fox jumps over ", "the 5 lazy dogs"}; + hsize_t dims2[2] = {3,16}; + hsize_t coords[4][2] = { {0,1}, {2,11}, {1,0}, {2,4} }; + + hdset_reg_ref_t rr_data[2]; + hsize_t start[2] = {0,0}; + hsize_t stride[2] = {2,11}; + hsize_t count[2] = {2,2}; + hsize_t block[2] = {1,3}; + hsize_t dims1[1] = {2}; + + sid = H5Screate_simple (2, dims2, NULL); + if (sid < 0) + { + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* create normal dataset which is refered */ + oid2 = H5Dcreate2 (loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); + if (oid2 < 0) + { + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* write values to dataset */ + status = H5Dwrite (oid2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* select elements space for reference */ + status = H5Sselect_elements (sid, H5S_SELECT_SET, 4, coords[0]); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* create region reference from elements space */ + status = H5Rcreate (&rr_data[0], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* select hyperslab space for reference */ + status = H5Sselect_hyperslab (sid, H5S_SELECT_SET, start, stride, count, block); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* create region reference from hyperslab space */ + status = H5Rcreate (&rr_data[1], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + H5Sclose (sid); + + /* Create dataspace. */ + sid = H5Screate_simple (1, dims1, NULL); + if (sid < 0) + { + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* create region reference dataset */ + oid1 = H5Dcreate2 (loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); + if (oid1 < 0) + { + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + + /* write data as region references */ + status = H5Dwrite (oid1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data); + if (status < 0) + { + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + ret = FAIL; + goto out; + } + +out: + if (oid1 > 0) + H5Dclose (oid1); + if (oid2 > 0) + H5Dclose (oid2); + if (sid > 0) + H5Sclose (sid); + + return ret; +} + +/*------------------------------------------------------------------------- +* Function: make_references +* +* Purpose: create a file with obj and region references +* +* Programmer: Jonathan Kim (March 18, 2010) +*------------------------------------------------------------------------- +*/ +static herr_t make_references(hid_t loc_id) +{ + herr_t ret = SUCCEED; + herr_t status; + + /* add object reference */ + status = gen_obj_ref(loc_id); + if (status == FAIL) + { + fprintf(stderr, "Failed to generate object reference.\n"); + ret = FAIL; + } + + /* add region reference */ + status = gen_region_ref(loc_id); + if (status == FAIL) + { + fprintf(stderr, "Failed to generate region reference.\n"); + ret = FAIL; + } + + return ret; +} + diff --git a/tools/h5repack/testfiles/h5repack_refs.h5 b/tools/h5repack/testfiles/h5repack_refs.h5 new file mode 100644 index 0000000..23d53e6 Binary files /dev/null and b/tools/h5repack/testfiles/h5repack_refs.h5 differ diff --git a/tools/h5repack/testh5repack_detect_szip.c b/tools/h5repack/testh5repack_detect_szip.c index 906996a..b16e0d4 100644 --- a/tools/h5repack/testh5repack_detect_szip.c +++ b/tools/h5repack/testh5repack_detect_szip.c @@ -16,8 +16,6 @@ #include #include "h5repack.h" #include "h5tools.h" -#include "h5test.h" - /*------------------------------------------------------------------------- diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index aa10eb4..be74d21 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -34,7 +34,7 @@ /* File space management strategies: see H5Fpublic.h for declarations */ const char *FS_STRATEGY_NAME[] = { - "unknown", + "unknown", "H5F_FILE_SPACE_ALL_PERSIST", "H5F_FILE_SPACE_ALL", "H5F_FILE_SPACE_AGGR_VFD", @@ -124,7 +124,7 @@ static int display_all = TRUE; static int display_file = FALSE; /* display file information */ static int display_group = FALSE; /* display groups information */ static int display_dset = FALSE; /* display datasets information */ -static int display_dset_dtype_info = FALSE; /* display datasets' datatype information */ +static int display_dset_dtype_meta = FALSE; /* display datasets' datatype information */ static int display_attr = FALSE; /* display attributes information */ static int display_free_sections = FALSE; /* display free space information */ static int display_summary = FALSE; /* display summary of file space information */ @@ -141,72 +141,77 @@ struct handler_t { }; -static const char *s_opts ="aDdFfhGgsSTO:v"; +static const char *s_opts ="ADdFfhGgsSTO:V"; +/* e.g. "filemetadata" has to precedue "file"; "groupmetadata" has to precede "group" etc. */ static struct long_options l_opts[] = { {"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {"he", no_arg, 'h'}, + {"filemetadata", no_arg, 'F'}, + {"filemetadat", no_arg, 'F'}, + {"filemetada", no_arg, 'F'}, + {"filemetad", no_arg, 'F'}, + {"filemeta", no_arg, 'F'}, + {"filemet", no_arg, 'F'}, + {"fileme", no_arg, 'F'}, + {"filem", no_arg, 'F'}, {"file", no_arg, 'f'}, {"fil", no_arg, 'f'}, {"fi", no_arg, 'f'}, - {"FILEmetadata", no_arg, 'F'}, - {"FILEmetadat", no_arg, 'F'}, - {"FILEmetada", no_arg, 'F'}, - {"FILEmetad", no_arg, 'F'}, - {"FILEmeta", no_arg, 'F'}, - {"FILEmet", no_arg, 'F'}, - {"FILEme", no_arg, 'F'}, - {"FILEm", no_arg, 'F'}, + {"groupmetadata", no_arg, 'G'}, + {"groupmetadat", no_arg, 'G'}, + {"groupmetada", no_arg, 'G'}, + {"groupmetad", no_arg, 'G'}, + {"groupmeta", no_arg, 'G'}, + {"groupmet", no_arg, 'G'}, + {"groupme", no_arg, 'G'}, + {"groupm", no_arg, 'G'}, {"group", no_arg, 'g'}, {"grou", no_arg, 'g'}, {"gro", no_arg, 'g'}, {"gr", no_arg, 'g'}, - {"GROUPmetadata", no_arg, 'G'}, - {"GROUPmetadat", no_arg, 'G'}, - {"GROUPmetada", no_arg, 'G'}, - {"GROUPmetad", no_arg, 'G'}, - {"GROUPmeta", no_arg, 'G'}, - {"GROUPmet", no_arg, 'G'}, - {"GROUPme", no_arg, 'G'}, - {"GROUPm", no_arg, 'G'}, + {"dsetmetadata", no_arg, 'D'}, + {"dsetmetadat", no_arg, 'D'}, + {"dsetmetada", no_arg, 'D'}, + {"dsetmetad", no_arg, 'D'}, + {"dsetmeta", no_arg, 'D'}, + {"dsetmet", no_arg, 'D'}, + {"dsetme", no_arg, 'D'}, + {"dsetm", no_arg, 'D'}, {"dset", no_arg, 'd'}, {"dse", no_arg, 'd'}, {"ds", no_arg, 'd'}, - {"DSETmetadata", no_arg, 'D'}, - {"DSETmetadat", no_arg, 'D'}, - {"DSETmetada", no_arg, 'D'}, - {"DSETmetad", no_arg, 'D'}, - {"DSETmeta", no_arg, 'D'}, - {"DSETmet", no_arg, 'D'}, - {"DSETme", no_arg, 'D'}, - {"DSETm", no_arg, 'D'}, - {"DSETtypeinfo", no_arg, 'T'}, - {"DSETtypeinf", no_arg, 'T'}, - {"DSETtypein", no_arg, 'T'}, - {"DSETtypei", no_arg, 'T'}, - {"DSETtype", no_arg, 'T'}, - {"DSETtyp", no_arg, 'T'}, - {"DSETty", no_arg, 'T'}, - {"DSETt", no_arg, 'T'}, + {"dtypemetadata", no_arg, 'T'}, + {"dtypemetadat", no_arg, 'T'}, + {"dtypemetada", no_arg, 'T'}, + {"dtypemetad", no_arg, 'T'}, + {"dtypemeta", no_arg, 'T'}, + {"dtypemet", no_arg, 'T'}, + {"dtypeme", no_arg, 'T'}, + {"dtypem", no_arg, 'T'}, + {"dtype", no_arg, 'T'}, + {"dtyp", no_arg, 'T'}, + {"dty", no_arg, 'T'}, + {"dt", no_arg, 'T'}, { "object", require_arg, 'O' }, { "objec", require_arg, 'O' }, { "obje", require_arg, 'O' }, { "obj", require_arg, 'O' }, { "ob", require_arg, 'O' }, - { "version", no_arg, 'v' }, - { "versio", no_arg, 'v' }, - { "versi", no_arg, 'v' }, - { "vers", no_arg, 'v' }, - { "ver", no_arg, 'v' }, - { "ve", no_arg, 'v' }, - { "attribute", no_arg, 'a' }, - { "attribut", no_arg, 'a' }, - { "attribu", no_arg, 'a' }, - { "attrib", no_arg, 'a' }, - { "attri", no_arg, 'a' }, - { "attr", no_arg, 'a' }, - { "att", no_arg, 'a' }, - { "at", no_arg, 'a' }, + { "version", no_arg, 'V' }, + { "versio", no_arg, 'V' }, + { "versi", no_arg, 'V' }, + { "vers", no_arg, 'V' }, + { "ver", no_arg, 'V' }, + { "ve", no_arg, 'V' }, + { "attribute", no_arg, 'A' }, + { "attribut", no_arg, 'A' }, + { "attribu", no_arg, 'A' }, + { "attrib", no_arg, 'A' }, + { "attri", no_arg, 'A' }, + { "attr", no_arg, 'A' }, + { "att", no_arg, 'A' }, + { "at", no_arg, 'A' }, { "freespace", no_arg, 's' }, { "freespac", no_arg, 's' }, { "freespa", no_arg, 's' }, @@ -239,15 +244,15 @@ static void usage(const char *prog) fprintf(stdout, "\n"); fprintf(stdout, " OPTIONS\n"); fprintf(stdout, " -h, --help Print a usage message and exit\n"); - fprintf(stdout, " -v, --version Print version number and exit\n"); + fprintf(stdout, " -V, --version Print version number and exit\n"); fprintf(stdout, " -f, --file Print file information\n"); - fprintf(stdout, " -F, --FILEmetadata Print file space information for file's metadata\n"); + fprintf(stdout, " -F, --filemetadata Print file space information for file's metadata\n"); fprintf(stdout, " -g, --group Print group information\n"); - fprintf(stdout, " -G, --GROUPmetadata Print file space information for groups' metadata\n"); + fprintf(stdout, " -G, --groupmetadata Print file space information for groups' metadata\n"); fprintf(stdout, " -d, --dset Print dataset information\n"); - fprintf(stdout, " -D, --DSETmetadata Print file space information for datasets' metadata\n"); - fprintf(stdout, " -T, --DSETtypeinfo Print datasets' datatype information\n"); - fprintf(stdout, " -a, --attribute Print attribute information\n"); + fprintf(stdout, " -D, --dsetmetadata Print file space information for datasets' metadata\n"); + fprintf(stdout, " -T, --dtypemetadata Print datasets' datatype information\n"); + fprintf(stdout, " -A, --attribute Print attribute information\n"); fprintf(stdout, " -s, --freespace Print free space information\n"); fprintf(stdout, " -S, --summary Print summary of file space information\n"); } @@ -613,6 +618,8 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi) static herr_t datatype_stats(iter_t *iter, const H5O_info_t *oi) { + herr_t ret; + /* Gather statistics about this type of object */ iter->uniq_dtypes++; @@ -620,6 +627,10 @@ datatype_stats(iter_t *iter, const H5O_info_t *oi) iter->dtype_ohdr_info.total_size += oi->hdr.space.total; iter->dtype_ohdr_info.free_size += oi->hdr.space.free; + /* Update attribute metadata info */ + ret = attribute_stats(iter, oi); + assert(ret >= 0); + return 0; } /* end datatype_stats() */ @@ -781,7 +792,7 @@ freespace_stats(hid_t fid, iter_t *iter) * Programmer: Elena Pourmal * Saturday, August 12, 2006 * - * Modifications: + * Modifications: * Vailin Choi; October 2009 * Turn on display_group_metadata, display_dset_metadata * Add 'S' & 's' for printing free space info (previous checkin) @@ -804,12 +815,11 @@ parse_command_line(int argc, const char *argv[]) usage(progname); leave(EXIT_SUCCESS); - case 'v': + case 'V': print_version(progname); leave(EXIT_SUCCESS); break; - case 'F': display_all = FALSE; display_file_metadata = TRUE; @@ -842,10 +852,10 @@ parse_command_line(int argc, const char *argv[]) case 'T': display_all = FALSE; - display_dset_dtype_info = TRUE; + display_dset_dtype_meta = TRUE; break; - case 'a': + case 'A': display_all = FALSE; display_attr = TRUE; break; @@ -1145,15 +1155,15 @@ print_dataset_info(const iter_t *iter) /*------------------------------------------------------------------------- - * Function: print_dset_dtype_info + * Function: print_dset_dtype_meta * - * Purpose: Prints datasets' datatype information + * Purpose: Prints datasets' datatype information * * Return: Success: 0 * * Failure: Never fails * - * Programmer: + * Programmer: * * Modifications: * Vailin Choi; October 2009 @@ -1162,7 +1172,7 @@ print_dataset_info(const iter_t *iter) *------------------------------------------------------------------------- */ static herr_t -print_dset_dtype_info(const iter_t *iter) +print_dset_dtype_meta(const iter_t *iter) { unsigned long total; /* Total count for various statistics */ size_t dtype_size; /* Size of encoded datatype */ @@ -1175,7 +1185,7 @@ print_dset_dtype_info(const iter_t *iter) for(u = 0; u < iter->dset_ntypes; u++) { H5Tencode(iter->dset_type_info[u].tid, NULL, &dtype_size); printf("\tDataset datatype #%u:\n", u); - printf("\t\tCount (total/named) = (%lu/%lu)\n", + printf("\t\tCount (total/named) = (%lu/%lu)\n", iter->dset_type_info[u].count, iter->dset_type_info[u].named); printf("\t\tSize (desc./elmt) = (%lu/%lu)\n", (unsigned long)dtype_size, (unsigned long)H5Tget_size(iter->dset_type_info[u].tid)); @@ -1186,7 +1196,7 @@ print_dset_dtype_info(const iter_t *iter) } return 0; -} /* print_dset_dtype_info() */ +} /* print_dset_dtype_meta() */ /*------------------------------------------------------------------------- @@ -1281,7 +1291,7 @@ print_storage_summary(const iter_t *iter) percent = ((float)iter->free_space / (float)iter->filesize) * 100; HDfprintf(stdout, " Amount/Percent of tracked free space: %Hu bytes/%3.1f%\n", - iter->free_space, percent); + iter->free_space, percent); if(iter->filesize < (total_meta+iter->dset_storage_size+iter->free_space)) { unaccount = (total_meta + iter->dset_storage_size + iter->free_space) - iter->filesize; @@ -1292,7 +1302,7 @@ print_storage_summary(const iter_t *iter) HDfprintf(stdout, " Unaccounted space: %Hu bytes\n", unaccount); } - HDfprintf(stdout, "Total space: %Hu bytes\n", + HDfprintf(stdout, "Total space: %Hu bytes\n", total_meta+iter->dset_storage_size+iter->free_space+unaccount); if(iter->nexternal) @@ -1329,7 +1339,7 @@ print_file_metadata(const iter_t *iter) HDfprintf(stdout, "\t\tGroups: %Hu/%Hu\n", iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size); - HDfprintf(stdout, "\t\tDatasets(exclude compact data): %Hu/%Hu\n", + HDfprintf(stdout, "\t\tDatasets(exclude compact data): %Hu/%Hu\n", iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size); HDfprintf(stdout, "\t\tDatatypes: %Hu/%Hu\n", @@ -1366,7 +1376,7 @@ print_file_metadata(const iter_t *iter) /*------------------------------------------------------------------------- * Function: print_group_metadata * - * Purpose: Prints file space information for groups' metadata + * Purpose: Prints file space information for groups' metadata * * Return: Success: 0 * @@ -1394,7 +1404,7 @@ print_group_metadata(const iter_t *iter) /*------------------------------------------------------------------------- * Function: print_dataset_metadata * - * Purpose: Prints file space information for datasets' metadata + * Purpose: Prints file space information for datasets' metadata * * Return: Success: 0 * @@ -1446,7 +1456,7 @@ print_file_statistics(const iter_t *iter) display_file = TRUE; display_group = TRUE; display_dset = TRUE; - display_dset_dtype_info = TRUE; + display_dset_dtype_meta = TRUE; display_attr = TRUE; display_free_sections = TRUE; display_summary = TRUE; @@ -1463,7 +1473,7 @@ print_file_statistics(const iter_t *iter) if(!display_all && display_group_metadata) print_group_metadata(iter); if(display_dset) print_dataset_info(iter); - if(display_dset_dtype_info) print_dset_dtype_info(iter); + if(display_dset_dtype_meta) print_dset_dtype_meta(iter); if(!display_all && display_dset_metadata) print_dset_metadata(iter); if(display_attr) print_attr_info(iter); @@ -1558,7 +1568,7 @@ main(int argc, const char *argv[]) if(H5Fget_filesize(fid, &iter.filesize) < 0) warn_msg(progname, "Unable to retrieve file size\n"); assert(iter.filesize != 0); - + /* Get storge info for file-level structures */ if(H5Fget_info2(fid, &finfo) < 0) warn_msg(progname, "Unable to retrieve file info\n"); @@ -1592,7 +1602,7 @@ main(int argc, const char *argv[]) u = 0; while(hand[u].obj) { - if (h5trav_visit(fid, hand[u].obj, TRUE, TRUE, obj_stats, lnk_stats, &iter) < 0) + if (h5trav_visit(fid, hand[u].obj, TRUE, TRUE, obj_stats, lnk_stats, &iter) < 0) warn_msg(progname, "Unable to traverse object \"%s\"\n", hand[u].obj); else print_statistics(hand[u].obj, &iter); diff --git a/tools/h5stat/testfiles/h5stat_filters-UD.ddl b/tools/h5stat/testfiles/h5stat_filters-UD.ddl new file mode 100644 index 0000000..decfb81 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_filters-UD.ddl @@ -0,0 +1,8 @@ +############################# +Expected output for 'h5stat -D h5stat_filters.h5' +############################# +Filename: h5stat_filters.h5 +File space information for datasets' metadata (in bytes): + Object headers (total/unused): 4136/1344 + Index for Chunked datasets: 31392 + Heap: 72 diff --git a/tools/h5stat/testfiles/h5stat_filters-UT.ddl b/tools/h5stat/testfiles/h5stat_filters-UT.ddl new file mode 100644 index 0000000..189eaa6 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_filters-UT.ddl @@ -0,0 +1,13 @@ +############################# +Expected output for 'h5stat -T h5stat_filters.h5' +############################# +Filename: h5stat_filters.h5 +Dataset datatype information: + # of unique datatypes used by datasets: 2 + Dataset datatype #0: + Count (total/named) = (14/0) + Size (desc./elmt) = (14/4) + Dataset datatype #1: + Count (total/named) = (1/0) + Size (desc./elmt) = (14/4) + Total dataset datatype count: 15 diff --git a/tools/h5stat/testfiles/h5stat_help1.ddl b/tools/h5stat/testfiles/h5stat_help1.ddl index e70fef1..5665b35 100644 --- a/tools/h5stat/testfiles/h5stat_help1.ddl +++ b/tools/h5stat/testfiles/h5stat_help1.ddl @@ -5,14 +5,14 @@ Usage: h5stat [OPTIONS] file OPTIONS -h, --help Print a usage message and exit - -v, --version Print version number and exit + -V, --version Print version number and exit -f, --file Print file information - -F, --FILEmetadata Print file space information for file's metadata + -F, --filemetadata Print file space information for file's metadata -g, --group Print group information - -G, --GROUPmetadata Print file space information for groups' metadata + -G, --groupmetadata Print file space information for groups' metadata -d, --dset Print dataset information - -D, --DSETmetadata Print file space information for datasets' metadata - -T, --DSETtypeinfo Print datasets' datatype information - -a, --attribute Print attribute information + -D, --dsetmetadata Print file space information for datasets' metadata + -T, --dtypemetadata Print datasets' datatype information + -A, --attribute Print attribute information -s, --freespace Print free space information -S, --summary Print summary of file space information diff --git a/tools/h5stat/testfiles/h5stat_help2.ddl b/tools/h5stat/testfiles/h5stat_help2.ddl index fbfdd14..3fb303a 100644 --- a/tools/h5stat/testfiles/h5stat_help2.ddl +++ b/tools/h5stat/testfiles/h5stat_help2.ddl @@ -5,14 +5,14 @@ Usage: h5stat [OPTIONS] file OPTIONS -h, --help Print a usage message and exit - -v, --version Print version number and exit + -V, --version Print version number and exit -f, --file Print file information - -F, --FILEmetadata Print file space information for file's metadata + -F, --filemetadata Print file space information for file's metadata -g, --group Print group information - -G, --GROUPmetadata Print file space information for groups' metadata + -G, --groupmetadata Print file space information for groups' metadata -d, --dset Print dataset information - -D, --DSETmetadata Print file space information for datasets' metadata - -T, --DSETtypeinfo Print datasets' datatype information - -a, --attribute Print attribute information + -D, --dsetmetadata Print file space information for datasets' metadata + -T, --dtypemetadata Print datasets' datatype information + -A, --attribute Print attribute information -s, --freespace Print free space information -S, --summary Print summary of file space information diff --git a/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl new file mode 100644 index 0000000..70f9a82 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl @@ -0,0 +1,10 @@ +############################# +Expected output for 'h5stat -A h5stat_newgrat.h5' +############################# +Filename: h5stat_newgrat.h5 +Small # of attributes: + Total # of objects with small # of attributes: 0 +Attribute bins: + # of objects with 100 - 999 attributes: 1 + Total # of objects with attributes: 1 + Max. # of attributes to objects: 100 diff --git a/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl b/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl new file mode 100644 index 0000000..ecebdef --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl @@ -0,0 +1,8 @@ +############################# +Expected output for 'h5stat -G h5stat_newgrat.h5' +############################# +Filename: h5stat_newgrat.h5 +File space information for groups' metadata (in bytes): + Object headers (total/unused): 5145147/3220092 + B-tree/List: 470054 + Heap: 739045 diff --git a/tools/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in index a1fff1d..2a09f9f 100644 --- a/tools/h5stat/testh5stat.sh.in +++ b/tools/h5stat/testh5stat.sh.in @@ -123,14 +123,18 @@ TOOLTEST h5stat_filters-F.ddl -F h5stat_filters.h5 TOOLTEST h5stat_filters-d.ddl -d h5stat_filters.h5 TOOLTEST h5stat_filters-g.ddl -g h5stat_filters.h5 TOOLTEST h5stat_filters-dT.ddl -dT h5stat_filters.h5 +TOOLTEST h5stat_filters-UD.ddl -D h5stat_filters.h5 +TOOLTEST h5stat_filters-UT.ddl -T h5stat_filters.h5 +# # h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c # as of release 1.8.0-alpha4 TOOLTEST h5stat_tsohm.ddl h5stat_tsohm.h5 # h5stat_newgrat.h5 is generated by h5stat_gentest.c TOOLTEST h5stat_newgrat.ddl h5stat_newgrat.h5 +TOOLTEST h5stat_newgrat-UG.ddl -G h5stat_newgrat.h5 +TOOLTEST h5stat_newgrat-UA.ddl -A h5stat_newgrat.h5 # h5stat_idx.h5 is generated by h5stat_gentest.c TOOLTEST h5stat_idx.ddl h5stat_idx.h5 -echo if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 4b7b796..9e753fe 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -27,24 +27,21 @@ typedef enum toolname_t { /* this struct can be used to differntiate among tools if necessary */ typedef struct { h5tool_toolname_t toolname; - int mode; + int msg_mode; } h5tool_opt_t; -/* To return link's target info +/* To return link info * Functions: - * H5tools_get_softlink_target_info() - * H5tools_get_extlink_target_info() + * H5tools_get_link_info() * Note: this may be move to h5tools code if used by other tools */ typedef struct { - const char *buf; /* IN: must be allocated along with H5Lget_info[li.u.val_size] */ - H5O_type_t type; /* OUT: target type */ - const char *path; /* OUT: target name */ - int is_path_malloced; /* VAR: Set to TRUE if path is malloced, so can be freed by checking this later. Needed when ext-link's target is soft-link */ - const char *extfile; /* OUT: if external link, external filename */ - hid_t extfile_id; /* OUT: if external link, external file id */ - h5tool_opt_t opt; /* IN: options */ -} h5tool_link_trg_info_t; + H5O_type_t trg_type; /* OUT: target type */ + const char *trg_path; /* OUT: target obj path. This must be freed + * when used with H5tools_get_link_info() */ + H5L_info_t linfo; /* OUT: link info */ + h5tool_opt_t opt; /* IN: options */ +} h5tool_link_info_t; /* * Debug printf macros. The prefix allows output filtering by test scripts. */ @@ -90,6 +87,21 @@ do_print_objname (const char *OBJ, const char *path1, const char *path2) parallel_print("%-7s: <%s> and <%s>\n", OBJ, path1, path2); } +/*------------------------------------------------------------------------- + * Function: print_warn + * + * Purpose: check print warning condition. + * Return: + * 1 if verbose mode + * 0 if not verbos mode + * Programmer: Jonathan Kim + * Date: Feb 4, 2010 + *------------------------------------------------------------------------- + */ +static int print_warn(diff_opt_t *options) +{ + return ((options->m_verbose))?1:0; +} #ifdef H5_HAVE_PARALLEL @@ -108,9 +120,9 @@ do_print_objname (const char *OBJ, const char *path1, const char *path2) */ void phdiff_dismiss_workers(void) { - int i; - for(i=1; i0) && g_Parallel) - { - printf("%s", outBuff); - - if(overflow_file) - { - int tmp; - - rewind(overflow_file); - while((tmp = getc(overflow_file)) >= 0) - putchar(tmp); - - fclose(overflow_file); - overflow_file = NULL; - } - - fflush(stdout); - memset(outBuff, 0, OUTBUFF_SIZE); - outBuffOffset = 0; - } - else if( (outBuffOffset>0) && !g_Parallel) - { - fprintf(stderr, "h5diff error: outBuffOffset>0, but we're not in parallel!\n"); - } + /* If there was something we buffered, let's print it now */ + if( (outBuffOffset>0) && g_Parallel) + { + printf("%s", outBuff); + + if(overflow_file) + { + int tmp; + rewind(overflow_file); + while((tmp = getc(overflow_file)) >= 0) + putchar(tmp); + fclose(overflow_file); + overflow_file = NULL; + } + + fflush(stdout); + memset(outBuff, 0, OUTBUFF_SIZE); + outBuffOffset = 0; + } + else if( (outBuffOffset>0) && !g_Parallel) + { + fprintf(stderr, "h5diff error: outBuffOffset>0, but we're not in parallel!\n"); + } } /*------------------------------------------------------------------------- @@ -174,253 +184,200 @@ void print_manager_output(void) static void print_incoming_data(void) { - char data[PRINT_DATA_MAX_SIZE+1]; - int incomingMessage; - MPI_Status Status; - - do - { - MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &incomingMessage, &Status); - if(incomingMessage) - { - memset(data, 0, PRINT_DATA_MAX_SIZE+1); - MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &Status); - - printf("%s", data); - } - } while(incomingMessage); + char data[PRINT_DATA_MAX_SIZE+1]; + int incomingMessage; + MPI_Status Status; + + do + { + MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &incomingMessage, &Status); + if(incomingMessage) + { + memset(data, 0, PRINT_DATA_MAX_SIZE+1); + MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &Status); + + printf("%s", data); + } + } while(incomingMessage); } #endif /*------------------------------------------------------------------------- - * Function: H5tools_get_softlink_target_info + * Function: is_valid_options * - * Purpose: Get target object's type and path from soft-link path - * - * Patameters: - * - [IN] fileid : soft-link file id - * - [IN] linkpath : soft-link's source path - * - [IN] h5li : soft-link's source H5L_info_t - * - [OUT] trg_info: returning target info (refer to struct) + * Purpose: check if options are valid * * Return: - * Success - 1 and return data via trg_info struct - * Fail - 0 - * - * Note: - * trg_info->buf must be allocated along with H5Lget_info[li.u.val_size] - * before passing to this function. + * 1 : Valid + * 0 : Not valid * * Programmer: Jonathan Kim * - * Date: Jan 20, 2010 - *-------------------------------------------------------------------------*/ -static int H5tools_get_softlink_target_info(hid_t file_id, const char * linkpath, H5L_info_t h5li, h5tool_link_trg_info_t *s_trg_info) + * Date: Feb 17, 2010 + * + *------------------------------------------------------------------------*/ +static int is_valid_options(diff_opt_t *options) { - H5O_type_t otype = H5O_TYPE_UNKNOWN; - H5O_info_t oinfo; - H5L_info_t linfo; - int ret = 0; /* init to fail */ - + int ret=1; /* init to valid */ - if((H5Lexists(file_id, linkpath, H5P_DEFAULT) <= 0)) + /*----------------------------------------------- + * no -q(quiet) with -v (verbose) or -r (report) */ + if(options->m_quiet && (options->m_verbose || options->m_report)) { - parallel_print("error: \"%s\" doesn't exist \n",linkpath); + parallel_print("Error: -q (quiet mode) cannot be added to verbose or report modes\n"); + options->err_stat=1; + ret = 0; goto out; } - if(H5Lget_info(file_id, linkpath, &linfo, H5P_DEFAULT) < 0) + /* ------------------------------------------------------- + * only allow --no-dangling-links along with --follow-links */ + if(options->no_dangle_links && !options->follow_links) { - parallel_print("error: unable to get link info from \"%s\"\n",linkpath); + parallel_print("Error: --no-dangling-links must be used along with --follow-links option.\n"); + options->err_stat=1; + ret = 0; goto out; } - /* get target name for softlink */ - if(linfo.type == H5L_TYPE_SOFT) - { - /* s_trg_info->buf should be already allocated out of - * this function and free when done */ - if(H5Lget_val(file_id, linkpath, s_trg_info->buf, h5li.u.val_size, H5P_DEFAULT) < 0) - { - parallel_print("error: unable to get link value from \"%s\"\n",s_trg_info->path); - goto out; - } - /* target path */ - s_trg_info->path = s_trg_info->buf; - } - /* if obj is hard link, will still get the type */ - else if (linfo.type == H5L_TYPE_HARD) - { - s_trg_info->path = linkpath; - } - - /*-------------------------------------------------------------- - * if link target or object exit, get type - */ - if((H5Lexists(file_id, s_trg_info->path, H5P_DEFAULT) == TRUE)) - { - - if(H5Oget_info_by_name(file_id, s_trg_info->path, &oinfo, H5P_DEFAULT) < 0) - { - parallel_print("error: unable to get object information for \"%s\"\n", s_trg_info->path); - goto out; - } - - otype = oinfo.type; - - - /* check unknown type */ - if (otype < H5O_TYPE_GROUP || otype >=H5O_TYPE_NTYPES) - { - parallel_print("<%s> is unknown type\n", s_trg_info->path); - goto out; - } - } - else +out: + if (!ret) { - parallel_print("warn: link target \"%s\" doesn't exist \n", s_trg_info->path); +#ifdef H5_HAVE_PARALLEL + if(g_Parallel) + /* Let tasks know that they won't be needed */ + phdiff_dismiss_workers(); +#endif } - /* set target obj type to return */ - s_trg_info->type = otype; - - /* succeed */ - ret = 1; -out: return ret; } + /*------------------------------------------------------------------------- - * Function: H5tools_get_extlink_target_info + * Function: H5tools_get_link_info * - * Purpose: Get target object's type, path, file_id and filename from - * external-link + * Purpose: Get link (soft, external) info and its target object type + (dataset, group, named datatype) and path, if exist * * Patameters: - * - [IN] fileid : external-link source file-id - * - [IN] linkpath : external-link source path - * - [IN] h5li : external-link source H5L_info_t - * - [OUT] trg_info : returning target info (refer to struct) + * - [IN] fileid : link file id + * - [IN] linkpath : link path + * - [OUT] h5li : link's info (H5L_info_t) + * - [OUT] link_info: returning target object info (h5tool_link_info_t) * * Return: - * Success - 1 and return data via trg_info struct - * Fail - 0 + * 1 : Succed to get link info. + * 0 : Detected as a dangling link + * -1 : H5 API failed. * - * Note: - * - trg_info->buf must be allocated along with H5Lget_info[li.u.val_size] - * before passing to this function. - * - if target is soft-link, trg_info->path will be malloced. so check if - * trg_info->is_path_malloced==TRUE, then free trg_info->path along with freeing - * trg_info->buf outside of this function. + * NOTE: + * link_info->trg_path must be freed out of this function * * Programmer: Jonathan Kim * - * Date: Jan 20, 2010 + * Date: Feb 8, 2010 *-------------------------------------------------------------------------*/ -static int H5tools_get_extlink_target_info(hid_t fileid, const char *linkpath, H5L_info_t h5li, h5tool_link_trg_info_t *trg_info) +static int H5tools_get_link_info(hid_t file_id, const char * linkpath, h5tool_link_info_t *link_info) { - - hid_t extfile_id; - const char *extlink_file; - const char *extlink_path; - h5tool_link_trg_info_t soft_trg_info; - H5L_info_t slinfo; - int ret=0; /* init to Fail */ + int Ret = -1; /* init to fail */ + htri_t l_ret; + H5O_info_t trg_oinfo; + hid_t fapl; + hid_t lapl = H5P_DEFAULT; /* init */ - HDmemset(&soft_trg_info, 0, sizeof(h5tool_link_trg_info_t)); - trg_info->type = H5O_TYPE_UNKNOWN; - - if(H5Lget_val(fileid, linkpath, trg_info->buf, h5li.u.val_size, H5P_DEFAULT) < 0) + link_info->trg_type = H5O_TYPE_UNKNOWN; + + /* check if link itself exist */ + if((H5Lexists(file_id, linkpath, H5P_DEFAULT) <= 0)) { - parallel_print("error: unable to get link value from \"%s\"\n",linkpath); + if(link_info->opt.msg_mode==1) + parallel_print("Warning: link <%s> doesn't exist \n",linkpath); goto out; } - /*--------------------------------------- - * get target filename and object path - */ - if(H5Lunpack_elink_val(trg_info->buf, h5li.u.val_size, NULL, &extlink_file, &extlink_path)<0) + + /* get info from link */ + if(H5Lget_info(file_id, linkpath, &(link_info->linfo), H5P_DEFAULT) < 0) { - parallel_print("error: unable to unpack external link value\n"); + if(link_info->opt.msg_mode==1) + parallel_print("Warning: unable to get link info from <%s>\n",linkpath); goto out; } - /* return target filename and obj path */ - trg_info->path = extlink_path; - trg_info->extfile = extlink_file; - - /* --------------------------------- - * get file id from external file - * mimicked from h5diff() for Parallel code - * , but not sure if it's needed - */ - H5E_BEGIN_TRY + /* trg_path must be freed out of this function when finished using */ + link_info->trg_path = (char*)HDcalloc(link_info->linfo.u.val_size, sizeof(char)); + HDassert(link_info->trg_path); + + /* get link value */ + if(H5Lget_val(file_id, linkpath, link_info->trg_path, link_info->linfo.u.val_size, H5P_DEFAULT) < 0) { - /* open file */ - if((extfile_id = h5tools_fopen(extlink_file, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) - { - parallel_print("error: <%s>: unable to open file\n", extlink_file); -#ifdef H5_HAVE_PARALLEL - if(g_Parallel) - /* Let tasks know that they won't be needed */ - phdiff_dismiss_workers(); -#endif - goto out; - } /* end if */ - } H5E_END_TRY; + if(link_info->opt.msg_mode==1) + parallel_print("Warning: unable to get link value from <%s>\n",linkpath); + goto out; + } - /* get external file id */ - trg_info->extfile_id = extfile_id; + /*----------------------------------------------------- + * if link type is external link use different lapl to + * follow object in other file + */ + if (link_info->linfo.type == H5L_TYPE_EXTERNAL) + { + fapl = H5Pcreate(H5P_FILE_ACCESS); + H5Pset_fapl_sec2(fapl); + lapl = H5Pcreate(H5P_LINK_ACCESS); + H5Pset_elink_fapl(lapl, fapl); + } - /* -------------------------------------------------- - * check if target is soft link, if so allocate buffer + /*-------------------------------------------------------------- + * if link's target object exist, get type */ - if((H5Lexists(trg_info->extfile_id, trg_info->path, H5P_DEFAULT) <= 0)) + /* check if target object exist */ + l_ret = H5Oexists_by_name(file_id, linkpath, lapl); + + /* detect dangling link */ + if(l_ret == FALSE) { - parallel_print("error: \"%s\" doesn't exist \n", trg_info->path); - goto out; + Ret = 0; + goto out; } - if(H5Lget_info(trg_info->extfile_id, trg_info->path, &slinfo, H5P_DEFAULT) < 0) + /* function failed */ + else if (l_ret < 0) { - parallel_print("error: unable to get link info from \"%s\"\n", trg_info->path); - goto out; + goto out; } - /* if ext-link's target is soft-link */ - if(slinfo.type == H5L_TYPE_SOFT) + /* get target object info */ + if(H5Oget_info_by_name(file_id, linkpath, &trg_oinfo, lapl) < 0) { - size_t bufsize = (h5li.u.val_size > slinfo.u.val_size)?h5li.u.val_size:slinfo.u.val_size; - soft_trg_info.buf = (char*)HDcalloc(bufsize, sizeof(char)); - HDassert(trg_info->path); + if(link_info->opt.msg_mode==1) + parallel_print("Warning: unable to get object information for <%s>\n", linkpath); + goto out; } - /* get target obj type */ - if(H5tools_get_softlink_target_info(trg_info->extfile_id, trg_info->path, h5li, &soft_trg_info)==0) + /* check unknown type */ + if (trg_oinfo.type < H5O_TYPE_GROUP || trg_oinfo.type >=H5O_TYPE_NTYPES) { - parallel_print("error: unable to get link info from \"%s\"\n", trg_info->path); + if(link_info->opt.msg_mode==1) + parallel_print("Warning: target object of <%s> is unknown type\n", linkpath); goto out; - } + } - /* target obj type */ - trg_info->type = soft_trg_info.type; + /* set target obj type to return */ + link_info->trg_type = trg_oinfo.type; - /* if ext-link's target is soft-link */ - if(slinfo.type == H5L_TYPE_SOFT) + /* succeed */ + Ret = 1; +out: + if (link_info->linfo.type == H5L_TYPE_EXTERNAL) { - trg_info->path = HDstrdup(soft_trg_info.buf); - HDassert(trg_info->path); - /* set TRUE so this can be freed later */ - trg_info->is_path_malloced = TRUE; + H5Pclose(fapl); + H5Pclose(lapl); } - /* Success */ - ret=1; -out: - if(soft_trg_info.buf) - HDfree(soft_trg_info.buf); - - return ret; + return Ret; } + /*------------------------------------------------------------------------- * Function: h5diff * @@ -435,7 +392,6 @@ out: * *------------------------------------------------------------------------- */ - hsize_t h5diff(const char *fname1, const char *fname2, const char *objname1, @@ -451,12 +407,11 @@ hsize_t h5diff(const char *fname1, HDmemset(filenames, 0, 1024 * 2); - if(options->m_quiet && (options->m_verbose || options->m_report)) - { - parallel_print("Error: -q (quiet mode) cannot be added to verbose or report modes\n"); - options->err_stat=1; - return 0; - } /* end if */ + /*------------------------------------------------------------------------- + * check invalid combination of options + *-----------------------------------------------------------------------*/ + if(!is_valid_options(options)) + goto out; /*------------------------------------------------------------------------- * open the files first; if they are not valid, no point in continuing @@ -546,12 +501,10 @@ hsize_t h5diff(const char *fname1, info2, options); } /* end if */ - /*------------------------------------------------------------------------- * compare all *------------------------------------------------------------------------- */ - else { #ifdef H5_HAVE_PARALLEL @@ -751,8 +704,8 @@ hsize_t diff_match(hid_t file1_id, *------------------------------------------------------------------------- */ #ifdef H5_HAVE_PARALLEL -{ - char *workerTasks = HDmalloc((g_nTasks - 1) * sizeof(char)); + { + char *workerTasks = (char*)HDmalloc((g_nTasks - 1) * sizeof(char)); int n; int busyTasks = 0; struct diffs_found nFoundbyWorker; @@ -1043,7 +996,7 @@ hsize_t diff_match(hid_t file1_id, h5diffdebug("done with if block\n"); free(workerTasks); -} + } #endif /* H5_HAVE_PARALLEL */ /* free table */ @@ -1061,9 +1014,10 @@ hsize_t diff_match(hid_t file1_id, * Return: Number of differences found * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * * Date: May 9, 2003 * + * Programmer: Jonathan Kim + * - add following links feature (Feb 11,2010) *------------------------------------------------------------------------- */ @@ -1081,30 +1035,20 @@ hsize_t diff_compare(hid_t file1_id, int f2 = 0; hsize_t nfound = 0; ssize_t i,j; + int l_ret; + int is_dangle_link1 = 0; + int is_dangle_link2 = 0; /* local variables for diff() */ - hid_t l_fileid1=file1_id; - hid_t l_fileid2=file2_id; h5trav_type_t obj1type, obj2type; - const char *obj1name, *obj2name; - - /* softlink info to get target name and type */ - h5tool_link_trg_info_t softlinkinfo1; - h5tool_link_trg_info_t softlinkinfo2; - /* external link file id */ - hid_t extfile1_id = (-1); - hid_t extfile2_id = (-1); - h5tool_link_trg_info_t extlinkinfo1; - h5tool_link_trg_info_t extlinkinfo2; + /* to get link info */ + h5tool_link_info_t linkinfo1; + h5tool_link_info_t linkinfo2; - /* init softlink info */ - HDmemset(&softlinkinfo1, 0, sizeof(h5tool_link_trg_info_t)); - HDmemset(&softlinkinfo2, 0, sizeof(h5tool_link_trg_info_t)); - - /* init external link info */ - HDmemset(&extlinkinfo1, 0, sizeof(h5tool_link_trg_info_t)); - HDmemset(&extlinkinfo2, 0, sizeof(h5tool_link_trg_info_t)); + /* init link info struct */ + HDmemset(&linkinfo1, 0, sizeof(h5tool_link_info_t)); + HDmemset(&linkinfo2, 0, sizeof(h5tool_link_info_t)); i = h5trav_getindex (info1, obj1_name); j = h5trav_getindex (info2, obj2_name); @@ -1128,8 +1072,8 @@ hsize_t diff_compare(hid_t file1_id, } /* use the name with "/" first, as obtained by iterator function */ - obj1name = info1->paths[i].path; - obj2name = info2->paths[j].path; + obj1_name = info1->paths[i].path; + obj2_name = info2->paths[j].path; obj1type = info1->paths[i].type; obj2type = info2->paths[j].type; @@ -1137,151 +1081,157 @@ hsize_t diff_compare(hid_t file1_id, /*----------------------------------------------------------------- * follow link option, compare with target object */ - if (options->linkfollow) + if (options->follow_links) { - H5L_info_t li1, li2; + /* pass how to handle printing warning to linkinfo option */ + if(print_warn(options)) + linkinfo1.opt.msg_mode = linkinfo2.opt.msg_mode = 1; /*------------------------------------------------------------ * Soft links *------------------------------------------------------------*/ - /*------------------------ - * if object1 softlink - */ + /*-------------------------- + * if object1 soft link */ if (obj1type == H5TRAV_TYPE_LINK) { - if(H5Lget_info(file1_id, obj1_name, &li1, H5P_DEFAULT) < 0) + /* get type of target object */ + l_ret = H5tools_get_link_info(file1_id, obj1_name, &linkinfo1); + /* dangling link */ + if (l_ret == 0) { - parallel_print("error: unable to get link info from \"%s\"\n",obj1_name); - goto out; + if (options->no_dangle_links) + { + /* gangling link is error */ + if(options->m_verbose) + parallel_print("Warning: <%s> is a dangling link.\n", obj1_name); + options->err_stat = 1; + goto out; + } + else + is_dangle_link1 = 1; } - - softlinkinfo1.buf = (char*)HDcalloc(li1.u.val_size, sizeof(char)); - HDassert(softlinkinfo1.buf); - - /* get type and name of target object */ - if(H5tools_get_softlink_target_info(file1_id, obj1_name, li1, &softlinkinfo1)==0) + /* fail */ + else if(l_ret < 0) { - parallel_print("error: unable to get softlink info from \"%s\"\n",obj1_name); + options->err_stat = 1; goto out; } - - /* set target name and type to pass diff() */ - obj1type = softlinkinfo1.type; - obj1name = softlinkinfo1.path; + else /* OK */ + { + /* target type for diff() */ + obj1type = linkinfo1.trg_type; + } } - /*------------------------ - * if object2 is softlink - */ + /*----------------------------- + * if object2 is soft link */ if (obj2type == H5TRAV_TYPE_LINK) { - if(H5Lget_info(file2_id, obj2_name, &li2, H5P_DEFAULT) < 0) + /* get type target object */ + l_ret = H5tools_get_link_info(file2_id, obj2_name, &linkinfo2); + /* dangling link */ + if (l_ret == 0) { - parallel_print("error: unable to get link info from \"%s\"\n",obj2_name); - goto out; + if (options->no_dangle_links) + { + /* gangling link is error */ + if(options->m_verbose) + parallel_print("Warning: <%s> is a dangling link.\n", obj2_name); + options->err_stat = 1; + goto out; + } + else + is_dangle_link2=1; } - - - softlinkinfo2.buf = (char*)HDcalloc(li2.u.val_size, sizeof(char)); - HDassert(softlinkinfo2.buf); - - /* get type and name of target object */ - if(H5tools_get_softlink_target_info(file2_id, obj2_name, li2, &softlinkinfo2)==0) + /* fail */ + else if(l_ret < 0) { - parallel_print("error: unable to get softlink info from \"%s\"\n",obj2_name); + options->err_stat = 1; goto out; } - - /* set target name and type to pass diff() */ - obj2type = softlinkinfo2.type; - obj2name = softlinkinfo2.path; + else /* OK */ + { + /* target type for diff() */ + obj2type = linkinfo2.trg_type; + } } /*------------------------------------------------------------ * External links *------------------------------------------------------------*/ - /*------------------------------- - * if object1 is external link - */ + /*-------------------------------- + * if object1 is external link */ if (obj1type == H5TRAV_TYPE_UDLINK) { - if(H5Lget_info(file1_id, obj1_name, &li1, H5P_DEFAULT) < 0) - { - parallel_print("error: unable to get link info from \"%s\"\n",obj1_name); - goto out; - } - - /* for external link */ - if(li1.type == H5L_TYPE_EXTERNAL) + /* get type and name of target object */ + l_ret = H5tools_get_link_info(file1_id, obj1_name, &linkinfo1); + /* dangling link */ + if (l_ret == 0) { - extlinkinfo1.buf = (char*)HDcalloc(li1.u.val_size, sizeof(char)); - HDassert(extlinkinfo1.buf); - - /* get type and name of target object */ - if(H5tools_get_extlink_target_info(file1_id, obj1_name, li1, &extlinkinfo1)==0) + if (options->no_dangle_links) { - parallel_print("error: unable to get external link info from \"%s\"\n",obj1_name); + /* gangling link is error */ + if(options->m_verbose) + parallel_print("Warning: <%s> is a dangling link.\n", obj1_name); + options->err_stat = 1; goto out; } - - /* if valid actual object */ - if (extlinkinfo1.type < H5O_TYPE_GROUP || extlinkinfo1.type >= H5O_TYPE_NTYPES) - { - if (options->m_verbose) - { - parallel_print("<%s> is invaild type\n", obj1_name); - } - goto out; - } - - /* set target fileid, name and type to pass diff() */ - l_fileid1 = extlinkinfo1.extfile_id; - obj1name = extlinkinfo1.path; - obj1type = extlinkinfo1.type; + else + is_dangle_link1 = 1; } - } - - /*------------------------------- - * if object2 is external link - */ - if (obj2type == H5TRAV_TYPE_UDLINK) - { - if(H5Lget_info(file2_id, obj2_name, &li2, H5P_DEFAULT) < 0) + /* fail */ + else if(l_ret < 0) { - parallel_print("error: unable to get link info from \"%s\"\n",obj2_name); + options->err_stat = 1; goto out; } - /* for external link */ - if(li2.type == H5L_TYPE_EXTERNAL) + else /* OK */ { - extlinkinfo2.buf = (char*)HDcalloc(li2.u.val_size, sizeof(char)); - HDassert(extlinkinfo2.buf); + /* for external link */ + if(linkinfo1.linfo.type == H5L_TYPE_EXTERNAL) + obj1type = linkinfo1.trg_type; + } + } - /* get type and name of target object */ - if(H5tools_get_extlink_target_info(file2_id, obj2_name, li2, &extlinkinfo2)==0) - { - parallel_print("error: unable to get external link info from \"%s\"\n",obj2_name); - goto out; - } - /* if valid actual object */ - if (extlinkinfo2.type < H5O_TYPE_GROUP || extlinkinfo2.type >= H5O_TYPE_NTYPES) + /*-------------------------------- + * if object2 is external link */ + if (obj2type == H5TRAV_TYPE_UDLINK) + { + /* get type and name of target object */ + l_ret = H5tools_get_link_info(file2_id, obj2_name, &linkinfo2); + /* dangling link */ + if (l_ret == 0) + { + if (options->no_dangle_links) { - if (options->m_verbose) - { - parallel_print("<%s> is invaild type\n", obj2_name); - } + /* gangling link is error */ + if(options->m_verbose) + parallel_print("Warning: <%s> is a dangling link.\n", obj2_name); + options->err_stat = 1; goto out; } - - /* set target fileid, name and type to pass diff() */ - l_fileid2 = extlinkinfo2.extfile_id; - obj2name = extlinkinfo2.path; - obj2type = extlinkinfo2.type; + else + is_dangle_link2 = 1; + } + /* fail */ + else if(l_ret < 0) + { + options->err_stat = 1; + goto out; + } + else /* OK */ + { + /* for external link */ + if(linkinfo2.linfo.type == H5L_TYPE_EXTERNAL) + obj2type = linkinfo2.trg_type; } } - } /* end of linkfollow */ + /* found dangling link */ + if (is_dangle_link1 || is_dangle_link2) + goto out; + } /* end of follow_links */ /* objects are not the same type */ if (obj1type != obj2type) @@ -1289,45 +1239,53 @@ hsize_t diff_compare(hid_t file1_id, if (options->m_verbose||options->m_list_not_cmp) { parallel_print("<%s> is of type %s and <%s> is of type %s\n", - obj1name, get_type(obj1type), obj2name, - get_type(obj2type)); + obj1_name, get_type(obj1type), + obj2_name, get_type(obj2type)); } options->not_cmp=1; goto out; } - nfound = diff(l_fileid1, obj1name, - l_fileid2, obj2name, + nfound = diff(file1_id, obj1_name, + file2_id, obj2_name, options, obj1type); out: - /* free soft link buffer */ - if (softlinkinfo1.buf) - HDfree(softlinkinfo1.buf); - if (softlinkinfo2.buf) - HDfree(softlinkinfo2.buf); - /* free external link buffer */ - if (extlinkinfo1.buf); + /*------------------------------- + * handle dangling link(s) */ + /* both obj1 and obj2 are dangling links */ + if(is_dangle_link1 && is_dangle_link2) { - HDfree(extlinkinfo1.buf); - /* case for ext-link's target is soft-link */ - if(extlinkinfo1.is_path_malloced) - HDfree(extlinkinfo1.path); + if(print_objname(options, nfound)) + { + do_print_objname("dangling link", obj1_name, obj2_name); + print_found(nfound); + } } - if (extlinkinfo2.buf); + /* obj1 is dangling link */ + else if (is_dangle_link1) { - HDfree(extlinkinfo2.buf); - /* case for ext-link's target is soft-link */ - if(extlinkinfo2.is_path_malloced) - HDfree(extlinkinfo2.path); + if(options->m_verbose) + parallel_print("obj1 <%s> is a dangling link.\n", obj1_name); + nfound++; + if(print_objname(options, nfound)) + print_found(nfound); } - - /* close external file */ - H5E_BEGIN_TRY + /* obj2 is dangling link */ + else if (is_dangle_link2) { - H5Fclose(extfile1_id); - H5Fclose(extfile2_id); - } H5E_END_TRY; + if(options->m_verbose) + parallel_print("obj2 <%s> is a dangling link.\n", obj2_name); + nfound++; + if(print_objname(options, nfound)) + print_found(nfound); + } + + /* free link info buffer */ + if (linkinfo1.trg_path) + HDfree(linkinfo1.trg_path); + if (linkinfo2.trg_path) + HDfree(linkinfo2.trg_path); return nfound; } @@ -1346,9 +1304,10 @@ out: * Return: Number of differences found * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * * Date: May 9, 2003 * + * Programmer: Jonathan Kim + * - add following links feature (Feb 11,2010) *------------------------------------------------------------------------- */ @@ -1364,24 +1323,28 @@ hsize_t diff(hid_t file1_id, hid_t grp1_id = (-1); hid_t grp2_id = (-1); int ret; + int is_dangle_link1 = 0; + int is_dangle_link2 = 0; hsize_t nfound = 0; - char *extlinkbuf1=NULL; - char *extlinkbuf2=NULL; - /* used in soft link case (H5TRAV_TYPE_LINK) */ - h5tool_link_trg_info_t softlinkinfo1; - h5tool_link_trg_info_t softlinkinfo2; - /*init */ - HDmemset(&softlinkinfo1,0,sizeof(h5tool_link_trg_info_t)); - HDmemset(&softlinkinfo2,0,sizeof(h5tool_link_trg_info_t)); - + /* to get link info */ + h5tool_link_info_t linkinfo1; + h5tool_link_info_t linkinfo2; + + /*init link info struct */ + HDmemset(&linkinfo1,0,sizeof(h5tool_link_info_t)); + HDmemset(&linkinfo2,0,sizeof(h5tool_link_info_t)); + + /* pass how to handle printing warnings to linkinfo option */ + if(print_warn(options)) + linkinfo1.opt.msg_mode = linkinfo2.opt.msg_mode = 1; switch(type) { - /*------------------------------------------------------------------------- + /*---------------------------------------------------------------------- * H5TRAV_TYPE_DATASET - *------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ case H5TRAV_TYPE_DATASET: /* verbose (-v) and report (-r) mode */ @@ -1409,9 +1372,9 @@ hsize_t diff(hid_t file1_id, } break; - /*------------------------------------------------------------------------- + /*---------------------------------------------------------------------- * H5TRAV_TYPE_NAMED_DATATYPE - *------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ case H5TRAV_TYPE_NAMED_DATATYPE: if((type1_id = H5Topen2(file1_id, path1, H5P_DEFAULT)) < 0) @@ -1432,10 +1395,11 @@ hsize_t diff(hid_t file1_id, if(options->m_verbose) print_found(nfound); - /*------------------------------------------------------------------------- + /*----------------------------------------------------------------- * compare attributes - * the if condition refers to cases when the dataset is a referenced object - *------------------------------------------------------------------------- + * the if condition refers to cases when the dataset is a + * referenced object + *----------------------------------------------------------------- */ if(path1) nfound += diff_attr(type1_id, type2_id, path1, path2, options); @@ -1446,9 +1410,9 @@ hsize_t diff(hid_t file1_id, goto out; break; - /*------------------------------------------------------------------------- + /*---------------------------------------------------------------------- * H5TRAV_TYPE_GROUP - *------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ case H5TRAV_TYPE_GROUP: ret = HDstrcmp(path1, path2); @@ -1468,10 +1432,11 @@ hsize_t diff(hid_t file1_id, if((grp2_id = H5Gopen2(file2_id, path2, H5P_DEFAULT)) < 0) goto out; - /*------------------------------------------------------------------------- + /*----------------------------------------------------------------- * compare attributes - * the if condition refers to cases when the dataset is a referenced object - *------------------------------------------------------------------------- + * the if condition refers to cases when the dataset is a + * referenced object + *----------------------------------------------------------------- */ if(path1) nfound += diff_attr(grp1_id, grp2_id, path1, path2, options); @@ -1483,42 +1448,54 @@ hsize_t diff(hid_t file1_id, break; - /*------------------------------------------------------------------------- + /*---------------------------------------------------------------------- * H5TRAV_TYPE_LINK - *------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ case H5TRAV_TYPE_LINK: { - H5L_info_t li1, li2; - - if(H5Lget_info(file1_id, path1, &li1, H5P_DEFAULT) < 0) + /* get type and name of target object */ + ret = H5tools_get_link_info(file1_id, path1, &linkinfo1); + /* dangling link */ + if (ret == 0) { - parallel_print("error: unable to get link info from \"%s\"\n", path1); - goto out; + if (options->no_dangle_links) + { + /* gangling link is error */ + if(options->m_verbose) + parallel_print("Warning: <%s> is a dangling link.\n", path1); + goto out; + } + else + is_dangle_link1 = 1; } - if(H5Lget_info(file2_id, path2, &li2, H5P_DEFAULT) < 0) - { - parallel_print("error: unable to get link info from \"%s\"\n", path2); + else if (ret < 0) goto out; - } - - softlinkinfo1.buf = (char*)HDcalloc(li1.u.val_size, sizeof(char)); - HDassert(softlinkinfo1.buf); - softlinkinfo2.buf = (char*)HDcalloc(li2.u.val_size, sizeof(char)); - HDassert(softlinkinfo2.buf); - if(H5tools_get_softlink_target_info(file1_id,path1,li1,&softlinkinfo1)==0) + /* get type and name of target object */ + ret = H5tools_get_link_info(file2_id, path2, &linkinfo2); + /* dangling link */ + if (ret == 0) { - parallel_print("error: unable to get softlink info from \"%s\"\n", path1); - goto out; + if (options->no_dangle_links) + { + /* gangling link is error */ + if(options->m_verbose) + parallel_print("Warning: <%s> is a dangling link.\n", path2); + goto out; + } + else + is_dangle_link2 = 1; } - if(H5tools_get_softlink_target_info(file2_id,path2,li2,&softlinkinfo2)==0) - { - parallel_print("error: unable to get softlink info from \"%s\"\n", path2); + else if (ret < 0) goto out; - } + + + /* found dangling link */ + if (is_dangle_link1 || is_dangle_link2) + goto out2; - ret = HDstrcmp(softlinkinfo1.path, softlinkinfo2.path); + ret = HDstrcmp(linkinfo1.trg_path, linkinfo2.trg_path); /* if the target link name is not same then the links are "different" */ nfound = (ret != 0) ? 1 : 0; @@ -1526,113 +1503,122 @@ hsize_t diff(hid_t file1_id, if(print_objname(options, nfound)) do_print_objname("link", path1, path2); - if (options->linkfollow) + if (options->follow_links) { /* objects are not the same type */ - if (softlinkinfo1.type != softlinkinfo2.type) + if (linkinfo1.trg_type != linkinfo2.trg_type) { if (options->m_verbose||options->m_list_not_cmp) { - parallel_print("<%s> is of type %d and <%s> is of type %d\n", softlinkinfo1.path, softlinkinfo1.type, softlinkinfo2.path, softlinkinfo2.type); + parallel_print("<%s> is of type %s and <%s> is of type %s\n", path1, get_type(linkinfo1.trg_type), path2, get_type(linkinfo2.trg_type)); } options->not_cmp=1; goto out; } - nfound += diff(file1_id, softlinkinfo1.path, - file2_id, softlinkinfo2.path, - options, softlinkinfo1.type); + /* call self to compare target object */ + nfound += diff(file1_id, path1, + file2_id, path2, + options, linkinfo1.trg_type); } /* always print the number of differences found in verbose mode */ if(options->m_verbose) print_found(nfound); - HDfree(softlinkinfo1.buf); - HDfree(softlinkinfo2.buf); + /* free link info buffer */ + HDfree(linkinfo1.trg_path); + HDfree(linkinfo2.trg_path); } break; - /*------------------------------------------------------------------------- + /*---------------------------------------------------------------------- * H5TRAV_TYPE_UDLINK - *------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ case H5TRAV_TYPE_UDLINK: { - H5L_info_t li1, li2; - - if(H5Lget_info(file1_id, path1, &li1, H5P_DEFAULT) < 0) + /* get type and name of target object */ + ret = H5tools_get_link_info(file1_id, path1, &linkinfo1); + /* dangling link */ + if (ret == 0) { - parallel_print("error: unable to get udlink info from \"%s\"\n", path1); - goto out; + if (options->no_dangle_links) + { + /* gangling link is error */ + if(options->m_verbose) + parallel_print("Warning: <%s> is a dangling link.\n", path1); + goto out; + } + else + is_dangle_link1=1; } - if(H5Lget_info(file2_id, path2, &li2, H5P_DEFAULT) < 0) - { - parallel_print("error: unable to get udlink info from \"%s\"\n", path2); + else if (ret < 0) goto out; - } - /* Only external links will have a query function registered */ - if(li1.type == H5L_TYPE_EXTERNAL && li2.type == H5L_TYPE_EXTERNAL) + /* get type and name of target object */ + ret = H5tools_get_link_info(file2_id, path2, &linkinfo2); + /* dangling link */ + if (ret == 0) { - - extlinkbuf1 = (char*)HDcalloc(li1.u.val_size, sizeof(char)); - HDassert(extlinkbuf1); - extlinkbuf2 = (char*)HDcalloc(li2.u.val_size, sizeof(char)); - HDassert(extlinkbuf2); - - if(H5Lget_val(file1_id, path1, extlinkbuf1, li1.u.val_size, H5P_DEFAULT) < 0) - { - parallel_print("error: unable to get link value from \"%s\"\n",path1); - goto out; - } /* end if */ - if(H5Lget_val(file2_id, path2, extlinkbuf2, li2.u.val_size, H5P_DEFAULT) < 0) + if (options->no_dangle_links) { - parallel_print("error: unable to get link value from \"%s\"\n",path2); + /* gangling link is error */ + if(options->m_verbose) + parallel_print("Warning: <%s> is a dangling link.\n", path2); goto out; - } /* end if */ + } + else + is_dangle_link2=1; + } + else if (ret < 0) + goto out; + + /* found dangling link */ + if (is_dangle_link1 || is_dangle_link2) + goto out2; + /* Only external links will have a query function registered */ + if(linkinfo1.linfo.type == H5L_TYPE_EXTERNAL && linkinfo2.linfo.type == H5L_TYPE_EXTERNAL) + { /* If the buffers are the same size, compare them */ - if(li1.u.val_size == li2.u.val_size) + if(linkinfo1.linfo.u.val_size == linkinfo2.linfo.u.val_size) { - ret = HDmemcmp(extlinkbuf1, extlinkbuf2, li1.u.val_size); + ret = HDmemcmp(linkinfo1.trg_path, linkinfo2.trg_path, linkinfo1.linfo.u.val_size); } else ret = 1; - /* if "extlinkbuf1" != "extlinkbuf2" then the links are "different" */ + /* if "linkinfo1.trg_path" != "linkinfo2.trg_path" then the links + * are "different" extlinkinfo#.path is combination string of + * file_name and obj_name + */ nfound = (ret != 0) ? 1 : 0; if(print_objname(options, nfound)) do_print_objname("external link", path1, path2); - if (options->linkfollow) + if (options->follow_links) { - const char *extlink_file1; - const char *extlink_path1; - const char *extlink_file2; - const char *extlink_path2; - - /* get file name and obj path */ - if(H5Lunpack_elink_val(extlinkbuf1, li1.u.val_size, NULL, &extlink_file1, &extlink_path1)<0) + /* objects are not the same type */ + if (linkinfo1.trg_type != linkinfo2.trg_type) { - parallel_print("error: unable to unpack external link value of obj1\n"); - goto out; - } - - /* get file name and obj path */ - if(H5Lunpack_elink_val(extlinkbuf2, li2.u.val_size, NULL, &extlink_file2, &extlink_path2)<0) - { - parallel_print("error: unable to unpack external link value of obj2\n"); + if (options->m_verbose||options->m_list_not_cmp) + { + parallel_print("<%s> is of type %s and <%s> is of type %s\n", path1, get_type(linkinfo1.trg_type), path2, get_type(linkinfo2.trg_type)); + } + options->not_cmp=1; goto out; } - nfound = h5diff(extlink_file1, extlink_file2, - extlink_path1, extlink_path2, options); + nfound = diff(file1_id, path1, + file2_id, path2, + options, linkinfo1.trg_type); } - HDfree(extlinkbuf1); - HDfree(extlinkbuf2); + /* free link info buffer */ + HDfree(linkinfo1.trg_path); + HDfree(linkinfo2.trg_path); } /* end if */ else { @@ -1643,7 +1629,8 @@ hsize_t diff(hid_t file1_id, * If the link classes or the buffer length are not the * same, the links are "different" */ - if((li1.type != li2.type) || (li1.u.val_size != li2.u.val_size)) + if((linkinfo1.linfo.type != linkinfo2.linfo.type) || + (linkinfo1.linfo.u.val_size != linkinfo2.linfo.u.val_size)) nfound = 1; else nfound = 0; @@ -1671,17 +1658,43 @@ hsize_t diff(hid_t file1_id, out: options->err_stat = 1; - /* free buf used for softlink */ - if (softlinkinfo1.buf) - HDfree(softlinkinfo1.buf); - if (softlinkinfo2.buf) - HDfree(softlinkinfo2.buf); - - /* free buf used for softlink */ - if (extlinkbuf1) - HDfree(extlinkbuf1); - if (extlinkbuf2) - HDfree(extlinkbuf2); +out2: + /*----------------------------------- + * handle dangling link(s) + */ + /* both path1 and path2 are dangling links */ + if(is_dangle_link1 && is_dangle_link2) + { + if(print_objname(options, nfound)) + { + do_print_objname("dangling link", path1, path2); + print_found(nfound); + } + } + /* path1 is dangling link */ + else if (is_dangle_link1) + { + if(options->m_verbose) + parallel_print("obj1 <%s> is a dangling link.\n", path1); + nfound++; + if(print_objname(options, nfound)) + print_found(nfound); + } + /* path2 is dangling link */ + else if (is_dangle_link2) + { + if(options->m_verbose) + parallel_print("obj2 <%s> is a dangling link.\n", path2); + nfound++; + if(print_objname(options, nfound)) + print_found(nfound); + } + + /* free link info buffer */ + if (linkinfo1.trg_path) + HDfree(linkinfo1.trg_path); + if (linkinfo2.trg_path) + HDfree(linkinfo2.trg_path); /* close */ /* disable error reporting */ diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 090d3d9..6718d9a 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -35,7 +35,8 @@ typedef struct { double percent; /* relative error value */ int n; /* count, compare up to count */ hsize_t count; /* count value */ - int linkfollow; /* link follow*/ + int follow_links; /* follow symbolic links */ + int no_dangle_links; /* return error when find dangling link */ int err_stat; /* an error ocurred (1, error, 0, no error) */ int cmn_objs; /* do we have common objects */ int not_cmp; /* are the objects comparable */ diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 91acb10..48e08a5 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -74,7 +74,7 @@ #define ULLI_FORMAT_P_NOTCOMP "%-15"H5_PRINTF_LL_WIDTH"u %-15"H5_PRINTF_LL_WIDTH"u %-15"H5_PRINTF_LL_WIDTH"d not comparable\n" -/* if system EPSILON is defined, use the system EPSILON; otherwise, use +/* if system EPSILON is defined, use the system EPSILON; otherwise, use constants that are close to most EPSILON values */ #ifndef FLT_EPSILON @@ -167,7 +167,7 @@ static void h5diff_print_char(char ch); #if H5_SIZEOF_LONG_DOUBLE !=0 typedef enum dtype_t { - FLT_FLOAT, + FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE } dtype_t; @@ -175,7 +175,7 @@ typedef enum dtype_t typedef enum dtype_t { - FLT_FLOAT, + FLT_FLOAT, FLT_DOUBLE } dtype_t; #endif @@ -227,7 +227,7 @@ hsize_t diff_array( void *_mem1, if ( rank > 0 ) { - + acc[rank-1]=1; for(j=(rank-2); j>=0; j--) { @@ -275,7 +275,7 @@ hsize_t diff_array( void *_mem1, */ case H5T_FLOAT: - + if (H5Tequal(m_type, H5T_NATIVE_FLOAT)) nfound=diff_float(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_DOUBLE)) @@ -283,7 +283,7 @@ hsize_t diff_array( void *_mem1, #if H5_SIZEOF_LONG_DOUBLE !=0 else if (H5Tequal(m_type, H5T_NATIVE_LDOUBLE)) nfound=diff_ldouble(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); -#endif +#endif break; case H5T_INTEGER: @@ -747,7 +747,8 @@ hsize_t diff_datum(void *_mem1, NULL, options); else { - parallel_print("Warning: Comparison not possible of object types referenced: <%s> and <%s>", + if(options->m_verbose) + parallel_print("Warning: Comparison not possible of object types referenced: <%s> and <%s>\n", obj1, obj2); options->not_cmp = 1; } @@ -1862,7 +1863,7 @@ hsize_t diff_datum(void *_mem1, nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -1925,7 +1926,7 @@ hsize_t diff_datum(void *_mem1, nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -1991,7 +1992,7 @@ hsize_t diff_datum(void *_mem1, nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -2074,7 +2075,7 @@ hsize_t diff_datum(void *_mem1, nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -2139,7 +2140,7 @@ hsize_t diff_datum(void *_mem1, nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -2205,7 +2206,7 @@ hsize_t diff_datum(void *_mem1, nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -2889,7 +2890,7 @@ hsize_t diff_float(unsigned char *mem1, } nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -2961,7 +2962,7 @@ hsize_t diff_float(unsigned char *mem1, } nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -3036,7 +3037,7 @@ hsize_t diff_float(unsigned char *mem1, nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -3163,7 +3164,7 @@ hsize_t diff_double(unsigned char *mem1, } nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -3235,7 +3236,7 @@ hsize_t diff_double(unsigned char *mem1, } nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -3310,7 +3311,7 @@ hsize_t diff_double(unsigned char *mem1, nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -3446,7 +3447,7 @@ hsize_t diff_ldouble(unsigned char *mem1, } nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -3518,7 +3519,7 @@ hsize_t diff_ldouble(unsigned char *mem1, } nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -3593,7 +3594,7 @@ hsize_t diff_ldouble(unsigned char *mem1, nfound++; } - } + } /* one is NaN, assume difference */ else if ( isnan1==1 || isnan2==1) { @@ -5511,14 +5512,14 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options) { if ( options->do_nans ) { - + /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ int isnan1 = my_isnan(FLT_DOUBLE,&value); int isnan2 = my_isnan(FLT_DOUBLE,&expected); - + /*------------------------------------------------------------------------- * we consider NaN == NaN to be true *------------------------------------------------------------------------- @@ -5527,7 +5528,7 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options) { return TRUE; } - + /*------------------------------------------------------------------------- * one is a NaN, do not compare but assume difference *------------------------------------------------------------------------- @@ -5535,7 +5536,7 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options) if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) ) { return FALSE; - } + } } if (value == expected) @@ -5564,14 +5565,14 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio { if ( options->do_nans ) { - + /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ int isnan1 = my_isnan(FLT_LDOUBLE,&value); int isnan2 = my_isnan(FLT_LDOUBLE,&expected); - + /*------------------------------------------------------------------------- * we consider NaN == NaN to be true *------------------------------------------------------------------------- @@ -5580,7 +5581,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio { return TRUE; } - + /*------------------------------------------------------------------------- * one is a NaN, do not compare but assume difference *------------------------------------------------------------------------- @@ -5588,7 +5589,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) ) { return FALSE; - } + } } if (value == expected) @@ -5603,7 +5604,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio } #endif /* #if H5_SIZEOF_LONG_DOUBLE !=0 */ - + /*------------------------------------------------------------------------- * Function: equal_float @@ -5621,14 +5622,14 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options) { if ( options->do_nans ) { - + /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ int isnan1 = my_isnan(FLT_FLOAT,&value); int isnan2 = my_isnan(FLT_FLOAT,&expected); - + /*------------------------------------------------------------------------- * we consider NaN == NaN to be true *------------------------------------------------------------------------- @@ -5637,7 +5638,7 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options) { return TRUE; } - + /*------------------------------------------------------------------------- * one is a NaN, do not compare but assume difference *------------------------------------------------------------------------- @@ -5645,7 +5646,7 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options) if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) ) { return FALSE; - } + } } if (value == expected) @@ -5946,13 +5947,13 @@ void print_char_pos( int *ph, /* print header */ parallel_print("[ " ); if ( rank > 0 ) { - + for ( i = 0; i < rank; i++) { parallel_print(HSIZE_T_FORMAT, (unsigned long long)pos[i]); parallel_print(" "); } - + } else { @@ -5970,8 +5971,8 @@ void print_char_pos( int *ph, /* print header */ */ static void h5diff_print_char(char ch) { - - switch (ch) + + switch (ch) { case '"': parallel_print("\\\""); @@ -5999,7 +6000,7 @@ static void h5diff_print_char(char ch) parallel_print( "%c", ch); else parallel_print( "\\%03o", ch); - + break; } } diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 2cc84ca..8e25b6d 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -44,36 +44,36 @@ hsize_t diff_dataset( hid_t file1_id, hid_t dcpl1 = -1; hid_t dcpl2 = -1; hsize_t nfound = 0; - + /*------------------------------------------------------------------------- * open the handles *------------------------------------------------------------------------- */ /* disable error reporting */ - H5E_BEGIN_TRY + H5E_BEGIN_TRY { /* Open the datasets */ - if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) + if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) { parallel_print("Cannot open dataset <%s>\n", obj1_name); goto error; } - if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) + if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) { parallel_print("Cannot open dataset <%s>\n", obj2_name); goto error; } /* enable error reporting */ } H5E_END_TRY; - - + + if((dcpl1 = H5Dget_create_plist(did1)) < 0) goto error; if((dcpl2 = H5Dget_create_plist(did2)) < 0) { goto error; } - + /*------------------------------------------------------------------------- * check if the dataset creation property list has filters that * are not registered in the current configuration @@ -103,9 +103,9 @@ hsize_t diff_dataset( hid_t file1_id, /* enable error reporting */ } H5E_END_TRY; - + return nfound; - + error: options->err_stat=1; /* disable error reporting */ @@ -116,7 +116,7 @@ error: H5Dclose(did2); /* enable error reporting */ } H5E_END_TRY; - + return nfound; } @@ -214,56 +214,56 @@ hsize_t diff_datasetid( hid_t did1, void *sm_buf2=NULL; size_t need; /* bytes needed for malloc */ int i; - + /* Get the dataspace handle */ if ( (sid1 = H5Dget_space(did1)) < 0 ) goto error; - + /* Get rank */ if ( (rank1 = H5Sget_simple_extent_ndims(sid1)) < 0 ) goto error; - + /* Get the dataspace handle */ if ( (sid2 = H5Dget_space(did2)) < 0 ) goto error; - + /* Get rank */ if ( (rank2 = H5Sget_simple_extent_ndims(sid2)) < 0 ) goto error; - + /* Get dimensions */ if ( H5Sget_simple_extent_dims(sid1,dims1,maxdim1) < 0 ) goto error; - + /* Get dimensions */ if ( H5Sget_simple_extent_dims(sid2,dims2,maxdim2) < 0 ) { goto error; } - + /*------------------------------------------------------------------------- * get the file data type *------------------------------------------------------------------------- */ - + /* Get the data type */ if ( (f_tid1 = H5Dget_type(did1)) < 0 ) goto error; - + /* Get the data type */ if ( (f_tid2 = H5Dget_type(did2)) < 0 ) { goto error; } - + /*------------------------------------------------------------------------- * check for empty datasets *------------------------------------------------------------------------- */ - + storage_size1=H5Dget_storage_size(did1); storage_size2=H5Dget_storage_size(did2); - + if (storage_size1==0 || storage_size2==0) { if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) @@ -271,12 +271,12 @@ hsize_t diff_datasetid( hid_t did1, can_compare=0; options->not_cmp=1; } - + /*------------------------------------------------------------------------- * check for comparable TYPE and SPACE *------------------------------------------------------------------------- */ - + if (diff_can_type(f_tid1, f_tid2, rank1, @@ -292,46 +292,46 @@ hsize_t diff_datasetid( hid_t did1, { can_compare=0; } - + /*------------------------------------------------------------------------- * memory type and sizes *------------------------------------------------------------------------- */ if ((m_tid1=h5tools_get_native_type(f_tid1)) < 0) goto error; - + if ((m_tid2=h5tools_get_native_type(f_tid2)) < 0) goto error; - + m_size1 = H5Tget_size( m_tid1 ); m_size2 = H5Tget_size( m_tid2 ); - + /*------------------------------------------------------------------------- * check for different signed/unsigned types *------------------------------------------------------------------------- */ - + sign1=H5Tget_sign(m_tid1); sign2=H5Tget_sign(m_tid2); if ( sign1 != sign2 ) { - if ((options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) + if ((options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has sign %s ", obj1_name, get_sign(sign1)); parallel_print("and <%s> has sign %s\n", obj2_name, get_sign(sign2)); } - + can_compare=0; options->not_cmp=1; } - + /*------------------------------------------------------------------------- * only attempt to compare if possible *------------------------------------------------------------------------- */ if (can_compare ) /* it is possible to compare */ { - + /*------------------------------------------------------------------------- * get number of elements *------------------------------------------------------------------------- @@ -341,43 +341,43 @@ hsize_t diff_datasetid( hid_t did1, { nelmts1 *= dims1[i]; } - + nelmts2 = 1; for (i = 0; i < rank2; i++) { nelmts2 *= dims2[i]; } - + assert(nelmts1==nelmts2); - + /*------------------------------------------------------------------------- * "upgrade" the smaller memory size *------------------------------------------------------------------------- */ - + if ( m_size1 != m_size2 ) { if ( m_size1 < m_size2 ) { H5Tclose(m_tid1); - + if ((m_tid1=h5tools_get_native_type(f_tid2)) < 0) goto error; - + m_size1 = H5Tget_size( m_tid1 ); } else { H5Tclose(m_tid2); - + if ((m_tid2=h5tools_get_native_type(f_tid1)) < 0) goto error; - + m_size2 = H5Tget_size( m_tid2 ); } } assert(m_size1==m_size2); - + /* print names */ if (obj1_name) { name1=diff_basename(obj1_name); @@ -385,27 +385,27 @@ hsize_t diff_datasetid( hid_t did1, if (obj2_name) { name2=diff_basename(obj2_name); } - - + + /*------------------------------------------------------------------------- * read/compare *------------------------------------------------------------------------- */ - + need = (size_t)(nelmts1*m_size1); /* bytes needed */ if ( need < H5TOOLS_MALLOCSIZE) { buf1 = HDmalloc(need); buf2 = HDmalloc(need); } - + if ( buf1!=NULL && buf2!=NULL) { if ( H5Dread(did1,m_tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf1) < 0 ) goto error; if ( H5Dread(did2,m_tid2,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf2) < 0 ) goto error; - + /* array diff */ nfound = diff_array(buf1, buf2, @@ -420,39 +420,39 @@ hsize_t diff_datasetid( hid_t did1, did1, did2); } - + else /* possibly not enough memory, read/compare by hyperslabs */ - + { size_t p_type_nbytes = m_size1; /*size of memory type */ hsize_t p_nelmts = nelmts1; /*total selected elmts */ hsize_t elmtno; /*counter */ int carry; /*counter carry value */ unsigned int vl_data = 0; /*contains VL datatypes */ - + /* stripmine info */ hsize_t sm_size[H5S_MAX_RANK]; /*stripmine size */ hsize_t sm_nbytes; /*bytes per stripmine */ hsize_t sm_nelmts; /*elements per stripmine*/ hid_t sm_space; /*stripmine data space */ - + /* hyperslab info */ hsize_t hs_offset[H5S_MAX_RANK]; /*starting offset */ hsize_t hs_size[H5S_MAX_RANK]; /*size this pass */ hsize_t hs_nelmts; /*elements in request */ hsize_t zero[8]; /*vector of zeros */ - + /* check if we have VL data in the dataset's datatype */ if (H5Tdetect_class(m_tid1, H5T_VLEN) == TRUE) vl_data = TRUE; - + /* * determine the strip mine size and allocate a buffer. The strip mine is * a hyperslab whose size is manageable. */ sm_nbytes = p_type_nbytes; - - for (i = rank1; i > 0; --i) + + for (i = rank1; i > 0; --i) { hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes; if ( size == 0) /* datum size > H5TOOLS_BUFSIZE */ @@ -461,7 +461,7 @@ hsize_t diff_datasetid( hid_t did1, sm_nbytes *= sm_size[i - 1]; assert(sm_nbytes > 0); } - + /* malloc return code should be verified. * If fail, need to handle the error. * This else branch should be recoded as a separate function. @@ -473,14 +473,14 @@ hsize_t diff_datasetid( hid_t did1, assert(sm_buf1); sm_buf2 = malloc((size_t)sm_nbytes); assert(sm_buf2); - + sm_nelmts = sm_nbytes / p_type_nbytes; sm_space = H5Screate_simple(1, &sm_nelmts, NULL); - + /* the stripmine loop */ memset(hs_offset, 0, sizeof hs_offset); memset(zero, 0, sizeof zero); - + for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_nelmts) { /* calculate the hyperslab size */ @@ -505,12 +505,12 @@ hsize_t diff_datasetid( hid_t did1, H5Sselect_all(sm_space); hs_nelmts = 1; } /* rank */ - + if ( H5Dread(did1,m_tid1,sm_space,sid1,H5P_DEFAULT,sm_buf1) < 0 ) goto error; if ( H5Dread(did2,m_tid2,sm_space,sid2,H5P_DEFAULT,sm_buf2) < 0 ) goto error; - + /* get array differences. in the case of hyperslab read, increment the number of differences found in each hyperslab and pass the position at the beggining for printing */ nfound += diff_array(sm_buf1, @@ -525,14 +525,14 @@ hsize_t diff_datasetid( hid_t did1, m_tid1, did1, did2); - + /* reclaim any VL memory, if necessary */ if(vl_data) { H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1); H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf2); } - + /* calculate the next hyperslab offset */ for (i = rank1, carry = 1; i > 0 && carry; --i) { @@ -543,27 +543,27 @@ hsize_t diff_datasetid( hid_t did1, carry = 0; } /* i */ } /* elmtno */ - + H5Sclose(sm_space); } /* hyperslab read */ }/*can_compare*/ - + /*------------------------------------------------------------------------- * compare attributes * the if condition refers to cases when the dataset is a referenced object *------------------------------------------------------------------------- */ - + if (obj1_name) { nfound += diff_attr(did1,did2,obj1_name,obj2_name,options); } - + /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- */ - + /* free */ if (buf1!=NULL) { @@ -585,7 +585,7 @@ hsize_t diff_datasetid( hid_t did1, free(sm_buf2); sm_buf2=NULL; } - + H5E_BEGIN_TRY { H5Sclose(sid1); H5Sclose(sid2); @@ -594,12 +594,12 @@ hsize_t diff_datasetid( hid_t did1, H5Tclose(m_tid1); H5Tclose(m_tid2); } H5E_END_TRY; - + return nfound; - + error: options->err_stat=1; - + /* free */ if (buf1!=NULL) { @@ -621,7 +621,7 @@ error: free(sm_buf2); sm_buf2=NULL; } - + /* disable error reporting */ H5E_BEGIN_TRY { H5Sclose(sid1); @@ -632,7 +632,7 @@ error: H5Tclose(m_tid2); /* enable error reporting */ } H5E_END_TRY; - + return nfound; } @@ -666,64 +666,64 @@ int diff_can_type( hid_t f_tid1, /* file data type */ diff_opt_t *options, int is_compound) { - - + + H5T_class_t tclass1; H5T_class_t tclass2; int maxdim_diff=0; /* maximum dimensions are different */ int dim_diff=0; /* current dimensions are different */ int i; int can_compare = 1; /* return value */ - + /*------------------------------------------------------------------------- * check for the same class *------------------------------------------------------------------------- */ - + if ((tclass1=H5Tget_class(f_tid1)) < 0) return -1; - + if ((tclass2=H5Tget_class(f_tid2)) < 0) return -1; - + if ( tclass1 != tclass2 ) { if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) { - + if ( is_compound ) { - + parallel_print("Not comparable: <%s> has a class %s and <%s> has a class %s\n", obj1_name, get_class(tclass1), obj2_name, get_class(tclass2) ); - + } - + else - + { - + parallel_print("Not comparable: <%s> is of class %s and <%s> is of class %s\n", obj1_name, get_class(tclass1), obj2_name, get_class(tclass2) ); - + } } - + can_compare = 0; options->not_cmp = 1; return can_compare; } - + /*------------------------------------------------------------------------- * check for non supported classes *------------------------------------------------------------------------- */ - + assert(tclass1==tclass2); switch (tclass1) { @@ -737,11 +737,11 @@ int diff_can_type( hid_t f_tid1, /* file data type */ case H5T_ENUM: case H5T_VLEN: case H5T_REFERENCE: - + break; - + default: /*H5T_TIME */ - + if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) { @@ -752,18 +752,18 @@ int diff_can_type( hid_t f_tid1, /* file data type */ options->not_cmp = 1; return can_compare; } - + /*------------------------------------------------------------------------- * check for equal file datatype; warning only *------------------------------------------------------------------------- */ - + if ( (H5Tequal(f_tid1, f_tid2)==0) && (options->m_verbose) && obj1_name && obj2_name) { - + H5T_class_t cl = H5Tget_class(f_tid1); - + parallel_print("Warning: different storage datatype\n"); if ( cl == H5T_INTEGER || cl == H5T_FLOAT ) @@ -777,14 +777,14 @@ int diff_can_type( hid_t f_tid1, /* file data type */ } - + } - + /*------------------------------------------------------------------------- * check for the same rank *------------------------------------------------------------------------- */ - + if ( rank1 != rank2 ) { @@ -807,12 +807,12 @@ int diff_can_type( hid_t f_tid1, /* file data type */ options->not_cmp = 1; return can_compare; } - + /*------------------------------------------------------------------------- * check for different dimensions *------------------------------------------------------------------------- */ - + assert(rank1==rank2); for ( i=0; im_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has rank %d, dimensions ", obj1_name, rank1); print_dimensions(rank1,dims1); - if (maxdim1 && maxdim2) + if (maxdim1 && maxdim2) { parallel_print(", max dimensions "); print_dimensions(rank1,maxdim1); @@ -848,7 +848,7 @@ int diff_can_type( hid_t f_tid1, /* file data type */ parallel_print("\n"); } } - + can_compare = 0; options->not_cmp = 1; @@ -857,7 +857,7 @@ int diff_can_type( hid_t f_tid1, /* file data type */ } - + /*------------------------------------------------------------------------- * maximum dimensions; just give a warning *------------------------------------------------------------------------- @@ -878,7 +878,7 @@ int diff_can_type( hid_t f_tid1, /* file data type */ if ( tclass1 == H5T_COMPOUND ) { - + int nmembs1; int nmembs2; int j; @@ -890,7 +890,7 @@ int diff_can_type( hid_t f_tid1, /* file data type */ if ( nmembs1 != nmembs2 ) { - + if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has %d members ", obj1_name, nmembs1); @@ -902,7 +902,7 @@ int diff_can_type( hid_t f_tid1, /* file data type */ options->not_cmp = 1; return can_compare; } - + for (j = 0; j < nmembs1; j++) { memb_type1 = H5Tget_member_type(f_tid1, (unsigned)j); @@ -927,22 +927,22 @@ int diff_can_type( hid_t f_tid1, /* file data type */ H5Tclose(memb_type2); return can_compare; } - + H5Tclose(memb_type1); H5Tclose(memb_type2); - + } - - - - - + + + + + } - - - + + + return can_compare; } @@ -966,12 +966,12 @@ void print_sizes( const char *obj1, { size_t f_size1, f_size2; /* size of type in file */ size_t m_size1, m_size2; /* size of type in memory */ - + f_size1 = H5Tget_size( f_tid1 ); f_size2 = H5Tget_size( f_tid2 ); m_size1 = H5Tget_size( m_tid1 ); m_size2 = H5Tget_size( m_tid2 ); - + parallel_print("\n"); parallel_print("------------------\n"); parallel_print("sizeof(char) %u\n", sizeof(char) ); @@ -983,18 +983,18 @@ void print_sizes( const char *obj1, print_type(f_tid1); parallel_print("\n"); parallel_print("size on file %u\n", f_size1 ); - + parallel_print("type on memory "); print_type(m_tid1); parallel_print("\n"); parallel_print("size on memory %u\n", m_size1 ); - + parallel_print("<%s> ------------------\n", obj2); parallel_print("type on file "); print_type(f_tid2); parallel_print("\n"); parallel_print("size on file %u\n", f_size2 ); - + parallel_print("type on memory "); print_type(m_tid2); parallel_print("\n"); diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 1acc493..721c3d7 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -106,14 +106,14 @@ print_dimensions (int rank, hsize_t *dims) if ( rank > 0 ) { - + parallel_print("[" ); for ( i = 0; i < rank-1; i++) { parallel_print(HSIZE_T_FORMAT, dims[i]); parallel_print("x"); } - + parallel_print(HSIZE_T_FORMAT, dims[rank-1]); parallel_print("]" ); } diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 7f1019a..e997d03 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -43,7 +43,7 @@ int bin_output; /* binary output */ int bin_form; /* binary form */ int region_output; /* region output */ -static h5tool_format_t h5tools_dataformat = { +static h5tool_format_t h5tools_dataformat = { 0, /*raw */ "", /*fmt_raw */ @@ -112,7 +112,7 @@ NULL, /*fmt_ullong */ 1 /*escape non printable characters */ }; -static const h5tools_dump_header_t h5tools_standardformat = { +static const h5tools_dump_header_t h5tools_standardformat = { "standardformat", /*name */ "HDF5", /*fileebgin */ "", /*fileend */ @@ -217,8 +217,8 @@ hbool_t h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, hsize_t elmt_counter); int h5tools_print_region_data_blocks(hid_t region_space, hid_t region_id, - FILE *stream, const h5tool_format_t *info, h5tools_context_t ctx, - h5tools_str_t *buffer/*string into which to render */, size_t ncols, + FILE *stream, const h5tool_format_t *info, h5tools_context_t ctx, + h5tools_str_t *buffer/*string into which to render */, size_t ncols, int ndims, hid_t type_id, hssize_t nblocks, hsize_t *ptdata); hbool_t h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, @@ -230,8 +230,8 @@ hbool_t h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, hsize_t elmt_counter); int h5tools_print_region_data_points(hid_t region_space, hid_t region_id, - FILE *stream, const h5tool_format_t *info, h5tools_context_t ctx, - h5tools_str_t *buffer, size_t ncols, + FILE *stream, const h5tool_format_t *info, h5tools_context_t ctx, + h5tools_str_t *buffer, size_t ncols, int ndims, hid_t type_id, hssize_t npoints, hsize_t *ptdata); hbool_t h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, @@ -299,13 +299,13 @@ void h5tools_init(void) { char lib_str[256]; - + if (!h5tools_init_g) { /* register the error class */ sprintf(lib_str, "%d.%d.%d",H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); - + H5TOOLS_INIT_ERROR() - + if (!rawdatastream) rawdatastream = stdout; @@ -346,7 +346,7 @@ h5tools_close(void) term_ref_path_table(); H5TOOLS_CLOSE_ERROR() - + /* Shut down the library */ H5close(); @@ -445,7 +445,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum) if(drivernum) *drivernum = MPIO_IDX; } /* end if */ - } + } else if (!strcmp(driver, drivernames[MPIPOSIX_IDX])) { /* MPI-I/O Driver */ /* check if MPI has been initialized. */ @@ -727,9 +727,9 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, * None *------------------------------------------------------------------------- */ -static void +static void h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata, int secnum) + h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata, int secnum) { h5tools_str_t prefix; h5tools_str_t str; /*temporary for indentation */ @@ -841,7 +841,7 @@ h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, * new field sm_pos in h5tools_context_t, the current stripmine element position *------------------------------------------------------------------------- */ -void +void h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t container, h5tools_context_t *ctx/*in,out*/, unsigned flags, hsize_t nelmts, hid_t type, void *_mem) @@ -928,13 +928,13 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai if(H5Sclose(region_space) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed"); } /* end if (region_space >= 0) */ - else + else HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rget_region failed"); if(H5Dclose(region_id) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dclose failed"); } /* if (region_id >= 0) */ - else + else HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdereference failed"); ctx->need_prefix = TRUE; @@ -966,17 +966,17 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai * Purpose: Render an element to output STREAM. * Description: * Prints the string buffer to the output STREAM. The string is - * printed according to the format described in INFO. The CTX struct - * contains context information shared between calls to this function. - * + * printed according to the format described in INFO. The CTX struct + * contains context information shared between calls to this function. + * * Return: * False if a dimension end is reached, otherwise true - * - * In/Out: + * + * In/Out: * h5tools_context_t *ctx * h5tools_str_t *buffer * hsize_t *curr_pos - * + * * Parameters Description: * h5tools_str_t *buffer is the string into which to render * hsize_t curr_pos is the total data element position @@ -985,10 +985,10 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai * hsize_t elmt_count is the data element loop counter *------------------------------------------------------------------------- */ -hbool_t +hbool_t h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, h5tools_str_t *buffer, hsize_t *curr_pos, - size_t ncols, hsize_t local_elmt_counter, hsize_t elmt_counter) + size_t ncols, hsize_t local_elmt_counter, hsize_t elmt_counter) { hbool_t dimension_break = TRUE; char *s; @@ -1002,9 +1002,9 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, * If the element would split on multiple lines if printed at our * current location... */ - if (info->line_multi_new == 1 && - (ctx->cur_column + h5tools_ncols(s) + - strlen(OPT(info->elmt_suf2, " ")) + + if (info->line_multi_new == 1 && + (ctx->cur_column + h5tools_ncols(s) + + strlen(OPT(info->elmt_suf2, " ")) + strlen(OPT(info->line_suf, ""))) > ncols) { if (ctx->prev_multiline) { /* @@ -1013,8 +1013,8 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, */ ctx->need_prefix = TRUE; } - else if ((ctx->prev_prefix_len + h5tools_ncols(s) + - strlen(OPT(info->elmt_suf2, " ")) + + else if ((ctx->prev_prefix_len + h5tools_ncols(s) + + strlen(OPT(info->elmt_suf2, " ")) + strlen(OPT(info->line_suf, ""))) <= ncols) { /* * ...but *could* fit on one line otherwise, then we @@ -1045,11 +1045,11 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, * is too long to fit on a line then start this element at the * beginning of the line. */ - if (info->line_multi_new == 1 && - ctx->prev_multiline && - (ctx->cur_column + - h5tools_ncols(s) + - strlen(OPT(info->elmt_suf2, " ")) + + if (info->line_multi_new == 1 && + ctx->prev_multiline && + (ctx->cur_column + + h5tools_ncols(s) + + strlen(OPT(info->elmt_suf2, " ")) + strlen(OPT(info->line_suf, ""))) > ncols) ctx->need_prefix = TRUE; @@ -1066,8 +1066,8 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, * one-at a time. */ multiline = 0; - for (secnum = 0, multiline = 0; - (section = strtok(secnum ? NULL : s, OPTIONAL_LINE_BREAK)); + for (secnum = 0, multiline = 0; + (section = strtok(secnum ? NULL : s, OPTIONAL_LINE_BREAK)); secnum++) { /* * If the current section plus possible suffix and end-of-line @@ -1079,10 +1079,10 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, * Added the info->skip_first because the dumper does not want * this check to happen for the first line */ - if ((!info->skip_first || local_elmt_counter) && - (ctx->cur_column + - strlen(section) + - strlen(OPT(info->elmt_suf2, " ")) + + if ((!info->skip_first || local_elmt_counter) && + (ctx->cur_column + + strlen(section) + + strlen(OPT(info->elmt_suf2, " ")) + strlen(OPT(info->line_suf, ""))) > ncols) ctx->need_prefix = 1; @@ -1122,17 +1122,17 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, * Purpose: Render a region element to output STREAM. * Description: * Prints the string buffer to the output STREAM. The string is - * printed according to the format described in INFO. The CTX struct - * contains context information shared between calls to this function. - * + * printed according to the format described in INFO. The CTX struct + * contains context information shared between calls to this function. + * * Return: * False if a dimension end is reached, otherwise true - * - * In/Out: + * + * In/Out: * h5tools_context_t *ctx * h5tools_str_t *buffer * hsize_t *curr_pos - * + * * Parameters Description: * h5tools_str_t *buffer is the string into which to render * hsize_t curr_pos is the total data element position @@ -1142,10 +1142,10 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, * hsize_t elmt_count is the data element loop counter *------------------------------------------------------------------------- */ -hbool_t +hbool_t h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, h5tools_str_t *buffer, hsize_t *curr_pos, - size_t ncols, hsize_t *ptdata, hsize_t local_elmt_counter, hsize_t elmt_counter) + size_t ncols, hsize_t *ptdata, hsize_t local_elmt_counter, hsize_t elmt_counter) { hbool_t dimension_break = TRUE; char *s; @@ -1159,9 +1159,9 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, * If the element would split on multiple lines if printed at our * current location... */ - if (info->line_multi_new == 1 && - (ctx->cur_column + h5tools_ncols(s) + - strlen(OPT(info->elmt_suf2, " ")) + + if (info->line_multi_new == 1 && + (ctx->cur_column + h5tools_ncols(s) + + strlen(OPT(info->elmt_suf2, " ")) + strlen(OPT(info->line_suf, ""))) > ncols) { if (ctx->prev_multiline) { /* @@ -1170,8 +1170,8 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, */ ctx->need_prefix = TRUE; } - else if ((ctx->prev_prefix_len + h5tools_ncols(s) + - strlen(OPT(info->elmt_suf2, " ")) + + else if ((ctx->prev_prefix_len + h5tools_ncols(s) + + strlen(OPT(info->elmt_suf2, " ")) + strlen(OPT(info->line_suf, ""))) <= ncols) { /* * ...but *could* fit on one line otherwise, then we @@ -1202,11 +1202,11 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, * is too long to fit on a line then start this element at the * beginning of the line. */ - if (info->line_multi_new == 1 && - ctx->prev_multiline && - (ctx->cur_column + - h5tools_ncols(s) + - strlen(OPT(info->elmt_suf2, " ")) + + if (info->line_multi_new == 1 && + ctx->prev_multiline && + (ctx->cur_column + + h5tools_ncols(s) + + strlen(OPT(info->elmt_suf2, " ")) + strlen(OPT(info->line_suf, ""))) > ncols) ctx->need_prefix = TRUE; @@ -1235,10 +1235,10 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, * Added the info->skip_first because the dumper does not want * this check to happen for the first line */ - if ((!info->skip_first || local_elmt_counter) && - (ctx->cur_column + - strlen(section) + - strlen(OPT(info->elmt_suf2, " ")) + + if ((!info->skip_first || local_elmt_counter) && + (ctx->cur_column + + strlen(section) + + strlen(OPT(info->elmt_suf2, " ")) + strlen(OPT(info->line_suf, ""))) > ncols) ctx->need_prefix = 1; @@ -1276,13 +1276,13 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, * Audience: Public * Chapter: H5Tools Library * Purpose: Print the data values from a dataset referenced by region blocks. - * + * * Description: * This is a special case subfunction to print the data in a region reference of type blocks. - * + * * Return: * The function returns FAIL if there was an error, otherwise SUCEED - * + * * Parameters Description: * h5tools_str_t *buffer is the string into which to render * size_t ncols @@ -1290,10 +1290,10 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, * hssize_t nblocks is the number of blocks in the region *------------------------------------------------------------------------- */ -int +int h5tools_print_region_data_blocks(hid_t region_space, hid_t region_id, - FILE *stream, const h5tool_format_t *info, h5tools_context_t ctx, - h5tools_str_t *buffer/*string into which to render */, size_t ncols, + FILE *stream, const h5tool_format_t *info, h5tools_context_t ctx, + h5tools_str_t *buffer/*string into which to render */, size_t ncols, int ndims, hid_t type_id, hssize_t nblocks, hsize_t *ptdata) { HERR_INIT(int, SUCCEED) hbool_t dimension_break = TRUE; @@ -1364,12 +1364,12 @@ h5tools_print_region_data_blocks(hid_t region_space, hid_t region_id, ctx.indent_level++; if(H5Sget_simple_extent_dims(mem_space, total_size, NULL) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed"); - + /* assume entire data space to be printed */ for (jndx = 0; jndx < (size_t) ctx.ndims; jndx++) ctx.p_min_idx[jndx] = start[jndx]; init_acc_pos(&ctx, total_size); - + /* print the data */ region_flags = START_OF_DATA; if (blkndx == nblocks - 1) @@ -1390,7 +1390,7 @@ h5tools_print_region_data_blocks(hid_t region_space, hid_t region_id, h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", jndx ? OPTIONAL_LINE_BREAK "" : ""); - h5tools_str_sprint(buffer, info, region_id, type_id, + h5tools_str_sprint(buffer, info, region_id, type_id, ((char*)region_buf + jndx * type_size), &ctx); if (jndx + 1 < numelem || (region_flags & END_OF_DATA) == 0) @@ -1399,7 +1399,7 @@ h5tools_print_region_data_blocks(hid_t region_space, hid_t region_id, dimension_break = h5tools_render_region_element(stream, info, &ctx, buffer, &curr_pos, ncols, ptdata, jndx, elmtno); /* Render the region data element end */ - + if(FALSE == dimension_break) elmtno = 0; } /* end for (jndx = 0; jndx < numelem; jndx++, region_elmtno++, ctx.cur_elmt++) */ @@ -1412,12 +1412,12 @@ h5tools_print_region_data_blocks(hid_t region_space, hid_t region_id, HDfree(count); HDfree(region_buf); HDfree(dims1); - + if(H5Sclose(mem_space) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed"); if(H5Sclose(sid1) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed"); - + CATCH return ret_value; } @@ -1426,17 +1426,17 @@ CATCH * Audience: Public * Chapter: H5Tools Library * Purpose: Print some values from a dataset referenced by region blocks. - * + * * Description: * This is a special case subfunction to dump a region reference using blocks. - * + * * Return: * The function returns False if the last dimension has been reached, otherwise True - * - * In/Out: + * + * In/Out: * h5tools_context_t *ctx * hsize_t *curr_pos - * + * * Parameters Description: * h5tools_str_t *buffer is the string into which to render * hsize_t curr_pos is the total data element position @@ -1445,7 +1445,7 @@ CATCH * hsize_t elmt_count is the data element loop counter *------------------------------------------------------------------------- */ -hbool_t +hbool_t h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/, @@ -1469,7 +1469,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, /* Print block information */ if((ndims = H5Sget_simple_extent_ndims(region_space)) < 0) H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); - + /* Render the region { element begin */ h5tools_str_reset(buffer); @@ -1483,7 +1483,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, ctx->indent_level++; ctx->need_prefix = TRUE; h5tools_str_append(buffer, "REGION_TYPE BLOCK "); - + alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]); assert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/ if((ptdata = (hsize_t*) malloc((size_t) alloc_size)) == NULL) @@ -1580,10 +1580,10 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, done: free(ptdata); - + if(H5Tclose(type_id) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed"); - + if(H5Tclose(dtype) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed"); @@ -1594,7 +1594,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, h5tools_str_append(buffer, "%s %s ", h5tools_dump_header_format->dataend, h5tools_dump_header_format->datablockend); - dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, + dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter); /* Render the dataend element end */ @@ -1604,7 +1604,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, /* Render the region } element begin */ h5tools_str_reset(buffer); h5tools_str_append(buffer, "}"); - dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, + dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter); /* Render the region } element end */ @@ -1618,13 +1618,13 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, * Audience: Public * Chapter: H5Tools Library * Purpose: Print the data values from a dataset referenced by region points. - * + * * Description: * This is a special case subfunction to print the data in a region reference of type points. - * + * * Return: * The function returns FAIL on error, otherwise SUCCEED - * + * * Parameters Description: * h5tools_str_t *buffer is the string into which to render * size_t ncols @@ -1632,10 +1632,10 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, * hssize_t npoints is the number of points in the region *------------------------------------------------------------------------- */ -int +int h5tools_print_region_data_points(hid_t region_space, hid_t region_id, - FILE *stream, const h5tool_format_t *info, h5tools_context_t ctx, - h5tools_str_t *buffer, size_t ncols, + FILE *stream, const h5tool_format_t *info, h5tools_context_t ctx, + h5tools_str_t *buffer, size_t ncols, int ndims, hid_t type_id, hssize_t npoints, hsize_t *ptdata) { HERR_INIT(int, SUCCEED) hbool_t dimension_break = TRUE; @@ -1688,7 +1688,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, if (ctx.ndims > 0) { ctx.size_last_dim = (int) (ctx.p_max_idx[ctx.ndims - 1]); - } + } else ctx.size_last_dim = 0; @@ -1702,17 +1702,17 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, curr_pos = 0; /* points requires constant 0 */ ctx.sm_pos = jndx * ndims; - + h5tools_region_simple_prefix(stream, info, &ctx, curr_pos, ptdata, 0); - h5tools_str_sprint(buffer, info, region_id, type_id, + h5tools_str_sprint(buffer, info, region_id, type_id, ((char*)region_buf + jndx * type_size), &ctx); if (jndx + 1 < npoints || (region_flags & END_OF_DATA) == 0) h5tools_str_append(buffer, "%s", OPT(info->elmt_suf1, ",")); - dimension_break = - h5tools_render_region_element(stream, info, &ctx, buffer, &curr_pos, + dimension_break = + h5tools_render_region_element(stream, info, &ctx, buffer, &curr_pos, ncols, ptdata, 0, elmtno); /* Render the point element end */ @@ -1724,7 +1724,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, done: HDfree(region_buf); HDfree(dims1); - + if(H5Sclose(mem_space) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed"); CATCH @@ -1735,17 +1735,17 @@ CATCH * Audience: Public * Chapter: H5Tools Library * Purpose: Print some values from a dataset referenced by region points. - * + * * Description: * This is a special case subfunction to dump a region reference using points. - * + * * Return: * The function returns False if the last dimension has been reached, otherwise True - * - * In/Out: + * + * In/Out: * h5tools_context_t *ctx * hsize_t *curr_pos - * + * * Parameters Description: * h5tools_str_t *buffer is the string into which to render * hsize_t curr_pos is the total data element position @@ -1754,9 +1754,9 @@ CATCH * hsize_t elmt_count is the data element loop counter *------------------------------------------------------------------------- */ -hbool_t +hbool_t h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, - FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, + FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter, hsize_t elmt_counter) { HERR_INIT(hbool_t, TRUE) @@ -1819,7 +1819,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, if((dtype = H5Dget_type(region_id)) < 0) HGOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Dget_type failed"); - + if((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0) HGOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Tget_native_type failed"); @@ -1882,7 +1882,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, done: free(ptdata); - + if(H5Tclose(type_id) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed"); @@ -1896,7 +1896,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, h5tools_str_append(buffer, "%s %s ", h5tools_dump_header_format->dataend, h5tools_dump_header_format->datablockend); - dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, + dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter); /* Render the dataend element end*/ @@ -1906,7 +1906,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, /* Render the region } element begin */ h5tools_str_reset(buffer); h5tools_str_append(buffer, "}"); - dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, + dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter); /* Render the region } element end */ @@ -1948,7 +1948,7 @@ CATCH *------------------------------------------------------------------------- */ static herr_t -h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, +h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t dset, hid_t p_type, struct subset_t *sset, hid_t f_space, hsize_t hyperslab_count, hsize_t *temp_start,/* start inside offset count loop */ @@ -1987,7 +1987,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c for (; hyperslab_count > 0; temp_start[row_dim] += temp_stride[row_dim], hyperslab_count--) { /* jump rows if size of block exceeded cases where block > 1 only and stride > block */ - if (size_row_block > 1 + if (size_row_block > 1 && row_counter == size_row_block && sset->stride[row_dim] > sset->block[row_dim]) { @@ -2001,7 +2001,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c /* calculate the potential number of elements we're going to print */ if(H5Sselect_hyperslab(f_space, H5S_SELECT_SET, temp_start, temp_stride, temp_count, temp_block) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); - + if((sm_nelmts = H5Sget_select_npoints(f_space)) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_npoints failed"); @@ -2012,7 +2012,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c */ if((sm_nbytes = p_type_nbytes = H5Tget_size(p_type)) == 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed"); - + if (ctx->ndims > 0) for (i = ctx->ndims; i > 0; --i) { hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes; @@ -2022,35 +2022,35 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c sm_nbytes *= sm_size[i - 1]; assert(sm_nbytes > 0); } - + assert(sm_nbytes == (hsize_t) ((size_t) sm_nbytes)); /*check for overflow*/ if((sm_buf = HDmalloc((size_t) sm_nelmts * p_type_nbytes)) == NULL) H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for strip-mine"); - + if((sm_space = H5Screate_simple(1, &sm_nelmts, NULL)) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed"); - + if(H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, &zero, NULL, &sm_nelmts, NULL) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); - + /* read the data */ if(H5Dread(dset, p_type, sm_space, f_space, H5P_DEFAULT, sm_buf) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dread failed"); - + /* print the data */ flags = START_OF_DATA; - + if (hyperslab_count == 1) flags |= END_OF_DATA; - + for (i = 0; i < ctx->ndims; i++) ctx->p_max_idx[i] = ctx->p_min_idx[i] + MIN(total_size[i], sm_size[i]); - + /* print array indices. get the lower bound of the hyperslab and calulate the element position at the start of hyperslab */ if(H5Sget_select_bounds(f_space, low, high) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_bounds failed"); - + elmtno = 0; for (i = 0; i < (size_t) ctx->ndims - 1; i++) { hsize_t offset = 1; /* accumulation of the previous dimensions */ @@ -2059,11 +2059,11 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c elmtno += low[i] * offset; } elmtno += low[ctx->ndims - 1]; - + /* initialize the current stripmine position; this is necessary to print the array indices */ ctx->sm_pos = elmtno; - + h5tools_dump_simple_data(stream, info, dset, ctx, flags, sm_nelmts, p_type, sm_buf); if(H5Sclose(sm_space) < 0) @@ -2121,7 +2121,7 @@ CATCH *------------------------------------------------------------------------- */ static herr_t -h5tools_display_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, +h5tools_display_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t dset, hid_t p_type, struct subset_t *sset, hid_t f_space, hsize_t *total_size) { @@ -2192,11 +2192,11 @@ h5tools_display_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools else { count = 1; } - + h5tools_print_simple_subset(stream, info, ctx, dset, p_type, sset, - f_space, count, temp_start, temp_count, + f_space, count, temp_start, temp_count, temp_block, temp_stride, total_size, row_dim); - + if (ctx->ndims > 2) { /* dimension for start */ current_outer_dim = (ctx->ndims - 2) - 1; @@ -2337,9 +2337,9 @@ CATCH * returns FAIL. *------------------------------------------------------------------------- */ -static int +static int h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, - hid_t dset, hid_t p_type, int indentlevel) + hid_t dset, hid_t p_type, int indentlevel) { hid_t f_space; /* file data space */ hsize_t elmtno; /* counter */ @@ -2612,9 +2612,9 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, hid_t obj_id, * *------------------------------------------------------------------------- */ -int +int h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, hid_t dset, - hid_t _p_type, struct subset_t *sset, int indentlevel) + hid_t _p_type, struct subset_t *sset, int indentlevel) { hid_t f_space; hid_t p_type = _p_type; @@ -2727,9 +2727,9 @@ CATCH * *------------------------------------------------------------------------- */ -int -h5tools_print_datatype(h5tools_str_t *buffer, const h5tool_format_t *info, - h5tools_context_t *ctx, hid_t type) +int +h5tools_print_datatype(h5tools_str_t *buffer, const h5tool_format_t *info, + h5tools_context_t *ctx, hid_t type) { HERR_INIT(int, FAIL) char *mname; @@ -3081,7 +3081,7 @@ h5tools_print_datatype(h5tools_str_t *buffer, const h5tool_format_t *info, case H5T_COMPOUND: if((nmembers = H5Tget_nmembers(type)) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed"); - + h5tools_str_append(buffer, "H5T_COMPOUND %s\n", h5tools_dump_header_format->structblockbegin); for (i = 0; i < nmembers; i++) { @@ -3089,12 +3089,12 @@ h5tools_print_datatype(h5tools_str_t *buffer, const h5tool_format_t *info, if((mtype = H5Tget_member_type(type, i))>=0) { if (H5Tget_class(mtype) == H5T_COMPOUND) ctx->indent_level++; - + h5tools_print_datatype(buffer, info, ctx, mtype); - + if (H5Tget_class(mtype) == H5T_COMPOUND) ctx->indent_level--; - + h5tools_str_append(buffer, " \"%s\";\n", mname); if(H5Tclose(mtype) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed"); @@ -3129,10 +3129,10 @@ h5tools_print_datatype(h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_print_datatype(buffer, info, ctx, super); if(H5Tclose(super) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed"); - + h5tools_str_append(buffer, ";\n"); h5tools_print_enum(buffer, type); - + ctx->indent_level--; h5tools_str_append(buffer, "%s", h5tools_dump_header_format->enumblockend); @@ -3161,7 +3161,7 @@ h5tools_print_datatype(h5tools_str_t *buffer, const h5tool_format_t *info, /* Print array dimensions */ for (i = 0; i < ndims; i++) h5tools_str_append(buffer, "[%d]", (int) dims[i]); - + h5tools_str_append(buffer, " "); } else @@ -3206,8 +3206,8 @@ CATCH * *------------------------------------------------------------------------- */ -int -h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space) +int +h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space) { HERR_INIT(int, SUCCEED) hsize_t size[H5TOOLS_DUMP_MAX_RANK]; @@ -3282,8 +3282,8 @@ CATCH * h5tools_context_t *ctx * *-----------------------------------------------------------------------*/ -int -h5tools_print_enum(h5tools_str_t *buffer, hid_t type) +int +h5tools_print_enum(h5tools_str_t *buffer, hid_t type) { HERR_INIT(int, SUCCEED) char **name = NULL; /*member names */ @@ -3293,7 +3293,7 @@ h5tools_print_enum(h5tools_str_t *buffer, hid_t type) int nchars; /*number of output characters */ hid_t super = -1; /*enum base integer type */ hid_t native = -1; /*native integer datatype */ - H5T_sign_t sign_type; /*sign of value type */ + H5T_sign_t sign_type; /*sign of value type */ size_t type_size; /*value type size */ size_t dst_size; /*destination value type size */ int snmembs; @@ -3303,10 +3303,10 @@ h5tools_print_enum(h5tools_str_t *buffer, hid_t type) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed"); nmembs = (unsigned)snmembs; assert(nmembs > 0); - + if((super = H5Tget_super(type)) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed"); - + if((type_size = H5Tget_size(type)) <= 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size(type) failed"); @@ -3410,13 +3410,13 @@ CATCH * atomic datatype or committed/transient datatype. * * Return: void - * + * * In/Out: h5tools_context_t *ctx *------------------------------------------------------------------------- */ -void +void h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx, hid_t type) + h5tools_context_t *ctx, hid_t type) { size_t ncols = 80; /* available output width */ h5tools_str_t buffer; /* string into which to render */ @@ -3470,8 +3470,8 @@ h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, * Return: void *------------------------------------------------------------------------- */ -void -init_acc_pos(h5tools_context_t *ctx, hsize_t *dims) +void +init_acc_pos(h5tools_context_t *ctx, hsize_t *dims) { int i; @@ -3525,7 +3525,7 @@ CATCH * Failure: FAIL *------------------------------------------------------------------------- */ -static int +static int render_bin_output(FILE *stream, hid_t tid, void *_mem) { HERR_INIT(int, SUCCEED) @@ -3880,8 +3880,8 @@ CATCH * Return: TRUE if all bytes are zero; FALSE otherwise *------------------------------------------------------------------------- */ -static -hbool_t h5tools_is_zero(const void *_mem, size_t size) +static +hbool_t h5tools_is_zero(const void *_mem, size_t size) { const unsigned char *mem = (const unsigned char *) _mem; diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 2b1e4bf..7d207ba 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -53,9 +53,9 @@ #define H5TOOLS_DUMP_MAX_RANK H5S_MAX_RANK -/* - * Strings for output - these were duplicated from the h5dump.h - * file in order to support region reference data display +/* + * Strings for output - these were duplicated from the h5dump.h + * file in order to support region reference data display */ #define ATTRIBUTE "ATTRIBUTE" #define BLOCK "BLOCK" @@ -105,9 +105,9 @@ #define BEGIN "{" #define END "}" -/* - * dump structure for output - this was duplicated from the h5dump.h - * file in order to support region reference data display +/* + * dump structure for output - this was duplicated from the h5dump.h + * file in order to support region reference data display */ typedef struct h5tools_dump_header_t { const char *name; @@ -515,7 +515,7 @@ struct subset_t { hsize_t *block; }; -/* The following include, h5tools_str.h, must be after the +/* The following include, h5tools_str.h, must be after the * above stucts are defined. There is a dependency in the following * include that hasn't been identified yet. */ @@ -554,11 +554,11 @@ extern int h5tools_canreadf(const char* name, extern int h5tools_can_encode(H5Z_filter_t filtn); void init_acc_pos(h5tools_context_t *ctx, hsize_t *dims); -/* +/* * new functions needed to display region reference data */ void h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx/*in,out*/, hid_t type); + h5tools_context_t *ctx/*in,out*/, hid_t type); int h5tools_print_dataspace(h5tools_str_t *buffer/*in,out*/, hid_t space); int h5tools_print_datatype(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/, diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h index dc5f87b..a7c0d3c 100644 --- a/tools/lib/h5tools_error.h +++ b/tools/lib/h5tools_error.h @@ -87,7 +87,7 @@ extern hid_t H5E_tools_min_id_g; } /* - * H5E_THROW macro, used to facilitate error reporting within a function body. + * H5E_THROW macro, used to facilitate error reporting within a function body. * The arguments are the minor error number, and an error string. * The return value is assigned to a variable `ret_value' and control branches * to the `catch_except' label, if we're not already past it. @@ -109,8 +109,8 @@ extern hid_t H5E_tools_min_id_g; } /* - * HGOTO_DONE macro, used to facilitate normal return within a function body. - * The argument is the return value which is assigned to the `ret_value' + * HGOTO_DONE macro, used to facilitate normal return within a function body. + * The argument is the return value which is assigned to the `ret_value' * variable. Control branches to the `done' label. */ #define HGOTO_DONE(ret_val) {ret_value = ret_val; goto done;} diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 3567975..55596cd 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -350,8 +350,8 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info, * * Return: Success: Pointer to the prefix. * Failure: NULL - * - * In/Out: + * + * In/Out: * h5tools_context_t *ctx * h5tools_str_t *str *------------------------------------------------------------------------- @@ -359,7 +359,7 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info, char * h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, hsize_t elmtno, hsize_t *ptdata, unsigned ndims, hsize_t min_idx[], hsize_t max_idx[], - h5tools_context_t *ctx) + h5tools_context_t *ctx) { hsize_t p_prod[H5S_MAX_RANK]; size_t i = 0; @@ -406,15 +406,15 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, * the information to the specified string. * * Return: none - * - * In/Out: + * + * In/Out: * h5tools_context_t *ctx * h5tools_str_t *str *------------------------------------------------------------------------- */ -void +void h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, - const h5tool_format_t *info, h5tools_context_t *ctx) + const h5tool_format_t *info, h5tools_context_t *ctx) { hssize_t nblocks; hsize_t alloc_size; @@ -422,7 +422,7 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, int ndims = H5Sget_simple_extent_ndims(region); /* - * This function fails if the region does not have blocks. + * This function fails if the region does not have blocks. */ H5E_BEGIN_TRY { nblocks = H5Sget_select_hyper_nblocks(region); @@ -467,15 +467,15 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, * the information to the specified string. * * Return: none - * - * In/Out: + * + * In/Out: * h5tools_context_t *ctx * h5tools_str_t *str *------------------------------------------------------------------------- */ -void +void h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region, - const h5tool_format_t *info, h5tools_context_t *ctx) + const h5tool_format_t *info, h5tools_context_t *ctx) { hssize_t npoints; hsize_t alloc_size; @@ -699,7 +699,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, "%Lf", templdouble); #endif } - else if (info->ascii && (H5Tequal(type, H5T_NATIVE_SCHAR) || + else if (info->ascii && (H5Tequal(type, H5T_NATIVE_SCHAR) || H5Tequal(type, H5T_NATIVE_UCHAR))) { h5tools_print_char(str, info, (char) (*ucp_vp)); } @@ -788,13 +788,13 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai else if (H5Tequal(type, H5T_NATIVE_UINT)) { HDmemcpy(&tempuint, vp, sizeof(unsigned int)); h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint); - } + } else if (H5Tequal(type, H5T_NATIVE_SCHAR)) { h5tools_str_append(str, OPT(info->fmt_schar, "%d"), *cp_vp); - } + } else if (H5Tequal(type, H5T_NATIVE_UCHAR)) { h5tools_str_append(str, OPT(info->fmt_uchar, "%u"), *ucp_vp); - } + } else if (H5Tequal(type, H5T_NATIVE_SHORT)) { short tempshort; @@ -1110,9 +1110,9 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai * Return: Nothing *------------------------------------------------------------------------- */ -void +void h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, - hid_t container, void *vp, h5tools_context_t *ctx) + hid_t container, void *vp, h5tools_context_t *ctx) { hid_t obj, region; char ref_name[1024]; diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index 61b7905..98dd065 100644 --- a/tools/lib/h5tools_str.h +++ b/tools/lib/h5tools_str.h @@ -35,7 +35,7 @@ extern char *h5tools_str_fmt(h5tools_str_t *str, size_t start, const char *fm extern char *h5tools_str_prefix(h5tools_str_t *str, const h5tool_format_t *info, hsize_t elmtno, unsigned ndims, hsize_t min_idx[], hsize_t max_idx[], h5tools_context_t *ctx); -/* +/* * new functions needed to display region reference data */ extern char *h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 46b425b..82e9ab9 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -232,8 +232,8 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti } sp = 1; - } - + } + /* wildcard argument */ else if (*cp == '*') { @@ -249,16 +249,16 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti opt_arg = NULL; } } - - else + + else { /* set up to look at next char in token, next time */ if (argv[opt_ind][++sp] == '\0') { /* no more in current token, so setup next token */ opt_ind++; sp = 1; - - + + } opt_arg = NULL; diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 69b4512..287af29 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -150,7 +150,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo, if(udata->is_absolute) { size_t base_len = HDstrlen(udata->base_grp_name); size_t add_slash = base_len ? ((udata->base_grp_name)[base_len-1] != '/') : 1; - + if(NULL == (new_name = HDmalloc(base_len + add_slash + HDstrlen(path) + 1))) return(H5_ITER_ERROR); HDstrcpy(new_name, udata->base_grp_name); diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c index 27e9741..d79a66a 100644 --- a/tools/misc/h5debug.c +++ b/tools/misc/h5debug.c @@ -548,9 +548,9 @@ main(int argc, char *argv[]) HDassert(cls); /* Check for enough valid parameters */ - if(extra == 0) { + if(extra == 0) { fprintf(stderr, "ERROR: Need object header address containing the layout messagein order to dump header\n"); - fprintf(stderr, "Fixed array header block usage:\n"); + fprintf(stderr, "Fixed array header block usage:\n"); fprintf(stderr, "\th5debug \n"); HDexit(4); } /* end if */ diff --git a/vms/c++/test/make.com b/vms/c++/test/make.com index 7e4b671..7016a18 100644 --- a/vms/c++/test/make.com +++ b/vms/c++/test/make.com @@ -27,6 +27,7 @@ $! $! $! $ ccc h5cpputil +$ ccc dsets $ ccc tattr $ ccc tcompound $ ccc testhdf5 @@ -39,18 +40,10 @@ $ ccc ttypes $ ccc tvlstr $ type sys$input Creating testhdf5 -$ cxxlink testhdf5, h5cpputil, tattr, tcompound, tfile, tfilter, th5s, - +$ cxxlink testhdf5, dsets, h5cpputil, tattr, tcompound, tfile, tfilter, th5s, - tlinks, trefer, ttypes, tvlstr, - [-.src]hdf5_cplus.olb/lib, [-.-.test]libh5test.olb/lib, - [-.-.src]hdf5.olb/lib,zlib_dir:libz.olb/lib -$! -$! -$ ccc dsets -$ type sys$input - Creating dsets -$ cxxlink dsets, h5cpputil, - - [-.src]hdf5_cplus.olb/lib, [-.-.test]libh5test.olb/lib, - - [-.-.src]hdf5.olb/lib,zlib_dir:libz.olb/lib $ type sys$input Done $ exit diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 75f5308..a197134 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -15,6 +15,9 @@ /* src/H5config.h. Generated from H5config.h.in by configure. */ /* src/H5config.h.in. Generated from configure.in by autoheader. */ +/* Define if building universal (internal helper macro) */ +/* #undef H5_AC_APPLE_UNIVERSAL_BUILD */ + /* Define if your system generates wrong code for log2 routine. */ /* #undef H5_BAD_LOG2_CODE_GENERATED */ @@ -99,6 +102,9 @@ /* Define to 1 if you have the header file. */ /* #undef H5_HAVE_DMALLOC_H */ +/* Define if library information should be embedded in the executables */ +/* #define H5_HAVE_EMBEDDED_LIBINFO 1 */ + /* Define to 1 if you have the header file. */ /* #define H5_HAVE_FEATURES_H 1 */ @@ -316,6 +322,9 @@ /* Define if `struct videoconfig' is defined */ /* #undef H5_HAVE_STRUCT_VIDEOCONFIG */ +/* Define to 1 if you have the `symlink' function. */ +/* #define H5_HAVE_SYMLINK 1 */ + /* Define to 1 if you have the `system' function. */ #define H5_HAVE_SYSTEM 1 @@ -416,7 +425,7 @@ /* #define H5_HW_FP_TO_LLONG_NOT_WORKS 1 */ /* Define if HDF5's high-level library headers should be included in hdf5.h */ -#define H5_INCLUDE_HL 1 +#define H5_INCLUDE_HL 1 /* Define if your system can accurately convert from integers to long double values. */ @@ -480,13 +489,13 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.59-FA_a4" +#define H5_PACKAGE_STRING "HDF5 1.9.64-FA_a4" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.59-FA_a4" +#define H5_PACKAGE_VERSION "1.9.64-FA_a4" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -599,6 +608,9 @@ /* The size of `uint_least8_t', as computed by sizeof. */ /* #define H5_SIZEOF_UINT_LEAST8_T 1 */ +/* The size of `unsigned', as computed by sizeof. */ +#define H5_SIZEOF_UNSIGNED 4 + /* The size of `__int64', as computed by sizeof. */ #define H5_SIZEOF___INT64 0 @@ -639,7 +651,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.59-FA_a4" +#define H5_VERSION "1.9.64-FA_a4" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ @@ -653,7 +665,15 @@ /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef H5_WORDS_BIGENDIAN */ +/* #if defined AC_APPLE_UNIVERSAL_BUILD */ +/* # if defined __BIG_ENDIAN__ */ +/* # define WORDS_BIGENDIAN 1 */ +/* # endif */ +/* #else */ +/* # ifndef WORDS_BIGENDIAN */ +/* # undef WORDS_BIGENDIAN */ +/* # endif */ +/* #endif */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef H5_const */ diff --git a/vms/src/make.com b/vms/src/make.com index 71362b5..b096cd5 100644 --- a/vms/src/make.com +++ b/vms/src/make.com @@ -30,30 +30,30 @@ $ type sys$input $! $ cobj= "H5, H5checksum, H5dbg, H5system, H5timer, H5trace,"+- "H5Abtree2, H5A, H5AC, H5Adense, H5Adeprec, H5Aint, H5Atest, H5B2, H5B2cache,"+- - "H5B2dbg, H5B2int, H5B2stat, H5B2test, H5B, H5Bcache, H5Bdbg, H5C, H5CS,"+- + "H5B2dbg, H5B2hdr, H5B2int, H5B2stat, H5B2test, H5B, H5Bcache, H5Bdbg, H5C, H5CS,"+- "H5Dbtree, H5D, H5Dchunk, H5Dcompact, H5Dcontig, H5Ddbg, H5Ddeprec,"+- "H5Defl, H5Dfill, H5Dint, H5Dio, H5Dlayout, H5Dmpio, H5Doh, H5Dscatgath, H5Dselect, H5Dtest,"+- "H5EA, H5EAcache, H5EAdbg, H5EAdblkpage, H5EAdblock, H5EAhdr, H5EAiblock, H5EAint,"+- "H5EAsblock, H5EAstat, H5EAtest, H5E, H5Edeprec, H5Eint,"+- "H5FA, H5FAcache, H5FAdbg, H5FAdblkpage, H5FAdblock, H5FAhdr, H5FAstat, H5FAtest,"+- - "H5Faccum, H5F, H5Fdbg, H5FD, H5FDcore, H5FDdirect, H5FDfamily, H5FDint, H5FDlog, H5FDmpi,"+- - "H5FDmpio, H5FDmpiposix, H5FDmulti, H5FDsec2, H5FDspace, H5FDstdio, H5FDwindows,"+- + "H5Faccum, H5F, H5Fdbg, H5Fdeprec, H5FD, H5FDcore, H5FDdirect, H5FDfamily, H5FDint, H5FDlog, "+- + "H5FDmpi, H5FDmpio, H5FDmpiposix, H5FDmulti, H5FDsec2, H5FDspace, H5FDstdio, H5FDwindows,"+- "H5Ffake, H5Fio, H5FL, H5Fmount, H5Fmpi, H5FO, H5Fquery, H5FS, H5FScache, H5FSdbg, H5Fsfile,"+- "H5FSsection, H5FSstat, H5FStest, H5Fsuper, H5Fsuper_cache, H5Ftest,"+- "H5Gbtree2, H5G, H5Gcache, H5Gcompact, H5Gdense, H5Gdeprec, H5Gent, H5Gint, H5Glink, H5Gloc,"+- "H5Gname, H5Gnode, H5Gobj, H5Goh, H5Groot, H5Gstab, H5Gtest, H5Gtraverse,"+- "H5HFbtree2, H5HF, H5HFcache, H5HFdbg, H5HFdblock, H5HFdtable, H5HFhdr, H5HFhuge, H5HFiblock,"+- "H5HFiter, H5HFman, H5HFsection, H5HFspace, H5HFstat, H5HFtest, H5HFtiny,"+- - "H5HG, H5HGcache, H5HGdbg, H5HL, H5HLcache, H5HLdbg, H5HP, H5I, H5L, H5Lexternal" + "H5HG, H5HGcache, H5HGdbg, H5HL, H5HLcache, H5HLdbg, H5HLint, H5HP, H5I, H5L, H5Lexternal" $ cobj1= "H5MFaggr, H5MF, H5MFdbg, H5MFsection, H5MM,"+- "H5MP, H5MPtest, H5Oainfo, H5Oalloc, H5Oattr, H5Oattribute, H5Obogus, H5Obtreek,"+- - "H5O, H5Ocache, H5Ocont, H5Ocopy, H5Odbg, H5Odrvinfo, H5Odtype, H5Oefl, H5Ofill, H5Oginfo,"+- - "H5Olayout, H5Olinfo, H5Olink, H5Omessage, H5Omtime, H5Oname, H5Onull, H5Opline, H5Orefcount,"+- - "H5Osdspace, H5Oshared, H5Oshmesg, H5Ostab, H5Otest, H5Ounknown,"+- + "H5O, H5Ocache, H5Ocont, H5Ocopy, H5Odbg, H5Odrvinfo, H5Odtype, H5Oefl, H5Ofill, H5Ofsinfo,"+- + "H5Oginfo, H5Olayout, H5Olinfo, H5Olink, H5Omessage, H5Omtime, H5Oname, H5Onull, H5Opline,"+- + "H5Orefcount, H5Osdspace, H5Oshared, H5Oshmesg, H5Ostab, H5Otest, H5Ounknown,"+- "H5Pacpl, H5P, H5Pdapl, H5Pdcpl, H5Pdeprec, H5Pdxpl, H5Pfapl, H5Pfcpl, H5Pfmpl, H5Pgcpl, H5Pint,"+- "H5Plapl, H5Plcpl, H5Pocpl, H5Pocpypl, H5Pstrcpl, H5Ptest,"+- "H5R, H5RC, H5Rdeprec, H5RS, H5Sall, H5S, H5Sdbg, H5Shyper, H5SL, H5SMbtree2, H5SM, H5SMcache,"+- - "H5Smpio, H5SMtest, H5Snone, H5Spoint, H5Sselect, H5ST, H5Stest,"+- + "H5SMmessage, H5Smpio, H5SMtest, H5Snone, H5Spoint, H5Sselect, H5ST, H5Stest,"+- "H5Tarray, H5Tbit, H5T, H5Tcommit, H5Tcompound, H5Tconv, H5Tcset, H5Tdbg, H5Tdeprec, H5Tenum,"+- "H5Tfields, H5Tfixed, H5Tfloat, H5Tinit, H5Tnative, H5Toffset, H5Toh, H5Topaque, H5Torder,"+- "H5Tpad, H5Tprecis, H5TS, H5Tstrpad, H5Tvisit, H5Tvlen, H5V, H5WB, H5Z,"+- @@ -62,7 +62,8 @@ $! $ ccc 'cobj $ ccc 'cobj1 $ library/create []hdf5 -$ library/insert []hdf5 'cobj, 'cobj1 +$ library/insert []hdf5 'cobj +$ library/insert []hdf5 'cobj1 $ type sys$input Done $! diff --git a/windows/c++/examples/allcppexamples/allcppexamples.sln b/windows/c++/examples/allcppexamples/allcppexamples.sln index 1818ad9..ff05007 100644 --- a/windows/c++/examples/allcppexamples/allcppexamples.sln +++ b/windows/c++/examples/allcppexamples/allcppexamples.sln @@ -1,5 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allcppexamples", "allcppexamples.vcproj", "{27E3886B-0BAC-4E00-8F89-163208E03462}" ProjectSection(ProjectDependencies) = postProject {7AABEE0C-3749-49C6-B951-5081BE817897} = {7AABEE0C-3749-49C6-B951-5081BE817897} diff --git a/windows/c++/examples/allcppexamples/allcppexamples.vcproj b/windows/c++/examples/allcppexamples/allcppexamples.vcproj index 3313807..6a6d348 100644 --- a/windows/c++/examples/allcppexamples/allcppexamples.vcproj +++ b/windows/c++/examples/allcppexamples/allcppexamples.vcproj @@ -1,9 +1,10 @@ - - diff --git a/windows/c++/examples/chunkstest/chunkstest.vcproj b/windows/c++/examples/chunkstest/chunkstest.vcproj index 2cca3ae..7a59a0a 100644 --- a/windows/c++/examples/chunkstest/chunkstest.vcproj +++ b/windows/c++/examples/chunkstest/chunkstest.vcproj @@ -1,9 +1,10 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -234,7 +233,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -252,7 +251,7 @@ /> - @@ -328,7 +326,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -346,7 +344,7 @@ /> - diff --git a/windows/c++/examples/chunkstestdll/chunkstestdll.vcproj b/windows/c++/examples/chunkstestdll/chunkstestdll.vcproj index fbce98e..fa32f33 100644 --- a/windows/c++/examples/chunkstestdll/chunkstestdll.vcproj +++ b/windows/c++/examples/chunkstestdll/chunkstestdll.vcproj @@ -1,9 +1,10 @@ - - - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HDF5CPP_USEDLL" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;HDF5CPP_USEDLL" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -343,7 +341,7 @@ /> - diff --git a/windows/c++/examples/compoundtest/compoundtest.vcproj b/windows/c++/examples/compoundtest/compoundtest.vcproj index 922a69b..418bfd9 100644 --- a/windows/c++/examples/compoundtest/compoundtest.vcproj +++ b/windows/c++/examples/compoundtest/compoundtest.vcproj @@ -1,9 +1,10 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -234,7 +233,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -252,7 +251,7 @@ /> - @@ -328,7 +326,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -346,7 +344,7 @@ /> - diff --git a/windows/c++/examples/compoundtestdll/compoundtestdll.vcproj b/windows/c++/examples/compoundtestdll/compoundtestdll.vcproj index ff8985c..a9e524e 100644 --- a/windows/c++/examples/compoundtestdll/compoundtestdll.vcproj +++ b/windows/c++/examples/compoundtestdll/compoundtestdll.vcproj @@ -1,9 +1,10 @@ - - - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HDF5CPP_USEDLL" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;HDF5CPP_USEDLL" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -343,7 +341,7 @@ /> - diff --git a/windows/c++/examples/createtest/createtest.vcproj b/windows/c++/examples/createtest/createtest.vcproj index 2395fbe..422872a 100644 --- a/windows/c++/examples/createtest/createtest.vcproj +++ b/windows/c++/examples/createtest/createtest.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -235,7 +234,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -253,7 +252,7 @@ /> - @@ -329,7 +327,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -347,7 +345,7 @@ /> - diff --git a/windows/c++/examples/createtestdll/createtestdll.vcproj b/windows/c++/examples/createtestdll/createtestdll.vcproj index c6c2fc0..1ec1669 100644 --- a/windows/c++/examples/createtestdll/createtestdll.vcproj +++ b/windows/c++/examples/createtestdll/createtestdll.vcproj @@ -1,9 +1,10 @@ - - - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HDF5CPP_USEDLL" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;HDF5CPP_USEDLL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/c++/examples/extend_dstest/extend_dstest.vcproj b/windows/c++/examples/extend_dstest/extend_dstest.vcproj index faa82a7..ac72191 100644 --- a/windows/c++/examples/extend_dstest/extend_dstest.vcproj +++ b/windows/c++/examples/extend_dstest/extend_dstest.vcproj @@ -1,9 +1,10 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -234,7 +233,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -252,7 +251,7 @@ /> - @@ -328,7 +326,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -346,7 +344,7 @@ /> - diff --git a/windows/c++/examples/extend_dstestdll/extend_dstestdll.vcproj b/windows/c++/examples/extend_dstestdll/extend_dstestdll.vcproj index 0233322..7862d48 100644 --- a/windows/c++/examples/extend_dstestdll/extend_dstestdll.vcproj +++ b/windows/c++/examples/extend_dstestdll/extend_dstestdll.vcproj @@ -1,9 +1,10 @@ - - - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HDF5CPP_USEDLL" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;HDF5CPP_USEDLL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/c++/examples/h5grouptest/h5grouptest.vcproj b/windows/c++/examples/h5grouptest/h5grouptest.vcproj index 66c4014..39a19b6 100644 --- a/windows/c++/examples/h5grouptest/h5grouptest.vcproj +++ b/windows/c++/examples/h5grouptest/h5grouptest.vcproj @@ -1,9 +1,10 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -234,7 +233,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -252,7 +251,7 @@ /> - @@ -328,7 +326,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -346,7 +344,7 @@ /> - diff --git a/windows/c++/examples/h5grouptestdll/h5grouptestdll.vcproj b/windows/c++/examples/h5grouptestdll/h5grouptestdll.vcproj index 8e87550..ceb3f4f 100644 --- a/windows/c++/examples/h5grouptestdll/h5grouptestdll.vcproj +++ b/windows/c++/examples/h5grouptestdll/h5grouptestdll.vcproj @@ -1,9 +1,10 @@ - - - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HDF5CPP_USEDLL" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;HDF5CPP_USEDLL" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -343,7 +341,7 @@ /> - diff --git a/windows/c++/examples/readdatatest/readdatatest.vcproj b/windows/c++/examples/readdatatest/readdatatest.vcproj index dc575d5..950a176 100644 --- a/windows/c++/examples/readdatatest/readdatatest.vcproj +++ b/windows/c++/examples/readdatatest/readdatatest.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -235,7 +234,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -253,7 +252,7 @@ /> - @@ -329,7 +327,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -347,7 +345,7 @@ /> - diff --git a/windows/c++/examples/readdatatestdll/readdatatestdll.vcproj b/windows/c++/examples/readdatatestdll/readdatatestdll.vcproj index 9da9b53..d8db725 100644 --- a/windows/c++/examples/readdatatestdll/readdatatestdll.vcproj +++ b/windows/c++/examples/readdatatestdll/readdatatestdll.vcproj @@ -1,9 +1,10 @@ - - - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HDF5CPP_USEDLL" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;HDF5CPP_USEDLL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/c++/examples/writedatatest/writedatatest.vcproj b/windows/c++/examples/writedatatest/writedatatest.vcproj index fac0c1c..7c6c79f 100644 --- a/windows/c++/examples/writedatatest/writedatatest.vcproj +++ b/windows/c++/examples/writedatatest/writedatatest.vcproj @@ -1,10 +1,11 @@ - @@ -143,7 +143,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -161,7 +161,7 @@ /> - @@ -235,7 +234,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -253,7 +252,7 @@ /> - @@ -329,7 +327,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -347,7 +345,7 @@ /> - diff --git a/windows/c++/examples/writedatatestdll/writedatatestdll.vcproj b/windows/c++/examples/writedatatestdll/writedatatestdll.vcproj index 0803e35..f398eca 100644 --- a/windows/c++/examples/writedatatestdll/writedatatestdll.vcproj +++ b/windows/c++/examples/writedatatestdll/writedatatestdll.vcproj @@ -1,9 +1,10 @@ - - - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\c++\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HDF5CPP_USEDLL" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;HDF5CPP_USEDLL" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -343,7 +341,7 @@ /> - diff --git a/windows/c++/test/H5srcdir_str.h b/windows/c++/test/H5srcdir_str.h new file mode 100644 index 0000000..4d32264 --- /dev/null +++ b/windows/c++/test/H5srcdir_str.h @@ -0,0 +1,22 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* If you are reading this file and it has a '.h' suffix, it was automatically + * generated from the '.in' version. Make changes there. + */ + +/* Set the 'srcdir' path from configure time */ +static const char *config_srcdir = "."; + diff --git a/windows/c++/test/checkcpptests.bat b/windows/c++/test/checkcpptests.bat index 93ccd2b..285210d 100644 --- a/windows/c++/test/checkcpptests.bat +++ b/windows/c++/test/checkcpptests.bat @@ -82,7 +82,6 @@ rem Also make sure to add *.bat to batch scripts, as the above functions rely rem on it for sending parameters. --SJW 9/6/07 :main - call :add_test dsets_cpp%2 .\dsets_cpp%2\%1 call :add_test testhdf5_cpp%2 .\testhdf5_cpp%2\%1 diff --git a/windows/c++/test/dsets_cpp/dsets_cpp.vcproj b/windows/c++/test/dsets_cpp/dsets_cpp.vcproj deleted file mode 100644 index 7ecf8aa..0000000 --- a/windows/c++/test/dsets_cpp/dsets_cpp.vcproj +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/windows/c++/test/dsets_cppdll/dsets_cppdll.vcproj b/windows/c++/test/dsets_cppdll/dsets_cppdll.vcproj deleted file mode 100644 index 7d6c37b..0000000 --- a/windows/c++/test/dsets_cppdll/dsets_cppdll.vcproj +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/windows/c++/test/testhdf5_cpp/testhdf5_cpp.vcproj b/windows/c++/test/testhdf5_cpp/testhdf5_cpp.vcproj index 0d872af..48dda8f 100644 --- a/windows/c++/test/testhdf5_cpp/testhdf5_cpp.vcproj +++ b/windows/c++/test/testhdf5_cpp/testhdf5_cpp.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\c++\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\c++\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\c++\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - @@ -396,6 +393,10 @@ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" > + + diff --git a/windows/c++/test/testhdf5_cppdll/testhdf5_cppdll.vcproj b/windows/c++/test/testhdf5_cppdll/testhdf5_cppdll.vcproj index 4ceef84..183229d 100644 --- a/windows/c++/test/testhdf5_cppdll/testhdf5_cppdll.vcproj +++ b/windows/c++/test/testhdf5_cppdll/testhdf5_cppdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\c++\src" - PreprocessorDefinitions="HDF5CPP_USEDLL;WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;HDF5CPP_USEDLL;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\c++\src" - PreprocessorDefinitions="HDF5CPP_USEDLL;WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;HDF5CPP_USEDLL;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\c++\src" - PreprocessorDefinitions="HDF5CPP_USEDLL;WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;HDF5CPP_USEDLL;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - @@ -396,6 +393,10 @@ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" > + + diff --git a/windows/copy_hdf.bat b/windows/copy_hdf.bat index 63ca620..d6a368d 100755 --- a/windows/copy_hdf.bat +++ b/windows/copy_hdf.bat @@ -21,10 +21,9 @@ rem Last Update : November 17, 2007 by Scott Wegner pushd %~dp0 -copy /y src\H5pubconf.h ..\src > nul -copy /y fortran\src\H5f90i_gen.h ..\fortran\src > nul copy /y fortran\src\H5fortran_types.f90 ..\fortran\src > nul xcopy /s /i /y *.bat ..\ > nul +xcopy /s /i /y *.h ..\ > nul copy /y examples\testExamples_exp_output.txt ..\examples > nul popd diff --git a/windows/examples/allexamples/allexamples.sln b/windows/examples/allexamples/allexamples.sln index 3bcbc49..725f39d 100644 --- a/windows/examples/allexamples/allexamples.sln +++ b/windows/examples/allexamples/allexamples.sln @@ -1,5 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allexamples", "allexamples.vcproj", "{DF83A474-3C92-4797-A23F-E02645ABD405}" ProjectSection(ProjectDependencies) = postProject {52C50A0D-21CB-48DE-AB3C-1E67B18BCC1F} = {52C50A0D-21CB-48DE-AB3C-1E67B18BCC1F} diff --git a/windows/examples/allexamples/allexamples.vcproj b/windows/examples/allexamples/allexamples.vcproj index d426da9..71d0a29 100644 --- a/windows/examples/allexamples/allexamples.vcproj +++ b/windows/examples/allexamples/allexamples.vcproj @@ -1,10 +1,11 @@ - - - - - - - - - - - - - - @@ -122,75 +60,12 @@ Name="VCCustomBuildTool" /> - - - - - - - - - - - - - - @@ -211,74 +86,12 @@ Name="VCCustomBuildTool" /> - - - - - - - - - - - - - - @@ -299,74 +112,12 @@ Name="VCCustomBuildTool" /> - - - - - - - - - - - - - - @@ -375,6 +126,4 @@ - - diff --git a/windows/examples/attributetest/attributetest.vcproj b/windows/examples/attributetest/attributetest.vcproj index 97ba744..ea4c49d 100644 --- a/windows/examples/attributetest/attributetest.vcproj +++ b/windows/examples/attributetest/attributetest.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/attributest/Debug/attributetest.pch" @@ -157,7 +157,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/examples/attributetestdll/attributetestdll.vcproj b/windows/examples/attributetestdll/attributetestdll.vcproj index 16c3867..8724c2f 100644 --- a/windows/examples/attributetestdll/attributetestdll.vcproj +++ b/windows/examples/attributetestdll/attributetestdll.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/examples/chunkread/chunkread.vcproj b/windows/examples/chunkread/chunkread.vcproj index e569f4e..634a5cf 100644 --- a/windows/examples/chunkread/chunkread.vcproj +++ b/windows/examples/chunkread/chunkread.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -232,7 +231,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/chunkread/Debug/chunkread.pch" @@ -249,7 +248,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/chunkread/Debug/chunkread.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/examples/chunkreaddll/chunkreaddll.vcproj b/windows/examples/chunkreaddll/chunkreaddll.vcproj index fa6fecc..e507074 100644 --- a/windows/examples/chunkreaddll/chunkreaddll.vcproj +++ b/windows/examples/chunkreaddll/chunkreaddll.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -232,7 +231,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -343,7 +341,7 @@ /> - diff --git a/windows/examples/compoundtest/compoundtest.vcproj b/windows/examples/compoundtest/compoundtest.vcproj index f346fd1..c60684f 100644 --- a/windows/examples/compoundtest/compoundtest.vcproj +++ b/windows/examples/compoundtest/compoundtest.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -232,7 +231,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/compoundtest/Debug/compoundtest.pch" @@ -249,7 +248,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/compoundtest/Debug/compoundtest.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/examples/compoundtestdll/compoundtestdll.vcproj b/windows/examples/compoundtestdll/compoundtestdll.vcproj index 60879a8..dcafba2 100644 --- a/windows/examples/compoundtestdll/compoundtestdll.vcproj +++ b/windows/examples/compoundtestdll/compoundtestdll.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -232,7 +231,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -343,7 +341,7 @@ /> - diff --git a/windows/examples/extendwritetest/extendwritetest.vcproj b/windows/examples/extendwritetest/extendwritetest.vcproj index 0a6c711..e162798 100644 --- a/windows/examples/extendwritetest/extendwritetest.vcproj +++ b/windows/examples/extendwritetest/extendwritetest.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/extendwritetest/Debug/extendwritetest.pch" @@ -157,7 +157,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/examples/extendwritetestdll/extendwritetestdll.vcproj b/windows/examples/extendwritetestdll/extendwritetestdll.vcproj index e071136..d33b44c 100644 --- a/windows/examples/extendwritetestdll/extendwritetestdll.vcproj +++ b/windows/examples/extendwritetestdll/extendwritetestdll.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -232,7 +231,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -343,7 +341,7 @@ /> - diff --git a/windows/examples/grouptest/grouptest.vcproj b/windows/examples/grouptest/grouptest.vcproj index 3d45dc5..c6c48a3 100644 --- a/windows/examples/grouptest/grouptest.vcproj +++ b/windows/examples/grouptest/grouptest.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/grouptest/Debug/grouptest.pch" @@ -157,7 +157,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/examples/grouptestdll/grouptestdll.vcproj b/windows/examples/grouptestdll/grouptestdll.vcproj index 8984767..12fd581 100644 --- a/windows/examples/grouptestdll/grouptestdll.vcproj +++ b/windows/examples/grouptestdll/grouptestdll.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/examples/intermgrouptest/intermgrouptest.vcproj b/windows/examples/intermgrouptest/intermgrouptest.vcproj index f44db41..b79063c 100644 --- a/windows/examples/intermgrouptest/intermgrouptest.vcproj +++ b/windows/examples/intermgrouptest/intermgrouptest.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -235,7 +234,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -253,7 +252,7 @@ /> - @@ -328,7 +326,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -346,7 +344,7 @@ /> - diff --git a/windows/examples/intermgrouptestdll/intermgrouptestdll.vcproj b/windows/examples/intermgrouptestdll/intermgrouptestdll.vcproj index f6c2b6f..1874cd8 100644 --- a/windows/examples/intermgrouptestdll/intermgrouptestdll.vcproj +++ b/windows/examples/intermgrouptestdll/intermgrouptestdll.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/examples/readtest/readtest.vcproj b/windows/examples/readtest/readtest.vcproj index 488c4e3..3d6e620 100644 --- a/windows/examples/readtest/readtest.vcproj +++ b/windows/examples/readtest/readtest.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/readtest/Debug/readtest.pch" @@ -157,7 +157,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/examples/readtestdll/readtestdll.vcproj b/windows/examples/readtestdll/readtestdll.vcproj index ce76191..4cabe25 100644 --- a/windows/examples/readtestdll/readtestdll.vcproj +++ b/windows/examples/readtestdll/readtestdll.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -232,7 +231,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -343,7 +341,7 @@ /> - diff --git a/windows/examples/selectest/selectest.vcproj b/windows/examples/selectest/selectest.vcproj index 58ea0bb..4c3f504 100644 --- a/windows/examples/selectest/selectest.vcproj +++ b/windows/examples/selectest/selectest.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/selectest/Debug/selectest.pch" @@ -157,7 +157,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/examples/selectestdll/selectestdll.vcproj b/windows/examples/selectestdll/selectestdll.vcproj index 9c8355d..2264a36 100644 --- a/windows/examples/selectestdll/selectestdll.vcproj +++ b/windows/examples/selectestdll/selectestdll.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -232,7 +231,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -343,7 +341,7 @@ /> - diff --git a/windows/examples/writetest/writetest.vcproj b/windows/examples/writetest/writetest.vcproj index bf25cd2..20194f6 100644 --- a/windows/examples/writetest/writetest.vcproj +++ b/windows/examples/writetest/writetest.vcproj @@ -1,9 +1,10 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -232,7 +231,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/writetest/Debug/writetest.pch" @@ -249,7 +248,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../examples/writetest/Debug/writetest.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/examples/writetestdll/writetestdll.vcproj b/windows/examples/writetestdll/writetestdll.vcproj index 54b7149..3661a12 100644 --- a/windows/examples/writetestdll/writetestdll.vcproj +++ b/windows/examples/writetestdll/writetestdll.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/fortran/examples/allf90examples/allf90examples.sln b/windows/fortran/examples/allf90examples/allf90examples.sln index d2cf985..e488eae 100644 --- a/windows/fortran/examples/allf90examples/allf90examples.sln +++ b/windows/fortran/examples/allf90examples/allf90examples.sln @@ -1,5 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allf90examples", "allf90examples.vcproj", "{D493CF06-423A-4FA5-8B3F-416C2EDAFF2B}" ProjectSection(ProjectDependencies) = postProject {4F759F00-49B0-4D26-8BC7-D5D8F46449DA} = {4F759F00-49B0-4D26-8BC7-D5D8F46449DA} diff --git a/windows/fortran/examples/allf90examples/allf90examples.vcproj b/windows/fortran/examples/allf90examples/allf90examples.vcproj index 48a1b7e..db9a621 100644 --- a/windows/fortran/examples/allf90examples/allf90examples.vcproj +++ b/windows/fortran/examples/allf90examples/allf90examples.vcproj @@ -1,10 +1,11 @@ - - diff --git a/windows/fortran/test/libtest_cstubdll/libtest_cstubdll.vcproj b/windows/fortran/test/libtest_cstubdll/libtest_cstubdll.vcproj index 4e9b47f..2fdf67e 100644 --- a/windows/fortran/test/libtest_cstubdll/libtest_cstubdll.vcproj +++ b/windows/fortran/test/libtest_cstubdll/libtest_cstubdll.vcproj @@ -1,10 +1,11 @@ @@ -105,9 +108,6 @@ Name="VCAppVerifierTool" /> - @@ -135,7 +135,7 @@ /> @@ -199,9 +201,6 @@ Name="VCAppVerifierTool" /> - @@ -229,7 +228,7 @@ /> @@ -293,9 +294,6 @@ Name="VCAppVerifierTool" /> - @@ -323,7 +321,7 @@ /> @@ -387,9 +387,6 @@ Name="VCAppVerifierTool" /> - diff --git a/windows/fortran/test/libtest_fortran/libtest_cstub.vcproj b/windows/fortran/test/libtest_fortran/libtest_cstub.vcproj index bc4d8cd..7517148 100644 --- a/windows/fortran/test/libtest_fortran/libtest_cstub.vcproj +++ b/windows/fortran/test/libtest_fortran/libtest_cstub.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\..\hl\c++\src,..\..\..\..\..\hl\src,..\..\..\..\..\src,..\..\..\..\..\c++\src,..\..\..\..\..\test,..\..\..\..\..\hl\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\..\hl\c++\src,..\..\..\..\..\hl\src,..\..\..\..\..\src,..\..\..\..\..\c++\src,..\..\..\..\..\test,..\..\..\..\..\hl\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\..\hl\c++\src,..\..\..\..\..\hl\src,..\..\..\..\..\src,..\..\..\..\..\c++\src,..\..\..\..\..\test,..\..\..\..\..\hl\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/hl/c++/test/hl_test_table_cppdll/hl_test_table_cppdll.vcproj b/windows/hl/c++/test/hl_test_table_cppdll/hl_test_table_cppdll.vcproj index 883ce59..3175649 100644 --- a/windows/hl/c++/test/hl_test_table_cppdll/hl_test_table_cppdll.vcproj +++ b/windows/hl/c++/test/hl_test_table_cppdll/hl_test_table_cppdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\..\hl\c++\src,..\..\..\..\..\hl\src,..\..\..\..\..\src,..\..\..\..\..\c++\src,..\..\..\..\..\test,..\..\..\..\..\hl\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEHLDLL_;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEHLDLL_;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\..\hl\c++\src,..\..\..\..\..\hl\src,..\..\..\..\..\c++\src,..\..\..\..\..\src,..\..\..\..\..\test,..\..\..\..\..\hl\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HDF5USE_HLCPPDLL;_HDF5USEHLDLL_;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;HDF5USE_HLCPPDLL;_HDF5USEHLDLL_;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -323,7 +321,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\..\hl\c++\src,..\..\..\..\..\hl\src,..\..\..\..\..\c++\src,..\..\..\..\..\src,..\..\..\..\..\test,..\..\..\..\..\hl\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HDF5USE_HLCPPDLL;_HDF5USEHLDLL_;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;HDF5USE_HLCPPDLL;_HDF5USEHLDLL_;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -341,7 +339,7 @@ /> - diff --git a/windows/hl/examples/allhlcexamples/allhlcexamples.sln b/windows/hl/examples/allhlcexamples/allhlcexamples.sln index 95c9bcc..90b0ab5 100644 --- a/windows/hl/examples/allhlcexamples/allhlcexamples.sln +++ b/windows/hl/examples/allhlcexamples/allhlcexamples.sln @@ -1,5 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allhlcexamples", "allhlcexamples.vcproj", "{5CAEEA27-2611-4398-8E10-BF58CA42F3F3}" ProjectSection(ProjectDependencies) = postProject {25DC2207-299D-4272-9530-B126539BE0E9} = {25DC2207-299D-4272-9530-B126539BE0E9} diff --git a/windows/hl/examples/allhlcexamples/allhlcexamples.vcproj b/windows/hl/examples/allhlcexamples/allhlcexamples.vcproj index 3c2650e..da0459e 100644 --- a/windows/hl/examples/allhlcexamples/allhlcexamples.vcproj +++ b/windows/hl/examples/allhlcexamples/allhlcexamples.vcproj @@ -1,10 +1,11 @@ - - diff --git a/windows/hl/examples/ex_ds1/ex_ds1.vcproj b/windows/hl/examples/ex_ds1/ex_ds1.vcproj index fc86153..b63bcf5 100644 --- a/windows/hl/examples/ex_ds1/ex_ds1.vcproj +++ b/windows/hl/examples/ex_ds1/ex_ds1.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/hl/examples/ex_ds1dll/ex_ds1dll.vcproj b/windows/hl/examples/ex_ds1dll/ex_ds1dll.vcproj index ba345ce..d728554 100644 --- a/windows/hl/examples/ex_ds1dll/ex_ds1dll.vcproj +++ b/windows/hl/examples/ex_ds1dll/ex_ds1dll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/hl/examples/ex_image1/ex_image1.vcproj b/windows/hl/examples/ex_image1/ex_image1.vcproj index 2c0c393..d253b3d 100644 --- a/windows/hl/examples/ex_image1/ex_image1.vcproj +++ b/windows/hl/examples/ex_image1/ex_image1.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/hl/examples/ex_image1dll/ex_image1dll.vcproj b/windows/hl/examples/ex_image1dll/ex_image1dll.vcproj index 6d1f32a..cfcf29a 100644 --- a/windows/hl/examples/ex_image1dll/ex_image1dll.vcproj +++ b/windows/hl/examples/ex_image1dll/ex_image1dll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/hl/examples/ex_image2/ex_image2.vcproj b/windows/hl/examples/ex_image2/ex_image2.vcproj index dddd0e6..c69971f 100644 --- a/windows/hl/examples/ex_image2/ex_image2.vcproj +++ b/windows/hl/examples/ex_image2/ex_image2.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_image2dll/ex_image2dll.vcproj b/windows/hl/examples/ex_image2dll/ex_image2dll.vcproj index faa81c4..b17d36f 100644 --- a/windows/hl/examples/ex_image2dll/ex_image2dll.vcproj +++ b/windows/hl/examples/ex_image2dll/ex_image2dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_lite1/ex_lite1.vcproj b/windows/hl/examples/ex_lite1/ex_lite1.vcproj index fe3d458..26864e4 100644 --- a/windows/hl/examples/ex_lite1/ex_lite1.vcproj +++ b/windows/hl/examples/ex_lite1/ex_lite1.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/hl/examples/ex_lite1dll/ex_lite1dll.vcproj b/windows/hl/examples/ex_lite1dll/ex_lite1dll.vcproj index a1d744f..4b6b00f 100644 --- a/windows/hl/examples/ex_lite1dll/ex_lite1dll.vcproj +++ b/windows/hl/examples/ex_lite1dll/ex_lite1dll.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/hl/examples/ex_lite2/ex_lite2.vcproj b/windows/hl/examples/ex_lite2/ex_lite2.vcproj index 76a375e..8662fe8 100644 --- a/windows/hl/examples/ex_lite2/ex_lite2.vcproj +++ b/windows/hl/examples/ex_lite2/ex_lite2.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_lite2dll/ex_lite2dll.vcproj b/windows/hl/examples/ex_lite2dll/ex_lite2dll.vcproj index 21ffe5e..cff4c29 100644 --- a/windows/hl/examples/ex_lite2dll/ex_lite2dll.vcproj +++ b/windows/hl/examples/ex_lite2dll/ex_lite2dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_lite3/ex_lite3.vcproj b/windows/hl/examples/ex_lite3/ex_lite3.vcproj index 5036dec..065dae2 100644 --- a/windows/hl/examples/ex_lite3/ex_lite3.vcproj +++ b/windows/hl/examples/ex_lite3/ex_lite3.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_lite3dll/ex_lite3dll.vcproj b/windows/hl/examples/ex_lite3dll/ex_lite3dll.vcproj index edf798f..42b5a9b 100644 --- a/windows/hl/examples/ex_lite3dll/ex_lite3dll.vcproj +++ b/windows/hl/examples/ex_lite3dll/ex_lite3dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table01/ex_table01.vcproj b/windows/hl/examples/ex_table01/ex_table01.vcproj index f5cf779..71826e8 100644 --- a/windows/hl/examples/ex_table01/ex_table01.vcproj +++ b/windows/hl/examples/ex_table01/ex_table01.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/hl/examples/ex_table01dll/ex_table01dll.vcproj b/windows/hl/examples/ex_table01dll/ex_table01dll.vcproj index a70e5c4..a7790f4 100644 --- a/windows/hl/examples/ex_table01dll/ex_table01dll.vcproj +++ b/windows/hl/examples/ex_table01dll/ex_table01dll.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/hl/examples/ex_table02/ex_table02.vcproj b/windows/hl/examples/ex_table02/ex_table02.vcproj index 93bdb6a..6196b1a 100644 --- a/windows/hl/examples/ex_table02/ex_table02.vcproj +++ b/windows/hl/examples/ex_table02/ex_table02.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table02dll/ex_table02dll.vcproj b/windows/hl/examples/ex_table02dll/ex_table02dll.vcproj index 1b6196b..c9f185d 100644 --- a/windows/hl/examples/ex_table02dll/ex_table02dll.vcproj +++ b/windows/hl/examples/ex_table02dll/ex_table02dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table03/ex_table03.vcproj b/windows/hl/examples/ex_table03/ex_table03.vcproj index 479962e..27654bf 100644 --- a/windows/hl/examples/ex_table03/ex_table03.vcproj +++ b/windows/hl/examples/ex_table03/ex_table03.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table03dll/ex_table03dll.vcproj b/windows/hl/examples/ex_table03dll/ex_table03dll.vcproj index ec9f6e1..127f16f 100644 --- a/windows/hl/examples/ex_table03dll/ex_table03dll.vcproj +++ b/windows/hl/examples/ex_table03dll/ex_table03dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table04/ex_table04.vcproj b/windows/hl/examples/ex_table04/ex_table04.vcproj index be52c35..748aa82 100644 --- a/windows/hl/examples/ex_table04/ex_table04.vcproj +++ b/windows/hl/examples/ex_table04/ex_table04.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table04dll/ex_table04dll.vcproj b/windows/hl/examples/ex_table04dll/ex_table04dll.vcproj index 00bd577..575989a 100644 --- a/windows/hl/examples/ex_table04dll/ex_table04dll.vcproj +++ b/windows/hl/examples/ex_table04dll/ex_table04dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table05/ex_table05.vcproj b/windows/hl/examples/ex_table05/ex_table05.vcproj index a8e46fc..55fe6a0 100644 --- a/windows/hl/examples/ex_table05/ex_table05.vcproj +++ b/windows/hl/examples/ex_table05/ex_table05.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table05dll/ex_table05dll.vcproj b/windows/hl/examples/ex_table05dll/ex_table05dll.vcproj index ce756c3..1104d4c 100644 --- a/windows/hl/examples/ex_table05dll/ex_table05dll.vcproj +++ b/windows/hl/examples/ex_table05dll/ex_table05dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table06/ex_table06.vcproj b/windows/hl/examples/ex_table06/ex_table06.vcproj index 7d01c8f..c08a2f4 100644 --- a/windows/hl/examples/ex_table06/ex_table06.vcproj +++ b/windows/hl/examples/ex_table06/ex_table06.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table06dll/ex_table06dll.vcproj b/windows/hl/examples/ex_table06dll/ex_table06dll.vcproj index d719a51..a3a83a4 100644 --- a/windows/hl/examples/ex_table06dll/ex_table06dll.vcproj +++ b/windows/hl/examples/ex_table06dll/ex_table06dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table07/ex_table07.vcproj b/windows/hl/examples/ex_table07/ex_table07.vcproj index e026baa..0c3cb2f 100644 --- a/windows/hl/examples/ex_table07/ex_table07.vcproj +++ b/windows/hl/examples/ex_table07/ex_table07.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table07dll/ex_table07dll.vcproj b/windows/hl/examples/ex_table07dll/ex_table07dll.vcproj index 7b55b47..3554428 100644 --- a/windows/hl/examples/ex_table07dll/ex_table07dll.vcproj +++ b/windows/hl/examples/ex_table07dll/ex_table07dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table08/ex_table08.vcproj b/windows/hl/examples/ex_table08/ex_table08.vcproj index 9389a03..f91a4d5 100644 --- a/windows/hl/examples/ex_table08/ex_table08.vcproj +++ b/windows/hl/examples/ex_table08/ex_table08.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table08dll/ex_table08dll.vcproj b/windows/hl/examples/ex_table08dll/ex_table08dll.vcproj index 2fe20d5..242a08c 100644 --- a/windows/hl/examples/ex_table08dll/ex_table08dll.vcproj +++ b/windows/hl/examples/ex_table08dll/ex_table08dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table09/ex_table09.vcproj b/windows/hl/examples/ex_table09/ex_table09.vcproj index bbb2d0f..61d1610 100644 --- a/windows/hl/examples/ex_table09/ex_table09.vcproj +++ b/windows/hl/examples/ex_table09/ex_table09.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table09dll/ex_table09dll.vcproj b/windows/hl/examples/ex_table09dll/ex_table09dll.vcproj index 3ea9214..06205c7 100644 --- a/windows/hl/examples/ex_table09dll/ex_table09dll.vcproj +++ b/windows/hl/examples/ex_table09dll/ex_table09dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table10/ex_table10.vcproj b/windows/hl/examples/ex_table10/ex_table10.vcproj index 65f0075..2f89023 100644 --- a/windows/hl/examples/ex_table10/ex_table10.vcproj +++ b/windows/hl/examples/ex_table10/ex_table10.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table10dll/ex_table10dll.vcproj b/windows/hl/examples/ex_table10dll/ex_table10dll.vcproj index 7027235..d15647e 100644 --- a/windows/hl/examples/ex_table10dll/ex_table10dll.vcproj +++ b/windows/hl/examples/ex_table10dll/ex_table10dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table11/ex_table11.vcproj b/windows/hl/examples/ex_table11/ex_table11.vcproj index f84cd1e..6b5bf6a 100644 --- a/windows/hl/examples/ex_table11/ex_table11.vcproj +++ b/windows/hl/examples/ex_table11/ex_table11.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table11dll/ex_table11dll.vcproj b/windows/hl/examples/ex_table11dll/ex_table11dll.vcproj index c0995dc..a004218 100644 --- a/windows/hl/examples/ex_table11dll/ex_table11dll.vcproj +++ b/windows/hl/examples/ex_table11dll/ex_table11dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table12/ex_table12.vcproj b/windows/hl/examples/ex_table12/ex_table12.vcproj index 660eedb..14272d7 100644 --- a/windows/hl/examples/ex_table12/ex_table12.vcproj +++ b/windows/hl/examples/ex_table12/ex_table12.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ex_table12dll/ex_table12dll.vcproj b/windows/hl/examples/ex_table12dll/ex_table12dll.vcproj index 44c77b5..8107a40 100644 --- a/windows/hl/examples/ex_table12dll/ex_table12dll.vcproj +++ b/windows/hl/examples/ex_table12dll/ex_table12dll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ptExampleFL/ptExampleFL.vcproj b/windows/hl/examples/ptExampleFL/ptExampleFL.vcproj index 8dad97f..2bb3d4f 100644 --- a/windows/hl/examples/ptExampleFL/ptExampleFL.vcproj +++ b/windows/hl/examples/ptExampleFL/ptExampleFL.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/hl/examples/ptExampleFLdll/ptExampleFLdll.vcproj b/windows/hl/examples/ptExampleFLdll/ptExampleFLdll.vcproj index 37f73df..b783dca 100644 --- a/windows/hl/examples/ptExampleFLdll/ptExampleFLdll.vcproj +++ b/windows/hl/examples/ptExampleFLdll/ptExampleFLdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\debug\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hdf5lib\release\include,..\..\..\..\hl\src,..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/hl/examples/ptExampleVL/ptExampleVL.vcproj b/windows/hl/examples/ptExampleVL/ptExampleVL.vcproj index 6b2592c..8fc7b0d 100644 --- a/windows/hl/examples/ptExampleVL/ptExampleVL.vcproj +++ b/windows/hl/examples/ptExampleVL/ptExampleVL.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\lib;..\..\..\..\proj\hdf5\debug;..\..\..\..\proj\hdf5_hl\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/examples/ptExampleVLdll/ptExampleVLdll.vcproj b/windows/hl/examples/ptExampleVLdll/ptExampleVLdll.vcproj index 5512f62..04277b9 100644 --- a/windows/hl/examples/ptExampleVLdll/ptExampleVLdll.vcproj +++ b/windows/hl/examples/ptExampleVLdll/ptExampleVLdll.vcproj @@ -1,11 +1,12 @@ - @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src;..\..\..\..\hl\src;..\..\..\..\hdf5lib\debug\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ AdditionalLibraryDirectories="..\..\..\..\hdf5lib\debug\dll;..\..\..\..\proj\hdf5dll\debug;..\..\..\..\proj\hdf5_hldll\debug" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -201,7 +200,7 @@ - @@ -280,7 +278,7 @@ - diff --git a/windows/hl/fortran/examples/allhlf90examples/allhlf90examples.sln b/windows/hl/fortran/examples/allhlf90examples/allhlf90examples.sln index 4a173e4..139fb49 100644 --- a/windows/hl/fortran/examples/allhlf90examples/allhlf90examples.sln +++ b/windows/hl/fortran/examples/allhlf90examples/allhlf90examples.sln @@ -1,5 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allhlf90examples", "allhlf90examples.vcproj", "{64F43EAB-0F7D-4D4F-B01D-52C698C97FDF}" ProjectSection(ProjectDependencies) = postProject {7B837653-CEF4-4B2D-8EB8-29ECC4A1F042} = {7B837653-CEF4-4B2D-8EB8-29ECC4A1F042} diff --git a/windows/hl/fortran/examples/allhlf90examples/allhlf90examples.vcproj b/windows/hl/fortran/examples/allhlf90examples/allhlf90examples.vcproj index bfb987b..60a4756 100644 --- a/windows/hl/fortran/examples/allhlf90examples/allhlf90examples.vcproj +++ b/windows/hl/fortran/examples/allhlf90examples/allhlf90examples.vcproj @@ -1,11 +1,12 @@ - - diff --git a/windows/hl/test/H5srcdir_str.h b/windows/hl/test/H5srcdir_str.h new file mode 100644 index 0000000..4d32264 --- /dev/null +++ b/windows/hl/test/H5srcdir_str.h @@ -0,0 +1,22 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* If you are reading this file and it has a '.h' suffix, it was automatically + * generated from the '.in' version. Make changes there. + */ + +/* Set the 'srcdir' path from configure time */ +static const char *config_srcdir = "."; + diff --git a/windows/hl/test/hl_test_ds/hl_test_ds.vcproj b/windows/hl/test/hl_test_ds/hl_test_ds.vcproj index 25854e3..1c8aa7b 100644 --- a/windows/hl/test/hl_test_ds/hl_test_ds.vcproj +++ b/windows/hl/test/hl_test_ds/hl_test_ds.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/hl/test/hl_test_dsdll/hl_test_dsdll.vcproj b/windows/hl/test/hl_test_dsdll/hl_test_dsdll.vcproj index 600da2a..6093600 100644 --- a/windows/hl/test/hl_test_dsdll/hl_test_dsdll.vcproj +++ b/windows/hl/test/hl_test_dsdll/hl_test_dsdll.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/hl/test/hl_test_image/hl_test_image.vcproj b/windows/hl/test/hl_test_image/hl_test_image.vcproj index e3b0ac5..2f01f6c 100644 --- a/windows/hl/test/hl_test_image/hl_test_image.vcproj +++ b/windows/hl/test/hl_test_image/hl_test_image.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/hl/test/hl_test_imagedll/hl_test_imagedll.vcproj b/windows/hl/test/hl_test_imagedll/hl_test_imagedll.vcproj index e6e7f6c..111bc6d 100644 --- a/windows/hl/test/hl_test_imagedll/hl_test_imagedll.vcproj +++ b/windows/hl/test/hl_test_imagedll/hl_test_imagedll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/hl/test/hl_test_lite/hl_test_lite.vcproj b/windows/hl/test/hl_test_lite/hl_test_lite.vcproj index 8841f65..0de34b5 100644 --- a/windows/hl/test/hl_test_lite/hl_test_lite.vcproj +++ b/windows/hl/test/hl_test_lite/hl_test_lite.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -324,7 +322,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -342,7 +340,7 @@ /> - diff --git a/windows/hl/test/hl_test_litedll/hl_test_litedll.vcproj b/windows/hl/test/hl_test_litedll/hl_test_litedll.vcproj index 5074d2d..03425ff 100644 --- a/windows/hl/test/hl_test_litedll/hl_test_litedll.vcproj +++ b/windows/hl/test/hl_test_litedll/hl_test_litedll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -323,7 +321,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -341,7 +339,7 @@ /> - diff --git a/windows/hl/test/hl_test_packet/hl_test_packet.vcproj b/windows/hl/test/hl_test_packet/hl_test_packet.vcproj index 71e45de..b1103f0 100644 --- a/windows/hl/test/hl_test_packet/hl_test_packet.vcproj +++ b/windows/hl/test/hl_test_packet/hl_test_packet.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -324,7 +322,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -342,7 +340,7 @@ /> - diff --git a/windows/hl/test/hl_test_packetdll/hl_test_packetdll.vcproj b/windows/hl/test/hl_test_packetdll/hl_test_packetdll.vcproj index 433e436..9da2096 100644 --- a/windows/hl/test/hl_test_packetdll/hl_test_packetdll.vcproj +++ b/windows/hl/test/hl_test_packetdll/hl_test_packetdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -323,7 +321,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -341,7 +339,7 @@ /> - diff --git a/windows/hl/test/hl_test_table/hl_test_table.vcproj b/windows/hl/test/hl_test_table/hl_test_table.vcproj index b42daa7..342d13f 100644 --- a/windows/hl/test/hl_test_table/hl_test_table.vcproj +++ b/windows/hl/test/hl_test_table/hl_test_table.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -324,7 +322,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\hl\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -342,7 +340,7 @@ /> - diff --git a/windows/hl/test/hl_test_tabledll/hl_test_tabledll.vcproj b/windows/hl/test/hl_test_tabledll/hl_test_tabledll.vcproj index c117cc4..6a4cf58 100644 --- a/windows/hl/test/hl_test_tabledll/hl_test_tabledll.vcproj +++ b/windows/hl/test/hl_test_tabledll/hl_test_tabledll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\hl\src,..\..\..\..\src,..\..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5USEHLDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/hl/tools/gifconv/gif2h5.vcproj b/windows/hl/tools/gifconv/gif2h5.vcproj index d01b269..501e88d 100644 --- a/windows/hl/tools/gifconv/gif2h5.vcproj +++ b/windows/hl/tools/gifconv/gif2h5.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/hl/tools/gifconv/h52gif.vcproj b/windows/hl/tools/gifconv/h52gif.vcproj index 3f42ed5..5ca9eed 100644 --- a/windows/hl/tools/gifconv/h52gif.vcproj +++ b/windows/hl/tools/gifconv/h52gif.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/hl/tools/gifconvdll/gif2h5dll.vcproj b/windows/hl/tools/gifconvdll/gif2h5dll.vcproj index 4b285d1..6075f68 100644 --- a/windows/hl/tools/gifconvdll/gif2h5dll.vcproj +++ b/windows/hl/tools/gifconvdll/gif2h5dll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -158,7 +158,7 @@ /> - @@ -229,7 +228,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -247,7 +246,7 @@ /> - @@ -320,7 +318,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -338,7 +336,7 @@ /> - diff --git a/windows/hl/tools/gifconvdll/h52gifdll.vcproj b/windows/hl/tools/gifconvdll/h52gifdll.vcproj index 2bef316..e269244 100644 --- a/windows/hl/tools/gifconvdll/h52gifdll.vcproj +++ b/windows/hl/tools/gifconvdll/h52gifdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -158,7 +158,7 @@ /> - @@ -229,7 +228,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -247,7 +246,7 @@ /> - @@ -320,7 +318,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib,..\..\..\..\hl\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -338,7 +336,7 @@ /> - diff --git a/windows/misc/typegen/h5libsettings/h5libsettings.vcproj b/windows/misc/typegen/h5libsettings/h5libsettings.vcproj new file mode 100644 index 0000000..0077340 --- /dev/null +++ b/windows/misc/typegen/h5libsettings/h5libsettings.vcproj @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/windows/misc/typegen/h5match_types/h5match_types.vcproj b/windows/misc/typegen/h5match_types/h5match_types.vcproj index 12d2dbc..1bad059 100644 --- a/windows/misc/typegen/h5match_types/h5match_types.vcproj +++ b/windows/misc/typegen/h5match_types/h5match_types.vcproj @@ -1,10 +1,11 @@ - - - - - - - - - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../perform/perf_serial/Debug/perf_serial.pch" @@ -157,7 +157,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/perform/perf_serialdll/perf_serialdll.vcproj b/windows/perform/perf_serialdll/perf_serialdll.vcproj index 244c758..a657ab7 100644 --- a/windows/perform/perf_serialdll/perf_serialdll.vcproj +++ b/windows/perform/perf_serialdll/perf_serialdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../perform/perf_serialdll/Debug/perf_serialdll.pch" @@ -158,7 +158,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/proj/all/all.sln b/windows/proj/all/all.sln index 8167d2b..1821f3c 100755 --- a/windows/proj/all/all.sln +++ b/windows/proj/all/all.sln @@ -1,18 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{24E5C6DF-1FA4-49AD-AE75-1D9347966CC5}" ProjectSection(ProjectDependencies) = postProject - {C4811E26-A7DA-424D-8A44-F29DFD588533} = {C4811E26-A7DA-424D-8A44-F29DFD588533} - {4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D} = {4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D} - {737F7A65-62E7-4707-B3DB-B9856131687D} = {737F7A65-62E7-4707-B3DB-B9856131687D} - {D4395435-B3B0-4937-9AC5-89BD73C47303} = {D4395435-B3B0-4937-9AC5-89BD73C47303} - {B123D196-2F43-4FEB-80B5-990F06DED319} = {B123D196-2F43-4FEB-80B5-990F06DED319} - {3C224452-C71A-4B3E-937A-891144D1941D} = {3C224452-C71A-4B3E-937A-891144D1941D} - {D6FBD436-D8B4-4FEB-A8F8-EB097CAF55CF} = {D6FBD436-D8B4-4FEB-A8F8-EB097CAF55CF} - {D6FB6925-671E-47C1-97AD-DFC6F2E3F72D} = {D6FB6925-671E-47C1-97AD-DFC6F2E3F72D} - {E3B24219-DEB9-4ECB-809C-AD98EE51974E} = {E3B24219-DEB9-4ECB-809C-AD98EE51974E} - {0C618DA2-4097-46B9-83D0-144AEB774568} = {0C618DA2-4097-46B9-83D0-144AEB774568} - {C35122F6-49FF-4AAA-A2AA-482628E5E2A7} = {C35122F6-49FF-4AAA-A2AA-482628E5E2A7} {8C6D9C00-44A9-432F-B695-F56439C1B288} = {8C6D9C00-44A9-432F-B695-F56439C1B288} {0A049202-6533-413E-89D6-5D6866AAE703} = {0A049202-6533-413E-89D6-5D6866AAE703} {6FFCE804-EF4A-468F-A174-561934C153A1} = {6FFCE804-EF4A-468F-A174-561934C153A1} @@ -28,23 +17,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{24E5C {B21CA611-6DAE-4051-8B4C-989E135711B1} = {B21CA611-6DAE-4051-8B4C-989E135711B1} {9FCBE814-3818-4F1A-975D-05BAF6FF432F} = {9FCBE814-3818-4F1A-975D-05BAF6FF432F} {52E83C17-2B68-44B5-881D-4F6338FB14C7} = {52E83C17-2B68-44B5-881D-4F6338FB14C7} + {E3B24219-DEB9-4ECB-809C-AD98EE51974E} = {E3B24219-DEB9-4ECB-809C-AD98EE51974E} {357A1E1A-D5EA-42FB-B4B1-EEB8A4B2BBF0} = {357A1E1A-D5EA-42FB-B4B1-EEB8A4B2BBF0} {D279901A-8E21-47D3-B7EA-A572EE12F2E6} = {D279901A-8E21-47D3-B7EA-A572EE12F2E6} {411D221C-9FA1-417E-8A2B-DF746F4C7E07} = {411D221C-9FA1-417E-8A2B-DF746F4C7E07} {794B7E1E-E6AD-456D-9F33-FCE317325EC4} = {794B7E1E-E6AD-456D-9F33-FCE317325EC4} {7D293021-0601-498B-91B8-C49580EFB08D} = {7D293021-0601-498B-91B8-C49580EFB08D} {BE1A0022-708E-4CC2-B01C-26BD99AB6576} = {BE1A0022-708E-4CC2-B01C-26BD99AB6576} - {802B922A-E813-438E-A180-4A8839A11A55} = {802B922A-E813-438E-A180-4A8839A11A55} + {D6FB6925-671E-47C1-97AD-DFC6F2E3F72D} = {D6FB6925-671E-47C1-97AD-DFC6F2E3F72D} + {C4811E26-A7DA-424D-8A44-F29DFD588533} = {C4811E26-A7DA-424D-8A44-F29DFD588533} {AC4C582B-B27D-4E57-A59F-6FF0E833C6E5} = {AC4C582B-B27D-4E57-A59F-6FF0E833C6E5} {2248C52C-75DC-465B-A598-6E89CC93E00D} = {2248C52C-75DC-465B-A598-6E89CC93E00D} {834DD32C-D078-441F-95F4-9CDE108B60AE} = {834DD32C-D078-441F-95F4-9CDE108B60AE} {AF696934-5004-4C1D-90C3-B434E92AFB89} = {AF696934-5004-4C1D-90C3-B434E92AFB89} {3EDEB434-F59E-4C50-8884-F0BB29845619} = {3EDEB434-F59E-4C50-8884-F0BB29845619} {69952435-F01F-46A7-B907-A78EBC864ED7} = {69952435-F01F-46A7-B907-A78EBC864ED7} + {D4395435-B3B0-4937-9AC5-89BD73C47303} = {D4395435-B3B0-4937-9AC5-89BD73C47303} {196F5935-2391-49A7-B6A2-410DF8149F0D} = {196F5935-2391-49A7-B6A2-410DF8149F0D} {E5C9E235-E10F-4F46-A94F-A112CD8D867E} = {E5C9E235-E10F-4F46-A94F-A112CD8D867E} {27CCFE35-61A5-434F-8B83-9A40AE2AE8C5} = {27CCFE35-61A5-434F-8B83-9A40AE2AE8C5} {0C5E3F36-3338-4B2C-A956-4D577B6119E7} = {0C5E3F36-3338-4B2C-A956-4D577B6119E7} + {D6FBD436-D8B4-4FEB-A8F8-EB097CAF55CF} = {D6FBD436-D8B4-4FEB-A8F8-EB097CAF55CF} {AACD0537-E8F3-4F0F-A0E6-B99C0F4EF892} = {AACD0537-E8F3-4F0F-A0E6-B99C0F4EF892} {80892339-F6CE-4E96-B61B-131095F2612D} = {80892339-F6CE-4E96-B61B-131095F2612D} {9ADAE03A-2060-471E-A7B5-9D8F6995223A} = {9ADAE03A-2060-471E-A7B5-9D8F6995223A} @@ -55,6 +48,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{24E5C {F5109F4B-5869-40A7-BC6A-8130CA4BB987} = {F5109F4B-5869-40A7-BC6A-8130CA4BB987} {9A124450-EC54-4813-B0B1-2CA96B695009} = {9A124450-EC54-4813-B0B1-2CA96B695009} {FB74E351-0C4E-4173-B0D3-10DD12F2DCA5} = {FB74E351-0C4E-4173-B0D3-10DD12F2DCA5} + {3C224452-C71A-4B3E-937A-891144D1941D} = {3C224452-C71A-4B3E-937A-891144D1941D} {37605955-FA00-41C9-9D39-D078CF270376} = {37605955-FA00-41C9-9D39-D078CF270376} {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} {57A5C559-F1BD-49F1-9B5E-13591D22FD75} = {57A5C559-F1BD-49F1-9B5E-13591D22FD75} @@ -63,10 +57,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{24E5C {5A90FD64-6EED-45E1-A147-D9FE72788570} = {5A90FD64-6EED-45E1-A147-D9FE72788570} {68A52165-E0EF-4019-B658-1AC734649955} = {68A52165-E0EF-4019-B658-1AC734649955} {BE9A4A65-F25B-4DCF-8B55-06B3D0C685CB} = {BE9A4A65-F25B-4DCF-8B55-06B3D0C685CB} + {737F7A65-62E7-4707-B3DB-B9856131687D} = {737F7A65-62E7-4707-B3DB-B9856131687D} {6312B365-AA53-43AA-BD00-848C1323CA8B} = {6312B365-AA53-43AA-BD00-848C1323CA8B} {C4BA3E66-2310-43E7-B30A-ABDCCF44D823} = {C4BA3E66-2310-43E7-B30A-ABDCCF44D823} {AE5D4766-9668-4EB5-B801-5DF8F53363FC} = {AE5D4766-9668-4EB5-B801-5DF8F53363FC} - {76858167-F4DB-476C-A2B6-A3069D60D9E2} = {76858167-F4DB-476C-A2B6-A3069D60D9E2} {C325E167-DBC3-4611-8AC8-2A118432E35B} = {C325E167-DBC3-4611-8AC8-2A118432E35B} {CE7C4168-68A6-43B2-BAE7-B2CF857C8F03} = {CE7C4168-68A6-43B2-BAE7-B2CF857C8F03} {7E207F6A-DC28-4DEB-8454-7977092131DC} = {7E207F6A-DC28-4DEB-8454-7977092131DC} @@ -101,6 +95,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{24E5C {9A226D92-9326-4907-A462-25997D5C9427} = {9A226D92-9326-4907-A462-25997D5C9427} {7F1AFE93-97E7-4905-A2CF-5C845D7FDD4F} = {7F1AFE93-97E7-4905-A2CF-5C845D7FDD4F} {34EEE194-B77E-453E-9C59-252C0421188A} = {34EEE194-B77E-453E-9C59-252C0421188A} + {B123D196-2F43-4FEB-80B5-990F06DED319} = {B123D196-2F43-4FEB-80B5-990F06DED319} {0E0F449A-7998-4113-BDD2-A74E0B6D3466} = {0E0F449A-7998-4113-BDD2-A74E0B6D3466} {D15E5D9B-A1A6-4935-889C-D880FD0068CE} = {D15E5D9B-A1A6-4935-889C-D880FD0068CE} {3E41969B-D69B-4235-B192-A94F7853D869} = {3E41969B-D69B-4235-B192-A94F7853D869} @@ -109,6 +104,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{24E5C {53022A9D-F5B2-407C-9A29-3AC71B3E6DDC} = {53022A9D-F5B2-407C-9A29-3AC71B3E6DDC} {8CE6FF9D-8A14-4A45-971A-18972109AC9D} = {8CE6FF9D-8A14-4A45-971A-18972109AC9D} {AA7A40A2-A837-4557-AB3D-D64980F6F8E4} = {AA7A40A2-A837-4557-AB3D-D64980F6F8E4} + {0C618DA2-4097-46B9-83D0-144AEB774568} = {0C618DA2-4097-46B9-83D0-144AEB774568} {7C30B2A4-A24D-4796-9754-CABBDB46D0F8} = {7C30B2A4-A24D-4796-9754-CABBDB46D0F8} {D1AADCA9-FB5A-4F44-8E11-8232941E2C33} = {D1AADCA9-FB5A-4F44-8E11-8232941E2C33} {E02CDAAC-05F4-436B-B245-2A402FFA131F} = {E02CDAAC-05F4-436B-B245-2A402FFA131F} @@ -118,6 +114,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{24E5C {AE50F8BA-5FAC-47CC-A5A0-7F1E55C413E3} = {AE50F8BA-5FAC-47CC-A5A0-7F1E55C413E3} {9A9D7ABC-ED3A-462E-9ED1-CB55F14174F3} = {9A9D7ABC-ED3A-462E-9ED1-CB55F14174F3} {DBA493BD-3AF1-4616-8A80-F6FD41B70392} = {DBA493BD-3AF1-4616-8A80-F6FD41B70392} + {4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D} = {4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D} {4F8B23C1-9832-4C3B-A836-2FBB53F628A0} = {4F8B23C1-9832-4C3B-A836-2FBB53F628A0} {18FBE8C2-CD20-4D99-9E0B-63B408CE4850} = {18FBE8C2-CD20-4D99-9E0B-63B408CE4850} {17DC13C3-78E0-4EF5-B7B1-87EB1A379D2A} = {17DC13C3-78E0-4EF5-B7B1-87EB1A379D2A} @@ -153,6 +150,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{24E5C {E8896FEE-8601-4AFC-91EA-6F9698574174} = {E8896FEE-8601-4AFC-91EA-6F9698574174} {4E8105F2-56D4-45D6-9017-706F804052E7} = {4E8105F2-56D4-45D6-9017-706F804052E7} {0CB176F2-1FA9-467A-986D-512FAD8144B0} = {0CB176F2-1FA9-467A-986D-512FAD8144B0} + {C35122F6-49FF-4AAA-A2AA-482628E5E2A7} = {C35122F6-49FF-4AAA-A2AA-482628E5E2A7} {76FFD0F6-3D5F-4826-A3BA-DEE92084FA27} = {76FFD0F6-3D5F-4826-A3BA-DEE92084FA27} {1F80CDF7-B1CB-4303-B282-A21EDC2BDCB4} = {1F80CDF7-B1CB-4303-B282-A21EDC2BDCB4} {3BBA31F8-2679-4655-975D-52FDA5ABD5C4} = {3BBA31F8-2679-4655-975D-52FDA5ABD5C4} @@ -277,18 +275,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsets", "..\..\test\dsets\d {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsets_cpp", "..\..\c++\test\dsets_cpp\dsets_cpp.vcproj", "{802B922A-E813-438E-A180-4A8839A11A55}" - ProjectSection(ProjectDependencies) = postProject - {FB74E351-0C4E-4173-B0D3-10DD12F2DCA5} = {FB74E351-0C4E-4173-B0D3-10DD12F2DCA5} - {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsets_cppdll", "..\..\c++\test\dsets_cppdll\dsets_cppdll.vcproj", "{76858167-F4DB-476C-A2B6-A3069D60D9E2}" - ProjectSection(ProjectDependencies) = postProject - {D279901A-8E21-47D3-B7EA-A572EE12F2E6} = {D279901A-8E21-47D3-B7EA-A572EE12F2E6} - {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsetsdll", "..\..\test\dsetsdll\dsetsdll.vcproj", "{1B298EEC-0B47-4145-88AA-C6558E0BD993}" ProjectSection(ProjectDependencies) = postProject {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} @@ -550,14 +536,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5dumptst", "..\..\tools\te EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5import", "..\..\tools\h5import\h5import.vcproj", "{9E588AD8-14BD-4BA3-B4EA-16D1D882C700}" ProjectSection(ProjectDependencies) = postProject - {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} = {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} = {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5importdll", "..\..\tools\h5importdll\h5importdll.vcproj", "{2DCDB978-79B7-4A3A-B24A-D908A49B7D50}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {832DD776-BC7F-40B5-90D0-E6448014CA5B} = {832DD776-BC7F-40B5-90D0-E6448014CA5B} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5importtst", "..\..\tools\TESTFILES\h5importtst\h5importtst.vcproj", "{AF696934-5004-4C1D-90C3-B434E92AFB89}" @@ -654,6 +640,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5", "..\hdf5\hdf5.vcproj", "{26346A09-C500-49E7-963A-D22A8E09AAB7}" ProjectSection(ProjectDependencies) = postProject {B123D196-2F43-4FEB-80B5-990F06DED319} = {B123D196-2F43-4FEB-80B5-990F06DED319} + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757} = {50D207BC-2B27-4BD9-B5D4-FCF8358BE757} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5_cpp", "..\hdf5_cpp\hdf5_cpp.vcproj", "{FB74E351-0C4E-4173-B0D3-10DD12F2DCA5}" @@ -1051,62 +1038,62 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5tinit", "..\..\misc\typeg EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chunk_info", "..\..\test\chunk_info\chunk_info.vcproj", "{E3B24219-DEB9-4ECB-809C-AD98EE51974E}" ProjectSection(ProjectDependencies) = postProject - {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chunk_infodll", "..\..\test\chunk_infodll\chunk_infodll.vcproj", "{D6FB6925-671E-47C1-97AD-DFC6F2E3F72D}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "app_ref", "..\..\test\app_ref\app_ref.vcproj", "{C35122F6-49FF-4AAA-A2AA-482628E5E2A7}" ProjectSection(ProjectDependencies) = postProject - {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "app_refdll", "..\..\test\app_refdll\app_refdll.vcproj", "{0C618DA2-4097-46B9-83D0-144AEB774568}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "earray", "..\..\test\earray\earray.vcproj", "{D6FBD436-D8B4-4FEB-A8F8-EB097CAF55CF}" ProjectSection(ProjectDependencies) = postProject - {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "earraydll", "..\..\test\earraydll\earraydll.vcproj", "{3C224452-C71A-4B3E-937A-891144D1941D}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freespace", "..\..\test\freespace\freespace.vcproj", "{D4395435-B3B0-4937-9AC5-89BD73C47303}" ProjectSection(ProjectDependencies) = postProject - {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freespacedll", "..\..\test\freespacedll\freespacedll.vcproj", "{737F7A65-62E7-4707-B3DB-B9856131687D}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mf", "..\..\test\mf\mf.vcproj", "{4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D}" ProjectSection(ProjectDependencies) = postProject - {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfdll", "..\..\test\mfdll\mfdll.vcproj", "{C4811E26-A7DA-424D-8A44-F29DFD588533}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_serial", "..\..\perform\perf_serial\perf_serial.vcproj", "{B8923279-9E37-43D2-8ECF-5225BFB3356A}" @@ -1117,8 +1104,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_serial", "..\..\perfor EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_serialdll", "..\..\perform\perf_serialdll\perf_serialdll.vcproj", "{BF8C769D-BC11-4AB4-B928-5FD1ADCB1234}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {832DD776-BC7F-40B5-90D0-E6448014CA5B} = {832DD776-BC7F-40B5-90D0-E6448014CA5B} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "farray", "..\..\test\farray\farray.vcproj", "{AE3E8414-FE68-4BF5-AFAA-77EBFCB706C5}" @@ -1135,8 +1122,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "farraydll", "..\..\test\far EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcheckversion", "..\..\test\tcheckversion\tcheckversion.vcproj", "{DFB6DCC1-2E00-4566-B935-F32172FDA483}" ProjectSection(ProjectDependencies) = postProject - {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} = {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} = {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcheckversiondll", "..\..\test\tcheckversiondll\tcheckversiondll.vcproj", "{7B3EB7A5-DA01-4488-A06B-63E2941EE078}" @@ -1145,6 +1132,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcheckversiondll", "..\..\t {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5libsettings", "..\..\misc\typegen\h5libsettings\h5libsettings.vcproj", "{50D207BC-2B27-4BD9-B5D4-FCF8358BE757}" + ProjectSection(ProjectDependencies) = postProject + {B123D196-2F43-4FEB-80B5-990F06DED319} = {B123D196-2F43-4FEB-80B5-990F06DED319} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -1321,22 +1313,6 @@ Global {A90ADD88-DA1B-4642-A97B-37DF89433858}.Release|Win32.Build.0 = Release|Win32 {A90ADD88-DA1B-4642-A97B-37DF89433858}.Release|x64.ActiveCfg = Release|x64 {A90ADD88-DA1B-4642-A97B-37DF89433858}.Release|x64.Build.0 = Release|x64 - {802B922A-E813-438E-A180-4A8839A11A55}.Debug|Win32.ActiveCfg = Debug|Win32 - {802B922A-E813-438E-A180-4A8839A11A55}.Debug|Win32.Build.0 = Debug|Win32 - {802B922A-E813-438E-A180-4A8839A11A55}.Debug|x64.ActiveCfg = Debug|x64 - {802B922A-E813-438E-A180-4A8839A11A55}.Debug|x64.Build.0 = Debug|x64 - {802B922A-E813-438E-A180-4A8839A11A55}.Release|Win32.ActiveCfg = Release|Win32 - {802B922A-E813-438E-A180-4A8839A11A55}.Release|Win32.Build.0 = Release|Win32 - {802B922A-E813-438E-A180-4A8839A11A55}.Release|x64.ActiveCfg = Release|x64 - {802B922A-E813-438E-A180-4A8839A11A55}.Release|x64.Build.0 = Release|x64 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Debug|Win32.ActiveCfg = Debug|Win32 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Debug|Win32.Build.0 = Debug|Win32 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Debug|x64.ActiveCfg = Debug|x64 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Debug|x64.Build.0 = Debug|x64 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Release|Win32.ActiveCfg = Release|Win32 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Release|Win32.Build.0 = Release|Win32 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Release|x64.ActiveCfg = Release|x64 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Release|x64.Build.0 = Release|x64 {1B298EEC-0B47-4145-88AA-C6558E0BD993}.Debug|Win32.ActiveCfg = Debug|Win32 {1B298EEC-0B47-4145-88AA-C6558E0BD993}.Debug|Win32.Build.0 = Debug|Win32 {1B298EEC-0B47-4145-88AA-C6558E0BD993}.Debug|x64.ActiveCfg = Debug|x64 @@ -2501,6 +2477,14 @@ Global {7B3EB7A5-DA01-4488-A06B-63E2941EE078}.Release|Win32.Build.0 = Release|Win32 {7B3EB7A5-DA01-4488-A06B-63E2941EE078}.Release|x64.ActiveCfg = Release|x64 {7B3EB7A5-DA01-4488-A06B-63E2941EE078}.Release|x64.Build.0 = Release|x64 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Debug|Win32.ActiveCfg = Debug|Win32 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Debug|Win32.Build.0 = Debug|Win32 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Debug|x64.ActiveCfg = Debug|x64 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Debug|x64.Build.0 = Debug|x64 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Release|Win32.ActiveCfg = Release|Win32 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Release|Win32.Build.0 = Release|Win32 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Release|x64.ActiveCfg = Release|x64 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/windows/proj/all/all.vcproj b/windows/proj/all/all.vcproj index a58a4c8..659a54e 100644 --- a/windows/proj/all/all.vcproj +++ b/windows/proj/all/all.vcproj @@ -1,10 +1,11 @@ - - diff --git a/windows/proj/all_fortran/all_fortran.sln b/windows/proj/all_fortran/all_fortran.sln index f7ccad0..1a5f8dc 100644 --- a/windows/proj/all_fortran/all_fortran.sln +++ b/windows/proj/all_fortran/all_fortran.sln @@ -1,7 +1,15 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran.vcproj", "{24E5C6DF-1FA4-49AD-AE75-1D9347966CC5}" ProjectSection(ProjectDependencies) = postProject + {8C6D9C00-44A9-432F-B695-F56439C1B288} = {8C6D9C00-44A9-432F-B695-F56439C1B288} + {0A049202-6533-413E-89D6-5D6866AAE703} = {0A049202-6533-413E-89D6-5D6866AAE703} + {6FFCE804-EF4A-468F-A174-561934C153A1} = {6FFCE804-EF4A-468F-A174-561934C153A1} + {4AC79406-D6E0-43B3-82B0-7A032FABB52A} = {4AC79406-D6E0-43B3-82B0-7A032FABB52A} + {E1F98D07-4724-46CB-B327-5677C1C9266D} = {E1F98D07-4724-46CB-B327-5677C1C9266D} + {364FF608-7969-4ED1-95B2-8592872F8264} = {364FF608-7969-4ED1-95B2-8592872F8264} + {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {854F7E09-CEB5-44CD-B924-3FFAC7936323} = {854F7E09-CEB5-44CD-B924-3FFAC7936323} {405F6F0A-DBE6-4A4E-AAE2-D4D514BA0CF5} = {405F6F0A-DBE6-4A4E-AAE2-D4D514BA0CF5} {89DA820B-7A3B-46FA-AE09-971A739BEEFD} = {89DA820B-7A3B-46FA-AE09-971A739BEEFD} {0D18A50F-52B3-4322-AC0D-F15CD657CEC4} = {0D18A50F-52B3-4322-AC0D-F15CD657CEC4} @@ -11,6 +19,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran. {9FCBE814-3818-4F1A-975D-05BAF6FF432F} = {9FCBE814-3818-4F1A-975D-05BAF6FF432F} {52E83C17-2B68-44B5-881D-4F6338FB14C7} = {52E83C17-2B68-44B5-881D-4F6338FB14C7} {DB6C7D17-28B1-4E5A-A61E-C53FEB545937} = {DB6C7D17-28B1-4E5A-A61E-C53FEB545937} + {E3B24219-DEB9-4ECB-809C-AD98EE51974E} = {E3B24219-DEB9-4ECB-809C-AD98EE51974E} {357A1E1A-D5EA-42FB-B4B1-EEB8A4B2BBF0} = {357A1E1A-D5EA-42FB-B4B1-EEB8A4B2BBF0} {D279901A-8E21-47D3-B7EA-A572EE12F2E6} = {D279901A-8E21-47D3-B7EA-A572EE12F2E6} {411D221C-9FA1-417E-8A2B-DF746F4C7E07} = {411D221C-9FA1-417E-8A2B-DF746F4C7E07} @@ -18,17 +27,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran. {7D293021-0601-498B-91B8-C49580EFB08D} = {7D293021-0601-498B-91B8-C49580EFB08D} {BE1A0022-708E-4CC2-B01C-26BD99AB6576} = {BE1A0022-708E-4CC2-B01C-26BD99AB6576} {01DA0D22-D220-4ACE-9EB0-EA3906098C0A} = {01DA0D22-D220-4ACE-9EB0-EA3906098C0A} - {802B922A-E813-438E-A180-4A8839A11A55} = {802B922A-E813-438E-A180-4A8839A11A55} + {D6FB6925-671E-47C1-97AD-DFC6F2E3F72D} = {D6FB6925-671E-47C1-97AD-DFC6F2E3F72D} + {C4811E26-A7DA-424D-8A44-F29DFD588533} = {C4811E26-A7DA-424D-8A44-F29DFD588533} {AC4C582B-B27D-4E57-A59F-6FF0E833C6E5} = {AC4C582B-B27D-4E57-A59F-6FF0E833C6E5} {2248C52C-75DC-465B-A598-6E89CC93E00D} = {2248C52C-75DC-465B-A598-6E89CC93E00D} {834DD32C-D078-441F-95F4-9CDE108B60AE} = {834DD32C-D078-441F-95F4-9CDE108B60AE} {AF696934-5004-4C1D-90C3-B434E92AFB89} = {AF696934-5004-4C1D-90C3-B434E92AFB89} {3EDEB434-F59E-4C50-8884-F0BB29845619} = {3EDEB434-F59E-4C50-8884-F0BB29845619} {69952435-F01F-46A7-B907-A78EBC864ED7} = {69952435-F01F-46A7-B907-A78EBC864ED7} + {D4395435-B3B0-4937-9AC5-89BD73C47303} = {D4395435-B3B0-4937-9AC5-89BD73C47303} {196F5935-2391-49A7-B6A2-410DF8149F0D} = {196F5935-2391-49A7-B6A2-410DF8149F0D} {E5C9E235-E10F-4F46-A94F-A112CD8D867E} = {E5C9E235-E10F-4F46-A94F-A112CD8D867E} {27CCFE35-61A5-434F-8B83-9A40AE2AE8C5} = {27CCFE35-61A5-434F-8B83-9A40AE2AE8C5} {0C5E3F36-3338-4B2C-A956-4D577B6119E7} = {0C5E3F36-3338-4B2C-A956-4D577B6119E7} + {D6FBD436-D8B4-4FEB-A8F8-EB097CAF55CF} = {D6FBD436-D8B4-4FEB-A8F8-EB097CAF55CF} {AACD0537-E8F3-4F0F-A0E6-B99C0F4EF892} = {AACD0537-E8F3-4F0F-A0E6-B99C0F4EF892} {80892339-F6CE-4E96-B61B-131095F2612D} = {80892339-F6CE-4E96-B61B-131095F2612D} {9ADAE03A-2060-471E-A7B5-9D8F6995223A} = {9ADAE03A-2060-471E-A7B5-9D8F6995223A} @@ -40,6 +52,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran. {71C6994C-3102-4A2A-B0AE-88A590CB36CE} = {71C6994C-3102-4A2A-B0AE-88A590CB36CE} {9A124450-EC54-4813-B0B1-2CA96B695009} = {9A124450-EC54-4813-B0B1-2CA96B695009} {FB74E351-0C4E-4173-B0D3-10DD12F2DCA5} = {FB74E351-0C4E-4173-B0D3-10DD12F2DCA5} + {3C224452-C71A-4B3E-937A-891144D1941D} = {3C224452-C71A-4B3E-937A-891144D1941D} {37605955-FA00-41C9-9D39-D078CF270376} = {37605955-FA00-41C9-9D39-D078CF270376} {5E617A56-25B2-41E8-8D69-109600819716} = {5E617A56-25B2-41E8-8D69-109600819716} {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} @@ -50,11 +63,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran. {5A90FD64-6EED-45E1-A147-D9FE72788570} = {5A90FD64-6EED-45E1-A147-D9FE72788570} {68A52165-E0EF-4019-B658-1AC734649955} = {68A52165-E0EF-4019-B658-1AC734649955} {BE9A4A65-F25B-4DCF-8B55-06B3D0C685CB} = {BE9A4A65-F25B-4DCF-8B55-06B3D0C685CB} + {737F7A65-62E7-4707-B3DB-B9856131687D} = {737F7A65-62E7-4707-B3DB-B9856131687D} {6312B365-AA53-43AA-BD00-848C1323CA8B} = {6312B365-AA53-43AA-BD00-848C1323CA8B} {C4BA3E66-2310-43E7-B30A-ABDCCF44D823} = {C4BA3E66-2310-43E7-B30A-ABDCCF44D823} {AE5D4766-9668-4EB5-B801-5DF8F53363FC} = {AE5D4766-9668-4EB5-B801-5DF8F53363FC} {F9428466-5FA2-47C9-BB02-288EDE7016A4} = {F9428466-5FA2-47C9-BB02-288EDE7016A4} - {76858167-F4DB-476C-A2B6-A3069D60D9E2} = {76858167-F4DB-476C-A2B6-A3069D60D9E2} {C325E167-DBC3-4611-8AC8-2A118432E35B} = {C325E167-DBC3-4611-8AC8-2A118432E35B} {CE7C4168-68A6-43B2-BAE7-B2CF857C8F03} = {CE7C4168-68A6-43B2-BAE7-B2CF857C8F03} {7E207F6A-DC28-4DEB-8454-7977092131DC} = {7E207F6A-DC28-4DEB-8454-7977092131DC} @@ -78,6 +91,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran. {EBF7C380-5F58-462D-993D-75B53F83FA81} = {EBF7C380-5F58-462D-993D-75B53F83FA81} {71A1C081-FF1C-452B-B938-95551D565302} = {71A1C081-FF1C-452B-B938-95551D565302} {7693B383-C2CB-43FD-A428-598F73D214F7} = {7693B383-C2CB-43FD-A428-598F73D214F7} + {04B72E84-6A91-4AF1-BFCD-110CD4F67E2C} = {04B72E84-6A91-4AF1-BFCD-110CD4F67E2C} {C8202A85-1F3A-4B34-869C-B1E8CA829299} = {C8202A85-1F3A-4B34-869C-B1E8CA829299} {E9F8FC85-8508-4FE7-9BB0-C0494A71BA1B} = {E9F8FC85-8508-4FE7-9BB0-C0494A71BA1B} {DFE42486-47A2-487C-81B9-DDCDA9F07BF0} = {DFE42486-47A2-487C-81B9-DDCDA9F07BF0} @@ -103,7 +117,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran. {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} {53022A9D-F5B2-407C-9A29-3AC71B3E6DDC} = {53022A9D-F5B2-407C-9A29-3AC71B3E6DDC} {8CE6FF9D-8A14-4A45-971A-18972109AC9D} = {8CE6FF9D-8A14-4A45-971A-18972109AC9D} + {531839A0-AFE6-482A-BF60-29890B89D4BF} = {531839A0-AFE6-482A-BF60-29890B89D4BF} {AA7A40A2-A837-4557-AB3D-D64980F6F8E4} = {AA7A40A2-A837-4557-AB3D-D64980F6F8E4} + {0C618DA2-4097-46B9-83D0-144AEB774568} = {0C618DA2-4097-46B9-83D0-144AEB774568} {7C30B2A4-A24D-4796-9754-CABBDB46D0F8} = {7C30B2A4-A24D-4796-9754-CABBDB46D0F8} {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} = {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} {D1AADCA9-FB5A-4F44-8E11-8232941E2C33} = {D1AADCA9-FB5A-4F44-8E11-8232941E2C33} @@ -116,6 +132,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran. {AE50F8BA-5FAC-47CC-A5A0-7F1E55C413E3} = {AE50F8BA-5FAC-47CC-A5A0-7F1E55C413E3} {9A9D7ABC-ED3A-462E-9ED1-CB55F14174F3} = {9A9D7ABC-ED3A-462E-9ED1-CB55F14174F3} {DBA493BD-3AF1-4616-8A80-F6FD41B70392} = {DBA493BD-3AF1-4616-8A80-F6FD41B70392} + {4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D} = {4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D} {4F8B23C1-9832-4C3B-A836-2FBB53F628A0} = {4F8B23C1-9832-4C3B-A836-2FBB53F628A0} {A4C4D9C2-DFB5-4A09-8C6D-968113C58247} = {A4C4D9C2-DFB5-4A09-8C6D-968113C58247} {18FBE8C2-CD20-4D99-9E0B-63B408CE4850} = {18FBE8C2-CD20-4D99-9E0B-63B408CE4850} @@ -157,6 +174,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran. {E8896FEE-8601-4AFC-91EA-6F9698574174} = {E8896FEE-8601-4AFC-91EA-6F9698574174} {4E8105F2-56D4-45D6-9017-706F804052E7} = {4E8105F2-56D4-45D6-9017-706F804052E7} {0CB176F2-1FA9-467A-986D-512FAD8144B0} = {0CB176F2-1FA9-467A-986D-512FAD8144B0} + {C35122F6-49FF-4AAA-A2AA-482628E5E2A7} = {C35122F6-49FF-4AAA-A2AA-482628E5E2A7} {76FFD0F6-3D5F-4826-A3BA-DEE92084FA27} = {76FFD0F6-3D5F-4826-A3BA-DEE92084FA27} {1F80CDF7-B1CB-4303-B282-A21EDC2BDCB4} = {1F80CDF7-B1CB-4303-B282-A21EDC2BDCB4} {3BBA31F8-2679-4655-975D-52FDA5ABD5C4} = {3BBA31F8-2679-4655-975D-52FDA5ABD5C4} @@ -168,26 +186,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_fortran", "all_fortran. {0A33B4FE-A2C9-4B7F-ACEC-D251308182ED} = {0A33B4FE-A2C9-4B7F-ACEC-D251308182ED} {E75602FF-F4E6-4F45-AD0D-EA49C0C66DEF} = {E75602FF-F4E6-4F45-AD0D-EA49C0C66DEF} {3F645EFF-3A91-4CF3-9B60-76E0C33686A7} = {3F645EFF-3A91-4CF3-9B60-76E0C33686A7} - {C35122F6-49FF-4AAA-A2AA-482628E5E2A7} = {C35122F6-49FF-4AAA-A2AA-482628E5E2A7} - {0C618DA2-4097-46B9-83D0-144AEB774568} = {0C618DA2-4097-46B9-83D0-144AEB774568} - {531839A0-AFE6-482A-BF60-29890B89D4BF} = {531839A0-AFE6-482A-BF60-29890B89D4BF} - {04B72E84-6A91-4AF1-BFCD-110CD4F67E2C} = {04B72E84-6A91-4AF1-BFCD-110CD4F67E2C} - {E3B24219-DEB9-4ECB-809C-AD98EE51974E} = {E3B24219-DEB9-4ECB-809C-AD98EE51974E} - {D6FB6925-671E-47C1-97AD-DFC6F2E3F72D} = {D6FB6925-671E-47C1-97AD-DFC6F2E3F72D} - {D6FBD436-D8B4-4FEB-A8F8-EB097CAF55CF} = {D6FBD436-D8B4-4FEB-A8F8-EB097CAF55CF} - {3C224452-C71A-4B3E-937A-891144D1941D} = {3C224452-C71A-4B3E-937A-891144D1941D} - {4AC79406-D6E0-43B3-82B0-7A032FABB52A} = {4AC79406-D6E0-43B3-82B0-7A032FABB52A} - {6FFCE804-EF4A-468F-A174-561934C153A1} = {6FFCE804-EF4A-468F-A174-561934C153A1} - {0A049202-6533-413E-89D6-5D6866AAE703} = {0A049202-6533-413E-89D6-5D6866AAE703} - {8C6D9C00-44A9-432F-B695-F56439C1B288} = {8C6D9C00-44A9-432F-B695-F56439C1B288} - {D4395435-B3B0-4937-9AC5-89BD73C47303} = {D4395435-B3B0-4937-9AC5-89BD73C47303} - {737F7A65-62E7-4707-B3DB-B9856131687D} = {737F7A65-62E7-4707-B3DB-B9856131687D} - {4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D} = {4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D} - {C4811E26-A7DA-424D-8A44-F29DFD588533} = {C4811E26-A7DA-424D-8A44-F29DFD588533} - {854F7E09-CEB5-44CD-B924-3FFAC7936323} = {854F7E09-CEB5-44CD-B924-3FFAC7936323} - {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} - {364FF608-7969-4ED1-95B2-8592872F8264} = {364FF608-7969-4ED1-95B2-8592872F8264} - {E1F98D07-4724-46CB-B327-5677C1C9266D} = {E1F98D07-4724-46CB-B327-5677C1C9266D} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "big", "..\..\test\big\big.vcproj", "{009F2CC9-B131-4C51-BCFD-CEBDEFCB32C7}" @@ -302,18 +300,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsets", "..\..\test\dsets\d {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsets_cpp", "..\..\c++\test\dsets_cpp\dsets_cpp.vcproj", "{802B922A-E813-438E-A180-4A8839A11A55}" - ProjectSection(ProjectDependencies) = postProject - {FB74E351-0C4E-4173-B0D3-10DD12F2DCA5} = {FB74E351-0C4E-4173-B0D3-10DD12F2DCA5} - {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsets_cppdll", "..\..\c++\test\dsets_cppdll\dsets_cppdll.vcproj", "{76858167-F4DB-476C-A2B6-A3069D60D9E2}" - ProjectSection(ProjectDependencies) = postProject - {D279901A-8E21-47D3-B7EA-A572EE12F2E6} = {D279901A-8E21-47D3-B7EA-A572EE12F2E6} - {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsetsdll", "..\..\test\dsetsdll\dsetsdll.vcproj", "{1B298EEC-0B47-4145-88AA-C6558E0BD993}" ProjectSection(ProjectDependencies) = postProject {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} @@ -575,14 +561,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5dumptst", "..\..\tools\te EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5import", "..\..\tools\h5import\h5import.vcproj", "{9E588AD8-14BD-4BA3-B4EA-16D1D882C700}" ProjectSection(ProjectDependencies) = postProject - {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} = {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} = {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5importdll", "..\..\tools\h5importdll\h5importdll.vcproj", "{2DCDB978-79B7-4A3A-B24A-D908A49B7D50}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {832DD776-BC7F-40B5-90D0-E6448014CA5B} = {832DD776-BC7F-40B5-90D0-E6448014CA5B} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5importtst", "..\..\tools\TESTFILES\h5importtst\h5importtst.vcproj", "{AF696934-5004-4C1D-90C3-B434E92AFB89}" @@ -679,6 +665,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5", "..\hdf5\hdf5.vcproj", "{26346A09-C500-49E7-963A-D22A8E09AAB7}" ProjectSection(ProjectDependencies) = postProject {B123D196-2F43-4FEB-80B5-990F06DED319} = {B123D196-2F43-4FEB-80B5-990F06DED319} + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757} = {50D207BC-2B27-4BD9-B5D4-FCF8358BE757} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5_cpp", "..\hdf5_cpp\hdf5_cpp.vcproj", "{FB74E351-0C4E-4173-B0D3-10DD12F2DCA5}" @@ -693,8 +680,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5_cppdll", "..\hdf5_cppd EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5_f90cstub", "..\hdf5_f90cstub\hdf5_f90cstub.vcproj", "{CF055FEA-4433-439A-9688-BFD73D260706}" ProjectSection(ProjectDependencies) = postProject - {B6430FB3-3BEF-48C3-84DD-98106C6F6113} = {B6430FB3-3BEF-48C3-84DD-98106C6F6113} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {B6430FB3-3BEF-48C3-84DD-98106C6F6113} = {B6430FB3-3BEF-48C3-84DD-98106C6F6113} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5_f90cstubdll", "..\hdf5_f90cstubdll\hdf5_f90cstubdll.vcproj", "{668327AB-1F82-46EE-A157-CD79AB8BF323}" @@ -1150,21 +1137,21 @@ Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "hdf5_fortran", "..\hdf5_for EndProject Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "hdf5_fortrandll", "..\hdf5_fortrandll\hdf5_fortrandll.vfproj", "{1063E387-0167-411C-85B9-96B043C4BDB3}" ProjectSection(ProjectDependencies) = postProject - {B6430FB3-3BEF-48C3-84DD-98106C6F6113} = {B6430FB3-3BEF-48C3-84DD-98106C6F6113} {668327AB-1F82-46EE-A157-CD79AB8BF323} = {668327AB-1F82-46EE-A157-CD79AB8BF323} + {B6430FB3-3BEF-48C3-84DD-98106C6F6113} = {B6430FB3-3BEF-48C3-84DD-98106C6F6113} EndProjectSection EndProject Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "hdf5_hl_fortran", "..\hdf5_hl_fortran\hdf5_hl_fortran.vfproj", "{F9428466-5FA2-47C9-BB02-288EDE7016A4}" ProjectSection(ProjectDependencies) = postProject - {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} = {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} - {9A124450-EC54-4813-B0B1-2CA96B695009} = {9A124450-EC54-4813-B0B1-2CA96B695009} {01DA0D22-D220-4ACE-9EB0-EA3906098C0A} = {01DA0D22-D220-4ACE-9EB0-EA3906098C0A} + {9A124450-EC54-4813-B0B1-2CA96B695009} = {9A124450-EC54-4813-B0B1-2CA96B695009} + {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} = {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} EndProjectSection EndProject Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "hdf5_hl_fortrandll", "..\hdf5_hl_fortrandll\hdf5_hl_fortrandll.vfproj", "{487B4E71-1CB9-49A1-920C-1F505D8B76F8}" ProjectSection(ProjectDependencies) = postProject - {CFB2CC74-5F03-494A-84E9-6BB8D2FBC43C} = {CFB2CC74-5F03-494A-84E9-6BB8D2FBC43C} {DB6C7D17-28B1-4E5A-A61E-C53FEB545937} = {DB6C7D17-28B1-4E5A-A61E-C53FEB545937} + {CFB2CC74-5F03-494A-84E9-6BB8D2FBC43C} = {CFB2CC74-5F03-494A-84E9-6BB8D2FBC43C} {1063E387-0167-411C-85B9-96B043C4BDB3} = {1063E387-0167-411C-85B9-96B043C4BDB3} {668327AB-1F82-46EE-A157-CD79AB8BF323} = {668327AB-1F82-46EE-A157-CD79AB8BF323} EndProjectSection @@ -1287,11 +1274,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chunk_infodll", "..\..\test EndProject Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "testhdf5_fortran_1_8", "..\..\fortran\test\testhdf5_fortran_1_8\testhdf5_fortran_1_8.vfproj", "{04B72E84-6A91-4AF1-BFCD-110CD4F67E2C}" ProjectSection(ProjectDependencies) = postProject - {CF055FEA-4433-439A-9688-BFD73D260706} = {CF055FEA-4433-439A-9688-BFD73D260706} - {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} = {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} - {2B93688D-D766-4295-ABFA-003CF905F8D8} = {2B93688D-D766-4295-ABFA-003CF905F8D8} - {84571A5E-D9A6-4672-9F86-3F8E32C93FDF} = {84571A5E-D9A6-4672-9F86-3F8E32C93FDF} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {84571A5E-D9A6-4672-9F86-3F8E32C93FDF} = {84571A5E-D9A6-4672-9F86-3F8E32C93FDF} + {2B93688D-D766-4295-ABFA-003CF905F8D8} = {2B93688D-D766-4295-ABFA-003CF905F8D8} + {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} = {26F2FDA4-17DC-4E1A-B9AC-124C460A4391} + {CF055FEA-4433-439A-9688-BFD73D260706} = {CF055FEA-4433-439A-9688-BFD73D260706} EndProjectSection EndProject Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "testhdf5_fortran_1_8dll", "..\..\fortran\test\testhdf5_fortran_1_8dll\testhdf5_fortran_1_8dll.vfproj", "{531839A0-AFE6-482A-BF60-29890B89D4BF}" @@ -1328,26 +1315,26 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "earraydll", "..\..\test\ear EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freespace", "..\..\test\freespace\freespace.vcproj", "{D4395435-B3B0-4937-9AC5-89BD73C47303}" ProjectSection(ProjectDependencies) = postProject - {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freespacedll", "..\..\test\freespacedll\freespacedll.vcproj", "{737F7A65-62E7-4707-B3DB-B9856131687D}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mf", "..\..\test\mf\mf.vcproj", "{4EF0B5BE-E79D-4A79-BDE8-F383BC6C371D}" ProjectSection(ProjectDependencies) = postProject - {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {A80D439C-37B4-4619-A122-1C69F567733B} = {A80D439C-37B4-4619-A122-1C69F567733B} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfdll", "..\..\test\mfdll\mfdll.vcproj", "{C4811E26-A7DA-424D-8A44-F29DFD588533}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {54BDA057-C716-4807-A35E-73185DCB236D} = {54BDA057-C716-4807-A35E-73185DCB236D} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_serial", "..\..\perform\perf_serial\perf_serial.vcproj", "{B8923279-9E37-43D2-8ECF-5225BFB3356A}" @@ -1358,8 +1345,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_serial", "..\..\perfor EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_serialdll", "..\..\perform\perf_serialdll\perf_serialdll.vcproj", "{BF8C769D-BC11-4AB4-B928-5FD1ADCB1234}" ProjectSection(ProjectDependencies) = postProject - {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} {832DD776-BC7F-40B5-90D0-E6448014CA5B} = {832DD776-BC7F-40B5-90D0-E6448014CA5B} + {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "farray", "..\..\test\farray\farray.vcproj", "{AE3E8414-FE68-4BF5-AFAA-77EBFCB706C5}" @@ -1376,8 +1363,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "farraydll", "..\..\test\far EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcheckversion", "..\..\test\tcheckversion\tcheckversion.vcproj", "{DFB6DCC1-2E00-4566-B935-F32172FDA483}" ProjectSection(ProjectDependencies) = postProject - {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} = {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} {26346A09-C500-49E7-963A-D22A8E09AAB7} = {26346A09-C500-49E7-963A-D22A8E09AAB7} + {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} = {473ABB63-E5C6-4D8E-9380-5DC76E1EAB4A} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcheckversiondll", "..\..\test\tcheckversiondll\tcheckversiondll.vcproj", "{7B3EB7A5-DA01-4488-A06B-63E2941EE078}" @@ -1386,6 +1373,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcheckversiondll", "..\..\t {C9535AD9-C61D-4691-A5CE-52EF359892AF} = {C9535AD9-C61D-4691-A5CE-52EF359892AF} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h5libsettings", "..\..\misc\typegen\h5libsettings\h5libsettings.vcproj", "{50D207BC-2B27-4BD9-B5D4-FCF8358BE757}" + ProjectSection(ProjectDependencies) = postProject + {B123D196-2F43-4FEB-80B5-990F06DED319} = {B123D196-2F43-4FEB-80B5-990F06DED319} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -1562,22 +1554,6 @@ Global {A90ADD88-DA1B-4642-A97B-37DF89433858}.Release|Win32.Build.0 = Release|Win32 {A90ADD88-DA1B-4642-A97B-37DF89433858}.Release|x64.ActiveCfg = Release|x64 {A90ADD88-DA1B-4642-A97B-37DF89433858}.Release|x64.Build.0 = Release|x64 - {802B922A-E813-438E-A180-4A8839A11A55}.Debug|Win32.ActiveCfg = Debug|Win32 - {802B922A-E813-438E-A180-4A8839A11A55}.Debug|Win32.Build.0 = Debug|Win32 - {802B922A-E813-438E-A180-4A8839A11A55}.Debug|x64.ActiveCfg = Debug|x64 - {802B922A-E813-438E-A180-4A8839A11A55}.Debug|x64.Build.0 = Debug|x64 - {802B922A-E813-438E-A180-4A8839A11A55}.Release|Win32.ActiveCfg = Release|Win32 - {802B922A-E813-438E-A180-4A8839A11A55}.Release|Win32.Build.0 = Release|Win32 - {802B922A-E813-438E-A180-4A8839A11A55}.Release|x64.ActiveCfg = Release|x64 - {802B922A-E813-438E-A180-4A8839A11A55}.Release|x64.Build.0 = Release|x64 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Debug|Win32.ActiveCfg = Debug|Win32 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Debug|Win32.Build.0 = Debug|Win32 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Debug|x64.ActiveCfg = Debug|x64 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Debug|x64.Build.0 = Debug|x64 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Release|Win32.ActiveCfg = Release|Win32 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Release|Win32.Build.0 = Release|Win32 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Release|x64.ActiveCfg = Release|x64 - {76858167-F4DB-476C-A2B6-A3069D60D9E2}.Release|x64.Build.0 = Release|x64 {1B298EEC-0B47-4145-88AA-C6558E0BD993}.Debug|Win32.ActiveCfg = Debug|Win32 {1B298EEC-0B47-4145-88AA-C6558E0BD993}.Debug|Win32.Build.0 = Debug|Win32 {1B298EEC-0B47-4145-88AA-C6558E0BD993}.Debug|x64.ActiveCfg = Debug|x64 @@ -2974,6 +2950,14 @@ Global {7B3EB7A5-DA01-4488-A06B-63E2941EE078}.Release|Win32.Build.0 = Release|Win32 {7B3EB7A5-DA01-4488-A06B-63E2941EE078}.Release|x64.ActiveCfg = Release|x64 {7B3EB7A5-DA01-4488-A06B-63E2941EE078}.Release|x64.Build.0 = Release|x64 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Debug|Win32.ActiveCfg = Debug|Win32 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Debug|Win32.Build.0 = Debug|Win32 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Debug|x64.ActiveCfg = Debug|x64 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Debug|x64.Build.0 = Debug|x64 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Release|Win32.ActiveCfg = Release|Win32 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Release|Win32.Build.0 = Release|Win32 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Release|x64.ActiveCfg = Release|x64 + {50D207BC-2B27-4BD9-B5D4-FCF8358BE757}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/windows/proj/all_fortran/all_fortran.vcproj b/windows/proj/all_fortran/all_fortran.vcproj index 82b54e1..3192d23 100644 --- a/windows/proj/all_fortran/all_fortran.vcproj +++ b/windows/proj/all_fortran/all_fortran.vcproj @@ -1,10 +1,11 @@ - - diff --git a/windows/proj/hdf5/hdf5.vcproj b/windows/proj/hdf5/hdf5.vcproj index b6da610..4112451 100644 --- a/windows/proj/hdf5/hdf5.vcproj +++ b/windows/proj/hdf5/hdf5.vcproj @@ -1,10 +1,11 @@  @@ -106,9 +109,6 @@ Name="VCAppVerifierTool" /> - @@ -136,7 +136,7 @@ /> @@ -201,9 +203,6 @@ Name="VCAppVerifierTool" /> - @@ -231,7 +230,7 @@ /> @@ -296,9 +297,6 @@ Name="VCAppVerifierTool" /> - @@ -326,7 +324,7 @@ /> @@ -391,9 +391,6 @@ Name="VCAppVerifierTool" /> - diff --git a/windows/proj/hdf5_f90cstub/hdf5_f90cstub.vcproj b/windows/proj/hdf5_f90cstub/hdf5_f90cstub.vcproj index e2ca7c9..b71dab1 100644 --- a/windows/proj/hdf5_f90cstub/hdf5_f90cstub.vcproj +++ b/windows/proj/hdf5_f90cstub/hdf5_f90cstub.vcproj @@ -1,9 +1,10 @@ @@ -105,9 +108,6 @@ Name="VCAppVerifierTool" /> - @@ -134,7 +134,7 @@ /> @@ -199,9 +201,6 @@ Name="VCAppVerifierTool" /> - @@ -228,7 +227,7 @@ /> @@ -293,9 +294,6 @@ Name="VCAppVerifierTool" /> - @@ -322,7 +320,7 @@ /> @@ -387,9 +387,6 @@ Name="VCAppVerifierTool" /> - diff --git a/windows/proj/hdf5_hl/hdf5_hl.vcproj b/windows/proj/hdf5_hl/hdf5_hl.vcproj index 009830f..dea33ab 100644 --- a/windows/proj/hdf5_hl/hdf5_hl.vcproj +++ b/windows/proj/hdf5_hl/hdf5_hl.vcproj @@ -1,9 +1,10 @@ - + @@ -107,9 +110,6 @@ Name="VCAppVerifierTool" /> - @@ -137,7 +137,7 @@ /> @@ -203,9 +205,6 @@ Name="VCAppVerifierTool" /> - @@ -233,7 +232,7 @@ /> @@ -298,9 +299,6 @@ Name="VCAppVerifierTool" /> - @@ -328,7 +326,7 @@ /> @@ -393,9 +393,6 @@ Name="VCAppVerifierTool" /> - diff --git a/windows/proj/hdf5_hl_f90cstubdll/hdf5_hl_f90cstubdll.vcproj b/windows/proj/hdf5_hl_f90cstubdll/hdf5_hl_f90cstubdll.vcproj index 73dea5f..e524321 100644 --- a/windows/proj/hdf5_hl_f90cstubdll/hdf5_hl_f90cstubdll.vcproj +++ b/windows/proj/hdf5_hl_f90cstubdll/hdf5_hl_f90cstubdll.vcproj @@ -1,10 +1,11 @@ @@ -106,9 +109,6 @@ Name="VCAppVerifierTool" /> - @@ -136,7 +136,7 @@ /> @@ -201,9 +203,6 @@ Name="VCAppVerifierTool" /> - @@ -231,7 +230,7 @@ /> @@ -296,9 +297,6 @@ Name="VCAppVerifierTool" /> - @@ -326,7 +324,7 @@ /> @@ -391,9 +391,6 @@ Name="VCAppVerifierTool" /> - diff --git a/windows/proj/hdf5_hl_fortran/hdf5_hl_f90cstub.vcproj b/windows/proj/hdf5_hl_fortran/hdf5_hl_f90cstub.vcproj index bc2e530..ca15a9c 100644 --- a/windows/proj/hdf5_hl_fortran/hdf5_hl_f90cstub.vcproj +++ b/windows/proj/hdf5_hl_fortran/hdf5_hl_f90cstub.vcproj @@ -1,9 +1,10 @@ @@ -363,7 +364,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" - PreprocessorDefinitions="" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;" BasicRuntimeChecks="3" /> @@ -378,7 +379,7 @@ Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" - PreprocessorDefinitions="" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;" /> @@ -409,7 +410,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" - PreprocessorDefinitions="" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;" BasicRuntimeChecks="3" /> @@ -424,7 +425,7 @@ Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" - PreprocessorDefinitions="" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;" /> @@ -455,7 +456,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" - PreprocessorDefinitions="" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;" BasicRuntimeChecks="3" /> @@ -470,7 +471,7 @@ Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" - PreprocessorDefinitions="" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;" /> @@ -501,7 +502,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" - PreprocessorDefinitions="" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;" BasicRuntimeChecks="3" /> diff --git a/windows/proj/hdf5_hldll/hdf5_hldll.vcproj b/windows/proj/hdf5_hldll/hdf5_hldll.vcproj index f30155c..91554f2 100644 --- a/windows/proj/hdf5_hldll/hdf5_hldll.vcproj +++ b/windows/proj/hdf5_hldll/hdf5_hldll.vcproj @@ -1,10 +1,11 @@ @@ -107,9 +110,6 @@ Name="VCAppVerifierTool" /> - @@ -137,7 +137,7 @@ /> @@ -203,9 +205,6 @@ Name="VCAppVerifierTool" /> - @@ -233,7 +232,7 @@ /> @@ -299,9 +300,6 @@ Name="VCAppVerifierTool" /> - @@ -329,7 +327,7 @@ /> @@ -395,9 +395,6 @@ Name="VCAppVerifierTool" /> - diff --git a/windows/proj/hdf5dll/hdf5dll.vcproj b/windows/proj/hdf5dll/hdf5dll.vcproj index 860d0d4..e2ed985 100644 --- a/windows/proj/hdf5dll/hdf5dll.vcproj +++ b/windows/proj/hdf5dll/hdf5dll.vcproj @@ -1,10 +1,11 @@  @@ -104,9 +107,6 @@ Name="VCAppVerifierTool" /> - @@ -133,7 +133,7 @@ /> @@ -197,9 +199,6 @@ Name="VCAppVerifierTool" /> - @@ -226,7 +225,7 @@ /> @@ -291,9 +292,6 @@ Name="VCAppVerifierTool" /> - @@ -320,7 +318,7 @@ /> @@ -385,9 +385,6 @@ Name="VCAppVerifierTool" /> - diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index f42c762..c1f2a8c 100755 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -19,7 +19,7 @@ /* * End of Windows Specific Definitions */ - + /* Define if your system generates wrong code for log2 routine. */ /* #undef H5_BAD_LOG2_CODE_GENERATED */ @@ -479,13 +479,13 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.59-FA_a4" +#define H5_PACKAGE_STRING "HDF5 1.9.64-FA_a4" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.59-FA_a4" +#define H5_PACKAGE_VERSION "1.9.64-FA_a4" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "I64" @@ -642,7 +642,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.59-FA_a4" +#define H5_VERSION "1.9.64-FA_a4" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/windows/test/H5srcdir_str.h b/windows/test/H5srcdir_str.h new file mode 100644 index 0000000..4d32264 --- /dev/null +++ b/windows/test/H5srcdir_str.h @@ -0,0 +1,22 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* If you are reading this file and it has a '.h' suffix, it was automatically + * generated from the '.in' version. Make changes there. + */ + +/* Set the 'srcdir' path from configure time */ +static const char *config_srcdir = "."; + diff --git a/windows/test/app_ref/app_ref.vcproj b/windows/test/app_ref/app_ref.vcproj index 52284d1..a26fbe7 100644 --- a/windows/test/app_ref/app_ref.vcproj +++ b/windows/test/app_ref/app_ref.vcproj @@ -1,11 +1,12 @@ - @@ -124,7 +124,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ LinkIncremental="2" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -202,7 +201,7 @@ - @@ -281,7 +279,7 @@ - diff --git a/windows/test/app_refdll/app_refdll.vcproj b/windows/test/app_refdll/app_refdll.vcproj index 8d17f0a..436722e 100644 --- a/windows/test/app_refdll/app_refdll.vcproj +++ b/windows/test/app_refdll/app_refdll.vcproj @@ -1,11 +1,12 @@ - @@ -124,7 +124,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ LinkIncremental="2" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -202,7 +201,7 @@ - @@ -281,7 +279,7 @@ - diff --git a/windows/test/big/big.vcproj b/windows/test/big/big.vcproj index 5b48027..81f9aaa 100644 --- a/windows/test/big/big.vcproj +++ b/windows/test/big/big.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/big/Debug/big.pch" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/big/Debug/big.pch" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/bigdll/bigdll.vcproj b/windows/test/bigdll/bigdll.vcproj index 98f0bf4..a788652 100644 --- a/windows/test/bigdll/bigdll.vcproj +++ b/windows/test/bigdll/bigdll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/bigdll/Debug/bigdll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/bittests/bittests.vcproj b/windows/test/bittests/bittests.vcproj index 788f2e2..72a5059 100644 --- a/windows/test/bittests/bittests.vcproj +++ b/windows/test/bittests/bittests.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/bittests/Debug/bittests.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/bittestsdll/bittestsdll.vcproj b/windows/test/bittestsdll/bittestsdll.vcproj index f998a1c..4288e03 100644 --- a/windows/test/bittestsdll/bittestsdll.vcproj +++ b/windows/test/bittestsdll/bittestsdll.vcproj @@ -1,10 +1,11 @@ - @@ -138,7 +138,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/bittestsdll/Debug/bittestsdll.pch" @@ -155,7 +155,7 @@ /> - @@ -228,7 +227,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -246,7 +245,7 @@ /> - @@ -319,7 +317,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -337,7 +335,7 @@ /> - diff --git a/windows/test/btree2/btree2.vcproj b/windows/test/btree2/btree2.vcproj index b6b25ca..27f4d66 100644 --- a/windows/test/btree2/btree2.vcproj +++ b/windows/test/btree2/btree2.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/btree2dll/btree2dll.vcproj b/windows/test/btree2dll/btree2dll.vcproj index 13c913b..0658779 100644 --- a/windows/test/btree2dll/btree2dll.vcproj +++ b/windows/test/btree2dll/btree2dll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/cache/cache.vcproj b/windows/test/cache/cache.vcproj index c4aea18..d23d7ff 100644 --- a/windows/test/cache/cache.vcproj +++ b/windows/test/cache/cache.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/cache_api/cache_api.vcproj b/windows/test/cache_api/cache_api.vcproj index 509e998..2e53ce9 100644 --- a/windows/test/cache_api/cache_api.vcproj +++ b/windows/test/cache_api/cache_api.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/cache_apidll/cache_apidll.vcproj b/windows/test/cache_apidll/cache_apidll.vcproj index 2e794fd..0e0e50c 100644 --- a/windows/test/cache_apidll/cache_apidll.vcproj +++ b/windows/test/cache_apidll/cache_apidll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -323,7 +321,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -341,7 +339,7 @@ /> - diff --git a/windows/test/cachedll/cachedll.vcproj b/windows/test/cachedll/cachedll.vcproj index 75e7e9e..8593090 100644 --- a/windows/test/cachedll/cachedll.vcproj +++ b/windows/test/cachedll/cachedll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/chunk/chunk.vcproj b/windows/test/chunk/chunk.vcproj index fc1f032..66776b6 100644 --- a/windows/test/chunk/chunk.vcproj +++ b/windows/test/chunk/chunk.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/chunk/Debug/chunk.pch" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/chunk_info/chunk_info.vcproj b/windows/test/chunk_info/chunk_info.vcproj index 332fd1f..ffb1268 100644 --- a/windows/test/chunk_info/chunk_info.vcproj +++ b/windows/test/chunk_info/chunk_info.vcproj @@ -1,11 +1,12 @@ - @@ -124,7 +124,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -148,6 +148,8 @@ LinkIncremental="0" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -202,7 +201,7 @@ - @@ -281,7 +279,7 @@ - diff --git a/windows/test/chunk_infodll/chunk_infodll.vcproj b/windows/test/chunk_infodll/chunk_infodll.vcproj index 32a2635..6637c77 100644 --- a/windows/test/chunk_infodll/chunk_infodll.vcproj +++ b/windows/test/chunk_infodll/chunk_infodll.vcproj @@ -1,11 +1,12 @@ - @@ -124,7 +124,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -148,6 +148,8 @@ LinkIncremental="0" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -202,7 +201,7 @@ - @@ -281,7 +279,7 @@ - diff --git a/windows/test/chunkdll/chunkdll.vcproj b/windows/test/chunkdll/chunkdll.vcproj index d8b9924..2332665 100644 --- a/windows/test/chunkdll/chunkdll.vcproj +++ b/windows/test/chunkdll/chunkdll.vcproj @@ -1,10 +1,11 @@ - @@ -138,7 +138,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/chunkdll/Debug/chunkdll.pch" @@ -155,7 +155,7 @@ /> - @@ -228,7 +227,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -246,7 +245,7 @@ /> - @@ -319,7 +317,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -337,7 +335,7 @@ /> - diff --git a/windows/test/cmpd_dset/cmpd_dset.vcproj b/windows/test/cmpd_dset/cmpd_dset.vcproj index 1901717..9edb3c6 100644 --- a/windows/test/cmpd_dset/cmpd_dset.vcproj +++ b/windows/test/cmpd_dset/cmpd_dset.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/cmpd_dset/Debug/cmpd_dset.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/cmpd_dset/Debug/cmpd_dset.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/cmpd_dsetdll/cmpd_dsetdll.vcproj b/windows/test/cmpd_dsetdll/cmpd_dsetdll.vcproj index 62a2dc02..df44712 100644 --- a/windows/test/cmpd_dsetdll/cmpd_dsetdll.vcproj +++ b/windows/test/cmpd_dsetdll/cmpd_dsetdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/cmpd_dsetdll/Debug/cmpd_dsetdll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/cmpd_dsetdll/Debug/cmpd_dsetdll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/cross_read/cross_read.vcproj b/windows/test/cross_read/cross_read.vcproj index 4498c8c..69ba14d 100644 --- a/windows/test/cross_read/cross_read.vcproj +++ b/windows/test/cross_read/cross_read.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/cross_readdll/cross_readdll.vcproj b/windows/test/cross_readdll/cross_readdll.vcproj index 9f36be3..a8f76bf 100644 --- a/windows/test/cross_readdll/cross_readdll.vcproj +++ b/windows/test/cross_readdll/cross_readdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/dangle/dangle.vcproj b/windows/test/dangle/dangle.vcproj index 8d6b493..12f6ed3 100644 --- a/windows/test/dangle/dangle.vcproj +++ b/windows/test/dangle/dangle.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/dangledll/dangledll.vcproj b/windows/test/dangledll/dangledll.vcproj index 45508c9..5b27d30 100644 --- a/windows/test/dangledll/dangledll.vcproj +++ b/windows/test/dangledll/dangledll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -157,7 +157,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -321,7 +319,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/dsets/dsets.vcproj b/windows/test/dsets/dsets.vcproj index b95c27d..5e0777a 100644 --- a/windows/test/dsets/dsets.vcproj +++ b/windows/test/dsets/dsets.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/dsets/Debug/dsets.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/dsets/Debug/dsets.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/dsetsdll/dsetsdll.vcproj b/windows/test/dsetsdll/dsetsdll.vcproj index ba5330a..afad0af 100644 --- a/windows/test/dsetsdll/dsetsdll.vcproj +++ b/windows/test/dsetsdll/dsetsdll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/dsetsdll/Debug/dsetsdll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/dt_arith/dt_arith.vcproj b/windows/test/dt_arith/dt_arith.vcproj index 339d1d0..eee94f8 100644 --- a/windows/test/dt_arith/dt_arith.vcproj +++ b/windows/test/dt_arith/dt_arith.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/dt_arithdll/dt_arithdll.vcproj b/windows/test/dt_arithdll/dt_arithdll.vcproj index d1aa496..ab8e6c5 100644 --- a/windows/test/dt_arithdll/dt_arithdll.vcproj +++ b/windows/test/dt_arithdll/dt_arithdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/dtransform/dtransform.vcproj b/windows/test/dtransform/dtransform.vcproj index 65df3a9..70c3e54 100644 --- a/windows/test/dtransform/dtransform.vcproj +++ b/windows/test/dtransform/dtransform.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/dtransformdll/dtransformdll.vcproj b/windows/test/dtransformdll/dtransformdll.vcproj index 9a39135..93591a6 100644 --- a/windows/test/dtransformdll/dtransformdll.vcproj +++ b/windows/test/dtransformdll/dtransformdll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -157,7 +157,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -321,7 +319,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/dtypes/dtypes.vcproj b/windows/test/dtypes/dtypes.vcproj index f794445..522603d 100644 --- a/windows/test/dtypes/dtypes.vcproj +++ b/windows/test/dtypes/dtypes.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/dtypes/Debug/dtypes.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/dtypesdll/dtypesdll.vcproj b/windows/test/dtypesdll/dtypesdll.vcproj index 04b2935..5e76dc0 100644 --- a/windows/test/dtypesdll/dtypesdll.vcproj +++ b/windows/test/dtypesdll/dtypesdll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/dtypesdll/Debug/dtypesdll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/earray/earray.vcproj b/windows/test/earray/earray.vcproj index 986c46b..fa78f39 100644 --- a/windows/test/earray/earray.vcproj +++ b/windows/test/earray/earray.vcproj @@ -1,11 +1,12 @@ - @@ -122,7 +122,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -146,6 +146,8 @@ LinkIncremental="2" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -199,7 +198,7 @@ - @@ -277,7 +275,7 @@ - diff --git a/windows/test/earraydll/earraydll.vcproj b/windows/test/earraydll/earraydll.vcproj index faca079..bbee158 100644 --- a/windows/test/earraydll/earraydll.vcproj +++ b/windows/test/earraydll/earraydll.vcproj @@ -1,11 +1,12 @@ - @@ -122,7 +122,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -146,6 +146,8 @@ LinkIncremental="2" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -199,7 +198,7 @@ - @@ -277,7 +275,7 @@ - diff --git a/windows/test/enum/enum.vcproj b/windows/test/enum/enum.vcproj index f2f9251..cfb4a95 100644 --- a/windows/test/enum/enum.vcproj +++ b/windows/test/enum/enum.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/enum/Debug/enum.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/enum/Debug/enum.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/enumdll/enumdll.vcproj b/windows/test/enumdll/enumdll.vcproj index d05b3ba..7cfd34e 100644 --- a/windows/test/enumdll/enumdll.vcproj +++ b/windows/test/enumdll/enumdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/enumdll/Debug/enumdll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/enumdll/Debug/enumdll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/err_compat/err_compat.vcproj b/windows/test/err_compat/err_compat.vcproj index badc2cd..ab17d5c 100644 --- a/windows/test/err_compat/err_compat.vcproj +++ b/windows/test/err_compat/err_compat.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/err_compatdll/err_compatdll.vcproj b/windows/test/err_compatdll/err_compatdll.vcproj index b1d4995..eb2933c 100644 --- a/windows/test/err_compatdll/err_compatdll.vcproj +++ b/windows/test/err_compatdll/err_compatdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/error_test/error_test.vcproj b/windows/test/error_test/error_test.vcproj index 75d802c..cc00f2c 100644 --- a/windows/test/error_test/error_test.vcproj +++ b/windows/test/error_test/error_test.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/error_testdll/error_testdll.vcproj b/windows/test/error_testdll/error_testdll.vcproj index b1fd740..86a3792 100644 --- a/windows/test/error_testdll/error_testdll.vcproj +++ b/windows/test/error_testdll/error_testdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/extend/extend.vcproj b/windows/test/extend/extend.vcproj index 0885791..bf9e712 100644 --- a/windows/test/extend/extend.vcproj +++ b/windows/test/extend/extend.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/extend/Debug/extend.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/extend/Debug/extend.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/extenddll/extenddll.vcproj b/windows/test/extenddll/extenddll.vcproj index 665cdf0..791ff61 100644 --- a/windows/test/extenddll/extenddll.vcproj +++ b/windows/test/extenddll/extenddll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/extenddll/Debug/extenddll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/external/external.vcproj b/windows/test/external/external.vcproj index 19dbb49..7e2e96a 100644 --- a/windows/test/external/external.vcproj +++ b/windows/test/external/external.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/external/Debug/external.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/externaldll/externaldll.vcproj b/windows/test/externaldll/externaldll.vcproj index 4095427..a8716b4 100644 --- a/windows/test/externaldll/externaldll.vcproj +++ b/windows/test/externaldll/externaldll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/externaldll/Debug/externaldll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/externaldll/Debug/externaldll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/farray/farray.vcproj b/windows/test/farray/farray.vcproj index 5b69b6b..376340d 100644 --- a/windows/test/farray/farray.vcproj +++ b/windows/test/farray/farray.vcproj @@ -1,11 +1,12 @@ - @@ -122,7 +122,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -146,6 +146,8 @@ LinkIncremental="2" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -199,7 +198,7 @@ - @@ -277,7 +275,7 @@ - diff --git a/windows/test/farraydll/farraydll.vcproj b/windows/test/farraydll/farraydll.vcproj index 461e3bc..2f7eac7 100644 --- a/windows/test/farraydll/farraydll.vcproj +++ b/windows/test/farraydll/farraydll.vcproj @@ -1,11 +1,12 @@ - @@ -122,7 +122,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -146,6 +146,8 @@ LinkIncremental="2" GenerateDebugInformation="true" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="17" /> - @@ -199,7 +198,7 @@ - @@ -277,7 +275,7 @@ - diff --git a/windows/test/fheap/fheap.vcproj b/windows/test/fheap/fheap.vcproj index 7332814..ec0decb 100644 --- a/windows/test/fheap/fheap.vcproj +++ b/windows/test/fheap/fheap.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/fheapdll/fheapdll.vcproj b/windows/test/fheapdll/fheapdll.vcproj index 6da1230..3690c49 100644 --- a/windows/test/fheapdll/fheapdll.vcproj +++ b/windows/test/fheapdll/fheapdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -323,7 +321,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -341,7 +339,7 @@ /> - diff --git a/windows/test/fillval/fillval.vcproj b/windows/test/fillval/fillval.vcproj index eb07dc6..1e02965 100644 --- a/windows/test/fillval/fillval.vcproj +++ b/windows/test/fillval/fillval.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/fillval/Debug/fillval.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/fillvaldll/fillvaldll.vcproj b/windows/test/fillvaldll/fillvaldll.vcproj index d6a71a9..c130d54 100644 --- a/windows/test/fillvaldll/fillvaldll.vcproj +++ b/windows/test/fillvaldll/fillvaldll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/fillvaldll/Debug/fillvaldll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/fillvaldll/Debug/fillvaldll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/flush1/flush1.vcproj b/windows/test/flush1/flush1.vcproj index 4daa45b..a9fdc83 100644 --- a/windows/test/flush1/flush1.vcproj +++ b/windows/test/flush1/flush1.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/flush1/Debug/flush1.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/flush1/Debug/flush1.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/flush1dll/flush1dll.vcproj b/windows/test/flush1dll/flush1dll.vcproj index a0adb40..4fe9b97 100644 --- a/windows/test/flush1dll/flush1dll.vcproj +++ b/windows/test/flush1dll/flush1dll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/flush1dll/Debug/flush1dll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/flush2/flush2.vcproj b/windows/test/flush2/flush2.vcproj index 211f8e1..bc24074 100644 --- a/windows/test/flush2/flush2.vcproj +++ b/windows/test/flush2/flush2.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/flush2/Debug/flush2.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/flush2dll/flush2dll.vcproj b/windows/test/flush2dll/flush2dll.vcproj index d6b4cf6..ca945a0 100644 --- a/windows/test/flush2dll/flush2dll.vcproj +++ b/windows/test/flush2dll/flush2dll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/flush2dll/Debug/flush2dll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/freespace/freespace.vcproj b/windows/test/freespace/freespace.vcproj index 47a8dd1..2ec5194 100644 --- a/windows/test/freespace/freespace.vcproj +++ b/windows/test/freespace/freespace.vcproj @@ -1,11 +1,12 @@ - - - @@ -277,7 +275,7 @@ - diff --git a/windows/test/freespacedll/freespacedll.vcproj b/windows/test/freespacedll/freespacedll.vcproj index de935d9..18fdea4 100644 --- a/windows/test/freespacedll/freespacedll.vcproj +++ b/windows/test/freespacedll/freespacedll.vcproj @@ -1,11 +1,12 @@ - - - @@ -277,7 +275,7 @@ - diff --git a/windows/test/getname/getname.vcproj b/windows/test/getname/getname.vcproj index 87634d6..9ae3d1e 100644 --- a/windows/test/getname/getname.vcproj +++ b/windows/test/getname/getname.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/getnamedll/getnamedll.vcproj b/windows/test/getnamedll/getnamedll.vcproj index 72f7701..82ebfcd 100644 --- a/windows/test/getnamedll/getnamedll.vcproj +++ b/windows/test/getnamedll/getnamedll.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/getub/getub.vcproj b/windows/test/getub/getub.vcproj index 3229f6f..60cb6d3 100644 --- a/windows/test/getub/getub.vcproj +++ b/windows/test/getub/getub.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\tools\lib,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\tools\lib,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\tools\lib,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/gheap/gheap.vcproj b/windows/test/gheap/gheap.vcproj index 45413e9..ebea71f 100644 --- a/windows/test/gheap/gheap.vcproj +++ b/windows/test/gheap/gheap.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/gheap/Debug/gheap.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/gheap/Debug/gheap.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/gheapdll/gheapdll.vcproj b/windows/test/gheapdll/gheapdll.vcproj index bf1d5a4..3d5b8a6 100644 --- a/windows/test/gheapdll/gheapdll.vcproj +++ b/windows/test/gheapdll/gheapdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/gheapdll/Debug/gheapdll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/gheapdll/Debug/gheapdll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/hyperslab/hyperslab.vcproj b/windows/test/hyperslab/hyperslab.vcproj index c175e20..6e4a929 100644 --- a/windows/test/hyperslab/hyperslab.vcproj +++ b/windows/test/hyperslab/hyperslab.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/hyperslab/Debug/hyperslab.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/hyperslabdll/hyperslabdll.vcproj b/windows/test/hyperslabdll/hyperslabdll.vcproj index 53d7c76..9143be6 100644 --- a/windows/test/hyperslabdll/hyperslabdll.vcproj +++ b/windows/test/hyperslabdll/hyperslabdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -158,7 +158,7 @@ /> - @@ -229,7 +228,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/hyperslabdll/Debug/hyperslabdll.pch" @@ -246,7 +245,7 @@ /> - @@ -319,7 +317,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/hyperslabdll/Debug/hyperslabdll.pch" @@ -336,7 +334,7 @@ /> - diff --git a/windows/test/iopipe/iopipe.vcproj b/windows/test/iopipe/iopipe.vcproj index 1c36adc..e8b62a2 100644 --- a/windows/test/iopipe/iopipe.vcproj +++ b/windows/test/iopipe/iopipe.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/iopipe/Debug/iopipe.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/iopipe/Debug/iopipe.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/iopipedll/iopipedll.vcproj b/windows/test/iopipedll/iopipedll.vcproj index 0327d5b..6fd0524 100644 --- a/windows/test/iopipedll/iopipedll.vcproj +++ b/windows/test/iopipedll/iopipedll.vcproj @@ -1,10 +1,11 @@ - @@ -138,7 +138,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/iopipedll/Debug/iopipedll.pch" @@ -155,7 +155,7 @@ /> - @@ -228,7 +227,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -246,7 +245,7 @@ /> - @@ -319,7 +317,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -337,7 +335,7 @@ /> - diff --git a/windows/test/istore/istore.vcproj b/windows/test/istore/istore.vcproj index 3aeeaf9..9972e26 100644 --- a/windows/test/istore/istore.vcproj +++ b/windows/test/istore/istore.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/istore/Debug/istore.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/istore/Debug/istore.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/istoredll/istoredll.vcproj b/windows/test/istoredll/istoredll.vcproj index 8d21753..6c44f99 100644 --- a/windows/test/istoredll/istoredll.vcproj +++ b/windows/test/istoredll/istoredll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/istoredll/Debug/istoredll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/istoredll/Debug/istoredll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/lheap/lheap.vcproj b/windows/test/lheap/lheap.vcproj index ed33cd6..fd368c1 100644 --- a/windows/test/lheap/lheap.vcproj +++ b/windows/test/lheap/lheap.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/lheap/Debug/lheap.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/lheapdll/lheapdll.vcproj b/windows/test/lheapdll/lheapdll.vcproj index d942fd5..72cbfc8 100644 --- a/windows/test/lheapdll/lheapdll.vcproj +++ b/windows/test/lheapdll/lheapdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/lheapdll/Debug/lheapdll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/lheapdll/Debug/lheapdll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/libtest/libtest.vcproj b/windows/test/libtest/libtest.vcproj index 76c29f0..4b0a007 100644 --- a/windows/test/libtest/libtest.vcproj +++ b/windows/test/libtest/libtest.vcproj @@ -1,9 +1,10 @@ @@ -107,9 +110,6 @@ Name="VCAppVerifierTool" /> - @@ -136,7 +136,7 @@ /> @@ -203,9 +205,6 @@ Name="VCAppVerifierTool" /> - @@ -232,7 +231,7 @@ /> @@ -299,9 +300,6 @@ Name="VCAppVerifierTool" /> - @@ -328,7 +326,7 @@ /> @@ -395,9 +395,6 @@ Name="VCAppVerifierTool" /> - diff --git a/windows/test/links/links.vcproj b/windows/test/links/links.vcproj index 4e1c849..95be919 100644 --- a/windows/test/links/links.vcproj +++ b/windows/test/links/links.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/links/Debug/links.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/links/Debug/links.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/linksdll/linksdll.vcproj b/windows/test/linksdll/linksdll.vcproj index bb20897..1b13968 100644 --- a/windows/test/linksdll/linksdll.vcproj +++ b/windows/test/linksdll/linksdll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/linksdll/Debug/linksdll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/mf/mf.vcproj b/windows/test/mf/mf.vcproj index ae7ca56..541b53e 100644 --- a/windows/test/mf/mf.vcproj +++ b/windows/test/mf/mf.vcproj @@ -1,11 +1,12 @@ - - - @@ -277,7 +275,7 @@ - diff --git a/windows/test/mfdll/mfdll.vcproj b/windows/test/mfdll/mfdll.vcproj index 8806822..fbca153 100644 --- a/windows/test/mfdll/mfdll.vcproj +++ b/windows/test/mfdll/mfdll.vcproj @@ -1,11 +1,12 @@ - - - @@ -277,7 +275,7 @@ - diff --git a/windows/test/mount/mount.vcproj b/windows/test/mount/mount.vcproj index 96b09ab..a378e07 100644 --- a/windows/test/mount/mount.vcproj +++ b/windows/test/mount/mount.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/mount/Debug/mount.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/mountdll/mountdll.vcproj b/windows/test/mountdll/mountdll.vcproj index 6fa9330..4babfc2 100644 --- a/windows/test/mountdll/mountdll.vcproj +++ b/windows/test/mountdll/mountdll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/mountdll/Debug/mountdll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/mtime/mtime.vcproj b/windows/test/mtime/mtime.vcproj index baa7de3..57a5b41 100644 --- a/windows/test/mtime/mtime.vcproj +++ b/windows/test/mtime/mtime.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/mtime/Debug/mtime.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/mtime/Debug/mtime.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/mtimedll/mtimedll.vcproj b/windows/test/mtimedll/mtimedll.vcproj index 9e25e22..dfe6c28 100644 --- a/windows/test/mtimedll/mtimedll.vcproj +++ b/windows/test/mtimedll/mtimedll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/mtimedll/Debug/mtimedll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/mtimedll/Debug/mtimedll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/ntypes/ntypes.vcproj b/windows/test/ntypes/ntypes.vcproj index 62f27cc..6efa879 100644 --- a/windows/test/ntypes/ntypes.vcproj +++ b/windows/test/ntypes/ntypes.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/ntypesdll/ntypesdll.vcproj b/windows/test/ntypesdll/ntypesdll.vcproj index e38bf03..d0eb962 100644 --- a/windows/test/ntypesdll/ntypesdll.vcproj +++ b/windows/test/ntypesdll/ntypesdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/objcopy/objcopy.vcproj b/windows/test/objcopy/objcopy.vcproj index 58b39e9..489a850 100644 --- a/windows/test/objcopy/objcopy.vcproj +++ b/windows/test/objcopy/objcopy.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/objcopydll/objcopydll.vcproj b/windows/test/objcopydll/objcopydll.vcproj index 7756ca4..8d25dbf 100644 --- a/windows/test/objcopydll/objcopydll.vcproj +++ b/windows/test/objcopydll/objcopydll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/ohdr/ohdr.vcproj b/windows/test/ohdr/ohdr.vcproj index 004452d..392ae00 100644 --- a/windows/test/ohdr/ohdr.vcproj +++ b/windows/test/ohdr/ohdr.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/ohdr/Debug/ohdr.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/ohdr/Debug/ohdr.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/ohdrdll/ohdrdll.vcproj b/windows/test/ohdrdll/ohdrdll.vcproj index bc2947e..4bf63c2 100644 --- a/windows/test/ohdrdll/ohdrdll.vcproj +++ b/windows/test/ohdrdll/ohdrdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/ohdrdll/Debug/ohdrdll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/ohdrdll/Debug/ohdrdll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/overhead/overhead.vcproj b/windows/test/overhead/overhead.vcproj index b797467..cea89cb 100644 --- a/windows/test/overhead/overhead.vcproj +++ b/windows/test/overhead/overhead.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/overhead/Debug/overhead.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/overhead/Debug/overhead.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/overheaddll/overheaddll.vcproj b/windows/test/overheaddll/overheaddll.vcproj index 9b8ac8e..e9a0801 100644 --- a/windows/test/overheaddll/overheaddll.vcproj +++ b/windows/test/overheaddll/overheaddll.vcproj @@ -1,10 +1,11 @@ - @@ -138,7 +138,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/overheaddll/Debug/overheaddll.pch" @@ -155,7 +155,7 @@ /> - @@ -228,7 +227,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -246,7 +245,7 @@ /> - @@ -319,7 +317,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -337,7 +335,7 @@ /> - diff --git a/windows/test/pool/pool.vcproj b/windows/test/pool/pool.vcproj index 47e4922..464d240 100644 --- a/windows/test/pool/pool.vcproj +++ b/windows/test/pool/pool.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/pooldll/pooldll.vcproj b/windows/test/pooldll/pooldll.vcproj index 70e2516..5346552 100644 --- a/windows/test/pooldll/pooldll.vcproj +++ b/windows/test/pooldll/pooldll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -323,7 +321,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -341,7 +339,7 @@ /> - diff --git a/windows/test/reserved/reserved.vcproj b/windows/test/reserved/reserved.vcproj index 65ac4a8..2bbbd3d 100644 --- a/windows/test/reserved/reserved.vcproj +++ b/windows/test/reserved/reserved.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/reserveddll/reserveddll.vcproj b/windows/test/reserveddll/reserveddll.vcproj index d49d97c..ca4d75c 100644 --- a/windows/test/reserveddll/reserveddll.vcproj +++ b/windows/test/reserveddll/reserveddll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/set_extent/set_extent.vcproj b/windows/test/set_extent/set_extent.vcproj index 4b95278..9ae1a06 100644 --- a/windows/test/set_extent/set_extent.vcproj +++ b/windows/test/set_extent/set_extent.vcproj @@ -1,9 +1,10 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -233,7 +232,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/test/set_extentdll/set_extentdll.vcproj b/windows/test/set_extentdll/set_extentdll.vcproj index d1f0075..98691a5 100644 --- a/windows/test/set_extentdll/set_extentdll.vcproj +++ b/windows/test/set_extentdll/set_extentdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/stab/stab.vcproj b/windows/test/stab/stab.vcproj index cc024ac..e5bbfdc 100644 --- a/windows/test/stab/stab.vcproj +++ b/windows/test/stab/stab.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/stab/Debug/stab.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/stabdll/stabdll.vcproj b/windows/test/stabdll/stabdll.vcproj index 26f927e..a954b4e 100644 --- a/windows/test/stabdll/stabdll.vcproj +++ b/windows/test/stabdll/stabdll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/stabdll/Debug/stabdll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/tcheckversion/tcheckversion.vcproj b/windows/test/tcheckversion/tcheckversion.vcproj index 0eae847..3f3c8c9 100644 --- a/windows/test/tcheckversion/tcheckversion.vcproj +++ b/windows/test/tcheckversion/tcheckversion.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/tcheckversion/Debug/tcheckversion.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/tcheckversion/Debug/tcheckversion.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/tcheckversiondll/tcheckversiondll.vcproj b/windows/test/tcheckversiondll/tcheckversiondll.vcproj index 8139dcc..7fccf05 100644 --- a/windows/test/tcheckversiondll/tcheckversiondll.vcproj +++ b/windows/test/tcheckversiondll/tcheckversiondll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/tcheckversiondll/Debug/tcheckversiondll.pch" @@ -156,7 +156,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\test,..\..\..\src" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -340,7 +338,7 @@ /> - diff --git a/windows/test/tellub/tellub.vcproj b/windows/test/tellub/tellub.vcproj index 5f62717..a8be4e3 100644 --- a/windows/test/tellub/tellub.vcproj +++ b/windows/test/tellub/tellub.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -324,7 +322,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/testhdf5/testhdf5.vcproj b/windows/test/testhdf5/testhdf5.vcproj index 8981304..326da30 100644 --- a/windows/test/testhdf5/testhdf5.vcproj +++ b/windows/test/testhdf5/testhdf5.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="_CONSOLE;_DEBUG;WIN32" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_CONSOLE;_DEBUG;WIN32" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/testhdf5/Debug/testhdf5.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="_CONSOLE;NDEBUG;WIN32" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_CONSOLE;NDEBUG;WIN32" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="_CONSOLE;NDEBUG;WIN32" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_CONSOLE;NDEBUG;WIN32" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/test/testhdf5dll/testhdf5dll.vcproj b/windows/test/testhdf5dll/testhdf5dll.vcproj index 6291c6c..21fdfd0 100644 --- a/windows/test/testhdf5dll/testhdf5dll.vcproj +++ b/windows/test/testhdf5dll/testhdf5dll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="_CONSOLE;_HDF5USEDLL_;NDEBUG;WIN32;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_CONSOLE;_HDF5USEDLL_;NDEBUG;WIN32;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -158,7 +158,7 @@ /> - @@ -229,7 +228,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="_CONSOLE;_HDF5USEDLL_;_DEBUG;WIN32;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_CONSOLE;_HDF5USEDLL_;_DEBUG;WIN32;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/testhdf5dll/Debug/testhdf5dll.pch" @@ -246,7 +245,7 @@ /> - @@ -319,7 +317,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="_CONSOLE;_HDF5USEDLL_;_DEBUG;WIN32;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_CONSOLE;_HDF5USEDLL_;_DEBUG;WIN32;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/testhdf5dll/Debug/testhdf5dll.pch" @@ -336,7 +334,7 @@ /> - diff --git a/windows/test/ttsafedll/ttsafedll.vcproj b/windows/test/ttsafedll/ttsafedll.vcproj index cd4d98f..a364040 100644 --- a/windows/test/ttsafedll/ttsafedll.vcproj +++ b/windows/test/ttsafedll/ttsafedll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/unlink/unlink.vcproj b/windows/test/unlink/unlink.vcproj index a808bb3..65f6fa7 100644 --- a/windows/test/unlink/unlink.vcproj +++ b/windows/test/unlink/unlink.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/unlink/Debug/unlink.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/unlink/Debug/unlink.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/test/unlinkdll/unlinkdll.vcproj b/windows/test/unlinkdll/unlinkdll.vcproj index 3d0ae09..83d0e5f 100644 --- a/windows/test/unlinkdll/unlinkdll.vcproj +++ b/windows/test/unlinkdll/unlinkdll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/unlinkdll/Debug/unlinkdll.pch" @@ -248,7 +247,7 @@ /> - @@ -322,7 +320,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\test" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../test/unlinkdll/Debug/unlinkdll.pch" @@ -339,7 +337,7 @@ /> - diff --git a/windows/test/vfd/vfd.vcproj b/windows/test/vfd/vfd.vcproj index eb397e3..ec1e5ae 100644 --- a/windows/test/vfd/vfd.vcproj +++ b/windows/test/vfd/vfd.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/test/vfddll/vfddll.vcproj b/windows/test/vfddll/vfddll.vcproj index ad50e46..44508fe 100644 --- a/windows/test/vfddll/vfddll.vcproj +++ b/windows/test/vfddll/vfddll.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_;_HDF5TESTUSEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - diff --git a/windows/tools/h5copy/h5copy.vcproj b/windows/tools/h5copy/h5copy.vcproj index bc0a7cf..3e5c9db 100644 --- a/windows/tools/h5copy/h5copy.vcproj +++ b/windows/tools/h5copy/h5copy.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/tools/h5copy/testh5copy.bat b/windows/tools/h5copy/testh5copy.bat index 6207521..a0e164a 100644 --- a/windows/tools/h5copy/testh5copy.bat +++ b/windows/tools/h5copy/testh5copy.bat @@ -26,6 +26,9 @@ rem setup to support it if we do in the future. --SJW 8/22/07 setlocal enabledelayedexpansion pushd %~dp0 +set EXIT_SUCCESS=0 +set EXIT_FAILURE=1 + rem The tool name set h5copy=h5copy%2 rem The path of the tool binary @@ -44,7 +47,8 @@ set h5ls_bin=%CD%\..\%h5ls%\%1\%h5ls% set /a nerrors=0 set verbose=yes -set srcfile=h5copytst.h5 +set srcfile1=h5copytst.h5 +set srcfile2=h5copy_ref.h5 set indir=%CD%\testfiles set outdir=%CD%\..\testfiles @@ -123,7 +127,7 @@ rem $* everything else arguments for h5copy. if "%3"=="-o" ( set outputfile=%4 ) else ( - set h5diff=no + set runh5diff=no ) ( @@ -164,7 +168,7 @@ rem $* everything else arguments for h5copy. if "%3"=="-o" ( set outputfile=%4 ) else ( - set h5diff=no + set runh5diff=no ) ( @@ -293,8 +297,8 @@ rem Assumed arguments: rem :copyobjects - set testfile=%indir%\%srcfile% - set fileout=%outdir%\%srcfile:.h5=.out.h5% + set testfile=%indir%\%srcfile1% + set fileout=%outdir%\%srcfile1:.h5=.out.h5% rem Remove any output file left over from previous test run del /f %fileout% 2> nul @@ -346,6 +350,34 @@ rem exit /b + +rem Copy references in various way. +rem adding to the destination file each time compare the result +rem +rem Assumed arguments: +rem +:copyreferences + + set testfile=%indir%\%srcfile2% + set fileout=%outdir%\%srcfile2:.h5=.out.h5% + + rem Remove any output file left over from previous test run + del /f %fileout% 2> nul + + echo.Test copying object and region references + rem echo.TOOLTEST -f ref -i $TESTFILE -o $FILEOUT -v -s / -d /COPY + call :tooltest -f ref -i %testfile% -o %fileout% -v -s / -d /COPY + + rem Verify that the file created above is correct + call :h5lstest %fileout% + + rem Remove output file created, if the "no cleanup" environment variable is + rem not defined + if not defined HDF5_NOCLEANUP ( + del /f %fileout% + ) + + exit /b rem ############################################################################## rem ### T H E T E S T S ### @@ -353,6 +385,7 @@ rem ############################################################################ :main call :copyobjects + call :copyreferences if %nerrors% equ 0 ( echo.All h5copy tests passed. diff --git a/windows/tools/h5debug/h5debug.vcproj b/windows/tools/h5debug/h5debug.vcproj index 8a3ad7a..82143a9 100644 --- a/windows/tools/h5debug/h5debug.vcproj +++ b/windows/tools/h5debug/h5debug.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5debug/Debug/h5debug.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/tools/h5debugdll/h5debugdll.vcproj b/windows/tools/h5debugdll/h5debugdll.vcproj index 2fe2041..4c9131e 100644 --- a/windows/tools/h5debugdll/h5debugdll.vcproj +++ b/windows/tools/h5debugdll/h5debugdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -158,7 +158,7 @@ /> - @@ -229,7 +228,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5debugdll/Debug/h5debugdll.pch" @@ -246,7 +245,7 @@ /> - @@ -319,7 +317,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5debugdll/Debug/h5debugdll.pch" @@ -336,7 +334,7 @@ /> - diff --git a/windows/tools/h5diff/h5diff.vcproj b/windows/tools/h5diff/h5diff.vcproj index 038f651..5e8de50 100644 --- a/windows/tools/h5diff/h5diff.vcproj +++ b/windows/tools/h5diff/h5diff.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -161,7 +161,7 @@ /> - @@ -236,7 +235,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -254,7 +253,7 @@ /> - @@ -329,7 +327,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -347,7 +345,7 @@ /> - diff --git a/windows/tools/h5diff/testh5diff.bat b/windows/tools/h5diff/testh5diff.bat index 4b5f265..afbef81 100644 --- a/windows/tools/h5diff/testh5diff.bat +++ b/windows/tools/h5diff/testh5diff.bat @@ -16,7 +16,7 @@ rem rem Tests for the h5diff tool rem rem Created: Scott Wegner, 8/22/07 -rem Modified: Scott Wegner, 11/19/07 +rem Modified: Allen Byrne, 2/23/10 rem setlocal enabledelayedexpansion @@ -39,6 +39,15 @@ set srcfile8=h5diff_dset2.h5 set srcfile9=h5diff_hyper1.h5 set srcfile10=h5diff_hyper2.h5 set srcfile11=h5diff_empty.h5 +set srcfile12=h5diff_links.h5 +set srcfile13=h5diff_softlinks.h5 +set srcfile14=h5diff_linked_softlink.h5 +set srcfile15=h5diff_extlink_src.h5 +set srcfile16=h5diff_extlink_trg.h5 +set srcfile17=h5diff_ext2softlink_src.h5 +set srcfile18=h5diff_ext2softlink_trg.h5 +set srclnkfile1=h5diff_danglelinks1.h5 +set srclnkfile2=h5diff_danglelinks2.h5 set file1=%indir%\h5diff_basic1.h5 set file2=%indir%\h5diff_basic2.h5 @@ -51,6 +60,15 @@ set file8=%indir%\h5diff_dset2.h5 set file9=%indir%\h5diff_hyper1.h5 set file10=%indir%\h5diff_hyper2.h5 set file11=%indir%\h5diff_empty.h5 +set file12=%indir%\h5diff_links.h5 +set file13=%indir%\h5diff_softlinks.h5 +set file14=%indir%\h5diff_linked_softlink.h5 +set file15=%indir%\h5diff_extlink_src.h5 +set file16=%indir%\h5diff_extlink_trg.h5 +set file17=%indir%\h5diff_ext2softlink_src.h5 +set file18=%indir%\h5diff_ext2softlink_trg.h5 +set lnkfile1=%indir%\h5diff_danglelinks1.h5 +set lnkfile2=%indir%\h5diff_danglelinks2.h5 rem The tool name @@ -58,6 +76,9 @@ set h5diff=h5diff%2 rem The path of the tool binary set h5diff_bin=%CD%\..\%h5diff%\%1\%h5diff% +set EXIT_SUCCESS=0 +set EXIT_FAILURE=1 + set /a nerrors=0 set verbose=yes rem default to run h5diff tests @@ -155,12 +176,14 @@ rem %h5diff_bin% %params% popd ) > %actual% 2> %actual_err% + set EXIT_CODE=!errorlevel! rem save actual and actual_err in case they are needed later. copy /y %actual% %actual_sav% > nul call :stdout_filter %actual% copy /y %actual_err% %actual_err_sav% > nul call :stderr_filter %actual_err% type %actual_err% >> %actual% + echo EXIT CODE: !EXIT_CODE! >> %actual% if not exist %expect% ( rem Create the expect file if it doesn't yet exist. @@ -532,13 +555,172 @@ rem ############################################################################ call :testing %h5diff% -c %srcfile2% %srcfile2% g2/dset5 g2/dset6 call :tooltest h5diff_205.txt -c %file2% %file2% g2/dset5 g2/dset6 - rem New option added rev #16461 - ADB 2/11/2009 + rem New option added - ADB 2/11/2009 rem # not comparable in compound call :testing %h5diff% -c %srcfile2% %srcfile2% g2/dset7 g2/dset8 call :tooltest h5diff_206.txt -c %file2% %file2% g2/dset7 g2/dset8 call :testing %h5diff% -c %srcfile2% %srcfile2% g2/dset8 g2/dset9 call :tooltest h5diff_207.txt -c %file2% %file2% g2/dset8 g2/dset9 + + rem ############################################################################## + rem # Links compare without --follow-links nor --no-dangling-links + rem ############################################################################## + rem test for bug1749 + call :testing %h5diff% -v %srcfile12% %srcfile12% /link_g1 /link_g2 + call :tooltest h5diff_300.txt -v %file12% %file12% /link_g1 /link_g2 + + rem ############################################################################## + rem # Links compare with --follow-links Only + rem ############################################################################## + rem soft links file to file + call :testing %h5diff% --follow-links -v %srcfile13% %srcfile13% + call :tooltest h5diff_400.txt --follow-links -v %file13% %file13% + + rem softlink vs dset" + call :testing %h5diff% --follow-links -v %srcfile13% %srcfile13% /softlink_dset1_1 /target_dset2 + call :tooltest h5diff_401.txt --follow-links -v %file13% %file13% /softlink_dset1_1 /target_dset2 + + rem dset vs softlink" + call :testing %h5diff% --follow-links -v %srcfile13% %srcfile13% /target_dset2 /softlink_dset1_1 + call :tooltest h5diff_402.txt --follow-links -v %file13% %file13% /target_dset2 /softlink_dset1_1 + + rem softlink vs softlink" + call :testing %h5diff% --follow-links -v %srcfile13% %srcfile13% /softlink_dset1_1 /softlink_dset2 + call :tooltest h5diff_403.txt --follow-links -v %file13% %file13% /softlink_dset1_1 /softlink_dset2 + + rem extlink vs extlink (FILE)" + call :testing %h5diff% --follow-links -v %srcfile15% %srcfile15% + call :tooltest h5diff_404.txt --follow-links -v %file15% %file15% + + rem extlink vs dset" + call :testing %h5diff% --follow-links -v %srcfile15% %srcfile16% /ext_link_dset1 /target_group2/x_dset + call :tooltest h5diff_405.txt --follow-links -v %file15% %file16% /ext_link_dset1 /target_group2/x_dset + + rem dset vs extlink" + call :testing %h5diff% --follow-links -v %srcfile16% %srcfile15% /target_group2/x_dset /ext_link_dset1 + call :tooltest h5diff_406.txt --follow-links -v %file16% %file15% /target_group2/x_dset /ext_link_dset1 + + rem extlink vs extlink" + call :testing %h5diff% --follow-links -v %srcfile15% %srcfile15% /ext_link_dset1 /ext_link_dset2 + call :tooltest h5diff_407.txt --follow-links -v %file15% %file15% /ext_link_dset1 /ext_link_dset2 + + rem softlink vs extlink" + call :testing %h5diff% --follow-links -v %srcfile13% %srcfile15% /softlink_dset1_1 /ext_link_dset2 + call :tooltest h5diff_408.txt --follow-links -v %file13% %file15% /softlink_dset1_1 /ext_link_dset2 + + rem extlink vs softlink " + call :testing %h5diff% --follow-links -v %srcfile15% %srcfile13% /ext_link_dset2 /softlink_dset1_1 + call :tooltest h5diff_409.txt --follow-links -v %file15% %file13% /ext_link_dset2 /softlink_dset1_1 + + rem linked_softlink vs linked_softlink (FILE)" + call :testing %h5diff% --follow-links -v %srcfile14% %srcfile14% + call :tooltest h5diff_410.txt --follow-links -v %file14% %file14% + + rem dset2 vs linked_softlink_dset1" + call :testing %h5diff% --follow-links -v %srcfile14% %srcfile14% /target_dset2 /softlink1_to_slink2 + call :tooltest h5diff_411.txt --follow-links -v %file14% %file14% /target_dset2 /softlink1_to_slink2 + + rem rem linked_softlink_dset1 vs dset2" + call :testing %h5diff% --follow-links -v %srcfile14% %srcfile14% /softlink1_to_slink2 /target_dset2 + call :tooltest h5diff_412.txt --follow-links -v %file14% %file14% /softlink1_to_slink2 /target_dset2 + + rem linked_softlink_to_dset1 vs linked_softlink_to_dset2" + call :testing %h5diff% --follow-links -v %srcfile14% %srcfile14% /softlink1_to_slink2 /softlink2_to_slink2 + call :tooltest h5diff_413.txt --follow-links -v %file14% %file14% /softlink1_to_slink2 /softlink2_to_slink2 + + rem group vs linked_softlink_group1" + call :testing %h5diff% --follow-links -v %srcfile14% %srcfile14% /target_group /softlink3_to_slink2 + call :tooltest h5diff_414.txt --follow-links -v %file14% %file14% /target_group /softlink3_to_slink2 + + rem linked_softlink_group1 vs group" + call :testing %h5diff% --follow-links -v %srcfile14% %srcfile14% /softlink3_to_slink2 /target_group + call :tooltest h5diff_415.txt --follow-links -v %file14% %file14% /softlink3_to_slink2 /target_group + + rem linked_softlink_to_group1 vs linked_softlink_to_group2" + call :testing %h5diff% --follow-links -v %srcfile14% %srcfile14% /softlink3_to_slink2 /softlink4_to_slink2 + call :tooltest h5diff_416.txt --follow-links -v %file14% %file14% /softlink3_to_slink2 /softlink4_to_slink2 + + rem non-exist-softlink vs softlink" + call :testing %h5diff% --follow-links -v %srcfile13% %srcfile13% /softlink_noexist /softlink_dset2 + call :tooltest h5diff_417.txt --follow-links -v %file13% %file13% /softlink_noexist /softlink_dset2 + + rem softlink vs non-exist-softlink" + call :testing %h5diff% --follow-links -v %srcfile13% %srcfile13% /softlink_dset2 /softlink_noexist + call :tooltest h5diff_418.txt --follow-links -v %file13% %file13% /softlink_dset2 /softlink_noexist + + rem non-exist-extlink_file vs extlink" + call :testing %h5diff% --follow-links -v %srcfile15% %srcfile15% /ext_link_noexist2 /ext_link_dset2 + call :tooltest h5diff_419.txt --follow-links -v %file15% %file15% /ext_link_noexist2 /ext_link_dset2 + + rem exlink vs non-exist-extlink_file" + call :testing %h5diff% --follow-links -v %srcfile15% %srcfile15% /ext_link_dset2 /ext_link_noexist2 + call :tooltest h5diff_420.txt --follow-links -v %file15% %file15% /ext_link_dset2 /ext_link_noexist2 + + rem extlink vs non-exist-extlink_obj" + call :testing %h5diff% --follow-links -v %srcfile15% %srcfile15% /ext_link_dset2 /ext_link_noexist1 + call :tooltest h5diff_421.txt --follow-links -v %file15% %file15% /ext_link_dset2 /ext_link_noexist1 + + rem non-exist-extlink_obj vs extlink" + call :testing %h5diff% --follow-links -v %srcfile15% %srcfile15% /ext_link_noexist1 /ext_link_dset2 + call :tooltest h5diff_422.txt --follow-links -v %file15% %file15% /ext_link_noexist1 /ext_link_dset2 + + rem extlink_to_softlink_to_dset1 vs dset2" + call :testing %h5diff% --follow-links -v %srcfile17% %srcfile18% /ext_link_to_slink1 /dset2 + call :tooltest h5diff_423.txt --follow-links -v %file17% %file18% /ext_link_to_slink1 /dset2 + + rem dset2 vs extlink_to_softlink_to_dset1" + call :testing %h5diff% --follow-links -v %srcfile18% %srcfile17% /dset2 /ext_link_to_slink1 + call :tooltest h5diff_424.txt --follow-links -v %file18% %file17% /dset2 /ext_link_to_slink1 + + rem extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2" + call :testing %h5diff% --follow-links -v %srcfile17% %srcfile17% /ext_link_to_slink1 /ext_link_to_slink2 + call :tooltest h5diff_425.txt --follow-links -v %file17% %file17% /ext_link_to_slink1 /ext_link_to_slink2 + + + rem ############################################################################## + rem # Dangling links compare (--follow-links and --no-dangling-links) + rem ############################################################################## + rem dangling links --follow-links (FILE to FILE) + call :testing %h5diff% --follow-links -v %srclnkfile1% %srclnkfile2% + call :tooltest h5diff_450.txt --follow-links -v %lnkfile1% %lnkfile2% + + rem dangling links --follow-links and --no-dangling-links (FILE to FILE) + call :testing %h5diff% --follow-links -v --no-dangling-links %srclnkfile1% %srclnkfile2% + call :tooltest h5diff_451.txt --follow-links -v --no-dangling-links %lnkfile1% %lnkfile2% + + rem try --no-dangling-links without --follow-links options + call :testing %h5diff% --no-dangling-links %srcfile13% %srcfile13% + call :tooltest h5diff_452.txt --no-dangling-links %file13% %file13% + + rem dangling link found for soft links (FILE to FILE) + call :testing %h5diff% --follow-links -v --no-dangling-links %srcfile13% %srcfile13% + call :tooltest h5diff_453.txt --follow-links -v --no-dangling-links %file13% %file13% + + rem dangling link found for soft links (obj to obj) + call :testing %h5diff% --follow-links -v --no-dangling-links %srcfile13% %srcfile13% /softlink_dset2 /softlink_noexist + call :tooltest h5diff_454.txt --follow-links -v --no-dangling-links %file13% %file13% /softlink_dset2 /softlink_noexist + + rem dangling link found for soft links (obj to obj) Both dangle links + call :testing %h5diff% --follow-links -v --no-dangling-links %srcfile13% %srcfile13% /softlink_noexist /softlink_noexist + call :tooltest h5diff_455.txt --follow-links -v --no-dangling-links %file13% %file13% /softlink_noexist /softlink_noexist + + rem dangling link found for ext links (FILE to FILE) + call :testing %h5diff% --follow-links -v --no-dangling-links %srcfile15% %srcfile15% + call :tooltest h5diff_456.txt --follow-links -v --no-dangling-links %file15% %file15% + + rem dangling link found for ext links (obj to obj). target file exist + call :testing %h5diff% --follow-links -v --no-dangling-links %srcfile15% %srcfile15% /ext_link_dset1 /ext_link_noexist1 + call :tooltest h5diff_457.txt --follow-links -v --no-dangling-links %file15% %file15% /ext_link_dset1 /ext_link_noexist1 + + rem dangling link found for ext links (obj to obj). target file NOT exist + call :testing %h5diff% --follow-links -v --no-dangling-links %srcfile15% %srcfile15% /ext_link_dset1 /ext_link_noexist2 + call :tooltest h5diff_458.txt --follow-links -v --no-dangling-links %file15% %file15% /ext_link_dset1 /ext_link_noexist2 + + rem dangling link found for ext links (obj to obj). Both dangle links + call :testing %h5diff% --follow-links -v --no-dangling-links %srcfile15% %srcfile15% /ext_link_noexist1 /ext_link_noexist2 + call :tooltest h5diff_459.txt --follow-links -v --no-dangling-links %file15% %file15% /ext_link_noexist1 /ext_link_noexist2 + rem ############################################################################## rem # END diff --git a/windows/tools/h5diffdll/h5diffdll.vcproj b/windows/tools/h5diffdll/h5diffdll.vcproj index 6310151..bd153bd 100644 --- a/windows/tools/h5diffdll/h5diffdll.vcproj +++ b/windows/tools/h5diffdll/h5diffdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -158,7 +158,7 @@ /> - @@ -229,7 +228,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -247,7 +246,7 @@ /> - @@ -320,7 +318,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -338,7 +336,7 @@ /> - diff --git a/windows/tools/h5dump/h5dump.vcproj b/windows/tools/h5dump/h5dump.vcproj index 38e38c3..d3e6d71 100644 --- a/windows/tools/h5dump/h5dump.vcproj +++ b/windows/tools/h5dump/h5dump.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5dump/Debug/h5dump.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/tools/h5dumpdll/h5dumpdll.vcproj b/windows/tools/h5dumpdll/h5dumpdll.vcproj index db20eef..bbe33d0 100644 --- a/windows/tools/h5dumpdll/h5dumpdll.vcproj +++ b/windows/tools/h5dumpdll/h5dumpdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -158,7 +158,7 @@ /> - @@ -230,7 +229,7 @@ AdditionalOptions="/I /I"..\..tools"/Fp"Debug/h5dumpdll.pch" " Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5dumpdll/Debug/h5dumpdll.pch" @@ -247,7 +246,7 @@ /> - @@ -321,7 +319,7 @@ AdditionalOptions="/I /I"..\..tools"/Fp"Debug/h5dumpdll.pch" " Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5dumpdll/Debug/h5dumpdll.pch" @@ -338,7 +336,7 @@ /> - diff --git a/windows/tools/h5import/h5import.vcproj b/windows/tools/h5import/h5import.vcproj index c50e224..72cdb7b 100644 --- a/windows/tools/h5import/h5import.vcproj +++ b/windows/tools/h5import/h5import.vcproj @@ -1,10 +1,11 @@ - @@ -138,7 +138,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="0" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5import/Release/h5import.pch" @@ -154,7 +154,7 @@ /> - @@ -227,7 +226,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5import/Debug/h5import.pch" @@ -244,7 +243,7 @@ /> - @@ -319,7 +317,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5import/Debug/h5import.pch" @@ -336,7 +334,7 @@ /> - diff --git a/windows/tools/h5importdll/h5importdll.vcproj b/windows/tools/h5importdll/h5importdll.vcproj index 175fe2d..9960816 100644 --- a/windows/tools/h5importdll/h5importdll.vcproj +++ b/windows/tools/h5importdll/h5importdll.vcproj @@ -1,10 +1,11 @@ - @@ -136,7 +136,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="2" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5importdll/Release/h5importdll.pch" @@ -152,7 +152,7 @@ /> - @@ -223,7 +222,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5importdll/Debug/h5importdll.pch" @@ -240,7 +239,7 @@ /> - @@ -313,7 +311,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5importdll/Debug/h5importdll.pch" @@ -330,7 +328,7 @@ /> - diff --git a/windows/tools/h5jam/h5jam.vcproj b/windows/tools/h5jam/h5jam.vcproj index c27cd36..37b1835 100644 --- a/windows/tools/h5jam/h5jam.vcproj +++ b/windows/tools/h5jam/h5jam.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -324,7 +322,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -342,7 +340,7 @@ /> - diff --git a/windows/tools/h5ls/h5ls.vcproj b/windows/tools/h5ls/h5ls.vcproj index d843ba5..e1001ef 100644 --- a/windows/tools/h5ls/h5ls.vcproj +++ b/windows/tools/h5ls/h5ls.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5ls/Debug/h5ls.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5ls/Debug/h5ls.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/tools/h5lsdll/h5lsdll.vcproj b/windows/tools/h5lsdll/h5lsdll.vcproj index f6f280e..7d1dc0e 100644 --- a/windows/tools/h5lsdll/h5lsdll.vcproj +++ b/windows/tools/h5lsdll/h5lsdll.vcproj @@ -1,10 +1,11 @@ - @@ -138,7 +138,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5lsdll/Debug/h5lsdll.pch" @@ -155,7 +155,7 @@ /> - @@ -228,7 +227,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -246,7 +245,7 @@ /> - @@ -319,7 +317,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -337,7 +335,7 @@ /> - diff --git a/windows/tools/h5mkgrp/h5mkgrp.vcproj b/windows/tools/h5mkgrp/h5mkgrp.vcproj index 729ad04..e6f8259 100644 --- a/windows/tools/h5mkgrp/h5mkgrp.vcproj +++ b/windows/tools/h5mkgrp/h5mkgrp.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -323,7 +321,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -341,7 +339,7 @@ /> - diff --git a/windows/tools/h5repack/h5repack.vcproj b/windows/tools/h5repack/h5repack.vcproj index d251153..5025431 100644 --- a/windows/tools/h5repack/h5repack.vcproj +++ b/windows/tools/h5repack/h5repack.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib,..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -252,7 +251,7 @@ /> - @@ -328,7 +326,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib,..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -347,7 +345,7 @@ /> - diff --git a/windows/tools/h5repackdll/h5repackdll.vcproj b/windows/tools/h5repackdll/h5repackdll.vcproj index 651e0a4..cde7ab3 100644 --- a/windows/tools/h5repackdll/h5repackdll.vcproj +++ b/windows/tools/h5repackdll/h5repackdll.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib,..\..\..\test" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -157,7 +157,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -321,7 +319,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib,..\..\..\test" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -339,7 +337,7 @@ /> - diff --git a/windows/tools/h5repart/h5repart.vcproj b/windows/tools/h5repart/h5repart.vcproj index 09e2c80..19fb2c0 100644 --- a/windows/tools/h5repart/h5repart.vcproj +++ b/windows/tools/h5repart/h5repart.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5repart/Debug/h5repart.pch" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5repart/Debug/h5repart.pch" @@ -342,7 +340,7 @@ /> - diff --git a/windows/tools/h5repartdll/h5repartdll.vcproj b/windows/tools/h5repartdll/h5repartdll.vcproj index aef32ab..498b38f 100644 --- a/windows/tools/h5repartdll/h5repartdll.vcproj +++ b/windows/tools/h5repartdll/h5repartdll.vcproj @@ -1,10 +1,11 @@ - @@ -138,7 +138,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;_DEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" RuntimeLibrary="3" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../tools/h5repartdll/Debug/h5repartdll.pch" @@ -155,7 +155,7 @@ /> - @@ -228,7 +227,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -246,7 +245,7 @@ /> - @@ -319,7 +317,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;NDEBUG;WIN32;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -337,7 +335,7 @@ /> - diff --git a/windows/tools/h5stat/h5stat.vcproj b/windows/tools/h5stat/h5stat.vcproj index 6c9bc8a..f9b5d12 100644 --- a/windows/tools/h5stat/h5stat.vcproj +++ b/windows/tools/h5stat/h5stat.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/tools/h5stat/testh5stat.bat b/windows/tools/h5stat/testh5stat.bat index 06ab4ba..3969c7e 100644 --- a/windows/tools/h5stat/testh5stat.bat +++ b/windows/tools/h5stat/testh5stat.bat @@ -22,6 +22,9 @@ rem setlocal enabledelayedexpansion pushd %~dp0 +set EXIT_SUCCESS=0 +set EXIT_FAILURE=1 + set h5pubconf=%CD%\..\..\src\h5pubconf.h rem Determine which filters are available @@ -160,11 +163,15 @@ rem ############################################################################ call :tooltest h5stat_filters-d.ddl -d h5stat_filters.h5 call :tooltest h5stat_filters-g.ddl -g h5stat_filters.h5 call :tooltest h5stat_filters-dT.ddl -dT h5stat_filters.h5 + call :tooltest h5stat_filters-UD.ddl -D h5stat_filters.h5 + call :tooltest h5stat_filters-UT.ddl -T h5stat_filters.h5 rem h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c rem as of release 1.8.0-alpha4 call :tooltest h5stat_tsohm.ddl h5stat_tsohm.h5 rem h5stat_newgrat.h5 is generated by h5stat_gentest.c call :tooltest h5stat_newgrat.ddl h5stat_newgrat.h5 + call :tooltest h5stat_newgrat-UG.ddl -G h5stat_newgrat.h5 + call :tooltest h5stat_newgrat-UA.ddl -A h5stat_newgrat.h5 echo. if %nerrors% equ 0 ( diff --git a/windows/tools/h5statdll/h5statdll.vcproj b/windows/tools/h5statdll/h5statdll.vcproj index 0312772..265de0e 100644 --- a/windows/tools/h5statdll/h5statdll.vcproj +++ b/windows/tools/h5statdll/h5statdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -323,7 +321,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -341,7 +339,7 @@ /> - diff --git a/windows/tools/h5unjam/h5unjam.vcproj b/windows/tools/h5unjam/h5unjam.vcproj index 20c2f2c..c547869 100644 --- a/windows/tools/h5unjam/h5unjam.vcproj +++ b/windows/tools/h5unjam/h5unjam.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -324,7 +322,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src,..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -342,7 +340,7 @@ /> - diff --git a/windows/tools/talign/talign.vcproj b/windows/tools/talign/talign.vcproj index eb59c88..48d7cce 100644 --- a/windows/tools/talign/talign.vcproj +++ b/windows/tools/talign/talign.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\tools\misc,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\tools\misc,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -327,7 +325,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\tools\misc,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -345,7 +343,7 @@ /> - diff --git a/windows/tools/taligndll/taligndll.vcproj b/windows/tools/taligndll/taligndll.vcproj index 61ec1a2..479457d 100644 --- a/windows/tools/taligndll/taligndll.vcproj +++ b/windows/tools/taligndll/taligndll.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\tools\misc,..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\tools\misc,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -323,7 +321,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\tools\misc,..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE;_HDF5USEDLL_" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -341,7 +339,7 @@ /> - diff --git a/windows/tools/testfiles/binread/binread.vcproj b/windows/tools/testfiles/binread/binread.vcproj index c839004..428e949 100644 --- a/windows/tools/testfiles/binread/binread.vcproj +++ b/windows/tools/testfiles/binread/binread.vcproj @@ -1,10 +1,11 @@ - @@ -137,7 +137,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -154,7 +154,7 @@ /> - @@ -224,7 +223,7 @@ - @@ -313,7 +311,7 @@ - diff --git a/windows/tools/testfiles/h5difftst/h5difftst.vcproj b/windows/tools/testfiles/h5difftst/h5difftst.vcproj index b1dc72b..6b0bc49 100644 --- a/windows/tools/testfiles/h5difftst/h5difftst.vcproj +++ b/windows/tools/testfiles/h5difftst/h5difftst.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -160,7 +160,7 @@ /> - @@ -233,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -251,7 +250,7 @@ /> - @@ -326,7 +324,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -344,7 +342,7 @@ /> - @@ -405,11 +402,11 @@ Filter="h;hpp;hxx;hm;inl;fi;fd" > diff --git a/windows/tools/testfiles/h5dumptst/h5dumptst.vcproj b/windows/tools/testfiles/h5dumptst/h5dumptst.vcproj index 4846853..6fc9d0a 100644 --- a/windows/tools/testfiles/h5dumptst/h5dumptst.vcproj +++ b/windows/tools/testfiles/h5dumptst/h5dumptst.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\../../../../tools/testfiles/h5dumptst/Debug/h5dumptst.pch" @@ -157,7 +157,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -325,7 +323,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -343,7 +341,7 @@ /> - diff --git a/windows/tools/testfiles/h5importtst/h5importtst.vcproj b/windows/tools/testfiles/h5importtst/h5importtst.vcproj index 3152347..81bc060 100644 --- a/windows/tools/testfiles/h5importtst/h5importtst.vcproj +++ b/windows/tools/testfiles/h5importtst/h5importtst.vcproj @@ -1,10 +1,11 @@ - @@ -139,7 +139,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -157,7 +157,7 @@ /> - @@ -230,7 +229,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -248,7 +247,7 @@ /> - @@ -321,7 +319,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -339,7 +337,7 @@ /> - diff --git a/windows/tools/testfiles/h5jamtst/h5jamtst.vcproj b/windows/tools/testfiles/h5jamtst/h5jamtst.vcproj index 2673a6b..44284e1 100644 --- a/windows/tools/testfiles/h5jamtst/h5jamtst.vcproj +++ b/windows/tools/testfiles/h5jamtst/h5jamtst.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -159,7 +159,7 @@ /> - @@ -234,7 +233,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -252,7 +251,7 @@ /> - @@ -326,7 +324,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -344,7 +342,7 @@ /> - diff --git a/windows/tools/testfiles/h5repacktst/h5repacktst.vcproj b/windows/tools/testfiles/h5repacktst/h5repacktst.vcproj index 7607591..8f65ad5 100644 --- a/windows/tools/testfiles/h5repacktst/h5repacktst.vcproj +++ b/windows/tools/testfiles/h5repacktst/h5repacktst.vcproj @@ -1,10 +1,11 @@ - @@ -142,7 +142,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -161,7 +161,7 @@ /> - @@ -236,7 +235,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -254,7 +253,7 @@ /> - @@ -328,7 +326,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -346,7 +344,7 @@ /> - diff --git a/windows/tools/testfiles/h5repart_gentest/h5repart_gentest.vcproj b/windows/tools/testfiles/h5repart_gentest/h5repart_gentest.vcproj index 9c14c8b..dbcf62d 100644 --- a/windows/tools/testfiles/h5repart_gentest/h5repart_gentest.vcproj +++ b/windows/tools/testfiles/h5repart_gentest/h5repart_gentest.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/tools/testfiles/h5reparttst/h5reparttst.vcproj b/windows/tools/testfiles/h5reparttst/h5reparttst.vcproj index e9ac6b4..a01dac7 100644 --- a/windows/tools/testfiles/h5reparttst/h5reparttst.vcproj +++ b/windows/tools/testfiles/h5reparttst/h5reparttst.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -158,7 +158,7 @@ /> - @@ -232,7 +231,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +249,7 @@ /> - @@ -324,7 +322,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -342,7 +340,7 @@ /> - diff --git a/windows/tools/testfiles/testh5repack_detect_szip/testh5repack_detect_szip.vcproj b/windows/tools/testfiles/testh5repack_detect_szip/testh5repack_detect_szip.vcproj index def2581..dc6c4ba 100644 --- a/windows/tools/testfiles/testh5repack_detect_szip/testh5repack_detect_szip.vcproj +++ b/windows/tools/testfiles/testh5repack_detect_szip/testh5repack_detect_szip.vcproj @@ -1,10 +1,11 @@ - @@ -141,7 +141,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -159,7 +159,7 @@ /> - @@ -231,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -249,7 +248,7 @@ /> - @@ -324,7 +322,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" @@ -342,7 +340,7 @@ /> - diff --git a/windows/tools/testfiles/testh5repack_detect_szipdll/testh5repack_detect_szipdll.vcproj b/windows/tools/testfiles/testh5repack_detect_szipdll/testh5repack_detect_szipdll.vcproj index a11ff5f..00c0808 100644 --- a/windows/tools/testfiles/testh5repack_detect_szipdll/testh5repack_detect_szipdll.vcproj +++ b/windows/tools/testfiles/testh5repack_detect_szipdll/testh5repack_detect_szipdll.vcproj @@ -1,10 +1,11 @@ - @@ -140,7 +140,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -158,7 +158,7 @@ /> - @@ -229,7 +228,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -247,7 +246,7 @@ /> - @@ -320,7 +318,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\src,..\..\..\..\test,..\..\..\..\tools\lib" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + PreprocessorDefinitions="BIND_TO_CURRENT_VCLIBS_VERSION=1;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" @@ -338,7 +336,7 @@ /> - diff --git a/windows/tools/toolslib/toolslib.vcproj b/windows/tools/toolslib/toolslib.vcproj index d00a132..e459fbe 100644 --- a/windows/tools/toolslib/toolslib.vcproj +++ b/windows/tools/toolslib/toolslib.vcproj @@ -1,9 +1,10 @@