Skip to content

params/mirrors cleaning + usable test suite (issues #11 and #10)

Boman Romain requested to merge testsuite into master

Context

This pull request solves:

  • issue #11 : "The test suite lasts too long".
  • issue #10 : "Several tests still display windows even with "nogui" option".

Modifications

root / fwk

  • mpirun.py and run.py have been merged. These files were huge copy/paste of each other. The purpose was to be sure that the workspace folder was created by rank#0 process. Now, run.py checks whether MPI is used or not and does what is expected (automatically).
  • wutils used setand grep unix command to display environment variables. This code has been rewritten in order to work also on windows.
  • Variables such as OMP_NUM_THREADS or MKL_DYNAMIC are now set to predefined and controlled values if (and only if) they are not previously set by the user. For example OMP_NUM_THREADS is set to 1 if OMP_NUM_THREADS does not appear in the list of environment variables.

fdtd

  • The tests named fdtd1d_1c and fdtd1d_1d have been modified in order to:
    • compute something even if --nogui is set.
    • completely hide matplotlib commands when --nogui is set (these tests failed if they were run in a ssh terminal without X display)

mirrors

  • Some old files have been put in a new mirrors/attic folder: imported_10x10.py, imported_30x30.py, loop_old.py, loop_old2.py
  • Some broken tests have been moved to mirrors/broken: NISP_Leg_cond.py (too old matplotlib), mirrors01.py, mirrors03.py, mirrors_test_battery.py (bad mesh with wrong normals)
  • A folder named figs has been created for the scripts producing figures for reports: LSP*.py, numpy_matplotlib*
  • mirrors/mirror_ss.py: the only working model for mirror! It has been cleaned. An "nogui" option has been added in the parameter list. Its defaut size has been decreased.
  • mirror source code:
    • removal of unneeded header
    • basic code formatting
    • removal of unused code
    • additional comments/doc
  • Tests:
    • mirrors02.py has been deleted (same as mirrors/mirror_ss.py and mirrors/tests/test1/simple.py )
    • mirrors/tests/test1/simple.py was moved to mirrors/tests
    • all loop*.py have been reduced in size so that they run in a few seconds.
    • all loop*.py can be run either with GUI or not with the desired result.

Test suite

  • The test suite now runs in less than a minute (with 6 cores).
  • It has been tested on ubuntu and windows

Merge request reports