diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2022-10-06 16:08:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 16:08:56 (GMT) |
commit | e80079fd21ffe6978ac69e7632e069cc44874675 (patch) | |
tree | b1f75384a0df8385cb8ad5e13b233554c20bdfa1 /fortran/src/H5Pf.c | |
parent | a322eb6147f243e1d45934ddfc1cfa6f69a0ddec (diff) | |
download | hdf5-e80079fd21ffe6978ac69e7632e069cc44874675.zip hdf5-e80079fd21ffe6978ac69e7632e069cc44874675.tar.gz hdf5-e80079fd21ffe6978ac69e7632e069cc44874675.tar.bz2 |
Subfiling Fortran wrapper work. (#2143)
* added C ref. for Fortran constants
* added C ref. for Fortran constants
* move constant paramters to H5* module listing
* added back comment
* Fortran subfiling and ioc FD with tests. H5Pset/get_mpi_params wrappers with tests, misc.. parallel test clean-up.
* misc. fixes
* fixed CMake testpar issues, formatted, misc. updates
* updated tests
Diffstat (limited to 'fortran/src/H5Pf.c')
-rw-r--r-- | fortran/src/H5Pf.c | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 876457f..58f8f24 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -5473,6 +5473,87 @@ h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info) ret_value = 0; return ret_value; } + +/****if* H5Pf/h5pset_mpi_params_c + * NAME + * h5pset_mpi_params_c + * PURPOSE + * Set the MPI communicator and info. + * INPUTS + * prp_id - property list identifier + * comm - MPI communicator + * info - MPI info object + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M.S. Breitenfeld + * October 2022 + * + * SOURCE + */ +int_f +h5pset_mpi_params_c(hid_t_f *prp_id, int_f *comm, int_f *info) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + MPI_Comm c_comm; + MPI_Info c_info; + c_comm = MPI_Comm_f2c(*comm); + c_info = MPI_Info_f2c(*info); + + /* + * Call H5Pset_mpi_params. + */ + c_prp_id = *prp_id; + ret = H5Pset_mpi_params(c_prp_id, c_comm, c_info); + if (ret < 0) + return ret_value; + ret_value = 0; + return ret_value; +} + +/****if* H5Pf/h5pget_mpi_params_c + * NAME + * h5pget_mpi_params_c + * PURPOSE + * Get the MPI communicator and info. + * INPUTS + * prp_id - property list identifier + * comm - MPI communicator + * info - MPI info object + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M.S. Breitenfeld + * October 2022 + * + * SOURCE + */ +int_f +h5pget_mpi_params_c(hid_t_f *prp_id, int_f *comm, int_f *info) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + MPI_Comm c_comm; + MPI_Info c_info; + + /* + * Call H5Pget_mpi_params function. + */ + c_prp_id = *prp_id; + ret = H5Pget_mpi_params(c_prp_id, &c_comm, &c_info); + if (ret < 0) + return ret_value; + *comm = (int_f)MPI_Comm_c2f(c_comm); + *info = (int_f)MPI_Info_c2f(c_info); + ret_value = 0; + return ret_value; +} + /****if* H5Pf/h5pset_dxpl_mpio_c * NAME * h5pset_dxpl_mpio_c |