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

CI stops running because tests are using too much memory. #1090

Closed
chrisiacovella opened this issue Feb 8, 2023 · 0 comments
Closed

CI stops running because tests are using too much memory. #1090

chrisiacovella opened this issue Feb 8, 2023 · 0 comments

Comments

@chrisiacovella
Copy link
Contributor

Describe the behavior you would like added to mBuild
CI stops running (particularly on ubuntu) midway through tests in my branch where the bond graph has been switched to networkx. Networkx seems to have a much higher memory usage than our old bond graph (but also much, much better performance). I'll note that commenting out the most memory intensive tests (related to the silica interface testing) allows the CI to complete.

Describe the solution you'd like
We should probably streamline some of the testing. For example, use smaller system sizes in the packmol test (e.g., test_sidemax uses quite a bit of memory) and moving out stress tests (e.g., the silica surface testing) to a separate testing repo (that can be run locally instead via CI). This testing suite could also automatically perform profiling which would likely be useful to see if modifications cause significant degradation in performance. Streamlining CI to complete faster would also be very helpful to developers.

I've attached a CSV file of a profile of the current tests, gathered using pytest monitor (documentation found here: https://pytest-monitor.readthedocs.io/en/latest/?badge=latest. This should give us a good place to start in terms of thinking about test streamlining.

After installation, running is pretty easy:

pytest --db ./monitor.db

sqlite3 ./monitor.db

sqlite>.headers on
sqlite>.mode csv
sqlite> .output pytest_profile.csv
sqlite> select ITEM, CPU_USAGE, MEM_USAGE from TEST_METRICS;
sqlite> .quit

pytest_data.csv

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

No branches or pull requests

2 participants