Skip to content

Commit bdd6ef4

Browse files
committed
Try using reformulated ARK timestepper
1 parent 327e5b3 commit bdd6ef4

File tree

6 files changed

+40
-8
lines changed

6 files changed

+40
-8
lines changed

.buildkite/longruns/pipeline.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ steps:
1919
key: "init_cpu_env"
2020
command:
2121
- echo "--- Instantiate project"
22+
- "julia --project -e 'using Pkg; Pkg.add(;url=\"https://github.com/CliMA/ClimaTimeSteppers.jl\", rev=\"dy/reformulation\")'"
2223
- "julia --project -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
2324
- "julia --project -e 'using Pkg; Pkg.precompile()'"
2425
- "julia --project -e 'using Pkg; Pkg.status()'"
2526

2627
- echo "--- Instantiate"
28+
- "julia --project=examples -e 'using Pkg; Pkg.add(;url=\"https://github.com/CliMA/ClimaTimeSteppers.jl\", rev=\"dy/reformulation\")'"
2729
- "julia --project=examples -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
2830
- "julia --project=examples -e 'using Pkg; Pkg.precompile()'"
2931
- "julia --project=examples -e 'using CUDA; CUDA.precompile_runtime()'"
@@ -64,6 +66,17 @@ steps:
6466
slurm_time: 24:00:00
6567
env:
6668
JOB_NAME: "longrun_ssp_bw_rhoe_equil_highres"
69+
70+
- label: ":computer: SSP baroclinic wave (ρe_tot) no lim equilmoist high resolution centered diff"
71+
command:
72+
- "srun julia --project=examples examples/hybrid/driver.jl --config_file $CONFIG_PATH/$$JOB_NAME.yml"
73+
artifact_paths: "$$JOB_NAME/output_active/*"
74+
agents:
75+
slurm_ntasks: 32
76+
slurm_nodes: 2
77+
slurm_time: 24:00:00
78+
env:
79+
JOB_NAME: "longrun_ssp_bw_rhoe_equil_highres_no_lim"
6780

6881
- label: ":computer: aquaplanet equilmoist clearsky radiation + prognostic edmf diffusion only + 0M microphysics"
6982
command:

.buildkite/longruns_gpu/pipeline.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ steps:
2222
key: "init_gpu_env"
2323
command:
2424
- echo "--- Instantiate examples"
25+
- "julia --project=examples -e 'using Pkg; Pkg.add(;url=\"https://github.com/CliMA/ClimaTimeSteppers.jl\", rev=\"dy/reformulation\")'"
2526
- julia --project=examples -e 'using Pkg; Pkg.instantiate(;verbose=true)'
2627
- julia --project=examples -e 'using Pkg; Pkg.precompile()'
2728
- julia --project=examples -e 'using CUDA; CUDA.precompile_runtime()'

.buildkite/pipeline.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,20 @@ steps:
2424
- "echo $$JULIA_DEPOT_PATH"
2525

2626
- echo "--- Instantiate project"
27+
- "julia --project -e 'using Pkg; Pkg.add(;url=\"https://github.com/CliMA/ClimaTimeSteppers.jl\", rev=\"dy/reformulation\")'"
2728
- "julia --project -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
2829
- "julia --project -e 'using Pkg; Pkg.precompile()'"
2930
- "julia --project -e 'using Pkg; Pkg.status()'"
3031

3132
- echo "--- Instantiate examples"
33+
- "julia --project=examples -e 'using Pkg; Pkg.add(;url=\"https://github.com/CliMA/ClimaTimeSteppers.jl\", rev=\"dy/reformulation\")'"
3234
- "julia --project=examples -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
3335
- "julia --project=examples -e 'using Pkg; Pkg.precompile()'"
3436
- "julia --project=examples -e 'using CUDA; CUDA.precompile_runtime()'"
3537
- "julia --project=examples -e 'using Pkg; Pkg.status()'"
3638

