|Version 119 (modified by tiago peixoto (2), 12 months ago) (diff)|
Table of Contents
Downloading and installing graph-tool
graph-tool is released under the GPL. For general installation instructions, please see the included INSTALL file.
You'll need the following in order to build and use graph-tool:
- GCC, version 4.2 or above (version 4.6 is recommended).
- The boost libraries, version 1.42 or above.
- Python, version 2.7 or above (including version 3).
- The expat library.
- The SciPy python module.
- The Numpy python module.
- The CGAL C++ geometry library, version 3.5 or above.
- Graphviz for graph drawing, with the python bindings enabled (optional).
graph-tool was tested only on GNU/Linux and MacOS X systems, but should also be usable on other systems where the above requirements are available.
Memory requirements for compilation
graph-tool requires large amounts of RAM (>1 GB) during compilation, because it uses lots of template metaprogramming. The supported compiler, GCC, is still not very well optimized for this, which means that even though the program is relatively small (the compiled binary, as of version 2.2, is around 20 MB in size), it will still use up lots of RAM during compilation, specially if optimizations are used (and you do want to use them). See, for instance, GCC bugs 29433 and 12850. If you don't have enough memory, try passing the "--disable-graph-filtering" option to the configure script. This will disable some of the filtering functionality of graph-tool, but will save some memory during compilation.
graph-tool can run several of its algorithms in parallel. It makes use of OpenMP to do this, which provides an almost trivial way of converting serial code into parallel code. OpenMP is an extension to the Fortran, C and C++ languages, which uses compiler directives to achieve automatized code parallelization. Moreover, since it uses compiler directives (#pragma in C/C++), it maintains backwards compatibility with compilers which do not support OpenMP, and the code is then compiled cleanly as regular serial code. Thus, support for parallel code in graph-tool is quite optional.
OpenMP must be enabled during compilation, if you want the codes to run in parallel. For this, just pass the option "--enable-openmp" to the ./configure script:
$ ./configure --enable-openmp $ make
Stable Release (Current version: 2.2.17)
The source code can be downloaded from:
There are binary packages available for the following GNU/Linux distributions:
Debian and Ubuntu
Add one of the following lines to your sources.list,
deb http://downloads.skewed.de/apt/squeeze squeeze main deb-src http://downloads.skewed.de/apt/squeeze squeeze main
deb http://downloads.skewed.de/apt/sid sid main deb-src http://downloads.skewed.de/apt/sid sid main
deb http://downloads.skewed.de/apt/precise precise universe deb-src http://downloads.skewed.de/apt/precise precise universe
deb http://downloads.skewed.de/apt/oneiric oneiric universe deb-src http://downloads.skewed.de/apt/oneiric oneiric universe
depending on your distribution. After running apt-get update, the package can be installed with
apt-get install graph-tool
If you want to verify the packages, you should use the
following public key: F36FE35D.
After saving it to a file, you should add it to your list with
apt-key add <key's filename>
Afterwards, you can run apt-key list, which should give you the following details about the key:
pub 1024D/F36FE35D 2009-03-29 uid Tiago de Paula Peixoto <email@example.com> uid Tiago de Paula Peixoto <firstname.lastname@example.org> uid Tiago de Paula Peixoto <email@example.com> sub 2048R/D3E62840 2010-10-12 [expires: 2011-10-12] sub 2048R/0FF00286 2010-10-12 [expires: 2011-10-12] sub 2048R/5900157D 2010-10-12 [expires: 2011-10-12] sub 4096g/BD0ABCFD 2009-03-29 [expires: 2011-10-12]
An ebuild is available at:
If you want to install the latest development version from git, you can use:
port install py-graph-tool
If you want to install the latest development version from git, you can use the following portfile:
Make sure you use the same GCC version to compile the whole stack (python, boost, etc) or you may lead into problems. In an ideal world, the correct version should be the latest one from the "stock" FSF GCC, however only the bastardized version from Apple (currently, version 4.2) seems to work properly on the platform. On the other hand, in an ideal world, one would opt for a less freedom- hating platform in the first place...
An unofficial graph-tool port is available at freshports.
Latest Development Source Code
We use Git for source revision control and code sharing.
The git public repository can be browsed at:
Development snapshots can also be downloaded in the above URL. The whole tree can be checked out with the following command:
git clone git://git.skewed.de/graph-tool
For further instructions on how to use Git, see the documentation.