HiRep 0.1
|
Tests are executed automatically on each commit by using Github Actions. Two workflows are defined: one for non-mpi (serial) compilation and one for mpi (parallel). The two workflows are otherwise identical. Each CI workflow define a matrix on compilation flags (number of colors, representation, etc).
The script run_tests.sh
automate the process of: creating the appropriate MkFlags
; compiling the tests; and running all the test. Run:
for a list of available options and their default values. For example:
will write a new MkFlags
file for 2 colors and fermions in the fundamental representation (for all other required flags default values will be used).
Tests on Github Actions are executed inside a Docker container. The Dockerfile for the container is in the TestProgram directory, and the image is hosted at docker://cpica/hr-tests
.
To reproduce the execution in the docker container locally, run:
e.g. for the case of 2 gauge colors and fermions in the fundamental representation.
Github Actions workflows are defined in the .github/
folder at the root of the HiRep
repository.
Detailed debugging output can be found in the outfile (default out_0
) in the respective directory.
The test suite has to be able to test a number of different setups generated by different choices in Make/MkFlags
. Some of these choices, for example compiling with or without GPU, will also generate different namespaces. However, we still want to preserve the ability to test only for a single case of choosing the compilation flags.
The testing Makefile
s have therefore been configured to only run certain tests for certain compilation flags, using a NOCOMPILE = XXX
statement, where XXX
is the corresponding compilation flag. If we, for example, want to write a test that works only if compiles without GPU acceleration, we can use this flag to configure the test this way in the preamble
Notice, that there is no space between NOCOMPILE
and =
. Conversely, we can configure tests that only test the GPU-version by negation
If we want to make sure that multiple flags are active, we can connect them over &&
.
If the test does test multiple, but not all possible setups, we can write them down using multiple lines.
The default input files for the scripts GaugeFix
, HMC
, ModeNumber
, PureGauge
, RenormalizationFactors
, Reweight
, Scattering
, Spectrum
, StaticPotential
and WilsonFlow
constitute good integration tests.