I then resolved my problem but I forgot to report it in the remote case it could be useful to someone.
The problem was that I wasn't understanding what is given behind the void pointer in the close callback. Pointer that (correct me if I'm wrong) is the same returned by the file_open/file_create callbacks. So one can create a file structure containing all the needed information which will be accessible on the close callback as well. On 17 June 2014 09:39, Nicola Cadenelli <[email protected]> wrote: > First of all thanks for the reply. > > On 16 June 2014 16:32, Mohamad Chaarawi <[email protected]> wrote: >> Can't you duplicate the communicator or add the mpi rank in your file struct? >> is your file structure just the hid_t created by the native plugin? > I didn't define a file struct. I thought that I had to stick with the H5F_t. > The main problem is that I got lost trying to understand how to do my > VOL looking at the native and having as only documentation this RFC > [1]. > >> I am not sure what you are doing exactly, but are you building you plugin on >> top of the native plugin? > Yes for now the idea is that one. > >> You have to implement the GET callback for the file access plist to return >> the file access properties. If you just call the H5Fget_access_plist in your >> code, it will go back to the API call and call the get callback on the >> file_id that you pass. This is the expected behavior of course. If you are >> forwarding things to a server, then the get fapl should send a request to >> your server asking for the fapl to get it back. > Just to be sure, If I implement a function H5VL_myvol_get_fapl as you > said, I should also adapt the set_fapl function so that will send to > the server the information. I'm right or misunderstanding it? > >> The native plugin IS supposed to make internal HDF5 calls, because it is the >> internal HDF5 library plugin :-) > I understood that, but I would you suggest to implement a VOL as part > of the internal library? > >> how can you cast a pointer to an hid_t? >> if your plugin file struct is just the hid_t, you would need something like: >> hid_t file_id = *((hid_t *)file); > You are totally right; this happen when I stop thinking. > In fact, I neither know what is given to me behind that void pointer. > If I look at the native VOL I expect a pointer to a H5F_t, is that > always the case? > > Thanks again, > Nicola. > [1] > https://fossies.org/linux/misc/hdf5-1.9.183_docs.tar.gz/hdf5-1.9.183_docs/RFCs/HDF5/VOL/2012-05-25-RFC_VOL.docx -- Nicola Cadenelli Phone (IT) +39 334 6550271 Office (DE) +49 2461 6196 475 Skype: nicolacdnll _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
