All Projects → verificarlo → verificarlo

verificarlo / verificarlo

Licence: other
A tool for debugging and assessing floating point precision and reproducibility.

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
fortran
972 projects
C++
36643 projects - #6 most used programming language
M4
1887 projects

Projects that are alternatives of or similar to verificarlo

FpDebug
Dynamic Program Analysis based on Valgrind to find Floating-Point Accuracy Problems
Stars: ✭ 19 (-62.75%)
Mutual labels:  floating-point, mpfr
DoubleFloats.jl
math with more good bits
Stars: ✭ 102 (+100%)
Mutual labels:  floating-point, precision
mixed-precision-pytorch
Training with FP16 weights in PyTorch
Stars: ✭ 72 (+41.18%)
Mutual labels:  precision, mixed-precision
FPChecker
A dynamic analysis tool to detect floating-point errors in HPC applications.
Stars: ✭ 26 (-49.02%)
Mutual labels:  llvm, floating-point
mlir-hs
Haskell bindings for MLIR
Stars: ✭ 53 (+3.92%)
Mutual labels:  llvm
Chromium Clang
Chromium browser compiled with the Clang/LLVM compiler.
Stars: ✭ 77 (+50.98%)
Mutual labels:  llvm
fpzip
Cython bindings for fpzip, a floating point image compression algorithm.
Stars: ✭ 24 (-52.94%)
Mutual labels:  floating-point
OCCAM
OCCAM: Object Culling and Concretization for Assurance Maximization
Stars: ✭ 20 (-60.78%)
Mutual labels:  llvm
imp
Compiler for IMP programming language implemented in Haskell
Stars: ✭ 16 (-68.63%)
Mutual labels:  llvm
open-ops
Open Optimizing Parallelizing System
Stars: ✭ 21 (-58.82%)
Mutual labels:  llvm
systemc-compiler
This tool translates synthesizable SystemC code to synthesizable SystemVerilog.
Stars: ✭ 128 (+150.98%)
Mutual labels:  llvm
mollusc
Pure-Rust libraries for parsing, interpreting, and analyzing LLVM
Stars: ✭ 49 (-3.92%)
Mutual labels:  llvm
YuLang
The Yu (羽) programming language.
Stars: ✭ 46 (-9.8%)
Mutual labels:  llvm
Star-lang-specification
Work in progress specs for the Star programming language
Stars: ✭ 26 (-49.02%)
Mutual labels:  llvm
llvm-semantics
Formal semantics of LLVM IR in K
Stars: ✭ 42 (-17.65%)
Mutual labels:  llvm
LLVM-Obfuscator
LLVM Obfuscator
Stars: ✭ 44 (-13.73%)
Mutual labels:  llvm
OS-CFI
Origin-sensitive Control Flow Integrity (OS-CFI) - USENIX Security 2019
Stars: ✭ 27 (-47.06%)
Mutual labels:  llvm
decimal
An arbitrary-precision decimal floating-point arithmetic package for Go
Stars: ✭ 28 (-45.1%)
Mutual labels:  floating-point
cmna-pkg
Computational Methods for Numerical Analysis
Stars: ✭ 13 (-74.51%)
Mutual labels:  numerical-analysis
CMLFS
Clang-Built Musl Linux From Scratch
Stars: ✭ 51 (+0%)
Mutual labels:  llvm

Verificarlo v0.8.0

A tool for debugging and assessing floating point precision and reproducibility.

verificarlo logo

Build Status Docker Pulls DOI Coverity License

Installation

To install Verificarlo please refer to the installation documentation.

Using Verificarlo through its Docker image

A docker image is available at https://hub.docker.com/r/verificarlo/verificarlo/. This image uses the latest release version of Verificarlo and includes support for Fortran. It uses llvm-7 and gcc-7.

Example of usage with Monte Carlo arithmetic:

$ cat > test.c <<HERE
#include <stdio.h>
int main() {
  double a = 0;
  for (int i=0; i < 10000; i++) a += 0.1;
  printf("%0.17f\n", a);
  return 0;
}
HERE

$ docker pull verificarlo/verificarlo
$ docker run -v "$PWD":/workdir verificarlo/verificarlo \
   verificarlo-c test.c -o test
$ docker run -v "$PWD":/workdir -e VFC_BACKENDS="libinterflop_mca.so" \
   verificarlo/verificarlo ./test
999.99999999999795364
$ docker run -v "$PWD":/workdir -e VFC_BACKENDS="libinterflop_mca.so" \
   verificarlo/verificarlo ./test
999.99999999999761258

Usage

To automatically instrument a program with Verificarlo you must compile it using the verificarlo --linker=<linker> command, where <linker> depends on the targeted language:

  • verificarlo --linker=clang for C
  • verificarlo --linker=clang++ for C++
  • verificarlo --linker=flang for Fortran

Verificarlo uses the linker clang by default.

You can also use the provided wrappers to call verificarlo with the right linker:

  • verificarlo-c for C
  • verificarlo-c++ for C++
  • verificarlo-f for Fortran

First make sure that the verificarlo installation directory is in your PATH.

Then you can use the verificarlo-c, verificarlo-f and verificarlo-c++ commands to compile your programs. Either modify your makefile to use verificarlo as the compiler (CC=verificarlo-c, FC=verificarlo-f and CXX=verificarlo-c++) and linker (LD=verificarlo --linker=<linker>) or use the verificarlo command directly:

   $ verificarlo-c program.c -o ./program

If you are trying to compile a shared library, such as those built by the Cython extension to Python, you can then also set the shared linker environment variable (LDSHARED='verificarlo --linker=<linker> -shared') to enable position-independent linking.

When invoked with the --verbose flag, verificarlo provides detailed output of the instrumentation process.

It is important to include the necessary link flags if you use extra libraries. For example, you should include -lm if you are linking against the math library.

Branch instrumentation

Verificarlo can instrument floating point comparison operations. By default, comparison operations are not instrumented and default backends do not make use of this feature. If your backend requires instrumenting floating point comparisons, you must call verificarlo with the --inst-fcmp flag.

Examples and Tutorial

The tests/ directory contains various examples of Verificarlo usage.

A tutorial is available.

Backends

Verificarlo includes different numerical backends. Please refer to the backends documentation.

Inclusion / exclusion options

To inlude only certain parts of the code in the analysis or exclude parts of the code from instrumentation please refer to inclusion / exclusion options documentation.

Pinpointing numerical errors with Delta-Debug

To pinpoint numerical errors please refer to the Delta-Debug documentation.

VPREC Function Instrumentation

A function instrumentation pass enables VPREC exploration and optimization at the function granularity level. Please refer to the VPREC Function Instrumentation documentation.

Postprocessing

Verificarlo includes a set of postprocessing tools to help analyse Verificarlo results and produce high-level reports.

Interflop user call instrumentation

Verificarlo provides the ability to call low-level backend functions directly through the interflop_call function. Please refer to the Interflop user call instrumentation documentation.

How to cite Verificarlo

If you use Verificarlo in your research, please cite one of the following papers:

Thanks !

Discussion Group

For questions, feedbacks or discussions about Verificarlo you can use the Discussions section in our github project page.

License

This file is part of the Verificarlo project,
under the Apache License v2.0 with LLVM Exceptions.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.
See https://llvm.org/LICENSE.txt for license information.

Copyright (c) 2019-2022 Verificarlo Contributors

Copyright (c) 2018 Universite de Versailles St-Quentin-en-Yvelines

Copyright (c) 2015 Universite de Versailles St-Quentin-en-Yvelines CMLA, Ecole Normale Superieure de Cachan

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].