H5Fmount
/ h5fmount_f
to mount the second file (the child file) in the first file.
H5Funmount
/
h5funmount_f
when the work is done.
FILE1 FILE2 -------------------- -------------------- ! ! ! ! ! / ! ! / ! ! | ! ! | ! ! | ! ! | ! ! V ! ! V ! ! -------- ! ! ---------- ! ! ! Group ! ! ! ! Dataset! ! ! --------- ! ! ---------- ! !------------------! !------------------!After mounting
FILE2
under the group in FILE1
,
the parent file has the following structure:
FILE1 -------------------- ! ! ! / ! ! | ! ! | ! ! V ! ! -------- ! ! ! Group ! ! ! --------- ! ! | ! ! | ! ! V ! ! ----------- ! ! ! Dataset ! ! ! !---------- ! ! ! !------------------![ C program ] -
h5_mount.c
mountexample.f90
NOTE: To download a tar file of the examples, including a Makefile,
please go to the References page.
C:
FORTRAN:
Below is a description of another scenario:
Suppose the group
C:
FORTRAN:
Remarks
H5Fmount
/ h5fmount_f
.
If no objects will be modified, the
files can be opened with H5F_ACC_RDONLY
(H5F_ACC_RDONLY_F
in FORTRAN).
If the data is to be modified, the files should be opened with
H5F_ACC_RDWR
(H5F_ACC_RDWR_F
in FORTRAN).
herr_t H5Fmount (hid_t loc_id, const char *dsetname,
hid_t file_id, hid_t access_prp)
h5fmount_f (loc_id, dsetname, file_id, hdferr, access_prp)
loc_id IN: INTEGER (HID_T)
dsetname IN: CHARACTER (LEN=*)
file_id IN: INTEGER (HID_T)
hdferr OUT: INTEGER
access_prp IN: INTEGER (HID_T), OPTIONAL
(Default value: H5P_DEFAULT_F)
/G
in the
specified file. Since the group /G
is in the root
group of the first file, one can also use just G
to
identify it.
G
were a member of
the group H
in the first file.
Then the mount point G
can be specified in
two different ways:
dsetname is H/G
.
H
.
dsetname is G
.
H5P_DEFAULT
, can be used in C.
In FORTRAN, this argument can be omitted or
H5P_DEFAULT_F
can be used.
H5Fmount
returns a non-negative
value if successful and a negative value otherwise.
With the FORTRAN routine, h5fmount_f
,
the return value of the call is returned in hdferr:
0 if successful and -1 otherwise.
D
.
One can also modify data.
If the dataset is modified while the file is mounted, it is
modified in the original file after the file is unmounted.
H5Funmount
/
h5funmount_f
:
herr_t H5Funmount (hid_t loc_id, const char *dsetname)
h5funmount_f (loc_id, dsetname, hdferr)
loc_id IN: INTEGER (HID_T)
dsetname IN: CHARACTER (LEN=*)
hdferr OUT: INTEGER
/G
.
H5Funmount
/ h5funmount_f
does not close files. Files are closed with the respective calls to
the H5Fclose
/ h5fclose_f
function.
h5dump
utility cannot display files in memory.
Therefore, no output of FILE1
after FILE2
was mounted is provided.
The National Center for Supercomputing Applications
University of Illinois
at Urbana-Champaign
hdfhelp@ncsa.uiuc.edu
Last Modified: March 16, 2001