Hi, I am developing a Fortran code that uses HDF5. The Fortran API datatypes listed at https://www.hdfgroup.org/HDF5/doc/RM/PredefDTypes.html indicate that the Fortran interface supports only H5T_NATIVE_INTEGER. I remember that someone hinted at using convert or some other trick to store longer integers but (i) the list is hard to search for, as there is no search facility and (ii) I am looking for a standard solution, if possible.
I need to store a variable that is "bind(c)" and of type "c_int64_t", as defined in the iso_c_binding. This variable cannot be stored in the HDF5 file as the h5dwrite_f routine is only overloaded to accept "integer" (i.e. the default kind). If I am mistaken, I would be glad to know how to overcome the problem. Else, I would have a more general question: is it planned for HDF5 to support routinely the iso_c_binding kinds? A priori the overloading could be limited to the typical c_int8_t, c_int16_t, c_int32_t and c_int64_t (if available on the platform) and resolved at compile type, even if the user chose to declare the variables as "integer", "integer(kind=some_other_kind)". In my situation, I would like to store a PRNG seed and thus need an exact mapping of the c_int64_t type on disk. Thanks for any info. Regards, Pierre _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
