summaryrefslogtreecommitdiffstats
path: root/src/H5FDpublic.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-04-28 01:02:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-04-28 01:02:02 (GMT)
commit0081d8f082bd9fa8c424439b8fb561101dbec78e (patch)
tree503459c0b8fd32f67ed0da1cc062143998601b25 /src/H5FDpublic.h
parentde925f4b385044e2873cf07c3179ce80f56c8c80 (diff)
parent0ef7cabc633e303f61305362e07b86375aa0753f (diff)
downloadhdf5-0081d8f082bd9fa8c424439b8fb561101dbec78e.zip
hdf5-0081d8f082bd9fa8c424439b8fb561101dbec78e.tar.gz
hdf5-0081d8f082bd9fa8c424439b8fb561101dbec78e.tar.bz2
[svn-r20658] Description:
Bring code contribution from John Biddiscombe into trunk, according to IP assignment #002 (on file). Checkin message from John is: This patch includes the changes necessary to compile a Virtual File Driver outside of the main hdf5 build and still have it link against the hdf5 core and work correctly at run-time. Certain MPI-IO related VFD checks were hard-coded in the hdf5 source and so it was not possible to extend the functionality to new drivers. Removed IS_H5FD_MPI macros and replaced with H5F_HAS_FEATURE calls with new keys, H5FD_FEAT_HAS_MPI and H5FD_FEAT_ALLOCATE_EARLY. Change H5FD cleanup (term_interface) so that file drivers call terminate when their class types are deleted instead of explicitly being called from the finalization code. Move the terminate call out of H5I and put it into the FD class_free call. Remove the now obsolete check of handles after cleaning types at termination time. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode FreeBSD/64 8.2 (freedom) w/gcc4.6, 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 (koala) 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, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-ia64 2.6 (ember) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Diffstat (limited to 'src/H5FDpublic.h')
-rw-r--r--src/H5FDpublic.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index c8ec658..f495e2d 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -209,8 +209,19 @@ typedef enum H5F_mem_t H5FD_mem_t;
* the handle for the VFD (returned with the 'get_handle' callback) is
* of type 'int' and is compatible with POSIX I/O calls.
*/
-#define H5FD_FEAT_POSIX_COMPAT_HANDLE 0x00000080
-
+#define H5FD_FEAT_POSIX_COMPAT_HANDLE 0x00000080
+ /*
+ * Defining the H5FD_FEAT_HAS_MPI for a VFL driver means that
+ * the driver makes use of MPI communication and code may retrieve
+ * communicator/rank information from it
+ */
+#define H5FD_FEAT_HAS_MPI 0x00000100
+ /*
+ * Defining the H5FD_FEAT_ALLOCATE_EARLY for a VFL driver means that
+ * the library will use the H5D_ALLOC_TIME_EARLY on dataset create
+ * instead of the default H5D_ALLOC_TIME_LATE
+ */
+#define H5FD_FEAT_ALLOCATE_EARLY 0x00000200
/* Forward declaration */
typedef struct H5FD_t H5FD_t;
@@ -220,6 +231,7 @@ typedef struct H5FD_class_t {
const char *name;
haddr_t maxaddr;
H5F_close_degree_t fc_degree;
+ herr_t (*terminate)(void);
hsize_t (*sb_size)(H5FD_t *file);
herr_t (*sb_encode)(H5FD_t *file, char *name/*out*/,
unsigned char *p/*out*/);