-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
3,211 additions
and
88 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# HPCMod Examples | ||
|
||
Below we will point to jupyter notebooks example, for plain julia files see [plain_jl](plain_jl/). | ||
|
||
|
||
## Simple Ten Node Cluster: Jobs Traces Replay | ||
|
||
|
||
* [Job Trace Replay](jupyter/simple_job_trace_replay.ipynb) | ||
* [Compute Tasks](jupyter/simple_models.ipynb) |
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
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# HPCMod Example | ||
# Check the backfiller effect | ||
# | ||
|
||
using Agents | ||
using DataFrames | ||
using Tidier | ||
using Random | ||
using HPCMod | ||
|
||
function run_sim(;scheduler_backfill=true, rng=Random.Xoshiro(123)) | ||
sim = Simulation(;rng) | ||
|
||
add_resource!( | ||
sim; | ||
nodes=10, | ||
max_nodes_per_job=4, | ||
max_time_per_job=24*3, | ||
scheduler_backfill) | ||
|
||
for n in 1:18 | ||
user = User( | ||
sim; | ||
max_concurrent_tasks=2 | ||
) | ||
CompTask(sim, user.id; nodetime=100, nodes_prefered=4, walltime_prefered=50) | ||
CompTask(sim, user.id; nodetime=100, nodes_prefered=4, walltime_prefered=50) | ||
CompTask(sim, user.id; nodetime=100, nodes_prefered=4, walltime_prefered=50) | ||
CompTask(sim, user.id; nodetime=100, nodes_prefered=4, walltime_prefered=50) | ||
end | ||
|
||
for n in 1:2 | ||
user = User( | ||
sim; | ||
max_concurrent_tasks=2 | ||
) | ||
CompTask(sim, user.id; nodetime=100, nodes_prefered=2, walltime_prefered=50) | ||
CompTask(sim, user.id; nodetime=100, nodes_prefered=2, walltime_prefered=50) | ||
CompTask(sim, user.id; nodetime=100, nodes_prefered=2, walltime_prefered=50) | ||
CompTask(sim, user.id; nodetime=100, nodes_prefered=2, walltime_prefered=50) | ||
end | ||
|
||
run!(sim; nsteps=2000) | ||
|
||
timeunits_per_day = sim.timeunits_per_day | ||
mdf = @chain sim.mdf begin | ||
@filter(used_nodes > 0) | ||
@summarise begin | ||
mean_used_nodes = mean(used_nodes) | ||
sd_used_nodes = std(used_nodes) | ||
max_time = maximum(time) | ||
end | ||
@mutate max_days = max_time / !!timeunits_per_day | ||
end | ||
println(mdf) | ||
return sim | ||
end | ||
|
||
sim_bf = run_sim(;scheduler_backfill=true); | ||
sim_nobf = run_sim(;scheduler_backfill=false); | ||
|
File renamed without changes.
File renamed without changes.
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
This file was deleted.
Oops, something went wrong.
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
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