amuse icon indicating copy to clipboard operation
amuse copied to clipboard

Update tests

Open rieder opened this issue 6 years ago • 15 comments

While checking pytest I found that many (code) tests aren't doing a great job... Many are incomplete (testing only very basic things), run for a very long time, produce unnecessary plots and/or don't check the results of the test at all.

We should revisit the tests in a next AMUSE update session, this may take some grinding but I think we have to impose some "quality control" on the tests...

Perhaps fixing tests (and moving them into their respective packages) can be the main goal for AMUSE 13.1?

rieder avatar Oct 04 '19 14:10 rieder

We should remove the plotting from tests asap, its not a good way to test AMUSE. I also agree with the other remarks: in addition, and maybe more importantly: tests should better take into account whether AMUSE is build w/o MPI support (this at the moment is the biggest hurdle for development of MPI-less AMUSE) (its something deep in the definition of the test classes)

ipelupessy avatar Oct 05 '19 08:10 ipelupessy

test_secularmultiple is the prime offender here, its tests are just not done right for pytest (just printing results etc, it's now meant to be run/checked manually clearly). Also, TestFi test2 is not working for me (hangs). Will further check other tests.

rieder avatar Oct 07 '19 11:10 rieder

Would it be possible to have a test class for the various domains that tests the required things for that domain? E.g. a basic class that tests starting/stopping/running code, a gravity class that tests setting particle attributes / parameters like epsilon_squared, etc. That could save a lot of work writing new tests and would make sure codes behave similarly when they should. A specific code test could then override/disable these when there's a reason to. Also, with pytest, the tests could have clearer names than "test14"...

rieder avatar Oct 07 '19 11:10 rieder

test_gravity_codes.py more or less does this currently. But I think we should not test all* gravity codes in one test.

*: all at the time the test was written, I guess

rieder avatar Oct 07 '19 11:10 rieder

I have done some work to speed up the compile tests (the tests generated a new identical executable for each test, now its reused (its still possible to generate new ones if necessary)..as a side effect the travis tests now also report success on the python3 branch..

ipelupessy avatar Oct 08 '19 08:10 ipelupessy

Great!

rieder avatar Oct 08 '19 08:10 rieder

problem is that the macos travis tests report ok, in spite of quite few:

The Open MPI wrapper compiler was unable to find the specified compiler
x86_64-apple-darwin13.4.0-clang in your PATH.

errors... probably the travis file needs to be updated...

ipelupessy avatar Oct 08 '19 09:10 ipelupessy

I’ll have a look at that.

rieder avatar Oct 08 '19 10:10 rieder

secular multiple is broken on recent compilers;

also: with pytest tests are running slowly/hanging unless run with mpiexec -n 1 in front

ipelupessy avatar Oct 14 '19 09:10 ipelupessy

running all code tests in one go results errors:

ORTE_ERROR_LOG: The system limit on number of pipes a process can open was reached in file base/iof_base_setup.c at line 115

this can be fixed by increasing open file limit e.g. ulimit -n 8192 after this, on my machine it runs out of memory (some sort of on disk shared mem):

t appears as if there is not enough space for /tmp/openmpi-sessions-1002@tumbler_0/28232/888/shared_mem_pool.tumbler (the shared-memory backing
file). It is likely that your MPI job will now either abort or experienc eperformance degradation.

ipelupessy avatar Oct 14 '19 12:10 ipelupessy

this last can be alleviated by: --mca orte_tmpdir_base <dir> option to openmpi

ipelupessy avatar Oct 14 '19 12:10 ipelupessy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 04 '22 15:03 stale[bot]

keep open or replace with a new issue?

ipelupessy avatar Mar 11 '22 15:03 ipelupessy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 10 '22 15:05 stale[bot]

keep open as long as now new issue in place

ipelupessy avatar May 10 '22 15:05 ipelupessy