Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dump names do not work corectly #109

Closed
programistawpf opened this issue Dec 14, 2016 · 3 comments
Closed

dump names do not work corectly #109

programistawpf opened this issue Dec 14, 2016 · 3 comments

Comments

@programistawpf
Copy link

I need take size of matrix D i n this file D.jld

           _

_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: http://docs.julialang.org
_ _ | | __ _ | Type "?help" for help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 0.4.5 (2016-03-18 00:58 UTC)
/ |_'|||_'_| | Official http://julialang.org/ release
|__/ | x86_64-w64-mingw32

julia> using JLD

julia> fid=jldopen("D.jld")
Julia data file version 0.1.1: D.jld

julia> dump(fid)
JLD.JldFile
plain: HDF5.HDF5File len 1
_creator: HDF5.HDF5Group len 5
ENDIAN_BOM: HDF5Dataset () : 67305985
JULIA_MAJOR: HDF5Dataset () : 0
JULIA_MINOR: HDF5Dataset () : 4
JULIA_PATCH: HDF5Dataset () : 5
WORD_SIZE: HDF5Dataset () : 64
version: VersionNumber
major: Int64 0
minor: Int64 1
patch: Int64 1
prerelease: Tuple{} ()
build: Tuple{} ()
toclose: Bool true
writeheader: Bool false
mmaparrays: Bool false
compatible: Bool false
compress: Bool false
h5jltype: Dict{Int64,Type{T}} len 0
jlh5type: Dict{Type{T},JLD.JldDatatype} len 0
jlref: Dict{HDF5.HDF5ReferenceObj,WeakRef} len 0
truncatemodules: Array(Union{ASCIIString,UTF8String},(0,)) Union{ASCIIString,UTF8String}[]
gref: #undef
nrefs: Int64 0

julia> names(fid)
0-element Array{ByteString,1}

julia> size(fid["D"])
HDF5-DIAG: Error detected in HDF5 (1.8.13) thread 0:
#000: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5O.c line 246 in H5Oopen(): unable to open object
major: Symbol table
minor: Can't open object
#1: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5O.c line 1357 in H5O_open_name(): object not found
major: Symbol table
minor: Object not found
#2: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5Gloc.c line 430 in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
#3: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5Gtraverse.c line 861 in H5G_traverse(): internal path traversal fa
iled
major: Symbol table
minor: Object not found
#4: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5Gtraverse.c line 641 in H5G_traverse_real(): traversal operator fa
iled
major: Symbol table
minor: Callback failed
#5: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5Gloc.c line 385 in H5G_loc_find_cb(): object 'D' doesn't exist
major: Symbol table
minor: Object not found
ERROR: Error opening object //D
in error at error.jl:22

Paul

@simonster
Copy link
Member

It looks like there is no object named "D" in that file. Do you have evidence to suggest otherwise?

@programistawpf
Copy link
Author

Is true,
But in this file exist sparse matrix D . How how to get size of D sparscematrix ?

           _

_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: http://docs.julialang.org
_ _ | | __ _ | Type "help()" for help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 0.3.12 (2015-10-26 12:41 UTC)
/ |_'|||_'_| | Official http://julialang.org/ release
|__/ | x86_64-w64-mingw32

julia> using JLD

julia> fid=jldopen("D.jld")
Julia data file version 0.1.1: D.jld

julia> dump(fid)
JldFile
plain: HDF5File len 4
D: HDF5Dataset () : HDF5Compound(Uint8[0xdc,0x54,0x0e,0x00,0x00,0x00,0x00,0x00,0x25,0x00 0x00,0x00,0x48,0x10,0xd8
,0x06,0x00,0x00,0x00,0x00],Type[Int64,Int64,HDF5ReferenceObj,HDF5ReferenceObj,HDF5ReferenceObj],ASCIIString["m_","n_","c
olptr_","rowval_","nzval_"],Uint64[0x0000000000000000,0x0000000000000008,0x0000000000000010,0x0000000000000018,0x0000000
000000020])
creator: HDF5Group len 5
ENDIAN_BOM: HDF5Dataset () : 67305985
JULIA_MAJOR: HDF5Dataset () : 0
JULIA_MINOR: HDF5Dataset () : 3
JULIA_PATCH: HDF5Dataset () : 12
WORD_SIZE: HDF5Dataset () : 64
refs: HDF5Group len 3
00000001: HDF5Dataset (38,) : [1,5026,744369,745061,745061
00000002: HDF5Dataset (14352015,) : [265,281,687,890,1003
00000003: HDF5Dataset (14352015,) : [2,2,2,3,2
types: HDF5Group len 1
00000001: HDF5Datatype
id: Int32 50332010
toclose: Bool true
file: HDF5File len 4
D: HDF5Dataset () : HDF5Compound(Uint8[0xdc,0x54,0x0e,0x00,0x00,0x00,0x00,0x00,0x25,0x00 0x00,0x00,0x48,0x1
0,0xd8,0x06,0x00,0x00,0x00,0x00],Type[Int64,Int64,HDF5ReferenceObj,HDF5ReferenceObj,HDF5ReferenceObj],ASCIIString["m
","
n
","colptr
","rowval_","nzval_"],Uint64[0x0000000000000000,0x0000000000000008,0x0000000000000010,0x0000000000000018,0x0
000000000000020])
_creator: HDF5Group len 5
_refs: HDF5Group len 3
_types: HDF5Group len 1
version: VersionNumber
major: Int64 0
minor: Int64 1
patch: Int64 1
prerelease: () ()
build: () ()
toclose: Bool true
writeheader: Bool false
mmaparrays: Bool false
compatible: Bool false
compress: Bool false
h5jltype: Dict{Int64,Type{T<:Top}} len 0
jlh5type: Dict{Type{T<:Top},JldDatatype} len 0
jlref: Dict{HDF5ReferenceObj,WeakRef} len 0
truncatemodules: Array(Union(ASCIIString,UTF8String),(0,)) Union(ASCIIString,UTF8String)[]
gref: #undef
nrefs: Int64 665963

julia> size(fid)
ERROR: size has no method matching size(::JldFile)

julia> size(fid[D])
ERROR: D not defined

julia> size(fid["D"])
()

julia> D=load("D.jld","D")
939228x37 sparse matrix with 14352015 Int64 entries:
[265 , 1] = 2
[281 , 1] = 2
[687 , 1] = 2
[890 , 1] = 3
[1003 , 1] = 2
[1241 , 1] = 2
[1308 , 1] = 2
[1462 , 1] = 3
[1706 , 1] = 2
[1786 , 1] = 2
[1922 , 1] = 2
[2020 , 1] = 2
[2247 , 1] = 2
[2264 , 1] = 3
[2293 , 1] = 2
[2297 , 1] = 2
[2461 , 1] = 2
?
[939198, 37] = 1
[939200, 37] = 1
[939201, 37] = 1
[939202, 37] = 1
[939206, 37] = 1
[939208, 37] = 1
[939209, 37] = 1
[939210, 37] = 1
[939211, 37] = 1
[939212, 37] = 1
[939213, 37] = 1
[939214, 37] = 1
[939215, 37] = 1
[939217, 37] = 1
[939219, 37] = 1
[939221, 37] = 1
[939225, 37] = 1
[939227, 37] = 1

julia>

@simonster
Copy link
Member

Please post further questions to https://discourse.julialang.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants