params/mirrors cleaning + usable test suite (issues #11 and #10)
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.pyandrun.pyhave been merged. These files were huge copy/paste of each other. The purpose was to be sure that theworkspacefolder was created by rank#0 process. Now,run.pychecks whether MPI is used or not and does what is expected (automatically). -
wutilsusedsetandgrepunix command to display environment variables. This code has been rewritten in order to work also on windows. - Variables such as
OMP_NUM_THREADSorMKL_DYNAMICare now set to predefined and controlled values if (and only if) they are not previously set by the user. For exampleOMP_NUM_THREADSis set to 1 ifOMP_NUM_THREADSdoes not appear in the list of environment variables.
fdtd
- The tests named
fdtd1d_1candfdtd1d_1dhave been modified in order to:- compute something even if
--noguiis set. - completely hide
matplotlibcommands when--noguiis set (these tests failed if they were run in a ssh terminal without X display)
- compute something even if
mirrors
- Some old files have been put in a new
mirrors/atticfolder: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
figshas 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.pyhas been deleted (same asmirrors/mirror_ss.pyandmirrors/tests/test1/simple.py) -
mirrors/tests/test1/simple.pywas moved tomirrors/tests - all
loop*.pyhave been reduced in size so that they run in a few seconds. - all
loop*.pycan 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