big-data-lab-team / MCA-libmath

Perturbation of mathematical functions for evaluating the stability of the pipelines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For an up-to-date version of this implementation and other MCA-perturbed libraries, please go to https://github.com/verificarlo/fuzzy

libmath Monte-Carlo Arithmetic model

We are evaluating the pipeline stability by applying noise to mathematical functions using the library call interposition technique. This project aims to study whether the MCA method is truly a good perturbation model for evaluating pipeline stability across the operating systems.

Usage example

  1. Install the last version of Verificarlo

  2. Create instrumented shared math library:

git clone https://github.com/big-data-lab-team/MCA-libmath.git /tmp/mca-libmath/
cd /tmp/mca-libmath/src/
make
make test
  1. Export Linux LD_PRELOAD environment variable by running:
export LD_PRELOAD=/tmp/mca-libmath/src/libmath.so
  1. Set the virtual precision and instrumentation mode of Verificarlo by running:
export VFC_BACKENDS="libinterflop_mca.so --precision-binary32 <p1> --precision-binary64 <p2> --mode <m>"
  1. Run your pipeline

Usage example through the Docker image

We created a docker base image, including the steps (1-4) mentioned above. It is available at https://hub.docker.com/r/salari/fuzzy/ubuntu-libmath-base.

Running a simple test script in which calculates the standard deviation of several mca samples of sin() function:

docker pull salari/fuzzy:ubuntu-libmath-base
docker run -w /tmp/mca-libmath/tests/  ubuntu-libmath-base /bin/bash test.sh

How to Contribute

  1. Clone repo and create a new branch: $ git checkout https://github.com/big-data-lab-team/MCA-libmath -b name_for_new_branch.
  2. Make changes and test
  3. Submit Pull Request with comprehensive description of changes

License

MIT © /bin Lab

About

Perturbation of mathematical functions for evaluating the stability of the pipelines


Languages

Language:C 71.6%Language:Shell 19.4%Language:Makefile 5.1%Language:Python 3.8%