Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Kiwi Compilation and Installation Guide
The Kiwi codes have so far been compiled on Linux and Mac OS X, but it should be possible to compile them on any UNIX system, where HDF5 and FFTW3 are available.
Short story: you need a Fortran 95 compiler, HDF5, FFTW and libmseed. If you are lucky, you may find all except for the libmseed through your systems package manager. E.g. on Ubuntu you could install:
sudo apt-get install gfortran libhdf5-serial-dev libfftw3-dev
Details, if you have to install some of the packages manually
A Fortran 95 compiler -- Most testing has been done with gfortran, g95, and ifort. The compiler must support allocatable derived type components, which is a Fortran 2003 feature. (Most Fortran 95 compilers support this however.)
HDF5 -- Version <= 1.8 is required, use the provided script
get_hdf5_18.shto download and compile HDF5.
FFTW3 -- The packages provided through the systems package manager will usually do fine (only Fortran77 is involved), but you have to install the headers as well as the libraries, so, for example on a Debian-based Linux system, you would install the packages fftw3 and fftw3-dev.
libmseed -- The simplest approach is to compile libmseed with
make gccand then copy all its header files (
/usr/local/lib. Check, that the environment variables
SAC -- If you want to read and write SAC files from the Kiwi Tools, you must make the linker find the sacio library. It can be found in the lib subdirectory of where you installed SAC. For example on Linux, it is named sacio.a, but like this, -lsacio won't work. Simply rename it to libsacio.a and adjust
$LIBRARY_PATHto make the linker happy (or edit the Makefile). Most people don't need SAC IO. If you are one of those, just link the Kiwi Tools against the dummy_sacio library which is included in the Kiwi source code.
Getting the Kiwi Tools
The simplest way of downloading the Kiwi Tools is by using Git:
cd ~/src/ # or wherever you keep your source packages git clone git://github.com/emolch/kiwi.git kiwi
Compiling the Kiwi core codes
cdinto the kiwi directory.
Makefile.local. This file is included by the main
Makefile.localto your needs. Check compiler settings, HDF5 library paths and install prefix.
make. If all goes well, everything will be built.
- Optionally run
make check. This will run the test programs again. Each test will report 'OK' if it passes.
sudo make install, whatever is apropriate for your setup.
Installing the Kiwi Python modules
# in the kiwi source directory: cd python sudo python setup.py install
Depending on what modules you want to be able to use, you may need some or all of the following additional packages:
If you want to use the source model viewer: