Skip to content

Commit

Permalink
Update to new multi dataset Fortran API and tests. (#1724)
Browse files Browse the repository at this point in the history
* Update to new multi dataset Fortran API and tests.
* Sync Fortran with develop.
* skipping h5pget_mpio_actual_io_mode_f for now
  • Loading branch information
brtnfld authored May 4, 2022
1 parent 8298fa6 commit 249bcf4
Show file tree
Hide file tree
Showing 28 changed files with 333 additions and 458 deletions.
8 changes: 4 additions & 4 deletions fortran/src/H5Af.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ h5arename_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd
* PURPOSE
* Call H5Aopen to open an attribute
* INPUTS
* obj_id - Identifer for object to which attribute is attached
* obj_id - Identifier for object to which attribute is attached
* attr_name - Attribute access property list
* attr_namelen - size of attr_name
* aapl_id - Link access property list
Expand Down Expand Up @@ -317,7 +317,7 @@ h5aopen_c(hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl
* PURPOSE
* Call h5adelete_by_name to remove an attribute from a specified location
* INPUTS
* loc_id - identifer for object to which attribute is attached
* loc_id - identifier for object to which attribute is attached
* obj_name - object identifier
* obj_namelen - name length
* attr_name - name of the attribute
Expand Down Expand Up @@ -424,7 +424,7 @@ h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f
* INPUTS
*
*
* loc_id - Identifer for object to which attribute is attached
* loc_id - Identifier for object to which attribute is attached
* obj_name - Name of object, relative to location,
* from which attribute is to be removed *TEST* check NULL
* idx_type - Type of index; Possible values are:
Expand Down Expand Up @@ -532,7 +532,7 @@ h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_
* aapl_id - Attribute access property list
* lapl_id - Link access property list
* OUTPUTS
* attr_id - attribute identifer
* attr_id - attribute identifier
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
Expand Down
14 changes: 7 additions & 7 deletions fortran/src/H5Aff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ END SUBROUTINE h5acreate_f
!
! INPUTS
! obj_id - identifier of a group, dataset, or named
! datatype atttribute to be attached to
! datatype attribute to be attached to
! name - attribute name
! OUTPUTS
! attr_id - attribute identifier
Expand Down Expand Up @@ -487,7 +487,7 @@ END SUBROUTINE h5aget_name_f
SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, &
n, name, hdferr, size, lapl_id)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached
INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for object to which attribute is attached
CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location,
! from which attribute is to be removed *TEST* check NULL
INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are:
Expand Down Expand Up @@ -846,7 +846,7 @@ END SUBROUTINE H5Arename_by_name_f
! identifier and attribute name
!
! INPUTS
! obj_id - Identifer for object to which attribute is attached
! obj_id - Identifier for object to which attribute is attached
! attr_name - Name of attribute to open
! OUTPUTS
! attr_id - attribute identifier
Expand Down Expand Up @@ -934,7 +934,7 @@ END SUBROUTINE H5Aopen_f
! SOURCE
SUBROUTINE H5Adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached
INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for object to which attribute is attached
CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location,
! from which attribute is to be removed
INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are:
Expand Down Expand Up @@ -991,7 +991,7 @@ END SUBROUTINE H5Adelete_by_idx_f
! Removes an attribute from a specified location
!
! INPUTS
! loc_id - Identifer for object to which attribute is attached
! loc_id - Identifier for object to which attribute is attached
! obj_name - Name of attribute to open
! attr_name - Attribute access property list
! lapl_id - Link access property list
Expand All @@ -1005,7 +1005,7 @@ END SUBROUTINE H5Adelete_by_idx_f
! SOURCE
SUBROUTINE H5Adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached
INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for object to which attribute is attached
CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location,
! from which attribute is to be removed
CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete
Expand Down Expand Up @@ -1841,7 +1841,7 @@ END SUBROUTINE H5Aread_char_scalar_fix
! dims parameter was added to make code portable;
! Aprile 4, 2001
!
! Changed buf intent to INOUT to be consistant
! Changed buf intent to INOUT to be consistent
! with how the C functions handles it. The pg
! compiler will return 0 if a buf value is not set.
! February, 2008
Expand Down
81 changes: 7 additions & 74 deletions fortran/src/H5Df.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ h5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f
* Elena Pourmal
* Tuesday, May 14, 2002
* HISTORY
* This function was added to accomodate h5dwrite_f with the
* This function was added to accommodate h5dwrite_f with the
* dims argument being of INTEGER(HSIZE_T) type
* SOURCE
*/
Expand Down Expand Up @@ -217,7 +217,7 @@ h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id
* Elena Pourmal
* Wednesday, May 15, 2002
* HISTORY
* This function was added to accomodate h5dread_f subroutine
* This function was added to accommodate h5dread_f subroutine
* with the dims parameter being of INTEGER(HSIZE_T_F) size.
* SOURCE
*/
Expand Down Expand Up @@ -495,10 +495,10 @@ h5dget_storage_size_c(hid_t_f *dset_id, hsize_t_f *size)

c_dset_id = (hid_t)*dset_id;
c_size = H5Dget_storage_size(c_dset_id);
if (c_size == 0)
return ret_value;
*size = (hsize_t_f)c_size;
ret_value = 0;
if (c_size != 0) {
ret_value = 0;
}
*size = (hsize_t_f)c_size;
return ret_value;
}

Expand Down Expand Up @@ -783,7 +783,7 @@ h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
return ret_value;
}
/*
* Move data from temorary buffer
* Move data from temporary buffer
*/
tmp_p = tmp;
for (i = 0; i < num_elem; i++) {
Expand Down Expand Up @@ -1354,70 +1354,3 @@ h5dvlen_reclaim_c(hid_t_f *type_id, hid_t_f *space_id, hid_t_f *plist_id, void *
ret_value = 0;
return ret_value;
}

/****if* H5FDmpio/h5dread_multi_c
* NAME
* h5dread_multi_c
* PURPOSE
* Calls H5Dread_multi
*
* INPUTS
* dxpl_id - dataset transfer property.
* count - the number of accessing datasets.
* OUTPUTS
* info - the array of dataset information and read buffer.
*
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
* M. Scot Breitenfeld
* March 25, 2014
* SOURCE
*/
int_f
nh5dread_multi_c(hid_t_f *dxpl_id, size_t_f *count, H5D_rw_multi_t_f *info)
/******/
{
int ret_value = -1;
/*
* Call H5Dread_multi function.
*/
if ((H5Dread_multi((hid_t)*dxpl_id, (size_t)*count, info)) < 0)
return ret_value; /* error occurred */

ret_value = 0;
return ret_value;
}

/****if* H5FDmpio/h5dwrite_multi_c
* NAME
* h5dwrite_multi_c
* PURPOSE
* Calls H5Dwrite_multi
*
* INPUTS
* count - the number of accessing datasets.
* dxpl_id - dataset transfer property.
* Info - the array of dataset information and write buffer.
*
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
* M. Scot Breitenfeld
* March 25, 2014
* SOURCE
*/
int_f
nh5dwrite_multi_c(hid_t_f *dxpl_id, size_t_f *count, H5D_rw_multi_t_f *info)
/******/
{
int ret_value = -1;
/*
* Call H5Dwrite_multi function.
*/
if ((H5Dwrite_multi((hid_t)*dxpl_id, (size_t)*count, info)) < 0)
return ret_value; /* error occurred */

ret_value = 0;
return ret_value;
}
Loading

0 comments on commit 249bcf4

Please sign in to comment.