Please note: This documentation is very dated and should be treated as an old draft. Among the major updates as of 8/2005 are a jump from version .6 to .8, the renaming of staging to launcher.

Installation

Basics

Installation basically requires three steps. First you will need to checkout the most recent version of pythia, config, and templates from the CVS server. Then you will need to configure your environment. Finally you will run a custom installer script, mm, based on GNU Make.

The build procedure compiles and links the package and is designed to make codes easily portable to a wide variety of compiler and platform targets. Furthermore, it allows for customization of the compilation process at several different levels. The core of the build procedure is embodied in the shell script mm. Code packages are built and installed by invoking this script, which automatically determines the host target, locates the appropriate compiler commands and options for this target platform, and issues the necessary commands to build the code packages. The mm script relies on a layered set of definition files that customize behavior and recursive processing of makefiles that describe a package and any subpackages it may contain.

Hardware and Software Requirements

  • 10 MB free disk space for pythia, config, and template downloads
  • 15 MB for compiled package
  • Pythia package (which includes Pyre)
  • Config package (includes make files)
  • Python 2.3+

Supported Platforms

As of May 2004 the following platforms are supported:

11AIX-3.0AIX-4.3
AIX-5.1CompaqTru64Unix-5.0
Darwin-6.xDarwin-7.x
DigitalUnix-4.0HPUX-10.0
HPUX-11.1Irix-6.2
Irix-6.4Irix-6.5
Linux-2.0SunOS-5.5
SunOS-5.6SunOS-5.7
SunOS-5.8TFLOPS
Win32-4.0Win32-5.1

Download Pyre from CVS

Pyre is available via a Concurrent Versions System (CVS) server located at Caltech. This allows users to check out the most recent version of the software. Pyre uses a CVS server to permit the checkout of out the code.

Prior to checking out the code, you should have both CVS and SSH running on the machine where you will be working with Pyre. To check, type cvs and ssh, both should return a usage message and options.

% cvs

Usage: cvs [cvs-options] command [command-options-and-arguments]
more ...

% ssh

Usage: ssh [options] host [command]
more ...

Since you will be using SSH to retrieve files, you may need to set the CVS_RSH environment variable.

% setenv CVS_RSH ssh

If you haven't used a remote repository before, you'll need to set the variable CVS_RSH to equal "ssh". If you use the bash shell, this means adding the following to your $HOME/.bashrc file:

% export CVS_RSH="ssh"

Or, if you use a C shell derivative, you should add the following to your .cshrc:

% setenv SVS_RSH "ssh"

To check out the Pyre source code, you will have to login to the CVS server twice. You should download the most recent versions of pythia, config and templates. config contains the make system required for installation. config is a system of makefiles that simplifies program construction and deployment. config includes support for dozens of platforms and compilers, including those available at the ASCI supercomputers, permits easy access to external libraries and tools in a portable manner, and allows libraries and executables built from the same sources with different options or different compilers to co-exist. Other features include automatic dependency generation and sensible support for mixed language programming. Note: the password for checking out the config files is config. The password for checking out pythia and the templates is pyre.

The dialog between you and the server will look something like this:

% cvs -d :pserver:config@cvs.cacr.caltech.edu:/config login 

(Logging in to config@cvs.cacr.caltech.edu)

CVS password: [config]

% cvs -d :pserver:config@cvs.cacr.caltech.edu:/config co config

% cvs -d :pserver:pyre@cvs.cacr.caltech.edu:/pyre login

(Logging in to pyre@cvs.cacr.caltech.edu)

CVS password: [pyre]

% cvs -d :pserver:pyre@cvs.cacr.caltech.edu:/pyre co pythia-0.6 templates

Create New Directories

You will need to create two directories for the installation, one for the build and one for finished product. In this example, the directories build and export were created in the pathway /Users/cferguson/dv/.

% mkdir build
% mkdir export

Set the Environment

Product libraries and binaries are built in subdirectories lib and bin beneath BLD_ROOT. Once a code package has been built, the make target export can be used to install it in a directory below EXPORT_ROOT. The source code for any package to be built using the build procedure is typically stored in a directory below the common root BLD_ROOT. The files for the build system itself are also assumed to be located beneath this common root directory in $BLD_ROOT/config, although this can be overridden by setting the environment variable BLD_CONFIG to a different path.

Key environment variables:

  • BLD_ROOT is the location of installation and build
  • EXPORT_ROOT is the location of the finished products
  • TARGET can be followed by a comma-delineated list of desired compilation option
  • BLD_CONFIG points to a non-default location for the build files

You must set the BLD_ROOT and EXPORT_ROOT. First you should name where you would like the code to be built.

% export BLD_ROOT=/Users/cferguson/dv/build/

Then you should name the directory where the installation will wind up.

% export EXPORT_ROOT=/Users/cferguson/pythia-0.6/

Note: BLD_ROOT and EXPORT_ROOT should not point to the same location!

TARGET and BLD_CONFIG are optional. If you would like to indicate any special compile options, this is done with TARGET. These targets are not the same as the make targets, which are defined within the makefiles of a code package in the standard way. The current valid target options are:

  • debug allows you to compile with debugging on
  • opt will compile with optimization on
  • insure will invoke the Insure++ code checking tool to detect errors
  • purify will link with Purify memory analysis libraries
  • prof generates extra code to write profiling information
  • mpi includes MPI header and library files

For example:

% export TARGET=debug,mpi

If you would prefer to not point to the files located in the build directory, you can point to another location.

% export BLD_CONFIG=/Users/cferguson/dv/config/make

Build with mm

The mm script is invoked in a manner similar to make for example:

% mm [-f <makefile>] [target]

The default target is all. Other targets can be defined in std-targets.def or the local makefile.

The -f option allows a code package to use makefiles with a different name other than the default name, which is Make.mm. If any target is specified, then mm will build that target rather than the default target given by the makefiles.

Change to the /Users/cferguson/dv/pythia-0.6/packages and invoke the mm script.

% cd /Users/cferguson/dv/pythia-0.6/packages
% mm

The script will first check for the existence of the directories indicated by BLD_ROOT and EXPORT_ROOT. Next, it uses the uname utility to determine the operating system and machine type. This information is later used to select a platform-specific definitions file, which indicates what compilers and standard options to use.

Once this is done, mm parses the contents of TARGET and looks for corresponding target-specific definitions files. These files contain the special flags and definitions that are needed for these compilation options. In addition, a target tag is constructed by combining the name of the target platform with any user-specified targets, and this tag is later used to create target-specific subdirectories where the code package will be built. This allows the build system to simultaneously maintain builds of a code package for many different potential targets. The final setup step is to get the user's name and check for any user-specific file of definitions that may override the standard settings and behaviors.

Example 3.1. Installation on Mac OS 10.3 (Panther)

% cd dv
% mkdir build
% mkdir export
% cd pythia-0.6
% export BLD_ROOT=/Users/cferguson/dv/build/
% export EXPORT_ROOT=/Users/cferguson/pythia-0.6/
% export BLD_CONFIG=~/dv/config
% export PATH=$BLD_CONFIG/make:$PATH
% mm

Test the Installation

Each Pyre package comes with simple test scripts you can run to test the installation or various tools in the installation. For example, you can run diagnostics.py in ~/pythia-0.6/tests/jtest/tests.