FloPoCo installation manual
Operators tend to come and go as we struggle to support them, and we apologize for that. Hopefully the new Autotest features will bring more stability. Meanwhile, it is possible that the operator you want works better in an older version: read the release notes.
- Install Docker on your computer.
- Download the Dockerfile corresponding to the version you want from this directory
- Download and compile FloPoCo and its dependencies by the following command:
docker build -t flopoco -f Dockerfile.4.1.2 .
(replace Dockerfile.4.1.2 with the one you selected)
- The following command sets up a convenient alias (in linux)
you will obtain a flopoco.vhdl file containing a single-precision floating-point adder.
alias flopoco="docker run --rm=true -v $PWD:/flopoco_workspace flopoco"
Now if you type for instance
flopoco FPAdd we=8 wf=23
- If your terminal is Bash, the following command will help you get autocompletion for the FloPoCo operators and their arguments:
(then follow the instructions)
For Debian/Ubuntu, simply look at the DockerFile and run the same commands in a terminal. If your distribution is not Debian based, you will have to install dependencies using your distribution's package manager.
Version 5.0 and later (including the git master) depend on ScaLP which provides a uniform interface to several ILP solver.
The instructions provided in the Dockerfiles build ScaLP with the LPSolve back-end, which is the only backend for which installation can be fully automated.
Better results may be obtained using other backends: SCIP, Gurobi (both freely available for academic purpose) or CPlex.
You are therefore encouraged to download one of these, install it, then recompile ScaLP (adding the relevant arguments to its cmake command, see ScaLP documentation), then FloPoCo.
The following are one-line instructions installations for older FloPoCo versions (copy in a dash/bash shell, and enter your password when prompted).
Version 4.1.2, the last one with the old pipelining framework
yes | sudo apt-get install g++ libgmp3-dev libmpfr-dev libfplll-dev libxml2-dev bison libmpfi-dev flex cmake libboost-all-dev libgsl0-dev && wget https://gforge.inria.fr/frs/download.php/33151/sollya-4.1.tar.gz && tar xzf sollya-4.1.tar.gz && cd sollya-4.1/ && ./configure && make -j4 && sudo make install && cd .. && wget https://gforge.inria.fr/frs/download.php/file/37213/flopoco-4.1.2.tgz && tar xzf flopoco-4.1.2.tgz && cd flopoco-4.1.2/ && cmake . && make -j4 && ./flopoco && ./flopoco BuildHTMLDoc
In addition, enable bash autocompletion by typing ./flopoco BuildAutocomplete and following the instructions
Version 2.5.0, the last version before the transition to Sollya4 broke everything that bit heaps had not yet broken
yes | sudo apt-get install g++ libgmp3-dev libmpfr-dev libxml2-dev bison libmpfi-dev flex cmake libboost-all-dev libgsl0-dev && wget https://gforge.inria.fr/frs/download.php/file/34429/libfplll-3.0.12.tar.gz && tar xzf libfplll-3.0.12.tar.gz && cd libfplll-3.0.12/ && ./configure && make -j2 && sudo make install && cd .. && wget https://gforge.inria.fr/frs/download.php/28571/sollya-3.0.tar.gz && tar xzf sollya-3.0.tar.gz && cd sollya-3.0/ && ./configure && make -j4 && sudo make install && cd .. && wget https://gforge.inria.fr/frs/download.php/file/32591/flopoco-2.5.0.tgz && tar xzf flopoco-2.5.0.tgz && cd flopoco-2.5.0/ && cmake . && make -j4 && ./flopoco
Version 2.3.2, the last version before the Great Leader embarked the project in the bit heap hazardous adventure
yes | sudo apt-get install g++ libgmp3-dev libmpfr-dev libxml2-dev bison libmpfi-dev flex cmake libboost-all-dev libgsl0-dev && wget https://gforge.inria.fr/frs/download.php/file/34429/libfplll-3.0.12.tar.gz && tar xzf libfplll-3.0.12.tar.gz && cd libfplll-3.0.12/ && ./configure && make -j2 && sudo make install && cd .. && wget https://gforge.inria.fr/frs/download.php/28571/sollya-3.0.tar.gz && tar xzf sollya-3.0.tar.gz && cd sollya-3.0/ && ./configure && make -j4 && sudo make install && cd .. && wget https://gforge.inria.fr/frs/download.php/file/35206/flopoco-2.3.2.tgz && tar xzf flopoco-2.3.2.tgz && cd flopoco-2.3.2/ && cmake . && make -j4 && ./flopoco
Older versions may include operators that have later been deprecated. Look up the source code repository
Although most libraries are available in your distribution, some of them may not.
Hence, the following shows how to compile the basic libraries that are required to compile and run FloPoCo.
These are the libraries that are absolutely required, additional libraries may be required to enable additional features.
Select the installation directory (where /include, /lib, /bin, /share are created) by setting $INSTALL_DIR to the directory of your choice.
The versions listed here are tested to be compatible to each other.
In case a specific version is not available anymore, try a newer version.
Compile and install GMP
lzip -d gmp-6.1.1.tar.lz
tar xf gmp-6.1.1.tar
Compile and install MPFI
tar xfz mpfi-1.5.3.tar.gz
./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR --with-mpfr=$INSTALL_DIR
Compile and install MPFR
tar xf mpfr-4.0.0.tar.gz
./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR
Compile and install FPLLL (required for Sollya)
tar xf fplll-5.0.2.tar.gz
./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR --with-mpfr=$INSTALL_DIR
Compile and install Sollya
tar xf sollya-6.0.tar.gz
./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR --with-mpfr=$INSTALL_DIR --with-mpfi=$INSTALL_DIR --with-fplll=$INSTALL_DIR
Finally, compile FloPoCo
git clone https://scm.gforge.inria.fr/anonscm/git/flopoco/flopoco.git
Depending on what you selected as your installation directory, you may have to add the $INSTALL_DIR/lib path to the LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (Mac OS X):
cmake . -DCMAKE_INCLUDE_PATH=/opt/local/include -DCMAKE_PREFIX_PATH:PATH=$INSTALL_DIR
Now, you should be able to run FloPoCo.
Here is a simple way to get FloPoCo running in a virtual machine under Windows.
You will need to install :
- A SSH Client. If you are running Linux or Mac, you already have one. If you are using Windows, I recommended you "Putty".
Installing Ubuntu in a Vagrant virtual box
Create a folder where you want to contain all the Vagrant files.
Open a command prompt and go into this folder. If you are using windows, you can quickly open a command prompt by holding down shift and right-clicking the project folder, then choose “open command window here”.
Now type the following commands :
vagrant init ubuntu/trusty32
The first time, it may take some time depending on your internet connection.
Connecting to the virtual machine by SSH
You have two solutions at this point :
- Using your favorite ssh client, connect to your virtual machine with the following parameters :
- Adress : 127.0.0.1
- Port : The port is given during the execution of "vagrant up". By default 2222.
- Login : vagrant
- Password : vagrant
- You can also try to type "vagrant ssh" in your prompt, sometime it works. The result is the same thing.
Updating your virtual machine
Now that your are connected to your virtual machine, type the following commands :
sudo apt-get update
sudo apt-get upgrade
If a prompt asks you something, just press "y".
Installing Flopoco on your virtual machine
Go to the Linux installation instructions :
Copy one of the one-line installation scripts and paste it into the prompt of your virtual machine.
Wait. Sometime, you will be asked to press "y".
Some common problems
If you encountered others problems, give us feedback and if possible solutions so that we can add them to the preceeding list.
- You can not acess the VM using SSH : open VirtualBox, click right on your Vagrant Machine in the list, and shutdown and restart the VM.
- During the execution of "vagrant up", the script loops trying to access the Vm using ssh : Don't worry (be happy), Stop the script. And restart your virtual machine directly into VirtualBox.
- If you have some problems when "vagrant up" and using Linux, try to run the commands as root.
- The single-line installation script hangs, possibly with a lot of "y" in the terminal: just reboot the virtual machine and start again. It works the second time.
- If nothing work, just reboot your computer. Reboot solves more or less everything.