-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix fwrite length for gzip output #6393
Conversation
* gzip length and crc are manually computed in each thread and then added/combined * gzip header is minimal * remove some old debug code
Generated via commit a11f8b5 Download link for the artifact containing the test results: ↓ atime-results.zip
|
You're right and this PR version stores the modulo 2**32 as requested but its not the right size.
|
Put PR #5513 in this PR with new param compressLevel. |
b6091be
to
615161a
Compare
* add // # nocov for STOP, like previous version * add a test when naLen > width * remove test of buffMB done in fwrite.R
615161a
to
c128e29
Compare
987acee
to
24548ab
Compare
24548ab
to
aabe089
Compare
b9aa14d
to
1ec72f0
Compare
Hi, all checks are now OK for coverage. Review can continue. Thanks @MichaelChirico for advise. |
Thanks so much for the extra effort!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again! I found a few of the new # nocov
extraneous and managed to come up with some simple tests to get coverage to 100% -- PTAL at my tail commits if you're interested.
* fwrite with correct file length * gzip length and crc are manually computed in each thread and then added/combined * gzip header is minimal * remove some old debug code * Escape with NOZLIB for compilation succeed without zlib * Move zlib check at start to avoid oufile deletion * Indent and add comments * Buffers unification * Restore schedule(dynamic) more efficient and progress * Use alloc_size to see allocation when verbose * Test if stream init succeded * Add cast to avoid warnings on Windows * More explicit timing messages * Free stream structs * Add option to control compression level for fwrite with gzip * Rework namings and default value * Rename gzipLevel to compressLevel * compressLevel param documentation * Put zlib initialization together * Refact buffSize, numBatchs and numBatches * Add missing NOZLIB * Increase outputs in last message when verbose * No real init for stream_thread when is_gzip false * Minor corrections * Uses %zu format for size_t * Last verbose msg was not printed when not is_gzip * minor operator ws change * Add test for compressLevel=1 * Add url link in compressLevel documentation * Add 2 lines in NEWS for fwrite fix and compressLevel * tidy-up, expand NEWS for compressLevel * Use match.arg() for arg validation * add a test for the other extreme compressLevel=9 * partial test fix * fix updated test errors * confirmed NEWS wording, fix typo * fix order * weak ordering * place in 1.17.0 NEWS * Add parenthesis to be more explicit * Add comment for DeflateInit2 * typo * Add parenthesis to be more explicit (2) Co-authored-by: Michael Chirico <[email protected]> * Try to emphasize that '-' is "command flag hyphen", not "negative" * Convert Toby'd comment to atime_test() * Remove INTERNAL_STOP * Increase coverage * add // # nocov for STOP, like previous version * add a test when naLen > width * remove test of buffMB done in fwrite.R * Try to fix nocov error * Another attempt to increase coverage * Add more nocov * More judicious #nocov, keep INTERNAL_STOP * eol='' coverage * buffMB<line width * Similar for buffMB vs. header width * 0-row table verbose output --------- Co-authored-by: Benjamin Schwendinger <[email protected]> Co-authored-by: Michael Chirico <[email protected]> Co-authored-by: Michael Chirico <[email protected]>
restoring branch so that atime tests can find the commit 3630413 |
FYI @philippechataignon, we need to retain the branch for any PR involved in an {atime} performance test: Line 247 in f6dca2d
I'm not super jazzed about this setup, but nothing better has emerged as yet. |
Closes #6356. Closes #5506.
This PR is an attempt to create a better gzip file with fwrite. Its an important rewrite because it includes some refactoring of actual code.
zlib
C code
#pragma omp parallel for
for chunk loop and#pragma omp ordered
for the writing and summarizing part.malloc
occur early and no need for an header buffer.=-
or=*
. Lot of work remains. Use ofindent
command ?