Based on your code, you're creating two top level groups, not a sub-group as you want to. Presumably it should read
_subgroup = Group(_group.createGroup("/bar"));
Because at the moment your code says _file.createGroup(). Hence the dataset creation fails.
Hi Folks:Im trying to write data to a subgroup /foo/bar.groups created like this:_group = Group(_file.createGroup("/foo"));_subgroup = Group(_file.createGroup("/bar"));i set some attributes on _group, then try to open a dataset:const H5std_string dataset_name("/foo/bar/test");Then i know it fails here: _dataset = _file.createDataSet(dataset_name, PredType::NATIVE_DOUBLE, mspace, cparms);Note, without the subgroup "bar", this works fine (creates and writes to the file under group 'foo').Here is the failure:HDF5-DIAG: Error detected in HDF5 (1.8.16) thread 0: #000: H5D.c line 194 in H5Dcreate2(): unable to create dataset major: Dataset minor: Unable to initialize object #001: H5Dint.c line 453 in H5D__create_named(): unable to create and link to dataset major: Dataset minor: Unable to initialize object #002: H5L.c line 1638 in H5L_link_object(): unable to create new link to object major: Links minor: Unable to initialize object #003: H5L.c line 1882 in H5L_create_real(): can't insert link major: Symbol table minor: Unable to insert object #004: H5Gtraverse.c line 861 in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found #005: H5Gtraverse.c line 755 in H5G_traverse_real(): component not found major: Symbol table minor: Object not foundterminate called after throwing an instance of 'H5::FileIException'*** AbortedAny thoughts?Thanks,Mike-- "It is difficult to say what is impossible, for the dream of yesterday is the hope of today and the reality of tomorrow--Robert H. Goddard."
Hdf-forum is for HDF software users discussion.