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

ALE: integrateReconOnInterval() is searching for the starting cell #233

Closed
adcroft opened this issue Oct 28, 2015 · 0 comments
Closed

ALE: integrateReconOnInterval() is searching for the starting cell #233

adcroft opened this issue Oct 28, 2015 · 0 comments
Assignees

Comments

@adcroft
Copy link
Collaborator

adcroft commented Oct 28, 2015

Function integrateReconOnInterval() in MOM_remapping.F90 returns a single integral for one element spanning an arbitrary set of cells. It currently searches for the first cell in the span. In consecutive integrals, the first cell should be the same as the last cell used in the previous integral.

Todo:

  • Use the last cell index of the previous integral as the starting point of the search?
  • Is searching always necessary if we have the last index?
@adcroft adcroft added this to the Optimization of ALE code milestone Oct 28, 2015
@adcroft adcroft self-assigned this Oct 28, 2015
adcroft added a commit that referenced this issue Oct 29, 2015
- As commented in #233, integrateReconOnInterval() in MOM_remapping.F90
  searches for the cell containing the start of the integration interval
  which should be no shallower than that of the last call.
- integrateReconOnInterval() now uses a two arguments to "remember"
  the best starting location when searching for the first cell to use.
- In timings of global_ALE/z, this optimization saved 13% of the ALE
  section of code.
- No answer changes.
nikizadehgfdl added a commit that referenced this issue Oct 29, 2015
- Trying possible ways of inlining integration_polynomial without changing answers for issue #232
- I only tried OM4_SIS2_baseline with intel compiler (repro and prod)
- Note that the answers will change even if you replace n2 by 2 in the xi1**n2-xi0**n2
- Note that there are a few more calls to this function that needs to be inlined
- I see a hint of speed up of the model (7%) but am not sure how much of it is related to this commit
  and how much to commit 44594bc of #233
adcroft added a commit that referenced this issue Oct 30, 2015
- As for commit 44594bc, a second search for the end of the
  span of an integral was starting (very unnecessarily) at the top.
- In timings of global_ALE/z, this optimization saved a further 15% of the ALE
  section of code, relative to last commit, ~26% relative to start of
  optimization. 👍
- I think this is the last of the O(n^2) operations so this closes #233.
- No answer changes.
adcroft added a commit that referenced this issue Nov 19, 2015
- As commented in #233, integrateReconOnInterval() in MOM_remapping.F90
  searches for the cell containing the start of the integration interval
  which should be no shallower than that of the last call.
- integrateReconOnInterval() now uses a two arguments to "remember"
  the best starting location when searching for the first cell to use.
- In timings of global_ALE/z, this optimization saved 13% of the ALE
  section of code.
- No answer changes.
nikizadehgfdl added a commit that referenced this issue Nov 19, 2015
- Trying possible ways of inlining integration_polynomial without changing answers for issue #232
- I only tried OM4_SIS2_baseline with intel compiler (repro and prod)
- Note that the answers will change even if you replace n2 by 2 in the xi1**n2-xi0**n2
- Note that there are a few more calls to this function that needs to be inlined
- I see a hint of speed up of the model (7%) but am not sure how much of it is related to this commit
  and how much to commit 44594bc of #233
MJHarrison-GFDL pushed a commit to MJHarrison-GFDL/MOM6 that referenced this issue Aug 16, 2022
The pull request template was not showing as expected.  This should fix that problem.
jiandewang pushed a commit to jiandewang/MOM6 that referenced this issue Mar 3, 2023
POSIX: siglongjmp and sigsetjmp_missing fixes
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

No branches or pull requests

1 participant