zlib-api: new virtual with zlib/zlib-ng as providers#37372
zlib-api: new virtual with zlib/zlib-ng as providers#37372haampie merged 10 commits intospack:developfrom
Conversation
|
Comparing So, 2x faster 🙃 And Spack's 13x faster... not bad. (this is both threaded and has better single-threaded perf thanks to zlib-ng) |
cb4b2b7 to
9221271
Compare
1fd7a01 to
c7f4779
Compare
|
zlib-ng v2.1.3 has some weird rpath issues (zlib-ng/zlib-ng#1523) should be fixable in a next release |
|
|
CI is green after building 1000s of packages, so I think this PR is good to go after switching back to |
|
Sigh. It's going to be building 1000s of packages again, because the zlib package hash has changed now that it provides zlib-api 😆 |
|
Are we potentially adding regressions by replacing |
|
Thanks @wdconinc! I've revived the zlib lowerbounds |
1e5d00f to
3052fbe
Compare
|
Only concern is the inability to specify which version of zlib is required. Does zlib-ng have a known compatibility mapping? Would be nice if we could specify which versions of zlib-api are provided by each version of zlib/zlib-ng. |
|
I agree with that, but I think zlib follows https://www.hyrumslaw.com/; it doesn't have a clear public API, and some people mess with accidentally exposed internals :p I think the easiest way to fix those issues is on a per package basis, so e.g. |
|
@spackbot rerun pipeline |
|
I've started that pipeline for you! |
Co-Authored-By: Wouter Deconinck <[email protected]>
5ddfa19 to
4b29372
Compare
alalazo
left a comment
There was a problem hiding this comment.
I checked all the commits, though in the first one I just checked the core files and zlib + zlib-ng packages. This LGTM. We can make zlib-ng the default in a following PR.
In the HPC package manager, we want the fastest `zlib` implementation by default. `zlib-ng` is up to 4x faster than stock `zlib`, and it can do things like take advantage of AVX-512 instructions. This PR makes `zlib-ng` the default `zlib-api` provider (`zlib-api` was introduced earlier, in #37372). As far as I can see, the only issues you can encounter are: 1. Build issues with packages that heavily rely on `zlib` internals. In Gitlab CI only one out of hundreds of packages had that issue (it extended zlib with deflate stuff, and used its own copy of zlib sources). 2. Packages that like to detect `zlib-ng` separately and rely on `zlib-ng` internals. The only issue I've found with this among the hundreds of packages built in CI is `perl` trying to report more specific zlib-ng version details, and relied on some internals that got refactored. But yeah... that warrants a patch / conflict and is nothing special. At runtime, you cannot really have any issues, given that zlib and zlib-ng export the exact same symbols (and zlib-ng tests this in their CI). You can't really have issues with externals when using zlib-ng either. The only type of issue is when system zlib is rather new, and not marked as external; if another external uses new symbols, and Spack builds an older zlib/zlib-ng, then the external might not find the new symbols. But this is a configuration issue, and it's not an issue caused by zlib-ng, as the same would happen with older Spack zlib. * zlib-api: use zlib-ng +compat by default * make a trivial change to zlib-ng to trigger a rebuild * add `haampie` as maintainer
Introduces a new virtual zlib-api, which replaces zlib in most packages. This allows users to switch to zlib-ng by default for better performance.
In the HPC package manager, we want the fastest `zlib` implementation by default. `zlib-ng` is up to 4x faster than stock `zlib`, and it can do things like take advantage of AVX-512 instructions. This PR makes `zlib-ng` the default `zlib-api` provider (`zlib-api` was introduced earlier, in spack#37372). As far as I can see, the only issues you can encounter are: 1. Build issues with packages that heavily rely on `zlib` internals. In Gitlab CI only one out of hundreds of packages had that issue (it extended zlib with deflate stuff, and used its own copy of zlib sources). 2. Packages that like to detect `zlib-ng` separately and rely on `zlib-ng` internals. The only issue I've found with this among the hundreds of packages built in CI is `perl` trying to report more specific zlib-ng version details, and relied on some internals that got refactored. But yeah... that warrants a patch / conflict and is nothing special. At runtime, you cannot really have any issues, given that zlib and zlib-ng export the exact same symbols (and zlib-ng tests this in their CI). You can't really have issues with externals when using zlib-ng either. The only type of issue is when system zlib is rather new, and not marked as external; if another external uses new symbols, and Spack builds an older zlib/zlib-ng, then the external might not find the new symbols. But this is a configuration issue, and it's not an issue caused by zlib-ng, as the same would happen with older Spack zlib. * zlib-api: use zlib-ng +compat by default * make a trivial change to zlib-ng to trigger a rebuild * add `haampie` as maintainer
After zlib -> zlib-api change (spack#37372) petsc is not including the zlib. This updates the spack-lib -> petsc-lib mapping.
After zlib -> zlib-api change (spack#37372) petsc is not including the zlib. This updates the spack-lib -> petsc-lib mapping.
Create a new virtual
zlib-apiand havezlib/zlib-ngas providers.zlibremains the default provider, maybe in the future we can swap it forzlib-ngto save some CPU cycles across the globe...My PR zlib-ng/zlib-ng#1546 to improve the zlib-ng build system was merged upstream and included here as a patch, that's why this PR has more + than -; the package changes are mostly one-liners replacing
zlibwithzlib-api.