Skip to content

Commit c449e9c

Browse files
committed
wip
1 parent 5ad3542 commit c449e9c

File tree

5 files changed

+51
-47
lines changed

5 files changed

+51
-47
lines changed

.buildkite/Manifest-v1.11.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,6 +2024,12 @@ version = "0.4.34"
20242024
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
20252025
SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5"
20262026

2027+
[[deps.PrecompileCI]]
2028+
deps = ["ClimaAtmos", "ClimaComms", "ClimaCore", "ClimaParams", "Logging", "PrecompileTools"]
2029+
path = "PrecompileCI"
2030+
uuid = "76d61242-8ec2-4c91-8455-3234246697a2"
2031+
version = "0.1.0"
2032+
20272033
[[deps.PrecompileTools]]
20282034
deps = ["Preferences"]
20292035
git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f"

.buildkite/PrecompileCI/src/PrecompileCI.jl

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,48 @@ import ClimaComms
66
import ClimaCore: InputOutput, Meshes, Spaces, Quadratures
77
import ClimaParams
88

9-
# @compile_workload begin
10-
# with_logger(NullLogger()) do
11-
# FT = Float32 # Float64?
12-
# h_elem = 6 # 16, 30?
13-
# z_elem = 10 # 30, 31, 63?
14-
# x_elem = y_elem = 2
15-
# x_max = y_max = 1e8
16-
# z_max = FT(30000.0)
17-
# dz_bottom = FT(500) # other values?
18-
# z_stretch = Meshes.HyperbolicTangentStretching(dz_bottom) # Meshes.Uniform()
19-
# bubble = true # false
20-
# parsed_args =
21-
# Dict{String, Any}("topography" => "NoWarp", "topo_smoothing" => false)
22-
# comms_ctx = ClimaComms.context(ClimaComms.CPUSingleThreaded())
23-
# deep = false
9+
@compile_workload begin
10+
with_logger(NullLogger()) do
11+
FT = Float32 # Float64?
12+
h_elem = 6 # 16, 30?
13+
z_elem = 10 # 30, 31, 63?
14+
x_elem = y_elem = 2
15+
x_max = y_max = 1e8
16+
z_max = FT(30000.0)
17+
dz_bottom = FT(500) # other values?
18+
z_stretch = true # Meshes.Uniform()
19+
bubble = true # false
20+
nh_poly = 3 # GLL{4} = nh_poly + 1
21+
context = ClimaComms.context(ClimaComms.CPUSingleThreaded())
22+
deep_atmosphere = false
23+
topography = CA.NoTopography()
24+
params = CA.ClimaAtmosParameters(FT)
25+
radius = CA.Parameters.planet_radius(params)
2426

25-
# # constants
26-
# quad = Quadratures.GLL{4}()
27-
# params = CA.ClimaAtmosParameters(FT)
28-
# radius = CA.Parameters.planet_radius(params)
27+
sphere_grid = CA.SphereGrid(
28+
FT;
29+
context, radius, h_elem, nh_poly, z_elem, z_max, z_stretch,
30+
dz_bottom, bubble, deep_atmosphere,
31+
topography,
32+
)
33+
box_grid = CA.BoxGrid(
34+
FT; context, x_elem, x_max, y_elem, y_max, z_elem, z_max, nh_poly,
35+
z_stretch, dz_bottom, bubble, deep_atmosphere,
36+
periodic_x = true, periodic_y = true, topography,
37+
)
38+
plane_grid = CA.PlaneGrid(
39+
FT; context, x_elem, x_max, z_elem, z_max, nh_poly, z_stretch,
40+
dz_bottom, bubble, deep_atmosphere, periodic_x = true,
41+
topography,
42+
)
43+
column_grid = CA.ColGrid(
44+
FT; context, z_elem, z_max, z_stretch, dz_bottom,
45+
)
2946

30-
# # Sphere
31-
# horz_mesh = CA.cubed_sphere_mesh(; radius, h_elem)
32-
# h_space = CA.make_horizontal_space(horz_mesh, quad, comms_ctx, bubble)
33-
# CA.make_hybrid_spaces(h_space, z_max, z_elem, z_stretch; parsed_args)
47+
for grid in [sphere_grid, box_grid, plane_grid, column_grid]
48+
CA.get_spaces(grid, context)
49+
end
50+
end
51+
end
3452

35-
# # box
36-
# horizontal_mesh = CA.periodic_rectangle_mesh(; x_max, y_max, x_elem, y_elem)
37-
# h_space = CA.make_horizontal_space(horizontal_mesh, quad, comms_ctx, bubble)
38-
# # This is broken
39-
# # CA.make_hybrid_spaces(h_space, z_max, z_elem, z_stretch; parsed_args)
40-
41-
# # plane
42-
# horizontal_mesh = CA.periodic_line_mesh(; x_max, x_elem)
43-
# h_space = CA.make_horizontal_space(horizontal_mesh, quad, comms_ctx, bubble)
44-
# end
45-
# end
46-
47-
end # module Precompile
53+
end # module PrecompileCI

.buildkite/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
2727
NullBroadcasts = "0d71be07-595a-4f89-9529-4065a4ab43a6"
2828
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
2929
Poppler_jll = "9c32591e-4766-534b-9725-b71a8799265b"
30+
PrecompileCI = "76d61242-8ec2-4c91-8455-3234246697a2"
3031
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
3132
Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
3233
ProfileCanvas = "efd6af41-a80b-495e-886c-e51b0c7d77a3"

.buildkite/pipeline.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,7 @@ steps:
2828
- julia --check-bounds=yes -e 'using TOML; @assert TOML.parsefile(".buildkite/Manifest-v1.11.toml")["deps"]["ClimaAtmos"][1]["path"] == ".."'
2929

3030
- echo "--- Instantiate .buildkite"
31-
- julia --project=.buildkite -e '
32-
using Pkg;
33-
Pkg.Registry.update();
34-
Pkg.add(PackageSpec(name="ClimaCore", url="https://github.com/CliMA/ClimaCore.jl", rev="ne/fd_grid"));
35-
Pkg.add(PackageSpec(name="ClimaUtilities", url="https://github.com/CliMA/ClimaUtilities.jl", rev="main"));
36-
Pkg.instantiate();
37-
Pkg.precompile(; strict=true);
38-
using CUDA; CUDA.precompile_runtime();
39-
Pkg.status()
40-
'
31+
- "julia --project=.buildkite -e 'using Pkg; Pkg.instantiate(;verbose=true); Pkg.precompile(;strict=true); using CUDA; CUDA.precompile_runtime(); Pkg.status()'"
4132

4233
agents:
4334
slurm_cpus_per_task: 8

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ArgParse = "1"
4444
Artifacts = "1"
4545
AtmosphericProfilesLibrary = "0.1.7"
4646
ClimaComms = "0.6.9"
47-
ClimaCore = "0.14.37"
47+
ClimaCore = "0.14.43"
4848
ClimaDiagnostics = "0.2.12"
4949
ClimaInterpolations = "0.1.0"
5050
ClimaParams = "1.0.2"

0 commit comments

Comments
 (0)