LLNL / echemfem

Finite Element Method for Electrochemical Transport (EchemFEM)
MIT License
20 stars 5 forks source link

Errors in tests and memory requirements #9

Closed sudarshanv01 closed 4 months ago

sudarshanv01 commented 5 months ago

Hello again @tlroy, I am trying to get a gauge for the memory requirements of running all the unit tests. I understand that you recommend running just one of the tests tests/test_advection_diffusion_migration_darcy.py instead of the whole set of tests. But when I run just pytest it seems to segfault, and running each unit test separately seems to give me specific errors such as

FAILED tests/test_advection_diffusion_migration_darcy.py::test_convergence_low_peclet - assert 0.7524928310011721 < (0.29 * 0.6053442046721568)
FAILED tests/test_advection_diffusion_migration_darcy.py::test_convergence_high_peclet - assert 0.27139794880604756 < (0.35 * 0.45044972210083223)

for tests/test_advection_diffusion_migration_darcy.py, for example.

For reference, I am running a VM with firedrake installed (as you suggested here: https://github.com/LLNL/echemfem/issues/8) on a M1 Mac.

EDIT: based on https://github.com/openjournals/joss-reviews/issues/6531#issuecomment-2016035376

tlroy commented 5 months ago

Thank you @sudarshanv01 for bringing these things to my attention.

I have not gauged the memory requirements of the tests. That is a good idea. You will need to increase the memory allocation for your docker container since the default is only 1 GB. I have mine at 16 GB but 4 GB is probably enough for the tests. Since the tests are convergence tests, they are not very fast so I recommend in the documentation to only run tests/test_advection_diffusion_migration.py in order to test the installation.

The Darcy tests should not actually be in the main branch. They were added by mistake and I will remove them. The Darcy and two-phase Darcy features are not full tested and are not used in any public examples or mentioned in the documentation.

sudarshanv01 commented 4 months ago

Sounds good!