From 7d86677dd611adefa12e3229c6494230d4059845 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sat, 2 May 2015 01:17:28 -0500 Subject: [svn-r26994] Merge of r26986 from trunk. Removes H5F_ACC_DEBUG and H5FD_DEBUG functionality. The H5F_ACC_DEBUG symbol remains but has been defined to zero. Fixes: HDFFV-1074 Tested on: h5committest 32-bit Linux w/ C++ and Fortran and multi VFD --- c++/src/H5File.cpp | 5 +---- fortran/src/H5_f.c | 4 +++- fortran/src/H5f90global.f90 | 2 ++ release_docs/RELEASE.txt | 12 ++++++++++-- src/H5F.c | 10 +++++----- src/H5FDmulti.c | 47 ++------------------------------------------- src/H5Fpublic.h | 14 ++++++++------ test/links.c | 4 ---- 8 files changed, 31 insertions(+), 67 deletions(-) diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index 9cc51b7..f4f8833 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -73,9 +73,6 @@ H5File::H5File() : H5Location(), CommonFG(), id(H5I_INVALID_HID) {} /// exists, and fail, otherwise /// \li \c H5F_ACC_RDWR - Open file for read/write, if it already /// exists, and fail, otherwise -/// \li \c H5F_ACC_DEBUG - print debug information. This flag is -/// used only by HDF5 library developers; it is neither -/// tested nor supported for use in applications. ///\par /// For info on file creation in the case of an already-open file, /// please refer to the \b Special \b case section in the C layer @@ -133,7 +130,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro { // These bits only set for creation, so if any of them are set, // create the file. - if( flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG)) + if( flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC)) { hid_t create_plist_id = create_plist.getId(); hid_t access_plist_id = access_plist.getId(); diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index a149109..95f6e21 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -421,12 +421,14 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, /* * H5F flags + * + * H5F_ACC_DEBUG has no effect as of HDF5 1.8.16. */ h5f_flags[0] = (int_f)H5F_ACC_RDWR; h5f_flags[1] = (int_f)H5F_ACC_RDONLY; h5f_flags[2] = (int_f)H5F_ACC_TRUNC; h5f_flags[3] = (int_f)H5F_ACC_EXCL; - h5f_flags[4] = (int_f)H5F_ACC_DEBUG; + h5f_flags[4] = (int_f)H5F_ACC_DEBUG; /* nonfunctional */ h5f_flags[5] = (int_f)H5F_SCOPE_LOCAL; h5f_flags[6] = (int_f)H5F_SCOPE_GLOBAL; h5f_flags[7] = (int_f)H5F_CLOSE_DEFAULT; diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 index ca50e20..c56190e 100644 --- a/fortran/src/H5f90global.f90 +++ b/fortran/src/H5f90global.f90 @@ -234,6 +234,8 @@ MODULE H5GLOBAL ! ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) ! + ! H5F_ACC_DEBUG_F has no effect as of HDF5 1.8.16 + ! ! H5F flags declaration ! INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 77ecf0f..dec458a 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -64,8 +64,16 @@ New Features Library ------- - - - (XYZ - YYYY/MM/DD HDFFV-####) + + - H5F_ACC_DEBUG flag for H5Fopen/create: functionality removed + + The symbol was used to emit some extra debugging information + for HDF Group developers in the multi VFD. The underlying + functionality has been removed due to disuse. The symbol + remains defined since it was visible in H5Fpublic.h but it + has been set to zero and has no effect anywhere in the library. + + (DER - 2015-05-02, HDFFV-1074) Parallel Library diff --git a/src/H5F.c b/src/H5F.c index bd7e5ef..02526ad 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -482,15 +482,15 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Check/fix arguments */ if(!filename || !*filename) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file name") /* In this routine, we only accept the following flags: - * H5F_ACC_EXCL, H5F_ACC_TRUNC and H5F_ACC_DEBUG + * H5F_ACC_EXCL and H5F_ACC_TRUNC */ - if(flags & ~(H5F_ACC_EXCL | H5F_ACC_TRUNC | H5F_ACC_DEBUG)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags") + if(flags & ~(H5F_ACC_EXCL | H5F_ACC_TRUNC)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags") /* The H5F_ACC_EXCL and H5F_ACC_TRUNC flags are mutually exclusive */ if((flags & H5F_ACC_EXCL) && (flags & H5F_ACC_TRUNC)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mutually exclusive flags for file creation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mutually exclusive flags for file creation") /* Check file creation property list */ if(H5P_DEFAULT == fcpl_id) diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index c0cab02..a00c9a6 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -30,18 +30,11 @@ /* Disable certain warnings in PC-Lint: */ /*lint --emacro( {534, 830}, H5P_DEFAULT, H5P_FILE_ACCESS, H5P_DATASET_XFER) */ -/*lint --emacro( {534, 830}, H5F_ACC_DEBUG, H5F_ACC_RDWR) */ /*lint --emacro( {534, 830}, H5FD_MULTI) */ /*lint -esym( 534, H5Eclear2, H5Epush2) */ #include "hdf5.h" -/* - * Define H5FD_MULTI_DEBUG if you want the ability to print debugging - * messages to the standard error stream. Messages are only printed if the - * file is opened with the H5F_ACC_DEBUG flag. - */ -#define H5FD_MULTI_DEBUG /* Our version of MAX */ #undef MAX @@ -825,19 +818,6 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) * files at the end. */ if (map_changed) { -#ifdef H5FD_MULTI_DEBUG - if (file->flags & H5F_ACC_DEBUG) { - fprintf(stderr, "H5FD_MULTI: member map override\n"); - fprintf(stderr, " old value: "); - ALL_MEMBERS(mt) { - fprintf(stderr, "%s%d", mt?", ":"", (int)(file->fa.memb_map[mt])); - } END_MEMBERS; - fprintf(stderr, "\n new value: "); - ALL_MEMBERS(mt) { - fprintf(stderr, "%s%d", mt?", ":"", (int)(map[mt])); - } END_MEMBERS; - } -#endif /* Commit map */ ALL_MEMBERS(mt) { file->fa.memb_map[mt] = map[mt]; @@ -850,11 +830,6 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) } END_MEMBERS; ALL_MEMBERS(mt) { if (!in_use[mt] && file->memb[mt]) { -#ifdef H5FD_MULTI_DEBUG - if (file->flags & H5F_ACC_DEBUG) { - fprintf(stderr, "H5FD_MULTI: close member %d\n", (int)mt); - } -#endif (void)H5FDclose(file->memb[mt]); file->memb[mt] = NULL; } @@ -1148,20 +1123,10 @@ H5FD_multi_close(H5FD_t *_file) /* Close as many members as possible */ ALL_MEMBERS(mt) { if (file->memb[mt]) { -#ifdef H5FD_MULTI_DEBUG - if (file->flags & H5F_ACC_DEBUG) { - fprintf(stderr, "H5FD_MULTI: closing member %d\n", (int)mt); - } -#endif if (H5FDclose(file->memb[mt])<0) { -#ifdef H5FD_MULTI_DEBUG - if (file->flags & H5F_ACC_DEBUG) { - fprintf(stderr, "H5FD_MULTI: close failed\n"); - } -#endif - nerrors++; + nerrors++; } else { - file->memb[mt] = NULL; + file->memb[mt] = NULL; } } } END_MEMBERS; @@ -1930,18 +1895,10 @@ open_members(H5FD_multi_t *file) */ sprintf(tmp, file->fa.memb_name[mt], file->name); -#ifdef H5FD_MULTI_DEBUG - if(file->flags & H5F_ACC_DEBUG) - fprintf(stderr, "H5FD_MULTI: open member %d \"%s\"\n", (int)mt, tmp); -#endif H5E_BEGIN_TRY { file->memb[mt] = H5FDopen(tmp, file->flags, file->fa.memb_fapl[mt], HADDR_UNDEF); } H5E_END_TRY; if(!file->memb[mt]) { -#ifdef H5FD_MULTI_DEBUG - if(file->flags & H5F_ACC_DEBUG) - fprintf(stderr, "H5FD_MULTI: open failed for member %d\n", (int)mt); -#endif if(!file->fa.relax || (file->flags & H5F_ACC_RDWR)) nerrors++; } diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 8466a26..5f74523 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -41,13 +41,15 @@ * We're assuming that these constants are used rather early in the hdf5 * session. * + * H5F_ACC_DEBUG no longer has any prints any special debug info. The symbol is + * being retained and will be listed as deprecated in HDF5 1.10.0. */ -#define H5F_ACC_RDONLY (H5CHECK 0x0000u) /*absence of rdwr => rd-only */ -#define H5F_ACC_RDWR (H5CHECK 0x0001u) /*open for read and write */ -#define H5F_ACC_TRUNC (H5CHECK 0x0002u) /*overwrite existing files */ -#define H5F_ACC_EXCL (H5CHECK 0x0004u) /*fail if file already exists*/ -#define H5F_ACC_DEBUG (H5CHECK 0x0008u) /*print debug info */ -#define H5F_ACC_CREAT (H5CHECK 0x0010u) /*create non-existing files */ +#define H5F_ACC_RDONLY (H5CHECK 0x0000u) /*absence of rdwr => rd-only */ +#define H5F_ACC_RDWR (H5CHECK 0x0001u) /*open for read and write */ +#define H5F_ACC_TRUNC (H5CHECK 0x0002u) /*overwrite existing files */ +#define H5F_ACC_EXCL (H5CHECK 0x0004u) /*fail if file already exists */ +#define H5F_ACC_DEBUG (H5CHECK 0x0000u) /*print debug info (no longer used) */ +#define H5F_ACC_CREAT (H5CHECK 0x0010u) /*create non-existing files */ /* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the * parent file. */ diff --git a/test/links.c b/test/links.c index f40ead0..d8495ba 100644 --- a/test/links.c +++ b/test/links.c @@ -4023,10 +4023,6 @@ external_set_elink_acc_flags(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if(ret != FAIL) TEST_ERROR H5E_BEGIN_TRY { - ret = H5Pset_elink_acc_flags(gapl, H5F_ACC_DEBUG); - } H5E_END_TRY; - if(ret != FAIL) TEST_ERROR - H5E_BEGIN_TRY { ret = H5Pset_elink_acc_flags(gapl, H5F_ACC_CREAT); } H5E_END_TRY; if(ret != FAIL) TEST_ERROR -- cgit v0.12