Skip to content
Stephen Smith edited this page Feb 25, 2020 · 46 revisions

Installation using Homebrew/Linuxbrew

Compiling treePL from source can be tricky and difficult. The Brewsci project provides binary downloads of treePL for both macOS and Linux.

Rutger Vos has kindly worked on a docker install for TreePL

macOS

First install Homebrew.

Then install treePL. Homebrew should automatically install the dependencies it needs.

brew install brewsci/bio/treepl

You can ensure that it works properly on your system by running the provided tests:

brew test -v treepl

This will run a few tests from the examples directory and you should be able to see treePL working its magic.

Linux

The macOS instructions also work on Linux with Linuxbrew. Once you have Linuxbrew up and running, you can install treePL easily:

brew install brewsci/bio/treepl

Installation from source

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 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

Dependencies

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.

NLopt

treePL uses 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.

adolc

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.

linux

To install adolc you can get it from the most recent release (tested on 2.6.3) here. After unpacking, for Linux, ./configure --prefix=/usr/local --with-openmp-flag=-fopenmp 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. You may have to install the libboost dependency for adolc compilation and you can do that with sudo apt install libboost-system-dev libcolpack-dev. 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/local/lib64 to the bottom of my ~/.bashrc file.

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.