File tree Expand file tree Collapse file tree 4 files changed +19
-19
lines changed Expand file tree Collapse file tree 4 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,12 @@ walltime_in_days(es::EfficiencyStats) = es.walltime * (1 / (24 * 3600)) #=second
21
21
22
22
function timed_solve! (integrator)
23
23
device = ClimaComms. device (integrator. u. c)
24
+ comms_ctx = ClimaComms. context (device)
24
25
local sol
25
- @time " solve!:" begin
26
- walltime = ClimaComms. elapsed (device) do
27
- sol = SciMLBase. solve! (integrator)
28
- end
26
+ walltime = ClimaComms. elapsed (device) do
27
+ sol = SciMLBase. solve! (integrator)
29
28
end
29
+ @info " solve! walltime = $(round (walltime, digits = 3 )) "
30
30
(; tspan) = integrator. sol. prob
31
31
es = EfficiencyStats (tspan, walltime)
32
32
_sypd = simulated_years_per_day (es)
Original file line number Diff line number Diff line change @@ -574,7 +574,6 @@ function get_sim_info(config::AtmosConfig)
574
574
start_date = epoch,
575
575
t_end = t_end,
576
576
)
577
- @show sim. t_end, sim. dt
578
577
n_steps = floor (Int, sim. t_end / sim. dt)
579
578
@info (
580
579
" Time info:" ,
@@ -639,15 +638,17 @@ end
639
638
640
639
import ClimaComms, Logging, NVTX
641
640
function get_comms_context (parsed_args)
642
- device = if parsed_args[" device" ] == " auto"
643
- ClimaComms. device ()
644
- elseif parsed_args[" device" ] == " CUDADevice"
645
- ClimaComms. CUDADevice ()
646
- elseif parsed_args[" device" ] == " CPUMultiThreaded" || Threads. nthreads () > 1
647
- ClimaComms. CPUMultiThreaded ()
648
- else
649
- ClimaComms. CPUSingleThreaded ()
650
- end
641
+ device =
642
+ if ! haskey (parsed_args, " device" ) || parsed_args[" device" ] === " auto"
643
+ ClimaComms. device ()
644
+ elseif parsed_args[" device" ] == " CUDADevice"
645
+ ClimaComms. CUDADevice ()
646
+ elseif parsed_args[" device" ] == " CPUMultiThreaded" ||
647
+ Threads. nthreads () > 1
648
+ ClimaComms. CPUMultiThreaded ()
649
+ else
650
+ ClimaComms. CPUSingleThreaded ()
651
+ end
651
652
comms_ctx = ClimaComms. context (device)
652
653
ClimaComms. init (comms_ctx)
653
654
Original file line number Diff line number Diff line change @@ -689,9 +689,7 @@ function AtmosConfig(
689
689
690
690
all_config_files =
691
691
normrelpath .(maybe_add_default (config_files, default_config_file))
692
-
693
692
configs = map (all_config_files) do config_file
694
- @info " Loading yaml file $config_file "
695
693
strip_help_messages (load_yaml_file (config_file))
696
694
end
697
695
return AtmosConfig (
@@ -726,13 +724,15 @@ function AtmosConfig(
726
724
# using config_files = [default_config_file] as a default
727
725
# relies on the fact that override_default_config uses
728
726
# default_config_file.
729
- config = override_default_config (configs)
727
+ config = merge (configs... )
728
+ comms_ctx = isnothing (comms_ctx) ? get_comms_context (config) : comms_ctx
729
+ config = override_default_config (config)
730
+
730
731
FT = config[" FLOAT_TYPE" ] == " Float64" ? Float64 : Float32
731
732
toml_dict = CP. create_toml_dict (
732
733
FT;
733
734
override_file = CP. merge_toml_files (config[" toml" ]),
734
735
)
735
- comms_ctx = isnothing (comms_ctx) ? get_comms_context (config) : comms_ctx
736
736
config = config_with_resolved_and_acquired_artifacts (config, comms_ctx)
737
737
738
738
isempty (job_id) &&
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ override_default_config(config_dicts::ContainerType(AbstractDict)) =
59
59
override_default_config (merge (config_dicts... ))
60
60
61
61
function override_default_config (:: Nothing )
62
- @info " Using default configuration"
63
62
return default_config_dict ()
64
63
end
65
64
You can’t perform that action at this time.
0 commit comments