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

Lockfiles debug #6141

Closed
wants to merge 2 commits into from
Closed

Lockfiles debug #6141

wants to merge 2 commits into from

Conversation

pp-mo
Copy link
Member

@pp-mo pp-mo commented Sep 4, 2024

Actually an attempt to dig a bit deeper into the #6096 #6135 problems

@github-actions github-actions bot added the benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts label Sep 4, 2024
@pp-mo
Copy link
Member Author

pp-mo commented Sep 4, 2024

Results

The env dump in the py3.12 tests went like this, in part ...

2024-09-04T16:44:11.9294931Z nox > python -m pip install --no-deps --editable .
2024-09-04T16:44:18.3399127Z nox > echo '"NOX TEST ENV DUMP == START "'
2024-09-04T16:44:18.3409259Z "NOX TEST ENV DUMP == START "
2024-09-04T16:44:18.3413493Z nox > env 
2024-09-04T16:44:18.3423399Z SYSTEMROOT=
2024-09-04T16:44:18.3424153Z SELENIUM_JAR_PATH=/usr/share/java/selenium-server.jar
2024-09-04T16:44:18.3424913Z CONDA=/home/runner/miniconda3
2024-09-04T16:44:18.3425544Z GITHUB_WORKSPACE=/home/runner/work/iris/iris
2024-09-04T16:44:18.3426381Z JAVA_HOME_11_X64=/usr/lib/jvm/temurin-11-jdk-amd64
2024-09-04T16:44:18.3427105Z CONDA_EXE=/home/runner/miniconda3/bin/conda
2024-09-04T16:44:18.3427693Z _CE_M=
2024-09-04T16:44:18.3428105Z ENV_NAME=ci-tests
  . . .
2024-09-04T16:44:18.3490069Z PROJ_DATA=/home/runner/miniconda3/envs/ci-tests/share/proj
 . . .

2024-09-04T16:44:18.3522405Z PROJ_NETWORK=ON
 . . .
2024-09-04T16:44:18.3523626Z NOX_CURRENT_SESSION=tests
2024-09-04T16:44:18.3524201Z TMPDIR=/home/runner/work/iris/iris/.nox/tests/tmp
2024-09-04T16:44:18.3524969Z NPY_DISABLE_CPU_FEATURES=AVX512F,AVX512CD,AVX512_SKX
2024-09-04T16:44:18.3525782Z nox > echo '".. == END NOX TEST ENV DUMP."'
2024-09-04T16:44:18.3526703Z nox > pytest -n auto --cov=lib/iris --cov-report=xml lib/iris/tests
2024-09-04T16:44:18.3527501Z ".. == END NOX TEST ENV DUMP."

Suspected Relevance

So, I have a strong suspicion that the PROJ_DATA=/home/runner/miniconda3/envs/ci-tests/share/proj here
is the key problem.

It does seem from the error messages that this key variable is not re-set to the correct path for the installed test environment, as it should have been. E.G. this message from the #6096 tests :

____________________ Test_GeogCS_mutation.test_datum_change ____________________
[gw1] linux -- Python 3.12.5 /home/runner/work/iris/iris/.nox/tests/bin/python3.12

self = <iris.tests.test_coordsystem.Test_GeogCS_mutation testMethod=test_datum_change>

    def test_datum_change(self):
        # Semi-major axis changes
        # All internal ellipoid values set to None
        # CRS changes
        cs = GeogCS(6543210, 6500000)
>       _ = cs.as_cartopy_crs()

lib/iris/tests/test_coordsystem.py:302: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/iris/coord_systems.py:319: in as_cartopy_crs
    return self._crs
.nox/tests/lib/python3.12/functools.py:993: in __get__
    val = self.func(instance)
lib/iris/coord_systems.py:363: in _crs
    return ccrs.Geodetic(self._globe)
.nox/tests/lib/python3.12/site-packages/cartopy/crs.py:584: in __init__
    super().__init__(proj4_params, globe)
.nox/tests/lib/python3.12/site-packages/cartopy/crs.py:201: in __init__
    super().__init__(self.proj4_init)
