-
Notifications
You must be signed in to change notification settings - Fork 10
Installation
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
-
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 -- The Fortran bindings to HDF5 have to be compiled with the same compiler, as is used to compile the Kiwi tools. Sorry, this is a Fortran95 problem: .mod files are compiler specific. Usually something like the following succeeds, with the more recent versions of HDF5:
FC=g95 ./configure --enable-fortran --prefix=/somewhere/hdf5-g95
make
make install
# and if you want a second installation using a different compiler:
FC=ifort ./configure --enable-fortran --prefix=/somewhere/hdf5-ifort
make clean
make
make install
-
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 gcc
and then copy all its header files (*.h
) to/usr/local/include
andlibmseed.a
to/usr/local/lib
. Check, that the environment variables$LIBRARY_PATH
and$C_INCLUDE_PATH
contain/usr/local/lib
and/usr/local/include
, respectively. -
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_PATH
to 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.
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
-
cd
into the kiwi directory. - Copy
Makefile.local.example
toMakefile.local
. This file is included by the mainMakefile
. - Edit
Makefile.local
to your needs. Check compiler settings, HDF5 library paths and install prefix. - Run
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. - Run
make install
orsudo make install
, whatever is apropriate for your setup.
# 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: