[petsc-dev] need for HDF5 < 1.8.0 support?

Matthew Knepley knepley at gmail.com
Fri Dec 7 08:53:30 CST 2018


Me too. I agree with Vaclav that we are already using features of 1.8. Its
hard to make truly useful things without those features. Also, I don't
think anyone using their own old HDF5 also uses our HDF5, so we would not
have to break them.

  Thanks,

    Matt

On Fri, Dec 7, 2018 at 9:48 AM Jed Brown via petsc-dev <
petsc-dev at mcs.anl.gov> wrote:

> I'm in favor of requiring >=1.8.0.
>
> Hapla Vaclav via petsc-dev <petsc-dev at mcs.anl.gov> writes:
>
> > I wanted to add support for HDF5 attributes of groups (currently only
> datasets).
> >
> > But I already feel like held back by supporting HDF5 older than 1.8.0.
> Do we still need that?
> >
> > My arguments to get rid of that support:
> > 1) It seems we already use some 1.8.0+ functions anyway (might be my
> fault, though).
> > 2) We could get rid of all those #if
> > 3) There were quite some useful API functions introduced in that release
> which would make the code simpler. For instance, H5O* functions allow
> handling groups and datasets the same way.
> >
> > Ad 2,3 consider this
> >
> > /* OLD */
> > #if (H5_VERS_MAJOR * 10000 + H5_VERS_MINOR * 100 + H5_VERS_RELEASE >=
> 10800)
> >   if (dataset) {
> >     PetscStackCallHDF5Return(object, H5Dopen2, (h5, parent,
> H5P_DEFAULT));
> >   } else if (type == H5O_TYPE_GROUP) {
> >     PetscStackCallHDF5Return(object, H5Gopen2, (h5, parent,
> H5P_DEFAULT));
> >   }
> > #else
> >   if (dataset) {
> >     PetscStackCallHDF5Return(object, H5Dopen, (h5, parent));
> >   } else if (type == H5O_TYPE_GROUP) {
> >     PetscStackCallHDF5Return(object, H5Gopen, (h5, parent));
> >   }
> > #endif
> > ...
> >   if (dataset) {
> >     PetscStackCallHDF5Return(err, H5Dclose, (object));
> >   } else if (type == H5O_TYPE_GROUP) {
> >     PetscStackCallHDF5Return(err, H5Gclose, (object));
> >   }
> >
> >
> > /* NEW */
> >   PetscStackCallHDF5Return(object, H5Oopen, (h5, parent, H5P_DEFAULT));
> >   ...
> >   PetscStackCallHDF5Return(err, H5Oclose, (object));
> >
> >
> > Additionally, function H5Oget_info() which can say whether the object is
> group or dataset was also introduced only in 1.8.0. So the dataset flag
> above would have to be set by a user it seems...
> >
> > So I personally think it's already about time to leave the old HDF5 API
> behind... Objections? If no, I would make a PR which would clean the code
> from the #ifs and forbid the older versions already in configure.
> >
> > Vaclav
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20181207/bb6fe764/attachment.html>


More information about the petsc-dev mailing list