Hi Long,

On Jun 20, 2013, at 8:20 PM, long zhao <[email protected]> wrote:

> I could create a simple file in memory by 
> 
> fapl = H5Pcreate(H5P_FILE_ACCESS);
> H5Pset_fapl_core(fapl,1024,0);
> file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
> 
> And I want to use H5Fopen to get this file in memory.
> file = H5Fopen(H5FILE_NAME, H5F_ACC_RDWR, fapl);
> 
> But I failed. 
> The error is:
> HDF5-DIAG: Error detected in HDF5 (1.8.11) thread 0:
>   #000: H5F.c line 1582 in H5Fopen(): unable to open file
>     major: File accessibilty
>     minor: Unable to open file
>   #001: H5F.c line 1271 in H5F_open(): unable to open file: time = Fri Jun 21 
> 03:19:11 2013
> , name = 'Driver_test5.h5', tent_flags = 1
>     major: File accessibilty
>     minor: Unable to open file
>   #002: H5FD.c line 987 in H5FD_open(): open failed
>     major: Virtual File Layer
>     minor: Unable to initialize object
>   #003: H5FDcore.c line 441 in H5FD_core_open(): unable to open file
>     major: File accessibilty
>     minor: Unable to open file
> 
> The document said :The H5FD_CORE driver enables an application to work with a 
> file in memory, speeding reads and writes as no disk access is made.
> 
> How to fix it and What should I do?

        Try using the "file image" routines:

H5Pset_file_image
H5Pget_file_image
H5Pset_file_image_callbacks
H5Pget_file_image_callbacks

        http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html

                Quincey
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to