Update tests
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?
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)
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.
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"...
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
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..
Great!
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...
I’ll have a look at that.
secular multiple is broken on recent compilers;
also: with pytest tests are running slowly/hanging unless run with mpiexec -n 1 in front
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.
this last can be alleviated by: --mca orte_tmpdir_base <dir> option to openmpi
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.
keep open or replace with a new issue?
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.
keep open as long as now new issue in place