Skip to content
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

Make discrete transform plans more compact #1435

Merged

Conversation

charleskawczynski
Copy link
Member

I was trying to understand the dims pattern in the branching in plan_transforms, and ended up re-writing it a bit to understand it. Not sure if this is a preferable form, but I thought I'd open a PR in case. I need to double-check the logic, but maybe someone can confirm.

Copy link
Member

@ali-ramadhan ali-ramadhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this important refactoring of the innards!

The if-statement jungle isn't something I was proud of but couldn't really figure out how to abstract it nicely in PR #1338 so I left it as-is...

I need to double-check the logic, but maybe someone can confirm.

Poisson solvers are tested to make sure the solution is correct to machine epsilon and are tested for 2nd-order convergence for all topologies on the CPU and GPU (e.g. https://buildkite.com/clima/oceananigans/builds/1435#48103f4c-d724-4e61-9011-5d0b7be92dea/33-268) and all the tests seem to pass so this PR looks good to merge!

Not sure if this is a preferable form, but I thought I'd open a PR in case.

I'd say this indicates preferable form!

image

src/Solvers/plan_transforms.jl Outdated Show resolved Hide resolved
@charleskawczynski
Copy link
Member Author

@ali-ramadhan, it looks like the docs are failing (OError: write: broken pipe (EPIPE)), but it looks unrelated to this PR. Anything to worry about?

@ali-ramadhan
Copy link
Member

ali-ramadhan commented Mar 9, 2021

@charleskawczynski Ah no just a random error but I reran the Buildkite pipeline out of habit. Feel free to merge!

@charleskawczynski charleskawczynski merged commit b1d6236 into CliMA:master Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants