Skip to content

Commit

Permalink
Update to HDF5 v0.16+
Browse files Browse the repository at this point in the history
  • Loading branch information
jmert committed Feb 10, 2022
1 parent 7dd5a4a commit d85b361
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CMB"
uuid = "592991c5-7c29-5f04-aea2-6d9f924ef2a1"
author = ["Justin Willmert <[email protected]>"]
version = "0.3.0"
version = "0.3.1"

[deps]
AssociatedLegendrePolynomials = "2119f1ac-fb78-50f5-8cc0-dda848ebdb19"
Expand All @@ -23,9 +23,9 @@ BitFlags = "0.1"
Compat = "3.25"
FFTW = "1"
FileIO = "1.6"
HDF5 = "0.14, 0.15, 0.16"
JLD = "0.12"
MAT = "0.10"
HDF5 = "0.16"
JLD = "0.13"
MAT = "0.10.3"
Reexport = "0.2, 1"
Requires = "1"
StaticArrays = "0.11, 0.12, 1"
Expand Down
9 changes: 4 additions & 5 deletions src/fileio_hdf5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ end

AT = HDF5.get_jl_type(dset)
HDF5.ismmappable(AT) || error("Cannot mmap datasets of type ", AT)
offset = HDF5.h5d_get_offset(dset)
offset = HDF5.API.h5d_get_offset(dset)

io = open(HDF5.filename(dset), read = true)

Expand Down Expand Up @@ -237,10 +237,9 @@ function write_obsmat(filename, obsmat::SparseMatrixCSC;
h5open(filename, "w"; alignment = (0, align)) do hfile
# Write the sparse matrix
g = create_group(hfile, obsmat_name)
EARLY = HDF5.H5D_ALLOC_TIME_EARLY
g["indptr", alloc_time = EARLY] = indptr
g["indices", alloc_time = EARLY] = indices
g["data", alloc_time = EARLY] = data
g["indptr", alloc_time = :early] = indptr
g["indices", alloc_time = :early] = indices
g["data", alloc_time = :early] = data
a = attributes(g)
a["format"] = "csc"
a["shape"] = [size(obsmat)...]
Expand Down
4 changes: 2 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ TestSetExtensions = "98d24dd4-01ad-11ea-1b02-c9a08f80db04"

[compat]
Documenter = "0.25.2, 0.26, 0.27"
JLD = "0.12"
MAT = "0.10"
JLD = "0.13"
MAT = "0.10.3"

0 comments on commit d85b361

Please sign in to comment.