Skip to content

Instantly share code, notes, and snippets.

@carnaval
Created April 23, 2015 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carnaval/4948ce678acd9c03d6ac to your computer and use it in GitHub Desktop.
Save carnaval/4948ce678acd9c03d6ac to your computer and use it in GitHub Desktop.
aaaaa
function F(N)
A = fill(1, N)
B = fill(1, N)
r = []
dt1 = @elapsed (for w in workers(); copy!(B, A); B[1]; end)
dt2 = @elapsed begin
for w in workers()
push!(r, remotecall(w, () -> A[1]))
end
@show map(fetch, r)
end
M = N/(1024*1024)
W = length(workers())
@printf("%.2f / %.2f MB/s\n", W*(M/dt1), W*(M/dt2))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment