Skip to content

Commit f923625

Browse files
committed
Try using reformulated ARK timestepper
1 parent e3f8fcd commit f923625

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
@@ -696,6 +696,7 @@ LongMoistBaroWavePlots = Union{
696696
Val{:longrun_bw_rhoe_equil_highres},
697697
Val{:longrun_zalesak_tracer_energy_bw_rhoe_equil_highres},
698698
Val{:longrun_ssp_bw_rhoe_equil_highres},
699+
Val{:longrun_ssp_bw_rhoe_equil_highres_no_lim},
699700
Val{:longrun_bw_rhoe_equil_highres_topography_earth},
700701
}
701702

src/solver/type_getters.jl

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

365365
is_explicit_CTS_algo_type(alg_or_tableau) =
366-
alg_or_tableau <: CTS.ERKAlgorithmName
366+
alg_or_tableau <: CTS.RKAlgorithmName
367367

368-
is_imex_CTS_algo_type(alg_or_tableau) =
369-
alg_or_tableau <: CTS.IMEXARKAlgorithmName
368+
is_imex_CTS_algo_type(alg_or_tableau) = alg_or_tableau <: CTS.ARKAlgorithmName
370369

371370
is_implicit_type(alg_or_tableau) = is_imex_CTS_algo_type(alg_or_tableau)
372371

373-
is_imex_CTS_algo(::CTS.IMEXAlgorithm) = true
372+
is_imex_CTS_algo(::CTS.ARKAlgorithm) = true
374373
is_imex_CTS_algo(::SciMLBase.AbstractODEAlgorithm) = false
375374

376375
is_implicit(ode_algo) = is_imex_CTS_algo(ode_algo)
@@ -423,7 +422,7 @@ function ode_configuration(::Type{FT}, parsed_args) where {FT}
423422
@info "Using ODE config: `$alg_or_tableau`"
424423

425424
if is_explicit_CTS_algo_type(alg_or_tableau)
426-
return CTS.ExplicitAlgorithm(alg_or_tableau())
425+
return CTS.RKAlgorithm(alg_or_tableau())
427426
elseif !is_implicit_type(alg_or_tableau)
428427
return alg_or_tableau()
429428
elseif is_imex_CTS_algo_type(alg_or_tableau)
@@ -455,7 +454,7 @@ function ode_configuration(::Type{FT}, parsed_args) where {FT}
455454
nothing
456455
end,
457456
)
458-
return CTS.IMEXAlgorithm(alg_or_tableau(), newtons_method)
457+
return CTS.ARKAlgorithm(alg_or_tableau(), newtons_method)
459458
else
460459
return alg_or_tableau(; linsolve = linsolve!)
461460
end
@@ -521,8 +520,8 @@ function args_integrator(parsed_args, Y, p, tspan, ode_algo, callback)
521520
# Can we just pass implicit_tendency! and jac_prototype etc.?
522521
lim! = limiters_func!,
523522
dss!,
524-
post_explicit! = set_precomputed_quantities!,
525-
post_implicit! = set_precomputed_quantities!,
523+
pre_newton_iteration! = set_precomputed_quantities!, # TODO: set_implicit_precomputed_quantities!
524+
post_stage! = set_precomputed_quantities!,
526525
)
527526
else
528527
SciMLBase.SplitFunction(implicit_func, remaining_tendency!)

0 commit comments

Comments
 (0)