Fandom

Documentation

Installation (METRo)

133pages on
this wiki
Add New Page
Talk0 Share

This page contains the instructions to install the METRo software.

Platform Edit

METRo has been designed to run under GNU/Linux operating system on a x86 processor.

In case of trouble during the installation, please read the METRo troubleshooting to know if this problem is documented there.

Ubuntu/Kubuntu Edit

On Ubuntu and Kubuntu box, you'll need the following package:

  • python
  • python-dev
  • python-numpy
  • python-xml
  • python-libxml2
  • swig
  • gfortran

To install everything, write the following in a console:

sudo apt-get install python python-dev python-numpy python-xml python-libxml2 swig gfortran

Ubuntu >= 9.10 (Karmic) Edit

For installation on Ubuntu 9.10, the package "python-xml" is not available from the ubuntu repositories - see link below for further information: python-xml package issues in ubuntu

This problem is fixed starting on version 3.2.5. See task 6969.


One solution to this problem is to install the package "PyXML" from source;

  1. Download pyxml from sourceforge
  2. Unpack and see README file for build/compile instructions (best to do this as regular user, not root)
  3. Install as root using "sudo"

The reason for this dependency is that METRo needs a library called "xml.utils.iso8061" (for date/time format handling in XML). If python-xml is not installed, then when you try to run METRo after install, python will complain about this missing library. Since python-xml is not available in ubuntu repositories another package containing the xml.utils.iso8061 library is required. PyXML includes this library.

Prerequisite Edit

To run METRo, you will need the following software packages.

Python Edit

METRo has been developed under python 2.3 and tested with python 2.4.

python :: numpy Edit

Numpy is the library replacing the numarray version. METRo has been tested with 1.0.1

XML library Edit

Since the METRo input and output format is XML, a python library is needed to parse the XML files.

Two choices are available to use with METRo: libxml2 and PyXML. METRo is ten times faster if the libxml2 library is used instead of PyXML.

python :: libxml2 Edit

The libxml2 library is usually installed with every standard GNU/Linux distribution. The python libxml2 binding corresponding to the existing version must be installed.

To know the release of libxml2 you have installed, do this following command:

ls /usr/lib | grep libxml2.so

The written numbers represent the release you have installed. To avoid all conflicts, download the source code with the corresponding release number and install.

gfortran Edit

The physical model of METRo is written in fortran 77. The binary is included in the distribution but if one wants to change the code, gfortran is required.

SWIG Edit

SWIG stands for Simplified Wrapper and Interface Generator. In METRo, SWIG is used to call C code from python.

METRo has been developed with SWIG version 1.3.20 and has been tested with versions 1.3.24 and 1.3.26.

METRo installation Edit

The code of METRo is available on the gna website. Once you have the source code, follow these steps to install METRo:

1- Decompress the METRo source. Ex:

tar xjvf metro-x.x.x.tar.bz2

2- If there is more than one version of python on your system, set the environment variable PYTHON_INCLUDE to indicate the directory where you find the include of the latest (or the one you want to use) version python. Ex:

export PYTHON_INCLUDE=/usr/local/include/python2.3

3- Execute the script setup.sh with the destination directory as an argument. Ex:

./setup.sh /usr/local

4- Run METRo with the files provided to check the installation. In the directory path_to_metro/usr/bin execute the command:

python ./metro --selftest

if the file path_to_metro/usr/share/metro/data/roadcast/roadcast_selftest.xml was created successfully and the only difference with the file path_to_metro/usr/share/metro/data/roadcast/roadcast_selftest_reference.xml is the tag <production-date> , your installation is working. Ex:

diff path_to_metro/usr/share/metro/data/roadcast/roadcast_selftest*
5c5
<     <production-date>2006-08-22T13:57:44Z</production-date>
---
>     <production-date>2006-08-23T19:46:44Z</production-date>
  • Note: path_to_metro means the path to the top-level metro directory where metro has been installed, not the directory where the original tar file was unpacked. The location where the METRo source is unpacked is in a directory called "metro-<version number>", e.g. metro-3.2.4, but the install directory will be named just "metro".



Logo ec
This page is part of the documentation of the METRo software. Back to the table of content.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.