summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2022-10-14 18:35:52 (GMT)
committerGitHub <noreply@github.com>2022-10-14 18:35:52 (GMT)
commitafb92a3e229a05755733c183d749bfc69548ab01 (patch)
tree4c5163d3d7c725e61c20c5dc9c3e740ce262aac6 /fortran/src
parent5021fd9d4d2632454684a01aabad2a1cb20ac9f3 (diff)
downloadhdf5-afb92a3e229a05755733c183d749bfc69548ab01.zip
hdf5-afb92a3e229a05755733c183d749bfc69548ab01.tar.gz
hdf5-afb92a3e229a05755733c183d749bfc69548ab01.tar.bz2
Fix H5Dfill_f test (#2162)
* change to integer for legacy H5Dfill_f testing * fixed H5Dfill testing issues with promoted real and integer * updated build fortran dependencies
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5Dff.F9017
-rw-r--r--fortran/src/Makefile.am6
2 files changed, 12 insertions, 11 deletions
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index 1a2c9f3..07d2508 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -88,6 +88,7 @@ MODULE H5D
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR
USE H5GLOBAL
+ USE H5LIB, ONLY : h5kind_to_type
PRIVATE h5dread_vl_integer, h5dread_vl_real, h5dread_vl_string
PRIVATE h5dwrite_vl_integer, h5dwrite_vl_real, h5dwrite_vl_string
@@ -1659,8 +1660,8 @@ CONTAINS
f_ptr_fill_value = C_LOC(fill_value)
f_ptr_buf = C_LOC(buf(1))
- fill_type_id = H5T_NATIVE_INTEGER
- mem_type_id = H5T_NATIVE_INTEGER
+ fill_type_id = h5kind_to_type(KIND(fill_value), H5_INTEGER_KIND)
+ mem_type_id = fill_type_id
CALL h5dfill_ptr(f_ptr_fill_value, fill_type_id, f_ptr_buf, mem_type_id, space_id, hdferr)
@@ -1683,8 +1684,8 @@ CONTAINS
f_ptr_fill_value = C_LOC(fill_value)
f_ptr_buf = C_LOC(buf(1))
- fill_type_id = H5T_NATIVE_REAL
- mem_type_id = H5T_NATIVE_REAL
+ fill_type_id = h5kind_to_type(KIND(fill_value), H5_REAL_KIND)
+ mem_type_id = fill_type_id
CALL h5dfill_ptr(f_ptr_fill_value, fill_type_id, f_ptr_buf, mem_type_id, space_id, hdferr)
@@ -1706,8 +1707,8 @@ CONTAINS
f_ptr_fill_value = C_LOC(fill_value)
f_ptr_buf = C_LOC(buf(1))
- fill_type_id = H5T_NATIVE_DOUBLE
- mem_type_id = H5T_NATIVE_DOUBLE
+ fill_type_id = h5kind_to_type(KIND(fill_value), H5_REAL_KIND)
+ mem_type_id = fill_type_id
CALL h5dfill_ptr(f_ptr_fill_value, fill_type_id, f_ptr_buf, mem_type_id, space_id, hdferr)
@@ -1730,8 +1731,8 @@ CONTAINS
f_ptr_fill_value = C_LOC(fill_value)
f_ptr_buf = C_LOC(buf(1))
- fill_type_id = H5T_NATIVE_DOUBLE
- mem_type_id = H5T_NATIVE_DOUBLE
+ fill_type_id = h5kind_to_type(KIND(fill_value), H5_REAL_KIND)
+ mem_type_id = fill_type_id
CALL h5dfill_ptr(f_ptr_fill_value, fill_type_id, f_ptr_buf, mem_type_id, space_id, hdferr)
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index 85e51b7..50aa5eb 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -41,8 +41,8 @@ else
endif
# Source files for the library.
-libhdf5_fortran_la_SOURCES=H5f90global.F90 \
- H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \
+libhdf5_fortran_la_SOURCES=H5fortran_types.F90 H5f90global.F90 \
+ H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \
H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \
H5Tff.F90 H5VLff.F90 H5Zff.F90 H5_gen.F90 H5fortkit.F90 \
H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \
@@ -144,7 +144,7 @@ H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo
H5_buildiface.lo: $(srcdir)/H5_buildiface.F90
H5_ff.lo: $(srcdir)/H5_ff.F90 H5Fff.lo H5f90global.lo
H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo
-H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo
+H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo H5_ff.lo
H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo
H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo
H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo