Skip to content

Add performance tests#117

Merged
trexfeathers merged 13 commits intoSciTools:unstructured_schemefrom
stephenworsley:sperf
Oct 4, 2021
Merged

Add performance tests#117
trexfeathers merged 13 commits intoSciTools:unstructured_schemefrom
stephenworsley:sperf

Conversation

@stephenworsley
Copy link
Contributor

@stephenworsley stephenworsley commented Sep 17, 2021

Add performance tests for preparing a regridder to the CI performance tests and add long running performance tests (with the ability to run them separately via nox) which test the scalability of preparing and performing with real and lazy data for all the regridders.

@codecov
Copy link

codecov bot commented Sep 17, 2021

Codecov Report

Merging #117 (488a1a0) into unstructured_scheme (582502e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@                 Coverage Diff                  @@
##           unstructured_scheme     #117   +/-   ##
====================================================
  Coverage                99.48%   99.48%           
====================================================
  Files                       24       24           
  Lines                     1550     1550           
====================================================
  Hits                      1542     1542           
  Misses                       8        8           

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 582502e...488a1a0. Read the comment docs.

@trexfeathers
Copy link
Contributor

Seems like a good pattern to me 👍

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

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

@stephenworsley this reads beautifully clearly! You've made sure that the only thing that changes is the scaling parameter, even between benchmark classes - very nice.

I know this is still in progress, but I have a few more comments for the meantime.

@stephenworsley
Copy link
Contributor Author

stephenworsley commented Oct 4, 2021

When these benchmarks are run on my machine (via nox --session="benchmarks(long snapshot)") we get the following results

[ 55.56%] ··· ======== ===========
               height             
              -------- -----------
                100      517±40ms 
                200      621±60ms 
                400      974±90ms 
                600     1.50±0.1s 
                800     2.05±0.1s 
                1000    2.62±0.4s 
              ======== ===========

[ 61.11%] ··· long.esmf_regridder.PerformScalabilityGridToGrid.time_perform                                                                                                                         ok
[ 61.11%] ··· ======== ============
               height              
              -------- ------------
                100      181±10ms  
                200      415±40ms  
                400      917±50ms  
                600     1.74±0.1s  
                800     2.53±0.1s  
                1000    3.37±0.03s 
              ======== ============

[ 66.67%] ··· long.esmf_regridder.PerformScalabilityGridToMesh.time_lazy_perform                                                                                                                    ok
[ 66.67%] ··· ======== ===========
               height             
              -------- -----------
                100     706±200ms 
                200     935±100ms 
                400     1.37±0.2s 
                600     2.38±0.4s 
                800     3.15±0.5s 
                1000    4.50±0.6s 
              ======== ===========

[ 72.22%] ··· long.esmf_regridder.PerformScalabilityGridToMesh.time_perform                                                                                                                         ok
[ 72.22%] ··· ======== ===========
               height             
              -------- -----------
                100      207±40ms 
                200      400±70ms 
                400     858±200ms 
                600     1.70±0.4s 
                800     2.97±0.5s 
                1000    3.98±0.7s 
              ======== ===========

[ 77.78%] ··· long.esmf_regridder.PerformScalabilityMeshToGrid.time_lazy_perform                                                                                                                    ok
[ 77.78%] ··· ======== ============
               height              
              -------- ------------
                100      363±80ms  
                200      425±90ms  
                400     815±100ms  
                600     1.21±0.05s 
                800     1.53±0.1s  
                1000    2.08±0.2s  
              ======== ============

[ 83.33%] ··· long.esmf_regridder.PerformScalabilityMeshToGrid.time_perform                                                                                                                         ok
[ 83.33%] ··· ======== ============
               height              
              -------- ------------
                100      83.7±6ms  
                200      192±9ms   
                400      452±20ms  
                600      704±20ms  
                800      956±10ms  
                1000    1.26±0.05s 
              ======== ============

[ 88.89%] ··· long.esmf_regridder.PrepareScalabilityGridToGrid.time_prepare                                                                                                                 1/6 failed
[ 88.89%] ··· ============ ===========
               grid width             
              ------------ -----------
                   50        147±10ms 
                  100        589±20ms 
                  200       2.48±0.1s 
                  400       11.0±0.4s 
                  600       25.6±0.4s 
                  800         failed  
              ============ ===========

