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

print_h5repack_farg issue on Mac #147

Open
allibco opened this issue Nov 4, 2024 · 0 comments
Open

print_h5repack_farg issue on Mac #147

allibco opened this issue Nov 4, 2024 · 0 comments

Comments

@allibco
Copy link

allibco commented Nov 4, 2024

Despite trying different compilers, versions, etc., my colleague and I can't get print_h5repack_farg to work properly on our macs.
For example:

cisl-arbutus:bin abaker$ ./print_h5repack_farg zfpmode=3 acc=1.0

Print cdvals for set of ZFP compression parameters...
zfpmode=3 set zfp mode (1=rate,2=prec,3=acc,4=expert,5=rev)
rate=3.5 set rate for rate mode of filter
acc=1 set accuracy for accuracy mode of filter
prec=0 set precision for precision mode of zfp filter
minbits=0 set minbits for expert mode of zfp filter
maxbits=0 set maxbits for expert mode of zfp filter
maxprec=0 set maxprec for expert mode of zfp filter
minexp=0 set minexp for expert mode of zfp filter
help=0 this help message

h5repack -f argument...
-f UD=32013,0,4,3,0,0,0

But it should return:
h5repack -f argument...
-f UD=32013,0,4,3,0,0,1072693248

Note that test_write_plugin works fine with the same zfpmode and acc value (and gives the correct CD values).

Peter Lindstrom says:

"I suspect that type punning is to blame, which in my experience can fail since it's UB, and the compiler can decide to ignore expressions that invoke UB.

I'm copying Mark Miller, who I know is very busy at the moment, but he may have some suggestions. It's probably a good idea to file an issue on GitHub so we don't forget to address this. If you do, please be sure to target the LLNL/H5Z-ZFP (not zfp) repo.

Mark, if you want to stick with type punning, I would strongly suggest using memcpy() instead of casts here and here, etc."

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

1 participant