-
Notifications
You must be signed in to change notification settings - Fork 81
HOWTO define & run regression tests
COOLFluiD uses the ctest tool from cmake to enable regression testing. COOLFluiD users are strongly encouraged to make maximum use of this capability to keep the code reliable and bug-free (if this is ever possible ...) by defining appropriate testcases to verify specific features, especially if newly implemented.
Each case file should start with a comprehensive description of what features are tested by the testcase in question. Then, they should include a line starting with:
### Residual =
and followed by a float. This tells cmake to compare the residual reached at the end of the simulation with the given one as criterion for passing the test. For example:
### Residual = -10.0011
In order to add a testcase to the regression test-bed, one has to edit the file CMakeLists.txt inside the testcases folder in the plugin of choice (typically one implementing a physical model) and add lines in this format:
cf_add_case( MPI ... CASEDIR ... PCASE ... UCASE ... CASEFILES ... )
where each keyword is followed by:
-
MPI: list of number of processes (e.g. 1 2 4) separated by spaces or thedefaultkeyword (=2); -
CASEDIR: folder where the input files are found (relative path assuming to be insidetestcases); -
PCASE: input file name (conventionally with extension .CFcase) for performance test; -
UCASE: input file name (conventionally with extension .CFcase) for unit test; -
CASEFILES: list of additional files (.CFmesh,.inter, etc.) that must be copied toCASEDIRfor performing the test.
You can look at the following example taken from CMakeLists.txt inside plugins/NavierStokes/testcases:
cf_add_case( MPI default CASEDIR Jets2D PCASE jets2DFluctSplit.CFcase CASEFILES jets2D.thor jets2D.SP )
In order to apply regression testing on all cases declared inside the corresponding CMakeLists.txt files, one must execute:
make test
from inside the basebuild_dir/BUILD_MODE directory (see here).
When running the tests, a screen shot similar to the following will appear:

The files CTestCostData.txt and LastTest.log are always created inside the Testing/Temporary directory. If at least one testcase fails, LastTestFailed.log is also created inside the same folder.
The COOLFluiD team is involved and open to new collaborations in Horizon2020, ESA and other research projects dealing with complex multi-disciplinary problems and computational challenges.
Training sessions and consulting services can also be provided on demand.
For any request or suggestions please contact andrea.lani@gmail.com

Parallel mesh decomposition

High-performance computing (strong scaling on NASA Pleiades for 1/2 billion-cells 3D grid)

Chemically reacting flows and plasma

Complex all-speed flow simulations