diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-02 10:24:03 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-02 10:24:03 (GMT) |
commit | a6f6462541cc57364586f770131e2ea074d63492 (patch) | |
tree | 0debf502fb7d66f9f470edb935a62223945960d4 /test/gen_new_group.c | |
parent | 9bc29ea538b9ce2013a8cde5be230c18cf052009 (diff) | |
download | hdf5-a6f6462541cc57364586f770131e2ea074d63492.zip hdf5-a6f6462541cc57364586f770131e2ea074d63492.tar.gz hdf5-a6f6462541cc57364586f770131e2ea074d63492.tar.bz2 |
[svn-r12700] Alert:
File format is not stable, don't keep files produced!
Description:
First stage of checkins modifying the format of groups to support creation
order. Implement "dense" storage for links in groups.
Try to clarify some of the symbols for the H5L API.
Add the H5Pset_latest_format() flag for FAPLs, to choose to use the newest
file format options (including "dense" link storage in groups)
Add the H5Pset_track_creation_order() flag for GCPLs, to enable creation
order tracking in groups (although no index on creation order yet).
Remove --enable-group-revision configure flag, as file format issues are
now handled in a backwardly/forwardly compatible way.
Clean up lots of compiler warnings and other minor formatting issues.
Tested on:
FreeBSD/32 4.11 (sleipnir) w/threadsafe
Linux/32 2.4 (heping) w/FORTRAN & C++
Linux/64 2.4 (mir) w/enable-v1.6 compa
Mac OSX/32 10.4.8 (amazon)
AIX 5.3 (copper) w/parallel & FORTRAN
Diffstat (limited to 'test/gen_new_group.c')
-rw-r--r-- | test/gen_new_group.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/test/gen_new_group.c b/test/gen_new_group.c index bff23ed..7e54c90 100644 --- a/test/gen_new_group.c +++ b/test/gen_new_group.c @@ -32,8 +32,8 @@ int main(void) { -#ifdef H5_GROUP_REVISION hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list ID */ hid_t fcpl = -1; /* File creation property list ID */ hid_t gid = -1; /* Group creation property list ID */ hid_t sid = -1; /* Dataspace ID */ @@ -43,11 +43,20 @@ int main(void) if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) goto error; /* Adjust group creation parameters for root group */ - /* (So that it is created in symbol-table form) */ + /* (So that it is created in "dense storage" form) */ if(H5Pset_link_phase_change(fcpl, 0, 0) < 0) goto error; + /* Copy the file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR + + /* Set the "use the latest version of the format" flag for creating objects in the file */ + if(H5Pset_latest_format(fapl, TRUE) < 0) TEST_ERROR + /* Create file for test groups */ - if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) <0) goto error; + if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl)) <0) goto error; + + /* Close file access property list */ + if(H5Pclose(fapl) < 0) goto error; /* Close file creation property list */ if(H5Pclose(fcpl) < 0) goto error; @@ -78,20 +87,18 @@ int main(void) /* Close file */ if(H5Fclose(fid) < 0) goto error; -#endif /* H5_GROUP_REVISION */ return 0; -#ifdef H5_GROUP_REVISION error: H5E_BEGIN_TRY { - H5Pclose(did); + H5Dclose(did); H5Sclose(sid); - H5Dclose(gid); - H5Dclose(fcpl); + H5Gclose(gid); + H5Pclose(fcpl); + H5Pclose(fapl); H5Fclose(fid); } H5E_END_TRY; return 1; -#endif /* H5_GROUP_REVISION */ } |