.nox/tests/lib/python3.12/site-packages/pyproj/crs/crs.py:348: in __init__
    self._local.crs = _CRS(self.srs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   pyproj.exceptions.CRSError: Invalid projection: +proj=lonlat +a=6543210.0 +b=6500000.0 +no_defs +type=crs: (Internal Proj Error: proj_create: /home/runner/miniconda3/envs/ci-tests/share/proj/proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 2 whereas a number >= 3 is expected. It comes from another PROJ installation.)

pyproj/_crs.pyx:2378: CRSError

Trial to replicate

I have now replicated this myself locally, by setting the path into an older conda env. E.G.

$ conda activate /opt/scitools/conda/deployments/default-2024_02_20
$ pytest ./lib/iris/tests/test_coordsystem.py      
$ pytest ./lib/iris/tests/test_coordsystem.py::Test_Datums
=================================================================================== test session starts ===================================================================================
platform linux -- Python 3.11.7, pytest-8.0.0, pluggy-1.4.0
rootdir: /net/home/h05/itpp/git/iris/iris_main
configfile: pyproject.toml
plugins: anyio-4.2.0, xdist-3.5.0
collected 2 items                                                                                                                                                                         

lib/iris/tests/test_coordsystem.py ..                                                                                                                                               [100%]

================================================================================== slowest 25 durations ===================================================================================

(6 durations < 0.005s hidden.  Use -vv to show these durations.)
==================================================================================== 2 passed in 2.50s ====================================================================================
$ set | grep PROJ
PROJ_DATA=/opt/scitools/conda/deployments/default-2024_02_20/share/proj
PROJ_NETWORK=ON
$
$ conda deactivate
$ conda activate /opt/scitools/conda/deployments/default-2024_09_02/
$ pytest ./lib/iris/tests/test_coordsystem.py::Test_Datums
  . . .
==================================================================================== 2 passed in 3.41s ====================================================================================

$ export PROJ_DATA=/opt/scitools/conda/deployments/default-2024_02_20/share/proj
$ pytest ./lib/iris/tests/test_coordsystem.py::Test_Datums
 . . .
======================================================================================== FAILURES =========================================================================================
______________________________________________________________________________ Test_Datums.test_default_none ______________________________________________________________________________

self = <iris.tests.test_coordsystem.Test_Datums testMethod=test_default_none>

    def test_default_none(self):
        cs = GeogCS(6543210, 6500000)  # Arbitrary radii
>       cartopy_crs = cs.as_cartopy_crs()

lib/iris/tests/test_coordsystem.py:524: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
lib/iris/coord_systems.py:319: in as_cartopy_crs
    return self._crs
/opt/scitools/conda/deployments/default-2024_09_02/lib/python3.12/functools.py:993: in __get__
    val = self.func(instance)
lib/iris/coord_systems.py:363: in _crs
    return ccrs.Geodetic(self._globe)
/opt/scitools/conda/deployments/default-2024_09_02/lib/python3.12/site-packages/cartopy/crs.py:584: in __init__
    super().__init__(proj4_params, globe)
/opt/scitools/conda/deployments/default-2024_09_02/lib/python3.12/site-packages/cartopy/crs.py:201: in __init__
    super().__init__(self.proj4_init)
/opt/scitools/conda/deployments/default-2024_09_02/lib/python3.12/site-packages/pyproj/crs/crs.py:348: in __init__
    self._local.crs = _CRS(self.srs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   pyproj.exceptions.CRSError: Invalid projection: +proj=lonlat +a=6543210.0 +b=6500000.0 +no_defs +type=crs: (Internal Proj Error: proj_create: /opt/scitools/conda/deployments/default-2024_02_20/share/proj/proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 2 whereas a number >= 3 is expected. It comes from another PROJ installation.)

pyproj/_crs.pyx:2378: CRSError

 . . .
================================================================================= short test summary info =================================================================================
FAILED lib/iris/tests/test_coordsystem.py::Test_Datums::test_default_none - pyproj.exceptions.CRSError: Invalid projection: +proj=lonlat +a=6543210.0 +b=6500000.0 +no_defs +type=crs: (Internal Proj Error: proj_create: /opt/scitools/conda/deployments/default-...
========================================================================= 1 failed, 1 passed, 1 warning in 2.69s ==========================================================================

What it means

From further experiment, activating a conda env with proj/pyproj in it does always set PROJ_DATA, even in the latest versions.
So, I think this must point to a problem or subtlety in nox use of conda - since it seems that the activation of the controlled test environment is not complete -- i.e. somehow it has missed setting PROJ_DATA to the 'correct' value when invoking the test environment.
Perhaps nox has some tricky special behaviour when it is activating the test environment : Something like, if it re-asserts env settings from the 'host' environment afterward, or the settings derived from activation scripts are somehow "fixed" so they can't over-write an existing one.

Certainly, if PROJ_DATA is set like as above, and then the new env is activated with "conda activate", then PROJ_DATA is changed by that as you would expect, and the above error does not occur :

$ export PROJ_DATA=/opt/scitools/conda/deployments/default-2024_02_20/share/proj
$ conda activate /opt/scitools/conda/deployments/default-2024_09_02/
$ set | grep PROJ
PROJ_DATA=/opt/scitools/conda/deployments/default-2024_09_02/share/proj
PROJ_NETWORK=ON
_CONDA_SET_PROJ_DATA=/opt/scitools/conda/deployments/default-2024_02_20/share/proj
$ pytest ./lib/iris/tests/test_coordsystem.py::Test_Datums
  . . .  === 2 passed in 3.64s ====
$ conda deactivate
$ set | grep PROJ
PROJ_DATA=/opt/scitools/conda/deployments/default-2024_02_20/share/proj
  • so, this is not a problem with conda activate/deactivate : they get it right.
    I'm guessing this may something tricky in nox

Copy link
Contributor

github-actions bot commented Sep 4, 2024

⏱️ Performance Benchmark Report: f04064e

Performance shifts
| Change   | Before [1a9bdaa5]    | After [f04064e7]    |   Ratio | Benchmark (Parameter)                                      |
|----------|----------------------|---------------------|---------|------------------------------------------------------------|
| +        | 370±2ms              | 548±3ms             |    1.48 | load.StructuredFF.time_structured_load((2, 2, 1000), True) |
Full benchmark results

Benchmarks that have stayed the same:

| Change   | Before [1a9bdaa5]    | After [f04064e7]    | Ratio   | Benchmark (Parameter)                                                                       |
|----------|----------------------|---------------------|---------|---------------------------------------------------------------------------------------------|
|          | 53.9±0.9ms           | 59.0±0.7ms          | 1.10    | aggregate_collapse.Aggregation.time_aggregated_by_COUNT(False)                              |
|          | 54.3±1ms             | 59.5±0.8ms          | 1.10    | aggregate_collapse.Aggregation.time_aggregated_by_COUNT(True)                               |
|          | 191±2ms              | 212±3ms             | 1.11    | aggregate_collapse.Aggregation.time_aggregated_by_FAST_PERCENTILE(False)                    |
|          | 192±2ms              | 212±2ms             | 1.11    | aggregate_collapse.Aggregation.time_aggregated_by_FAST_PERCENTILE(True)                     |
|          | 37.0±0.8ms           | 38.2±0.4ms          | 1.03    | aggregate_collapse.Aggregation.time_aggregated_by_GMEAN(False)                              |
|          | 37.7±0.9ms           | 39.4±0.7ms          | 1.04    | aggregate_collapse.Aggregation.time_aggregated_by_GMEAN(True)                               |
|          | 37.2±0.7ms           | 38.5±0.6ms          | 1.03    | aggregate_collapse.Aggregation.time_aggregated_by_HMEAN(False)                              |
|          | 37.8±0.6ms           | 38.9±0.9ms          | 1.03    | aggregate_collapse.Aggregation.time_aggregated_by_HMEAN(True)                               |
|          | 46.9±0.8ms           | 50.7±0.6ms          | 1.08    | aggregate_collapse.Aggregation.time_aggregated_by_MAX(False)                                |
|          | 47.7±0.7ms           | 52.0±0.9ms          | 1.09    | aggregate_collapse.Aggregation.time_aggregated_by_MAX(True)                                 |
|          | 121±1ms              | 138±2ms             | 1.14    | aggregate_collapse.Aggregation.time_aggregated_by_MAX_RUN(False)                            |
|          | 123±1ms              | 137±2ms             | 1.11    | aggregate_collapse.Aggregation.time_aggregated_by_MAX_RUN(True)                             |
|          | 51.4±0.6ms           | 55.4±1ms            | 1.08    | aggregate_collapse.Aggregation.time_aggregated_by_MEAN(False)                               |
|          | 52.2±0.9ms           | 56.0±0.6ms          | 1.07    | aggregate_collapse.Aggregation.time_aggregated_by_MEAN(True)                                |
|          | 36.7±0.7ms           | 38.4±0.6ms          | 1.05    | aggregate_collapse.Aggregation.time_aggregated_by_MEDIAN(False)                             |
|          | 37.6±0.4ms           | 38.8±0.2ms          | 1.03    | aggregate_collapse.Aggregation.time_aggregated_by_MEDIAN(True)                              |
|          | 46.6±0.4ms           | 50.3±0.6ms          | 1.08    | aggregate_collapse.Aggregation.time_aggregated_by_MIN(False)                                |
|          | 48.0±0.7ms           | 51.4±0.5ms          | 1.07    | aggregate_collapse.Aggregation.time_aggregated_by_MIN(True)                                 |
|          | 1.32±0.02s           | 1.35±0.02s          | 1.02    | aggregate_collapse.Aggregation.time_aggregated_by_PEAK(False)                               |
|          | 1.32±0.02s           | 1.34±0.01s          | 1.02    | aggregate_collapse.Aggregation.time_aggregated_by_PEAK(True)                                |
|          | 684±10ms             | 689±7ms             | 1.01    | aggregate_collapse.Aggregation.time_aggregated_by_PERCENTILE(False)                         |
|          | 681±20ms             | 690±20ms            | 1.01    | aggregate_collapse.Aggregation.time_aggregated_by_PERCENTILE(True)                          |
|          | 35.2±0.4ms           | 37.0±0.3ms          | 1.05    | aggregate_collapse.Aggregation.time_aggregated_by_PROPORTION(False)                         |
|          | 35.9±0.5ms           | 37.5±0.4ms          | 1.04    | aggregate_collapse.Aggregation.time_aggregated_by_PROPORTION(True)                          |
|          | 62.2±0.9ms           | 68.4±0.6ms          | 1.10    | aggregate_collapse.Aggregation.time_aggregated_by_RMS(False)                                |
|          | 62.6±0.7ms           | 68.9±0.5ms          | 1.10    | aggregate_collapse.Aggregation.time_aggregated_by_RMS(True)                                 |
|          | 65.9±1ms             | 70.0±0.6ms          | 1.06    | aggregate_collapse.Aggregation.time_aggregated_by_STD_DEV(False)                            |
|          | 67.1±0.5ms           | 71.5±0.5ms          | 1.07    | aggregate_collapse.Aggregation.time_aggregated_by_STD_DEV(True)                             |
|          | 61.7±0.7ms           | 65.6±0.9ms          | 1.06    | aggregate_collapse.Aggregation.time_aggregated_by_VARIANCE(False)                           |
|          | 62.3±0.9ms           | 66.1±0.6ms          | 1.06    | aggregate_collapse.Aggregation.time_aggregated_by_VARIANCE(True)                            |
|          | 20.0±0.5ms           | 21.1±0.7ms          | 1.06    | aggregate_collapse.Aggregation.time_collapsed_by_COUNT(False)                               |
|          | 23.5±0.4ms           | 24.9±0.6ms          | 1.06    | aggregate_collapse.Aggregation.time_collapsed_by_COUNT(True)                                |
|          | 130±1ms              | 142±2ms             | 1.09    | aggregate_collapse.Aggregation.time_collapsed_by_FAST_PERCENTILE(False)                     |
|          | 145±1ms              | 157±2ms             | 1.08    | aggregate_collapse.Aggregation.time_collapsed_by_FAST_PERCENTILE(True)                      |
|          | 18.3±0.4ms           | 18.6±0.4ms          | 1.02    | aggregate_collapse.Aggregation.time_collapsed_by_GMEAN(False)                               |
|          | 22.1±0.4ms           | 23.1±0.5ms          | 1.05    | aggregate_collapse.Aggregation.time_collapsed_by_GMEAN(True)                                |
|          | 18.1±0.6ms           | 18.5±0.8ms          | 1.02    | aggregate_collapse.Aggregation.time_collapsed_by_HMEAN(False)                               |
|          | 22.1±0.4ms           | 22.9±0.9ms          | 1.04    | aggregate_collapse.Aggregation.time_collapsed_by_HMEAN(True)                                |
|          | 18.8±0.4ms           | 19.2±0.6ms          | 1.02    | aggregate_collapse.Aggregation.time_collapsed_by_MAX(False)                                 |
|          | 22.8±0.6ms           | 23.6±0.7ms          | 1.04    | aggregate_collapse.Aggregation.time_collapsed_by_MAX(True)                                  |
|          | 34.5±1ms             | 37.3±1ms            | 1.08    | aggregate_collapse.Aggregation.time_collapsed_by_MAX_RUN(False)                             |
|          | 38.1±0.6ms           | 41.2±0.6ms          | 1.08    | aggregate_collapse.Aggregation.time_collapsed_by_MAX_RUN(True)                              |
|          | 19.2±0.3ms           | 20.3±0.7ms          | 1.06    | aggregate_collapse.Aggregation.time_collapsed_by_MEAN(False)                                |
|          | 22.8±0.4ms           | 24.4±0.3ms          | 1.07    | aggregate_collapse.Aggregation.time_collapsed_by_MEAN(True)                                 |
|          | 18.8±0.2ms           | 19.1±0.5ms          | 1.02    | aggregate_collapse.Aggregation.time_collapsed_by_MEDIAN(False)                              |
|          | 22.5±0.4ms           | 23.7±0.7ms          | 1.05    | aggregate_collapse.Aggregation.time_collapsed_by_MEDIAN(True)                               |
|          | 18.7±0.5ms           | 19.3±1ms            | 1.04    | aggregate_collapse.Aggregation.time_collapsed_by_MIN(False)                                 |
|          | 22.3±0.2ms           | 23.6±0.9ms          | 1.06    | aggregate_collapse.Aggregation.time_collapsed_by_MIN(True)                                  |
|          | 554±5ms              | 577±3ms             | 1.04    | aggregate_collapse.Aggregation.time_collapsed_by_PEAK(False)                                |
|          | 557±8ms              | 582±6ms             | 1.04    | aggregate_collapse.Aggregation.time_collapsed_by_PEAK(True)                                 |
|          | 151±1ms              | 160±2ms             | 1.06    | aggregate_collapse.Aggregation.time_collapsed_by_PERCENTILE(False)                          |
|          | 168±2ms              | 180±1ms             | 1.07    | aggregate_collapse.Aggregation.time_collapsed_by_PERCENTILE(True)                           |
|          | 17.9±0.2ms           | 17.9±0.8ms          | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_PROPORTION(False)                          |
|          | 21.7±0.2ms           | 22.4±0.9ms          | 1.03    | aggregate_collapse.Aggregation.time_collapsed_by_PROPORTION(True)                           |
|          | 21.2±0.2ms           | 21.9±1ms            | 1.03    | aggregate_collapse.Aggregation.time_collapsed_by_RMS(False)                                 |
|          | 24.9±0.2ms           | 25.9±1ms            | 1.04    | aggregate_collapse.Aggregation.time_collapsed_by_RMS(True)                                  |
|          | 21.2±0.3ms           | 21.7±1ms            | 1.02    | aggregate_collapse.Aggregation.time_collapsed_by_STD_DEV(False)                             |
|          | 25.0±0.6ms           | 25.9±0.6ms          | 1.04    | aggregate_collapse.Aggregation.time_collapsed_by_STD_DEV(True)                              |
|          | 20.6±0.3ms           | 21.1±0.9ms          | 1.02    | aggregate_collapse.Aggregation.time_collapsed_by_VARIANCE(False)                            |
|          | 24.4±0.3ms           | 25.5±0.6ms          | 1.05    | aggregate_collapse.Aggregation.time_collapsed_by_VARIANCE(True)                             |
|          | 83.6±0.7ms           | 93.0±0.6ms          | 1.11    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_MEAN(False)                     |
|          | 84.2±1ms             | 93.3±1ms            | 1.11    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_MEAN(True)                      |
|          | 95.4±1ms             | 107±1ms             | 1.12    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_RMS(False)                      |
|          | 96.3±0.5ms           | 107±0.8ms           | 1.11    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_RMS(True)                       |
|          | 58.8±0.8ms           | 63.8±0.6ms          | 1.09    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_SUM(False)                      |
|          | 59.2±0.6ms           | 64.3±0.8ms          | 1.09    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_SUM(True)                       |
|          | 29.3±0.3ms           | 30.3±0.5ms          | 1.03    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_MEAN(False)                      |
|          | 32.9±0.4ms           | 34.5±0.7ms          | 1.05    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_MEAN(True)                       |
|          | 30.9±0.6ms           | 32.8±0.7ms          | 1.06    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_RMS(False)                       |
|          | 34.7±0.7ms           | 37.0±0.4ms          | 1.06    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_RMS(True)                        |
|          | 26.0±0.5ms           | 25.8±0.5ms          | 1.00    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_SUM(False)                       |
|          | 29.5±0.5ms           | 30.2±0.4ms          | 1.03    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_SUM(True)                        |
|          | 327±3ms              | 335±3ms             | 1.03    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_WPERCENTILE(False)               |
|          | 347±2ms              | 356±3ms             | 1.03    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_WPERCENTILE(True)                |
|          | 1.11±0.01ms          | 1.13±0.01ms         | 1.02    | cube.CubeCreation.time_create(False, 'construct')                                           |
|          | 396±4μs              | 395±7μs             | 1.00    | cube.CubeCreation.time_create(False, 'instantiate')                                         |
|          | 951±10μs             | 968±20μs            | 1.02    | cube.CubeCreation.time_create(True, 'construct')                                            |
|          | 577±6μs              | 583±9μs             | 1.01    | cube.CubeCreation.time_create(True, 'instantiate')                                          |
|          | 224±2ms              | 238±5ms             | 1.07    | cube.CubeEquality.time_equality(False, False, 'all_equal')                                  |
|          | 113±0.9ms            | 124±2ms             | 1.10    | cube.CubeEquality.time_equality(False, False, 'coord_inequality')                           |
|          | 234±3ms              | 251±4ms             | 1.07    | cube.CubeEquality.time_equality(False, False, 'data_inequality')                            |
|          | 16.4±0.2μs           | 16.8±0.4μs          | 1.02    | cube.CubeEquality.time_equality(False, False, 'metadata_inequality')                        |
|          | 310±2ms              | 331±3ms             | 1.07    | cube.CubeEquality.time_equality(False, True, 'all_equal')                                   |
|          | 201±2ms              | 220±3ms             | 1.10    | cube.CubeEquality.time_equality(False, True, 'coord_inequality')                            |
|          | 315±3ms              | 340±3ms             | 1.08    | cube.CubeEquality.time_equality(False, True, 'data_inequality')                             |
|          | 16.7±0.2μs           | 17.1±0.1μs          | 1.02    | cube.CubeEquality.time_equality(False, True, 'metadata_inequality')                         |
|          | 225±3ms              | 237±3ms             | 1.05    | cube.CubeEquality.time_equality(True, False, 'all_equal')                                   |
|          | 114±1ms              | 123±1ms             | 1.08    | cube.CubeEquality.time_equality(True, False, 'coord_inequality')                            |
|          | 235±3ms              | 247±3ms             | 1.05    | cube.CubeEquality.time_equality(True, False, 'data_inequality')                             |
|          | 52.9±0.6μs           | 53.8±0.6μs          | 1.02    | cube.CubeEquality.time_equality(True, False, 'metadata_inequality')                         |
|          | 310±3ms              | 331±6ms             | 1.07    | cube.CubeEquality.time_equality(True, True, 'all_equal')                                    |
|          | 201±2ms              | 219±4ms             | 1.09    | cube.CubeEquality.time_equality(True, True, 'coord_inequality')                             |
|          | 319±4ms              | 342±5ms             | 1.07    | cube.CubeEquality.time_equality(True, True, 'data_inequality')                              |
|          | 54.5±0.5μs           | 55.7±1μs            | 1.02    | cube.CubeEquality.time_equality(True, True, 'metadata_inequality')                          |
|          | 784±4μs              | 777±10μs            | 0.99    | import_iris.Iris.time__concatenate                                                          |
|          | 180±2μs              | 180±2μs             | 1.00    | import_iris.Iris.time__constraints                                                          |
|          | 111±1μs              | 110±0.6μs           | 0.99    | import_iris.Iris.time__data_manager                                                         |
|          | 94.5±1μs             | 93.8±0.6μs          | 0.99    | import_iris.Iris.time__deprecation                                                          |
|          | 138±1μs              | 138±2μs             | 1.00    | import_iris.Iris.time__lazy_data                                                            |
|          | 899±5μs              | 893±10μs            | 0.99    | import_iris.Iris.time__merge                                                                |
|          | 77.4±0.6μs           | 77.2±0.4μs          | 1.00    | import_iris.Iris.time__representation                                                       |
|          | 483±6μs              | 484±10μs            | 1.00    | import_iris.Iris.time_analysis                                                              |
|          | 143±2μs              | 140±2μs             | 0.98    | import_iris.Iris.time_analysis__area_weighted                                               |
|          | 110±2μs              | 111±0.9μs           | 1.00    | import_iris.Iris.time_analysis__grid_angles                                                 |
|          | 247±3μs              | 241±2μs             | 0.98    | import_iris.Iris.time_analysis__interpolation                                               |
|          | 192±4μs              | 188±2μs             | 0.98    | import_iris.Iris.time_analysis__regrid                                                      |
|          | 113±1μs              | 113±1μs             | 1.00    | import_iris.Iris.time_analysis__scipy_interpolate                                           |
|          | 139±2μs              | 140±2μs             | 1.00    | import_iris.Iris.time_analysis_calculus                                                     |
|          | 327±5μs              | 331±4μs             | 1.01    | import_iris.Iris.time_analysis_cartography                                                  |
|          | 94.9±0.7μs           | 94.5±0.5μs          | 1.00    | import_iris.Iris.time_analysis_geomerty                                                     |
|          | 224±7μs              | 217±2μs             | 0.96    | import_iris.Iris.time_analysis_maths                                                        |
|          | 98.2±0.5μs           | 97.0±0.9μs          | 0.99    | import_iris.Iris.time_analysis_stats                                                        |
|          | 176±2μs              | 174±2μs             | 0.99    | import_iris.Iris.time_analysis_trajectory                                                   |
|          | 312±7μs              | 303±3μs             | 0.97    | import_iris.Iris.time_aux_factory                                                           |
|          | 84.7±0.9μs           | 84.0±0.4μs          | 0.99    | import_iris.Iris.time_common                                                                |
|          | 165±2μs              | 162±1μs             | 0.98    | import_iris.Iris.time_common_lenient                                                        |
|          | 1.34±0.01ms          | 1.32±0.01ms         | 0.98    | import_iris.Iris.time_common_metadata                                                       |
|          | 133±0.8μs            | 132±1μs             | 1.00    | import_iris.Iris.time_common_mixin                                                          |
|          | 1.18±0.01ms          | 1.19±0.02ms         | 1.01    | import_iris.Iris.time_common_resolve                                                        |
|          | 198±1μs              | 201±1μs             | 1.01    | import_iris.Iris.time_config                                                                |
|          | 125±2μs              | 125±1μs             | 1.00    | import_iris.Iris.time_coord_categorisation                                                  |
|          | 362±4μs              | 368±3μs             | 1.02    | import_iris.Iris.time_coord_systems                                                         |
|          | 750±8μs              | 753±4μs             | 1.00    | import_iris.Iris.time_coords                                                                |
|          | 666±10μs             | 672±10μs            | 1.01    | import_iris.Iris.time_cube                                                                  |
|          | 226±4μs              | 222±2μs             | 0.98    | import_iris.Iris.time_exceptions                                                            |
|          | 78.5±0.4μs           | 76.8±0.5μs          | 0.98    | import_iris.Iris.time_experimental                                                          |
|          | 186±2μs              | 186±2μs             | 1.00    | import_iris.Iris.time_fileformats                                                           |
|          | 250±1μs              | 253±5μs             | 1.01    | import_iris.Iris.time_fileformats__ff                                                       |
|          | 2.68±0.02ms          | 2.71±0.05ms         | 1.01    | import_iris.Iris.time_fileformats__ff_cross_references                                      |
|          | 80.0±0.3μs           | 79.9±0.7μs          | 1.00    | import_iris.Iris.time_fileformats__pp_lbproc_pairs                                          |
|          | 117±0.7μs            | 115±0.8μs           | 0.98    | import_iris.Iris.time_fileformats_abf                                                       |
|          | 410±4μs              | 408±5μs             | 1.00    | import_iris.Iris.time_fileformats_cf                                                        |
|          | 5.41±0.06ms          | 5.31±0.07ms         | 0.98    | import_iris.Iris.time_fileformats_dot                                                       |
|          | 75.2±0.6μs           | 74.3±0.8μs          | 0.99    | import_iris.Iris.time_fileformats_name                                                      |
|          | 262±6μs              | 257±4μs             | 0.98    | import_iris.Iris.time_fileformats_name_loaders                                              |
|          | 119±2μs              | 119±1μs             | 1.00    | import_iris.Iris.time_fileformats_netcdf                                                    |
|          | 125±1μs              | 123±1μs             | 0.98    | import_iris.Iris.time_fileformats_nimrod                                                    |
|          | 215±4μs              | 215±3μs             | 1.00    | import_iris.Iris.time_fileformats_nimrod_load_rules                                         |
|          | 780±3μs              | 780±7μs             | 1.00    | import_iris.Iris.time_fileformats_pp                                                        |
|          | 185±3μs              | 183±1μs             | 0.99    | import_iris.Iris.time_fileformats_pp_load_rules                                             |
|          | 135±1μs              | 135±0.7μs           | 1.01    | import_iris.Iris.time_fileformats_pp_save_rules                                             |
|          | 516±5μs              | 524±7μs             | 1.02    | import_iris.Iris.time_fileformats_rules                                                     |
|          | 220±2μs              | 219±2μs             | 1.00    | import_iris.Iris.time_fileformats_structured_array_identification                           |
|          | 84.2±0.3μs           | 82.8±0.4μs          | 0.98    | import_iris.Iris.time_fileformats_um                                                        |
|          | 162±3μs              | 161±2μs             | 0.99    | import_iris.Iris.time_fileformats_um__fast_load                                             |
|          | 139±0.8μs            | 138±0.9μs           | 0.99    | import_iris.Iris.time_fileformats_um__fast_load_structured_fields                           |
|          | 76.1±0.5μs           | 75.1±0.3μs          | 0.99    | import_iris.Iris.time_fileformats_um__ff_replacement                                        |
|          | 81.9±1μs             | 81.9±0.7μs          | 1.00    | import_iris.Iris.time_fileformats_um__optimal_array_structuring                             |
|          | 983±4μs              | 981±5μs             | 1.00    | import_iris.Iris.time_fileformats_um_cf_map                                                 |
|          | 137±1μs              | 137±0.9μs           | 1.00    | import_iris.Iris.time_io                                                                    |
|          | 173±1μs              | 173±3μs             | 1.00    | import_iris.Iris.time_io_format_picker                                                      |
|          | 230±2μs              | 232±5μs             | 1.01    | import_iris.Iris.time_iris                                                                  |
|          | 128±1μs              | 127±0.6μs           | 0.99    | import_iris.Iris.time_iterate                                                               |
|          | 8.44±0.09ms          | 8.38±0.09ms         | 0.99    | import_iris.Iris.time_palette                                                               |
|          | 2.21±0.04ms          | 2.24±0.03ms         | 1.02    | import_iris.Iris.time_plot                                                                  |
|          | 105±0.5μs            | 104±4μs             | 0.99    | import_iris.Iris.time_quickplot                                                             |
|          | 2.18±0.03ms          | 2.20±0.04ms         | 1.01    | import_iris.Iris.time_std_names                                                             |
|          | 1.78±0.03ms          | 1.83±0.03ms         | 1.03    | import_iris.Iris.time_symbols                                                               |
|          | 12.8±0.5ms           | 12.7±0.5ms          | 0.99    | import_iris.Iris.time_tests                                                                 |
|          | 261±3μs              | 255±2μs             | 0.98    | import_iris.Iris.time_third_party_cartopy                                                   |
|          | 4.79±0.03ms          | 4.82±0.04ms         | 1.01    | import_iris.Iris.time_third_party_cf_units                                                  |
|          | 120±0.7μs            | 118±0.8μs           | 0.98    | import_iris.Iris.time_third_party_cftime                                                    |
|          | 2.79±0.01ms          | 2.85±0.02ms         | 1.02    | import_iris.Iris.time_third_party_matplotlib                                                |
|          | 1.07±0ms             | 1.07±0.01ms         | 1.00    | import_iris.Iris.time_third_party_numpy                                                     |
|          | 174±1μs              | 171±1μs             | 0.98    | import_iris.Iris.time_third_party_scipy                                                     |
|          | 101±0.6μs            | 100±0.9μs           | 0.99    | import_iris.Iris.time_time                                                                  |
|          | 325±3μs              | 319±3μs             | 0.98    | import_iris.Iris.time_util                                                                  |
|          | 73.3±2μs             | 73.6±0.9μs          | 1.00    | iterate.IZip.time_izip                                                                      |
|          | 8.17±0.09ms          | 9.15±0.09ms         | 1.12    | load.LoadAndRealise.time_load((1280, 960, 5), False, 'FF')                                  |
|          | 24.6±0.2ms           | 23.9±0.4ms          | 0.97    | load.LoadAndRealise.time_load((1280, 960, 5), False, 'NetCDF')                              |
|          | 8.90±0.05ms          | 9.84±0.08ms         | 1.11    | load.LoadAndRealise.time_load((1280, 960, 5), False, 'PP')                                  |
|          | 8.11±0.08ms          | 9.10±0.1ms          | 1.12    | load.LoadAndRealise.time_load((1280, 960, 5), True, 'FF')                                   |
|          | 21.5±0.4ms           | 21.8±0.3ms          | 1.02    | load.LoadAndRealise.time_load((1280, 960, 5), True, 'NetCDF')                               |
|          | 8.86±0.04ms          | 9.91±0.04ms         | 1.12    | load.LoadAndRealise.time_load((1280, 960, 5), True, 'PP')                                   |
|          | 1.37±0.01s           | 1.56±0.01s          | 1.14    | load.LoadAndRealise.time_load((2, 2, 1000), False, 'FF')                                    |
|          | 21.2±0.3ms           | 22.0±0.3ms          | 1.04    | load.LoadAndRealise.time_load((2, 2, 1000), False, 'NetCDF')                                |
|          | 1.52±0.01s           | 1.74±0.02s          | 1.15    | load.LoadAndRealise.time_load((2, 2, 1000), False, 'PP')                                    |
|          | 1.37±0.01s           | 1.56±0.02s          | 1.14    | load.LoadAndRealise.time_load((2, 2, 1000), True, 'FF')                                     |
|          | 21.4±0.4ms           | 22.0±0.4ms          | 1.03    | load.LoadAndRealise.time_load((2, 2, 1000), True, 'NetCDF')                                 |
|          | 1.52±0.01s           | 1.73±0.02s          | 1.14    | load.LoadAndRealise.time_load((2, 2, 1000), True, 'PP')                                     |
|          | 4.01±0.07ms          | 4.34±0.04ms         | 1.08    | load.LoadAndRealise.time_load((50, 50, 2), False, 'FF')                                     |
|          | 20.4±0.2ms           | 20.3±0.3ms          | 0.99    | load.LoadAndRealise.time_load((50, 50, 2), False, 'NetCDF')                                 |
|          | 4.26±0.08ms          | 4.62±0.04ms         | 1.08    | load.LoadAndRealise.time_load((50, 50, 2), False, 'PP')                                     |
|          | 3.95±0.04ms          | 4.31±0.03ms         | 1.09    | load.LoadAndRealise.time_load((50, 50, 2), True, 'FF')                                      |
|          | 20.5±0.4ms           | 20.3±0.2ms          | 0.99    | load.LoadAndRealise.time_load((50, 50, 2), True, 'NetCDF')                                  |
|          | 4.27±0.02ms          | 4.62±0.02ms         | 1.08    | load.LoadAndRealise.time_load((50, 50, 2), True, 'PP')                                      |
|          | 33.3±3ms             | 34.3±3ms            | 1.03    | load.LoadAndRealise.time_realise((1280, 960, 5), False, 'FF')                               |
|          | 19.4±0.5ms           | 19.9±0.4ms          | 1.02    | load.LoadAndRealise.time_realise((1280, 960, 5), False, 'NetCDF')                           |
|          | 13.5±3ms             | 13.9±2ms            | 1.02    | load.LoadAndRealise.time_realise((1280, 960, 5), False, 'PP')                               |
|          | 25.6±0.7ms           | 25.7±2ms            | 1.01    | load.LoadAndRealise.time_realise((1280, 960, 5), True, 'FF')                                |
|          | 70.6±2ms             | 70.6±2ms            | 1.00    | load.LoadAndRealise.time_realise((1280, 960, 5), True, 'NetCDF')                            |
|          | 25.4±0.8ms           | 26.1±2ms            | 1.03    | load.LoadAndRealise.time_realise((1280, 960, 5), True, 'PP')                                |
|          | 440±4ms              | 491±2ms             | 1.12    | load.LoadAndRealise.time_realise((2, 2, 1000), False, 'FF')                                 |
|          | 2.81±0.08ms          | 3.00±0.07ms         | 1.07    | load.LoadAndRealise.time_realise((2, 2, 1000), False, 'NetCDF')                             |
|          | 444±3ms              | 498±3ms             | 1.12    | load.LoadAndRealise.time_realise((2, 2, 1000), False, 'PP')                                 |
|          | 445±3ms              | 498±2ms             | 1.12    | load.LoadAndRealise.time_realise((2, 2, 1000), True, 'FF')                                  |
|          | 2.87±0.1ms           | 2.98±0.1ms          | 1.04    | load.LoadAndRealise.time_realise((2, 2, 1000), True, 'NetCDF')                              |
|          | 450±3ms              | 503±2ms             | 1.12    | load.LoadAndRealise.time_realise((2, 2, 1000), True, 'PP')                                  |
|          | 1.53±0.07ms          | 1.74±0.07ms         | 1.13    | load.LoadAndRealise.time_realise((50, 50, 2), False, 'FF')                                  |
|          | 2.81±0.1ms           | 2.89±0.08ms         | 1.03    | load.LoadAndRealise.time_realise((50, 50, 2), False, 'NetCDF')                              |
|          | 1.62±0.09ms          | 1.68±0.06ms         | 1.04    | load.LoadAndRealise.time_realise((50, 50, 2), False, 'PP')                                  |
|          | 1.61±0.08ms          | 1.72±0.05ms         | 1.07    | load.LoadAndRealise.time_realise((50, 50, 2), True, 'FF')                                   |
|          | 2.93±0.1ms           | 3.01±0.09ms         | 1.03    | load.LoadAndRealise.time_realise((50, 50, 2), True, 'NetCDF')                               |
|          | 1.59±0.08ms          | 1.71±0.09ms         | 1.08    | load.LoadAndRealise.time_realise((50, 50, 2), True, 'PP')                                   |
|          | 370±4ms              | 371±4ms             | 1.00    | load.ManyVars.time_many_var_load                                                            |
|          | 8.26±0.03ms          | 9.21±0.07ms         | 1.12    | load.STASHConstraint.time_stash_constraint((1280, 960, 5), 'FF')                            |
|          | 9.02±0.07ms          | 10.1±0.06ms         | 1.12    | load.STASHConstraint.time_stash_constraint((1280, 960, 5), 'PP')                            |
|          | 1.37±0.01s           | 1.58±0.01s          | 1.16    | load.STASHConstraint.time_stash_constraint((2, 2, 1000), 'FF')                              |
|          | 1.55±0.01s           | 1.74±0.01s          | 1.12    | load.STASHConstraint.time_stash_constraint((2, 2, 1000), 'PP')                              |
|          | 3.99±0.03ms          | 4.38±0.01ms         | 1.10    | load.STASHConstraint.time_stash_constraint((2, 2, 2), 'FF')                                 |
|          | 4.26±0.04ms          | 4.70±0.06ms         | 1.10    | load.STASHConstraint.time_stash_constraint((2, 2, 2), 'PP')                                 |
|          | 8.21±0.1ms           | 9.19±0.09ms         | 1.12    | load.StructuredFF.time_structured_load((1280, 960, 5), False)                               |
|          | 5.03±0.08ms          | 5.96±0.03ms         | 1.18    | load.StructuredFF.time_structured_load((1280, 960, 5), True)                                |
|          | 1.35±0.01s           | 1.55±0.01s          | 1.15    | load.StructuredFF.time_structured_load((2, 2, 1000), False)                                 |
|          | 3.92±0.08ms          | 4.32±0.05ms         | 1.10    | load.StructuredFF.time_structured_load((2, 2, 2), False)                                    |
|          | 3.82±0.04ms          | 4.20±0.04ms         | 1.10    | load.StructuredFF.time_structured_load((2, 2, 2), True)                                     |
|          | 148±1ms              | 165±1ms             | 1.11    | load.TimeConstraint.time_time_constraint(20, 'FF')                                          |
|          | 23.8±0.2ms           | 24.2±0.2ms          | 1.02    | load.TimeConstraint.time_time_constraint(20, 'NetCDF')                                      |
|          | 163±0.9ms            | 181±1ms             | 1.11    | load.TimeConstraint.time_time_constraint(20, 'PP')                                          |
|          | 29.3±0.3ms           | 32.0±0.2ms          | 1.09    | load.TimeConstraint.time_time_constraint(3, 'FF')                                           |
|          | 23.2±0.2ms           | 23.8±0.2ms          | 1.03    | load.TimeConstraint.time_time_constraint(3, 'NetCDF')                                       |
|          | 31.7±0.1ms           | 34.4±0.2ms          | 1.09    | load.TimeConstraint.time_time_constraint(3, 'PP')                                           |
|          | 17.6±0.3ms           | 18.8±0.6ms          | 1.07    | load.ugrid.BasicLoading.time_load_file(1)                                                   |
|          | 41.1±0.5ms           | 45.6±1ms            | 1.11    | load.ugrid.BasicLoading.time_load_file(200000)                                              |
|          | 14.4±0.1ms           | 15.4±0.2ms          | 1.07    | load.ugrid.BasicLoading.time_load_mesh(1)                                                   |
|          | 21.9±0.5ms           | 23.7±0.4ms          | 1.08    | load.ugrid.BasicLoading.time_load_mesh(200000)                                              |
|          | 18.1±0.3ms           | 18.4±0.4ms          | 1.01    | load.ugrid.BasicLoadingTime.time_load_file(1)                                               |
|          | 20.2±0.6ms           | 21.6±0.5ms          | 1.07    | load.ugrid.BasicLoadingTime.time_load_file(200000)                                          |
|          | 14.4±0.3ms           | 14.9±0.3ms          | 1.03    | load.ugrid.BasicLoadingTime.time_load_mesh(1)                                               |
|          | 16.7±0.2ms           | 17.4±0.3ms          | 1.04    | load.ugrid.BasicLoadingTime.time_load_mesh(200000)                                          |
|          | 18.7±0.4ms           | 19.2±0.5ms          | 1.03    | load.ugrid.Callback.time_load_file_callback(1)                                              |
|          | 50.6±0.8ms           | 56.3±0.5ms          | 1.11    | load.ugrid.Callback.time_load_file_callback(200000)                                         |
|          | 18.8±0.3ms           | 19.4±0.5ms          | 1.04    | load.ugrid.CallbackTime.time_load_file_callback(1)                                          |
|          | 22.1±0.4ms           | 22.9±0.4ms          | 1.03    | load.ugrid.CallbackTime.time_load_file_callback(200000)                                     |
|          | 2.73±0.08ms          | 2.86±0.1ms          | 1.05    | load.ugrid.DataRealisation.time_realise_data(10000)                                         |
|          | 5.41±0.9ms           | 5.54±0.08ms         | 1.03    | load.ugrid.DataRealisation.time_realise_data(200000)                                        |
|          | 37.7±0.9ms           | 37.9±1ms            | 1.00    | load.ugrid.DataRealisationTime.time_realise_data(10000)                                     |
|          | 808±4ms              | 806±50ms            | 1.00    | load.ugrid.DataRealisationTime.time_realise_data(200000)                                    |
|          | 397±4ms              | 442±7ms             | 1.11    | merge_concat.Concatenate.time_concatenate(False)                                            |
|          | 396±3ms              | 440±5ms             | 1.11    | merge_concat.Concatenate.time_concatenate(True)                                             |
|          | 109±0.5M             | 109±0.2M            | 1.00    | merge_concat.Concatenate.tracemalloc_concatenate(False)                                     |
|          | 109±0.5M             | 109±0.2M            | 1.00    | merge_concat.Concatenate.tracemalloc_concatenate(True)                                      |
|          | 48.3±0.7ms           | 52.5±1ms            | 1.09    | merge_concat.Merge.time_merge                                                               |
|          | 1±0.3M               | 1.21±0.09M          | ~1.21   | merge_concat.Merge.tracemalloc_merge                                                        |
|          | 388±2ns              | 409±5ns             | 1.05    | mesh.utils.regions_combine.CombineRegionsComputeRealData.time_compute_data(50)              |
|          | 258±1ms              | 258±2ms             | 1.00    | mesh.utils.regions_combine.CombineRegionsComputeRealData.time_compute_data(500)             |
|          | 647±2k               | 650±2k              | 1.01    | mesh.utils.regions_combine.CombineRegionsComputeRealData.tracemalloc_compute_data(50)       |
|          | 60±0M                | 60.1±0M             | 1.00    | mesh.utils.regions_combine.CombineRegionsComputeRealData.tracemalloc_compute_data(500)      |
|          | 14.5±0.2ms           | 17.1±0.09ms         | 1.18    | mesh.utils.regions_combine.CombineRegionsCreateCube.time_create_combined_cube(50)           |
|          | 16.3±0.2ms           | 18.9±0.2ms          | 1.16    | mesh.utils.regions_combine.CombineRegionsCreateCube.time_create_combined_cube(500)          |
|          | 507±90k              | 517±90k             | 1.02    | mesh.utils.regions_combine.CombineRegionsCreateCube.tracemalloc_create_combined_cube(50)    |
|          | 12.4±0.09M           | 12.4±0.09M          | 1.00    | mesh.utils.regions_combine.CombineRegionsCreateCube.tracemalloc_create_combined_cube(500)   |
|          | 107±1ms              | 109±1ms             | 1.02    | mesh.utils.regions_combine.CombineRegionsFileStreamedCalc.time_stream_file2file(50)         |
|          | 701±9ms              | 704±4ms             | 1.00    | mesh.utils.regions_combine.CombineRegionsFileStreamedCalc.time_stream_file2file(500)        |
|          | 1.22±0.03M           | 1.23±0.03M          | 1.01    | mesh.utils.regions_combine.CombineRegionsFileStreamedCalc.tracemalloc_stream_file2file(50)  |
|          | 96.3±0.04M           | 96.3±0.05M          | 1.00    | mesh.utils.regions_combine.CombineRegionsFileStreamedCalc.tracemalloc_stream_file2file(500) |
|          | 66.9±0.7ms           | 69.8±0.8ms          | 1.04    | mesh.utils.regions_combine.CombineRegionsSaveData.time_save(50)                             |
|          | 658±4ms              | 659±3ms             | 1.00    | mesh.utils.regions_combine.CombineRegionsSaveData.time_save(500)                            |
|          | 1.15±0.02M           | 1.14±0.01M          | 0.99    | mesh.utils.regions_combine.CombineRegionsSaveData.tracemalloc_save(50)                      |
|          | 96.2±0.02M           | 96.2±0.03M          | 1.00    | mesh.utils.regions_combine.CombineRegionsSaveData.tracemalloc_save(500)                     |
|          | 2.1752849999999997   | 2.1752849999999997  | 1.00    | mesh.utils.regions_combine.CombineRegionsSaveData.track_filesize_saved(50)                  |
|          | 216.01528499999998   | 216.01528499999998  | 1.00    | mesh.utils.regions_combine.CombineRegionsSaveData.track_filesize_saved(500)                 |
|          | 6.57±0.05ms          | 6.73±0.04ms         | 1.02    | plot.AuxSort.time_aux_sort                                                                  |
|          | 76.7±2ms             | 78.3±3ms            | 1.02    | regridding.CurvilinearRegridding.time_regrid_pic                                            |
|          | 136±3M               | 136±3M              | 1.00    | regridding.CurvilinearRegridding.tracemalloc_regrid_pic                                     |
|          | 99.1±1ms             | 98.6±2ms            | 0.99    | regridding.HorizontalChunkedRegridding.time_regrid_area_w                                   |
|          | 49.9±3ms             | 50.0±6ms            | 1.00    | regridding.HorizontalChunkedRegridding.time_regrid_area_w_new_grid                          |
|          | 106±0.06M            | 106±0.05M           | 1.00    | regridding.HorizontalChunkedRegridding.tracemalloc_regrid_area_w                            |
|          | 147±0.6M             | 147±0.02M           | 1.00    | regridding.HorizontalChunkedRegridding.tracemalloc_regrid_area_w_new_grid                   |
|          | 4.09±0.07ms          | 4.58±0.07ms         | 1.12    | save.NetcdfSave.time_netcdf_save_cube(50, False)                                            |
|          | 72.6±0.8ms           | 74.8±1ms            | 1.03    | save.NetcdfSave.time_netcdf_save_cube(50, True)                                             |
|          | 52.4±0.7ms           | 53.1±0.9ms          | 1.01    | save.NetcdfSave.time_netcdf_save_cube(600, False)                                           |
|          | 561±2ms              | 567±9ms             | 1.01    | save.NetcdfSave.time_netcdf_save_cube(600, True)                                            |
|          | 89.1±0.9ns           | 88.8±0.4ns          | 1.00    | save.NetcdfSave.time_netcdf_save_mesh(50, False)                                            |
|          | 55.9±0.7ms           | 57.6±1ms            | 1.03    | save.NetcdfSave.time_netcdf_save_mesh(50, True)                                             |
|          | 89.9±0.4ns           | 90.9±1ns            | 1.01    | save.NetcdfSave.time_netcdf_save_mesh(600, False)                                           |
|          | 494±2ms              | 495±8ms             | 1.00    | save.NetcdfSave.time_netcdf_save_mesh(600, True)                                            |
|          | 27.2±0.1k            | 28.6±0.06k          | 1.05    | save.NetcdfSave.tracemalloc_netcdf_save(50, False)                                          |
|          | 1.52±0.1M            | 1.66±0.1M           | 1.09    | save.NetcdfSave.tracemalloc_netcdf_save(50, True)                                           |
|          | 27.2±0.1k            | 28.6±0.09k          | 1.05    | save.NetcdfSave.tracemalloc_netcdf_save(600, False)                                         |
|          | 216±20M              | 199±20M             | 0.92    | save.NetcdfSave.tracemalloc_netcdf_save(600, True)                                          |
|          | 42.7±1ms             | 48.1±1ms            | 1.13    | stats.PearsonR.time_lazy                                                                    |
|          | 19.1±0.3ms           | 19.2±0.4ms          | 1.00    | stats.PearsonR.time_real                                                                    |
|          | 20±0.08M             | 20±0.08M            | 1.00    | stats.PearsonR.tracemalloc_lazy                                                             |
|          | 18.4±0.01M           | 18.4±0.01M          | 1.00    | stats.PearsonR.tracemalloc_real                                                             |
|          | 23.0±2ms             | 23.4±0.5ms          | 1.01    | trajectory.TrajectoryInterpolation.time_trajectory_linear                                   |
|          | 61.3±0.4ms           | 62.1±0.7ms          | 1.01    | trajectory.TrajectoryInterpolation.time_trajectory_nearest                                  |
|          | 23.3±0.01M           | 23.3±0.01M          | 1.00    | trajectory.TrajectoryInterpolation.tracemalloc_trajectory_linear                            |
|          | 12.1±0.05M           | 12.1±0.05M          | 1.00    | trajectory.TrajectoryInterpolation.tracemalloc_trajectory_nearest                           |

Benchmarks that have got worse:

| Change   | Before [1a9bdaa5]    | After [f04064e7]    |   Ratio | Benchmark (Parameter)                                      |
|----------|----------------------|---------------------|---------|------------------------------------------------------------|
| +        | 370±2ms              | 548±3ms             |    1.48 | load.StructuredFF.time_structured_load((2, 2, 1000), True) |

Generated by GHA run 10705932987

@pp-mo
Copy link
Member Author

pp-mo commented Sep 5, 2024

Also tested : a "minimal" noxfile like this :

import nox

#: Default to reusing any pre-existing nox environments.
nox.options.reuse_existing_virtualenvs = False  # was True for Iris


def show_env(session: nox.sessions.Session):
    session.run("echo", '"NOX TEST LIVE-ENV DUMP == START "', external=True)
    session.run("env", external=True)
    session.run("echo", '".. == END NOX TEST LIVE-ENV DUMP."', external=True)
    session.run("echo", 'NOX TEST session env."', external=True)
    msg = "\n".join(("  " + str(item)) for item in session.env.items())
    print(msg)
    session.run("echo", '.. = END NOX TEST session env."', external=True)


@nox.session(venv_backend="conda")
def basic(session: nox.sessions.Session):
    show_env(session)

@nox.session(venv_backend="conda")
def withproj(session: nox.sessions.Session):
    session.conda_install("proj", "pyproj")
    show_env(session)

Results

Too long+tedious to copy here, but it suffices to say that PROJ_DATA is not set in the environment where proj is installed.

Checking the nox code, I believe that the Session.conda_install() call eventually calls popen, setting any specific variables from session.env, but there is no effort to capture any env changes that the install makes.
I have also checked that the user "conda install" does set env variables, i.e. effectively it actions activation scripts just like "conda activate" does.

So I conclude that nox.Session.conda_install() just does not support additional activation steps.
This is how an unsuitable PROJ_DATA setting manages to upset the installation of a later version of proj.

However, consulting also our SSS modulefiles, which likewise include variables from activation scripts so as to mimic a "conda activate", it seems that PROJ_DATA is quite possibly the only one which is likely to cause trouble in this way. So in practice it's a marginal problem.

In this specific case, another way to fix it could be to set PROJ_DATA="invalid", since Proj seems to ignore any value which is not a suitable filepath. I think you can do that by setting session.env["PROJ_DATA"] = "invalid" in the nox code

@pp-mo pp-mo removed the benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts label Sep 5, 2024
@pp-mo pp-mo closed this Sep 6, 2024
@pp-mo pp-mo mentioned this pull request Sep 6, 2024
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