-
Notifications
You must be signed in to change notification settings - Fork 191
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
Parallel and Serial Split Explicit Free Surface #2888
Conversation
…into ss/split_explicit
…into ss/split_explicit
I should have addressed all the changes except the |
sounds good |
|
||
# Check that the size of a bottom field are | ||
# consistent with the size of the field | ||
if any(size(ib.mask) .!= mask_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why any
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a comment at the least
Nx, Ny, Nz = size(grid) | ||
Hx, Hy, Nz = halo_size(grid) | ||
|
||
mask_size = (Nx, Ny, Nz) .+ 2 .* (Hx, Hy, Hz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the same as total_size(grid)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's important to use the functions here. Remember you want to change the size of a Center, Bounded
field. When you do that, the above code is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want total_size((Center, Center, Nothing), grid)
via
Oceananigans.jl/src/Grids/grid_utils.jl
Line 84 in e394bf7
total_size(loc, grid) = (total_length(loc[1], topology(grid, 1), grid.Nx, grid.Hx), |
This PR improves the currently implemented split explicit surface solver in serial mode
(partially using the algorithm in Shchepetkin & McWilliams, Ocean Modelling 9, 2005 albeit with a linear free surface) and implements single-node parallel (
MultiRegion
), and multi-node parallel (Distributed
) split explicit free surfaceIn addition, quite some improvements have been made to the distributed module to allow a distributed
LatitudeLongituteGrid
andIBG
and various comments in theMultiRegion
moduleEdit: MPI does not exploit CUDA-aware message passing for CuArray views, so this PR also implements buffered Halo communication for distributed models, unifying a bit of the code for Distributed and MultiRegion. This is a fundamental step to achieve the goals of the next PR which will deal with heterogenous distributed - shared models (i.e. a MultiRegionGrid of a DistributedGrid)
Edit Edit: apparently CUDA-aware MPI allows passing views of CuArrays. Buffers are still implemented for those architectures where CUDA-aware MPI is not available
Edit Edit Edit: apparently for Oceananigans that sends strided memory, buffers are crucial because
(from openmpi-link)
Edit: This PR adds the possibility of distributing along a
Bounded
direction, and the possibility of having correct 2D parallelization with Coriolis. Previously it was not possible because corners were not communicated correctlyDoesn't have to be merged now.
(Validation cases are not necessary and will be deleted prior to merging)