Copying objects to externally-linked files

Hello, I'm having trouble copying an object to an exterally-linked hdf5 file.I can copy an object within the same file using H5Ocopy(file_id, "/G4", file_id, "/G1/G4", H5P_DEFAULT, H5P_DEFAULT)I can create external links using H5Lcreate_external("file2.h5", "G2", file_id, "G2", H5P_DEFAULT, H5P_DEFAULT)I can even create a group in the externally-linked file using H5Gcreate(file_id, "/G2/G3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)But I cannot copy to the externally-linked file, as H5Ocopy(file_id, "/G4", file_id, "/G2/G3/G4", H5P_DEFAULT, H5P_DEFAULT) gives me an error. I'm wondering what I'm doing wrong? Or is my version of hdf5 simply out of date?
(Sample code attached) Chris.

testing.c (2.13 KB)

Cris,

Thank you for reporting the issue! Just for reference, could you please tell the version of the HDF5 library you are using? I reproduced the failure with 1.8.16.

The bug report is HDFFV-9772.

Thank you!

Elena

ยทยทยท

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elena Pourmal The HDF Group http://hdfgroup.org
1800 So. Oak St., Suite 203, Champaign IL 61820
217.531.6112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On Mar 31, 2016, at 4:04 PM, Christophe Cornet <ccornchip@hotmail.com<mailto:ccornchip@hotmail.com>> wrote:

Hello,

I'm having trouble copying an object to an exterally-linked hdf5 file.
I can copy an object within the same file using H5Ocopy(file_id, "/G4", file_id, "/G1/G4", H5P_DEFAULT, H5P_DEFAULT)
I can create external links using H5Lcreate_external("file2.h5", "G2", file_id, "G2", H5P_DEFAULT, H5P_DEFAULT)
I can even create a group in the externally-linked file using H5Gcreate(file_id, "/G2/G3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)
But I cannot copy to the externally-linked file, as H5Ocopy(file_id, "/G4", file_id, "/G2/G3/G4", H5P_DEFAULT, H5P_DEFAULT) gives me an error.

I'm wondering what I'm doing wrong? Or is my version of hdf5 simply out of date?

(Sample code attached)

Chris.

<testing.c>_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5