Skip to content

Commit 29ebb29

Browse files
committed
endianness check thought not needed
1 parent f1746b5 commit 29ebb29

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/read/read.f90

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ integer(hid_t) function get_native_dtype(ds_id, dname, filename) result(native_d
1919

2020
integer(hid_t) :: dtype_id, native_dtype_id
2121
integer :: class
22-
integer :: ierr, order, machine_order
22+
integer :: ierr
23+
! integer :: order, machine_order
2324
integer(size_t) :: size_bytes
2425

2526
!> get the dataset variable type
@@ -32,11 +33,12 @@ integer(hid_t) function get_native_dtype(ds_id, dname, filename) result(native_d
3233
call h5tget_native_type_f(dtype_id, H5T_DIR_ASCEND_F, native_dtype_id, ierr)
3334
if(ierr/=0) error stop 'h5fortran:reader: get native dtype id ' // dname // ' from ' // filename
3435

35-
call h5tget_order_f(native_dtype_id, order, ierr)
36-
if(ierr/=0) error stop 'h5fortran:reader: get endianness ' // dname // ' from ' // filename
37-
!> check dataset endianness matches machine (in future, could swap endianness if needed)
38-
call h5tget_order_f(H5T_NATIVE_INTEGER, machine_order, ierr)
39-
if(order /= machine_order) error stop 'h5fortran:reader: endianness does not match machine native ' // dname // ' from ' // filename
36+
!> we think endianness is handled by HDF5 ... ?
37+
! call h5tget_order_f(native_dtype_id, order, ierr)
38+
! if(ierr/=0) error stop 'h5fortran:reader: get endianness ' // dname // ' from ' // filename
39+
! !> check dataset endianness matches machine (in future, could swap endianness if needed)
40+
! call h5tget_order_f(H5T_NATIVE_INTEGER, machine_order, ierr)
41+
! if(order /= machine_order) error stop 'h5fortran:reader: endianness does not match machine native ' // dname // ' from ' // filename
4042

4143
!> compose datatype inferred
4244
call h5tget_class_f(native_dtype_id, class, ierr)

0 commit comments

Comments
 (0)