Skip to content

Commit 40b3275

Browse files
Pass correct kwargs... in distributed tripolar fill_halo_event! (#4865)
* Refactor fill_halo_regions! function * Update Project.toml --------- Co-authored-by: Navid C. Constantinou <[email protected]>
1 parent 5eec6fe commit 40b3275

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Oceananigans"
22
uuid = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
33
authors = ["Climate Modeling Alliance and contributors"]
4-
version = "0.100.5"
4+
version = "0.100.6"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/OrthogonalSphericalShellGrids/distributed_zipper.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,8 @@ end
5858
return nothing
5959
end
6060

61-
function fill_halo_regions!(c::OffsetArray, bcs, indices, loc, grid::DistributedTripolarGridOfSomeKind, buffers, args...;
62-
only_local_halos=false, fill_open_bcs=true, kwargs...)
63-
64-
north_bc = bcs.north
65-
61+
function fill_halo_regions!(c::OffsetArray, bcs, indices, loc, grid::DistributedTripolarGridOfSomeKind, buffers, args...; kwargs...)
62+
6663
arch = architecture(grid)
6764
kernels!, ordered_bcs = get_boundary_kernels(bcs, c, grid, loc, indices)
6865

@@ -73,7 +70,7 @@ function fill_halo_regions!(c::OffsetArray, bcs, indices, loc, grid::Distributed
7370
@inbounds fill_halo_event!(c, kernels![task], ordered_bcs[task], loc, grid, buffers, args...; kwargs...)
7471
end
7572

76-
fill_corners!(c, arch.connectivity, indices, loc, arch, grid, buffers, args...; only_local_halos, kwargs...)
73+
fill_corners!(c, arch.connectivity, indices, loc, arch, grid, buffers, args...; kwargs...)
7774

7875
# We increment the request counter only if we have actually initiated the MPI communication.
7976
# This is the case only if at least one of the boundary conditions is a distributed communication
@@ -82,8 +79,11 @@ function fill_halo_regions!(c::OffsetArray, bcs, indices, loc, grid::Distributed
8279
arch.mpi_tag[] += 1
8380
end
8481

85-
switch_north_halos!(c, north_bc, grid, loc)
86-
82+
if arch.mpi_tag[] == 0 # The communication has been reset, switch the north halos!
83+
north_bc = bcs.north
84+
switch_north_halos!(c, north_bc, grid, loc)
85+
end
86+
8787
return nothing
8888
end
8989

0 commit comments

Comments
 (0)