Validation tests: Difference between revisions

From VASP Wiki
No edit summary
Line 33: Line 33:
: Contains a bash-script (<code>call_compare</code>) and a Fortran source file (<tt>compare_numbertable_new.f90</tt>). The latter is compiled as:
: Contains a bash-script (<code>call_compare</code>) and a Fortran source file (<tt>compare_numbertable_new.f90</tt>). The latter is compiled as:
: <pre>$(FC) -o compare_numbertable_new compare_numbertable_new.f90</pre>
: <pre>$(FC) -o compare_numbertable_new compare_numbertable_new.f90</pre>
: where the <code>$(FC)</code> is the Fortran compiler binary path that has to be set in <tt>root/makefile.include</tt> (see [[Installing_VASP#Compiler_variables | Installing VASP).
: where the <code>$(FC)</code> is the Fortran compiler binary path that has to be set in <tt>root/makefile.include</tt> (see [[Installing_VASP#Compiler_variables | Installing VASP]].


;testsuite/runtest
;testsuite/runtest
Line 40: Line 40:
;testsuite/makefile
;testsuite/makefile
: Autoconf makefile containing some simple rules that either compile <tt>compare_numbertable_new.f90</tt> (<code>make numbertable</code>), execute a small selection of tests (<code>make test</code>) or execute all test (<code>make test_all</code>).
: Autoconf makefile containing some simple rules that either compile <tt>compare_numbertable_new.f90</tt> (<code>make numbertable</code>), execute a small selection of tests (<code>make test</code>) or execute all test (<code>make test_all</code>).


== Running the tests ==
== Running the tests ==

Revision as of 18:00, 29 January 2020

This page is currently under construction!

The VASP testsuite

The VASP testsuite is located in `root/testsuite` where `root` is the root directory of the build system.

                        vasp.X.X.X (root directory)
                                 |
         ----------------------------------------------
        |              |            |          |       |
       arch           bin       testsuite     build    src
                                    |
                     ------------------------------------------
                    |      |         |         |        |      |
                  tests  README.md  tools   POTCARS  runtest makefile
                    |           
           ------------------   
          |      |           |   
        test1  test2  ...  testN
testsuite/
Testsuite root directory. Holds several subdirectories and the main bash-script runtest that runs the tests and validates the results.
testsuite/tests
Holds a whole bunch of subdirectories that in turn contain the input files (INCAR.?.*, KPOINTS, and POSCAR), and reference output (OUTCAR.ref, OSZICAR.ref etc.) for the test calculations.
testsuite/POTCARS
Holds the POTCAR files (potentials), one for each individual test calculation. The naming convention for these files is:
POTCAR.name-of-test-subdirectory
testsuite/tools
Contains a bash-script (call_compare) and a Fortran source file (compare_numbertable_new.f90). The latter is compiled as:
$(FC) -o compare_numbertable_new compare_numbertable_new.f90
where the $(FC) is the Fortran compiler binary path that has to be set in root/makefile.include (see Installing VASP.
testsuite/runtest
Main execution script that orchestrates which tests are executed based on set environment variables.
testsuite/makefile
Autoconf makefile containing some simple rules that either compile compare_numbertable_new.f90 (make numbertable), execute a small selection of tests (make test) or execute all test (make test_all).

Running the tests

Run the tests with make (recommended)

After building the vasp_std, vasp_gam, and vasp_ncl executables (e.g. by means of make all), you can test your build by means of:

make test

(either in root or root/testsuite). The above will run a subset of tests from the testsuite (the so-called FAST category of tests) that will take roughly 1.5 hours to complete on 4 cores.

The full testsuite may be executed by means of:

make test_all

The output of the tests (stdout+stderr) is written to root/testsuite/testsuite.log.

Tests that fail write an ERROR to root/testsuite/testsuite.log and the tests that were not passed successfully will be listed at the end of this file (and make will exit in error).

To clean up after running the testsuite, execute:

make cleantest

in root/testsuite.


Configuring the testsuite manually

The testsuite may be manually configured by means of a several environment variables (with the naming convention: VASP_TESTSUITE_*).

  • VASP_TESTSUITE_EXE_STD:
The command that runs the standard version of VASP.
Default:
VASP_TESTSUITE_EXE_STD="mpirun -np 4 root/bin/vasp_std"
N.B.: Specify the absolute path your standard executable (e.g. vasp_std or vasp_gpu).
  • VASP_TESTSUITE_EXE_GAM:
The command that runs the gamma-only version of VASP.
Default:
VASP_TESTSUITE_EXE_GAM="mpirun -np 4 root/bin/vasp_gam"
N.B.: Specify the absolute path to your gamma-only executable (e.g. vasp_gam).
  • VASP_TESTSUITE_EXE_NCL:
The command that runs the non-collinear version of VASP.
Default:
VASP_TESTSUITE_EXE_NCL="mpirun -np 4 root/bin/vasp_ncl"
N.B.: Specify the absolute path to your non-collinear executable (e.g. vasp_ncl or vasp_gpu_ncl).
  • VASP_TESTSUITE_CUDA:
Set VASP_TESTSUITE_CUDA=Y to exclude all tests that can not be executed with the CUDA-GPU port of VASP.
Default:
VASP_TESTSUITE_CUDA=
  • VASP_TESTSUITE_INCAR_PREPEND:
Additional INCAR tags used for every execution of VASP in the testsuite.
Default:
VASP_TESTSUITE_INCAR_PREPEND=
  • VASP_TESTSUITE_TESTS:
Selection of tests to be executed.
Default:
VASP_TESTSUITE_TESTS=
N.B.: A convenient way to execute a specific test is to set VASP_TESTSUITE_TESTS to a particular test, e.g. by means of:
export VASP_TESTSUITE_TESTS="bulk_GaAs_ACFDT"
and to run make test from the root or root/testsuite directory.
  • VASP_TESTSUITE_SKIP_TESTS:
Selection of tests to be skipped.
Default:
VASP_TESTSUITE_SKIP_TESTS=
  • VASP_TESTSUITE_POTENTIALS:
Path to the POTCAR files.
Default:
VASP_TESTSUITE_POTENTIALS=root/testsuite/POTCARS

Categories

A variety of environment variables can be set to run or exclude tests belonging to specific categories. Default: not set

For instance:

  • VASP_TESTSUITE_SKIP_LREAL:
Skips all tests that use the real space PAW projection scheme (LREAL/=F) if set to: Y, i.e.,
export VASP_TESTSUITE_SKIP_LREAL=Y

or

  • VASP_TESTSUITE_RUN_LREAL:
Runs only tests that use the real space PAW projection scheme (LREAL=A or LREAL=.TRUE.) if set to: Y.
export VASP_TESTSUITE_RUN_LREAL=Y

The following variables may be set to skip categories of tests:

  • VASP_TESTSUITE_SKIP_NOCUDA:
Skip all tests that can not be excuted with the CUDA-GPU port.
  • VASP_TESTSUITE_SKIP_HYB:
Skip all hybrid functional tests.
  • VASP_TESTSUITE_SKIP_GAMMA:
Skip all tests of the gamma-only version.
  • VASP_TESTSUITE_SKIP_NCL:
Skip all tests of the non-collinear version.
  • VASP_TESTSUITE_SKIP_SOC:
Skip all tests involving Spin-Orbit Coupling.
  • VASP_TESTSUITE_SKIP_MD:
Skip all Molecular Dynamics tests.
  • VASP_TESTSUITE_SKIP_TBMD:
Skip all constrained molecular dynamics tests.
  • VASP_TESTSUITE_SKIP_RPA:
Skip all tests that involve the Random-Phase Approximation (GW and ACFDT).
  • VASP_TESTSUITE_SKIP_GW:
Skip all GW tests.
  • VASP_TESTSUITE_SKIP_ACFDT:
Skip all ACFDT tests.
  • VASP_TESTSUITE_SKIP_CRPA:
Skip all tests of the Constrained-RPA.
  • VASP_TESTSUITE_SKIP_BSE:
Skip all Bethe-Salpeter-Equation tests.
  • VASP_TESTSUITE_SKIP_NOSYM:
Skip all tests that do not use symmetry.
  • VASP_TESTSUITE_SKIP_LREAL:
Skip all tests that use the real-space PAW projection scheme.
  • VASP_TESTSUITE_SKIP_LRESP:
Skip all linear response tests.
  • VASP_TESTSUITE_SKIP_PEAD:
Skip all tests that use the PEAD method.
  • VASP_TESTSUITE_SKIP_NCORE1:
Skip all tests that may only be executed with NCORE=1.
  • VASP_TESTSUITE_SKIP_WAN90:
Skip all tests that need to execute wannier90.


The following variables may be set to run only tests that belong to a specific category (or categories):

  • VASP_TESTSUITE_RUN_HYB
  • VASP_TESTSUITE_RUN_GAMMA
  • VASP_TESTSUITE_RUN_NCL
  • VASP_TESTSUITE_RUN_SOC
  • VASP_TESTSUITE_RUN_MD
  • VASP_TESTSUITE_RUN_TBMD
  • VASP_TESTSUITE_RUN_RPA
  • VASP_TESTSUITE_RUN_GW
  • VASP_TESTSUITE_RUN_ACFDT
  • VASP_TESTSUITE_RUN_CRPA
  • VASP_TESTSUITE_RUN_BSE
  • VASP_TESTSUITE_RUN_NOSYM
  • VASP_TESTSUITE_RUN_LREAL
  • VASP_TESTSUITE_RUN_FAST
  • VASP_TESTSUITE_RUN_LRESP
  • VASP_TESTSUITE_RUN_PEAD
  • VASP_TESTSUITE_RUN_NCORE1
  • VASP_TESTSUITE_RUN_WAN90


Directly execute the runtest script

Besides by means of make the testsuite may be invoked by executing the root/testsuite/runtest script directly. There are two ways to execute the runtest script:

1. Change into the root/testsuite directory and run the tests in the FAST category by means of:
./runtest -f|--fast
or ALL tests with
./runtest -a|--all
2. Change into root/testsuite, adapt one of the example configuration files in root/testsuite and run the testsuite with:
./runtest myconfig.conf

N.B.I: To pipe the full output to a file (testsuite.log) add > testsuite.log 2>&1 to the commands above.

N.B.II: We maintain a small collection of configuration templates.

N.B.III: When you want to run the testsuite by executing the runtest directly you will first have to build the compare_numbertable_new utility, by means of:

make numbertable

(in root/testsuite).

For each test that fails runtest writes an ERROR to stdout and the tests that were not passed successfully will be listed at the end of the run.

In case of a successful run, runtest script will exit with error code 0 (indicates successful exit on Unix-based OS), otherwise the error code 1 is returned.

Configuration templates

... under construction ...

The output of the tests

If one runs the tests by means of make, as recommended above all output (stdout+stderr) will be written to root/testsuite/testsuite.log.

Tests that fail write an ERROR to root/testsuite/testsuite.log and the tests that were not passed successfully will be listed at the end of this file (and make will exit in error).


What if tests fail

... under construction ...