summaryrefslogtreecommitdiffstats
path: root/src/H5FDmpi.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-01-31 01:38:44 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-01-31 01:38:44 (GMT)
commit138bc92ebdb7c6e1ad379dcdabae21bf0a79ab0d (patch)
tree046bd488f60127ac3a6ba0edbd482b44f022c788 /src/H5FDmpi.h
parentf499912c3247e592a0eeef7207b917428756b094 (diff)
downloadhdf5-138bc92ebdb7c6e1ad379dcdabae21bf0a79ab0d.zip
hdf5-138bc92ebdb7c6e1ad379dcdabae21bf0a79ab0d.tar.gz
hdf5-138bc92ebdb7c6e1ad379dcdabae21bf0a79ab0d.tar.bz2
[svn-r8126] Purpose:
Bug fix/optimization Description: Address slowdown in MPI-I/O file metadata operations that was introduced mid-stream. We now _require_ a POSIX compliant parallel file system for the MPI-I/O file driver (as well as for the MPI-POSIX file driver). Also optimized file open operation when the file is being created by reducing the number of collective & syncronizing calls. Additionally, refactor the MPI routines into a common place, eliminating duplicated code. Platforms tested: FreeBSD 4.9 (sleipnir) w/parallel h5committest
Diffstat (limited to 'src/H5FDmpi.h')
-rw-r--r--src/H5FDmpi.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h
new file mode 100644
index 0000000..0de063a
--- /dev/null
+++ b/src/H5FDmpi.h
@@ -0,0 +1,93 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Friday, January 30, 2004
+ *
+ * Purpose: The public header file for common items for all MPI VFL drivers
+ */
+#ifndef H5FDmpi_H
+#define H5FDmpi_H
+
+#ifdef H5_HAVE_PARALLEL
+
+/* Type of I/O for data transfer properties */
+typedef enum H5FD_mpio_xfer_t {
+ H5FD_MPIO_INDEPENDENT = 0, /*zero is the default*/
+ H5FD_MPIO_COLLECTIVE
+} H5FD_mpio_xfer_t;
+
+/* 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;
+
+/* Include all the MPI VFL headers */
+#include "H5FDfphdf5.h" /* Flexible PHDF5 file driver */
+#include "H5FDmpio.h" /* MPI I/O file driver */
+#include "H5FDmpiposix.h" /* MPI/posix I/O file driver */
+
+/*
+ * The view is set to this value
+ */
+extern char H5FD_mpi_native_g[];
+
+/* Macros */
+
+/* Single macro to check for all file drivers that use MPI */
+#define IS_H5FD_MPI(file) \
+ (IS_H5FD_MPIO(file) || IS_H5FD_MPIPOSIX(file) || IS_H5FD_FPHDF5(file))
+
+/* ======== Temporary data transfer properties ======== */
+/* Definitions for memory MPI type property */
+#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type"
+#define H5FD_MPI_XFER_MEM_MPI_TYPE_SIZE sizeof(MPI_Datatype)
+/* Definitions for file MPI type property */
+#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type"
+#define H5FD_MPI_XFER_FILE_MPI_TYPE_SIZE sizeof(MPI_Datatype)
+
+/* 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);
+H5_DLL herr_t H5FD_mpi_teardown_collective(hid_t dxpl_id);
+
+/* 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 */
+