Skip to content

Commit

Permalink
Add gpu box limiters job
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Dec 4, 2023
1 parent 30a42ec commit 6756a00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,15 @@ steps:
artifact_paths:
- "examples/hybrid/box/output/box_advection_limiter_gaussian_bells_D0/*"

- label: ":computer: 3D Box limiters advection Gaussian bells GPU"
key: "gpu_box_advection_limiter_gaussian_bells"
command:
- "julia --color=yes --project=examples examples/hybrid/box/limiters_advection.jl gaussian_bells"
artifact_paths:
- "examples/hybrid/box/output/box_advection_limiter_gaussian_bells_D0/*"
agents:
slurm_gpus: 1

- label: ":computer: 3D Box limiters advection slotted spheres"
key: "cpu_box_advection_limiter_slotted_spheres"
command:
Expand Down
7 changes: 5 additions & 2 deletions examples/hybrid/box/limiters_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ convergence_rate(err, Δh) =
# Function space setup
function hvspace_3D(
::Type{FT};
device = ClimaComms.device(),
device,
context = ClimaComms.SingletonCommsContext(device),
xlim = (-2π, 2π),
ylim = (-2π, 2π),
Expand Down Expand Up @@ -187,7 +187,9 @@ end
ENV["GKSwstype"] = "nul"
using ClimaCorePlots, Plots
Plots.GRBackend()
dirname = "box_advection_limiter_$(name(test_case))"
device = ClimaComms.device()
dev_suffix = device isa ClimaComms.CUDADevice ? "_gpu" : ""
dirname = "box_advection_limiter_$(name(test_case))$dev_suffix"

FT = Float64;
params = LimAdvectionParams{FT}();
Expand Down Expand Up @@ -282,6 +284,7 @@ for (k, horz_ne) in enumerate(horz_ne_seq)
# Set up 3D spatial domain - doubly periodic box
cspace, fspace = hvspace_3D(
FT;
device,
Nij = Nij,
xelems = horz_ne,
yelems = horz_ne,
Expand Down

0 comments on commit 6756a00

Please sign in to comment.