summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-08-17 19:12:59 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-08-17 19:12:59 (GMT)
commitcc89b8a605dfc7370cb760e6c3d7339cbf1e9884 (patch)
tree82e0552ea6a80a2e362fdc77960a3483648aae75 /test
parent5ef0237e2fe5ac6aee0d97fdc6bcf22f72d47162 (diff)
downloadhdf5-cc89b8a605dfc7370cb760e6c3d7339cbf1e9884.zip
hdf5-cc89b8a605dfc7370cb760e6c3d7339cbf1e9884.tar.gz
hdf5-cc89b8a605dfc7370cb760e6c3d7339cbf1e9884.tar.bz2
[svn-r1572] Changes since 19990810
---------------------- ./MANIFEST ./src/H5FDmulti.c [NEW] ./src/H5FDmulti.h [NEW] ./src/Makefile.in ./src/hdf5.h The split driver was reimplemented as a more general "multi" driver which is capable of splitting data into multiple files like the family driver except the partioning is done by memory usage type instead of address. The H5Pset_fapl_split() function just calls H5Pset_fapl_multi() with arguments which prepare to split the address space into two files: meta and raw data. This is the first version. I plan to allow the open() call to relax a bit which would allow one to open an hdf5 file when only the meta-data file is present. This would allow a very large file to be split and stored on tape and the relatively small meta file to be mirrored on disk to allow limited browsing of the file (any request for raw data would fail). ./src/H5private.h ./src/H5F.c ./src/H5FD.c ./src/H5FDprivate.h ./src/H5FDpublic.h ./src/H5FDcore.c ./src/H5FDfamily.c ./src/H5FDmpio.c ./src/H5FDsec2.c Added the ability for a file driver to store information in the superblock which would be needed if the file were opened again later for reading. The format is driver-defined which allows users to extend it however they like. ./doc/html/H5.format.html Added information about the new driver information block of the superblock. This is where file drivers store information they need in order to reopen the file later. ./src/H5F.c ./src/H5Fprivate.h ./src/H5FD.c ./src/H5FDprivate.h ./src/H5FDpublic.h ./src/H5FDcore.c ./src/H5FDfamily.c ./src/H5FDmpio.c ./src/H5FDsec2.c ./src/H5Fistore.c ./src/H5R.c The file access properties and the file access property list were decoupled, which allows the property list to more cleanly contain properties for various levels of the file and which allows the property list to be modified more cleanly when opening files. ./src/H5.c ./src/H5FDpublic.h Removed H5FD_MEM_META and H5FD_MEM_GROUP since they're never used. ./src/H5D.c Changed the way we detect the MPIO driver in all these special cases. ./src/H5F.c ./src/H5Rpublic.h ./test/tfile.c The default file sizeof(offset) was changed to be a function of haddr_t instead of hsize_t. THE H5RPUBLIC.H DEFINITIONS WILL HAVE PROBLEMS IF THE USER CREATES A FILE WITH NON-DEFAULT OFFSET AND SIZE SIZES! ./src/H5F.c Fixed an uninitialized memory access bug in file closing related to the VFL. ./src/H5T.c ./src/H5Tpublic.h Added an H5T_NATIVE_HADDR predefined datatype which corresponds to the `haddr_t' type. ./test/Makefile.in Reformatted long lines. ./test/big.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/extend.c ./test/external.c Removed the H5F_ACC_DEBUG flag from file creation/open calls. ./test/big.c Plugged a memory leak. ./test/h5test.c Added support for the `multi' driver. Removed #warning about not having the stdio driver. Plans are to not implement it since the sec2 driver serves the same purpose and testing didn't show any difference in execution times between the two.
Diffstat (limited to 'test')
-rw-r--r--test/.distdep337
-rw-r--r--test/Makefile.in12
-rw-r--r--test/big.c16
-rw-r--r--test/cmpd_dset.c7
-rw-r--r--test/dsets.c7
-rw-r--r--test/dtypes.c10
-rw-r--r--test/extend.c7
-rw-r--r--test/external.c15
-rw-r--r--test/h5test.c85
-rw-r--r--test/tfile.c2
10 files changed, 432 insertions, 66 deletions
diff --git a/test/.distdep b/test/.distdep
index cd429b7..ebd0e84 100644
--- a/test/.distdep
+++ b/test/.distdep
@@ -1092,3 +1092,340 @@ enum.lo: \
../src/H5Fprivate.h \
../src/H5Rprivate.h \
../src/H5Tprivate.h
+h5test.lo: \
+ h5test.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5FDcore.h \
+ ../src/H5FDfamily.h \
+ ../src/H5FDmpio.h \
+ ../src/H5FDsec2.h \
+ ../src/H5FDmulti.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h \
+ ../src/H5Tprivate.h
+big.lo: \
+ big.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5FDcore.h \
+ ../src/H5FDfamily.h \
+ ../src/H5FDmpio.h \
+ ../src/H5FDsec2.h \
+ ../src/H5FDmulti.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h \
+ ../src/H5Tprivate.h
+cmpd_dset.lo: \
+ cmpd_dset.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5FDcore.h \
+ ../src/H5FDfamily.h \
+ ../src/H5FDmpio.h \
+ ../src/H5FDsec2.h \
+ ../src/H5FDmulti.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h \
+ ../src/H5Tprivate.h
+dsets.lo: \
+ dsets.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5FDcore.h \
+ ../src/H5FDfamily.h \
+ ../src/H5FDmpio.h \
+ ../src/H5FDsec2.h \
+ ../src/H5FDmulti.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h \
+ ../src/H5Tprivate.h
+dtypes.lo: \
+ dtypes.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5FDcore.h \
+ ../src/H5FDfamily.h \
+ ../src/H5FDmpio.h \
+ ../src/H5FDsec2.h \
+ ../src/H5FDmulti.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h \
+ ../src/H5Tprivate.h
+extend.lo: \
+ extend.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5FDcore.h \
+ ../src/H5FDfamily.h \
+ ../src/H5FDmpio.h \
+ ../src/H5FDsec2.h \
+ ../src/H5FDmulti.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h \
+ ../src/H5Tprivate.h
+external.lo: \
+ external.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5FDcore.h \
+ ../src/H5FDfamily.h \
+ ../src/H5FDmpio.h \
+ ../src/H5FDsec2.h \
+ ../src/H5FDmulti.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h \
+ ../src/H5Tprivate.h
+tfile.lo: \
+ tfile.c \
+ testhdf5.h \
+ ../src/H5private.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Eprivate.h \
+ ../src/H5Epublic.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Bprivate.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Pprivate.h \
+ ../src/H5Ppublic.h
+tselect.lo: \
+ tselect.c \
+ testhdf5.h \
+ ../src/H5private.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Eprivate.h \
+ ../src/H5Epublic.h \
+ ../src/H5Ipublic.h \
+ ../src/hdf5.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5FDcore.h \
+ ../src/H5FDfamily.h
+tvltypes.lo: \
+ tvltypes.c \
+ testhdf5.h \
+ ../src/H5private.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Eprivate.h \
+ ../src/H5Epublic.h \
+ ../src/H5Ipublic.h \
+ ../src/hdf5.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5FDpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5FDcore.h \
+ ../src/H5FDfamily.h
diff --git a/test/Makefile.in b/test/Makefile.in
index 7ad9478..2e602a4 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -45,18 +45,18 @@ MOSTLYCLEAN=cmpd_dset.h5 dataset.h5 extend.h5 istore.h5 tfile1.h5 tfile2.h5 \
extern_4a.raw extern_4b.raw iopipe.raw iopipe.h5 gheap0.h5 \
gheap1.h5 gheap2.h5 gheap3.h5 gheap4.h5 links.h5 chunk.h5 \
big.data big[0-9][0-9][0-9][0-9][0-9].h5 dtypes1.h5 dtypes2.h5 \
- tattr.h5 tselect.h5 mtime.h5 ragged.h5 unlink.h5 overhead.h5 \
- fillval_[0-9].h5 fillval.raw mount_[0-9].h5 trefer[12].h5 tvltypes.h5 \
- flush.h5 enum1.h5
+ tattr.h5 tselect.h5 mtime.h5 ragged.h5 unlink.h5 overhead.h5 \
+ fillval_[0-9].h5 fillval.raw mount_[0-9].h5 trefer[12].h5 \
+ tvltypes.h5 flush.h5 enum1.h5
CLEAN=$(TIMINGS)
## Source and object files for programs... The TEST_SRC list contains all the
## source files and is used for things like dependencies, archiving, etc. The
## other source lists are for the individual tests, the files of which may
## overlap with other tests.
-TEST_SRC=big.c bittests.c chunk.c cmpd_dset.c dsets.c dtypes.c extend.c \
- external.c fillval.c flush1.c flush2.c gheap.c h5test.c hyperslab.c \
- iopipe.c istore.c lheap.c links.c mount.c mtime.c ohdr.c overhead.c \
+TEST_SRC=big.c bittests.c chunk.c cmpd_dset.c dsets.c dtypes.c extend.c \
+ external.c fillval.c flush1.c flush2.c gheap.c h5test.c hyperslab.c \
+ iopipe.c istore.c lheap.c links.c mount.c mtime.c ohdr.c overhead.c \
ragged.c stab.c tattr.c testhdf5.c tfile.c th5s.c tmeta.c trefer.c \
tselect.c tvltypes.c unlink.c enum.c
TEST_OBJ=$(TEST_SRC:.c=.lo)
diff --git a/test/big.c b/test/big.c
index b0c4c08..53046d9 100644
--- a/test/big.c
+++ b/test/big.c
@@ -187,9 +187,10 @@ writer (hid_t fapl, int wrt_n)
* which is a family of files. Each member of the family will be 1GB
*/
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_DEBUG, H5P_DEFAULT,
- fapl))<0) goto error;
-
+ if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
+ goto error;
+ }
+
/* Create simple data spaces according to the size specified above. */
if ((space1 = H5Screate_simple (4, size1, size1))<0 ||
(space2 = H5Screate_simple (1, size2, size2))<0) {
@@ -277,9 +278,7 @@ reader (hid_t fapl)
/* Open HDF5 file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fopen(filename, H5F_ACC_RDONLY|H5F_ACC_DEBUG, fapl))<0) {
- goto error;
- }
+ if ((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) goto error;
/* Open the dataset */
if ((d2 = H5Dopen (file, "d2"))<0) goto error;
@@ -387,19 +386,23 @@ main (void)
if (sizeof(long_long)<8 || 0==GB8LL) {
puts("Test skipped because sizeof(long_long) is too small. This");
puts("hardware apparently doesn't support 64-bit integer types.");
+ H5Pclose(fapl);
exit(0);
}
if (!is_sparse()) {
puts("Test skipped because file system does not support holes.");
+ H5Pclose(fapl);
exit(0);
}
if (!enough_room(fapl)) {
puts("Test skipped because of quota (file size or num open files).");
+ H5Pclose(fapl);
exit(0);
}
if (sizeof(hsize_t)<=4) {
puts("Test skipped because the hdf5 library was configured with the");
puts("--disable-hsizet flag in order to work around a compiler bug.");
+ H5Pclose(fapl);
exit(0);
}
@@ -411,6 +414,7 @@ main (void)
return 0;
error:
+ if (fapl>=0) H5Pclose(fapl);
puts("*** TEST FAILED ***");
return 1;
}
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 714c810..4ccd060 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -148,9 +148,10 @@ main (int argc, char *argv[])
/* Create the file */
fapl = h5_fileaccess();
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
- if ((file = H5Fcreate (filename, H5F_ACC_TRUNC|H5F_ACC_DEBUG,
- H5P_DEFAULT, fapl))<0) goto error;
-
+ if ((file = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
+ goto error;
+ }
+
/* Create the data space */
if ((space = H5Screate_simple (2, dim, NULL))<0) goto error;
diff --git a/test/dsets.c b/test/dsets.c
index 5fe0b26..b98730f 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -834,9 +834,10 @@ main(void)
#endif
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_DEBUG,
- H5P_DEFAULT, fapl))<0) goto error;
-
+ if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
+ goto error;
+ }
+
/* Cause the library to emit initial messages */
if ((grp = H5Gcreate (file, "emit diagnostics", 0))<0) goto error;
if (H5Gset_comment(grp, ".", "Causes diagnostic messages to be emitted")<0)
diff --git a/test/dtypes.c b/test/dtypes.c
index 730dc0d..4328dad 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -778,8 +778,9 @@ test_transient (hid_t fapl)
TESTING("transient data types");
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fcreate (filename, H5F_ACC_TRUNC|H5F_ACC_DEBUG,
- H5P_DEFAULT, fapl))<0) goto error;
+ if ((file=H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
+ goto error;
+ }
if ((space = H5Screate_simple (2, ds_size, ds_size))<0) goto error;
/* Predefined types cannot be modified or closed */
@@ -906,8 +907,9 @@ test_named (hid_t fapl)
TESTING("named data types");
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
- if ((file=H5Fcreate (filename, H5F_ACC_TRUNC|H5F_ACC_DEBUG,
- H5P_DEFAULT, fapl))<0) goto error;
+ if ((file=H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
+ goto error;
+ }
if ((space = H5Screate_simple (2, ds_size, ds_size))<0) goto error;
/* Predefined types cannot be committed */
diff --git a/test/extend.c b/test/extend.c
index cae6e0c..25f7ee7 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -64,9 +64,10 @@ main (void)
/* Create the file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file = H5Fcreate (filename, H5F_ACC_TRUNC|H5F_ACC_DEBUG,
- H5P_DEFAULT, fapl))<0) goto error;
-
+ if ((file = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
+ goto error;
+ }
+
/* Create the dataset which is originally NX by NY */
if ((cparms = H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk (cparms, 2, chunk_dims)<0) goto error;
diff --git a/test/external.c b/test/external.c
index 7e07554..902bc76 100644
--- a/test/external.c
+++ b/test/external.c
@@ -606,8 +606,9 @@ test_2 (hid_t fapl)
* output looks like.
*/
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_DEBUG,
- H5P_DEFAULT, fapl))<0) goto error;
+ if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
+ goto error;
+ }
if ((grp=H5Gcreate(file, "emit-diagnostics", 8))<0) goto error;
if (H5Gclose(grp)<0) goto error;
@@ -710,8 +711,9 @@ test_3 (hid_t fapl)
/* Create another file */
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_DEBUG, H5P_DEFAULT,
- fapl))<0) goto error;
+ if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
+ goto error;
+ }
/* Create the external file list */
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
@@ -814,8 +816,9 @@ main (void)
h5_reset();
fapl = h5_fileaccess();
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_DEBUG, H5P_DEFAULT,
- fapl))<0) goto error;
+ if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
+ goto error;
+ }
if ((grp=H5Gcreate(file, "emit-diagnostics", 8))<0) goto error;
if (H5Gclose (grp)<0) goto error;
diff --git a/test/h5test.c b/test/h5test.c
index 88a45a9..b6e5551 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -32,6 +32,19 @@
*
*/
+/*
+ * These are the letters that are appended to the file name when generating
+ * names for the split and multi drivers. They are:
+ *
+ * m: All meta data when using the split driver.
+ * s: The userblock, superblock, and driver info block
+ * b: B-tree nodes
+ * r: Dataset raw data
+ * g: Global heap
+ * l: local heap (object names)
+ * o: object headers
+ */
+static const char *multi_letters = "msbrglo";
/*-------------------------------------------------------------------------
@@ -100,22 +113,17 @@ h5_cleanup(hid_t fapl)
}
} else if (H5FD_CORE==driver) {
/*void*/
+ } else if (H5FD_MULTI==driver) {
+ H5FD_mem_t mt;
+ assert(strlen(multi_letters)==H5FD_MEM_NTYPES);
+ for (mt=0; mt<H5FD_MEM_NTYPES; mt++) {
+ HDsnprintf(temp, sizeof temp, "%s-%c.h5",
+ filename, multi_letters[mt]);
+ remove(temp); /*don't care if it fails*/
+ }
} else {
remove(filename);
}
-
-
-#ifndef ROBB_VFL
-#warning "H5F_LOW_SPLIT not implemented"
-#else
- switch (H5Pget_driver(fapl)) {
- case H5F_LOW_SPLIT:
- HDsnprintf(temp, sizeof temp, "%s.raw", filename);
- remove(temp);
- HDsnprintf(temp, sizeof temp, "%s.meta", filename);
- remove(temp);
- break;
-#endif
}
retval=1;
}
@@ -217,20 +225,12 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
if ((driver=H5Pget_driver(fapl))<0) return NULL;
if (H5FD_FAMILY==driver) {
suffix = "%05d.h5";
- } else if (H5FD_CORE==driver) {
+ } else if (H5FD_CORE==driver || H5FD_MULTI==driver) {
suffix = NULL;
} else {
suffix = ".h5";
}
-#ifndef RPM_VFL
-#warning "H5FD_SPLIT not implemented"
-#else
- if (H5FD_SPLIT==driver) {
- suffix = NULL;
- }
-#endif
-
if (suffix) {
if (strlen(fullname)+strlen(suffix)>=size) return NULL;
strcat(fullname, suffix);
@@ -266,6 +266,7 @@ h5_fileaccess(void)
char s[1024];
hid_t fapl = -1;
hsize_t fam_size = 100*1024*1024; /*100 MB*/
+ H5FD_mem_t mt;
/* First use the environment variable, then the constant */
val = getenv("HDF5_DRIVER");
@@ -283,24 +284,40 @@ h5_fileaccess(void)
if (!strcmp(name, "sec2")) {
/* Unix read() and write() system calls */
if (H5Pset_fapl_sec2(fapl)<0) return -1;
- } else if (!strcmp(name, "stdio")) {
- /* C standard I/O library */
-#ifndef RPM_VFL
-#warning "H5FD_STDIO not implemented"
-#else
- if (H5Pset_stdio(fapl)<0) return -1;
-#endif
} else if (!strcmp(name, "core")) {
/* In-core temporary file with 1MB increment */
if (H5Pset_fapl_core(fapl, 1024*1024)<0) return -1;
} else if (!strcmp(name, "split")) {
/* Split meta data and raw data each using default driver */
-#ifndef RPM_VFL
-#warning "H5FD_SPLIT not implemented"
-#else
- if (H5Pset_split(fapl, NULL, H5P_DEFAULT, NULL, H5P_DEFAULT)<0)
+ if (H5Pset_fapl_split(fapl,
+ "-m.h5", H5P_DEFAULT,
+ "-r.h5", H5P_DEFAULT)<0)
return -1;
-#endif
+ } else if (!strcmp(name, "multi")) {
+ /* Multi-file driver, general case of the split driver */
+ H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
+ hid_t memb_fapl[H5FD_MEM_NTYPES];
+ const char *memb_name[H5FD_MEM_NTYPES];
+ char sv[H5FD_MEM_NTYPES][1024];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
+
+ memset(memb_map, 0, sizeof memb_map);
+ memset(memb_fapl, 0, sizeof memb_fapl);
+ memset(memb_name, 0, sizeof memb_name);
+ memset(memb_addr, 0, sizeof memb_addr);
+
+ assert(strlen(multi_letters)==H5FD_MEM_NTYPES);
+ for (mt=0; mt<H5FD_MEM_NTYPES; mt++) {
+ memb_fapl[mt] = H5P_DEFAULT;
+ sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ memb_name[mt] = sv[mt];
+ memb_addr[mt] = MAX(mt-1,0)*(HADDR_MAX/10);
+ }
+
+ if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name,
+ memb_addr)<0) {
+ return -1;
+ }
} else if (!strcmp(name, "family")) {
/* Family of files, each 1MB and using the default driver */
if ((val=strtok(NULL, " \t\n\r"))) {
diff --git a/test/tfile.c b/test/tfile.c
index f5ed1b2..2968b8e 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -31,7 +31,7 @@ static char RcsId[] = "$Revision$";
#include <H5Pprivate.h>
#define F1_USERBLOCK_SIZE (hsize_t)0
-#define F1_OFFSET_SIZE sizeof(hsize_t)
+#define F1_OFFSET_SIZE sizeof(haddr_t)
#define F1_LENGTH_SIZE sizeof(hsize_t)
#define F1_SYM_LEAF_K 4
#define F1_SYM_INTERN_K 16