Skip to content

Commit

Permalink
canopy implicit timestepper
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdeck committed Aug 15, 2024
1 parent 4645ae3 commit aa327e9
Show file tree
Hide file tree
Showing 20 changed files with 1,451 additions and 405 deletions.
233 changes: 118 additions & 115 deletions .buildkite/Manifest.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .buildkite/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
ClimaAnalysis = "29b5916a-a76c-4e73-9657-3c8fd22e65e6"
ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
ClimaDiagnostics = "1ecacbb8-0713-4841-9a07-eb5aa8a2d53f"
ClimaCoreMakie = "908f55d8-4145-4867-9c14-5dad1a479e4d"
ClimaDiagnostics = "1ecacbb8-0713-4841-9a07-eb5aa8a2d53f"
ClimaLand = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
ClimaTimeSteppers = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
Expand Down
9 changes: 9 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ steps:
env:
CLIMACOMMS_DEVICE: "CUDA"

- label: "Canopy Implicit Stepping GPU"
command: "julia --color=yes --project=.buildkite experiments/standalone/Vegetation/timestep_test.jl"
artifact_paths: "experiments/standalone/Vegetation/errors.png"
agents:
slurm_ntasks: 1
slurm_gres: "gpu:1"
env:
CLIMACOMMS_DEVICE: "CUDA"

- group: "ClimaLandSimulations"
steps:
- label: "Ozark figures Makie"
Expand Down
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ ArtifactWrappers = "0.2"
CSV = "0.10"
CUDA = "5.3"
ClimaComms = "0.5.6, 0.6"
ClimaCore = "0.13.2, 0.14"
ClimaDiagnostics = "0.2"
ClimaParams = "0.10.2"
ClimaUtilities = "0.1.2"
Expand Down
472 changes: 262 additions & 210 deletions docs/Manifest.toml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions experiments/benchmarks/land.jl
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ function setup_simulation(; greet = false)
Δt = 900.0
nelements = (101, 15)
if greet
@info "Run: Global RichardsModel"
@info "Run: Global Land Model"
@info "Resolution: $nelements"
@info "Timestep: $Δt s"
@info "Duration: $(tf - t0) s"
Expand All @@ -612,12 +612,12 @@ function setup_simulation(; greet = false)
prob, cb = setup_prob(t0, tf, Δt; nelements)

# Define timestepper and ODE algorithm
stepper = CTS.ARS343()
stepper = CTS.ARS111()
ode_algo = CTS.IMEXAlgorithm(
stepper,
CTS.NewtonsMethod(
max_iters = 1,
update_j = CTS.UpdateEvery(CTS.NewTimeStep),
max_iters = 6,
update_j = CTS.UpdateEvery(CTS.NewNewtonIteration),
),
)
return prob, ode_algo, Δt, cb
Expand All @@ -629,7 +629,7 @@ SciMLBase.solve(prob, ode_algo; dt = Δt, callback = cb)

@info "Starting profiling"
# Stop when we profile for MAX_PROFILING_TIME_SECONDS or MAX_PROFILING_SAMPLES
MAX_PROFILING_TIME_SECONDS = 1000
MAX_PROFILING_TIME_SECONDS = 500
MAX_PROFILING_SAMPLES = 100
time_now = time()
timings_s = Float64[]
Expand Down
5 changes: 1 addition & 4 deletions experiments/integrated/fluxnet/US-Ha1/US-Ha1_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ h_stem = FT(14) # m
t0 = Float64(120 * 3600 * 24)# start mid year to avoid snow

# Time step size:
dt = Float64(40)

# Number of timesteps between saving output:
n = 45
dt = Float64(450)
5 changes: 1 addition & 4 deletions experiments/integrated/fluxnet/US-MOz/US-MOz_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ h_leaf = FT(9.5) # m
t0 = Float64(120 * 3600 * 24)# start mid year to avoid snow

# Time step size:
dt = Float64(450)

# Number of timesteps between saving output:
n = 4
dt = Float64(900)
5 changes: 1 addition & 4 deletions experiments/integrated/fluxnet/US-NR1/US-NR1_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ h_stem = FT(7.5) # m
t0 = Float64(120 * 3600 * 24)# start mid year to avoid snow

# Time step size:
dt = Float64(40)

# Number of timesteps between saving output:
n = 45
dt = Float64(450)
5 changes: 1 addition & 4 deletions experiments/integrated/fluxnet/US-Var/US-Var_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ h_stem = FT(0) # m
t0 = Float64(21 * 3600 * 24)# start day 21 of the year

# Time step size:
dt = Float64(20)

# Number of timesteps between saving output:
n = 45
dt = Float64(900)
6 changes: 3 additions & 3 deletions experiments/integrated/fluxnet/fluxnet_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ N_spinup_days = 30
N_days = N_spinup_days + 30
tf = Float64(t0 + 3600 * 24 * N_days)
t_spinup = Float64(t0 + N_spinup_days * 3600 * 24)
saveat = Array(t_spinup:(n * dt):tf)
saveat = Array(t_spinup:3600:tf)

# Set up timestepper
timestepper = CTS.ARS343();
timestepper = CTS.ARS111();
ode_algo = CTS.IMEXAlgorithm(
timestepper,
CTS.NewtonsMethod(
max_iters = 1,
max_iters = 6,
update_j = CTS.UpdateEvery(CTS.NewNewtonIteration),
),
);
6 changes: 3 additions & 3 deletions experiments/integrated/performance/profile_allocations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,15 @@ imp_tendency! = make_imp_tendency(land);
jacobian! = make_jacobian(land);

# Set up timestepping and simulation callbacks
dt = Float64(150)
dt = Float64(900)
tf = Float64(t0 + 100dt)
saveat = Array(t0:dt:tf)
updateat = Array(t0:dt:tf)
timestepper = CTS.ARS343()
timestepper = CTS.ARS111()
ode_algo = CTS.IMEXAlgorithm(
timestepper,
CTS.NewtonsMethod(
max_iters = 1,
max_iters = 6,
update_j = CTS.UpdateEvery(CTS.NewNewtonIteration),
),
);
Expand Down
Loading

0 comments on commit aa327e9

Please sign in to comment.