Skip to content

Commit

Permalink
WIP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luraess committed Feb 29, 2024
1 parent be72361 commit 57daa36
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_distributed_writers_3D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ for backend in backends
fname = "test_d.h5"
(me == 0) && (isfile(fname) && run(`rm $fname`))
write_h5(arch, grid_g, fname, fields)
@info "here 1 me=$me"
end
@testset "read h5" begin
fname = "test_d.h5"
Expand All @@ -85,26 +86,32 @@ for backend in backends
copyto!(Fa_v, interior(Fa_l))
copyto!(Fb_v, interior(Fb_l))
KernelAbstractions.synchronize(backend)
@info "here 2 me=$me"
gather!(Fa_g, Fa_v, comm)
gather!(Fb_g, Fb_v, comm)
@info "here 3 me=$me"
if me == 0
@test all(Fa_g .== h5read(fname, "Fa"))
@test all(Fb_g .== h5read(fname, "Fb"))
isfile(fname) && run(`rm $fname`)
@info "here 4 me=$me"
end
end
@info "here 5 me=$me"
@testset "write xdmf3" begin
if me == 0
fname = "test_d.xdmf3"
isfile(fname) && run(`rm $fname`)
write_xdmf(arch, grid_g, fname, fields, "test_d.h5")
@info "here 6 me=$me"
end
end
@testset "read xdmf3" begin
if me == 0
fname = "test_d.xdmf3"
@test XML_ref == string(parse_file(fname))
isfile(fname) && run(`rm $fname`)
@info "here 7 me=$me"
end
end
end
Expand Down

0 comments on commit 57daa36

Please sign in to comment.