OPENF4
Library for Gröebner basis computations over finite fields.
|
The openf4 library is a free (GPLv3) C++ implementation of the F4 algorithm.
It is efficient on prime fields of characteristic lower than 2^32 and on GF(2) extensions of degree less than 64.
Computations over prime fields of characteristic higher than 2^32 are available through a Givaro wrapper for arithmetic.
Computations over non prime fields (exept GF(2^n) with n<64) are not handled.
You need a compiler that support C++11. If it is not your default compiler replace ../configure by CXX=compiler ../configure.
Example: CXX=g++-4.9.2 ../configure.
If you want a parallelized version, you need to compile with g++ (clang does not support openmp).
For prime fields of characteristic higher than 2^32 you need Givaro and GMP (required by Givaro). GMP must be compile with C++ support (–enable-cxx option in configure).
For some very specific systems the library can use FFLAS-FFPACK to improve slightly the time complexity (but increase in the same time the memory requirement).
Clone git repository: git clone https://github.com/nauotit/openf4.git
Default values are in uppercase.
This support allows sometimes a small improvement but increase the memory requirement. FFLAS-FFPACK requires BLAS (we advise Openblas), Givaro and GMP. The Blas library must be compiled without threading (for Openblas compile with make USE_THREAD=0) in order to use FFLAS-FFPACK in multithread mode. Finally FFLAS-FFPACK may be configured with the following options: ./configure –enable-optimization –enable-openmp –with-gmp="/path/to/gmp" –with-givaro="/path/to/givaro" –with-blas-libs="-L/path/to/openblas/lib -lopenblas -Wl,-rpath=/path/to/openblas/lib"
In these tutorials, we assume that the openf4 library has been installed in /usr or /usr/local. The input polynomials must not have several terms with the same monomial.
Tutorial for prime finite fields with modulo < 2^32
Tutorial for prime finite fields with modulo > 2^32
Tutorial for the GF(2) finite fields
Tutorial for GF(2^n) finite fields with n<64
If the library has been installed in a directory called "LIB" (using for example ./configure –prefix=/home/miscellaneous/LIB) add:
For instance tutorial-method2.cpp can be compiled with: g++ tutorial-method2.cpp -I/home/miscellaneous/LIB/include -o test -std=c++11 -L/home/miscellaneous/LIB/lib -lopenf4 -Wl,-rpath=/home/miscellaneous/LIB/lib
Here is a list of encountered problems with their solutions:
Bug with libgomp and libstdc++ (make check failed)
Bug "Input polynomials must not have two different terms with the same monomial"
If you find an other runtime bug:
Contribution is welcome, we give here some ideas of improvement but feel free to implement your own.
In order to keep consistency we follow these naming conventions: