[petsc-dev] PETSC_HAVE_ZLIB gone with PR #1853
Jed Brown
jed at jedbrown.org
Thu Sep 5 11:16:59 CDT 2019
Can we query HDF5 to determine whether it supports zlib? When shipping
shared libraries, some people will use a different libhdf5, so it'd be
better to determine this at run-time.
"Smith, Barry F. via petsc-dev" <petsc-dev at mcs.anl.gov> writes:
> Vaclav,
>
> 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.
>
> 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
> one of them because I did a grep of HAVE_ZLIB in PETSc which would not detect the zlib in the requires.
>
> We can certainly bring it back ASAP.
>
> 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.
> 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.
>
> 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.
>
> Sorry for the inconvenience, we'll fix it better than ever
>
> Barry
>
>
>
>
>> On Sep 5, 2019, at 8:52 AM, Hapla Vaclav <vaclav.hapla at erdw.ethz.ch> wrote:
>>
>> Barry, you did a petscconf.h cleanup in BitBucket PR #1834 (merge commit 52556f0f).
>>
>> The problem is PETSC_HAVE_ZLIB is no longer set when ZLIB is installed.
>> That effectively disables my tests with `requires: zlib` in
>> src/mat/examples/tutorials/ex10.c
>> src/ksp/ksp/examples/tutorials/ex27.c
>>
>> 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).
>>
>> Was the PETSC_HAVE_ZLIB removal intentional? Could it be brought back?
>>
>> Vaclav
More information about the petsc-dev
mailing list