Hi,
You have to build the hdf5 library so that the default integer is *8
(for example, use the compiler flag -i8 for the Intel compiler, other
compilers have similar flags). If you've built the hdf5 library with
F2003 features enabled (--enable-fortran --enable-fortran2003) then you
can take a look at rwdset_fortran2003.f90 in the hdf5 source
(fortran/examples directory) for using F2003 to write the data.
Scot
On 2012-05-15 08:13, Thomas Unfer wrote:
Hi,
I am a relatively new user of hdf5. I am unsuccessfully trying to
write integer*8 data to an hdf5 file
Here is part of my code :
integer, allocatable :: code(:)
integer*8, allocatable :: delay(:)
……
call h5screate_simple_f(1,dset_dims,dspace_id,error)
call
h5dcreate_f(sub_group_id,"Code",H5T_NATIVE_INTEGER,dspace_id,dset_id,error)
call
h5dwrite_f(dset_id,H5T_NATIVE_INTEGER,code,dset_dims,error)
call h5dclose_f(dset_id,error)
call h5sclose_f(dspace_id,error)
call h5screate_simple_f(1,dset_dims,dspace_id,error)
call
h5dcreate_f(sub_group_id,"Delay",H5T_STD_U16BE,dspace_id,dset_id,error)
call
h5dwrite_f(dset_id,H5T_STD_U16BE,delay,dset_dims,error)
call h5dclose_f(dset_id,error)
call h5sclose_f(dspace_id,error)
And the compilation fails with the following error using gfortran :
call h5dwrite_f(dset_id,H5T_STD_U16BE,delay,dset_dims,error)
1
Error: There is no specific subroutine for the generic 'h5dwrite_f'
at (1)
I works fine with the native types, but I can't make it run with
integer*8, is there a workaround?
Thanks,
Thomas
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org