/* * This program shows the concept of "mounting files". * Program creates one file with group G in it, and another * file with dataset D. Then second file is mounted in the first one * under the "mounting point" G. Dataset D is accessed in the first file * under name /G/D and data is printed out. */ #include "hdf5.h" #define FILE1 "mount1.h5" #define FILE2 "mount2.h5" #define RANK 2 #define NX 4 #define NY 5 int main(void) { hid_t fid1, fid2, gid; /* Files and group identifiers */ hid_t did, tid, sid; /* Dataset and datatype identifiers */ herr_t status; hsize_t dims[] = {NX,NY}; /* Dataset dimensions */ int i, j; int bm[NX][NY], bm_out[NX][NY]; /* Data buffers */ /* * Initialization of buffer matrix "bm" */ for(i =0; i