Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
compilation:tests [2015/03/13 15:28]
ltavard [Run the tests]
compilation:tests [2016/11/10 16:49] (current)
ltavard
Line 9: Line 9:
 After building your installation of Elmer/Ice, you run the tests with the command line After building your installation of Elmer/Ice, you run the tests with the command line
 <code> <code>
-ctest+ctest -L elmerice (run all Elmer/Ice tests) 
 +ctest -L elmerice-fast (set of fast Elmer/Ice tests) 
 +ctest -L elmerice-long (set of slow Elmer/Ice tests) 
 +ctest -L netcdf (set of test using NetCDF library)
 </code> </code>
-or+or to run only the tests whose names match the given regular expression
 <code> <code>
-ctest -R //TestCase_Name//+ctest -R <expression>
 </code> </code>
-===== Options ===== 
-Default option wich runs all the tests: 
-  * <code> runTest.sh </code> 
-For running all tests and sending results by e-mail: 
-  * <code> runTest.sh --all or -a </code> 
-Next option runs only selection of directory with "space-separator", and there is  
-possibility to send results by e-mail: 
-  * <code> runTest.sh --selection or -s </code> 
-You choose one ElmerIceSolver keyword and it runs all directories with this  
-solver, and there is possibility to send results by e-mail: 
-  * <code> runTest.sh --solvers or -so </code> 
-Resume all the options: 
-  *  <code> runTest.sh --help </code> 
  
 ===== Results ===== ===== Results =====
Line 33: Line 23:
 Run the tests will print some informations:\\ Run the tests will print some informations:\\
 <code> <code>
-============================================================= +      Start  1: Teterousse3a 
-                    Test ElmerIce Solvers + 1/36 Test  #1: Teterousse3a .....................***Passed    503.64 sec 
-                     +      Start  2: Dating 
-Option []: All tests without email option + 2/36 Test  #2Dating ...........................***Passed    2.73 sec
-============================================================= +
-test 1 :                  Buoyancy                      [FAILED] +
-Comparison failed: look at [File_log/OutputBuoyancy.log] for details +
-test 2 :          ComputeDevStress [PASSED] +
-test 3                   Contact         [PASSED - Diff Time-]+
 </code> </code>
-[FAILED] in case where difference between results are upper 1E-6\\ 
-[PASSED] in case where there is no difference\\ 
-[PASSED - Diff Time-] where there is a difference with time CPU\\ 
  
-  * In directory ''[ELMER_TRUNK]/elmerice/Tests/File_log/'' +  * In directory ''build/elmerice/Testing/Temporary/'' 
-This directory is created if there are some troubles in the simulation (''OutputSIF_<TestName>.log'') or in the comparison of results (''Output_<TestName>.log'').+We can find some files:\\ 
 +**''LastTest.log ''** with all the details about the tests and \\ 
 +**''LastTestsFailed.log''**  with the list of failed tests. 
 +===== How to make cmake test-case ===== 
 +  * Create new directory under ''elmerice/Tests/''
  
-===== How to make test-case ===== +  Define your analysis.SIF file, mesh files, f-90 files and ELMERSOLVER_STARTINFO file 
-  Create new directory under ''elmerice/Tests/'', define your analysis (.SIF, mesh files, ...). +☛ In order to test a norm resulting from a solver <N>add those lines at the end of .sif file 
-☛ Notefor the outputsfiles named ''**results.dat**'' and ''**result.dat.names**'' __have to be created__. \\ +<code> 
-If do not exist, you can write a script to configure their creation see /Tests/InvMeth_AdjBeta for example).+Solver 4 :: Reference Norm = real <norm> 
 +Solver 4 :: Reference Norm Tolerance = Real <tol> 
 +$fprintf( stderr"TEST CASE 1\n"); 
 +RUN 
 +$fprintf( stderr, "END TEST CASE 1: Target NRM=<norm>,EPS=<tol>\n" ); 
 +</code> 
 +Equivalent to those lines inside the solver block to be tested 
 +<code> 
 +Reference Norm = real <norm> 
 +Reference Norm Tolerance = Real <tol> 
 +</code>
  
-  * Define how to run the test write a Makefile (named Makefile), that details two targets:\\ +  * Create CMakeLists.txt file in the test directory with
-- ''run'': how to run the test\\ +
-- ''clean'': how to clean up if successfull. +
-  * Create repertory DATA/ in test-case repertory and put your validation-file named ''valid_<NameDirectory>.txt''+
 <code> <code>
-     Step1Data1 [space] Step1Data2 [space] Step1Data3 .... +INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) 
-     Step2Data1 [space] Step2Data2 [space] Step2Data3 ....+CONFIGURE_FILE(<sif_name>.sif <sif_name>.sif COPYONLY) 
 +ADD_ELMERICETEST_MODULE(<test_name> <module_name> <module_source.f90>) 
 +FILE(COPY ELMERSOLVER_STARTINFO <file1> <file2> <directory1> ...DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/"
 +ADD_ELMERICE_TEST(<test_name>
 +ADD_ELMERICE_LABEL(<test_name> <label>)
 </code> </code>
-Create a file named ''version'' to describe author and date of the test, Research Institute & ClusterElmer(/Ice) version:+ 
 +__For label__\\ 
 +If the test is < 10s<label>=elmerice-fast \\ 
 +If the test is > 100s<label>=slow \\ 
 + 
 +  * Create runTest.cmake with
 <code> <code>
-                 file established: +INCLUDE(${TEST_SOURCE}/../test_macros.cmake) 
-                 Date +EXECUTE_PROCESS(COMMAND <command_name> <arg1> <arg2> ...) 
-                 Author,Institute +RUN_ELMERICE_TEST()
-                 Cluster +
-                 Revision ID+
 </code> </code>
----- +
-See details in ''[ELMER_TRUNK]/elmerice/Tests/ElmerIceSolver_test_how-to.txt''+
-----+
  
compilation/tests.1426260518.txt.gz · Last modified: 2015/03/13 15:28 by ltavard
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0