Skip to content

Commit

Permalink
Removed heterogeneous from CI running
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMair committed Dec 15, 2023
1 parent 0438ad6 commit 2c79515
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions test/runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,25 @@ end
end

@testset "Heterogeneous Running" begin
# Launch two processes with access to 2 threads
ps = addprocs(2; exeflags=["--threads=2"])
database = open_db("runner test"; in_memory=true)
experiment = get_heterogeneous_experiment("heterogeneous distributed execution test", get_heterogeneous_config())

# Launch 2 threads per node
@execute experiment database HeterogeneousMode(2) false directory


trials = get_trials_by_name(database, experiment.name)
for pid in ps
max_threads = maximum([t.results[:num_threads] for t in trials if t.results[:distributed_id] == pid])
max_threads = min(max_threads, length([true for t in trials if t.results[:distributed_id] == pid]))
thread_ids = [t.results[:thread_id] for t in trials if t.results[:distributed_id] == pid]
unique_threads = length(unique(thread_ids))
@test unique_threads == max_threads
if get(ENV, "CI", "false") != "true"
# Launch two processes with access to 2 threads
ps = addprocs(2; exeflags=["--threads=2"])
database = open_db("runner test"; in_memory=true)
experiment = get_heterogeneous_experiment("heterogeneous distributed execution test", get_heterogeneous_config())

# Launch 2 threads per node
@execute experiment database HeterogeneousMode(2) false directory


trials = get_trials_by_name(database, experiment.name)
for pid in ps
max_threads = maximum([t.results[:num_threads] for t in trials if t.results[:distributed_id] == pid])
max_threads = min(max_threads, length([true for t in trials if t.results[:distributed_id] == pid]))
thread_ids = [t.results[:thread_id] for t in trials if t.results[:distributed_id] == pid]
unique_threads = length(unique(thread_ids))
@test unique_threads == max_threads
end
# Cleanup
rmprocs(ps...)
end
# Cleanup
rmprocs(ps...)
end

0 comments on commit 2c79515

Please sign in to comment.