summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Af.c4
-rw-r--r--fortran/src/H5Gf.c4
-rw-r--r--fortran/src/H5Lf.c28
-rw-r--r--fortran/src/H5Lff.F9038
-rw-r--r--fortran/src/H5Of.c109
-rw-r--r--fortran/src/H5Off.F90168
-rw-r--r--fortran/src/H5VLff.F9056
-rw-r--r--fortran/src/H5_f.c301
-rw-r--r--fortran/src/H5f90.h3
-rw-r--r--fortran/src/H5f90global.F907
-rw-r--r--fortran/src/H5f90i.h3
-rw-r--r--fortran/src/H5f90proto.h34
-rw-r--r--fortran/src/H5match_types.c10
-rw-r--r--fortran/src/README20
-rw-r--r--fortran/src/hdf5_fortrandll.def.in4
-rw-r--r--fortran/test/tH5G_1_8.F9054
-rw-r--r--fortran/test/tH5O_F03.F90156
-rw-r--r--fortran/test/vol_connector.F9010
18 files changed, 523 insertions, 486 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 31a18fc..5e5bcc0 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -137,13 +137,13 @@ int_f
h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num)
/******/
{
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
int_f ret_value = 0; /* Return value */
/*
* Call H5Oget_info function.
*/
- if(H5Oget_info2((hid_t)*obj_id, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
+ if(H5Oget_info3((hid_t)*obj_id, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_DONE(FAIL);
/* Set number of attributes */
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index def67e1..770752d 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -170,7 +170,7 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
_fcd obj_name, int_f *obj_namelen, int_f *obj_type)
/******/
{
- H5O_info_t oinfo;
+ H5O_info2_t oinfo;
hid_t c_loc_id = (hid_t)*loc_id;
char *c_name = NULL;
size_t c_obj_namelen;
@@ -200,7 +200,7 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
/* Query the object's information */
if(H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, c_obj_name, c_obj_namelen, H5P_DEFAULT) < 0)
goto DONE;
- if(H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_idx3(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
goto DONE;
/* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index 31fedfd..b5ff7f2 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -441,7 +441,7 @@ done:
* H5L_LINK_SOFT_F - Soft link
* H5L_LINK_EXTERNAL_F - External link
* H5L_LINK_ERROR_F - Error
- * address - If the link is a hard link, address specifies the file address that the link points to
+ * token - If the link is a hard link, token specifies the token for the object that the link points to
* val_size - If the link is a symbolic link, val_size will be the length of the link value
*
* RETURNS
@@ -456,13 +456,12 @@ done:
int_f
h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type,
- haddr_t_f *address, size_t_f *val_size,
- hid_t_f *lapl_id)
+ H5O_token_t *token, size_t_f *val_size, hid_t_f *lapl_id)
/******/
{
char *c_link_name = NULL; /* Buffer to hold C string */
int_f ret_value = 0; /* Return value */
- H5L_info_t link_buff;
+ H5L_info2_t link_buff;
/*
* Convert FORTRAN name to C name
@@ -473,7 +472,7 @@ h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
/*
* Call H5Linfo function.
*/
- if(H5Lget_info((hid_t)*link_loc_id, c_link_name, &link_buff, (hid_t)*lapl_id) < 0)
+ if(H5Lget_info2((hid_t)*link_loc_id, c_link_name, &link_buff, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
/* Unpack the structure */
@@ -482,7 +481,7 @@ h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
*corder_valid = 0;
if(link_buff.corder_valid > 0) *corder_valid = 1;
*link_type = (int_f)link_buff.type;
- *address = (haddr_t_f)link_buff.u.address;
+ *token = link_buff.u.token;
*val_size = (size_t_f)link_buff.u.val_size;
done:
@@ -525,14 +524,15 @@ done:
int_f
h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
int_f *index_field, int_f *order, hsize_t_f *n,
- int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id)
+ int_f *link_type, int_f *corder_valid, int_f *corder,
+ int_f *cset, H5O_token_t *token, size_t_f *val_size, hid_t_f *lapl_id)
/******/
{
char *c_group_name = NULL; /* Buffer to hold C string */
H5_index_t c_index_field;
H5_iter_order_t c_order;
int_f ret_value = 0; /* Return value */
- H5L_info_t link_buff;
+ H5L_info2_t link_buff;
/*
* Convert FORTRAN name to C name
@@ -545,7 +545,7 @@ h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
/*
* Call H5Linfo_by_idx function.
*/
- if(H5Lget_info_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
+ if(H5Lget_info_by_idx2((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
&link_buff, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
@@ -557,7 +557,7 @@ h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
*corder = (int_f)link_buff.corder;
*cset = (int_f)link_buff.cset;
*link_type = (int_f)link_buff.type;
- *address = (haddr_t_f)link_buff.u.address;
+ *token = link_buff.u.token;
*val_size = (size_t_f)link_buff.u.val_size;
done:
@@ -988,7 +988,7 @@ done:
* SOURCE
*/
int_f
-h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data )
+h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data )
/******/
{
int_f ret_value = -1; /* Return value */
@@ -1001,7 +1001,7 @@ h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx,
* Call H5Linterate
*/
- func_ret_value = H5Literate( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, &idx_c, op, op_data);
+ func_ret_value = H5Literate2( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, &idx_c, op, op_data);
ret_value = (int_f)func_ret_value;
*idx = (hsize_t_f)idx_c;
@@ -1038,7 +1038,7 @@ h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx,
* SOURCE
*/
int_f
-h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data, hid_t_f *lapl_id)
+h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data, hid_t_f *lapl_id)
/******/
{
int_f ret_value = -1; /* Return value */
@@ -1058,7 +1058,7 @@ h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index
* Call H5Linterate
*/
- func_ret_value = H5Literate_by_name((hid_t)*loc_id, c_name,(H5_index_t)*index_type,(H5_iter_order_t)*order,&idx_c,op,op_data,(hid_t)*lapl_id);
+ func_ret_value = H5Literate_by_name2((hid_t)*loc_id, c_name,(H5_index_t)*index_type,(H5_iter_order_t)*order,&idx_c,op,op_data,(hid_t)*lapl_id);
ret_value = (int_f)func_ret_value;
*idx = (hsize_t_f)idx_c;
diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90
index d5bb1d1..f672547 100644
--- a/fortran/src/H5Lff.F90
+++ b/fortran/src/H5Lff.F90
@@ -46,7 +46,7 @@ MODULE H5L
! Fortran2003 Derived Type:
!
TYPE, bind(c) :: union_t
- INTEGER(haddr_t) :: address
+ TYPE(H5O_TOKEN_T_F) :: token
INTEGER(size_t) :: val_size
END TYPE union_t
@@ -604,7 +604,7 @@ CONTAINS
! H5L_TYPE_SOFT_F - Soft link
! H5L_TYPE_EXTERNAL_F - External link
! H5L_TYPE_ERROR_ F - Error
-! address - If the link is a hard link, address specifies the file address that the link points to
+! token - If the link is a hard link, token specifies the object token that the link points to
! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g.,
! the length of the name of the pointed-to object with a null terminator.
! hdferr - Returns 0 if successful and -1 if fails
@@ -625,7 +625,7 @@ CONTAINS
!
! SOURCE
SUBROUTINE h5lget_info_f(link_loc_id, link_name, &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
hdferr, lapl_id)
IMPLICIT NONE
@@ -641,7 +641,7 @@ CONTAINS
! H5L_TYPE_SOFT_F - Soft link
! H5L_TYPE_EXTERNAL_F - External link
! H5L_TYPE_ERROR _F - Error
- INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to
+ TYPE(H5O_TOKEN_T_F), INTENT(OUT), TARGET :: token ! If the link is a hard link, token specifies the object token that the link points to
INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g.,
! the length of the name of the pointed-to object with a null terminator.
INTEGER, INTENT(OUT) :: hdferr ! Error code:
@@ -654,17 +654,17 @@ CONTAINS
INTERFACE
INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, &
- cset, corder, corder_valid, link_type, address, val_size, &
+ cset, corder, corder_valid, link_type, token, val_size, &
lapl_id_default) BIND(C,NAME='h5lget_info_c')
IMPORT :: c_char
- IMPORT :: HID_T, SIZE_T, HADDR_T
+ IMPORT :: HID_T, SIZE_T, H5O_TOKEN_T_F
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: link_loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name
INTEGER, INTENT(OUT) :: cset
INTEGER, INTENT(OUT) :: corder
INTEGER, INTENT(OUT) :: link_type
- INTEGER(HADDR_T), INTENT(OUT) :: address
+ TYPE(H5O_TOKEN_T_F), INTENT(OUT) :: token
INTEGER(SIZE_T), INTENT(OUT) :: val_size
INTEGER(HID_T) :: lapl_id_default
INTEGER(SIZE_T) :: link_namelen
@@ -677,10 +677,8 @@ CONTAINS
lapl_id_default = H5P_DEFAULT_F
IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
- hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, &
- cset, corder, corder_valid, link_type, &
- address, val_size, &
- lapl_id_default)
+ hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, cset, &
+ corder, corder_valid, link_type, token, val_size, lapl_id_default)
f_corder_valid =.FALSE.
IF(corder_valid .EQ. 1) f_corder_valid =.TRUE.
@@ -708,8 +706,8 @@ CONTAINS
! corder_valid - Indicates whether the creation order data is valid for this attribute
! corder - Is a positive integer containing the creation order of the attribute
! cset - Indicates the character set used for the attribute’s name
-! address - If the link is a hard link, address specifies the file address that the link points to
-! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g.,
+! token - If the link is a hard link, token specifies the object token that the link points to
+! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g.,
! the length of the name of the pointed-to object with a null terminator.
! hdferr - Returns 0 if successful and -1 if fails
!
@@ -729,7 +727,7 @@ CONTAINS
!
! SOURCE
SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, &
- link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id)
+ link_type, f_corder_valid, corder, cset, token, val_size, hdferr, lapl_id)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group
CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group
@@ -752,7 +750,7 @@ CONTAINS
LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name
- INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to
+ TYPE(H5O_TOKEN_T_F), INTENT(OUT), TARGET :: token ! If the link is a hard link, token specifies the object token that the link points to
INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g.,
! the length of the name of the pointed-to object with a null terminator.
INTEGER, INTENT(OUT) :: hdferr ! Error code:
@@ -767,10 +765,10 @@ CONTAINS
!
INTERFACE
INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, &
- link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) &
+ link_type, corder_valid, corder, cset, token, val_size, lapl_id_default) &
BIND(C,NAME='h5lget_info_by_idx_c')
IMPORT :: c_char
- IMPORT :: HID_T, SIZE_T, HSIZE_T, HADDR_T
+ IMPORT :: HID_T, SIZE_T, HSIZE_T, H5O_TOKEN_T_F
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name
@@ -779,10 +777,10 @@ CONTAINS
INTEGER, INTENT(IN) :: order
INTEGER(HSIZE_T), INTENT(IN) :: n
INTEGER, INTENT(OUT) :: link_type
- INTEGER :: corder_valid
+ INTEGER :: corder_valid
INTEGER, INTENT(OUT) :: corder
INTEGER, INTENT(OUT) :: cset
- INTEGER(HADDR_T), INTENT(OUT) :: address
+ TYPE(H5O_TOKEN_T_F), INTENT(OUT) :: token
INTEGER(SIZE_T), INTENT(OUT) :: val_size
INTEGER(HID_T) :: lapl_id_default
END FUNCTION h5lget_info_by_idx_c
@@ -794,7 +792,7 @@ CONTAINS
IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, &
- link_type, corder_valid, corder, cset, address, val_size, lapl_id_default)
+ link_type, corder_valid, corder, cset, token, val_size, lapl_id_default)
f_corder_valid =.FALSE.
IF (corder_valid .EQ. 1) f_corder_valid =.TRUE.
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index 08305ea..9780814 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -22,10 +22,10 @@
#include "H5f90.h"
#include "H5Eprivate.h"
int_f
-fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info);
+fill_h5o_info_t_f(H5O_info2_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) {
+fill_h5o_info_t_f(H5O_info2_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.
@@ -34,7 +34,7 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) {
struct tm *ts;
object_info->fileno = Oinfo.fileno;
- object_info->addr = (haddr_t_f)Oinfo.addr;
+ object_info->token = Oinfo.token;
object_info->type = (int_f)Oinfo.type;
object_info->rc = (int_f)Oinfo.rc;
@@ -85,24 +85,6 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) {
object_info->num_attrs = (hsize_t_f)Oinfo.num_attrs;
- object_info->hdr.version = (int_f)Oinfo.hdr.version;
- object_info->hdr.nmesgs = (int_f)Oinfo.hdr.nmesgs;
- object_info->hdr.nchunks = (int_f)Oinfo.hdr.nchunks;
- object_info->hdr.flags = (int_f)Oinfo.hdr.flags;
-
- object_info->hdr.space.total = (hsize_t_f)Oinfo.hdr.space.total;
- object_info->hdr.space.meta = (hsize_t_f)Oinfo.hdr.space.meta;
- object_info->hdr.space.mesg = (hsize_t_f)Oinfo.hdr.space.mesg;
- object_info->hdr.space.free = (hsize_t_f)Oinfo.hdr.space.free;
-
- object_info->hdr.mesg.present = Oinfo.hdr.mesg.present;
- object_info->hdr.mesg.shared = Oinfo.hdr.mesg.shared;
-
- 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;
}
@@ -248,34 +230,35 @@ 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, int_f *fields )
+h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate2_t op,
+ void *op_data, int_f *fields )
/******/
{
int_f ret_value = -1; /* Return value */
herr_t func_ret_value; /* H5Linterate return value */
/*
- * Call H5Ovisit2
+ * Call H5Ovisit
*/
- func_ret_value = H5Ovisit2( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data, (unsigned)*fields);
+ func_ret_value = H5Ovisit3( (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;
return ret_value;
}
-/****if* H5Of/h5oopen_by_addr_c
+/****if* H5Of/h5oopen_by_token_c
* NAME
- * h5oopen_by_addr_c
+ * h5oopen_by_token_c
* PURPOSE
- * Calls H5open_by_addr
+ * Calls H5open_by_token
* INPUTS
- * loc_id - File or group identifier
- * addr - Object’s address in the file
+ * loc_id - File or group identifier
+ * token - Object’s token in the file
*
* OUTPUTS
- * obj_id - Dataset identifier
+ * obj_id - Object identifier
*
* RETURNS
* 0 on success, -1 on failure
@@ -285,15 +268,15 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op,
* SOURCE
*/
int_f
-h5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id)
+h5oopen_by_token_c(hid_t_f *loc_id, H5O_token_t *token, hid_t_f *obj_id)
/******/
{
int_f ret_value = 0; /* Return value */
/*
- * Call H5Oopen_by_address function.
+ * Call H5Oopen_by_token function.
*/
- if((*obj_id = (hid_t_f)H5Oopen_by_addr((hid_t)*loc_id, (haddr_t)*addr)) < 0)
+ if((*obj_id = (hid_t_f)H5Oopen_by_token((hid_t)*loc_id, *token)) < 0)
HGOTO_DONE(FAIL);
done:
@@ -328,7 +311,7 @@ h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *l
{
char *c_name = NULL; /* Buffer to hold C string */
int_f ret_value = 0; /* Return value */
- H5O_info_t Oinfo;
+ H5O_info2_t Oinfo;
/*
* Convert FORTRAN name to C name
@@ -339,7 +322,7 @@ 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,
+ if(H5Oget_info_by_name3((hid_t)*loc_id, c_name,
&Oinfo, (unsigned)*fields, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
@@ -379,10 +362,10 @@ h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
{
char *c_group_name = NULL; /* Buffer to hold C string */
int_f ret_value = 0; /* Return value */
- H5O_info_t Oinfo;
+ H5O_info2_t Oinfo;
H5_index_t c_index_field;
H5_iter_order_t c_order;
-
+
/*
* Convert FORTRAN name to C name
*/
@@ -395,7 +378,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,
+ if(H5Oget_info_by_idx3((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
&Oinfo, (unsigned)*fields, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
@@ -430,12 +413,12 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info, int_f *fields)
/******/
{
int_f ret_value = 0; /* Return value */
- H5O_info_t Oinfo;
-
+ H5O_info2_t Oinfo;
+
/*
* Call H5Oinfo_by_name function.
*/
- if(H5Oget_info2((hid_t)*object_id, &Oinfo, (unsigned)*fields) < 0)
+ if(H5Oget_info3((hid_t)*object_id, &Oinfo, (unsigned)*fields) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -528,7 +511,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, int_f *fields )
+ H5O_iterate2_t op, void *op_data, hid_t_f *lapl_id, int_f *fields )
/******/
{
int_f ret_value = -1; /* Return value */
@@ -542,9 +525,9 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f
HGOTO_DONE(FAIL);
/*
- * Call H5Ovisit
+ * Call H5Ovisit_by_name
*/
- func_ret_value = H5Ovisit_by_name2( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
+ func_ret_value = H5Ovisit_by_name3( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
op, op_data, (unsigned)*fields, (hid_t)*lapl_id);
ret_value = (int_f)func_ret_value;
@@ -934,3 +917,41 @@ h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
return ret_value;
}
+
+/****if* H5Of/h5otoken_cmp_c
+ * NAME
+ * h5otoken_cmp_c
+ * PURPOSE
+ * Calls H5Otoken_cmp
+ * INPUTS
+ * loc_id - Identifier of an object in the file / container.
+ * token1 - The first token to compare.
+ * token2 - The second token to compare.
+ * cmp_value - Whether the tokens are equal.
+ * RETURNS
+ * 0 on success, -1 on failure
+ * AUTHOR
+ * Quincey Koziol
+ * January 10, 2019
+ * SOURCE
+*/
+int_f
+h5otoken_cmp_c(hid_t_f *loc_id, H5O_token_t *token1, H5O_token_t *token2,
+ int_f *cmp_value_f)
+/******/
+{
+ int cmp_value; /* Token comparison result */
+ int_f ret_value = 0; /* Return value */
+
+ /* Call H5Otoken_cmp function */
+ cmp_value = 0;
+ if(H5Otoken_cmp((hid_t)*loc_id, token1, token2, &cmp_value) < 0)
+ HGOTO_DONE(FAIL);
+
+ /* Set the comparison value to return */
+ *cmp_value_f = cmp_value;
+
+done:
+ return ret_value;
+}
+
diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90
index 8c77230..2b025a7 100644
--- a/fortran/src/H5Off.F90
+++ b/fortran/src/H5Off.F90
@@ -44,7 +44,43 @@ MODULE H5O
USE H5GLOBAL
IMPLICIT NONE
-!****t* H5T (F03)/h5o_info_t
+!****t* H5O (F03)/h5o_info_t
+!
+! Fortran2003 Derived Type:
+!
+ TYPE, BIND(C) :: h5o_info_t
+ INTEGER(C_LONG) :: fileno ! File number that object is located in
+ TYPE(H5O_TOKEN_T_F) :: token ! Token for object in file
+ INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.)
+ INTEGER :: rc ! Reference count of object
+
+ INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE --
+ INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array
+ INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran
+ INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES)
+
+ INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object
+ 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
+ TYPE(H5O_TOKEN_T_F) :: token ! Token for object 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 ! Birth time
+
+ INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object
+ END TYPE c_h5o_info_t
+
+!****t* H5O (F03)/h5o_native_info_t
!
! Fortran2003 Derived Type:
!
@@ -59,13 +95,13 @@ MODULE H5O
INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header
INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header
END TYPE mesg_t
-
+
TYPE, BIND(C) :: hdr_t
INTEGER :: version ! Version number of header format in file
INTEGER :: nmesgs ! Number of object header messages
INTEGER :: nchunks ! Number of object header chunks
INTEGER :: flags ! Object header status flags
- TYPE(space_t) :: space
+ TYPE(space_t) :: space
TYPE(mesg_t) :: mesg
END TYPE hdr_t
@@ -74,7 +110,7 @@ MODULE H5O
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(space_t) :: space
TYPE(mesg_t) :: mesg
END TYPE c_hdr_t
@@ -88,46 +124,17 @@ MODULE H5O
TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets
TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes
ENDTYPE meta_size_t
-
- 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 :: rc ! Reference count of object
-
- INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE --
- INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array
- INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran
- INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES)
-
- INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object
+ TYPE, BIND(C) :: h5o_native_info_t
TYPE(hdr_t) :: hdr
-
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
+ END TYPE h5o_native_info_t
+! C interoperable structure for h5o_native_info_t.
+ TYPE, BIND(C) :: c_h5o_native_info_t
TYPE(c_hdr_t) :: hdr
-
TYPE(meta_size_t) :: meta_size
- END TYPE c_h5o_info_t
+ END TYPE c_h5o_native_info_t
!*****
@@ -292,46 +299,46 @@ CONTAINS
END SUBROUTINE h5oclose_f
!
-!****s* H5O/h5open_by_addr_f
-! NAME
-! h5oopen_by_addr_f
+!****s* H5O/h5oopen_by_token_f
+! NAME
+! h5oopen_by_token_f
!
! PURPOSE
-! Opens an object using its address within an HDF5 file.
+! Opens an object using its token within an HDF5 file.
!
-! Inputs:
+! Inputs:
! loc_id - File or group identifier.
-! addr - Object’s address in the file.
+! token - Object’s token in the file.
!
! Outputs:
! obj_id - Object identifier for the opened object.
! hdferr - Returns 0 if successful and -1 if fails.
!
-! AUTHOR
+! AUTHOR
! M. Scot Breitenfeld
! September 14, 2009
-!
+!
! Fortran90 Interface:
- SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr)
+ SUBROUTINE h5oopen_by_token_f(loc_id, token, obj_id, hdferr)
IMPLICIT NONE
- INTEGER(HID_T) , INTENT(IN) :: loc_id
- INTEGER(HADDR_T), INTENT(IN) :: addr
- INTEGER(HID_T) , INTENT(OUT) :: obj_id
- INTEGER , INTENT(OUT) :: hdferr
+ INTEGER(HID_T) , INTENT(IN) :: loc_id
+ TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token
+ INTEGER(HID_T) , INTENT(OUT) :: obj_id
+ INTEGER , INTENT(OUT) :: hdferr
!*****
INTERFACE
- INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) BIND(C,NAME='h5oopen_by_addr_c')
- IMPORT :: HID_T, HADDR_T
+ INTEGER FUNCTION h5oopen_by_token_c(loc_id, token, obj_id) BIND(C,NAME='h5oopen_by_token_c')
+ IMPORT :: HID_T, H5O_TOKEN_T_F
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id
- INTEGER(HADDR_T), INTENT(IN) :: addr
+ TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token
INTEGER(HID_T), INTENT(OUT) :: obj_id
- END FUNCTION h5oopen_by_addr_c
+ END FUNCTION h5oopen_by_token_c
END INTERFACE
- hdferr = h5oopen_by_addr_c(loc_id, addr, obj_id)
+ hdferr = h5oopen_by_token_c(loc_id, token, obj_id)
- END SUBROUTINE h5oopen_by_addr_f
+ END SUBROUTINE h5oopen_by_token_f
!
!****s* H5O/h5ocopy_f
! NAME
@@ -966,7 +973,7 @@ CONTAINS
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
INTEGER(SIZE_T) , INTENT(IN) :: namelen
INTEGER(HID_T) , INTENT(IN) :: lapl_id_default
- TYPE(C_PTR),VALUE :: object_info
+ TYPE(C_PTR), VALUE :: object_info
INTEGER , INTENT(IN) :: fields
END FUNCTION h5oget_info_by_name_c
END INTERFACE
@@ -1212,5 +1219,50 @@ CONTAINS
END SUBROUTINE h5ovisit_by_name_f
+!****s* H5O/h5otoken_cmp_f
+! NAME
+! h5otoken_cmp_f
+!
+! PURPOSE
+! Compare two tokens, which must be from the same file / containers.
+!
+! Inputs:
+! loc_id - Identifier of an object in the file / container.
+! token1 - The first token to compare.
+! token2 - The second token to compare.
+!
+! Outputs:
+! cmp_value - Returns 0 if tokens are equal, non-zero for unequal tokens.
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! AUTHOR
+! Quincey Koziol
+! January 10, 2019
+!
+! Fortran90 Interface:
+ SUBROUTINE h5otoken_cmp_f(loc_id, token1, token2, cmp_value, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: loc_id
+ TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token1 ! First token
+ TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token2 ! First token
+ INTEGER , INTENT(OUT) :: cmp_value
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+ INTERFACE
+ INTEGER FUNCTION h5otoken_cmp_c(loc_id, token1, token2, cmp_value) BIND(C,NAME='h5otoken_cmp_c')
+ IMPORT :: HID_T, C_PTR, H5O_TOKEN_T_F
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: loc_id
+ TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token1 ! First token
+ TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token2 ! First token
+ INTEGER, INTENT(OUT) :: cmp_value
+
+ END FUNCTION h5otoken_cmp_c
+ END INTERFACE
+
+ hdferr = h5otoken_cmp_c(loc_id, token1, token2, cmp_value)
+
+ END SUBROUTINE h5otoken_cmp_f
+
END MODULE H5O
diff --git a/fortran/src/H5VLff.F90 b/fortran/src/H5VLff.F90
index e21f38f..eea9dfe 100644
--- a/fortran/src/H5VLff.F90
+++ b/fortran/src/H5VLff.F90
@@ -167,10 +167,49 @@ CONTAINS
END SUBROUTINE H5VLis_connector_registered_f
!
-!****s* H5VL/H5VLis_connector_registered_f
+!****s* H5VL/H5VLget_connector_id_f
!
! NAME
-! H5VLis_connector_registered_f
+! H5VLget_connector_id_f
+!
+! PURPOSE
+! Retrieves the ID for a registered VOL connector.
+!
+! INPUTS
+! obj_id - Object id
+! OUTPUTS
+! vol_id - Connector id
+! hdferr - Returns 0 if successful and -1 if fails
+! SOURCE
+
+ SUBROUTINE H5VLget_connector_id_f(obj_id, vol_id, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: obj_id
+ INTEGER(HID_T), INTENT(OUT) :: vol_id
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+
+ INTERFACE
+ INTEGER(HID_T) FUNCTION H5VLget_connector_id(obj_id) BIND(C,NAME='H5VLget_connector_id')
+ IMPORT :: HID_T
+ INTEGER(HID_T), INTENT(IN) :: obj_id
+ END FUNCTION H5VLget_connector_id
+ END INTERFACE
+
+ vol_id = H5VLget_connector_id(obj_id)
+
+ IF(vol_id.LT.0)THEN
+ hdferr = -1
+ vol_id = H5I_INVALID_HID_F
+ ENDIF
+
+ END SUBROUTINE H5VLget_connector_id_f
+
+!
+!****s* H5VL/H5VLget_connector_id_by_name_f
+!
+! NAME
+! H5VLget_connector_id_by_name_f
!
! PURPOSE
! Retrieves the ID for a registered VOL connector.
@@ -182,7 +221,7 @@ CONTAINS
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
- SUBROUTINE H5VLget_connector_id_f(name, vol_id, hdferr)
+ SUBROUTINE H5VLget_connector_id_by_name_f(name, vol_id, hdferr)
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER(HID_T), INTENT(OUT) :: vol_id
@@ -191,22 +230,23 @@ CONTAINS
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
INTERFACE
- INTEGER(HID_T) FUNCTION H5VLget_connector_id(name) BIND(C,NAME='H5VLget_connector_id')
+ INTEGER(HID_T) FUNCTION H5VLget_connector_id_by_name(name) BIND(C,NAME='H5VLget_connector_id_by_name')
IMPORT :: C_CHAR
IMPORT :: HID_T
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
- END FUNCTION H5VLget_connector_id
+ END FUNCTION H5VLget_connector_id_by_name
END INTERFACE
c_name = TRIM(name)//C_NULL_CHAR
- vol_id = H5VLget_connector_id(c_name)
-
+ vol_id = H5VLget_connector_id_by_name(c_name)
+
+ hdferr = 0
IF(vol_id.LT.0)THEN
hdferr = -1
vol_id = H5I_INVALID_HID_F
ENDIF
- END SUBROUTINE H5VLget_connector_id_f
+ END SUBROUTINE H5VLget_connector_id_by_name_f
SUBROUTINE H5VLget_connector_name_f(obj_id, name, hdferr, name_len)
IMPLICIT NONE
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 2d1c6e7..132da7b 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -56,7 +56,6 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
{
int ret_value = -1;
hid_t c_type_id;
- size_t tmp_val;
int i;
/* Fortran INTEGER may not be the same as C; do all checking to find
@@ -133,8 +132,7 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
#endif
if ((c_type_id = H5Tcopy(H5T_FORTRAN_S1)) < 0) return ret_value;
- tmp_val = 1;
- if(H5Tset_size(c_type_id, tmp_val) < 0) return ret_value;
+ if(H5Tset_size(c_type_id, 1) < 0) return ret_value;
if(H5Tset_strpad(c_type_id, H5T_STR_SPACEPAD) < 0) return ret_value;
types[8] = (hid_t_f)c_type_id;
@@ -313,6 +311,7 @@ h5close_types_c( hid_t_f * types, int_f *lentypes,
ret_value = 0;
return ret_value;
}
+
/****if* H5_f/h5init_flags_c
* NAME
* h5init_flags_c
@@ -370,7 +369,6 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
haddr_t_f *h5_haddr_generic_flags)
/******/
{
- int ret_value = -1;
/*
* H5D flags
*/
@@ -538,196 +536,201 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
* but we need to assign each kind of message to a different bit so that
* one index can hold multiple types.)
*/
- h5o_flags[7] = (int_f)H5O_SHMESG_NONE_FLAG; /* No shared messages */
- h5o_flags[8] = (int_f)H5O_SHMESG_SDSPACE_FLAG; /* Simple Dataspace Message. */
- h5o_flags[9] = (int_f)H5O_SHMESG_DTYPE_FLAG; /* Datatype Message. */
- h5o_flags[10] = (int_f)H5O_SHMESG_FILL_FLAG; /* Fill Value Message. */
- h5o_flags[11] = (int_f)H5O_SHMESG_PLINE_FLAG; /* Filter pipeline message. */
- h5o_flags[12] = (int_f)H5O_SHMESG_ATTR_FLAG; /* Attribute Message. */
- h5o_flags[13] = (int_f)H5O_SHMESG_ALL_FLAG;
+ h5o_flags[7] = (int_f)H5O_SHMESG_NONE_FLAG; /* No shared messages */
+ h5o_flags[8] = (int_f)H5O_SHMESG_SDSPACE_FLAG; /* Simple Dataspace Message. */
+ h5o_flags[9] = (int_f)H5O_SHMESG_DTYPE_FLAG; /* Datatype Message. */
+ h5o_flags[10] = (int_f)H5O_SHMESG_FILL_FLAG; /* Fill Value Message. */
+ h5o_flags[11] = (int_f)H5O_SHMESG_PLINE_FLAG; /* Filter pipeline message. */
+ h5o_flags[12] = (int_f)H5O_SHMESG_ATTR_FLAG; /* Attribute Message. */
+ h5o_flags[13] = (int_f)H5O_SHMESG_ALL_FLAG;
/* Object header status flag definitions */
- h5o_flags[14] = (int_f)H5O_HDR_CHUNK0_SIZE; /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
- h5o_flags[15] = (int_f)H5O_HDR_ATTR_CRT_ORDER_TRACKED; /* Attribute creation order is tracked */
- h5o_flags[16] = (int_f)H5O_HDR_ATTR_CRT_ORDER_INDEXED; /* Attribute creation order has index */
- h5o_flags[17] = (int_f)H5O_HDR_ATTR_STORE_PHASE_CHANGE; /* Non-default attribute storage phase change values stored */
- h5o_flags[18] = (int_f)H5O_HDR_STORE_TIMES; /* Store access, modification, change & birth times for object */
- h5o_flags[19] = (int_f)H5O_HDR_ALL_FLAGS;
+ h5o_flags[14] = (int_f)H5O_HDR_CHUNK0_SIZE; /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
+ h5o_flags[15] = (int_f)H5O_HDR_ATTR_CRT_ORDER_TRACKED; /* Attribute creation order is tracked */
+ h5o_flags[16] = (int_f)H5O_HDR_ATTR_CRT_ORDER_INDEXED; /* Attribute creation order has index */
+ h5o_flags[17] = (int_f)H5O_HDR_ATTR_STORE_PHASE_CHANGE; /* Non-default attribute storage phase change values stored */
+ h5o_flags[18] = (int_f)H5O_HDR_STORE_TIMES; /* Store access, modification, change & birth times for object */
+ h5o_flags[19] = (int_f)H5O_HDR_ALL_FLAGS;
/* Maximum shared message values. Number of indexes is 8 to allow room to add
* new types of messages.
*/
- h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES;
- h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE;
+ h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES;
+ h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE;
/* Types of objects in file */
- h5o_flags[22] = (int_f)H5O_TYPE_UNKNOWN; /* Unknown object type */
- h5o_flags[23] = (int_f)H5O_TYPE_GROUP; /* Object is a group */
- 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 */
+ h5o_flags[22] = (int_f)H5O_TYPE_UNKNOWN; /* Unknown object type */
+ h5o_flags[23] = (int_f)H5O_TYPE_GROUP; /* Object is a group */
+ 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.
+ * 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 */
+ h5o_flags[27] = (int_f)H5O_INFO_ALL; /* (H5O_INFO_BASIC|H5O_INFO_TIME|H5O_INFO_NUM_ATTRS) */
+ 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 */
+
+/* Flags for H5Oget_native_info.
+ * These flags determine which fields will be filled in in the H5O_native_info_t
+ * struct.
+ */
+ h5o_flags[31] = (int_f)H5O_NATIVE_INFO_ALL; /* (H5O_NATIVE_INFO_HDR|H5O_NATIVE_INFO_META_SIZE) */
+ h5o_flags[32] = (int_f)H5O_NATIVE_INFO_HDR; /* Fill in the hdr field */
+ h5o_flags[33] = (int_f)H5O_NATIVE_INFO_META_SIZE; /* Fill in the meta_size field */
/*
* H5P flags
*/
- h5p_flags[0] = (hid_t_f)H5P_FILE_CREATE;
- h5p_flags[1] = (hid_t_f)H5P_FILE_ACCESS;
- h5p_flags[2] = (hid_t_f)H5P_DATASET_CREATE;
- h5p_flags[3] = (hid_t_f)H5P_DATASET_XFER;
- h5p_flags[4] = (hid_t_f)H5P_FILE_MOUNT;
- h5p_flags[5] = (hid_t_f)H5P_DEFAULT;
- h5p_flags[6] = (hid_t_f)H5P_ROOT;
- h5p_flags[7] = (hid_t_f)H5P_OBJECT_CREATE;
- h5p_flags[8] = (hid_t_f)H5P_DATASET_ACCESS;
- h5p_flags[9] = (hid_t_f)H5P_GROUP_CREATE;
- h5p_flags[10] = (hid_t_f)H5P_GROUP_ACCESS;
- h5p_flags[11] = (hid_t_f)H5P_DATATYPE_CREATE;
- h5p_flags[12] = (hid_t_f)H5P_DATATYPE_ACCESS;
- h5p_flags[13] = (hid_t_f)H5P_STRING_CREATE;
- h5p_flags[14] = (hid_t_f)H5P_ATTRIBUTE_CREATE;
- h5p_flags[15] = (hid_t_f)H5P_OBJECT_COPY;
- h5p_flags[16] = (hid_t_f)H5P_LINK_CREATE;
- h5p_flags[17] = (hid_t_f)H5P_LINK_ACCESS;
+ h5p_flags[0] = (hid_t_f)H5P_FILE_CREATE;
+ h5p_flags[1] = (hid_t_f)H5P_FILE_ACCESS;
+ h5p_flags[2] = (hid_t_f)H5P_DATASET_CREATE;
+ h5p_flags[3] = (hid_t_f)H5P_DATASET_XFER;
+ h5p_flags[4] = (hid_t_f)H5P_FILE_MOUNT;
+ h5p_flags[5] = (hid_t_f)H5P_DEFAULT;
+ h5p_flags[6] = (hid_t_f)H5P_ROOT;
+ h5p_flags[7] = (hid_t_f)H5P_OBJECT_CREATE;
+ h5p_flags[8] = (hid_t_f)H5P_DATASET_ACCESS;
+ h5p_flags[9] = (hid_t_f)H5P_GROUP_CREATE;
+ h5p_flags[10] = (hid_t_f)H5P_GROUP_ACCESS;
+ h5p_flags[11] = (hid_t_f)H5P_DATATYPE_CREATE;
+ h5p_flags[12] = (hid_t_f)H5P_DATATYPE_ACCESS;
+ h5p_flags[13] = (hid_t_f)H5P_STRING_CREATE;
+ h5p_flags[14] = (hid_t_f)H5P_ATTRIBUTE_CREATE;
+ h5p_flags[15] = (hid_t_f)H5P_OBJECT_COPY;
+ h5p_flags[16] = (hid_t_f)H5P_LINK_CREATE;
+ h5p_flags[17] = (hid_t_f)H5P_LINK_ACCESS;
/*
* H5P integer flags
*/
- h5p_flags_int[0] = (int_f)H5P_CRT_ORDER_INDEXED;
- h5p_flags_int[1] = (int_f)H5P_CRT_ORDER_TRACKED;
+ h5p_flags_int[0] = (int_f)H5P_CRT_ORDER_INDEXED;
+ h5p_flags_int[1] = (int_f)H5P_CRT_ORDER_TRACKED;
/*
* H5R flags
*/
-
- h5r_flags[0] = (int_f)H5R_OBJECT;
- h5r_flags[1] = (int_f)H5R_DATASET_REGION;
+ h5r_flags[0] = (int_f)H5R_OBJECT;
+ h5r_flags[1] = (int_f)H5R_DATASET_REGION;
/*
* H5S flags
*/
-
- h5s_hid_flags[0] = (hid_t_f)H5S_ALL;
-
- h5s_hsize_flags[0] = (hsize_t_f)H5S_UNLIMITED;
-
- h5s_flags[0] = (int_f)H5S_SCALAR;
- h5s_flags[1] = (int_f)H5S_SIMPLE;
- h5s_flags[2] = (int_f)H5S_NULL;
- h5s_flags[3] = (int_f)H5S_SELECT_SET;
- h5s_flags[4] = (int_f)H5S_SELECT_OR;
-
- h5s_flags[5] = (int_f)H5S_SELECT_NOOP;
- h5s_flags[6] = (int_f)H5S_SELECT_AND;
- h5s_flags[7] = (int_f)H5S_SELECT_XOR;
- h5s_flags[8] = (int_f)H5S_SELECT_NOTB;
- h5s_flags[9] = (int_f)H5S_SELECT_NOTA;
-
- h5s_flags[10] = (int_f)H5S_SELECT_APPEND;
- h5s_flags[11] = (int_f)H5S_SELECT_PREPEND;
- h5s_flags[12] = (int_f)H5S_SELECT_INVALID;
- h5s_flags[13] = (int_f)H5S_SEL_ERROR;
- h5s_flags[14] = (int_f)H5S_SEL_NONE;
-
- h5s_flags[15] = (int_f)H5S_SEL_POINTS;
- h5s_flags[16] = (int_f)H5S_SEL_HYPERSLABS;
- h5s_flags[17] = (int_f)H5S_SEL_ALL;
+ h5s_hid_flags[0] = (hid_t_f)H5S_ALL;
+
+ h5s_hsize_flags[0] = (hsize_t_f)H5S_UNLIMITED;
+
+ h5s_flags[0] = (int_f)H5S_SCALAR;
+ h5s_flags[1] = (int_f)H5S_SIMPLE;
+ h5s_flags[2] = (int_f)H5S_NULL;
+ h5s_flags[3] = (int_f)H5S_SELECT_SET;
+ h5s_flags[4] = (int_f)H5S_SELECT_OR;
+
+ h5s_flags[5] = (int_f)H5S_SELECT_NOOP;
+ h5s_flags[6] = (int_f)H5S_SELECT_AND;
+ h5s_flags[7] = (int_f)H5S_SELECT_XOR;
+ h5s_flags[8] = (int_f)H5S_SELECT_NOTB;
+ h5s_flags[9] = (int_f)H5S_SELECT_NOTA;
+
+ h5s_flags[10] = (int_f)H5S_SELECT_APPEND;
+ h5s_flags[11] = (int_f)H5S_SELECT_PREPEND;
+ h5s_flags[12] = (int_f)H5S_SELECT_INVALID;
+ h5s_flags[13] = (int_f)H5S_SEL_ERROR;
+ h5s_flags[14] = (int_f)H5S_SEL_NONE;
+
+ h5s_flags[15] = (int_f)H5S_SEL_POINTS;
+ h5s_flags[16] = (int_f)H5S_SEL_HYPERSLABS;
+ h5s_flags[17] = (int_f)H5S_SEL_ALL;
+
/*
* H5T flags
*/
- h5t_flags[0] = (int_f)H5T_NO_CLASS;
- h5t_flags[1] = (int_f)H5T_INTEGER;
- h5t_flags[2] = (int_f)H5T_FLOAT;
- h5t_flags[3] = (int_f)H5T_TIME;
- h5t_flags[4] = (int_f)H5T_STRING;
- h5t_flags[5] = (int_f)H5T_BITFIELD;
- h5t_flags[6] = (int_f)H5T_OPAQUE;
- h5t_flags[7] = (int_f)H5T_COMPOUND;
- h5t_flags[8] = (int_f)H5T_REFERENCE;
- h5t_flags[9] = (int_f)H5T_ENUM;
- h5t_flags[10] = (int_f)H5T_ORDER_LE;
- h5t_flags[11] = (int_f)H5T_ORDER_BE;
- h5t_flags[12] = (int_f)H5T_ORDER_MIXED;
- h5t_flags[13] = (int_f)H5T_ORDER_VAX;
- h5t_flags[14] = (int_f)H5T_ORDER_NONE;
- h5t_flags[15] = (int_f)H5T_PAD_ZERO;
- h5t_flags[16] = (int_f)H5T_PAD_ONE;
- h5t_flags[17] = (int_f)H5T_PAD_BACKGROUND;
- h5t_flags[18] = (int_f)H5T_PAD_ERROR;
- h5t_flags[19] = (int_f)H5T_SGN_NONE;
- h5t_flags[20] = (int_f)H5T_SGN_2;
- h5t_flags[21] = (int_f)H5T_SGN_ERROR;
- h5t_flags[22] = (int_f)H5T_NORM_IMPLIED;
- h5t_flags[23] = (int_f)H5T_NORM_MSBSET;
- h5t_flags[24] = (int_f)H5T_NORM_NONE;
- h5t_flags[25] = (int_f)H5T_CSET_ASCII;
- h5t_flags[26] = (int_f)H5T_CSET_UTF8;
- h5t_flags[27] = (int_f)H5T_STR_NULLTERM;
- h5t_flags[28] = (int_f)H5T_STR_NULLPAD;
- h5t_flags[29] = (int_f)H5T_STR_SPACEPAD;
- h5t_flags[30] = (int_f)H5T_STR_ERROR;
- h5t_flags[31] = (int_f)H5T_VLEN;
- h5t_flags[32] = (int_f)H5T_ARRAY;
- h5t_flags[33] = (int_f)H5T_DIR_ASCEND;
- h5t_flags[34] = (int_f)H5T_DIR_DESCEND;
+ h5t_flags[0] = (int_f)H5T_NO_CLASS;
+ h5t_flags[1] = (int_f)H5T_INTEGER;
+ h5t_flags[2] = (int_f)H5T_FLOAT;
+ h5t_flags[3] = (int_f)H5T_TIME;
+ h5t_flags[4] = (int_f)H5T_STRING;
+ h5t_flags[5] = (int_f)H5T_BITFIELD;
+ h5t_flags[6] = (int_f)H5T_OPAQUE;
+ h5t_flags[7] = (int_f)H5T_COMPOUND;
+ h5t_flags[8] = (int_f)H5T_REFERENCE;
+ h5t_flags[9] = (int_f)H5T_ENUM;
+ h5t_flags[10] = (int_f)H5T_ORDER_LE;
+ h5t_flags[11] = (int_f)H5T_ORDER_BE;
+ h5t_flags[12] = (int_f)H5T_ORDER_MIXED;
+ h5t_flags[13] = (int_f)H5T_ORDER_VAX;
+ h5t_flags[14] = (int_f)H5T_ORDER_NONE;
+ h5t_flags[15] = (int_f)H5T_PAD_ZERO;
+ h5t_flags[16] = (int_f)H5T_PAD_ONE;
+ h5t_flags[17] = (int_f)H5T_PAD_BACKGROUND;
+ h5t_flags[18] = (int_f)H5T_PAD_ERROR;
+ h5t_flags[19] = (int_f)H5T_SGN_NONE;
+ h5t_flags[20] = (int_f)H5T_SGN_2;
+ h5t_flags[21] = (int_f)H5T_SGN_ERROR;
+ h5t_flags[22] = (int_f)H5T_NORM_IMPLIED;
+ h5t_flags[23] = (int_f)H5T_NORM_MSBSET;
+ h5t_flags[24] = (int_f)H5T_NORM_NONE;
+ h5t_flags[25] = (int_f)H5T_CSET_ASCII;
+ h5t_flags[26] = (int_f)H5T_CSET_UTF8;
+ h5t_flags[27] = (int_f)H5T_STR_NULLTERM;
+ h5t_flags[28] = (int_f)H5T_STR_NULLPAD;
+ h5t_flags[29] = (int_f)H5T_STR_SPACEPAD;
+ h5t_flags[30] = (int_f)H5T_STR_ERROR;
+ h5t_flags[31] = (int_f)H5T_VLEN;
+ h5t_flags[32] = (int_f)H5T_ARRAY;
+ h5t_flags[33] = (int_f)H5T_DIR_ASCEND;
+ h5t_flags[34] = (int_f)H5T_DIR_DESCEND;
+
/*
* H5Z flags
*/
- h5z_flags[0] = (int_f)H5Z_FILTER_ERROR;
- h5z_flags[1] = (int_f)H5Z_FILTER_NONE;
- h5z_flags[2] = (int_f)H5Z_FILTER_DEFLATE;
- h5z_flags[3] = (int_f)H5Z_FILTER_SHUFFLE;
- h5z_flags[4] = (int_f)H5Z_FILTER_FLETCHER32;
- h5z_flags[5] = (int_f)H5Z_ERROR_EDC;
- h5z_flags[6] = (int_f)H5Z_DISABLE_EDC;
- h5z_flags[7] = (int_f)H5Z_ENABLE_EDC;
- h5z_flags[8] = (int_f)H5Z_NO_EDC;
- h5z_flags[9] = (int_f)H5Z_FILTER_SZIP;
- h5z_flags[10] = (int_f)H5Z_FLAG_OPTIONAL;
- h5z_flags[11] = (int_f)H5Z_FILTER_CONFIG_ENCODE_ENABLED;
- h5z_flags[12] = (int_f)H5Z_FILTER_CONFIG_DECODE_ENABLED;
- h5z_flags[13] = (int_f)H5Z_FILTER_ALL;
- h5z_flags[14] = (int_f)H5Z_FILTER_NBIT;
- h5z_flags[15] = (int_f)H5Z_FILTER_SCALEOFFSET;
- h5z_flags[16] = (int_f)H5Z_SO_FLOAT_DSCALE;
- h5z_flags[17] = (int_f)H5Z_SO_FLOAT_ESCALE;
- h5z_flags[18] = (int_f)H5Z_SO_INT;
- h5z_flags[19] = (int_f)H5Z_SO_INT_MINBITS_DEFAULT;
+ h5z_flags[0] = (int_f)H5Z_FILTER_ERROR;
+ h5z_flags[1] = (int_f)H5Z_FILTER_NONE;
+ h5z_flags[2] = (int_f)H5Z_FILTER_DEFLATE;
+ h5z_flags[3] = (int_f)H5Z_FILTER_SHUFFLE;
+ h5z_flags[4] = (int_f)H5Z_FILTER_FLETCHER32;
+ h5z_flags[5] = (int_f)H5Z_ERROR_EDC;
+ h5z_flags[6] = (int_f)H5Z_DISABLE_EDC;
+ h5z_flags[7] = (int_f)H5Z_ENABLE_EDC;
+ h5z_flags[8] = (int_f)H5Z_NO_EDC;
+ h5z_flags[9] = (int_f)H5Z_FILTER_SZIP;
+ h5z_flags[10] = (int_f)H5Z_FLAG_OPTIONAL;
+ h5z_flags[11] = (int_f)H5Z_FILTER_CONFIG_ENCODE_ENABLED;
+ h5z_flags[12] = (int_f)H5Z_FILTER_CONFIG_DECODE_ENABLED;
+ h5z_flags[13] = (int_f)H5Z_FILTER_ALL;
+ h5z_flags[14] = (int_f)H5Z_FILTER_NBIT;
+ h5z_flags[15] = (int_f)H5Z_FILTER_SCALEOFFSET;
+ h5z_flags[16] = (int_f)H5Z_SO_FLOAT_DSCALE;
+ h5z_flags[17] = (int_f)H5Z_SO_FLOAT_ESCALE;
+ h5z_flags[18] = (int_f)H5Z_SO_INT;
+ h5z_flags[19] = (int_f)H5Z_SO_INT_MINBITS_DEFAULT;
/*
* H5 Generic flags introduced in version 1.8
*/
- /* H5_index_t enum struct */
+ /* H5_index_t enum struct */
- h5_generic_flags[0] = (int_f)H5_INDEX_UNKNOWN; /* Unknown index type */
- h5_generic_flags[1] = (int_f)H5_INDEX_NAME; /* Index on names */
- h5_generic_flags[2] = (int_f)H5_INDEX_CRT_ORDER; /* Index on creation order */
- h5_generic_flags[3] = (int_f)H5_INDEX_N; /* Index on creation order */
+ h5_generic_flags[0] = (int_f)H5_INDEX_UNKNOWN; /* Unknown index type */
+ h5_generic_flags[1] = (int_f)H5_INDEX_NAME; /* Index on names */
+ h5_generic_flags[2] = (int_f)H5_INDEX_CRT_ORDER; /* Index on creation order */
+ h5_generic_flags[3] = (int_f)H5_INDEX_N; /* Index on creation order */
- /* H5_iter_order_t enum struct */
+ /* H5_iter_order_t enum struct */
- h5_generic_flags[4] = (int_f)H5_ITER_UNKNOWN; /* Unknown order */
- h5_generic_flags[5] = (int_f)H5_ITER_INC; /* Increasing order */
- h5_generic_flags[6] = (int_f)H5_ITER_DEC; /* Decreasing order */
- h5_generic_flags[7] = (int_f)H5_ITER_NATIVE; /* No particular order, whatever is fastest */
- h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
+ h5_generic_flags[4] = (int_f)H5_ITER_UNKNOWN; /* Unknown order */
+ h5_generic_flags[5] = (int_f)H5_ITER_INC; /* Increasing order */
+ h5_generic_flags[6] = (int_f)H5_ITER_DEC; /* Decreasing order */
+ h5_generic_flags[7] = (int_f)H5_ITER_NATIVE; /* No particular order, whatever is fastest */
+ h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
- h5_haddr_generic_flags[0] = (haddr_t_f)HADDR_UNDEF; /* undefined address */
+ h5_haddr_generic_flags[0] = (haddr_t_f)HADDR_UNDEF; /* undefined address */
- ret_value = 0;
- return ret_value;
+ return 0;
}
int_f
diff --git a/fortran/src/H5f90.h b/fortran/src/H5f90.h
index eabe3d0..655cb9b 100644
--- a/fortran/src/H5f90.h
+++ b/fortran/src/H5f90.h
@@ -25,5 +25,8 @@
/* Constants used in H5Gf.c files */
#define OBJECT_NAMELEN_DEFAULT_F -1
+
#define H5_MAX(a,b) (((a)>(b)) ? (a) : (b))
+
#endif /* _H5f90_H */
+
diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90
index 02e3bc3..dabc0bb 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -54,6 +54,7 @@ MODULE H5GLOBAL
! If you change the value of these parameters, do not forget to change corresponding
! values in the H5f90.h file.
INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3
+ INTEGER, PARAMETER :: H5O_TOKEN_BUF_LEN = 16 ! Matches C defined value in H5public.h
! Parameters used in the function 'h5kind_to_type' located in H5_ff.F90.
! The flag is used to tell the function whether the kind input variable
@@ -70,13 +71,17 @@ MODULE H5GLOBAL
INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref
END TYPE hdset_reg_ref_t_f
+ TYPE, BIND(C) :: h5o_token_t_f
+ INTEGER(C_INT8_T), DIMENSION(1:H5O_TOKEN_BUF_LEN) :: token
+ END TYPE h5o_token_t_f
+
! Do not forget to change these values when new predefined
! datatypes are added
INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 19
INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4
INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27
- ! These arrays need to be global because they are used in
+ ! These arrays need to be global because they are used in
! both h5open_f and in h5close_f; initialize to fix linking issues
! on OSX and Intel compilers.
INTEGER(HID_T), DIMENSION(1:PREDEF_TYPES_LEN) :: predef_types = -1
diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h
index 7d066cd..057edc5 100644
--- a/fortran/src/H5f90i.h
+++ b/fortran/src/H5f90i.h
@@ -21,8 +21,7 @@
*/
#include "H5f90i_gen.h"
-/* Define _fcd. These are the same on every system
- * but UNICOS.
+/* Define _fcd. These are the same on every system but UNICOS.
*/
#define _fcdtocp(desc) (desc)
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 5faf4b4..e6f5dd4 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -23,7 +23,7 @@ H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len);
/*
- * Storage info struct used by H5O_info_t and H5F_info_t
+ * Storage info struct used by H5O_info_t and H5F_info_t
* interoperable with Fortran.
*/
typedef struct H5_ih_info_t_f {
@@ -31,7 +31,7 @@ typedef struct H5_ih_info_t_f {
hsize_t heap_size;
} H5_ih_info_t_f;
-/* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
+/* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
* interoperable with Fortran.
*/
typedef struct H5O_hdr_info_t_f {
@@ -51,12 +51,11 @@ typedef struct H5O_hdr_info_t_f {
} mesg;
} H5O_hdr_info_t_f;
-/* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
- * interoperable with Fortran.
+/* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
*/
typedef struct H5O_info_t_f {
unsigned long fileno; /* File number that object is located in */
- haddr_t_f addr; /* Object address in file */
+ H5O_token_t token; /* Token of object in file */
int type; /* Basic object type (group, dataset, etc.) */
int_f rc; /* Reference count of object */
int_f atime[8]; /* Access time */
@@ -64,13 +63,18 @@ typedef struct H5O_info_t_f {
int_f ctime[8]; /* Change time */
int_f btime[8]; /* Birth time */
hsize_t num_attrs; /* # of attributes attached to object */
+} H5O_info_t_f;
+
+/* Information struct for native object (for H5Oget_native_info/H5Oget_native_info_by_name/H5Oget_native_info_by_idx)
+ */
+typedef struct H5O_native_info_t_f {
H5O_hdr_info_t_f hdr; /* Object header information */
/* Extra metadata storage for obj & attributes */
struct {
H5_ih_info_t_f obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
H5_ih_info_t_f attr; /* v2 B-tree & heap for attributes */
} meta_size;
-} H5O_info_t_f;
+} H5O_native_info_t_f;
/*
@@ -312,12 +316,12 @@ H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts,
H5_FCDLL int_f h5oopen_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id);
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 h5oopen_by_token_c(hid_t_f *loc_id, H5O_token_t *token, 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, int_f *fields);
+H5_FCDLL int_f h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate2_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, int_f *fields );
+ H5O_iterate2_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 *fields);
@@ -336,6 +340,8 @@ H5_FCDLL int_f h5oopen_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *gro
H5_FCDLL int_f h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize);
H5_FCDLL 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);
+H5_FCDLL int_f h5otoken_cmp_c(hid_t_f *loc_id, H5O_token_t *token1,
+ H5O_token_t *token2, int_f *cmp_value);
/*
* Functions from H5Pf.c
*/
@@ -568,11 +574,11 @@ H5_FCDLL int_f h5ldelete_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *gr
H5_FCDLL int_f h5lexists_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists);
H5_FCDLL int_f h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type,
- haddr_t_f *address, size_t_f *val_size,
- hid_t_f *lapl_id);
+ H5O_token_t *token, size_t_f *val_size, hid_t_f *lapl_id);
H5_FCDLL int_f h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
int_f *index_field, int_f *order, hsize_t_f *n,
- int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id);
+ int_f *link_type, int_f *corder_valid, int_f *corder,
+ int_f *cset, H5O_token_t *token, size_t_f *val_size, hid_t_f *lapl_id);
H5_FCDLL int_f h5lis_registered_c(int_f *link_cls_id);
H5_FCDLL int_f h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id,
_fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id);
@@ -582,8 +588,8 @@ H5_FCDLL int_f h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *
H5_FCDLL int_f h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size,
void *linkval_buff, hid_t_f *lapl_id) ;
-H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data );
-H5_FCDLL int_f h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data, hid_t_f *lapl_id);
+H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data );
+H5_FCDLL int_f h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data, hid_t_f *lapl_id);
#endif /* _H5f90proto_H */
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index e39e85a..2a6204d 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -414,13 +414,19 @@ int main(void)
return -1;
}
- /* Need the buffer size for the fortran derive type 'hdset_reg_ref_t_f03'
+ /* Need the buffer size for the fortran derived type 'hdset_reg_ref_t_f03'
* in order to be interoperable with C's structure, the C buffer size
* H5R_DSET_REG_REF_BUF_SIZE is (sizeof(haddr_t)+4)
*/
-
+
fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n", H5_SIZEOF_HADDR_T + 4 );
+ /* Need the buffer size for the fortran derived type 'h5o_token_t'
+ * in order to be interoperable with C's structure.
+ */
+
+ fprintf(fort_header, " INTEGER, PARAMETER :: H5O_MAX_TOKEN_SIZE_F = %u\n", H5O_MAX_TOKEN_SIZE);
+
/* Close files */
endCfile();
endFfile();
diff --git a/fortran/src/README b/fortran/src/README
index a258e07..f9316b5 100644
--- a/fortran/src/README
+++ b/fortran/src/README
@@ -87,7 +87,7 @@ Quick overview of the Fortran APIs
to the file, a C program will read it as a 6x4 two-dimensional dataset into
memory. The HDF5 C utilities h5dump and h5ls display transposed data, if
data is written from a Fortran program.
-
+
* Fortran indices are 1 based.
============================
@@ -105,29 +105,29 @@ Procedure to add a new function
Procedure for passing C variables to Fortran
---------------------------------------------
-(1) Find the C struct name you are interested in:
+(1) Find the C struct name you are interested in:
(a) src/H5public.h if it is a generic type, i.e. H5_*
or
- (b) src/H5*public.h if is a specific type, i.e. H5*_
-
+ (b) src/H5*public.h if is a specific type, i.e. H5*_
+
(2) Put that structure into an array that will be passed to fortran in:
(a) fortran/src/H5_f.c (add to nh5init_flags_c subroutine)
(b) edit fortran/src/H5f90proto.h and edit nh5init_flags_c interface call
-
+
(3) Edit the function call in fortran/src/H5_ff.F90
- (a) edit the call: FUNCTION h5init_flags_c
+ (a) edit the call: FUNCTION h5init_flags_c
(b) edit h5init_flags_c call in h5open_f to match the number of arguments passing
-
-(4) add the size of the array and array to fortran/src/H5f90global.F90
+
+(4) add the size of the array and array to fortran/src/H5f90global.F90
- must match the size found it H5_f.c
-NOTE: To just add a default C value argument, do steps (2a) and (4)
+NOTE: To just add a default C value argument, do steps (2a) and (4)
Procedure for adding a new file to the repository
--------------------------------------------------
-Add the name of the file to the:
+Add the name of the file to the:
(1) Makefile.am located in the same directory as the newfile
(2) CMakeLists.txt located in the same directory as the newfile
(3) MANIFEST located in the top level directory
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index e31a582..7e8b611 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -175,7 +175,7 @@ H5O_mp_H5OGET_COMMENT_F
H5O_mp_H5OGET_COMMENT_BY_NAME_F
H5O_mp_H5OINCR_REFCOUNT_F
H5O_mp_H5OLINK_F
-H5O_mp_H5OOPEN_BY_ADDR_F
+H5O_mp_H5OOPEN_BY_TOKEN_F
H5O_mp_H5OOPEN_BY_IDX_F
H5O_mp_H5OOPEN_F
H5O_mp_H5OSET_COMMENT_F
@@ -185,6 +185,7 @@ H5O_mp_H5OGET_INFO_BY_NAME_F
H5O_mp_H5OGET_INFO_F
H5O_mp_H5OVISIT_BY_NAME_F
H5O_mp_H5OVISIT_F
+H5O_mp_H5OTOKEN_CMP_F
; H5P
H5P_mp_H5PCREATE_F
H5P_mp_H5PSET_PRESERVE_F
@@ -459,6 +460,7 @@ H5VL_mp_H5VLREGISTER_CONNECTOR_BY_NAME_F
H5VL_mp_H5VLREGISTER_CONNECTOR_BY_VALUE_F
H5VL_mp_H5VLIS_CONNECTOR_REGISTERED_F
H5VL_mp_H5VLGET_CONNECTOR_ID_F
+H5VL_mp_H5VLGET_CONNECTOR_ID_BY_NAME_F
H5VL_mp_H5VLGET_CONNECTOR_NAME_F
H5VL_mp_H5VLCLOSE_F
H5VL_mp_H5VLUNREGISTER_CONNECTOR_F
diff --git a/fortran/test/tH5G_1_8.F90 b/fortran/test/tH5G_1_8.F90
index d3be525..58431a1 100644
--- a/fortran/test/tH5G_1_8.F90
+++ b/fortran/test/tH5G_1_8.F90
@@ -665,11 +665,11 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
! H5L_TYPE_SOFT_F - Soft link
! H5L_TYPE_EXTERNAL_F - External link
! H5L_TYPE_ERROR _F - Error
- INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
+ TYPE(H5O_TOKEN_T_F) :: token ! If the link is a hard link, token specifies the object token that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
-! WRITE(*,*) "link creation (w/new group format)"
+ WRITE(*,*) "link creation (w/new group format)"
! Create a file
CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, file, error, H5P_DEFAULT_F, fapl)
@@ -698,7 +698,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
CALL check("H5Lcreate_soft_f", error, total_error)
CALL H5Lget_info_f(file, "grp1/soft", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error, H5P_DEFAULT_F)
CALL check("H5Lget_info_f",error,total_error)
@@ -770,7 +770,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
! H5L_TYPE_SOFT_F - Soft link
! H5L_TYPE_EXTERNAL_F - External link
! H5L_TYPE_ERROR _F - Error
- INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
+ TYPE(H5O_TOKEN_T_F) :: token ! If the link is a hard link, token specifies the object token that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
INTEGER :: error
@@ -816,7 +816,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
! Get the group's link's information
CALL H5Lget_info_f(file_id, "group", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error, H5P_DEFAULT_F)
CALL check("H5Lget_info_f",error,total_error)
@@ -1179,7 +1179,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error)
INTEGER :: cset ! Indicates the character set used for the attribute’s name
INTEGER(SIZE_T) :: val_size
INTEGER :: link_type
- INTEGER(HADDR_T) :: address
+ TYPE(H5O_TOKEN_T_F) :: token
INTEGER :: u ! Local index variable
INTEGER :: Input1, i
@@ -1309,10 +1309,10 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error)
! HDmemset(&linfo, 0, sizeof(linfo));
CALL H5Lget_info_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), &
- link_type, f_corder_valid, corder, cset, address, val_size, error)
+ link_type, f_corder_valid, corder, cset, token, val_size, error)
- CALL H5Oopen_by_addr_f(group_id, address, grp, error)
- CALL check("H5Oopen_by_addr_f", error, total_error)
+ CALL H5Oopen_by_token_f(group_id, token, grp, error)
+ CALL check("H5Oopen_by_token_f", error, total_error)
CALL H5Iget_type_f(grp, id_type, error)
CALL check("H5Iget_type_f", error, total_error)
@@ -1357,11 +1357,11 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error)
! Close the group creation property list
CALL H5Pclose_f(gcpl_id, error)
- CALL check("delete_by_idx.H5Gclose_f", error, total_error)
+ CALL check("delete_by_idx.H5Pclose_f", error, total_error)
! Close the file
CALL H5Fclose_f(file_id, error)
- CALL check("delete_by_idx.H5Gclose_f", error, total_error)
+ CALL check("delete_by_idx.H5Fclose_f", error, total_error)
IF(cleanup) CALL h5_cleanup_f("file0", H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
@@ -1407,7 +1407,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
INTEGER :: corder ! Is a positive integer containing the creation order of the attribute
INTEGER :: cset ! Indicates the character set used for the attribute’s name
INTEGER :: link_type
- INTEGER(HADDR_T) :: address
+ TYPE(H5O_TOKEN_T_F) :: token
INTEGER(SIZE_T) :: val_size ! Indicates the size, in the number of characters, of the attribute
CHARACTER(LEN=7) :: tmpname ! Temporary link name
@@ -1427,14 +1427,14 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! Verify the link information for first link, in increasing creation order
! HDmemset(&linfo, 0, sizeof(linfo));
CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,HSIZE_T), &
- link_type, f_corder_valid, corder, cset, address, val_size, error)
+ link_type, f_corder_valid, corder, cset, token, val_size, error)
CALL check("H5Lget_info_by_idx_f", error, total_error)
CALL verify("H5Lget_info_by_idx_f", corder, 0, total_error)
! Verify the link information for new link, in increasing creation order
! HDmemset(&linfo, 0, sizeof(linfo));
CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), &
- link_type, f_corder_valid, corder, cset, address, val_size, error)
+ link_type, f_corder_valid, corder, cset, token, val_size, error)
CALL check("H5Lget_info_by_idx_f", error, total_error)
CALL verify("H5Lget_info_by_idx_f", corder, n, total_error)
@@ -1516,7 +1516,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! H5L_TYPE_SOFT_F - Soft link
! H5L_TYPE_EXTERNAL_F - External link
! H5L_TYPE_ERROR _F - Error
- INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
+ TYPE(H5O_TOKEN_T_F) :: token ! If the link is a hard link, token specifies the object token that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
CHARACTER(LEN=1024) :: filename = 'tempfile.h5'
@@ -1555,7 +1555,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! Check that its character encoding is the default
CALL H5Lget_info_f(file_id, "group", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error, H5P_DEFAULT_F)
! File-wide default character encoding can not yet be set via the file
@@ -1575,7 +1575,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! Check that its character encoding is the default
CALL H5Lget_info_f(file_id, "type", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("h5tclose_f", error, total_error)
@@ -1636,7 +1636,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! Check that its character encoding is the default
CALL H5Lget_info_f(file_id, "dataset", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
@@ -1661,7 +1661,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! Check that its character encoding is UTF-8
CALL H5Lget_info_f(file_id, "group2", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error)
@@ -1679,7 +1679,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! Check that its character encoding is UTF-8
CALL H5Lget_info_f(file_id, "type2", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error)
@@ -1697,7 +1697,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! Check that its character encoding is UTF-8
CALL H5Lget_info_f(file_id, "dataset2", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
CALL verify("H5Lget_info_f2",cset, H5T_CSET_UTF8_F,total_error)
@@ -1719,7 +1719,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! Check that its character encoding is ASCII
CALL H5Lget_info_f(file_id, "/dataset2_link", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error)
@@ -1727,7 +1727,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! Check that the first link's encoding hasn't changed
CALL H5Lget_info_f(file_id, "/dataset2", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
CALL verify("H5Lget_info_f3",cset, H5T_CSET_UTF8_F,total_error)
@@ -1742,7 +1742,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
CALL check("H5Lcreate_soft_f", error, total_error)
CALL H5Lget_info_f(file_id, "slink_to_dset2", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error)
@@ -1756,7 +1756,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
CALL check("H5Lmove_f",error, total_error)
CALL H5Lget_info_f(file_id, "moved_slink", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error)
@@ -1770,7 +1770,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
CALL H5Lcopy_f(file_id, "moved_slink", file_id, "copied_slink", error, lcpl_id)
CALL H5Lget_info_f(file_id, "copied_slink", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error)
@@ -1782,7 +1782,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
CALL check("H5Lcreate_external_f", error, total_error)
CALL H5Lget_info_f(file_id, "extlink", &
- cset, corder, f_corder_valid, link_type, address, val_size, &
+ cset, corder, f_corder_valid, link_type, token, val_size, &
error)
CALL check("H5Lget_info_f", error, total_error)
CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error)
diff --git a/fortran/test/tH5O_F03.F90 b/fortran/test/tH5O_F03.F90
index 5b446a4..c9ecccc 100644
--- a/fortran/test/tH5O_F03.F90
+++ b/fortran/test/tH5O_F03.F90
@@ -63,27 +63,33 @@ MODULE visit_cb
CONTAINS
-! Compares the field values of a C h5O_info_t and a Fortran H5O_info_t.
+! Compares the field values of a C H5O_info_t and a Fortran H5O_info_t.
+
+ INTEGER FUNCTION compare_h5o_info_t( loc_id, oinfo_f, oinfo_c, field, full_f_field ) RESULT(status)
- INTEGER FUNCTION compare_h5o_info_t( oinfo_f, oinfo_c, field, full_f_field ) RESULT(status)
-
IMPLICIT NONE
+ INTEGER(HID_T) :: loc_id
TYPE(h5o_info_t) :: oinfo_f
TYPE(c_h5o_info_t) :: oinfo_c
+ TYPE(H5O_TOKEN_T_F) :: token_c
INTEGER :: field
- LOGICAL :: full_f_field ! All the fields of Fortran H5O_info_t where filled
+ LOGICAL :: full_f_field ! All the fields of Fortran H5O_info_t where filled
! local
INTEGER(C_INT), DIMENSION(1:8) :: atime, btime, ctime, mtime
+ INTEGER :: cmp_value
INTEGER :: i
+ INTEGER :: ierr
status = 0
-
+
IF( (field .EQ. H5O_INFO_BASIC_F).OR.(field .EQ. H5O_INFO_ALL_F) )THEN
IF( (oinfo_f%fileno.LE.0) .OR. (oinfo_c%fileno .NE. oinfo_f%fileno) )THEN
status = -1
RETURN
ENDIF
- IF( (oinfo_f%addr.LE.0) .OR. (oinfo_c%addr .NE. oinfo_f%addr) )THEN
+ token_c%token = oinfo_c%token%token
+ CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr);
+ IF( (ierr .EQ. -1) .OR. (cmp_value .NE. 0) ) THEN
status = -1
RETURN
ENDIF
@@ -131,26 +137,12 @@ CONTAINS
! check other field values are not filled (using only a small subset to check)
status = 0
IF( oinfo_c%fileno .NE. oinfo_f%fileno) status = status + 1
- IF( oinfo_c%addr .NE. oinfo_f%addr) status = status + 1
- IF( oinfo_c%type .NE. oinfo_f%type) status = status + 1
- IF( oinfo_c%rc .NE. oinfo_f%rc) status = status + 1
- IF(status.EQ.0) THEN ! There was no difference found, which is only possible if the field was filled.
- status = -1
- RETURN
- ENDIF
- status = 0 ! reset
- ENDIF
-
- IF((field .EQ. H5O_INFO_NUM_ATTRS_F).OR.(field .EQ. H5O_INFO_ALL_F))THEN
- IF( (oinfo_f%num_attrs.LT.0) .OR. (oinfo_c%num_attrs .NE. oinfo_f%num_attrs) )THEN
+ token_c%token = oinfo_c%token%token
+ CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr);
+ IF( (ierr .EQ. -1) .OR. (cmp_value .NE. 0) ) THEN
status = -1
RETURN
ENDIF
- ELSE IF( field .EQ. H5O_INFO_ALL_F.AND.full_f_field)THEN
- ! check other field values are not filled (using only a small subset to check)
- status = 0
- IF( oinfo_c%fileno .NE. oinfo_f%fileno) status = status + 1
- IF( oinfo_c%addr .NE. oinfo_f%addr) status = status + 1
IF( oinfo_c%type .NE. oinfo_f%type) status = status + 1
IF( oinfo_c%rc .NE. oinfo_f%rc) status = status + 1
IF(status.EQ.0) THEN ! There was no difference found, which is only possible if the field was filled.
@@ -158,85 +150,23 @@ CONTAINS
RETURN
ENDIF
status = 0 ! reset
-
ENDIF
- IF((field).EQ.H5O_INFO_HDR_F.OR.(field .EQ. H5O_INFO_ALL_F))THEN
- IF( (oinfo_f%hdr%version.LT.0) .OR. (oinfo_c%hdr%version .NE. oinfo_f%hdr%version) )THEN
- status = -1
- RETURN
- ENDIF
- IF( (oinfo_f%hdr%nmesgs.LT.0) .OR. (oinfo_c%hdr%nmesgs .NE. oinfo_f%hdr%nmesgs) )THEN
- status = -1
- RETURN
- ENDIF
- IF( (oinfo_f%hdr%nchunks.LT.0) .OR. (oinfo_c%hdr%nchunks .NE. oinfo_f%hdr%nchunks) )THEN
- status = -1
- RETURN
- ENDIF
- IF( (oinfo_f%hdr%flags.LT.0) .OR. (oinfo_c%hdr%flags .NE. oinfo_f%hdr%flags) )THEN
- status = -1
- RETURN
- ENDIF
- IF( (oinfo_f%hdr%space%total.LT.0) .OR. (oinfo_c%hdr%space%total .NE. oinfo_f%hdr%space%total) )THEN
- status = -1
- RETURN
- ENDIF
- IF( (oinfo_f%hdr%space%meta.LT.0) .OR. (oinfo_c%hdr%space%meta .NE. oinfo_f%hdr%space%meta) )THEN
- status = -1
- RETURN
- ENDIF
- IF( (oinfo_f%hdr%space%mesg.LT.0) .OR. (oinfo_c%hdr%space%mesg .NE. oinfo_f%hdr%space%mesg) )THEN
- status = -1
- RETURN
- ENDIF
- IF( (oinfo_f%hdr%space%free.LT.0) .OR. (oinfo_c%hdr%space%free .NE. oinfo_f%hdr%space%free) )THEN
- status = -1
- RETURN
- ENDIF
- IF( (oinfo_f%hdr%mesg%present.LT.0) .OR. (oinfo_c%hdr%mesg%present .NE. oinfo_f%hdr%mesg%present) )THEN
- status = -1
- RETURN
- ENDIF
- IF( (oinfo_f%hdr%mesg%shared.LT.0) .OR. (oinfo_c%hdr%mesg%shared .NE. oinfo_f%hdr%mesg%shared) )THEN
+ IF((field .EQ. H5O_INFO_NUM_ATTRS_F).OR.(field .EQ. H5O_INFO_ALL_F))THEN
+ IF( (oinfo_f%num_attrs.LT.0) .OR. (oinfo_c%num_attrs .NE. oinfo_f%num_attrs) )THEN
status = -1
RETURN
ENDIF
- ELSE IF( field .EQ. H5O_INFO_HDR_F.AND.full_f_field)THEN
+ ELSE IF( field .EQ. H5O_INFO_ALL_F.AND.full_f_field)THEN
! check other field values are not filled (using only a small subset to check)
status = 0
IF( oinfo_c%fileno .NE. oinfo_f%fileno) status = status + 1
- IF( oinfo_c%addr .NE. oinfo_f%addr) status = status + 1
- IF( oinfo_c%type .NE. oinfo_f%type) status = status + 1
- IF( oinfo_c%rc .NE. oinfo_f%rc) status = status + 1
- IF(status.EQ.0) THEN ! There was no difference found, which is only possible if the field was filled.
- status = -1
- RETURN
- ENDIF
- status = 0 ! reset
- ENDIF
- IF((field).EQ.H5O_INFO_META_SIZE_F.OR.(field .EQ. H5O_INFO_ALL_F))THEN
- IF((oinfo_f%meta_size%obj%index_size.LT.0).OR.(oinfo_c%meta_size%obj%index_size.NE.oinfo_f%meta_size%obj%index_size))THEN
- status = -1
- RETURN
- ENDIF
- IF((oinfo_f%meta_size%obj%heap_size.LT.0).OR.(oinfo_c%meta_size%obj%heap_size.NE.oinfo_f%meta_size%obj%heap_size))THEN
- status = -1
- RETURN
- ENDIF
- IF((oinfo_f%meta_size%attr%index_size.LT.0).OR.(oinfo_c%meta_size%attr%index_size.NE.oinfo_f%meta_size%attr%index_size))THEN
- status = -1
- RETURN
- ENDIF
- IF((oinfo_f%meta_size%attr%heap_size.LT.0).OR.(oinfo_c%meta_size%attr%heap_size.NE.oinfo_f%meta_size%attr%heap_size))THEN
+ token_c%token = oinfo_c%token%token
+ CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr);
+ IF( (ierr .EQ. -1) .OR. (cmp_value .NE. 0) ) THEN
status = -1
RETURN
ENDIF
- ELSE IF( field .EQ. H5O_INFO_META_SIZE_F.AND.full_f_field)THEN
- ! check other field values are not filled (using only a small subset to check)
- status = 0
- IF( oinfo_c%fileno .NE. oinfo_f%fileno) status = status + 1
- IF( oinfo_c%addr .NE. oinfo_f%addr) status = status + 1
IF( oinfo_c%type .NE. oinfo_f%type) status = status + 1
IF( oinfo_c%rc .NE. oinfo_f%rc) status = status + 1
IF(status.EQ.0) THEN ! There was no difference found, which is only possible if the field was filled.
@@ -295,13 +225,13 @@ CONTAINS
IF(op_data%field .EQ. H5O_INFO_ALL_F)THEN
idx = op_data%idx
-
+
DO i = 1, len
IF(op_data%info(idx)%path(i)(1:1) .NE. name(i)(1:1))THEN
visit_obj_cb = -1
RETURN
ENDIF
-
+
IF(op_data%info(idx)%type_obj .NE. oinfo_c%type)THEN
visit_obj_cb = -1
RETURN
@@ -310,14 +240,14 @@ CONTAINS
ENDIF
- ! Check H5Oget_info_by_name_f; if partial field values where filled correctly
+ ! Check H5Oget_info_by_name_f; if partial field values were filled correctly
CALL H5Oget_info_by_name_f(group_id, name2, oinfo_f, ierr);
- visit_obj_cb = compare_h5o_info_t( oinfo_f, oinfo_c, op_data%field, .TRUE. )
+ visit_obj_cb = compare_h5o_info_t( group_id, oinfo_f, oinfo_c, op_data%field, .TRUE. )
IF(visit_obj_cb.EQ.-1) RETURN
! Check H5Oget_info_by_name_f, only check field values
CALL H5Oget_info_by_name_f(group_id, name2, oinfo_f, ierr, fields = op_data%field);
- visit_obj_cb = compare_h5o_info_t( oinfo_f, oinfo_c, op_data%field, .FALSE. )
+ visit_obj_cb = compare_h5o_info_t(group_id, oinfo_f, oinfo_c, op_data%field, .FALSE. )
IF(visit_obj_cb.EQ.-1) RETURN
@@ -325,12 +255,12 @@ CONTAINS
! Check H5Oget_info_f, only check field values
CALL H5Oget_info_f(group_id, oinfo_f, ierr, fields = op_data%field);
- visit_obj_cb = compare_h5o_info_t( oinfo_f, oinfo_c, op_data%field, .FALSE. )
+ visit_obj_cb = compare_h5o_info_t(group_id, oinfo_f, oinfo_c, op_data%field, .FALSE. )
IF(visit_obj_cb.EQ.-1) RETURN
! Check H5Oget_info_f; if partial field values where filled correctly
CALL H5Oget_info_f(group_id, oinfo_f, ierr);
- visit_obj_cb = compare_h5o_info_t( oinfo_f, oinfo_c, op_data%field, .TRUE. )
+ visit_obj_cb = compare_h5o_info_t(group_id, oinfo_f, oinfo_c, op_data%field, .TRUE. )
IF(visit_obj_cb.EQ.-1) RETURN
ENDIF
@@ -583,20 +513,6 @@ SUBROUTINE test_obj_visit(total_error)
IF(ret_val.LT.0)THEN
CALL check("h5ovisit_f", -1, total_error)
ENDIF
- udata%field = H5O_INFO_HDR_F
- udata%idx = 1
- CALL h5ovisit_f(fid, H5_INDEX_NAME_F, H5_ITER_INC_F, fun_ptr, f_ptr, ret_val, error, fields=udata%field)
- CALL check("h5ovisit_f", error, total_error)
- IF(ret_val.LT.0)THEN
- CALL check("h5ovisit_f", -1, total_error)
- ENDIF
- udata%field = H5O_INFO_META_SIZE_F
- udata%idx = 1
- CALL h5ovisit_f(fid, H5_INDEX_NAME_F, H5_ITER_INC_F, fun_ptr, f_ptr, ret_val, error, fields=udata%field)
- CALL check("h5ovisit_f", error, total_error)
- IF(ret_val.LT.0)THEN
- CALL check("h5ovisit_f", -1, total_error)
- ENDIF
! Test h5ovisit_by_name_f
object_name = "/"
@@ -630,21 +546,7 @@ SUBROUTINE test_obj_visit(total_error)
IF(ret_val.LT.0)THEN
CALL check("h5ovisit_by_name_f", -1, total_error)
ENDIF
- udata%idx = 1
- udata%field = H5O_INFO_HDR_F
- CALL h5ovisit_by_name_f(fid, object_name, H5_INDEX_NAME_F, H5_ITER_INC_F, fun_ptr, f_ptr, ret_val, error, fields=udata%field)
- CALL check("h5ovisit_by_name_f", error, total_error)
- IF(ret_val.LT.0)THEN
- CALL check("h5ovisit_by_name_f", -1, total_error)
- ENDIF
- udata%idx = 1
- udata%field = H5O_INFO_META_SIZE_F
- CALL h5ovisit_by_name_f(fid, object_name, H5_INDEX_NAME_F, H5_ITER_INC_F, fun_ptr, f_ptr, ret_val, error, fields=udata%field)
- CALL check("h5ovisit_by_name_f", error, total_error)
- IF(ret_val.LT.0)THEN
- CALL check("h5ovisit_by_name_f", -1, total_error)
- ENDIF
-
+
CALL h5fclose_f(fid, error)
CALL check("h5fclose_f",error, total_error)
diff --git a/fortran/test/vol_connector.F90 b/fortran/test/vol_connector.F90
index aabb2b8..cd05cb1 100644
--- a/fortran/test/vol_connector.F90
+++ b/fortran/test/vol_connector.F90
@@ -74,8 +74,8 @@ CONTAINS
CALL check("H5VLis_connector_registered_f",error,total_error)
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
- CALL H5VLget_connector_id_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error)
- CALL check("H5VLget_connector_id_f",error,total_error)
+ CALL H5VLget_connector_id_by_name_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error)
+ CALL check("H5VLget_connector_id_by_name_f",error,total_error)
CALL H5Fcreate_f("voltest.h5",H5F_ACC_TRUNC_F, file_id, error)
CALL check("H5F_create_f",error,total_error)
@@ -201,9 +201,9 @@ CONTAINS
CALL VERIFY("H5Pget_vol_id_f", vol_id_out, vol_id, total_error)
ENDIF
- CALL H5VLget_connector_id_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error)
- CALL check("H5VLget_connector_id_f",error,total_error)
- CALL VERIFY("H5VLget_connector_id_f", vol_id_out, vol_id, total_error)
+ CALL H5VLget_connector_id_by_name_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error)
+ CALL check("H5VLget_connector_id_by_name_f",error,total_error)
+ CALL VERIFY("H5VLget_connector_id_by_name_f", vol_id_out, vol_id, total_error)
CALL H5Fcreate_f("voltest.h5",H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl_id)
CALL check("H5F_create_f",error,total_error)