Verrou helps you look for floating-point round-off errors in programs. It implements various forms of arithmetic, including:
all IEEE-754 standard rounding modes;
two variants of stochastic floating-point arithmetic based on random rounding: all floating-point operations are perturbed by randomly switching rounding modes. These can be seen as an asynchronous variant of the CESTAC method, or a subset of Monte Carlo Arithmetic, performing only output randomization through random rounding;
an emulation of single-precision rounding, in order to test the effect of reduced precision without any need to change the source code.
Verrou also comes with a
verrou_dd utility, which simplifies the Verrou-based
debugging process by implementing several variants of the Delta-Debugging
algorithm. This allows easily locating which parts of the analyzed source code
are likely to be responsible for Floating-Point-related instabilities.
The documentation for Verrou is available as a dedicated chapter in the Valgrind manual.
Get the sources
The preferred way to get Verrou sources is to download the latest stable version: v2.1.0. Older versions are available in the releases page. After downloading one of the released versions, skip to the "Configure and build" section below.
In order to build the development version of Verrou, it is necesary to first download a specific Valgrind version, and patch it. Fetch valgrind's sources:
git clone --branch=VALGRIND_3_14_0 --single-branch git://sourceware.org/git/valgrind.git valgrind-3.14.0+verrou-dev
Add verrou's sources to it:
cd valgrind git clone --branch=master --single-branch https://github.com/edf-hpc/verrou.git verrou patch -p1 <verrou/valgrind.diff
Configure and build
First, install all required dependencies (the names of relevant Debian packages are put in parentheses as examples):
- C & C++ compilers (
- autoconf & automake (
- Python 3 (
- C standard library with debugging symbols (
./autogen.sh ./configure --enable-only64bit --prefix=PREFIX
It is recommended to add the
--enable-verrou-fma flag to the configuration
above if your system supports FMA instructions. Depending on your system, it may
be required to set
CFLAGS so that it enables the use of FMA in your compiler:
./configure --enable-only64bit --enable-verrou-fma --prefix=PREFIX CFLAGS="-mfma"
Build and install:
make make install
Load the environment
In order to actually use Verrou, you must load the correct environment. This can be done using:
You can test the whole platform:
make check perl tests/vg_regtest --all
or only verrou:
make -C tests check make -C verrou check perl tests/vg_regtest verrou
These tests are more closely related to the arithmetic part in Verrou:
make -C verrou/unitTest
The documentation for verrou is available as a chapter in valgrind's manual.
You can also re-build it:
make -C docs html-docs man-pages
and browse it locally:
Beware, this requires lots of tools which are not necessarily tested for in
configure, including (but not necessarily limited to):