Skip to content

Commit

Permalink
Store step info in local db
Browse files Browse the repository at this point in the history
  • Loading branch information
cjuli1 committed Oct 3, 2024
1 parent ee31416 commit 6ee1223
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/local_db.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ get_dist_mp(db::LocalDB) = db.dist_mp
get_dist_sp(db::LocalDB) = db.dist_sp
get_core_main(db::LocalDB) = db.core_main
get_div(db::LocalDB) = db.div
get_t(db::LocalDB) = db.div["t"]::TuLiPa.ProbTime # TODO: Remove?

get_ifm(db::LocalDB) = db.ifm
get_dist_ifm(db::LocalDB) = db.dist_ifm
Expand Down
7 changes: 7 additions & 0 deletions src/prob_util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ function get_states(modelobjects::Vector)
return states
end

# Step info-----------------------------------------------------------------------
function update_stepinfo(t)
db = get_local_db()
db.div["t"] = t
return
end

# Startstates-------------------------------------------------------------------------------------
function update_startstates(stepnr, t)
db = get_local_db()
Expand Down
8 changes: 8 additions & 0 deletions src/run_serial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,14 @@ function step_jules(t, steplength, stepnr, skipmed)
end
end
end

println(t)
println("Step info")
@time begin
@sync for core in cores
@spawnat core update_stepinfo(t)
end
end

println("Startstates")
@time begin
Expand Down

0 comments on commit 6ee1223

Please sign in to comment.