Thanks, I think my problem may be related to the version of the compiler (2011 release of Intel fortran) that I am using and the version of hdf (1.8.11) I am using. I will try this again when I have upgraded my compiler to the most recent one and moved to hdf 1.10. I was planning to delay the move to hdf 1.10 until the first couple of bugfix releases were out (1.10.1?). I see that a patch release is now out. Do you have any idea on when 1.10.1 will be released
Øyvind Fra: Hdf-forum [mailto:[email protected]] På vegne av Scot Breitenfeld Sendt: 23 June 2016 18:51 Til: HDF Users Discussion List <[email protected]> Emne: Re: [Hdf-forum] reading compound hdf5 data If you are using the 1.8 version of hdf5 then you have to enable Fortran 2003 features by building with -enable-fortran -enable-fortran2003. For 1.10, you just have to use -enable-fortran. Also, there is no dimension argument (dim3) in the F2003 version of h5dread_f: SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & mem_space_id, file_space_id, xfer_prp) INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id TYPE(C_PTR) , INTENT(INOUT) :: buf INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp On Jun 23, 2016, at 10:37 AM, Øyvind Sylta <[email protected]<mailto:[email protected]>> wrote: I guess it ought to work, but I get a compile error: there is no matching specific subroutine for this generic subroutine call, which refers to h5dread_f() . If I do not use f_ptr ,it compiles. I use TYPE(C_PTR) :: f_ptr to define p_ptr. Any comments? I am using the Intel Fortran compiler Oyvind <image001.jpg><image002.jpg> -----Opprinnelig melding----- Fra: Hdf-forum [mailto:[email protected]] På vegne av Scot Breitenfeld Sendt: 23 June 2016 15:58 Til: HDF Users Discussion List <[email protected]<mailto:[email protected]>> Emne: Re: [Hdf-forum] reading compound hdf5 data Does the example h5ex_t_cmpd_F03.f90 at https://www.hdfgroup.org/HDF5/examples/api18-fortran.html help? > On Jun 23, 2016, at 7:41 AM, Øyvind Sylta > <[email protected]<mailto:[email protected]>> wrote: > > Is there a simple Fortran90 instruction on reading a hdf5 dataset that uses > compound and where the dataset consists of 3 groups (x, y, z) in a 2D array > as shown in the figure. It should be easy to load this data into my array(s), > but I am stuck here. > > ! file, dset, space, dims3 and ndims3 are initialised as hdf5 variables > CALL h5dopen_f (file, "RESQML/xyz", dset, ierr) > !call h5tget_nmembers_f(dset, members, ierr) !why does this call not work? > ! > ! Get dataspace. > ! > CALL h5dget_space_f(dset, space, ierr) > CALL h5sget_simple_extent_dims_f(space, dims3, ndims3, nrank) > > ! code to insert after here to load the data? > > > <image001.jpg> > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected]<mailto:[email protected]> > http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org > Twitter: https://twitter.com/hdf5 _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected]<mailto:[email protected]> http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5 _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected]<mailto:[email protected]> http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
_______________________________________________ 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
