Hello,

I try to use the function h5ltread_dataset_f to read a integer(kind=1)
array.

An example of my code is at :
https://code.google.com/p/amelet-hdf/source/browse/amelethdf-fortran/trunk/src/amelethdf/unstructuredmesh.f90#107

I have to read values in a temporary integer(kind=4) array otherwise the
compiler says there is no function to read the dataset :

! Elements definition

type unstructured_mesh_t
...
integer(kind=1), dimension(:), allocatable :: elements
...
end type unstructured_mesh_t

....
! Elements reading

integer, dimension(:), allocatable :: tmpelements

allocate(umesh%elements(one_dims(1)))

allocate(tmpelements(one_dims(1)))

call h5ltread_dataset_f(file_id, path, H5T_NATIVE_INTEGER_4, &

tmpelements, one_dims, hdferr)

umesh%elements = tmpelements

deallocate(tmpelements)



I thought I could write :

call h5ltread_dataset_f(file_id, path, H5T_NATIVE_INTEGER_1, &

umesh%elements, one_dims, hdferr)


Is there anything I do wrong ?



I use HDF5 1.8.6 with ifort under Linux Ubuntu 10.04

Thanks a lot,

Best regards,

Cyril.



_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to