These instruction describe the dynamic compilation of Zonation 3.1.11 on Ubuntu 13.04 (Raring Ringtail). Instructions have not been tested on other distributions/versions. You can copy the commands from this file or run the individual steps with the accompanied bash scripts.
You execute all steps by running:
./00-run-all
sudo apt-get update
sudo apt-get install cmake libqt4-dev libfftw3-dev libqwt-dev libboost-all-dev libgdal-dev
Alternatively, run:
./01-deps-zig3
Create a suitable download directory, fetch Zonation source code (version 3.1.11) from CBIG server, and extract the sources to the directory created:
mkdir zonation3
cd zonation3
wget http://cbig.it.helsinki.fi/files/zonation/zig3-src/zig3-3.1.11-src.tar.bz2
tar -jxvf zig3-3.1.11-src.tar.bz2
Alternatively, run:
./02-wget-zig3
To build Zonation library (zig3lib
) and Zonation CLI utility (zig3
), do the following:
mkdir zonation3/build
cd zonation3/build
cmake ../src-3
make
If you have several cores available for compilation, you can pass switch -j X
to make
where X
is the number of designated cores (e.g. make -j 4
).
Alternatively, run:
./03-build-zig3
In order to call zig3
anywhere on the system (instead of just the build-location), create a symbolic link:
sudo ln -s FULL_PATH/zonation3/build/zig3/zig3 /usr/local/bin/zig3
Replace FULL_PATH
with the full path to the directory containing directory zonation3
created in step 2.
Alternatively, run:
./04-postinstall-zig3
This stage is completely optional.
You can test that Zonation works by running some of the runs used in the Hunter Valley tutorial. This is not a thorough test, but it will at least give you an overview on whether Zonationis working as intended. Tutorial data and setup files are fetched using git and run using zrunner.
First, install git:
sudo apt-get -y install git
Then, install Python packages needed by zrunner:
sudo apt-get -y install python-yaml python-pip
Alternatively, run:
./05-deps-zrunner
zrunner is installed directly from GitHub using pip.
sudo pip install https://github.com/cbig/zrunner/archive/master.zip
Alternatively, run:
./06-install-zrunner
With git installed, clone the tutorial repository with the following command:
git clone https://github.com/cbig/zonation-tutorial.git
Alternatively, run:
./07-git-tutorial
You can run 5 basic tutorial variants defined in the configuration file tutorial_runs.yaml
in this repository (note that similar file is found from within the tutorial repository as well) by using zrunner:
zrunner -l tutorial_runs.yaml
zrunner will produce an output file results_XXX.yaml
in the same folder. XXX
will correspond to information about your system. If everything went fine, you should see no critical errors on the screen and the yaml-file should report execution times for successful runs.