From 11bea6373d472aeb0c1357f1d71b22d381029e40 Mon Sep 17 00:00:00 2001 From: zjwegert <60646897+zjwegert@users.noreply.github.com> Date: Fri, 24 May 2024 21:02:59 +1000 Subject: [PATCH] barrier to avoid race condn --- src/Io.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Io.jl b/src/Io.jl index 7cb3912a..778c5fe9 100644 --- a/src/Io.jl +++ b/src/Io.jl @@ -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) arr = to_local_storage(x) map(ranks,arr) do id, arr filename = joinpath(dir,basename(dir)*"_$id.jdl2")