Thx, Tim,
I have solution but is 2 questions:
1. Whay must be line: /fid["mygroup/A"]=rand(2)/ ?
2.if sum k and l > 9 Julia cant work. Is it to big size for hdf5 or for system (Win7 64 Home Premium) ?


using HDF5
hfi=h5open("bigfile.h5","w")
close(hfi)

k,l=6,3;
fid = h5open("bigfile.h5","r+")
fid["mygroup/A"]=rand(2)
g = fid["mygroup"]
dset = d_create(g, "F", datatype(Float64), dataspace(10^k,10^l))
dset[:,1] = rand(10^k)
h5read("bigfile.h5","mygroup/F",(:,1))
close(fid)
h5read("bigfile.h5","mygroup/F",(:,1:2))

Is OK
but if
k,l=6,4;

julia> close(fid)
HDF5-DIAG: Error detected in HDF5 (1.8.13) thread 0:
#000: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5F.c line 2070 in H5Fclose(): decrementing file ID failed
    major: Object atom
    minor: Unable to close file
#001: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5I.c line 1464 in H5I_dec_app_ref(): can't decrement ID ref c
ount
    major: Object atom
    minor: Unable to decrement reference count
#002: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5F.c line 1847 in H5F_close(): can't close file
    major: File accessibilty
    minor: Unable to close file
#003: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5F.c line 2009 in H5F_try_close(): problems closing file
    major: File accessibilty
    minor: Unable to close file
#004: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5F.c line 1161 in H5F_dest(): low level truncate failed
    major: File accessibilty
    minor: Write failed
#005: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5FD.c line 1895 in H5FD_truncate(): driver truncate request f
ailed
    major: Virtual File Layer
    minor: Can't update object
#006: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5FDsec2.c line 900 in H5FD_sec2_truncate(): unable to extend
file properly
    major: Low-level I/O
    minor: Seek failed
ERROR: Error closing file
 in h5f_close at C:\Users\SAMSUNG2\.julia\v0.3\HDF5\src\plain.jl:1924


julia> h5read("bigfile.h5","mygroup/F",(:,1:2))
HDF5-DIAG: Error detected in HDF5 (1.8.13) thread 0:
#000: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5F.c line 1594 in H5Fopen(): unable to open file
    major: File accessibilty
    minor: Unable to open file
#001: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5F.c line 1385 in H5F_open(): unable to read superblock
    major: File accessibilty
    minor: Read failed
#002: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5Fsuper.c line 353 in H5F_super_read(): unable to load superb
lock
    major: Object cache
    minor: Unable to protect metadata
#003: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5AC.c line 1323 in H5AC_protect(): H5C_protect() failed.
    major: Object cache
    minor: Unable to protect metadata
#004: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5C.c line 3574 in H5C_protect(): can't load entry
    major: Object cache
    minor: Unable to load metadata into cache
#005: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5C.c line 7954 in H5C_load_entry(): unable to load entry
    major: Object cache
    minor: Unable to load metadata into cache
#006: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5Fsuper_cache.c line 471 in H5F_sblock_load(): truncated file
: eof = 8002864, sblock->base_addr = 0, stored_eoa = 80000002864
    major: File accessibilty
    minor: File has been truncated
ERROR: Error opening file bigfile.h5
 in h5f_open at C:\Users\SAMSUNG2\.julia\v0.3\HDF5\src\plain.jl:2023
 in h5open at C:\Users\SAMSUNG2\.julia\v0.3\HDF5\src\plain.jl:554



Paul


W dniu 2015-01-04 o 18:37, Tim Holy pisze:
Do note there are two additional pages of documentation in the doc/ folder.

--Tim

On Sunday, January 04, 2015 06:59:53 AM paul analyst wrote:
Of course, first I read :)
Is there about reading range array. I need to save a range of In analogy to.

A = reshape (1: 120, 15, 8)
h5write ("/ tmp / test2.h5", "mygroup2 / A", A)
data = h5read ("/ tmp / test2.h5", "mygroup2 / A" (2: 3: 15: 3: 5))

Paul


W dniu niedziela, 4 stycznia 2015 14:14:03 UTC+1 użytkownik Tim Holy

napisał:
If I understand correctly, then yes, that's possible. See the HDF5 docs.

--Tim

On Sunday, January 04, 2015 04:25:13 AM paul analyst wrote:
How to overwrite to an existing file, only range of data?
In HDF5 can do this?
I have an array of zeros 10 x 10
I need an existing file owerwrite range rand (5x5), for example.
Existingfile [2: 7.3: 8]
Paul

Reply via email to