Open ChristopherRabotin opened 2 years ago
Does the simple
example of this crate compile and run for you? I.e. cargo r --example simple --features blosc
Yes, it does.
So after returning to the code about thirty minutes ago, it's become clear that the issue was when I was trying to add a dataset of name X in group Y when a dataset of the same name and in the same group already existed. I called an unwrap()
on that call and that triggered the error above. By checking the existence, that issue was resolved.
So I guess that my only recommendation, if at all possible, would be to specify what function call caused the error and maybe add a tip to why the call failed.
Specifically, the following call failed:
let builder = dispersions_group.new_dataset_builder();
let _ds = builder
.with_data(&arr1(&data))
// finalize and write the dataset
.create(&*format!("Dispersion {}", param))
.unwrap();
It would have been helpful if that runtime failure would report `error on creation of dataset "Disperion blah" (tip: does this dataset already exist). Now, I have no idea whether that is possible to given that you're plugging into the C bindings.
with_data
is a wrapper around many calls, it would indeed be nice if error at the specific layer returned such a hint. We have discussed introducing some helper methods for dataset creating, e.g. #151, which could mimimise the confusion a bit.
Hi there,
First, thanks for all of your work on this library. There's obviously been a lot of thought and time put into it.
Secondly, I am trying to store some Monte Carlo data in hdf5 using your work: I'm trying to serialize 1-dimension arrays of
f64
data. I'm running on OpenSuSE Tumbleweed, hdf5-devel version 1.10.7 and blosc-devel version 1.21.1. When I go about actually serializing the data either an attribute or a dataset, theunwrap
fails with nothing more thanunknown library error
.Even with
RUST_BACKTRACE=full
and running a debug build, I get no pointers as to where in the hdf5 library the error happens (full backtrace at the bottom of this issue). The exact line of the error happens either on the attribute or dataset writing, whichever happens first, e.g.Since this is my first time using this library, it's quite likely that I'm using it incorrectly. At the top of my serialization function, I call
blosc_set_nthreads(4);
and then, every builder initialization is like so:let builder = run_group.new_dataset_builder().blosc_zstd(9, true);
Solution
I've found that by removing all references to blosc, the serialization is successful, and all of the data is present.
Backtrace