[ 94.44%] ··· long.esmf_regridder.PrepareScalabilityGridToMesh.time_prepare                                                                                                                 1/6 failed
[ 94.44%] ··· ============ ============
               grid width              
              ------------ ------------
                   50        141±5ms   
                  100        584±8ms   
                  200       2.59±0.05s 
                  400       11.7±0.1s  
                  600       27.0±0.01s 
                  800         failed   
              ============ ============

[100.00%] ··· long.esmf_regridder.PrepareScalabilityMeshToGrid.time_prepare                                                                                                                 2/6 failed
[100.00%] ··· ============ ===========
               grid width             
              ------------ -----------
                   50        168±4ms  
                  100        772±20ms 
                  200       3.24±0.1s 
                  400       13.9±0.3s 
                  600         failed  
                  800         failed  
              ============ ===========

@stephenworsley stephenworsley marked this pull request as ready for review October 4, 2021 10:09
@trexfeathers
Copy link
Contributor

When these benchmarks are run on my machine (via nox --session="benchmarks(long snapshot)") we get the following results

I have successfully replicated.

@trexfeathers trexfeathers merged commit 41b3a4c into SciTools:unstructured_scheme Oct 4, 2021
stephenworsley added a commit to stephenworsley/iris-esmf-regrid that referenced this pull request Jan 10, 2022
* unstructured_scheme: (22 commits)
  Check mesh equality on MeshToGridESMFRegridder call (SciTools#138)
  Formalise regridder file format (SciTools#137)
  Fix issue 135 (mesh to grid chunking problems) (SciTools#136)
  Add load/save benchmarks (SciTools#132)
  Regridder load/saving (SciTools#130)
  Update dependencies (SciTools#128)
  Perform scalability for larger grids (SciTools#122)
  Add performance tests (SciTools#117)
  change iris source (SciTools#115)
  Unstructured scheme lazy regridding (with performance tests) (SciTools#111)
  Updating feature branch unstructured_scheme from 44d6048 to head of main, e528cbf
  Add grid to mesh scheme (SciTools#96)
  Unstructured scheme integration test (SciTools#66)
  Updated lockfiles according to branch requirement spec.
  Update Version to v0.1.dev2 (SciTools#59)
  Update version to v0.1.dev1 (SciTools#58)
  Unstructured Scheme - Extra Dims (SciTools#55)
  add __init__ to tests (SciTools#56)
  Unstructured Scheme - Additional Polish (docstrings and test coverage) (SciTools#53)
  Unstructured Scheme - Cube Creation 3D (SciTools#47)
  ...

# Conflicts:
#	benchmarks/benchmarks/ci/esmf_regridder.py
#	benchmarks/benchmarks/generate_data.py
#	requirements/nox.lock/py36-linux-64.lock
#	requirements/nox.lock/py37-linux-64.lock
#	requirements/nox.lock/py38-linux-64.lock
#	requirements/py36.yml
stephenworsley added a commit to stephenworsley/iris-esmf-regrid that referenced this pull request Jan 31, 2022
* unstructured_scheme: (24 commits)
  reset flag (SciTools#145)
  Use more stable version of connectivity indices (SciTools#144)
  Check mesh equality on MeshToGridESMFRegridder call (SciTools#138)
  Formalise regridder file format (SciTools#137)
  Fix issue 135 (mesh to grid chunking problems) (SciTools#136)
  Add load/save benchmarks (SciTools#132)
  Regridder load/saving (SciTools#130)
  Update dependencies (SciTools#128)
  Perform scalability for larger grids (SciTools#122)
  Add performance tests (SciTools#117)
  change iris source (SciTools#115)
  Unstructured scheme lazy regridding (with performance tests) (SciTools#111)
  Updating feature branch unstructured_scheme from 44d6048 to head of main, e528cbf
  Add grid to mesh scheme (SciTools#96)
  Unstructured scheme integration test (SciTools#66)
  Updated lockfiles according to branch requirement spec.
  Update Version to v0.1.dev2 (SciTools#59)
  Update version to v0.1.dev1 (SciTools#58)
  Unstructured Scheme - Extra Dims (SciTools#55)
  add __init__ to tests (SciTools#56)
  ...

# Conflicts:
#	benchmarks/benchmarks/ci/esmf_regridder.py
#	benchmarks/benchmarks/generate_data.py
#	requirements/nox.lock/py36-linux-64.lock
#	requirements/nox.lock/py37-linux-64.lock
#	requirements/nox.lock/py38-linux-64.lock
#	requirements/py36.yml
#	requirements/py37.yml
@trexfeathers trexfeathers mentioned this pull request Feb 21, 2022
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