summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-04-30 19:32:25 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-04-30 19:32:25 (GMT)
commitbfa57861844fec57e445d9b0cbc61f44e0ef1916 (patch)
treee9d6ff4f3ec3776c06a7aee16a2983772a197780
parent315c1f9eb00cb5e7e04fd4fa984399df92a7a765 (diff)
downloadhdf5-bfa57861844fec57e445d9b0cbc61f44e0ef1916.zip
hdf5-bfa57861844fec57e445d9b0cbc61f44e0ef1916.tar.gz
hdf5-bfa57861844fec57e445d9b0cbc61f44e0ef1916.tar.bz2
[svn-r26986] Removed H5F_ACC_DEBUG and H5FD_DEBUG functionality.
The H5F_ACC_DEBUG symbol remains but has been defined to zero and has been listed as deprecated. Fixes: HDFFV-1074 Tested on: h5committest 32-bit Linux w/ C++ and Fortran and multi VFD 32-bit Linux w/ C++ and Fortran and multi VFD (no deprec symbols)
-rw-r--r--c++/src/H5File.cpp31
-rw-r--r--fortran/src/H5_f.c5
-rw-r--r--fortran/src/H5f90global.f903
-rw-r--r--release_docs/RELEASE.txt12
-rw-r--r--src/H5F.c10
-rw-r--r--src/H5FDmulti.c47
-rw-r--r--src/H5Fpublic.h6
-rw-r--r--test/links.c4
8 files changed, 45 insertions, 73 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index fc802d0..84e7827 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,25 +130,25 @@ 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();
- id = H5Fcreate( name, flags, create_plist_id, access_plist_id );
- if( id < 0 ) // throw an exception when open/create fail
- {
- throw FileIException("H5File constructor", "H5Fcreate failed");
- }
+ hid_t create_plist_id = create_plist.getId();
+ hid_t access_plist_id = access_plist.getId();
+ id = H5Fcreate( name, flags, create_plist_id, access_plist_id );
+ if( id < 0 ) // throw an exception when open/create fail
+ {
+ throw FileIException("H5File constructor", "H5Fcreate failed");
+ }
}
// Open the file if none of the bits above are set.
else
{
- hid_t access_plist_id = access_plist.getId();
- id = H5Fopen( name, flags, access_plist_id );
- if( id < 0 ) // throw an exception when open/create fail
- {
- throw FileIException("H5File constructor", "H5Fopen failed");
- }
+ hid_t access_plist_id = access_plist.getId();
+ id = H5Fopen( name, flags, access_plist_id );
+ if( id < 0 ) // throw an exception when open/create fail
+ {
+ throw FileIException("H5File constructor", "H5Fopen failed");
+ }
}
}
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index a149109..1641989 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -421,12 +421,17 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
/*
* H5F flags
+ *
+ * Note that H5F_ACC_DEBUG is deprecated (nonfunctional) but retained
+ * for backward compatibility since it's in the public API.
*/
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;
+#ifndef H5_NO_DEPRECATED_SYMBOLS
h5f_flags[4] = (int_f)H5F_ACC_DEBUG;
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
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..0e371f5 100644
--- a/fortran/src/H5f90global.f90
+++ b/fortran/src/H5f90global.f90
@@ -234,6 +234,9 @@ MODULE H5GLOBAL
!
! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !)
!
+ ! NOTE: H5F_ACC_DEBUG is deprecated (nonfunctional) but retained for
+ ! backward compatibility since it's in the public API.
+ !
! H5F flags declaration
!
INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index a7ba365..6544486 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -117,6 +117,18 @@ New Features
Library:
--------
+ - H5F_ACC_DEBUG labeled "deprecated"
+
+ The symbol was originally used to emit some extra debugging
+ informationi in the multi VFD. The underlying functionality
+ was removed due to disuse in HDF5 1.8.16 though the symbol
+ remained defined since it was visible in H5Fpublic.h.
+
+ In this release, the symbol has been labeled deprecated and will
+ not be defined when H5_NO_DEPRECATED_SYMBOLS is defined.
+
+ (DER - 2015-04-30, HDFFV-1074)
+
- The library can load filter libraries dynamically during runtime. Users
can set the search path through environment variable HDF5_PLUGIN_PATH
and call H5Pset_filter to enable a dynamic filter. (SLU - 2013/04/08)
diff --git a/src/H5F.c b/src/H5F.c
index 357897e..672c631 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -484,15 +484,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 b1f094c..bc61374 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
#ifndef FALSE
#define FALSE 0
@@ -796,19 +789,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];
@@ -821,11 +801,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;
}
@@ -1109,20 +1084,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;
@@ -1895,18 +1860,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 f32b3e0..aa6cc2a 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -41,12 +41,14 @@
* We're assuming that these constants are used rather early in the hdf5
* session.
*
+ * Note that H5F_ACC_DEBUG is deprecated (nonfuncational) but retained as a
+ * symbol for backward compatibility.
*/
#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 */
+/* NOTE: 0x0008u was H5F_ACC_DEBUG, now deprecated */
#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
@@ -221,7 +223,7 @@ H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag);
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Macros */
-
+#define H5F_ACC_DEBUG (H5CHECK 0x0000u) /*print debug info (deprecated)*/
/* Typedefs */
diff --git a/test/links.c b/test/links.c
index 891b5e4..0846c49 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