Giter Club home page Giter Club logo

Comments (7)

simone-silvestri avatar simone-silvestri commented on June 18, 2024

Another solution, slightly more complex but that allows us to keep the current execution model is to separate the sides only on communicating boundary conditions

from oceananigans.jl.

glwagner avatar glwagner commented on June 18, 2024

Ok, and to clarify, the issue is cropping up now because we are trying to distribute a model / grid along a Bounded direction. If we only distribute in Periodic directions, this problem never crops up. But if we distributed in a Bounded direction, then we run into the issue where one "side" may have a bounded condition like flux, value, gradient, and the other side may be communicating.

If we don't consider distributed problems, this issue never occurs: either both sides are Periodic, or bounded.

from oceananigans.jl.

simone-silvestri avatar simone-silvestri commented on June 18, 2024

exactly this is the issue with communication that pops up also in shared cases (multi-region)

from oceananigans.jl.

glwagner avatar glwagner commented on June 18, 2024

So how do you eliminate ordering requirements? (Why do we have ordering requirements in the first place?)

from oceananigans.jl.

simone-silvestri avatar simone-silvestri commented on June 18, 2024

ordering requirements are necessary for filling corner halos.
This is done by Periodic boundary conditions in non-distributed simulations.
Additionally, since communication boundary conditions can be asynchronous, distributed (and multi-region) BCS need to be filled last.

To remove order requirements we would need to fill the halo for flux, value, and gradient also in the corners.
I thought that might be a good idea but we hit a problem when having an AbstractArray boundary condition because we would need to construct the associated OffsetArray.

This can be prevented by wrapping the array in a Field and filling the halo regions but it seems like a heavy requirement to do it, and generally, a large API change that we might want to think about a little more. In #3338 I fixed the problem by separating out communicating boundary conditions which wasn't that complicated and maintained the current logic.

Maybe in the future, we might want to eliminate the order requirement though. So we can keep this issue open.

from oceananigans.jl.

glwagner avatar glwagner commented on June 18, 2024

Why don't we discontinue support for array boundary conditions and only support Field?

from oceananigans.jl.

glwagner avatar glwagner commented on June 18, 2024

It's better practice to use Field, because then user scripts are more likely to port to GPU and distributed architectures. I think we want to discourage using Array --- if it makes development easier, we might as well discontinue support altogether.

from oceananigans.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.