summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dumpgentest.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-10-02 02:08:59 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-10-02 02:08:59 (GMT)
commit37ec6dc75e85ebd7f9fb9b32fe978e47ab3fe918 (patch)
tree387658306d99e60d807c2eb8b3888a12aca4a75f /tools/h5dump/h5dumpgentest.c
parent006071f2338faa14f2784562279cb78b4341bce0 (diff)
downloadhdf5-37ec6dc75e85ebd7f9fb9b32fe978e47ab3fe918.zip
hdf5-37ec6dc75e85ebd7f9fb9b32fe978e47ab3fe918.tar.gz
hdf5-37ec6dc75e85ebd7f9fb9b32fe978e47ab3fe918.tar.bz2
[svn-r17582] Description:
Bring changes from file free space branch back to the trunk. *yay!* 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 (smirom) 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 Mac OS X/32 10.5.8 (amazon) in debug mode Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'tools/h5dump/h5dumpgentest.c')
-rw-r--r--tools/h5dump/h5dumpgentest.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index b8ed41d..2ddc0bf 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -93,6 +93,7 @@
#define FILE63 "textlinkfar.h5"
#define FILE64 "tarray8.h5"
#define FILE65 "tattrreg.h5"
+#define FILE66 "file_space.h5"
@@ -244,6 +245,10 @@ typedef struct s1_t {
#define F64_ARRAY_BUF_LEN (4*1024)
#define F64_DIM1 (F64_ARRAY_BUF_LEN / sizeof(int) + 1)
+/* File 65 macros */
+#define STRATEGY H5F_FILE_SPACE_AGGR_VFD /* File space handling strategy */
+#define THRESHOLD10 10 /* Free space section threshold */
+
static void
gent_group(void)
{
@@ -6443,7 +6448,32 @@ gent_extlinks(void)
H5Fclose(far_fid);
}
+/*-------------------------------------------------------------------------
+ * Function: gent_fs_strategy_threshold
+ *
+ * Purpose: Generate a file with non-default file space strategy and
+ * non-default free-space section threshold.
+ *-------------------------------------------------------------------------
+ */
+static void
+gent_fs_strategy_threshold(void)
+{
+ hid_t fid; /* File id */
+ hid_t fcpl; /* File creation property */
+
+ /* Create file-creation template */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+
+ /* Set file space information */
+ H5Pset_file_space(fcpl, STRATEGY, THRESHOLD10);
+ /* Create the file with the specified strategy and threshold */
+ fid = H5Fcreate(FILE66, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT);
+
+ /* close */
+ H5Fclose(fid);
+ H5Pclose(fcpl);
+}
/*-------------------------------------------------------------------------
* Function: main
@@ -6516,7 +6546,7 @@ int main(void)
gent_attr_creation_order();
gent_fpformat();
gent_extlinks();
-
+ gent_fs_strategy_threshold();
return 0;
}