Runtime environment

When you install MAT (or configure it in a CVS checkout), the configuration tool creates a MAT settings file in several locations (for historical reasons). The definitive version is automatically generated and resides in MAT_PKG_HOME/lib/mat/python/MAT/MAT_settings.config. This settings file is a Python config file, which is very much like a Windows INI file. The template that MAT uses resides in MAT_PKG_HOME/etc/MAT_settings.config.in. The variables defined there are:

PYTHONBIN
The path to the Python executable which MAT uses, 2.6.x or 2.7.x.
TABBED_TERMINAL_BIN
The executable used by the --spawn_tabbed_terminal option in MATWeb
JAVA_BIN
The path to a Java executable, 1.6_04 or later.
JCARAFE_JAR
The JAR file which contains the jCarafe engine
YUI_JS_LIB
Pathname of the Yahoo! UI Toolkit library used by the MAT UI
CHERRYPY_PYTHONLIB
Location of the CherryPy Web application framework
MUNKRES_PYTHONLIB
Pathname to the Python implementation of the Kuhn-Munkres alignment algorithm, version 1.0.5.4 or later.
HTTP_PORT
The default port of MATWeb. Default value is 7801.
JCARAFE_SERVER_PORT
The lowest port on which to start the jCarafe tagger server.
SUBPROCESS_DEBUG
Set this setting to "yes" if you want to see the actual command line invocations of the subprocesses that MAT invokes.
SUBPROCESS_STATISTICS
Set this setting to "yes" if you want to see the memory usage and time for every synchronous subprocess call. Only available on Linux, and only if the psutil package is provided.
PSUTIL_PYTHONLIB
See SUBPROCESS_STATISTICS above.
TMPDIR_ROOT
If set, this will be the default location for temporary directories to be created. This setting can be overridden by the --tmpdir_root common option.

(The definitive version also has a couple of generated variables which are not listed here.)

By default, the values for these variables are read out of the definitive MAT_settings.config at runtime. However, there are two ways you can override these values:

You shouldn't need either of these options, but they're available for emergencies and special cases.

If you're getting weird behavior, and you want to see where your config variables are coming from, the --config_verbose common option available with most command-line tools will help you.

Changing your runtime environment

The definitive settings file in MAT_PKG_HOME/lib/mat/python/MAT/MAT_settings.config is created by running the MAT setup utility (see below) on a copy of the config file which lives elsewhere (we'll call this the source settings file). Do not simulate this process by hand.

If you received MAT as a zip file, the MAT installer will create the source settings file and run the MAT setup utility for you. The source settings file will be the MAT_settings.config file at the toplevel of your unpacked directory. Rerunning the installer recreates both files.

If you checked out MAT from CVS, you'll create the definitive settings file as follows:

In either case, if you want to update your settings (e.g., perhaps you want to add a value for TMPDIR_ROOT to manage your temporary files, or you want to monitor subprocesses using SUBPROCESS_DEBUG), you'll first make the change in your source settings file, and then run the MAT setup utility to percolate the changes and create the definitive settings file.

The MAT setup utility is invoked as follows:

Unix:

% cd $MAT_PKG_HOME
% python src/MAT/setup.py --mat_settings_file <source_settings_file>

Windows:

> cd %MAT_PKG_HOME%
> python.exe src\MAT\setup.py --mat_settings_file <source_settings_file>