edoddridge / aronnax

An idealised isopycnal model that can be run either with n+1/2 layers, or with n layers and variable bathymetry.
http://aronnax.readthedocs.io/en/latest/
MIT License
23 stars 5 forks source link

Halos - making better use of halos to improve parallel performance #220

Closed edoddridge closed 5 years ago

edoddridge commented 5 years ago

As noted in #218, there are a lot of exchange calls that could be removed if the halos were being used more efficiently. This PR does just that, and partially closes #218.

There are a few bugs fixed in this PR:

The real meat of this PR is flushing many exchange calls, which leads to substantial improvements in scaling and performance improvement when running in parallel. The 1.5 layer version is now faster when running on multiple cores than it is on a single core, which is good. The previous scaling was embarrassing.

Still to do:

n-layer red_grav

codecov[bot] commented 5 years ago

Codecov Report

Merging #220 into master will decrease coverage by 0.05%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #220      +/-   ##
==========================================
- Coverage   91.82%   91.76%   -0.06%     
==========================================
  Files          20       20              
  Lines        1822     1810      -12     
  Branches       96       95       -1     
==========================================
- Hits         1673     1661      -12     
  Misses        124      124              
  Partials       25       25
Impacted Files Coverage Δ
src/model_main.f90 96.66% <ø> (-0.06%) :arrow_down:
src/bernoulli.f90 100% <100%> (ø) :arrow_up:
src/momentum.f90 92.1% <100%> (-0.14%) :arrow_down:
src/aronnax.f90 94.18% <100%> (ø) :arrow_up:
src/barotropic_mode.f90 98.59% <100%> (ø) :arrow_up:
src/advection_schemes.f90 100% <100%> (ø) :arrow_up:
src/io.f90 94.73% <100%> (ø) :arrow_up:
src/thickness.f90 97.61% <100%> (-0.06%) :arrow_down:
src/boundaries.f90 92.77% <100%> (+0.08%) :arrow_up:
src/vorticity.f90 100% <100%> (ø) :arrow_up:
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 50215d9...efdff6f. Read the comment docs.