Commit 9998cb0e authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

adjusted for compatibility with standard hdf5 in addition to hdf5vfd

parent 05907663
......@@ -54,7 +54,6 @@
#include <XdmfDSMManager.hpp>
#include <XdmfDSMBuffer.hpp>
#include <XdmfDSMCommMPI.hpp>
#include <XdmfDSMDriver.hpp>
#include <XdmfError.hpp>
#include <mpi.h>
......@@ -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 <XdmfDSMDriver.hpp>
/* 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)
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment