User Tools

Site Tools


dev:regtesting

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dev:regtesting [2015/09/01 07:58] – [CP2K Regression Testing] vondeledev:regtesting [2018/10/08 19:59] oschuett
Line 1: Line 1:
 ====== CP2K Regression Testing ====== ====== CP2K Regression Testing ======
  
-CP2K comes with over 2500 test input files (located in [[src>cp2k/tests]]) which serve as both examples on how to use the many features in CP2K and also as a method for developers to test modifications and extensions to CP2K. In order to reduce the chance of bugs being introduced into the code, and ensure that all parts of the code are working, we recommend that :+CP2K comes with over 2500 test input files (located in [[src>tests]]) which serve as both examples on how to use the many features in CP2K and also as a method for developers to test modifications and extensions to CP2K. In order to reduce the chance of bugs being introduced into the code, and ensure that all parts of the code are working, we recommend that :
   * all developers complete a regression test before committing any changes to SVN.   * all developers complete a regression test before committing any changes to SVN.
   * all users complete a test before using a self-compiled binary for their projects   * all users complete a test before using a self-compiled binary for their projects
  
 ==== Dashboard ==== ==== Dashboard ====
-A number of regtests are run automatically by various members of our community. The results of these tests are collected centrally at the [[http://dashboard.cp2k.org | Dashboard ]]. If errors are detected, the developer responsible for the change should fix it immediately.+A number of regtests are run automatically by various members of our community. The results of these tests are collected centrally at the [[http://dashboard.cp2k.org | Dashboard ]]. If errors are detected, the developer responsible for the change should fix it immediately. The output logs provide the arch file used for these tests, which might suggest useful settings for that particular architecture.
  
 ==== Code Coverage ==== ==== Code Coverage ====
Line 13: Line 13:
 ===== How does it work? ===== ===== How does it work? =====
  
-The regression test suite is run using the [[src>cp2k/tools/regtesting/do_regtest | do_regtest]] script. +The regression test suite is run using the [[src>tools/regtesting/do_regtest | do_regtest]] script. 
 It performs the following tasks: It performs the following tasks:
    * update to the current SVN version (including new tests)    * update to the current SVN version (including new tests)
Line 23: Line 23:
  
 ===== Running the regtests ===== ===== Running the regtests =====
 +
 +==== Step 0: make based testing ====
 +
 +  * If you are able to build and run cp2k on the local machine the easiest way is to start the regtesting by running ''make ARCH=... VERSION=... test''
 +  * Be careful about the value of ''-j'' parameter you will use; running too many tests in parallel can cause tests to fail due to lack of system and/or GPU memory.
 +  * If this fails (e.g. on batch systems), continue with Step 1 else go to interpretation.
  
 ==== Step 1: Preparation ==== ==== Step 1: Preparation ====
-  * You must be able to build and run cp2k on the given machine, the rest should be 'easy' 
   * Decide on a directory for doing the regtest, there will be plenty of files in this dir (after a while) so make it something like ''$HOME/rt''   * Decide on a directory for doing the regtest, there will be plenty of files in this dir (after a while) so make it something like ''$HOME/rt''
   * Checkout a version of cp2k into ''$HOME/rt''. If you set up your svn account so that you don't need to provide a password for doing svn update, things will be more convenient later on.   * Checkout a version of cp2k into ''$HOME/rt''. If you set up your svn account so that you don't need to provide a password for doing svn update, things will be more convenient later on.
Line 32: Line 37:
 ==== Step 2: Running ==== ==== Step 2: Running ====
 <code> <code>
-cp2k/tools/regtesting/do_regtest --help+$ tools/regtesting/do_regtest --help
 Usage: do_regtest [OPTION] Usage: do_regtest [OPTION]
 Run the CP2K regression test suite Run the CP2K regression test suite
Line 93: Line 98:
  
 ===== Adding and Resetting Tests===== ===== Adding and Resetting Tests=====
-The test-suite is fully controlled by the following files in the [[src>cp2k/tests]] directories+The test-suite is fully controlled by the following files in the [[src>tests]] directories
  
 ^ File Name            ^ Content   | ^ File Name            ^ Content   |
dev/regtesting.txt · Last modified: 2023/10/19 14:03 by krack