summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorM. Scot Breitenfeld <brtnfld@hdfgroup.org>2019-03-07 20:47:38 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2019-03-07 20:47:38 (GMT)
commit07fde1e25c51e1c4294248311104ef02dbb7da21 (patch)
treeeeeebf3da31ab3a47716759985c375203cf04976 /fortran/src
parent5a51c3677e25e8426d6cd8532baa46244d645cf9 (diff)
parent8d2a047c25d2bd34c52c8d437802c309a9ae0985 (diff)
downloadhdf5-07fde1e25c51e1c4294248311104ef02dbb7da21.zip
hdf5-07fde1e25c51e1c4294248311104ef02dbb7da21.tar.gz
hdf5-07fde1e25c51e1c4294248311104ef02dbb7da21.tar.bz2
Merge branch 'develop' into H10621
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/CMakeLists.txt6
-rw-r--r--fortran/src/H5Fff.F9093
-rw-r--r--fortran/src/H5Of.c48
-rw-r--r--fortran/src/H5Off.F90107
-rw-r--r--fortran/src/H5Pff.F9091
-rw-r--r--fortran/src/H5Sf.c161
-rw-r--r--fortran/src/H5Sff.F90304
-rw-r--r--fortran/src/H5_f.c11
-rw-r--r--fortran/src/H5_ff.F9074
-rw-r--r--fortran/src/H5f90global.F9013
-rw-r--r--fortran/src/H5f90proto.h13
-rw-r--r--fortran/src/H5match_types.c13
-rw-r--r--fortran/src/hdf5_fortrandll.def.in5
13 files changed, 418 insertions, 521 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 6cc15ea..83ee82c 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -9,11 +9,7 @@ if (WIN32)
if (NOT H5_HAVE_PARALLEL)
set (H5_NOPAREXP ";")
endif ()
- if (NOT HDF5_ENABLE_F2003)
- set (H5_NOF03EXP ";")
- else ()
- set (H5_F03EXP ";")
- endif ()
+ set (H5_F03EXP ";")
configure_file (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY)
endif ()
endif ()
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90
index 9c8b941..cc51f37 100644
--- a/fortran/src/H5Fff.F90
+++ b/fortran/src/H5Fff.F90
@@ -946,4 +946,97 @@ CONTAINS
END SUBROUTINE h5fget_file_image_f
+!****s* H5F (F03)/h5fget_dset_no_attrs_hint_f_F03
+!
+! NAME
+! h5fget_dset_no_attrs_hint_f
+!
+! PURPOSE
+! Gets the value of the "minimize dataset headers" value which creates
+! smaller dataset object headers when its set and no attributes are present.
+!
+! INPUTS
+! file_id - Target file identifier.
+!
+! OUTPUTS
+! minimize - Value of the setting.
+! hdferr - error code:
+! 0 on success and -1 on failure
+!
+! AUTHOR
+! Dana Robinson
+! January 2019
+!
+! Fortran2003 Interface:
+ SUBROUTINE h5fget_dset_no_attrs_hint_f(file_id, minimize, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: file_id
+ LOGICAL , INTENT(OUT) :: minimize
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+ LOGICAL(C_BOOL) :: c_minimize
+
+ INTERFACE
+ INTEGER FUNCTION h5fget_dset_no_attrs_hint_c(file_id, minimize) BIND(C, NAME='H5Fget_dset_no_attrs_hint')
+ IMPORT :: HID_T, C_BOOL
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: file_id
+ LOGICAL(C_BOOL), INTENT(OUT) :: minimize
+ END FUNCTION h5fget_dset_no_attrs_hint_c
+ END INTERFACE
+
+ hdferr = INT(h5fget_dset_no_attrs_hint_c(file_id, c_minimize))
+
+ ! Transfer value of C C_BOOL type to Fortran LOGICAL
+ minimize = c_minimize
+
+ END SUBROUTINE h5fget_dset_no_attrs_hint_f
+
+!****s* H5F (F03)/h5fset_dset_no_attrs_hint_f_F03
+!
+! NAME
+! h5fset_dset_no_attrs_hint_f
+!
+! PURPOSE
+! Sets the value of the "minimize dataset headers" value which creates
+! smaller dataset object headers when its set and no attributes are present.
+!
+! INPUTS
+! file_id - Target file identifier.
+! minimize - Value of the setting.
+!
+! OUTPUTS
+! hdferr - error code:
+! 0 on success and -1 on failure
+!
+! AUTHOR
+! Dana Robinson
+! January 2019
+!
+! Fortran2003 Interface:
+ SUBROUTINE h5fset_dset_no_attrs_hint_f(file_id, minimize, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: file_id
+ LOGICAL , INTENT(IN) :: minimize
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+ LOGICAL(C_BOOL) :: c_minimize
+
+ INTERFACE
+ INTEGER FUNCTION h5fset_dset_no_attrs_hint_c(file_id, minimize) BIND(C, NAME='H5Fset_dset_no_attrs_hint')
+ IMPORT :: HID_T, C_BOOL
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: file_id
+ LOGICAL(C_BOOL), INTENT(IN), VALUE :: minimize
+ END FUNCTION h5fset_dset_no_attrs_hint_c
+ END INTERFACE
+
+ ! Transfer value of Fortran LOGICAL to C C_BOOL type
+ c_minimize = minimize
+
+ hdferr = INT(h5fset_dset_no_attrs_hint_c(file_id, c_minimize))
+
+ END SUBROUTINE h5fset_dset_no_attrs_hint_f
+
END MODULE H5F
+
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index 45b7f09..08305ea 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -27,11 +27,15 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info);
int_f
fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) {
+ /* This function does not used the field parameter because we want
+ * this function to fill the unfilled fields with C's default values.
+ */
+
struct tm *ts;
object_info->fileno = Oinfo.fileno;
object_info->addr = (haddr_t_f)Oinfo.addr;
-
+
object_info->type = (int_f)Oinfo.type;
object_info->rc = (int_f)Oinfo.rc;
@@ -96,6 +100,8 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) {
object_info->meta_size.obj.index_size = (hsize_t_f)Oinfo.meta_size.obj.index_size;
object_info->meta_size.obj.heap_size = (hsize_t_f)Oinfo.meta_size.obj.heap_size;
+ object_info->meta_size.attr.index_size = (hsize_t_f)Oinfo.meta_size.attr.index_size;
+ object_info->meta_size.attr.heap_size = (hsize_t_f)Oinfo.meta_size.attr.heap_size;
return 0;
@@ -138,7 +144,7 @@ h5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen
* Call H5Olink function.
*/
if((hid_t_f)H5Olink((hid_t)*object_id, (hid_t)*new_loc_id, c_name,
- (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
+ (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
done:
@@ -229,6 +235,7 @@ h5oclose_c ( hid_t_f *object_id )
* idx - Iteration position at which to start
* op - Callback function passing data regarding the link to the calling application
* op_data - User-defined pointer to data required by the application for its processing of the link
+ * fields - Flags specifying the fields to include in object_info.
*
* OUTPUTS
* idx - Position at which an interrupted iteration may be restarted
@@ -241,7 +248,7 @@ h5oclose_c ( hid_t_f *object_id )
* SOURCE
*/
int_f
-h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data )
+h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data, int_f *fields )
/******/
{
int_f ret_value = -1; /* Return value */
@@ -250,7 +257,8 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op,
/*
* Call H5Ovisit2
*/
- func_ret_value = H5Ovisit2( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data, H5O_INFO_ALL);
+
+ func_ret_value = H5Ovisit2( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data, (unsigned)*fields);
ret_value = (int_f)func_ret_value;
@@ -302,6 +310,7 @@ h5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id)
* name - Name of group, relative to loc_id.
* namelen - Name length.
* lapl_id - Link access property list.
+ * fields - Flags specifying the fields to include in object_info.
* OUTPUTS
* object_info - Buffer in which to return object information.
*
@@ -314,7 +323,7 @@ h5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id)
*/
int_f
h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
- H5O_info_t_f *object_info)
+ H5O_info_t_f *object_info, int_f *fields)
/******/
{
char *c_name = NULL; /* Buffer to hold C string */
@@ -331,10 +340,10 @@ h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *l
* Call H5Oinfo_by_name function.
*/
if(H5Oget_info_by_name2((hid_t)*loc_id, c_name,
- &Oinfo, H5O_INFO_ALL, (hid_t)*lapl_id) < 0)
+ &Oinfo, (unsigned)*fields, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
- ret_value = fill_h5o_info_t_f(Oinfo,object_info);
+ ret_value = fill_h5o_info_t_f(Oinfo, object_info);
done:
if(c_name)
@@ -354,6 +363,7 @@ h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *l
* lapl_id - Link access property list.
* OUTPUTS
* object_info - Buffer in which to return object information.
+ * fields - Flags specifying the fields to include in object_info.
*
* RETURNS
* 0 on success, -1 on failure
@@ -364,7 +374,7 @@ h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *l
*/
int_f
h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
- int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info)
+ int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info, int_f *fields)
/******/
{
char *c_group_name = NULL; /* Buffer to hold C string */
@@ -386,7 +396,7 @@ h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
* Call H5Oinfo_by_idx function.
*/
if(H5Oget_info_by_idx2((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
- &Oinfo, H5O_INFO_ALL, (hid_t)*lapl_id) < 0)
+ &Oinfo, (unsigned)*fields, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -404,6 +414,7 @@ h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
* Calls H5Oget_info
* INPUTS
* object_id - Identifier for target object.
+ * fields - Flags specifying the fields to include in object_info.
* OUTPUTS
* object_info - Buffer in which to return object information.
*
@@ -415,7 +426,7 @@ h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
* SOURCE
*/
int_f
-h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info)
+h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info, int_f *fields)
/******/
{
int_f ret_value = 0; /* Return value */
@@ -424,7 +435,7 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info)
/*
* Call H5Oinfo_by_name function.
*/
- if(H5Oget_info2((hid_t)*object_id, &Oinfo, H5O_INFO_ALL) < 0)
+ if(H5Oget_info2((hid_t)*object_id, &Oinfo, (unsigned)*fields) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -457,8 +468,8 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info)
*/
int_f
h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
- hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len,
- hid_t_f *ocpypl_id, hid_t_f *lcpl_id )
+ hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len,
+ hid_t_f *ocpypl_id, hid_t_f *lcpl_id )
/******/
{
char *c_src_name = NULL; /* Buffer to hold C string */
@@ -478,7 +489,7 @@ h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
* Call H5Ocopy function.
*/
if(H5Ocopy( (hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name,
- (hid_t)*ocpypl_id, (hid_t)*lcpl_id) < 0)
+ (hid_t)*ocpypl_id, (hid_t)*lcpl_id) < 0)
HGOTO_DONE(FAIL);
done:
@@ -503,6 +514,7 @@ h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
* idx - Iteration position at which to start
* op - Callback function passing data regarding the link to the calling application
* op_data - User-defined pointer to data required by the application for its processing of the link
+ * fields - Flags specifying the fields to include in object_info.
*
* OUTPUTS
* idx - Position at which an interrupted iteration may be restarted
@@ -516,7 +528,7 @@ h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
*/
int_f
h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order,
- H5O_iterate_t op, void *op_data, hid_t_f *lapl_id )
+ H5O_iterate_t op, void *op_data, hid_t_f *lapl_id, int_f *fields )
/******/
{
int_f ret_value = -1; /* Return value */
@@ -533,7 +545,7 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f
* Call H5Ovisit
*/
func_ret_value = H5Ovisit_by_name2( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
- op, op_data, H5O_INFO_ALL, (hid_t)*lapl_id);
+ op, op_data, (unsigned)*fields, (hid_t)*lapl_id);
ret_value = (int_f)func_ret_value;
done:
@@ -763,7 +775,7 @@ h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fc
*/
int_f
h5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id)
+ int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id)
/******/
{
char *c_group_name = NULL; /* Buffer to hold C string */
@@ -868,7 +880,7 @@ h5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssi
*/
int_f
h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
- _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id)
+ _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id)
/******/
{
char *c_comment = NULL; /* Buffer to hold C string */
diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90
index 243ec29..8c77230 100644
--- a/fortran/src/H5Off.F90
+++ b/fortran/src/H5Off.F90
@@ -69,6 +69,15 @@ MODULE H5O
TYPE(mesg_t) :: mesg
END TYPE hdr_t
+ TYPE, BIND(C) :: c_hdr_t
+ INTEGER(C_INT) :: version ! Version number of header format in file
+ INTEGER(C_INT) :: nmesgs ! Number of object header messages
+ INTEGER(C_INT) :: nchunks ! Number of object header chunks
+ INTEGER(C_INT) :: flags ! Object header status flags
+ TYPE(space_t) :: space
+ TYPE(mesg_t) :: mesg
+ END TYPE c_hdr_t
+
! Extra metadata storage for obj & attributes
TYPE, BIND(C) :: H5_ih_info_t
INTEGER(hsize_t) :: index_size ! btree and/or list
@@ -83,7 +92,7 @@ MODULE H5O
TYPE, BIND(C) :: h5o_info_t
INTEGER(C_LONG) :: fileno ! File number that object is located in
INTEGER(haddr_t) :: addr ! Object address in file
- INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.)
+ INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.)
INTEGER :: rc ! Reference count of object
INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE --
@@ -98,6 +107,28 @@ MODULE H5O
TYPE(meta_size_t) :: meta_size
END TYPE h5o_info_t
+! C interoperable structure for h5o_info_t. The Fortran derived type returns the time
+! values as an integer array as specified in the Fortran intrinsic DATE_AND_TIME(VALUES).
+! Whereas, this derived type does not.
+
+ TYPE, BIND(C) :: c_h5o_info_t
+ INTEGER(C_LONG) :: fileno ! File number that object is located in
+ INTEGER(haddr_t) :: addr ! Object address in file
+ INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.)
+ INTEGER(C_INT) :: rc ! Reference count of object
+
+ INTEGER(KIND=TIME_T) :: atime ! Access time
+ INTEGER(KIND=TIME_T) :: mtime ! modify time
+ INTEGER(KIND=TIME_T) :: ctime ! create time
+ INTEGER(KIND=TIME_T) :: btime ! Access time
+
+ INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object
+
+ TYPE(c_hdr_t) :: hdr
+
+ TYPE(meta_size_t) :: meta_size
+ END TYPE c_h5o_info_t
+
!*****
CONTAINS
@@ -834,12 +865,16 @@ CONTAINS
! return_value - returns the return value of the first operator that returns a positive value, or
! zero if all members were processed with no operator returning non-zero.
! hdferr - Returns 0 if successful and -1 if fails
+!
+! Optional parameters:
+! fields - Flags specifying the fields to include in object_info.
+!
! AUTHOR
! M. Scot Breitenfeld
! November 19, 2008
!
! Fortran2003 Interface:
- SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr)
+ SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr, fields)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: object_id
INTEGER, INTENT(IN) :: index_type
@@ -849,10 +884,12 @@ CONTAINS
TYPE(C_PTR) :: op_data
INTEGER, INTENT(OUT) :: return_value
INTEGER, INTENT(OUT) :: hdferr
+ INTEGER, INTENT(IN), OPTIONAL :: fields
!*****
+ INTEGER :: fields_c
INTERFACE
- INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) &
+ INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data, fields) &
BIND(C, NAME='h5ovisit_c')
IMPORT :: C_FUNPTR, C_PTR
IMPORT :: HID_T
@@ -862,10 +899,14 @@ CONTAINS
INTEGER, INTENT(IN) :: order
TYPE(C_FUNPTR), VALUE :: op
TYPE(C_PTR), VALUE :: op_data
+ INTEGER, INTENT(IN) :: fields
END FUNCTION h5ovisit_c
END INTERFACE
- return_value = h5ovisit_c(object_id, index_type, order, op, op_data)
+ fields_c = H5O_INFO_ALL_F
+ IF(PRESENT(fields)) fields_c = fields
+
+ return_value = h5ovisit_c(object_id, index_type, order, op, op_data, fields_c)
IF(return_value.GE.0)THEN
hdferr = 0
@@ -894,26 +935,29 @@ CONTAINS
!
! Optional parameters:
! lapl_id - Link access property list.
+! fields - Flags specifying the fields to include in object_info.
!
! AUTHOR
! M. Scot Breitenfeld
! December 1, 2008
!
! Fortran2003 Interface:
- SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id)
+ SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id, fields)
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: name
TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id
+ INTEGER , INTENT(IN) , OPTIONAL :: fields
!*****
INTEGER(SIZE_T) :: namelen
INTEGER(HID_T) :: lapl_id_default
TYPE(C_PTR) :: ptr
+ INTEGER :: fields_c
INTERFACE
- INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) &
+ INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info, fields) &
BIND(C, NAME='h5oget_info_by_name_c')
IMPORT :: c_char, c_ptr
IMPORT :: HID_T, SIZE_T
@@ -923,10 +967,13 @@ CONTAINS
INTEGER(SIZE_T) , INTENT(IN) :: namelen
INTEGER(HID_T) , INTENT(IN) :: lapl_id_default
TYPE(C_PTR),VALUE :: object_info
-
+ INTEGER , INTENT(IN) :: fields
END FUNCTION h5oget_info_by_name_c
END INTERFACE
+ fields_c = H5O_INFO_ALL_F
+ IF(PRESENT(fields)) fields_c = fields
+
namelen = LEN(name)
lapl_id_default = H5P_DEFAULT_F
@@ -934,7 +981,7 @@ CONTAINS
ptr = C_LOC(object_info)
- hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr)
+ hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr, fields_c)
END SUBROUTINE H5Oget_info_by_name_f
@@ -953,34 +1000,43 @@ CONTAINS
! object_info - Buffer in which to return object information.
! hdferr - Returns 0 if successful and -1 if fails.
!
+! Optional parameters:
+! fields - Flags specifying the fields to include in object_info.
+!
! AUTHOR
! M. Scot Breitenfeld
! May 11, 2012
!
! Fortran2003 Interface:
- SUBROUTINE h5oget_info_f(object_id, object_info, hdferr)
+ SUBROUTINE h5oget_info_f(object_id, object_info, hdferr, fields)
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: object_id
TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info
INTEGER , INTENT(OUT) :: hdferr
+ INTEGER , INTENT(IN), OPTIONAL :: fields
!*****
TYPE(C_PTR) :: ptr
-
+ INTEGER :: fields_c
+
INTERFACE
- INTEGER FUNCTION h5oget_info_c(object_id, object_info) &
+ INTEGER FUNCTION h5oget_info_c(object_id, object_info, fields) &
BIND(C, NAME='h5oget_info_c')
IMPORT :: C_PTR
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: object_id
TYPE(C_PTR), VALUE :: object_info
+ INTEGER, INTENT(IN) :: fields
END FUNCTION h5oget_info_c
END INTERFACE
+ fields_c = H5O_INFO_ALL_F
+ IF(PRESENT(fields)) fields_c = fields
+
ptr = C_LOC(object_info)
- hdferr = H5Oget_info_c(object_id, ptr)
+ hdferr = H5Oget_info_c(object_id, ptr, fields_c)
END SUBROUTINE H5Oget_info_f
@@ -1006,6 +1062,7 @@ CONTAINS
!
! Optional parameters:
! lapl_id - Link access property list. (Not currently used.)
+! fields - Flags specifying the fields to include in object_info.
!
! AUTHOR
! M. Scot Breitenfeld
@@ -1013,7 +1070,7 @@ CONTAINS
!
! Fortran2003 Interface:
SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, &
- object_info, hdferr, lapl_id)
+ object_info, hdferr, lapl_id, fields)
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
@@ -1025,14 +1082,16 @@ CONTAINS
TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id
+ INTEGER , INTENT(IN) , OPTIONAL :: fields
!*****
INTEGER(SIZE_T) :: namelen
INTEGER(HID_T) :: lapl_id_default
TYPE(C_PTR) :: ptr
+ INTEGER :: fields_c
INTERFACE
INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, &
- index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c')
+ index_field, order, n, lapl_id_default, object_info, fields) BIND(C, NAME='h5oget_info_by_idx_c')
IMPORT :: c_char, c_ptr, c_funptr
IMPORT :: HID_T, SIZE_T, HSIZE_T
INTEGER(HID_T) , INTENT(IN) :: loc_id
@@ -1043,17 +1102,20 @@ CONTAINS
INTEGER(HSIZE_T), INTENT(IN) :: n
INTEGER(HID_T) , INTENT(IN) :: lapl_id_default
TYPE(C_PTR), VALUE :: object_info
-
+ INTEGER, INTENT(IN) :: fields
END FUNCTION h5oget_info_by_idx_c
END INTERFACE
+ fields_c = H5O_INFO_ALL_F
+ IF(PRESENT(fields)) fields_c = fields
+
namelen = LEN(group_name)
lapl_id_default = H5P_DEFAULT_F
IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
ptr = C_LOC(object_info)
- hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr)
+ hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr, fields_c)
END SUBROUTINE H5Oget_info_by_idx_f
@@ -1086,6 +1148,7 @@ CONTAINS
!
! Optional parameters:
! lapl_id - Link access property list identifier.
+! fields - Flags specifying the fields to include in object_info.
!
! AUTHOR
! M. Scot Breitenfeld
@@ -1093,7 +1156,7 @@ CONTAINS
!
! Fortran2003 Interface:
SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, &
- return_value, hdferr, lapl_id)
+ return_value, hdferr, lapl_id, fields)
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: object_name
@@ -1105,14 +1168,16 @@ CONTAINS
INTEGER , INTENT(OUT) :: return_value
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id
+ INTEGER , INTENT(IN) , OPTIONAL :: fields
!*****
INTEGER(SIZE_T) :: namelen
INTEGER(HID_T) :: lapl_id_default
+ INTEGER :: fields_c
INTERFACE
INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, &
- op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c')
+ op, op_data, lapl_id, fields) BIND(C, NAME='h5ovisit_by_name_c')
IMPORT :: C_CHAR, C_PTR, C_FUNPTR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
@@ -1124,16 +1189,20 @@ CONTAINS
TYPE(C_FUNPTR) , VALUE :: op
TYPE(C_PTR) , VALUE :: op_data
INTEGER(HID_T) , INTENT(IN) :: lapl_id
+ INTEGER , INTENT(IN) :: fields
END FUNCTION h5ovisit_by_name_c
END INTERFACE
+ fields_c = H5O_INFO_ALL_F
+ IF(PRESENT(fields)) fields_c = fields
+
namelen = LEN(object_name)
lapl_id_default = H5P_DEFAULT_F
IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, &
- op, op_data, lapl_id_default)
+ op, op_data, lapl_id_default, fields_c)
IF(return_value.GE.0)THEN
hdferr = 0
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index d6e70b3..31dfbdc 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -8022,8 +8022,97 @@ SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len)
END SUBROUTINE h5pget_virtual_dsetname_f
+!****s* H5P (F03)/h5pget_dset_no_attrs_hint_f_F03
+!
+! NAME
+! h5pget_dset_no_attrs_hint_f
+!
+! PURPOSE
+! Gets the value of the "minimize dataset headers" value which creates
+! smaller dataset object headers when its set and no attributes are present.
+!
+! INPUTS
+! dcpl_id - Target dataset creation property list identifier.
+!
+! OUTPUTS
+! minimize - Value of the setting.
+! hdferr - error code:
+! 0 on success and -1 on failure
+!
+! AUTHOR
+! Dana Robinson
+! January 2019
+!
+! Fortran2003 Interface:
+ SUBROUTINE h5pget_dset_no_attrs_hint_f(dcpl_id, minimize, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: dcpl_id
+ LOGICAL , INTENT(OUT) :: minimize
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+ LOGICAL(C_BOOL) :: c_minimize
-END MODULE H5P
+ INTERFACE
+ INTEGER FUNCTION h5pget_dset_no_attrs_hint_c(dcpl_id, minimize) BIND(C, NAME='H5Pget_dset_no_attrs_hint')
+ IMPORT :: HID_T, C_BOOL
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: dcpl_id
+ LOGICAL(C_BOOL), INTENT(OUT) :: minimize
+ END FUNCTION h5pget_dset_no_attrs_hint_c
+ END INTERFACE
+
+ hdferr = INT(h5pget_dset_no_attrs_hint_c(dcpl_id, c_minimize))
+ ! Transfer value of C C_BOOL type to Fortran LOGICAL
+ minimize = c_minimize
+ END SUBROUTINE h5pget_dset_no_attrs_hint_f
+
+!****s* H5P (F03)/h5pset_dset_no_attrs_hint_f_F03
+!
+! NAME
+! h5pset_dset_no_attrs_hint_f
+!
+! PURPOSE
+! Sets the value of the "minimize dataset headers" value which creates
+! smaller dataset object headers when its set and no attributes are present.
+!
+! INPUTS
+! dcpl_id - Target dataset creation property list identifier.
+! minimize - Value of the setting.
+!
+! OUTPUTS
+! hdferr - error code:
+! 0 on success and -1 on failure
+!
+! AUTHOR
+! Dana Robinson
+! January 2019
+!
+! Fortran2003 Interface:
+ SUBROUTINE h5pset_dset_no_attrs_hint_f(dcpl_id, minimize, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: dcpl_id
+ LOGICAL , INTENT(IN) :: minimize
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+ LOGICAL(C_BOOL) :: c_minimize
+
+ INTERFACE
+ INTEGER FUNCTION h5pset_dset_no_attrs_hint_c(dcpl_id, minimize) BIND(C, NAME='H5Pset_dset_no_attrs_hint')
+ IMPORT :: HID_T, C_BOOL
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: dcpl_id
+ LOGICAL(C_BOOL), INTENT(IN), VALUE :: minimize
+ END FUNCTION h5pset_dset_no_attrs_hint_c
+ END INTERFACE
+
+ ! Transfer value of Fortran LOGICAL to C C_BOOL type
+ c_minimize = minimize
+
+ hdferr = INT(h5pset_dset_no_attrs_hint_c(dcpl_id, c_minimize))
+
+ END SUBROUTINE h5pset_dset_no_attrs_hint_f
+
+END MODULE H5P
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index 2eae0d9..96540f7 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -995,167 +995,6 @@ done:
}
-#ifdef NEW_HYPERSLAB_API
-/****if* H5Sf/h5scombine_hyperslab_c
- * NAME
- * h5scombine_hyperslab_c
- * PURPOSE
- * Call H5Scombine_hyperslab
- * INPUTS
- * space_id - identifier of the dataspace
- * operator - defines how the new selection is combined
- * start - offset of start of hyperslab
- * count - number of blocks included in the hyperslab
- * stride - hyperslab stride (interval between blocks)
- * block - size of block in the hyperslab
- * OUTPUTS
- * hyper_id - identifier for the new dataspace
- * RETURNS
- * 0 on success, -1 on failure
- * AUTHOR
- * Elena Pourmal
- * Monday, October 7, 2002
- * HISTORY
- *
- * SOURCE
-*/
-
-int_f
-h5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id)
-/******/
-{
- int ret_value = -1;
- hid_t c_space_id;
- hid_t c_hyper_id;
- hsize_t *c_start = NULL;
- hsize_t *c_count = NULL;
- hsize_t *c_stride = NULL;
- hsize_t *c_block = NULL;
-
- H5S_seloper_t c_op;
- herr_t status;
- int rank;
- int i;
-
- rank = H5Sget_simple_extent_ndims(*space_id);
- if (rank < 0 ) return ret_value;
- c_start = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_start == NULL) goto DONE;
-
- c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_count == NULL) goto DONE;
-
- c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_stride == NULL) goto DONE;
-
- c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_block == NULL) goto DONE;
-
-
- /*
- * Reverse dimensions due to C-FORTRAN storage order.
- */
-
- for (i=0; i < rank; i++) {
- int t= (rank - i) - 1;
- c_start[i] = (hsize_t)start[t];
- c_count[i] = (hsize_t)count[t];
- c_stride[i] = (hsize_t)stride[t];
- c_block[i] = (hsize_t)block[t];
- }
-
- c_op = (H5S_seloper_t)*op;
-
- c_space_id = (hid_t)*space_id;
- c_hyper_id = H5Scombine_hyperslab(c_space_id, c_op, c_start, c_stride, c_count, c_block);
- if ( c_hyper_id < 0 ) goto DONE;
- *hyper_id = (hid_t_f)c_hyper_id;
- ret_value = 0;
-DONE:
- if(c_start != NULL) HDfree(c_start);
- if(c_count != NULL) HDfree(c_count);
- if(c_stride!= NULL) HDfree(c_stride);
- if(c_block != NULL) HDfree(c_block);
- return ret_value;
-}
-/****if* H5Sf/h5scombine_select_c
- * NAME
- * h5scombine_select_c
- * PURPOSE
- * Call H5Scombine_ select
- * INPUTS
- * space1_id - identifier of the first dataspace
- * operator - defines how the new selection is combined
- * space2_id - identifier of the second dataspace
- * OUTPUTS
- * ds_id - identifier for the new dataspace
- * RETURNS
- * 0 on success, -1 on failure
- * AUTHOR
- * Elena Pourmal
- * Monday, October 7, 2002
- * HISTORY
- *
- * SOURCE
-*/
-
-int_f
-h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id)
-/******/
-{
- int ret_value = -1;
- hid_t c_space1_id;
- hid_t c_space2_id;
- hid_t c_ds_id;
- H5S_seloper_t c_op;
-
- c_op = (H5S_seloper_t)*op;
-
- c_space1_id = (hid_t)*space1_id;
- c_space2_id = (hid_t)*space2_id;
- c_ds_id = H5Scombine_select(c_space1_id, c_op, c_space2_id);
- if ( c_ds_id < 0 ) return ret_value;
- *ds_id = (hid_t_f)c_ds_id;
- ret_value = 0;
- return ret_value;
-}
-/****if* H5Sf/h5sselect_select_c
- * NAME
- * h5sselect_select_c
- * PURPOSE
- * Call H5Sselect_ select
- * INPUTS
- * space1_id - identifier of the first dataspace to modify
- * operator - defines how the new selection is combined
- * space2_id - identifier of the second dataspace
- * RETURNS
- * 0 on success, -1 on failure
- * AUTHOR
- * Elena Pourmal
- * Monday, October 7, 2002
- * HISTORY
- *
- * SOURCE
-*/
-
-int_f
-h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id)
-/******/
-{
- int ret_value = -1;
- hid_t c_space1_id;
- hid_t c_space2_id;
- H5S_seloper_t c_op;
-
- c_op = (H5S_seloper_t)*op;
-
- c_space1_id = (hid_t)*space1_id;
- c_space2_id = (hid_t)*space2_id;
- if( H5Sselect_select(c_space1_id, c_op, c_space2_id)< 0) return ret_value;
- ret_value = 0;
- return ret_value;
-}
-#endif /*NEW_HYPERSLAB_API*/
/****if* H5Sf/h5sget_select_type_c
* NAME
* h5sget_select_type_c
diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90
index 3434fba..3af7755 100644
--- a/fortran/src/H5Sff.F90
+++ b/fortran/src/H5Sff.F90
@@ -1275,310 +1275,6 @@ CONTAINS
DEALLOCATE(def_stride)
END SUBROUTINE h5sselect_hyperslab_f
-! !$!
-! !$!****s* H5S/h5scombine_hyperslab_f
-! !$!
-! !$! NAME
-! !$! h5scombine_hyperslab_f
-! !$!
-! !$! PURPOSE
-! !$! Combine a hyperslab selection with the current
-! !$! selection for a dataspace
-! !$!
-! !$! INPUTS
-! !$! space_id - dataspace of selection to use
-! !$! operator - flag, valid values are:
-! !$! H5S_SELECT_NOOP_F
-! !$! H5S_SELECT_SET_F
-! !$! H5S_SELECT_OR_F
-! !$! H5S_SELECT_AND_F
-! !$! H5S_SELECT_XOR_F
-! !$! H5S_SELECT_NOTB_F
-! !$! H5S_SELECT_NOTA_F
-! !$! H5S_SELECT_APPEND_F
-! !$! H5S_SELECT_PREPEND_F
-! !$! start - array with hyperslab offsets
-! !$! count - number of blocks included in the
-! !$! hyperslab
-! !$! OUTPUTS
-! !$! hyper_id - identifier for the new hyperslab
-! !$! hdferr: - error code
-! !$! Success: 0
-! !$! Failure: -1
-! !$! OPTIONAL PARAMETERS
-! !$! stride - array with hyperslab strides
-! !$! block - array with hyperslab block sizes
-! !$!
-! !$! AUTHOR
-! !$! Elena Pourmal
-! !$! October 7, 2002
-! !$!
-! !$! HISTORY
-! !$!
-! !$!
-! !$! NOTES
-! !$! Commented out until 1.6 ? 10/08/2002
-! !$!
-! !$! SOURCE
-! SUBROUTINE h5scombine_hyperslab_f(space_id, operator, start, count, &
-! hyper_id, hdferr, stride, block)
-! IMPLICIT NONE
-! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-! INTEGER, INTENT(IN) :: operator ! Flag, valid values are:
- ! H5S_SELECT_NOOP_F
- ! H5S_SELECT_SET_F
- ! H5S_SELECT_OR_F
- ! H5S_SELECT_AND_F
- ! H5S_SELECT_XOR_F
- ! H5S_SELECT_NOTB_F
- ! H5S_SELECT_NOTA_F
- ! H5S_SELECT_APPEND_F
- ! H5S_SELECT_PREPEND_F
- !
-! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start
- ! Starting coordinates of the hyperslab
-! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count
- ! Number of blocks to select
- ! from dataspace
-! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier
-! INTEGER, INTENT(OUT) :: hdferr ! Error code
-! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride
- ! Array of how many elements to move
- ! in each direction
-! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block
- ! Sizes of element block
-! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block
-! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride
-! INTEGER :: rank
-! INTEGER :: error1, error2
-
-! INTERFACE
-! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, &
-! start, count, stride, block, hyper_id)
-! USE H5GLOBAL
-! !DEC$IF DEFINED(HDF5F90_WINDOWS)
-! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_HYPERSLAB_C'::h5scombine_hyperslab_c
-! !DEC$ENDIF
-! INTEGER(HID_T), INTENT(IN) :: space_id
-! INTEGER, INTENT(IN) :: operator
-! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start
-! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count
-! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride
-! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block
-! INTEGER(HID_T), INTENT(OUT) :: hyper_id
-! END FUNCTION h5scombine_hyperslab_c
-! END INTERFACE
-
-! if (present(stride).and. present(block)) then
-! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, &
-! stride, block, hyper_id)
-! return
-! endif
- ! Case of optional parameters.
- !
- ! Find the rank of the dataspace to allocate memory for
- ! default stride and block arrays.
- !
-! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr)
-! if( hdferr .EQ. -1) return
- !
-! if (present(stride).and. .not.present(block)) then
-! allocate(def_block(rank), stat=error1)
-! if (error1.NE.0) then
-! hdferr = -1
-! return
-! endif
-! def_block = 1
-! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, &
-! stride, def_block, hyper_id)
-! deallocate(def_block)
-! return
-! endif
-
-! if (.not.present(stride).and. present(block)) then
-! allocate(def_stride(rank), stat=error2)
-! if (error2.NE.0) then
-! hdferr = -1
-! return
-! endif
-! def_stride = 1
-! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, &
-! def_stride, block, hyper_id)
-! deallocate(def_stride)
-! return
-! endif
-! allocate(def_block(rank), stat=error1)
-! allocate(def_stride(rank), stat=error2)
-! if ((error1.NE.0) .OR. (error2.NE.0)) then
-! hdferr = -1
-! return
-! endif
-! def_block = 1
-! def_stride = 1
-! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, &
-! def_stride, def_block, hyper_id)
-! deallocate(def_block)
-! deallocate(def_stride)
-
-! END SUBROUTINE h5scombine_hyperslab_f
-
-! !$!
-! !$!****s* H5S/
-! !$!
-! !$! NAME
-! !$! h5scombine_select_f
-! !$!
-! !$! PURPOSE
-! !$! Combine two hyperslab selections with an operation
-! !$! and return a dataspace with resulting selection.
-! !$!
-! !$! INPUTS
-! !$! space1_id - dataspace of selection to use
-! !$! operator - flag, valid values are:
-! !$! H5S_SELECT_NOOP_F
-! !$! H5S_SELECT_SET_F
-! !$! H5S_SELECT_OR_F
-! !$! H5S_SELECT_AND_F
-! !$! H5S_SELECT_XOR_F
-! !$! H5S_SELECT_NOTB_F
-! !$! H5S_SELECT_NOTA_F
-! !$! H5S_SELECT_APPEND_F
-! !$! H5S_SELECT_PREPEND_F
-! !$! space2_id - dataspace of selection to use
-! !$! OUTPUTS
-! !$! ds_id - idataspace identifier with the new selection
-! !$! hdferr: - error code
-! !$! Success: 0
-! !$! Failure: -1
-! !$! OPTIONAL PARAMETERS - NONE
-! !$!
-! !$! AUTHOR
-! !$! Elena Pourmal
-! !$! October 7, 2002
-! !$!
-! !$! HISTORY
-! !$!
-! !$!
-! !$! NOTES commented out until 1.6 release(?) 10/08/2002
-! !$!
-
-! ! SOURCE
-! !$ SUBROUTINE h5scombine_select_f(space1_id, operator, space2_id, &
-! ds_id, hdferr)
-! IMPLICIT NONE
-! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier
-! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier
-! INTEGER, INTENT(IN) :: operator ! Flag, valid values are:
- ! H5S_SELECT_NOOP_F
- ! H5S_SELECT_SET_F
- ! H5S_SELECT_OR_F
- ! H5S_SELECT_AND_F
- ! H5S_SELECT_XOR_F
- ! H5S_SELECT_NOTB_F
- ! H5S_SELECT_NOTA_F
- ! H5S_SELECT_APPEND_F
- ! H5S_SELECT_PREPEND_F
- !
-! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier
-! INTEGER, INTENT(OUT) :: hdferr ! Error code
-!
-! INTERFACE
-! INTEGER FUNCTION h5scombine_select_c(space1_id, operator, &
-! space2_id, ds_id)
-! USE H5GLOBAL
-! !DEC$IF DEFINED(HDF5F90_WINDOWS)
-! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_SELECT_C'::h5scombine_select_c
-! !DEC$ENDIF
-! INTEGER(HID_T), INTENT(IN) :: space1_id
-! INTEGER(HID_T), INTENT(IN) :: space2_id
-! INTEGER, INTENT(IN) :: operator
-! INTEGER(HID_T), INTENT(OUT) :: ds_id
-! END FUNCTION h5scombine_select_c
-! END INTERFACE
-
-! hdferr = h5scombine_select_c(space1_id, operator, space2_id, &
-! ds_id)
-! return
-
-! END SUBROUTINE h5scombine_select_f
-
-! !$!
-! !$!****s* H5S/
-! !$!
-! !$! NAME
-! !$! h5sselect_select_f
-! !$!
-! !$! PURPOSE
-! !$! Refine a hyperslab selection with an operation
-! !$! using second hyperslab
-! !$!
-! !$! INPUTS
-! !$! space1_id - dataspace of selection to modify
-! !$! operator - flag, valid values are:
-! !$! H5S_SELECT_NOOP_F
-! !$! H5S_SELECT_SET_F
-! !$! H5S_SELECT_OR_F
-! !$! H5S_SELECT_AND_F
-! !$! H5S_SELECT_XOR_F
-! !$! H5S_SELECT_NOTB_F
-! !$! H5S_SELECT_NOTA_F
-! !$! H5S_SELECT_APPEND_F
-! !$! H5S_SELECT_PREPEND_F
-! !$! space2_id - dataspace of selection to use
-! !$!
-! !$! OUTPUTS
-! !$! hdferr: - error code
-! !$! Success: 0
-! !$! Failure: -1
-! !$! OPTIONAL PARAMETERS - NONE
-! !$!
-! !$! AUTHOR
-! !$! Elena Pourmal
-! !$! October 7, 2002
-! !$!
-! !$! HISTORY
-! !$!
-! !$!
-! !$! NOTESCommented out until 1.6 release(?) 10/08/2002 EIP
-! !$!
-
-! ! SOURCE
-! SUBROUTINE h5sselect_select_f(space1_id, operator, space2_id, &
-! hdferr)
-! IMPLICIT NONE
-! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to
- ! modify
-! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier
-! INTEGER, INTENT(IN) :: operator ! Flag, valid values are:
- ! H5S_SELECT_NOOP_F
- ! H5S_SELECT_SET_F
- ! H5S_SELECT_OR_F
- ! H5S_SELECT_AND_F
- ! H5S_SELECT_XOR_F
- ! H5S_SELECT_NOTB_F
- ! H5S_SELECT_NOTA_F
- ! H5S_SELECT_APPEND_F
- ! H5S_SELECT_PREPEND_F
- !
-! INTEGER, INTENT(OUT) :: hdferr ! Error code
-
-! INTERFACE
-! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, &
-! space2_id)
-! USE H5GLOBAL
-! !DEC$IF DEFINED(HDF5F90_WINDOWS)
-! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c
-! !DEC$ENDIF
-! INTEGER(HID_T), INTENT(INOUT) :: space1_id
-! INTEGER(HID_T), INTENT(IN) :: space2_id
-! INTEGER, INTENT(IN) :: operator
-! END FUNCTION h5sselect_select_c
-! END INTERFACE
-
-! hdferr = h5sselect_select_c(space1_id, operator, space2_id)
-! return
-
-! END SUBROUTINE h5sselect_select_f
!
!****s* H5S/h5sget_select_type_f
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 018e121..bd8998e 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -567,6 +567,17 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5o_flags[24] = (int_f)H5O_TYPE_DATASET; /* Object is a dataset */
h5o_flags[25] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* Object is a named data type */
h5o_flags[26] = (int_f)H5O_TYPE_NTYPES; /* Number of different object types */
+
+/* Flags for H5Oget_info.
+ * These flags determine which fields will be filled in in the H5O_info_t
+ * struct.
+ */
+ h5o_flags[27] = (int_f)H5O_INFO_ALL; /* (H5O_INFO_BASIC|H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ h5o_flags[28] = (int_f)H5O_INFO_BASIC; /* Fill in the fileno, addr, type, and rc fields */
+ h5o_flags[29] = (int_f)H5O_INFO_TIME; /* Fill in the atime, mtime, ctime, and btime fields */
+ h5o_flags[30] = (int_f)H5O_INFO_NUM_ATTRS; /* Fill in the num_attrs field */
+ h5o_flags[31] = (int_f)H5O_INFO_HDR; /* Fill in the hdr field */
+ h5o_flags[32] = (int_f)H5O_INFO_META_SIZE; /* Fill in the meta_size field */
/*
* H5P flags
*/
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index fd5d437..2adc6aa 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -98,8 +98,8 @@ MODULE H5LIB
!
! H5O flags declaration
!
- INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27
- INTEGER, DIMENSION(1:H5O_FLAGS_LEN) :: H5o_flags
+ INTEGER, PARAMETER :: H5O_FLAGS_LEN = 33
+ INTEGER, DIMENSION(1:H5O_FLAGS_LEN) :: H5O_flags
!
! H5P flags declaration
!
@@ -146,8 +146,8 @@ MODULE H5LIB
!
INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2
INTEGER, DIMENSION(1:H5LIB_FLAGS_LEN) :: H5LIB_flags
-
- PUBLIC :: h5open_f, h5close_f, h5get_libversion_f, h5dont_atexit_f, h5kind_to_type, h5offsetof
+
+ PUBLIC :: h5open_f, h5close_f, h5get_libversion_f, h5dont_atexit_f, h5kind_to_type, h5offsetof, h5gmtime
PUBLIC :: h5garbage_collect_f, h5check_version_f
CONTAINS
@@ -508,7 +508,13 @@ CONTAINS
H5O_TYPE_GROUP_F = h5o_flags(24)
H5O_TYPE_DATASET_F = h5o_flags(25)
H5O_TYPE_NAMED_DATATYPE_F = h5o_flags(26)
- H5O_TYPE_NTYPES_F = h5o_flags(27)
+ H5O_TYPE_NTYPES_F = h5o_flags(27)
+ H5O_INFO_ALL_F = h5o_flags(28)
+ H5O_INFO_BASIC_F = h5o_flags(29)
+ H5O_INFO_TIME_F = h5o_flags(30)
+ H5O_INFO_NUM_ATTRS_F = h5o_flags(31)
+ H5O_INFO_HDR_F = h5o_flags(32)
+ H5O_INFO_META_SIZE_F = h5o_flags(33)
!
! H5P flags
!
@@ -988,4 +994,62 @@ CONTAINS
END FUNCTION h5offsetof
+!****f* H5LIB_PROVISIONAL/h5gmtime
+!
+! NAME
+! h5gmtime
+!
+! PURPOSE
+! Convert time_t structure (C) to Fortran DATE AND TIME storage format.
+!
+! Inputs:
+! stdtime_t - Object of type time_t that contains a time value
+!
+! Outputs:
+! datetime - A date/time array using Fortran conventions:
+! datetime(1) = year
+! datetime(2) = month
+! datetime(3) = day
+! datetime(4) = 0 ! time is expressed as UTC (or GMT timezone) */
+! datetime(5) = hour
+! datetime(6) = minute
+! datetime(7) = second
+! datetime(8) = millisecond -- not available, assigned - HUGE(0)
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! January, 2019
+!
+! Fortran Interface:
+ FUNCTION h5gmtime(stdtime_t)
+ IMPLICIT NONE
+ INTEGER(KIND=TIME_T), INTENT(IN) :: stdtime_t
+ INTEGER, DIMENSION(1:8) :: h5gmtime
+!*****
+ TYPE(C_PTR) :: cptr
+ INTEGER(C_INT), DIMENSION(:), POINTER :: c_time
+
+ INTERFACE
+ FUNCTION gmtime(stdtime_t) BIND(C, NAME='gmtime')
+ IMPORT :: TIME_T, C_PTR
+ IMPLICIT NONE
+ INTEGER(KIND=TIME_T) :: stdtime_t
+ TYPE(C_PTR) :: gmtime
+ END FUNCTION gmtime
+ END INTERFACE
+
+ cptr = gmtime(stdtime_t)
+ CALL C_F_POINTER(cptr, c_time, [9])
+
+ h5gmtime(1) = INT(c_time(6)+1900) ! year starts at 1900
+ h5gmtime(2) = INT(c_time(5)+1) ! month starts at 0 in C
+ h5gmtime(3) = INT(c_time(4)) ! day
+ h5gmtime(4) = 0 ! time is expressed as UTC (or GMT timezone)
+ h5gmtime(5) = INT(c_time(3)) ! hour
+ h5gmtime(6) = INT(c_time(2)) ! minute
+ h5gmtime(7) = INT(c_time(1)) ! second
+ h5gmtime(8) = -32767 ! millisecond is not available, assign it -HUGE(0)
+
+ END FUNCTION h5gmtime
+
END MODULE H5LIB
diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90
index 685026c..0a8a153 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -514,6 +514,13 @@ MODULE H5GLOBAL
!DEC$ATTRIBUTES DLLEXPORT :: H5O_TYPE_DATASET_F
!DEC$ATTRIBUTES DLLEXPORT :: H5O_TYPE_NAMED_DATATYPE_F
!DEC$ATTRIBUTES DLLEXPORT :: H5O_TYPE_NTYPES_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5O_INFO_ALL_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5O_INFO_BASIC_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5O_INFO_TIME_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5O_INFO_NUM_ATTRS_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5O_INFO_HDR_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5O_INFO_META_SIZE_F
+ !
!DEC$endif
INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO
@@ -543,6 +550,12 @@ MODULE H5GLOBAL
INTEGER :: H5O_TYPE_DATASET_F
INTEGER :: H5O_TYPE_NAMED_DATATYPE_F
INTEGER :: H5O_TYPE_NTYPES_F
+ INTEGER :: H5O_INFO_ALL_F
+ INTEGER :: H5O_INFO_BASIC_F
+ INTEGER :: H5O_INFO_TIME_F
+ INTEGER :: H5O_INFO_NUM_ATTRS_F
+ INTEGER :: H5O_INFO_HDR_F
+ INTEGER :: H5O_INFO_META_SIZE_F
!
! H5P flags declaration
!
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 49ffca3..4f0e5ef 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -120,9 +120,6 @@ H5_FCDLL int_f h5sset_extent_none_c( hid_t_f *space_id );
H5_FCDLL int_f h5sselect_hyperslab_c( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block);
H5_FCDLL int_f h5sget_select_type_c( hid_t_f *space_id , int_f *op);
H5_FCDLL int_f h5sselect_elements_c( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord);
-H5_FCDLL int_f h5scombine_hyperslab_c( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id);
-H5_FCDLL int_f h5scombine_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id);
-H5_FCDLL int_f h5sselect_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id);
H5_FCDLL int_f h5sdecode_c( _fcd buf, hid_t_f *obj_id );
H5_FCDLL int_f h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc );
H5_FCDLL int_f h5sextent_equal_c( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal);
@@ -314,14 +311,14 @@ H5_FCDLL int_f h5oclose_c(hid_t_f *object_id );
H5_FCDLL int_f h5oopen_by_addr_c(hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id);
H5_FCDLL int_f h5olink_c(hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen,
hid_t_f *lcpl_id, hid_t_f *lapl_id);
-H5_FCDLL int_f h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data);
+H5_FCDLL int_f h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data, int_f *fields);
H5_FCDLL int_f h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order,
- H5O_iterate_t op, void *op_data, hid_t_f *lapl_id );
-H5_FCDLL int_f h5oget_info_c(hid_t_f *object_id, H5O_info_t_f *object_info);
+ H5O_iterate_t op, void *op_data, hid_t_f *lapl_id, int_f *fields );
+H5_FCDLL int_f h5oget_info_c(hid_t_f *object_id, H5O_info_t_f *object_info, int_f *fields);
H5_FCDLL int_f h5oget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
- int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info);
+ int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info, int_f *fields);
H5_FCDLL int_f h5oget_info_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
- H5O_info_t_f *object_info);
+ H5O_info_t_f *object_info, int_f *fields);
H5_FCDLL int_f h5ocopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len,
hid_t_f *ocpypl_id, hid_t_f *lcpl_id );
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index 7e0b7e8..57f7dda 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -191,6 +191,8 @@ int main(void)
}
if(sizeof(size_t) == IntKinds_SizeOf[i])
writeTypedef("size_t", "size_t", IntKinds[i]);
+ if(sizeof(time_t) == IntKinds_SizeOf[i])
+ writeTypedef("time_t", "time_t", IntKinds[i]);
if(sizeof(hsize_t) == IntKinds_SizeOf[i])
writeTypedef("hsize_t", "hsize_t", IntKinds[i]);
}
@@ -306,6 +308,17 @@ int main(void)
return -1;
}
+ /* time_t */
+ for(i=0;i< FORTRAN_NUM_INTEGER_KINDS;i++) {
+ if(IntKinds_SizeOf[i] == H5_SIZEOF_TIME_T) {
+ writeToFiles("time_t","TIME_T", "time_t_f", IntKinds[i]);
+ break;
+ }
+ if(i == (FORTRAN_NUM_INTEGER_KINDS-1) )
+ /* Error: couldn't find a size for time_t */
+ return -1;
+ }
+
/* int */
writeToFiles("int","Fortran_INTEGER", "int_f", H5_FORTRAN_NATIVE_INTEGER_KIND);
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index ebe4fef..7a4647f 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -8,6 +8,7 @@ H5LIB_mp_H5GARBAGE_COLLECT_F
H5LIB_mp_H5DONT_ATEXIT_F
H5LIB_mp_H5KIND_TO_TYPE
H5LIB_mp_H5OFFSETOF
+H5LIB_mp_H5GMTIME
; H5A
H5A_mp_H5AWRITE_CHAR_SCALAR
H5A_mp_H5AREAD_CHAR_SCALAR
@@ -99,6 +100,8 @@ H5F_mp_H5FIS_HDF5_F
H5F_mp_H5FGET_NAME_F
H5F_mp_H5FGET_FILESIZE_F
H5F_mp_H5FGET_FILE_IMAGE_F
+H5F_mp_H5FGET_DSET_NO_ATTRS_HINT_F
+H5F_mp_H5FSET_DSET_NO_ATTRS_HINT_F
; H5G
H5G_mp_H5GOPEN_F
H5G_mp_H5GCREATE_F
@@ -329,6 +332,8 @@ H5P_mp_H5PGET_VIRTUAL_VSPACE_F
H5P_mp_H5PGET_VIRTUAL_SRCSPACE_F
H5P_mp_H5PGET_VIRTUAL_FILENAME_F
H5P_mp_H5PGET_VIRTUAL_DSETNAME_F
+H5P_mp_H5PGET_DSET_NO_ATTRS_HINT_F
+H5P_mp_H5PSET_DSET_NO_ATTRS_HINT_F
; Parallel
@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F
@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F