From 4224df836c50acce5baaa4070a282e2b11d3eb4e Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 24 Jan 2024 16:48:43 -0600 Subject: [PATCH] fixed cmake builds, update doxygne --- CMakeLists.txt | 3 ++ configure.ac | 2 +- fortran/src/CMakeLists.txt | 7 +++ fortran/src/H5Pff.F90 | 82 +++++++++++++++++++++++++++--- fortran/src/hdf5_fortrandll.def.in | 8 +-- 5 files changed, 91 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e23c2e9b978..42a8fb8b9fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1088,6 +1088,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for # Check if MPI-3 Fortran 2008 module mpi_f08 is supported if (MPI_Fortran_HAVE_F08_MODULE) set (H5_HAVE_MPI_F08 1) + message (VERBOSE "MPI-3 Fortran 2008 module mpi_f08 is supported") + else () + message (VERBOSE "MPI-3 Fortran 2008 module mpi_f08 is NOT supported") endif () endif () diff --git a/configure.ac b/configure.ac index 2f22ce8ada4..98cdcd52194 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ ## ---------------------------------------------------------------------- ## Initialize configure. ## -AC_PREREQ([2.69]) +AC_PREREQ([2.71]) ## AC_INIT takes the name of the package, the version number, and an ## email address to report bugs. AC_CONFIG_SRCDIR takes a unique file diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 60c0c3a96a2..4c280469056 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -24,6 +24,13 @@ if (WIN32) endif () endif () +if (H5_HAVE_MPI_F08) # MPI-3 module mpi_f08 supported + set (CMAKE_H5_HAVE_MPI_F08 1) +else () + set (H5_NOMPI_F08 ";") + set (CMAKE_H5_HAVE_MPI_F08 0) +endif () + # configure for Fortran preprocessor # Define Parallel variable for passing to H5config_f.inc.cmake diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 5a6af88f617..a49fb9f2c16 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -5288,7 +5288,6 @@ END SUBROUTINE h5pget_fapl_mpio_f !! See C API: @ref H5Pget_fapl_mpio() !! SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) - USE mpi_f08 IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id TYPE(MPI_COMM), INTENT(OUT) :: comm @@ -5529,18 +5528,50 @@ END FUNCTION H5Pget_mpio_no_collective_cause END SUBROUTINE h5pget_mpio_no_collective_cause_f +#ifdef H5_DOXYGEN !> !! \ingroup FH5P !! -!! \brief Set the MPI communicator and info. +!! \brief Set the MPI communicator and information. !! !! \param prp_id File access property list identifier. -!! \param comm The MPI communicator. -!! \param info The MPI info object. +!! \param comm MPI-2 communicator. +!! \param info MPI-2 info object. !! \param hdferr \fortran_error !! !! See C API: @ref H5Pset_mpi_params() !! + SUBROUTINE H5Pset_mpi_params_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(IN) :: comm + INTEGER , INTENT(IN) :: info + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE H5Pset_mpi_params_f +!> +!! \ingroup FH5P +!! +!! \brief Set the MPI communicator and information. +!! +!! \note Supports MPI Fortran module mpi_f08 +!! +!! \param prp_id File access property list identifier. +!! \param comm MPI-3 communicator. +!! \param info MPI-3 info object. +!! \param hdferr \fortran_error +!! +!! See C API: @ref H5Pset_mpi_params() +!! + SUBROUTINE H5Pset_mpi_params_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + TYPE(MPI_COMM), INTENT(IN) :: comm + TYPE(MPI_INFO), INTENT(IN) :: info + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE H5Pset_mpi_params_f + +#else + SUBROUTINE H5Pset_mpi_params_f90(prp_id, comm, info, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id @@ -5587,18 +5618,55 @@ END FUNCTION H5Pset_mpi_params END SUBROUTINE H5Pset_mpi_params_f08 #endif + +#endif + +#ifdef H5_DOXYGEN !> !! \ingroup FH5P !! !! \brief Get the MPI communicator and info. !! !! \param prp_id File access property list identifier. -!! \param comm The MPI communicator. -!! \param info The MPI info object. +!! \param comm MPI-2 communicator. +!! \param info MPI-2 info object. +!! \param hdferr \fortran_error +!! +!! See C API: @ref H5Pget_mpi_params() +!! + SUBROUTINE H5Pget_mpi_params_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(OUT) :: comm + INTEGER , INTENT(OUT) :: info + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE H5Pget_mpi_params_f +!> +!! \ingroup FH5P +!! +!! \brief Get the MPI communicator and information. +!! +!! \note Supports MPI Fortran module mpi_f08 +!! +!! \param prp_id File access property list identifier. +!! \param comm MPI-3 communicator. +!! \param info MPI-3 info object. !! \param hdferr \fortran_error !! +!! \attention It is the responsibility of the application to free the MPI objects. +!! !! See C API: @ref H5Pget_mpi_params() !! + SUBROUTINE H5Pget_mpi_params_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + TYPE(MPI_COMM), INTENT(OUT) :: comm + TYPE(MPI_INFO), INTENT(OUT) :: info + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE H5Pget_mpi_params_f + +#else + SUBROUTINE H5Pget_mpi_params_f90(prp_id, comm, info, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id @@ -5646,6 +5714,8 @@ END FUNCTION H5pget_mpi_params END SUBROUTINE H5Pget_mpi_params_f08 #endif +#endif + !> !! \ingroup FH5P !! diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 8280d29da98..e29488f8cee 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -422,17 +422,17 @@ H5P_mp_H5PGET_FILE_SPACE_PAGE_SIZE_F H5P_mp_H5PGET_ACTUAL_SELECTION_IO_MODE_F ; Parallel @H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F90 -@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F08 +@H5_NOPAREXP@@H5_NOMPI_F08@H5P_mp_H5PSET_FAPL_MPIO_F08 @H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F90 -@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F08 +@H5_NOPAREXP@@H5_NOMPI_F08@H5P_mp_H5PGET_FAPL_MPIO_F08 @H5_NOPAREXP@@H5_NOSUBFILING@H5P_mp_H5PSET_FAPL_SUBFILING_F @H5_NOPAREXP@@H5_NOSUBFILING@H5P_mp_H5PGET_FAPL_SUBFILING_F @H5_NOPAREXP@@H5_NOSUBFILING@H5P_mp_H5PSET_FAPL_IOC_F @H5_NOPAREXP@@H5_NOSUBFILING@H5P_mp_H5PGET_FAPL_IOC_F @H5_NOPAREXP@H5P_mp_H5PSET_MPI_PARAMS_F90 -@H5_NOPAREXP@H5P_mp_H5PSET_MPI_PARAMS_F08 +@H5_NOPAREXP@@H5_NOMPI_F08@H5P_mp_H5PSET_MPI_PARAMS_F08 @H5_NOPAREXP@H5P_mp_H5PGET_MPI_PARAMS_F90 -@H5_NOPAREXP@H5P_mp_H5PGET_MPI_PARAMS_F08 +@H5_NOPAREXP@@H5_NOMPI_F08@H5P_mp_H5PGET_MPI_PARAMS_F08 @H5_NOPAREXP@H5P_mp_H5PSET_DXPL_MPIO_F @H5_NOPAREXP@H5P_mp_H5PGET_DXPL_MPIO_F @H5_NOPAREXP@H5P_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F