<html><head></head><body>Ok, I agree it would be more systematic to detect whether the file uses compression and whether hdf5 is built with zlib. I will look at it soonish. Right now I will raise an issue.<br><br>Barry, it's not such a big deal for me. It's just that viewer is now untested which is a bit risky with respect to potential regressions.<br><br>Thanks,<br>Vaclav<br><br><br><div class="gmail_quote">5. září 2019 18:16:59 SELČ, Jed Brown <jed@jedbrown.org> napsal:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Can we query HDF5 to determine whether it supports zlib? When shipping<br>shared libraries, some people will use a different libhdf5, so it'd be<br>better to determine this at run-time.<br><br>"Smith, Barry F. via petsc-dev" <petsc-dev@mcs.anl.gov> writes:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Vaclav,<br><br> At the time of the PR Jed complained about all the configure information passed to PETSc source that was not used or relevant to PETSc. <br><br> Hence I did a cleanup, part of the cleanup was packages not directly used by PETSc no longer had information generated about them, zlib was<br> one of them because I did a grep of HAVE_ZLIB in PETSc which would not detect the zlib in the requires. <br><br> We can certainly bring it back ASAP.<br><br> But I'd like to explore additional options, since the use of zlib in the requires: location is a bit of a hack that only works for those specific tests. <br> You say that HDF fails when trying to process compressed HDF5 if HDF5 was built without zlib. Is there any other way to determine if the HDF5 file is compressed with zlib? An HDF5 call specifically or that? Some indicate in the file? If so our viewers could use this to check the file and generate a very useful error message instead of having HDF5 misbehave when called.<br><br> When bringing it back I will make it more specific, for example HDF5_BUILT_WITH_ZLIB because just because zlib exists it doesn't mean HDF5 was built with it.<br><br> Sorry for the inconvenience, we'll fix it better than ever<br><br> Barry<br><br><br><br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">On Sep 5, 2019, at 8:52 AM, Hapla Vaclav <vaclav.hapla@erdw.ethz.ch> wrote:<br><br>Barry, you did a petscconf.h cleanup in BitBucket PR #1834 (merge commit 52556f0f).<br><br>The problem is PETSC_HAVE_ZLIB is no longer set when ZLIB is installed.<br>That effectively disables my tests with `requires: zlib` in<br> src/mat/examples/tutorials/ex10.c<br> src/ksp/ksp/examples/tutorials/ex27.c<br><br>That condition is there because loading an HDF5 file which uses compression without zlib installed leads to HDF5 errors (very cryptic at least in some older HDF5 versions).<br><br>Was the PETSC_HAVE_ZLIB removal intentional? Could it be brought back?<br><br>Vaclav<br></blockquote></blockquote></pre></blockquote></div></body></html>