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

JLD fails to load type Complex #108

Closed
waTeim opened this issue Jul 26, 2014 · 3 comments
Closed

JLD fails to load type Complex #108

waTeim opened this issue Jul 26, 2014 · 3 comments

Comments

@waTeim
Copy link

waTeim commented Jul 26, 2014

The following scenario

using HDF5,JLD
testFile = jldopen("test.jld","w")
c = 1 + im;
@Write testFile c
close(testFile)

and then later:

julia> using HDF5, JLD
julia> testFile = jldopen("test.jld","r")
julia> @READ testFile c

Results in the generic error

HDF5-DIAG: Error detected in HDF5 (1.8.11) thread 0:
#000: H5Dio.c line 182 in H5Dread(): can't read data
major: Dataset
minor: Read failed
#1: H5Dio.c line 438 in H5D__read(): unable to set up type info
major: Dataset
minor: Unable to initialize object
#2: H5Dio.c line 939 in H5D__typeinfo_init(): unable to convert between src and dest datatype
major: Dataset
minor: Feature is unsupported
#3: H5T.c line 4525 in H5T_path_find(): no appropriate function for conversion path
major: Datatype
minor: Unable to initialize object
ERROR: Error reading dataset /c
in error at error.jl:22
in h5d_read at /Users/jeffw/.julia/v0.3/HDF5/src/plain.jl:1690
in read at /Users/jeffw/.julia/v0.3/HDF5/src/plain.jl:1207
in getrefs at /Users/jeffw/.julia/v0.3/HDF5/src/jld.jl:433
in read at /Users/jeffw/.julia/v0.3/HDF5/src/jld.jl:404
in read at /Users/jeffw/.julia/v0.3/HDF5/src/jld.jl:263
in read at /Users/jeffw/.julia/v0.3/HDF5/src/jld.jl:218

Environment Stuff

julia> versioninfo()
Julia Version 0.3.0-rc1+87
Commit f9beea5 (2014-07-19 02:59 UTC)
Platform Info:
System: Linux (x86_64-linux-gnu)
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4800+
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Opteron)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3

julia> Pkg.status()
7 required packages:

  • DataFrames 0.5.7
  • Datetime 0.1.6
  • Distributions 0.5.4
  • Graphs 0.4.3
  • HDF5 0.2.25+ master
  • Meddle 0.0.5
  • Memoize 0.0.0
    18 additional packages:
  • ArrayViews 0.4.6
  • BinDeps 0.2.14
  • Calendar 0.4.2
  • DataArrays 0.2.0
  • DataStructures 0.3.1
  • FactCheck 0.1.2
  • GZip 0.2.13
  • GnuTLS 0.0.1
  • HttpCommon 0.0.5
  • HttpParser 0.0.9
  • HttpServer 0.0.7
  • ICU 0.4.1
  • Nettle 0.1.4
  • PDMats 0.2.2
  • Reexport 0.0.1
  • SortingAlgorithms 0.0.1
  • StatsBase 0.6.3
  • URIParser 0.0.2

julia>

hdf5 version: hdf5-1.8.13

h5ls --verbose test.jld
Opened "test.jld" with sec2 driver.
_require Dataset {NULL}
Attribute: dims {1}
Type: native long
Data: 0
Attribute: julia\ type scalar
Type: 53-byte null-terminated ASCII string
Data: "Core.Array{Union(Core.ASCIIString,Core.UTF8String),1}"
Location: 1:800
Links: 1
Storage: 0 logical bytes, 0 allocated bytes
Type: variable-length null-terminated UTF-8 string
c Dataset {2/2}
Attribute: julia\ type scalar
Type: 24-byte null-terminated ASCII string
Data: "Base.Complex{Core.Int64}"
Location: 1:1472
Links: 1
Storage: 16 logical bytes, 16 allocated bytes, 100.00% utilization
Type: native long

@timholy
Copy link
Member

timholy commented Jul 26, 2014

Thanks for the comprehensive report. Should be fixed now if you do Pkg.update().

@waTeim
Copy link
Author

waTeim commented Jul 26, 2014

Reconfirmed fixed in 0.2.26 for me on retest both OS/X and Linux.
BTW, did you just fix this in 1 day?

@timholy
Copy link
Member

timholy commented Jul 26, 2014

Great, thanks!

Fortunately, this one wasn't too hard to fix.

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