Repository navigation
Installation
First, install the dependencies (see below), then proceed.
treePL uses the standard GNU installion system. You can get the source if you have git installed on your system (an easy install for all platforms) by typing git clone git://github.com/blackrim/treePL.git. If you don't have git and don't want it you can go [here] (https://github.com/blackrim/treePL/downloads) and click on Download as tar or Download as tar.gz. Then unarchive and you should be off.
So you can grab the code either in the archive or with git clone and cd into the src directory and run
./configure then make then sudo make install
These should be relatively easy to install, but difficulty depends on the system. It has been successfully installed on a number of linux distributions and MacOSX 10.6 and 10.7.
treePL uses [NLopt] (http://ab-initio.mit.edu/wiki/index.php/NLopt) in addition to some simulated annealing code. The code for this is included in the deps directory. To install this you can run ./configure and then make and sudo make install.
In order to work around some of the issues around gradients and barriers, in addition to analytic gradient calculations, treePL uses rad auto diff sources and adolc. Both are used because rad cannot be used with openmp (yet). If you don't have adolc, treePL will still install but it maybe be less efficient in cross validation.
To install adolc you can use the directory provided with the distribution in the deps directory. After unpacking, if using gcc you can run autoreconf -fi. Then for Linux, sudo ./configure --with-openmp-flag=-fopenmp --prefix=/usr and then make and sudo make install. It is very important that adolc is compiled with the openmp flag because that is the reason for using it with treePL. It may be important to expand your LD_LIBRARY_PATH environmental variable if you get a shared library error after compilation. For my computer, I add export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64 to the bottom of my ~/.bashrc file.
This has been tested on OS X 10.9.5 and 10.11.4.
First install Homebrew. Follow the instructions on that site as installing random software with sudo via publicly-editable wikis is a security risk.
treePL depends on ADOL-C which requires openMP for parallelization. However, Apple's clang does not support OMP yet, so we need to install gcc. This should already be compiled for you by Homebrew's maintainers if you have a recent version of OS X (Mavericks and above). Otherwise it might take a while as you build all of gcc from scratch.
brew install gcc
Then install treePL. Homebrew should automatically install the dependencies it needs.
brew tap jonchang/biology
brew install -v --HEAD treepl
You can ensure that it works properly on your system by running the provided tests:
brew test -v treepl
This will run all of the files in the examples/ directory and you should be able to see treePL working its magic. Note that Homebrew will automatically stop tests after they have run a while; this is not an error as long as you can see treePL working.
Jon Eastman's older instructions follow...
If you are on a Mac, the instructions use to be simpler but something has gone horribly askew. Jonathan Eastman has generously worked through the solution and it involves using [homebrew] (http://mxcl.github.com/homebrew/). This is edited from his post in the [issues] (https://github.com/blackrim/treePL/issues/2). This was successful with OS 10.8.1. Install command_line_tools from Xcode (https://developer.apple.com/xcode/)
Install HomeBrew using Terminal:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Set up env variable to force 'brew' to build from source. Could be useful to add the line below to ~/.bashrc or ~/.bash_profile
export HOMEBREW_BUILD_FROM_SOURCE=TRUE
Install some dependencies:
brew install --use-gcc automake
brew install --use-gcc autoconf
brew install --use-gcc libtool
brew install --use-gcc nlopt
Now you have to install the gcc that Mac is missing.
brew tap homebrew/versions
brew install gcc47
Now you can follow the instructions for the adol-c. Basically,
cd /path/to/treePL
cd deps
tar -xvzf adol-c_git_saved.tar.gz
cd adol-c
autoreconf -fi
export CC=gcc-4.7
export CXX=g++-4.7
./configure --with-openmp-flag=-fopenmp --prefix=/usr
make
sudo make install
Now follow the guidelines to install treePL from the src directory shipped from gitHUB BUT with the new gcc
cd /path/to/treePL
cd src
./configure
Before doing make, you should open the makefile and change the CC:= gcc to CC := gcc-4.7 and CP := g++ to CP := g++-4.7
Then you can do
make
sudo make install
#Updates
If you have cloned treePL, you can update the code with git pull. It should pull the most recent version and then you would just ./configure then make then sudo make install to install the updated treePL.