Skip to content

Instantly share code, notes, and snippets.

@illerucis
Created December 19, 2013 21:19
Show Gist options
  • Save illerucis/8046435 to your computer and use it in GitHub Desktop.
Save illerucis/8046435 to your computer and use it in GitHub Desktop.
Testing module for parallel computing.
module TestIt
export test_call
function test_call()
test()
end
function test()
rec = {"test_type" => "test_type"}
data = [1, 2, 3, 4]
function red(i...)
times = [i...]
return times
end
times = @parallel (red) for i = 1:10
reptimes = Dict{String, Float64}()
gc()
data_copy = copy(data)
reptimes["Bob"] = 1.2
sorted = @elapsed sort!(data_copy)
@assert issorted(data_copy)
merge(rec, reptimes)
end
println( times )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment