reading through external link

Hi to all,

I am trying to establish a sandbox application that stores an object inside a file "red/SDS.h5" and creates a link to it in an index file under extlink_prefix_source.h5 in the current directory. Creating the link is no problem. But I have the feeling that the prefix ("red") is not stored alright. Because if I try to read the object through the link, I get a hdf5 stack trace indicating that the target file (here: "red/SDS.h5") is not present.

I attached a sample program that is based on h5_extlink.c from the official tutorial. I'd be grateful, if someone could give me a hand on this one. This is single threaded for now.

Best,
Peter

PS. using gcc 4.9.2 and hdf5 1.8.13. (fc21)

my_h5_extlink.c (15.2 KB)

···

--
Peter Steinbach, Dr. rer. nat.
HPC Developer

Scionics Computer Innovation GmbH
Löscherstr. 16
01309 Dresden
fon: +49 351 210 2882
fax: +49 351 210 1689
http://www.scionics.de

Sitz der Gesellschaft: Dresden (Main office)
Amtsgericht - Registergericht: Dresden HRB 20337 (Commercial Registry)
Ust-IdNr.: DE813263791 (VAT ID Number)
Geschäftsführer: John Duperon, Jeff Oegema (Managing Directors)

Hi to all -

I am still looking into how to traverse through an external link that has (or should have) a prefix attached to it based on the h5_extlink.c example. I attached some code to illustrate what I am trying to do.

I am really stuck as hdf5 reports that prefix_source.h5 was not found, or in other words it forgot that prefix_source.h5 is under a subdirectory!!

In nuce, what I am trying to do is:

1. open a file extlink_prefix_source.h
2. open a group through a link "extlink_prefix_source.h5:/ext_link" which points to "red/prefix_source.h5:/"
3. open a group called "pink" under "red/prefix_source.h5:/"

I'd appreciate your help -
Peter

chkgrp_h5_extlink.zip (2.05 KB)

···

On 07/03/2015 05:42 PM, Peter Steinbach wrote:

Hi to all,

I am trying to establish a sandbox application that stores an object
inside a file "red/SDS.h5" and creates a link to it in an index file
under extlink_prefix_source.h5 in the current directory. Creating the
link is no problem. But I have the feeling that the prefix ("red") is
not stored alright. Because if I try to read the object through the
link, I get a hdf5 stack trace indicating that the target file (here:
"red/SDS.h5") is not present.

I attached a sample program that is based on h5_extlink.c from the
official tutorial. I'd be grateful, if someone could give me a hand on
this one. This is single threaded for now.

Best,
Peter

PS. using gcc 4.9.2 and hdf5 1.8.13. (fc21)

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

small update, if I set:

$ export HDF5_EXT_PREFIX="red/"

and then call the example mentioned in my last mail:

$ ./chkgrp_h5_extlink
[TEST] Testing external link prefixes.
extlink_prefix_source.h5:/ext_link --> prefix_target.h5:/
prefix_target.h5 is in red/
[TEST] Traversal through external prefixed link.
>>extlink_prefix_source.h5<< Ready.
ext_link points to __
SUCCESS ... pink is there!

I get the output as expected. So the only question remains, how do I successfully safe the property set by:

> chkgrp_h5_extlink.c:extlink_prefix_example
gapl_id = H5Pcreate(H5P_GROUP_ACCESS);
H5Pset_elink_prefix(gapl_id, "red/");

into the file that contains the link??

Hope anyone knows this -
Peter

···

On 07/08/2015 09:52 AM, Peter Steinbach wrote:

Hi to all -

I am still looking into how to traverse through an external link that
has (or should have) a prefix attached to it based on the h5_extlink.c
example. I attached some code to illustrate what I am trying to do.

I am really stuck as hdf5 reports that prefix_source.h5 was not found,
or in other words it forgot that prefix_source.h5 is under a subdirectory!!

In nuce, what I am trying to do is:

1. open a file extlink_prefix_source.h
2. open a group through a link "extlink_prefix_source.h5:/ext_link"
which points to "red/prefix_source.h5:/"
3. open a group called "pink" under "red/prefix_source.h5:/"

I'd appreciate your help -
Peter

On 07/03/2015 05:42 PM, Peter Steinbach wrote:

Hi to all,

I am trying to establish a sandbox application that stores an object
inside a file "red/SDS.h5" and creates a link to it in an index file
under extlink_prefix_source.h5 in the current directory. Creating the
link is no problem. But I have the feeling that the prefix ("red") is
not stored alright. Because if I try to read the object through the
link, I get a hdf5 stack trace indicating that the target file (here:
"red/SDS.h5") is not present.

I attached a sample program that is based on h5_extlink.c from the
official tutorial. I'd be grateful, if someone could give me a hand on
this one. This is single threaded for now.

Best,
Peter

PS. using gcc 4.9.2 and hdf5 1.8.13. (fc21)

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

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

Ok, I am using a workaround now by storing the prefix as a string dataaset in the file that contains the external link. (using H5LTmake_dataset_string and friends)

In case someone knows another way to store the prefix required by H5P_set_elink_prefix to traverse the link discussed in my past mails, please let me know.

Best,
P

···

On 07/08/2015 10:10 AM, Peter Steinbach wrote:

small update, if I set:

$ export HDF5_EXT_PREFIX="red/"

and then call the example mentioned in my last mail:

$ ./chkgrp_h5_extlink
[TEST] Testing external link prefixes.
extlink_prefix_source.h5:/ext_link --> prefix_target.h5:/
prefix_target.h5 is in red/
[TEST] Traversal through external prefixed link.
>>extlink_prefix_source.h5<< Ready.
ext_link points to __
SUCCESS ... pink is there!

I get the output as expected. So the only question remains, how do I
successfully safe the property set by:

> chkgrp_h5_extlink.c:extlink_prefix_example
gapl_id = H5Pcreate(H5P_GROUP_ACCESS);
H5Pset_elink_prefix(gapl_id, "red/");

into the file that contains the link??

Hope anyone knows this -
Peter

On 07/08/2015 09:52 AM, Peter Steinbach wrote:

Hi to all -

I am still looking into how to traverse through an external link that
has (or should have) a prefix attached to it based on the h5_extlink.c
example. I attached some code to illustrate what I am trying to do.

I am really stuck as hdf5 reports that prefix_source.h5 was not found,
or in other words it forgot that prefix_source.h5 is under a
subdirectory!!

In nuce, what I am trying to do is:

1. open a file extlink_prefix_source.h
2. open a group through a link "extlink_prefix_source.h5:/ext_link"
which points to "red/prefix_source.h5:/"
3. open a group called "pink" under "red/prefix_source.h5:/"

I'd appreciate your help -
Peter

On 07/03/2015 05:42 PM, Peter Steinbach wrote:

Hi to all,

I am trying to establish a sandbox application that stores an object
inside a file "red/SDS.h5" and creates a link to it in an index file
under extlink_prefix_source.h5 in the current directory. Creating the
link is no problem. But I have the feeling that the prefix ("red") is
not stored alright. Because if I try to read the object through the
link, I get a hdf5 stack trace indicating that the target file (here:
"red/SDS.h5") is not present.

I attached a sample program that is based on h5_extlink.c from the
official tutorial. I'd be grateful, if someone could give me a hand on
this one. This is single threaded for now.

Best,
Peter

PS. using gcc 4.9.2 and hdf5 1.8.13. (fc21)

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

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

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