Skip to content

Commit

Permalink
New Fortran Examples added (HDFGroup#3916)
Browse files Browse the repository at this point in the history
* added subfiling example

* Added filtered writes with no selection example
  • Loading branch information
brtnfld authored and lrknox committed Jan 4, 2024
1 parent 2d59ae9 commit ed43d9d
Show file tree
Hide file tree
Showing 21 changed files with 964 additions and 41 deletions.
2 changes: 1 addition & 1 deletion HDF5Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ if (${H5_LIBVER_DIR} GREATER 16)
endif ()

configure_file (${H5EX_F90_SRC_DIR}/H5D/h5_version.h.in ${PROJECT_BINARY_DIR}/FORTRAN/H5D/h5_version.h @ONLY)
configure_file (${H5EX_F90_SRC_DIR}/H5G/h5_version.h.in ${PROJECT_BINARY_DIR}/FORTRAN/H5G/h5_version.h @ONLY)
configure_file (${H5EX_F90_SRC_DIR}/H5D/h5_version.h.in ${PROJECT_BINARY_DIR}/FORTRAN/H5G/h5_version.h @ONLY)
else ()
set (HDF_BUILD_FORTRAN OFF CACHE BOOL "Build examples FORTRAN support" FORCE)
endif ()
Expand Down
23 changes: 0 additions & 23 deletions HDF5Examples/FORTRAN/H5G/h5_version.h.in

This file was deleted.

1 change: 1 addition & 0 deletions HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ project (HDF5Examples_FORTRAN_H5PAR Fortran)
INCLUDE_DIRECTORIES (
${CMAKE_Fortran_MODULE_DIRECTORY}${HDF_MOD_EXT}
${PROJECT_BINARY_DIR}
${HDF5_F90_BINARY_DIR}
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
)

Expand Down
11 changes: 11 additions & 0 deletions HDF5Examples/FORTRAN/H5PAR/Fortran_sourcefiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ set (examples
ph5_f90_hyperslab_by_pattern
ph5_f90_hyperslab_by_chunk
)

if (HDF5_ENABLE_SUBFILING_VFD)
set (examples ${examples}
ph5_f90_subfiling
)
endif()
if (HDF5_VERSION_STRING VERSION_GREATER_EQUAL "1.14.4")
set (examples ${examples}
ph5_f90_filtered_writes_no_sel
)
endif()
3 changes: 1 addition & 2 deletions HDF5Examples/FORTRAN/H5PAR/ph5_f90_dataset.F90
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
PROGRAM DATASET

USE HDF5 ! This module contains all necessary modules
USE MPI

IMPLICIT NONE

INCLUDE 'mpif.h'
CHARACTER(LEN=10), PARAMETER :: filename = "sds.h5" ! File name
CHARACTER(LEN=8), PARAMETER :: dsetname = "IntArray" ! Dataset name

Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/FORTRAN/H5PAR/ph5_f90_file_create.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
PROGRAM FILE_CREATE

USE HDF5 ! This module contains all necessary modules
USE MPI

IMPLICIT NONE

INCLUDE 'mpif.h'
CHARACTER(LEN=10), PARAMETER :: filename = "sds.h5" ! File name

INTEGER(HID_T) :: file_id ! File identifier
Expand Down
Loading

0 comments on commit ed43d9d

Please sign in to comment.