[Last Change: 18 May 2012 (rev 27) — Page History]

SAOTrace Version 2 Installation

The current version of SAOTrace is version 2.

SAOTrace is provided as source code. It must be compiled on your computer.

Release Notes

Release notes are available hereRead more.

Supported Platforms

SAOTrace is known to run on GNU/Linux and Mac OS X. It has been compiled and tested on the following platforms:

O/S Vendor/Distribution Version Arch Processor Compilers
          C/C++ Fortran
GNU/Linux Debian Lenny / 5 x86_64 AMD Opteron 2427 gcc 4.3.2 gfortran 4.3.2
GNU/Linux Debian Squeeze / 6 x86_64 Intel Core2 Quad Q6700 gcc 4.4.5 gfortran 4.4.5
GNU/Linux Red Hat Enterprise Linux 5.6 x86_64 Intel Core2 Duo E6850 gcc 4.1.2 gfortran 4.1.2
GNU/Linux Red Hat Enterprise Linux 6.2 x86_64 Intel Core2 Extreme X9650 gcc 4.4.6 gfortran 4.4.6
GNU/Linux CentOS 5.7 x86_64 AMD Opteron 250 gcc 4.1.2 gfortran 4.1.2
GNU/Linux Ubuntu Natty Narwhal / 11.04 x86_64 Intel Core2 Solo gcc 4.5.2 gfortran 4.5.2
GNU/Linux Ubuntu Natty Narwhal / 11.04 x86_64 Intel Core2 Duo P9500 gcc 4.5.2 gfortran 4.5.2
GNU/Linux Slackware 13.37.0 x86_64 Intel Atom N570 gcc 4.6.2 gfortran 4.6.2
Mac OS X Apple Snow Leopard / 10.6.8 x86_64 Intel Xeon gcc 4.2.1 gfortran 4.2.1

Software dependencies

The following are required:
  • C, C++ and Fortran compilers
  • bunzip2
  • unzip
  • gunzip
  • m4
  • make
  • tar
  • Perl (5.10 or greater)
If your system has an older version of Perl, the build script will build a private copy.

The following are recommended:

  • GNU readline library

Building and installing SAOTrace

Download the Source Code

The source code for SAOTrace is available as a single compressed tar file. Archives for version 2 have names like
saotrace-2.y.z.tar.gz

where 2.y.z is the version of the code. Make sure you downloaded the latest file for version 2.

download Download here

Unpack the tarball

tar xzvf saotrace-2.y.z.tar.gz

This will create a directory named saotrace-2.y.z.

Create the environment variable SRCDIR to point to its absolute path:

# for sh, bash, ksh, etc:
export SRCDIR=$(pwd)/saotrace-2.y.z

# csh, tcsh
setenv SRCDIR $cwd/saotrace-2.y.z

Choose the destination directory

SAOTrace should be installed into its own directory. It should not be installed directly into / or /usr/local.

Set the environment variable INSTALLDIR to the absolute path to this directory, e.g.

# for sh, bash, ksh, etc:
export INSTALLDIR=/usr/local/saotrace-2.y.z

# csh, tcsh
setenv INSTALLDIR /usr/local/saotrace-2.y.z

After installation the SAOTrace executables will be found in $INSTALLDIR/bin.

Choose the build directory

Choose a directory where the SAOTrace components will be unpacked and built. Do not put the build directory into INSTALLDIR.

Set the environment variable BUILDDIR to the absolute path to this directory, e.g.

# for sh, bash, ksh, etc:
export BUILDDIR=/tmp/saotrace-build

# csh, tcsh
setenv BUILDDIR /tmp/saotrace-build

Choose your compilers

The GNU C and C++ compilers will be used by default, even if others are present. You can choose to use other compilers by defining the following environment variables:

CC C compiler
CXX C++ compiler
F77 Fortran compiler
FC Fortran compiler

MacOS X

For Mac OS X if you are using gfortran you must explicitly select a 64 bit mode for the Fortran compiler by passing the -m64 switch to it. This can be done by setting both the FC and F77 variables to 'gfortran -m64'.

Build and Install

Create BUILDDIR if it does not exist:
mkdir $BUILDDIR

Change directory to BUILDDIR and execute the $SRCDIR/build-saotrace script.
cd $BUILDDIR
$SRCDIR/build-saotrace -s $SRCDIR -d $INSTALLDIR

If your version of Perl is too old the build will abort with a message. To build a private installation of Perl for SAOTrace, add the -p option to the build-saotrace command line.

If you need to set environment variables, it's easiest to use the env command:

env F77='gfortran -m64' FC='gfortran -m64' \
    $SRCDIR/build-saotrace -s $SRCDIR -d $INSTALLDIR

Upgrading from a previous version

Upgrading from a previous version is fairly straightforward and can save significant time.
  1. Check the release notes to see if there are special upgrade instructions.
  2. Follow the Download the Source Code and Unpack the tarball instructions.
  3. Set the BUILDDIR and INSTALLDIR environment variables to the same values as were used in the installation of the previous version.
  4. Follow the Build and Install instructions exactly as was done in the previous installation. Only updated packages will be built and installed.

Known Build Issues

  • On some platforms the gmp and gsl libraries will fail some of their tests. It's not always apparent that these failures are significant. In some cases the versions available from the OS vendor fail identically, but it's not known if the OS vendor evaluated the failures.

Things to look out for

  • If you re-run the build-saotrace command, you must invoke it with exactly the same environment variables every time. If you do not some of the compilations will abort with an error. To continue, you may either:
    • start all over by deleting $INSTALLDIR; or
    • remove the cache file in $INSTALLDIR/var/cache/saotrace/config.cache
  • If a compilation fails because a software requirement is not available (Fortran, for example), you will need to delete the cache file ($INSTALLDIR/var/cache/saotrace/config.cache) after you resolve the problem.

Support

Please contact opticsoft@head.cfa.harvard.edu for all support issues.
This software is not CXC Data Systems software and is not supported in any fashion by them.
Please do not contact the CXC Helpdesk if you have problems.
 
This page is maintained by the CXC Optics Group
CXC logo

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2011. All rights reserved.