-
-
Save carnaval/4948ce678acd9c03d6ac to your computer and use it in GitHub Desktop.
aaaaa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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