Skip to content
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

Enable bshuf filter #3

Closed
t20100 opened this issue Nov 7, 2023 · 3 comments
Closed

Enable bshuf filter #3

t20100 opened this issue Nov 7, 2023 · 3 comments

Comments

@t20100
Copy link

t20100 commented Nov 7, 2023

Hi,

Thanks a lot for this package! 🎉 We love it for the h5web viewer!

I'm wondering what is the issue with the bshuf filter that is commented?

I'm not familiar with webassembly, but by maintaining hdf5plugin, I'm getting used to compile those filter, so if there is anything that could help, let me know.

@bmaranville
Copy link
Contributor

It compiles ok - but then I get a runtime error when I try to use it:

f.get('data').value
Uncaught RuntimeError: null function or function signature mismatch
at bshuf_blocked_wrap_fun (wasm://wasm/00031cc6:wasm-function[64]:0x2c4d)
at bshuf_decompress_lz4 (wasm://wasm/00031cc6:wasm-function[24]:0x1c91)
at H5Z_bshuf_filter (wasm://wasm/00031cc6:wasm-function[17]:0x1969)
at wasm://wasm/00a67752:wasm-function[3055]:0x2023e6
at wasm://wasm/00a67752:wasm-function[672]:0x57570
at wasm://wasm/00a67752:wasm-function[671]:0x56b22
at wasm://wasm/00a67752:wasm-function[745]:0x6519c
at wasm://wasm/00a67752:wasm-function[2921]:0x1e97fc
at wasm://wasm/00a67752:wasm-function[118]:0x15279

I spent some time looking around in the source to see if I could figure out what might be causing the issue, but I haven't found it yet.

@bmaranville
Copy link
Contributor

Ok, I managed to track it down - I need to pass the "-sWASM_BIGINT" flag to the plugin build process, just like I do for h5wasm. Internally emscripten was creating a "legalized" version of the unpack function with 32-bit output, which doesn't match the expected signature

After the change, the bshuf filter seems to build and function fine.

@t20100
Copy link
Author

t20100 commented Nov 8, 2023

Great! Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants