Skip to content

Commit

Permalink
Load and init Extrae on all processes in example script (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano authored May 6, 2024
1 parent 188400d commit 7e00057
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/test-distributed-work.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Distributed
using Extrae

ENV["JULIA_DEBUG"] = Extrae
@everywhere ENV["JULIA_DEBUG"] = Extrae

addprocs(1)

@everywhere using Extrae

@everywhere ENV["JULIA_DEBUG"] = Extrae

function random_sleep()
println("Worker started: ", myid())
sleep(rand((1, 2, 3, 4, 5)))
Expand All @@ -18,7 +18,7 @@ end
end

function test_distributed_work()

@everywhere Extrae.init()
A = rand(1000, 1000)
a1 = @spawnat :any matrix_multiply(A)
a2 = @spawnat :any matrix_multiply(A)
Expand All @@ -29,4 +29,4 @@ end

test_distributed_work()

println("END TEST")
println("END TEST")

0 comments on commit 7e00057

Please sign in to comment.