From f4c0f7a8310242902701f869561a9ad421d25462 Mon Sep 17 00:00:00 2001 From: ConnectedSystems Date: Tue, 2 Jan 2024 11:06:41 +1100 Subject: [PATCH 1/2] Fix for Julia v1.10 - remove initial timer Use of `Timer()` causes precompilation failure. It seems to wait for the timer to finish (or something along those lines). Adjust use of Timer to only become active as users interact with the UI. --- ext/AvizExt/AvizExt.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/AvizExt/AvizExt.jl b/ext/AvizExt/AvizExt.jl index bb8874bfe..06f239bc4 100644 --- a/ext/AvizExt/AvizExt.jl +++ b/ext/AvizExt/AvizExt.jl @@ -523,7 +523,7 @@ function ADRIA.viz.explore(rs::ResultSet) # Trigger update only after some time since last interaction # TODO: Add update notification (spinner animation or something...) - up_timer = Timer(x -> x, 0.25) + # up_timer = Timer(x -> x, 0.25) onany(time_slider.interval, tac_slider.interval, [t.active for t in t_toggles]..., [sld.interval for sld in interv_sliders]...) do time_val, tac_val, rcp45, rcp60, rcp85, c_tog, u_tog, g_tog, intervs... # i1_val, i2_val, i3_val, i4_val, i5_val, i6_val, i7_val, i8_val, i9_val, i10_val, i11_val, i12_val @@ -534,7 +534,9 @@ function ADRIA.viz.explore(rs::ResultSet) tac_bot_val[] = tac_val[1] tac_top_val[] = tac_val[2] - close(up_timer) + if @isdefined up_timer + close(up_timer) + end up_timer = Timer(x -> update_disp(time_val, tac_val, rcp45, rcp60, rcp85, c_tog, u_tog, g_tog, intervs...), 2) end @@ -543,6 +545,7 @@ function ADRIA.viz.explore(rs::ResultSet) # DataInspector() wait(gl_screen) + # close(up_timer) end function ADRIA.viz.explore(rs_path::String) return ADRIA.viz.explore(load_results(rs_path)) From 2673224961e4444337db58163cf5209708e81cd0 Mon Sep 17 00:00:00 2001 From: Takuya Iwanaga Date: Tue, 9 Jan 2024 09:44:38 +1100 Subject: [PATCH 2/2] Disable precompilation workload for now --- src/ADRIA.jl | 58 ++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/ADRIA.jl b/src/ADRIA.jl index 386ad37c8..aa898b7b4 100644 --- a/src/ADRIA.jl +++ b/src/ADRIA.jl @@ -167,34 +167,34 @@ if ccall(:jl_generating_output, Cint, ()) == 1 end -@setup_workload begin - # Putting some things in `setup` can reduce the size of the - # precompile file and potentially make loading faster. - # ADRIA_DIR = pkgdir(ADRIA) - # EXAMPLE_DOMAIN_PATH = joinpath(ADRIA_DIR, "examples", "Example_domain") - - @compile_workload begin - - # Force precompiling of code that handles distributed infrastructure - addprocs(1) - @everywhere 1 + 1 - - # Compile progress bar - # f() = begin - # @showprogress 1 for _ in 1:10 - # end - # end - # b = redirect_stdout(f, devnull) - - # dom = ADRIA.load_domain(EXAMPLE_DOMAIN_PATH, "45") - # ADRIA.sample(dom, 16) - # ADRIA.model_spec(dom) - - # ENV["ADRIA_DEBUG"] = "false" - # p_df = ADRIA.param_table(dom) - # rs1 = ADRIA.run_scenario(dom, p_df[1, :]) - # delete!(ENV, "ADRIA_DEBUG") - end -end +# @setup_workload begin +# # Putting some things in `setup` can reduce the size of the +# # precompile file and potentially make loading faster. +# # ADRIA_DIR = pkgdir(ADRIA) +# # EXAMPLE_DOMAIN_PATH = joinpath(ADRIA_DIR, "examples", "Example_domain") + +# @compile_workload begin + +# # Force precompiling of code that handles distributed infrastructure +# addprocs(1) +# @everywhere 1 + 1 + +# # Compile progress bar +# # f() = begin +# # @showprogress 1 for _ in 1:10 +# # end +# # end +# # b = redirect_stdout(f, devnull) + +# # dom = ADRIA.load_domain(EXAMPLE_DOMAIN_PATH, "45") +# # ADRIA.sample(dom, 16) +# # ADRIA.model_spec(dom) + +# # ENV["ADRIA_DEBUG"] = "false" +# # p_df = ADRIA.param_table(dom) +# # rs1 = ADRIA.run_scenario(dom, p_df[1, :]) +# # delete!(ENV, "ADRIA_DEBUG") +# end +# end end