summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2003-10-10 22:19:00 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2003-10-10 22:19:00 (GMT)
commitc72601e0d6246b6dc72d0c45c226e92b0ef4c2d7 (patch)
tree09c85d2572492a12ece9aac6761e97a75f191d63
parentc4b72f1579cbfcf7ad8ad3f5318cd425cf35feb8 (diff)
downloadhdf5-c72601e0d6246b6dc72d0c45c226e92b0ef4c2d7.zip
hdf5-c72601e0d6246b6dc72d0c45c226e92b0ef4c2d7.tar.gz
hdf5-c72601e0d6246b6dc72d0c45c226e92b0ef4c2d7.tar.bz2
[svn-r7601]
Purpose: Bug fix Description: Parameter rdcc_nelmts of the h5pget_cache_f subroutine had wrong INTEGER(SIZE_T) instead of INTEGER type. Solution: Fixed the type Platforms tested: arabica in 64-bit mode (where INTEGER(SIZE_T) is not the same as INTEGER) Misc. update:
-rw-r--r--fortran/src/H5Pf.c6
-rw-r--r--fortran/src/H5Pff.f907
-rw-r--r--fortran/src/H5f90proto.h2
-rw-r--r--fortran/test/tH5P.f9018
-rw-r--r--release_docs/RELEASE.txt2
5 files changed, 30 insertions, 5 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 49f8daf..04aba5b 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -1133,15 +1133,17 @@ nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, int_f* rdcc_nelmts, size_t_
* Programmer: Xiangyang Su
* Friday, February 25, 2000
* Modifications: Changed type of the rdcc_w0 parameter to be real_f instead of double
+ * Changed type of the rdcc_nelmts parameter to be int_f.
+ * EIP October 10, 2003
*---------------------------------------------------------------------------*/
int_f
-nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0)
+nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, int_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0)
{
int ret_value = -1;
hid_t c_prp_id;
herr_t ret;
int c_mdc_nelmts;
- size_t c_rdcc_nelmts;
+ int c_rdcc_nelmts;
size_t c_rdcc_nbytes;
double c_rdcc_w0;
/*
diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90
index 26b8f78..9de252e 100644
--- a/fortran/src/H5Pff.f90
+++ b/fortran/src/H5Pff.f90
@@ -2165,6 +2165,9 @@
! called C functions (it is needed for Windows
! port). March 14, 2001
!
+! Bug fix: type of the rdcc_nelmts parameter should be INTEGER
+! instead of INTEGER(SIZE_T) October 10, 2003
+!
! Comment:
!----------------------------------------------------------------------
@@ -2179,7 +2182,7 @@
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
INTEGER, INTENT(OUT) :: mdc_nelmts !Number of elements (objects)
! in the meta data cache
- INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts !Number of elements (objects)
+ INTEGER, INTENT(OUT) :: rdcc_nelmts !Number of elements (objects)
! in the meta data cache
INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes !Total size of the raw data
!chunk cache, in bytes
@@ -2198,7 +2201,7 @@
!DEC$ ENDIF
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER, INTENT(OUT) :: mdc_nelmts
- INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts
+ INTEGER, INTENT(OUT) :: rdcc_nelmts
INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes
REAL, INTENT(OUT) :: rdcc_w0
END FUNCTION h5pget_cache_c
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index ad82080..5c8c226 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -1016,7 +1016,7 @@ nh5pget_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plis
H5_DLL int_f
nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, int_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0);
H5_DLL int_f
-nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0);
+nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, int_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0);
H5_DLL int_f
nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist);
H5_DLL int_f
diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90
index 9939085..635d4bf 100644
--- a/fortran/test/tH5P.f90
+++ b/fortran/test/tH5P.f90
@@ -166,6 +166,10 @@
INTEGER :: i, j !general purpose integers
INTEGER(HSIZE_T), DIMENSION(7) :: data_dims_b
INTEGER, DIMENSION(7) :: data_dims
+ INTEGER :: mdc_nelmts
+ INTEGER :: rdcc_nelmts
+ INTEGER(SIZE_T) :: rdcc_nbytes
+ REAL :: rdcc_w0
memb_fapl = H5P_DEFAULT_F
memb_map = H5FD_MEM_SUPER_F
memb_addr = 0.
@@ -214,6 +218,20 @@
CALL h5pget_fapl_multi_f(fapl, memb_map_out, memb_fapl_out, memb_name_out, &
memb_addr_out, relax_out, error)
CALL check("h5pget_fapl_multi_f", error, total_error)
+ !
+ ! Let's check h5pget(set)cache_f APIs here for now
+ !
+ CALL h5pget_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
+ rdcc_w0, error)
+ CALL check("h5pget_cache_f", error, total_error)
+
+ ! Set cache to some number
+ !
+ rdcc_nbytes = 1024*1024
+ CALL h5pset_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
+ rdcc_w0, error)
+ CALL check("h5pset_cache_f", error, total_error)
+
CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error, access_prp = fapl)
CALL check("h5fcreate_f", error, total_error)
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index c117e42..a01e5d4 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -80,6 +80,8 @@ Bug Fixes since HDF5-1.6.0 release
Library
-------
+ - Fixed incorrect datatype of the third parameter to the Fortran90
+ h5pget_cache_f function (INTEGER(SIZE_T) to INTEGER) EIP - 2003/10/10
- Fixed problems with accessing variable-length data datatypes on
Crays. QAK - 2003/10/10
- Fixed potential file corruption bug when too many object header