SciTools / iris-esmf-regrid

A collection of structured and unstructured ESMF regridding schemes for Iris.
https://iris-esmf-regrid.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
20 stars 17 forks source link

Add performance tests #117

Closed stephenworsley closed 3 years ago

stephenworsley commented 3 years ago

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[bot] commented 3 years ago

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 commented 3 years ago

Seems like a good pattern to me 馃憤

stephenworsley commented 3 years ago

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  
              ============ ===========
trexfeathers commented 3 years ago

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

I have successfully replicated.