Hi David, I was able to reproduce this and entered bug HDFFV-9680 for this issue. H5Aread worked but H5Awrite failed. Both work if using H5Aopen_by_name(id, “.”, ….).
Thanks! -Barbara [email protected] From: Hdf-forum [mailto:[email protected]] On Behalf Of David Sent: Tuesday, February 09, 2016 1:54 PM To: HDF Users Discussion List Subject: [Hdf-forum] H5Aopen_by_name bug I'm having a problem using H5Aopen_by_name with a group name. I'm using HDF5 1.8.16. Doesn't work: auto aid = H5::H5Aopen_by_name(file_id, "g1", "a1", H5::H5P_DEFAULT, H5::H5P_DEFAULT); int v = 6; auto r = H5::H5Awrite(aid, type_id, &v); // returns -1 Works: auto group_id = H5::H5Gopen(file_id, "g1", H5::H5P_DEFAULT); auto aid = H5::H5Aopen_by_name(group_id, ".", "a1", H5::H5P_DEFAULT, H5::H5P_DEFAULT); int v = 6; auto r = H5::H5Awrite(aid, type_id, &v); // returns 0
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
