All Projects → edf-hpc → verrou

edf-hpc / verrou

Licence: GPL-2.0 license
floating-point errors checker

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
Makefile
30231 projects
Gnuplot
187 projects
shell
77523 projects

Projects that are alternatives of or similar to verrou

FpDebug
Dynamic Program Analysis based on Valgrind to find Floating-Point Accuracy Problems
Stars: ✭ 19 (-51.28%)
Mutual labels:  valgrind, floating-point
shellmath
Yes, Virginia, you can do floating-point arithmetic in Bash!
Stars: ✭ 33 (-15.38%)
Mutual labels:  arithmetic, floating-point
30secondchallenge
Inspired by the newspaper puzzle my wife's grandma tests me with each time I visit.
Stars: ✭ 19 (-51.28%)
Mutual labels:  arithmetic
imath
Arbitrary precision integer and rational arithmetic library
Stars: ✭ 92 (+135.9%)
Mutual labels:  arithmetic
SimpleTypes
The universal PHP library to convert any values and measures (money, weight, currency converter, length, etc.).
Stars: ✭ 56 (+43.59%)
Mutual labels:  arithmetic
FixedPointsArduino
A fixed point arithmetic library for Arduino
Stars: ✭ 68 (+74.36%)
Mutual labels:  arithmetic
chop
Round matrix elements to lower precision in MATLAB
Stars: ✭ 21 (-46.15%)
Mutual labels:  arithmetic
Sam
System Architecture Mapper
Stars: ✭ 176 (+351.28%)
Mutual labels:  diagnostics
bearing-vibration-diagnostics-toolbox
No description or website provided.
Stars: ✭ 26 (-33.33%)
Mutual labels:  diagnostics
rekenaar
Idris tactics for (commutative) monoids
Stars: ✭ 21 (-46.15%)
Mutual labels:  arithmetic
goff
goff (go finite field) is a unix-like tool that generates fast field arithmetic in Go.
Stars: ✭ 71 (+82.05%)
Mutual labels:  arithmetic
ToolGood.Algorithm
Support four arithmetic operations, Excel formulas, and support custom parameters. 支持四则运算、Excel公式语法,并支持自定义参数。
Stars: ✭ 77 (+97.44%)
Mutual labels:  arithmetic
evoapproxlib
Library of approximate arithmetic circuits
Stars: ✭ 23 (-41.03%)
Mutual labels:  arithmetic
spfpm
Package for performing fixed-point, arbitrary-precision arithmetic in Python.
Stars: ✭ 61 (+56.41%)
Mutual labels:  arithmetic
ProbabilityBoundsAnalysis.jl
Probability bounds analysis in Julia
Stars: ✭ 17 (-56.41%)
Mutual labels:  arithmetic
Zend Diagnostics
Universal set of diagnostic tests for PHP applications.
Stars: ✭ 192 (+392.31%)
Mutual labels:  diagnostics
JavaBase
📝 Java Base Learning
Stars: ✭ 13 (-66.67%)
Mutual labels:  arithmetic
givaro
Givaro - C++ library for arithmetic and algebraic computations
Stars: ✭ 41 (+5.13%)
Mutual labels:  arithmetic
memcheck-cover
An HTML generator for Valgrind's Memcheck tool
Stars: ✭ 30 (-23.08%)
Mutual labels:  valgrind
Surge
A Swift library that uses the Accelerate framework to provide high-performance functions for matrix math, digital signal processing, and image manipulation.
Stars: ✭ 4,945 (+12579.49%)
Mutual labels:  arithmetic

Verrou

Build Status Documentation

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;

  • three 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.

Installation

Get the sources

The preferred way to get Verrou sources is to download the latest stable version: v2.4.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_20_0 --single-branch git://sourceware.org/git/valgrind.git valgrind-3.20.0+verrou-dev

or if you have proxy problem with git:// protocol:

export https_proxy=ADDRESS_OF_PROXY
wget https://sourceware.org/pub/valgrind/valgrind-3.20.0.tar.bz2
tar xvfj valgrind-3.20.0.tar.bz2
mv valgrind-3.20.0 valgrind-3.20.0+verrou-dev

Add verrou's sources to it:

cd valgrind-3.20.0+verrou-dev
git clone 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 (build-essential),
  • autoconf & automake (automake),
  • Python 3 (python3)
  • C standard library with debugging symbols (libc6-dbg).

 

Configure valgrind:

./autogen.sh
./configure --enable-only64bit --prefix=PREFIX

Depending on your system, it may be required to set CFLAGS in order to enable the use of FMA in your compiler:

./configure --enable-only64bit --prefix=PREFIX CFLAGS="-mfma"

Systems that don't support FMA instructions the --enable-verrou-fma=no configure switch need to be used, but be aware that this causes some tests to fail:

./configure --enable-only64bit --enable-verrou-fma=no --prefix=PREFIX

 

Advanced users can use the following configure flags :

  • --enable-verrou-check-naninf=yes|no (default yes). If NaN does not appear in the verified code set this option to 'no' can slightly speed up verrou.
  • --with-det-hash=hash_name with hash_name in [dietzfelbinger,multiply_shift,double_tabulation,xxhash,mersenne_twister] to select the hash function used for [random|average]_[det|comdet] rounding mode. The default is xxhash. double_tabulation was the previous default(before introduction of xxhash). mersenne_twister is the reference but slow. dietzfelbinger and multiply_shift are faster but are no able to reproduce the reference results.
  • --enable-verrou-xoshiro=[no|yes] (default yes). If set to yes the tiny mersenne twister prng is replaced for (random and average)is replaced by the xo[ro]shiro prng.
  • --enable-verrou-quad=[yes|no] (default yes). If set to no the backend mcaquad is disable. This option is only useful to reduce the dependencies.

 

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:

source PREFIX/env.sh

Test (optional)

General tests

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

Specific tests

These tests are more closely related to the arithmetic part in Verrou:

make -C verrou/unitTest

Documentation

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:

firefox docs/html/vr-manual.html

Beware, this requires lots of tools which are not necessarily tested for in configure, including (but not necessarily limited to):

  • xsltproc
  • docbook-xsl

Bibliography & References

The following papers explain in more details the internals of Verrou, as well as some of its applications. If you use Verrou for a research work, please consider citing one of these references:

  1. François Févotte and Bruno Lathuilière. Debugging and optimization of HPC programs with the Verrou tool. In International Workshop on Software Correctness for HPC Applications (Correctness), Denver, CO, USA, Nov. 2019. DOI: 10.1109/Correctness49594.2019.00006
  2. Hadrien Grasland, François Févotte, Bruno Lathuilière, and David Chamont. Floating-point profiling of ACTS using Verrou. EPJ Web Conf., 214, 2019. DOI: 10.1051/epjconf/201921405025
  3. François Févotte and Bruno Lathuilière. Studying the numerical quality of an industrial computing code: A case study on code_aster. In 10th International Workshop on Numerical Software Verification (NSV), pages 61--80, Heidelberg, Germany, July 2017. DOI: 10.1007/978-3-319-63501-9_5
  4. François Févotte and Bruno Lathuilière. VERROU: a CESTAC evaluation without recompilation. In International Symposium on Scientific Computing, Computer Arithmetics and Verified Numerics (SCAN), Uppsala, Sweden, September 2016.

(These references are also available in bibtex format)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].