summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5FDmpiof.c64
-rw-r--r--fortran/src/H5FDmpioff.f9078
-rw-r--r--fortran/src/H5f90proto.h8
3 files changed, 150 insertions, 0 deletions
diff --git a/fortran/src/H5FDmpiof.c b/fortran/src/H5FDmpiof.c
index 1b2a89b..f5e932f 100644
--- a/fortran/src/H5FDmpiof.c
+++ b/fortran/src/H5FDmpiof.c
@@ -185,3 +185,67 @@ nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode)
ret_value = 0;
return ret_value;
}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_fapl_mpiposix_c
+ * Purpose: Call H5Pset_fapl_mpiposix to set mode for parallel I/O and the user
+ * supplied communicator
+ * Inputs: prp_id - property list identifier
+ * comm - MPI communicator
+ * flag - flag to use GPFS hints
+ * Returns: 0 on success, -1 on failure
+ * Programmer: Elena Pourmal
+ * Tuesday, May 6, 2003
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_fapl_mpiposix_c(hid_t_f *prp_id, int_f* comm, int_f* flag)
+{
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hbool_t c_flag;
+ MPI_Comm c_comm;
+ c_comm = MPI_Comm_f2c(*comm);
+ c_flag = (hbool_t)*flag;
+ /*
+ * Call H5Pset_fapl_mpiposix function.
+ */
+ c_prp_id = (hid_t) *prp_id;
+ ret = H5Pset_fapl_mpiposix(c_prp_id, c_comm, c_flag);
+ if (ret < 0) return ret_value;
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_fapl_mpiposix_c
+ * Purpose: Call H5Pget_fapl_mpiposix to retrieve communicator and info object
+ * Inputs: prp_id - property list identifier
+ * Outputs: comm - buffer to return MPI communicator
+ * flag - flag to use GPFS hints
+ * Returns: 0 on success, -1 on failure
+ * Programmer: Elena Pourmal
+ * Tuesday, May 6, 2003
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_fapl_mpiposix_c(hid_t_f *prp_id, int_f* comm, int_f* flag)
+{
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hbool_t c_flag;
+ MPI_Comm c_comm;
+
+ /*
+ * Call H5Pget_fapl_mpiposix function.
+ */
+ c_prp_id = (hid_t) *prp_id;
+ ret = H5Pget_fapl_mpiposix(c_prp_id, &c_comm, &c_flag);
+ if (ret < 0) return ret_value;
+ *comm = (int_f) MPI_Comm_c2f(c_comm);
+ *flag = (int_f) c_flag;
+ ret_value = 0;
+ return ret_value;
+}
diff --git a/fortran/src/H5FDmpioff.f90 b/fortran/src/H5FDmpioff.f90
index 6764d90..49c2cdd 100644
--- a/fortran/src/H5FDmpioff.f90
+++ b/fortran/src/H5FDmpioff.f90
@@ -169,4 +169,82 @@
hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode)
END SUBROUTINE h5pget_dxpl_mpio_f
+
+!----------------------------------------------------------------------
+! Name: h5pset_fapl_mpiposix_f
+!
+! Purpose: Stores MPI IO communicator information to the file
+! access property list.
+!
+! Inputs:
+! prp_id - file access property list identifier
+! comm - MPI-2 communicator
+! use_gpfs - logical flag to use the GPFS hints
+! Outputs:
+! hdferr: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+! NONE
+!
+! Programmer: Elena Pourmal
+! May 6, 2003
+!
+! Modifications:
+!
+! Comment:
+!----------------------------------------------------------------------
+ SUBROUTINE h5pset_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+ INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open
+ ! as defined in MPI_FILE_OPEN of MPI-2
+ LOGICAL, INTENT(IN) :: use_gpfs
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+ INTEGER :: flag
+
+ INTEGER, EXTERNAL :: h5pset_fapl_mpiposix_c
+ flag = 0
+ if(use_gpfs) flag = 1
+ hdferr = h5pset_fapl_mpiposix_c(prp_id, comm, flag)
+ END SUBROUTINE h5pset_fapl_mpiposix_f
+
+!----------------------------------------------------------------------
+! Name: h5pget_fapl_mpiposix_f
+!
+! Purpose: Returns MPI communicator information.
+!
+! Inputs:
+! prp_id - file access property list identifier
+! Outputs:
+! comm - MPI-2 communicator
+! use_gpfs - flag to use GPFS hints
+! hdferr: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+! NONE
+!
+! Programmer: Elena Pourmal
+! May 6, 2003
+!
+! Modifications:
+!
+! Comment:
+!----------------------------------------------------------------------
+
+ SUBROUTINE h5pget_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+ INTEGER, INTENT(OUT) :: comm ! buffer to return communicator
+ LOGICAL, INTENT(OUT) :: use_gpfs
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+ INTEGER :: flag
+
+ INTEGER, EXTERNAL :: h5pget_fapl_mpiposix_c
+ hdferr = h5pget_fapl_mpiposix_c(prp_id, comm, flag)
+ use_gpfs = .FALSE.
+ if (flag .eq. 1) use_gpfs = .TRUE.
+ END SUBROUTINE h5pget_fapl_mpiposix_f
+
END MODULE H5FDMPIO
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index ac96ed3..2272bce 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -778,6 +778,8 @@ H5_DLL int_f nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag );
# define nh5pset_btree_ratios_c FNAME(H5PSET_BTREE_RATIOS_C)
# define nh5pset_fapl_mpio_c FNAME(H5PSET_FAPL_MPIO_C)
# define nh5pget_fapl_mpio_c FNAME(H5PGET_FAPL_MPIO_C)
+# define nh5pset_fapl_mpiposix_c FNAME(H5PSET_FAPL_MPIPOSIX_C)
+# define nh5pget_fapl_mpiposix_c FNAME(H5PGET_FAPL_MPIPOSIX_C)
# define nh5pset_dxpl_mpio_c FNAME(H5PSET_DXPL_MPIO_C)
# define nh5pget_dxpl_mpio_c FNAME(H5PGET_DXPL_MPIO_C)
# define nh5pget_fclose_degree_c FNAME(H5PGET_FCLOSE_DEGREE_C)
@@ -885,6 +887,8 @@ H5_DLL int_f nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag );
# define nh5pset_btree_ratios_c FNAME(h5pset_btree_ratios_c)
# define nh5pset_fapl_mpio_c FNAME(h5pset_fapl_mpio_c)
# define nh5pget_fapl_mpio_c FNAME(h5pget_fapl_mpio_c)
+# define nh5pset_fapl_mpiposix_c FNAME(h5pset_fapl_mpiposix_c)
+# define nh5pget_fapl_mpiposix_c FNAME(h5pget_fapl_mpiposix_c)
# define nh5pset_dxpl_mpio_c FNAME(h5pset_dxpl_mpio_c)
# define nh5pget_dxpl_mpio_c FNAME(h5pget_dxpl_mpio_c)
# define nh5pget_fclose_degree_c FNAME(h5pget_fclose_degree_c)
@@ -1057,6 +1061,10 @@ nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info);
H5_DLL int_f
nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info);
H5_DLL int_f
+nh5pget_fapl_mpiposix_c(hid_t_f *prp_id, int_f* comm, int_f* flag);
+H5_DLL int_f
+nh5pset_fapl_mpiposix_c(hid_t_f *prp_id, int_f* comm, int_f* flag);
+H5_DLL int_f
nh5pget_dxpl_mpio_rc(hid_t_f *prp_id, int_f* data_xfer_mode);
H5_DLL int_f
nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode);