-
-
Save sbonner0/2138f2e3e2b249df51c765e1656f9d48 to your computer and use it in GitHub Desktop.
yum install cairomm cairomm-devel pycairo pycairo-devel sparsehash sparsehash-devel python-pip -y | |
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz | |
tar xf boost_1_56_0.tar.gz | |
cd boost_1_56_0 | |
./bootstrap.sh | |
./b2 install --prefix=/usr/local/apps/boost-1.56.0 | |
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/apps/boost-1.56.0/include/ | |
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/apps/boost-1.56.0/include/ | |
export LD_LIBRARY_PATH=/usr/local/apps/boost-1.56.0/lib/:$LD_LIBRARY_PATH | |
cd | |
wget https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.7/CGAL-4.7.tar.gz | |
tar zxf CGAL-4.7.tar.gz | |
cd CGAL-4.7 | |
mkdir /usr/local/apps/cgal-4.8 | |
cmake -DBoost_INCLUDE_DIR=/usr/local/apps/boost-1.56.0/include/ -DCMAKE_INSTALL_PREFIX=/usr/local/apps/cgal-4.8/ . | |
make | |
ln -s /usr/local/apps/cgal/lib/libCGAL.so /usr/local/lib64/ | |
cd | |
mkdir -p /usr/local/apps/openblas | |
git clone https://github.com/xianyi/OpenBLAS | |
cd OpenBLAS | |
make FC=gfortran | |
make PREFIX=/usr/local/apps/openblas/ install | |
export LD_LIBRARY_PATH=/usr/local/apps/openblas/lib:$LD_LIBRARY_PATH | |
cd | |
git clone https://github.com/numpy/numpy | |
cd numpy | |
echo "[default] | |
include_dirs = /usr/local/apps/openblas/include | |
library_dirs = /usr/local/apps/openblas/lib | |
[openblas] | |
openblas_libs = openblas | |
library_dirs = /usr/local/apps/openblas/lib | |
[lapack] | |
lapack_libs = openblas | |
library_dirs = /usr/local/apps/openblas/lib" >> site.cfg | |
python setup.py build --fcompiler=gnu95 | |
python setup.py | |
cd | |
pip install scipy matplotlib | |
wget https://downloads.skewed.de/graph-tool/graph-tool-2.8.tar.bz2 | |
tar xf graph-tool-2.10.tar.bz2 | |
cd graph-tool-2.10 | |
CPPFLAGS='-I/usr/local/apps/cgal-4.7/include/ -I/usr/include/google/ -I/usr/local/apps/boost-1.56.0/include/' LDFLAGS="-L/usr/local/apps/boost-1.60.0/lib/" ./configure --enable-openmp --with-sparsehash-prefix=google | |
make -j 4 | |
make install |
Version 2.8 is very outdated. Many things have changed and have been fixed since then. Using this version is not recommended.
Hi count0, many thanks for your response! Yes i agree that 2.8 is vastly out of date but it appears to be the last version which can be complied using the system GCC and python on CentOS 7.
Hi sbonner0, thanks for sharing this script. We're a group of Economist stuck with CentOS 7 for privacy law reasons, and would like to use graph-tool. What are the notable differences between 2.8 and 2.16? Is there any serious limitation with 2.8 you've encountered so far? Thanks a lot!
I've personally not experienced any major differences between 2.8 and 2.16 although the change log would give a better guide to what you will be missing out on.
I personally use 2.16 on my dev workstation with Fedora 23 and am stuck with 2.8 on the university compute resources due to CentOS 7. My code works fine across both resources, although you might have a different experience depending upon what features of graph tool you would like to use.
I hope that helps somewhat!
Here is a simple script to install Graph-tool 2.8 on CentOS 7....This version of Graph-tool works with the version of gcc in the Red Hat repos so is somewhat simpler then building everything from source.
In addition Boost 1.56, OpenBLAS and Numpy are installed.