Skip to content

HOWTO define & run regression tests

andrealani edited this page Oct 28, 2014 · 2 revisions

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 the default keyword (=2);
  • CASEDIR: folder where the input files are found (relative path assuming to be inside testcases);
  • 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 to CASEDIR for 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:

Screen shot of testing

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.

Contacts

Home

Gallery

HOWTO

2019 NASA Ames presentation

2014 NASA Ames presentation


parallel computations of complex problems

Parallel mesh decomposition


Scalability in large scale simulation

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


Modeling of high-speed reacting flows and plasma

Chemically reacting flows and plasma


Numerical Schlieren of turbulent flow on wing computed with RDS-LES

Complex all-speed flow simulations

Clone this wiki locally