-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement kernel functions to fill cubed sphere halos #3547
base: main
Are you sure you want to change the base?
Conversation
This commit integrates some key updates from PR #3306, specifically commit 941260f on branch ncc-glw/cubed-sphere-dynamics. We have replaced the following scripts: (a) src/Models/HydrostaticFreeSurfaceModels/ update_hydrostatic_free_surface_model_state.jl; (b) src/MultiRegion/multi_region_cubed_sphere_grid.jl; with their modified versions from the PR. The main improvement involves utilizing the fill_paired_halo_regions! function to fill the halos of grid metrics on conformal cubed sphere panels at center-center, face-center, and center-face locations.
….jl into ss/correct-partitions
17b1027
to
6a11c38
Compare
6d90230
to
abc4b9e
Compare
abc4b9e
to
8d49f72
Compare
Replacing @apply_regionally begin
launch!(grid.architecture, grid, kernel_parameters,
_fill_cubed_sphere_center_center_field_east_west_halo_regions!, field, multiregion_field, region,
grid.connectivity.connections, Nc, Hc)
end by for region in number_of_regions(grid)
launch!(grid.architecture, grid[region], kernel_parameters,
_fill_cubed_sphere_center_center_field_east_west_halo_regions!, field[region], field.data.regional_objects, region,
grid.connectivity.connections[region], Nc, Hc)
end in julia> @btime fill_halo_regions!(c)
711.639 μs (714 allocations: 950.66 KiB) to julia> @btime fill_halo_regions!(c)
13.371 μs (61 allocations: 14.83 KiB) Upcoming commits will incorporate modifications of this type. |
I'm wondering if the loop: for region in number_of_regions(grid)
...
end can be done in parallel. |
I would not incorporate those modifications but rather try to understand why that happens. The only difference there is the use of In the end, with apply_regionally what happens under the hood is just this: for (r, dev) in enumerate(devs)
switch_device!(dev)
regional_func!((getregion(arg, r) for arg in args)...; (getregion(kwarg, r) for kwarg in kwargs)...)
end In this case |
Import updates from the split-explicit-fill-halo branch linked to PR 3596.
This PR implements kernel functions to fill halos of the cubed sphere, enabling cubed sphere simulations to run on a single GPU.