Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed arg to C H5Dwrite_chunk #3541

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions fortran/src/H5Dff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2402,7 +2402,7 @@ SUBROUTINE h5dread_chunk_f(dset_id, offset, filters, buf, hdferr, dxpl_id)
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: dxpl_id

INTEGER(HID_T) :: dxpl_id_default
INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: offset_c
INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: c_offset
INTEGER(HSIZE_T) :: i, rank
INTEGER(C_INT32_T) :: c_filters

Expand All @@ -2427,7 +2427,7 @@ END FUNCTION H5Dread_chunk

rank = SIZE(offset, KIND=HSIZE_T)

ALLOCATE(offset_c(rank), STAT=hdferr)
ALLOCATE(c_offset(rank), STAT=hdferr)
IF (hdferr .NE. 0 ) THEN
hdferr = -1
RETURN
Expand All @@ -2437,14 +2437,14 @@ END FUNCTION H5Dread_chunk
! Reverse dimensions due to C-FORTRAN storage order
!
DO i = 1, rank
offset_c(i) = offset(rank - i + 1)
c_offset(i) = offset(rank - i + 1)
ENDDO

hdferr = INT(H5Dread_chunk(dset_id, dxpl_id_default, offset_c, c_filters, buf))
hdferr = INT(H5Dread_chunk(dset_id, dxpl_id_default, c_offset, c_filters, buf))

filters = INT(c_filters)

DEALLOCATE(offset_c)
DEALLOCATE(c_offset)

END SUBROUTINE h5dread_chunk_f

Expand Down Expand Up @@ -2475,7 +2475,7 @@ SUBROUTINE h5dwrite_chunk_f(dset_id, filters, offset, data_size, buf, hdferr, dx
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: dxpl_id

INTEGER(HID_T) :: dxpl_id_default
INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: offset_c
INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: c_offset
INTEGER(HSIZE_T) :: i, rank
INTEGER(C_INT32_T) :: c_filters

Expand All @@ -2499,7 +2499,7 @@ END FUNCTION H5Dwrite_chunk

rank = SIZE(offset, KIND=HSIZE_T)

ALLOCATE(offset_c(rank), STAT=hdferr)
ALLOCATE(c_offset(rank), STAT=hdferr)
IF (hdferr .NE. 0 ) THEN
hdferr = -1
RETURN
Expand All @@ -2509,14 +2509,14 @@ END FUNCTION H5Dwrite_chunk
! Reverse dimensions due to C-FORTRAN storage order
!
DO i = 1, rank
offset_c(i) = offset(rank - i + 1)
c_offset(i) = offset(rank - i + 1)
ENDDO

c_filters = INT(filters, C_INT32_T)

hdferr = INT(H5Dwrite_chunk(dset_id, dxpl_id_default, filters, offset_c, data_size, buf))
hdferr = INT(H5Dwrite_chunk(dset_id, dxpl_id_default, c_filters, c_offset, data_size, buf))

DEALLOCATE(offset_c)
DEALLOCATE(c_offset)

END SUBROUTINE h5dwrite_chunk_f

Expand Down