2. Installing MTfit¶
MTfit
is available from PyPI and can be installed using
$ pip install MTfit
MTfit
is available in several formats, including as a tar.gz
file, a zip
file, and as ``wheels`. Additionally the git repository can be cloned.
Apart from the wheels, all the other formats require installing from the source (after unpacking the compressed files e.g. tar.gz
).
MTfit
can be installed from the source by calling:
$ python setup.py install
To see additional command line options for the setup.py
file use:
$ python setup.py --help
or:
$ python setup.py --help-commands
2.1. Requirements¶
MTfit
requires three modules
- NumPy
- SciPy
- pyqsub - a simple module to provide interfacing with qsub, and will be automatically installed.
- matplotlib
2.1.1. Optional requirements¶
Additionally there are several optional requirements which allow additional features in MTfit
.
2.1.1.1. HDF5 (Matlab -v7.3)¶
To use the HDF5 MATLAB format (format -v7.3) or disk-based storage of the in progress sampling (slower but saves on memory requirements) requires:
If installing from source these modules require:
- HDF5 1.8.4 or newer, shared library version with development headers (libhdf5-dev or similar)
- Python 2.6 - 3.3 with development headers (python-dev or similar)
- NumPy 1.6 or newer
- Optionally: Cython, if you want to access features introduced after HDF5 1.8.4, or Parallel HDF5.
Warning
HDF5 support is required if the output files are large (>2GB) and MATLAB output is used, beacause MATLAB cannot read older format files bigger than this.
2.1.1.2. MPI¶
To run on multiple nodes on a cluster requires mpi4py
installed and a distribution of MPI such as OpenMPI to run in parallel on multiple nodes (single node multi-processor uses multiprocessing
)
2.2. Running the Test Suite¶
MTfit
comes with a complete test suite which can be run in the source directory:
$ python setup.py build
$ python setup.py test
and after installation from the python interpreter:
>>> import MTfit
>>> MTfit.run_tests()