diff --git a/core/dsm/XdmfDSMDriver.cpp b/core/dsm/XdmfDSMDriver.cpp index b86cd9f240251e3e4811681e77083537f881189e..5bfc218ea1d0895c87f24942619fb9c45b17a225 100644 --- a/core/dsm/XdmfDSMDriver.cpp +++ b/core/dsm/XdmfDSMDriver.cpp @@ -54,7 +54,6 @@ #include #include #include -#include #include #include @@ -104,7 +103,6 @@ XdmfDSMManager *dsmManager = NULL; (size_t)((A)+(Z))<(size_t)(A)) extern "C" { - #include "H5FDprivate.h" /* File drivers */ #include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ @@ -115,6 +113,8 @@ extern "C" { #include "H5Iprivate.h" /* IDs */ #include "H5Pprivate.h" /* Property lists */ +#include + /* Private Prototypes */ static void *XDMF_dsm_fapl_get(H5FD_t *_file); static void *XDMF_dsm_fapl_copy(const void *_old_fa); @@ -213,10 +213,11 @@ XDMF_dsm_init(void) /* Set return value */ ret_value = XDMF_DSM_g;// return value is the new id of the driver -done: - if (err_occurred) { - /* Nothing */ - } +// Removed because error handling isn't called in this function +//done: +// if (err_occurred) { +// /* Nothing */ +// } FUNC_LEAVE_NOAPI(ret_value) } @@ -335,10 +336,11 @@ XDMF_dsm_set_manager(void *manager) xdmf_dsm_set_manager(manager); -done: - if (err_occurred) { - /* Nothing */ - } +// Removed because error handling isn't called in this function +//done: +// if (err_occurred) { +// /* Nothing */ +// } FUNC_LEAVE_NOAPI(ret_value) } @@ -730,8 +732,12 @@ XDMF_dsm_query(const H5FD_t UNUSED *_file, unsigned long *flags /* out */) *flags = 0; *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ +#ifdef H5FD_FEAT_HAS_MPI *flags |= H5FD_FEAT_HAS_MPI; /* This driver uses MPI */ +#endif +#ifdef H5FD_FEAT_ALLOCATE_EARLY *flags |= H5FD_FEAT_ALLOCATE_EARLY; /* Allocate space early instead of late */ +#endif } /* end if */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/core/dsm/XdmfDSMDriver.hpp b/core/dsm/XdmfDSMDriver.hpp index d95c7f10cb076a413e8c18516b1154321f0e7e5d..d5273baa254cc5d1774d4cb58cccf8cae5f63b99 100644 --- a/core/dsm/XdmfDSMDriver.hpp +++ b/core/dsm/XdmfDSMDriver.hpp @@ -81,6 +81,18 @@ #define XDMF_DSM (XDMF_dsm_init()) +#define IS_XDMF_DSM(f) /* (H5F_t *f) */ \ + (XDMF_DSM==H5F_DRIVER_ID(f)) + +#include "H5FDmpiposix.h" + +#ifndef H5FD_FEAT_HAS_MPI + // This is a temporary solution to allow interface with standard hdf5 in addition to hdf5vfd + // Hopefully a better solution will be made in the future + #define XDMF_dsm_init H5FD_mpiposix_init + //#pragma message(": warning Xdmf: H5FD mpiposix file driver replaced to enable dsm compatibility with hdf5") +#endif + extern "C" { XDMFDSM_EXPORT hid_t XDMF_dsm_init(void); #if H5_VERSION_GE(1,9,0)