ImperialCollegeLondon / pyrealm

Development of the pyrealm package, providing an integrated toolbox for modelling plant productivity, growth and demography using Python.
https://pyrealm.readthedocs.io/
MIT License
21 stars 8 forks source link

Scaling problems with profiling on GitHub Actions and locally #215

Closed davidorme closed 5 months ago

davidorme commented 5 months ago

Describe the bug

The PR to scale up the size of the profiling test data to make the results less noisy has gone too far. Actions are crashing out and - although the errors are a bit opaque - it seems likely this is due to the runners running out of memory (16GB on ubuntu-latest). @MarionBWeinzierl has seen the same problem running the profiling suite on a 16GB Ubuntu laptop.

I've run some simple peak memory usage estimates locally and changing the pmodel scale up factor lon gives the following peak memory usage using /usr/bin/time -l outputs:

pmodel_profile_scaleup peak memory footprint in GB
40 (current) 35.84
20 19.74
10 9.95

We need to scale down the tests and it would be useful to make the scaling factors configurable.

To Reproduce

See here:

https://github.com/ImperialCollegeLondon/pyrealm/actions/runs/8704343221