Skip to content

Commit

Permalink
barrier to avoid race condn
Browse files Browse the repository at this point in the history
  • Loading branch information
zjwegert committed May 24, 2024
1 parent a0fa593 commit 11bea63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ a set of JLD2 files corresponding to each part.
function psave(dir::AbstractString, x)
ranks = get_parts(x)
i_am_main(ranks) && mkpath(dir)
fetch(ranks)
PartitionedArrays.barrier(ranks)

Check warning on line 46 in src/Io.jl

View check run for this annotation

Codecov / codecov/patch

src/Io.jl#L46

Added line #L46 was not covered by tests
arr = to_local_storage(x)
map(ranks,arr) do id, arr
filename = joinpath(dir,basename(dir)*"_$id.jdl2")
Expand Down

0 comments on commit 11bea63

Please sign in to comment.