use test scripts for performing tests
[barvinok.git] / README
blobc32f41d9cda489d01eb0420aa6980cf4dc5e8674
1 barvinok is a library for counting the number of integer points
2 in parametric and non-parametric polytopes as well as projections
3 of such sets.
4 For parametric polytopes the count is represented by either
5 an explicit function or a generating function.
6 The first comes in the shape of a piece-wise step-polynomial.
7 This is a generalization of both Ehrhart quasi-polynomials
8 and vector partition functions.
9 The second is a generalization of an Ehrhart series.
11 This library shares some functionality with LattE
12 (http://www.math.ucdavis.edu/~latte/)
13 and uses PolyLib (included), NTL (http://shoup.net/ntl/).
14 If you have cloned the git repository, you need to run
15         ./get_submodules.sh
16         sh autogen.sh
17 to get the submodules and create the configure scripts.
19 Additionally, the following packages can optionally be used
20 - GLPK (http://www.gnu.org/software/glpk/)
22 NTL needs to have been compiled with GMP support.
23 That is, you have to specify
24     NTL_GMP_LIP=on
25 NTL also needs to have been compiled in ISO mode.
26 For versions older than 5.4, this means you need an additional
27     NTL_STD_CXX=on
29 Suppose you want to install everything in /opt,
30 Then you configure/compile NTL using
32 cd src
33 ./configure NTL_GMP_LIP=on PREFIX=/opt GMP_PREFIX=/path/to/gmp
34 make
35 make install
37 Configure this library using
39 ./configure --prefix=/opt --with-gmp-prefix=/path/to/gmp --with-ntl-prefix=/opt
41 If you want shared libraries, then configure with the
42 --enable-shared-barvinok option.
43 Note that this requires NTL to have been built as a shared library as well
44 (using "SHARED=on" on its configure line).
45 Also note that if you have previously installed a shared library of an older
46 version of barvinok, and you do not install one for this version, then the
47 linker may pick up the old shared library rather than the new static library.
49 By default, barvinok will use the included copy of isl.
50 If you want it to use a pre-installed version of isl instead, then
51 configure with the --with-isl=system option.  Use the --with-isl-prefix
52 option to specify the installation prefix of isl, if needed.
54 If you want to compile and use the included pet library, then
55 you need the following packages:
56 - libyaml (http://pyyaml.org/wiki/LibYAML)
57 - LLVM/clang (http://clang.llvm.org/get_started.html)
58 Additionally, you need to configure with the --with-pet=bundled option.
59 See pet/README for more information.
61 Then
63 make
64 make check
65 make install
67 If you want to put any one of these packages in the default location
68 (typically /usr/local), then the prefix argument can be omitted.
69 For more information on other arguments,
71 ./configure --help
73 The input format of barvinok_enumerate is the same as that
74 of testehrhart from the PolyLib distribution.
75 See the PolyLib manual, barvinok_enumerate.c or the
76 examples in tests/ehrhart/ .
78 Note that the fractional representation is subject to change.
80 The library supports three specialization algorithms.
81 The first performs a direct specialization using a random vector.
82 The second performs a "depth-first" incremental specialization.
83 The third performs a "breadth-first" incremental specialization.
85 The first is usually the fastest, but can fail if the random
86 vector happens to be chosen incorrectly.
87 The incremental algorithms should never fail, but can be slower,
88 in some cases by quite a bit.  The breadth-first version should
89 be faster than the depth-first version, especially on polytopes
90 of moderate dimension with a lot of "structure", but can require
91 more memory.
93 Building the Python interface requires barvinok to be configured with
94 LLVM/clang libraries (--with-clang=system; see pet/README for detailed
95 requirements) and an isl build directory. The isl build directory is
96 defined implicitly when using the included copy of isl
97 (--with-isl=bundled) and only needs to be specified explicitly when
98 using an external copy of isl (--with-isl-builddir=DIR, where DIR is
99 the location of the isl build directory). Using the Python interface
100 further requires shared barvinok libraries (--enable-shared-barvinok).
102 For bug reports, feature requests and questions,
103 contact http://groups.google.com/group/isl-development
105 Whenever you report a bug, please mention the exact version of barvinok
106 that you are using (output of "./iscc --version").  If you are unable
107 to compile barvinok, then report the git version (output of "git describe")
108 or the version included in the name of the tarball.