Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/cp2kPublic

tests

Directory actions

More options

Directory actions

More options

Latest commit

 

History

History

tests

This directory contains input files for CP2K's tests and regression tests.

Automatic test results are collected onCP2K's dashboard for differentmachines. For documentation on CP2K's input files, please refer to theInput Reference Manual.

Note: the test names make common use of acronyms. For explanations, please refer to theGlossary of Acronyms and Abbreviations.

Regression Tests

There is a very large number of regtests. For this reason, each individual regtest should be fast(e.g. shorter than a minute on a regular laptop with an sdbg version of the code). Since these testsdo not need to return meaningful results (just consistent results), one can use e.g. small basissets, low cutoffs, small EPS_DEFAULT, ...

Test Directories Structure

The test-suite is fully controlled by the following files:

  • TEST_DIRS is a list of directories that contain tests.
  • matchers.py implements the matchers that are executed after an input file was runto check if the output matches expectations.

Additionally, each test-subdirectory containTEST_FILES.toml, which lists the input files thatshould be run alongside with a list of matchers. Commonly each matcher takes a reference value and atolerance as input.

Each regtests can list zero, one, or more matchers:

"wat_mode_sel.inp"                      = []"Ar.inp"                                = [{matcher="M001", tol=3e-13, ref=-21.04944231395054}]"h2_gapw_2-2.inp"                       = [{matcher="M001", tol=1e-12, ref=-1.12703481947359},                                           {matcher="M092", tol=1e-8,  ref=4.08763868}]

Matchers can be easily renamed. For example, the following command renames matcherM001 toE_total:

sed -i  s/\"M001\"/\"E_total\"/g  matchers.py*/TEST_FILES.toml*/*/TEST_FILES.toml*/*/*/TEST_FILES.toml

Some regression testing directories contain:

  • untested_inputs: list of input files, which have a more meaningful setup compared to theregtests, but that are not checked at every single commit.

How to Run Regression Tests

For information on how to run regression testing, please refer to theregression testing documentation.

How to Add a Regression Test

To add a regression test, commit the.inp file and add a corresponding entry toTEST_DIRS andTEST_FILES.


[8]ページ先頭

©2009-2025 Movatter.jp