3739
- echo "--- Instantiate perf"
40+
- "julia --project=perf -e 'using Pkg; Pkg.add(;url=\"https://github.com/CliMA/ClimaTimeSteppers.jl\", rev=\"dy/reformulation\")'"
3841
- "julia --project=perf -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
3942
- "julia --project=perf -e 'using Pkg; Pkg.precompile()'"
4043
- "julia --project=perf -e 'using Pkg; Pkg.status()'"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
dt_save_state_to_disk: "10days"
2+
initial_condition: "MoistBaroclinicWave"
3+
z_elem: 45
4+
dt: "150secs"
5+
t_end: "100days"
6+
dz_bottom: 30.0
7+
h_elem: 16
8+
ode_algo: "SSP333"
9+
precip_model: "0M"
10+
job_id: "longrun_ssp_bw_rhoe_equil_highres_no_lim"
11+
moist: "equil"
12+
apply_limiter: false
13+
diagnostics:
14+
- short_name: [pfull, wa, va, rv, hus]
15+
period: 1days

post_processing/ci_plots.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,7 @@ LongMoistBaroWavePlots = Union{
700700
Val{:longrun_bw_rhoe_equil_highres},
701701
Val{:longrun_zalesak_tracer_energy_bw_rhoe_equil_highres},
702702
Val{:longrun_ssp_bw_rhoe_equil_highres},
703+
Val{:longrun_ssp_bw_rhoe_equil_highres_no_lim},
703704
Val{:longrun_bw_rhoe_equil_highres_topography_earth},
704705
}
705706

src/solver/type_getters.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,13 @@ function get_surface_setup(parsed_args)
367367
end
368368

369369
is_explicit_CTS_algo_type(alg_or_tableau) =
370-
alg_or_tableau <: CTS.ERKAlgorithmName
370+
alg_or_tableau <: CTS.RKAlgorithmName
371371

372-
is_imex_CTS_algo_type(alg_or_tableau) =
373-
alg_or_tableau <: CTS.IMEXARKAlgorithmName
372+
is_imex_CTS_algo_type(alg_or_tableau) = alg_or_tableau <: CTS.ARKAlgorithmName
374373

375374
is_implicit_type(alg_or_tableau) = is_imex_CTS_algo_type(alg_or_tableau)
376375

377-
is_imex_CTS_algo(::CTS.IMEXAlgorithm) = true
376+
is_imex_CTS_algo(::CTS.ARKAlgorithm) = true
378377
is_imex_CTS_algo(::SciMLBase.AbstractODEAlgorithm) = false
379378

380379
is_implicit(ode_algo) = is_imex_CTS_algo(ode_algo)
@@ -427,7 +426,7 @@ function ode_configuration(::Type{FT}, parsed_args) where {FT}
427426
@info "Using ODE config: `$alg_or_tableau`"
428427

429428
if is_explicit_CTS_algo_type(alg_or_tableau)
430-
return CTS.ExplicitAlgorithm(alg_or_tableau())
429+
return CTS.RKAlgorithm(alg_or_tableau())
431430
elseif !is_implicit_type(alg_or_tableau)
432431
return alg_or_tableau()
433432
elseif is_imex_CTS_algo_type(alg_or_tableau)
@@ -459,7 +458,7 @@ function ode_configuration(::Type{FT}, parsed_args) where {FT}
459458
nothing
460459
end,
461460
)
462-
return CTS.IMEXAlgorithm(alg_or_tableau(), newtons_method)
461+
return CTS.ARKAlgorithm(alg_or_tableau(), newtons_method)
463462
else
464463
return alg_or_tableau(; linsolve = linsolve!)
465464
end
@@ -525,8 +524,8 @@ function args_integrator(parsed_args, Y, p, tspan, ode_algo, callback)
525524
# Can we just pass implicit_tendency! and jac_prototype etc.?
526525
lim! = limiters_func!,
527526
dss!,
528-
post_explicit! = set_precomputed_quantities!,
529-
post_implicit! = set_precomputed_quantities!,
527+
pre_newton_iteration! = set_precomputed_quantities!, # TODO: set_implicit_precomputed_quantities!
528+
post_stage! = set_precomputed_quantities!,
530529
)
531530
else
532531
SciMLBase.SplitFunction(implicit_func, remaining_tendency!)

0 commit comments

Comments
 (0)