summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-01-15 15:32:23 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-01-15 15:32:23 (GMT)
commitcb6d2f2a45bfc24ccb15a880f9a9397550a8e90e (patch)
tree66b31057bf29fe6d59d102a3cb3f494c05b8ccac /src
parentc326a3bd9ce1d484e3e28c7557ab470e738de51f (diff)
downloadhdf5-cb6d2f2a45bfc24ccb15a880f9a9397550a8e90e.zip
hdf5-cb6d2f2a45bfc24ccb15a880f9a9397550a8e90e.tar.gz
hdf5-cb6d2f2a45bfc24ccb15a880f9a9397550a8e90e.tar.bz2
[svn-r23165] HDFF-8203 Break H5FDmpi.h header into public and private components
https://jira.hdfgroup.uiuc.edu/browse/HDFFV-8203 tested: h5committest
Diffstat (limited to 'src')
-rw-r--r--src/H5FDmpi.c5
-rw-r--r--src/H5FDmpi.h53
-rw-r--r--src/H5FDmpio.c5
-rw-r--r--src/H5FDmpio.h3
-rw-r--r--src/H5FDmpiposix.h3
-rw-r--r--src/H5FDprivate.h41
-rw-r--r--src/H5Fmpi.c1
7 files changed, 46 insertions, 65 deletions
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 866a2cf..295e3c9f 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -29,11 +29,6 @@
#include "H5FDmpi.h" /* Common MPI file driver */
#include "H5Pprivate.h" /* Property lists */
-/*
- * The view is set to this value
- */
-char H5FD_mpi_native_g[] = "native";
-
#ifdef H5_HAVE_PARALLEL
diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h
index 4140671..dcb8df9 100644
--- a/src/H5FDmpi.h
+++ b/src/H5FDmpi.h
@@ -55,62 +55,9 @@ typedef enum H5FD_mpio_collective_opt_t {
H5FD_MPIO_INDIVIDUAL_IO /*zero is the default*/
} H5FD_mpio_collective_opt_t;
-
-#ifdef H5_HAVE_PARALLEL
-
-/* Sub-class the H5FD_class_t to add more specific functions for MPI-based VFDs */
-typedef struct H5FD_class_mpi_t {
- H5FD_class_t super; /* Superclass information & methods */
- int (*get_rank)(const H5FD_t *file); /* Get the MPI rank of a process */
- int (*get_size)(const H5FD_t *file); /* Get the MPI size of a communicator */
- MPI_Comm (*get_comm)(const H5FD_t *file); /* Get the communicator for a file */
-} H5FD_class_mpi_t;
-#endif /* H5_HAVE_PARALLEL */
-
/* Include all the MPI VFL headers */
#include "H5FDmpio.h" /* MPI I/O file driver */
#include "H5FDmpiposix.h" /* MPI/posix I/O file driver */
-/* Macros */
-
-#ifdef H5_HAVE_PARALLEL
-/* ======== Temporary data transfer properties ======== */
-/* Definitions for memory MPI type property */
-#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type"
-/* Definitions for file MPI type property */
-#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type"
-
-/*
- * The view is set to this value
- */
-H5_DLLVAR char H5FD_mpi_native_g[];
-
-/* Function prototypes */
-#ifdef __cplusplus
-extern "C" {
-#endif
-/* General routines */
-H5_DLL haddr_t H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off);
-H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/);
-H5_DLL herr_t H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info,
- MPI_Comm *comm_new, MPI_Info *info_new);
-H5_DLL herr_t H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info);
-#ifdef NOT_YET
-H5_DLL herr_t H5FD_mpio_wait_for_left_neighbor(H5FD_t *file);
-H5_DLL herr_t H5FD_mpio_signal_right_neighbor(H5FD_t *file);
-#endif /* NOT_YET */
-H5_DLL herr_t H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype *btype,
- MPI_Datatype *ftype);
-
-/* Driver specific methods */
-H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file);
-H5_DLL int H5FD_mpi_get_size(const H5FD_t *file);
-H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* H5_HAVE_PARALLEL */
-
#endif /* H5FDmpi_H */
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 2db77c9..878bf82 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -45,6 +45,11 @@
static hid_t H5FD_MPIO_g = 0;
/*
+ * The view is set to this value
+ */
+static char H5FD_mpi_native_g[] = "native";
+
+/*
* The description of a file belonging to this driver.
* The EOF value is only used just after the file is opened in order for the
* library to determine whether the file is empty, truncated, or okay. The MPIO
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index fe2d11f..d836086 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -30,9 +30,6 @@
/* Macros */
-#define IS_H5FD_MPIO(f) /* (H5F_t *f) */ \
- (H5FD_MPIO==H5F_DRIVER_ID(f))
-
#ifdef H5_HAVE_PARALLEL
/*Turn on H5FDmpio_debug if H5F_DEBUG is on */
#ifdef H5F_DEBUG
diff --git a/src/H5FDmpiposix.h b/src/H5FDmpiposix.h
index e3764e1..12ff206 100644
--- a/src/H5FDmpiposix.h
+++ b/src/H5FDmpiposix.h
@@ -31,9 +31,6 @@
/* Macros */
-#define IS_H5FD_MPIPOSIX(f) /* (H5F_t *f) */ \
- (H5FD_MPIPOSIX==H5F_DRIVER_ID(f))
-
#ifdef H5_HAVE_PARALLEL
/* Function prototypes */
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 64b71d4..600cae1 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -39,6 +39,28 @@
/* Length of filename buffer */
#define H5FD_MAX_FILENAME_LEN 1024
+/* MPI based VFDs */
+#define IS_H5FD_MPIO(f) /* (H5F_t *f) */ \
+ (H5FD_MPIO==H5F_DRIVER_ID(f))
+
+#define IS_H5FD_MPIPOSIX(f) /* (H5F_t *f) */ \
+ (H5FD_MPIPOSIX==H5F_DRIVER_ID(f))
+
+#ifdef H5_HAVE_PARALLEL
+/* ======== Temporary data transfer properties ======== */
+/* Definitions for memory MPI type property */
+#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type"
+/* Definitions for file MPI type property */
+#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type"
+
+/* Sub-class the H5FD_class_t to add more specific functions for MPI-based VFDs */
+typedef struct H5FD_class_mpi_t {
+ H5FD_class_t super; /* Superclass information & methods */
+ int (*get_rank)(const H5FD_t *file); /* Get the MPI rank of a process */
+ int (*get_size)(const H5FD_t *file); /* Get the MPI size of a communicator */
+ MPI_Comm (*get_comm)(const H5FD_t *file); /* Get the communicator for a file */
+} H5FD_class_mpi_t;
+#endif
/****************************/
/* Library Private Typedefs */
@@ -123,9 +145,28 @@ H5_DLL herr_t H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum);
H5_DLL herr_t H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void** file_handle);
H5_DLL herr_t H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr);
H5_DLL haddr_t H5FD_get_base_addr(const H5FD_t *file);
+
+/* Function prototypes for MPI based VFDs*/
#ifdef H5_HAVE_PARALLEL
+/* General routines */
+H5_DLL haddr_t H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off);
+H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/);
+H5_DLL herr_t H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info,
+ MPI_Comm *comm_new, MPI_Info *info_new);
+H5_DLL herr_t H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info);
+#ifdef NOT_YET
+H5_DLL herr_t H5FD_mpio_wait_for_left_neighbor(H5FD_t *file);
+H5_DLL herr_t H5FD_mpio_signal_right_neighbor(H5FD_t *file);
+#endif /* NOT_YET */
+H5_DLL herr_t H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype *btype,
+ MPI_Datatype *ftype);
H5_DLL herr_t H5FD_set_mpio_atomicity(H5FD_t *file, hbool_t flag);
H5_DLL herr_t H5FD_get_mpio_atomicity(H5FD_t *file, hbool_t *flag);
+
+/* Driver specific methods */
+H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file);
+H5_DLL int H5FD_mpi_get_size(const H5FD_t *file);
+H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file);
#endif /* H5_HAVE_PARALLEL */
#endif /* !_H5FDprivate_H */
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 966528a..07d29f2 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -37,7 +37,6 @@
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
-#include "H5FDmpi.h" /* MPI-based file drivers */
#include "H5FDprivate.h" /* File drivers */
#include "H5Iprivate.h" /* IDs */