Skip to content

Commit b24f868

Browse files
authored
Merge pull request #954 from CliMA/js/init_ctx
initialize comms contexts
2 parents 1d04084 + 48cd97e commit b24f868

File tree

23 files changed

+37
-26
lines changed

23 files changed

+37
-26
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ main
66
- Run unit tests on GPU, and update code for GPU compatibility
77
(including workaround for ClimaCore type inference failure)
88
PR[#739](https://github.com/CliMA/ClimaLand.jl/pull/739)
9+
- Initialize communications contexts, enabling experiments
10+
to run with MPI.
11+
PR[#954](https://github.com/CliMA/ClimaLand.jl/pull/954)
912

1013
v0.15.6
1114
-------

experiments/benchmarks/bucket.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import Profile, ProfileCanvas
3737
const FT = Float64;
3838

3939
context = ClimaComms.context()
40+
ClimaComms.init(context)
4041
device = ClimaComms.device()
4142
device_suffix = device isa ClimaComms.CPUSingleThreaded ? "cpu" : "gpu"
4243

experiments/benchmarks/land.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import Profile, ProfileCanvas
4747
const FT = Float64;
4848
time_interpolation_method = LinearInterpolation(PeriodicCalendar())
4949
context = ClimaComms.context()
50+
ClimaComms.init(context)
5051
device = ClimaComms.device()
5152
device_suffix = device isa ClimaComms.CPUSingleThreaded ? "cpu" : "gpu"
5253

experiments/benchmarks/richards.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const FT = Float64;
5151

5252
regridder_type = :InterpolationsRegridder
5353
context = ClimaComms.context()
54+
ClimaComms.init(context)
5455
device = ClimaComms.device()
5556
device_suffix = device isa ClimaComms.CPUSingleThreaded ? "cpu" : "gpu"
5657
outdir = "richards_benchmark_$(device_suffix)"

experiments/benchmarks/snowy_land.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ using Test
4444
const FT = Float64
4545
time_interpolation_method = LinearInterpolation(PeriodicCalendar())
4646
context = ClimaComms.context()
47+
ClimaComms.init(context)
4748
device = ClimaComms.device()
4849
device_suffix = device isa ClimaComms.CPUSingleThreaded ? "cpu" : "gpu"
4950
outdir = "snowy_land_benchmark_$(device_suffix)"

experiments/integrated/global/global_soil_canopy.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import ClimaAnalysis.Visualize as viz
2828
import ClimaUtilities
2929
time_interpolation_method = LinearInterpolation(PeriodicCalendar())
3030
context = ClimaComms.context()
31+
ClimaComms.init(context)
3132
outdir = generate_output_path("experiments/integrated/global")
3233

3334
device_suffix =
34-
typeof(ClimaComms.context().device) <: ClimaComms.CPUSingleThreaded ?
35-
"cpu" : "gpu"
35+
typeof(context.device) <: ClimaComms.CPUSingleThreaded ? "cpu" : "gpu"
3636

3737
FT = Float64
3838
earth_param_set = LP.LandParameters(FT)

experiments/integrated/performance/integrated_timestep_test.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ function set_initial_conditions(land, t0)
115115
end
116116

117117
context = ClimaComms.context()
118+
ClimaComms.init(context)
118119
device_suffix =
119-
typeof(ClimaComms.context().device) <: ClimaComms.CPUSingleThreaded ?
120-
"cpu" : "gpu"
120+
typeof(context.device) <: ClimaComms.CPUSingleThreaded ? "cpu" : "gpu"
121121
const FT = Float64
122122
earth_param_set = LP.LandParameters(FT)
123123

experiments/long_runs/bucket.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const FT = Float64;
4444
time_interpolation_method = LinearInterpolation(PeriodicCalendar())
4545
regridder_type = :InterpolationsRegridder
4646
context = ClimaComms.context()
47+
ClimaComms.init(context)
4748
device = ClimaComms.device()
4849
device_suffix = device isa ClimaComms.CPUSingleThreaded ? "cpu" : "gpu"
4950
root_path = "bucket_longrun_$(device_suffix)"

experiments/long_runs/land.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ using Poppler_jll: pdfunite
4848
const FT = Float64;
4949
time_interpolation_method = LinearInterpolation(PeriodicCalendar())
5050
context = ClimaComms.context()
51+
ClimaComms.init(context)
5152
device = ClimaComms.device()
5253
device_suffix = device isa ClimaComms.CPUSingleThreaded ? "cpu" : "gpu"
5354
root_path = "land_longrun_$(device_suffix)"

experiments/long_runs/land_region.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ using Poppler_jll: pdfunite
5050
const FT = Float64;
5151
time_interpolation_method = LinearInterpolation(PeriodicCalendar())
5252
context = ClimaComms.context()
53+
ClimaComms.init(context)
5354
device = ClimaComms.device()
5455
device_suffix = device isa ClimaComms.CPUSingleThreaded ? "cpu" : "gpu"
5556
root_path = "california_longrun_$(device_suffix)"

0 commit comments

Comments
 (0)