GithubHelp home page GithubHelp logo

Comments (3)

fhaverkamp avatar fhaverkamp commented on July 29, 2024
haver@tul5eth3:~/genwqe-user$ ZLIB_ACCELERATOR=CAPI ZLIB_IBUF_SIZE=0x0 ZLIB_TRACE=0xf ./misc/zpipe_rnd -FZLIB -D hello.txt < hello_hello.txt > hello_hello.zlib
### _init: BUILD=4.0.18-28-g0ea6 ZLIB_TRACE=f ZLIB_INFLATE_IMPL=1 ZLIB_DEFLATE_IMPL=1 ZLIB_INFLATE_THRESHOLD=16384
sss Loading software zlib "/lib/powerpc64le-linux-gnu/libz.so.1"
sss   ZLIB_VERSION=1.2.8 (header) zlibVersion()=1.2.8 (code)
### [0x3fffebf1a438] __deflateInit2_: w=0x10007780720 level=-1 method=8 windowBits=15 memLevel=8 strategy=0 version=1.2.8/1.2.8 stream_size=112 impl=1
00002112.00002113:  [__afu_open] WARNING: device_id: 51966/4116 no CGZIP card
hhh [0x3fffebf1a438] h_deflateInit2_: card_type=2 card_no=-1 zlib_ibuf_total=786432
### [0x3fffebf1a438] deflateSetDictionary: dictionary=0x3fffebf1a4a8 dictLength=6 adler32=084b021f
hhh [0x3fffebf1a438] h_deflateSetDictionary dictionary=0x3fffebf1a4a8 dictLength=6
### [0x3fffebf1a438]    calculated adler32=0001
### [0x3fffebf1a438] deflate:   flush=Z_FINISH next_in=0x3fff8adc0010 avail_in=12 next_out=0x3fff8a9b0010 avail_out=4194304 total_out=0 crc/adler=00000001 impl=1
hhh [0x3fffebf1a438] h_deflate: flush=Z_FINISH avail_in=12 avail_out=4194304 ibuf_avail=786432 obuf_avail=1540096
hhh [0x3fffebf1a438]   *** loop=0 flush=Z_FINISH
hhh [0x3fffebf1a438]   *** collecting 12 bytes ...
hhh [0x3fffebf1a438]   *** sending 12 bytes to hardware ...
hhh [0x3fffebf1a438] h_deflate (0): flush=Z_FINISH next_in=0x3fff890d0000 avail_in=12 next_out=0x3fff88f40000 avail_out=1540096
hhh [0x3fffebf1a438]            flush=Z_FINISH next_in=0x3fff890d000c avail_in=0 next_out=0x3fff88f40016 avail_out=1540074 rc=1
hhh [0x3fffebf1a438]   *** giving out 22 bytes, remaining 0 bytes in temporary, 0 in internal buffer
### [0x3fffebf1a438]            flush=Z_FINISH next_in=0x3fff8adc001c avail_in=0 next_out=0x3fff8a9b0026 avail_out=4194282 total_out=22 crc/adler=1de40453 rc=Z_STREAM_END
### [0x3fffebf1a438] deflateEnd w=0x10007780720 rc=0
Info: deflateInit: 1
Info: deflate: 1 sw: 0 hw: 1
Info:   deflate_avail_in    4 KiB: 1
Info:   deflate_avail_out 1024 KiB: 1
Info:   deflate_total_in    4 KiB: 1
Info:   deflate_total_out    4 KiB: 1
Info: deflateSetDictionary: 1
Info: deflateEnd: 1
Info: inflateInit: 0
Info: inflate: 0 sw: 0 hw: 0
Info: inflateEnd: 0
sss Closing software zlib

And now the hardware CAPI (GENWQE will behave the same) version:

haver@tul5eth3:~/genwqe-user$ ZLIB_ACCELERATOR=XXX ZLIB_IBUF_SIZE=0x0 ZLIB_TRACE=0xf ./misc/zpipe_rnd -FZLIB -D hello.txt < hello_hello.txt > hello_hello.zlib
### _init: BUILD=4.0.18-28-g0ea6 ZLIB_TRACE=f ZLIB_INFLATE_IMPL=1 ZLIB_DEFLATE_IMPL=1 ZLIB_INFLATE_THRESHOLD=16384
sss Loading software zlib "/lib/powerpc64le-linux-gnu/libz.so.1"
sss   ZLIB_VERSION=1.2.8 (header) zlibVersion()=1.2.8 (code)
### [0x3fffd4e364a8] __deflateInit2_: w=0x10030350720 level=-1 method=8 windowBits=15 memLevel=8 strategy=0 version=1.2.8/1.2.8 stream_size=112 impl=1
### [0x3fffd4e364a8] __deflateInit2_: fallback to software (rc=-2)
### [0x3fffd4e364a8] __deflateInit2_: w=0x10030350720 level=-1 method=8 windowBits=15 memLevel=8 strategy=0 version=1.2.8/1.2.8 stream_size=112 impl=0
### [0x3fffd4e364a8] deflateSetDictionary: dictionary=0x3fffd4e36518 dictLength=6 adler32=084b021f
### [0x3fffd4e364a8]    calculated adler32=84b021f
### [0x3fffd4e364a8] deflate:   flush=Z_FINISH next_in=0x3fff995a0010 avail_in=12 next_out=0x3fff99190010 avail_out=4194304 total_out=0 crc/adler=084b021f impl=0
### [0x3fffd4e364a8]            flush=Z_FINISH next_in=0x3fff995a001c avail_in=0 next_out=0x3fff99190022 avail_out=4194286 total_out=18 crc/adler=1de40453 rc=Z_STREAM_END
### [0x3fffd4e364a8] deflateEnd w=0x10030350720 rc=0
Info: deflateInit: 1
Info: deflate: 1 sw: 1 hw: 0
Info:   deflate_avail_in    4 KiB: 1
Info:   deflate_avail_out 1024 KiB: 1
Info:   deflate_total_in    4 KiB: 1
Info:   deflate_total_out    4 KiB: 1
Info: deflateSetDictionary: 1
Info: deflateEnd: 1
Info: inflateInit: 0
Info: inflate: 0 sw: 0 hw: 0
Info: inflateEnd: 0
sss Closing software zlib
haver@tul5eth3:~/genwqe-user$ 

from genwqe-user.

fhaverkamp avatar fhaverkamp commented on July 29, 2024

As visible, the bug report is correct and we get the adler32 returned in the deflateSetDict() call when using the software fallback option and we see a 1 when using the hardware option. Still I think that the real calculation will again start with 1 as start value. Let me try to come with a patch which corrects that.

from genwqe-user.

fhaverkamp avatar fhaverkamp commented on July 29, 2024

https://github.com/ibm-genwqe/genwqe-user/tree/verify_deflateSetDict should solve the issue. Please have a look and let me know if it does what it should. Also we should wait for the automatic test-results before considering merging this.

from genwqe-user.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.