Skip to content

Commit

Permalink
add issue1179 test
Browse files Browse the repository at this point in the history
  • Loading branch information
lxvm committed Nov 20, 2024
1 parent 2940529 commit d159ce6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/apilock.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Pkg, Test
@testset "issue1179" begin
@test try
run(`$(Base.julia_cmd()) --project=$(dirname(Pkg.project().path)) -t 6 $(joinpath(@__DIR__, "issue1179.jl"))`)
true
catch err
@info err
false
end
end
13 changes: 13 additions & 0 deletions test/issue1179.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using HDF5

T = ComplexF64
# T = Float64 # OK
sizes = (100, 100, 100)
Threads.@threads for i in 1:Threads.nthreads()
h5open("file$i.hdf5", "w") do h5
d = create_dataset(h5, "rand", T, sizes)
for n in 1:sizes[3]
d[:,:,n] = rand(T, sizes[1:2])
end
end
end
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ end
@debug "virtual datasets"
include("virtual_dataset.jl")
end
@debug "api lock"
include("apilock.jl")

# basic MPI tests, for actual parallel tests we need to run in MPI mode
include("mpio.jl")
Expand Down

0 comments on commit d159ce6

Please sign in to comment.