Getting and Installing CMT

The manual for CMT and several tutorials are available at the CMT home page ; a short explanation of the  Concepts of CMT was prepared for GLAST developers. You are discouraged to import the executable from the CMT web site; if you do so anyhow,  install also the source code.

Obtaining the Code

SLAC UNIX Users

At SLAC Unix the environment variables CMTROOT and CMTBIN are defined in the group.cshrc. They select the version and system, respectively. Unix users, who work at SLAC or via afs, can use CMT which is installed at 

$CMTROOT/$CMTBIN/cmt 

Installing CMT on your local machine

For developers, who need their own copy, the checkout and build procedures on Unix and Windows are described below. The source code is the same for Unix and Windows machines. 

CMT is available in the central GLAST CVS repository. This is the version that all GLAST developers should use. Make sure that you select the correct <version> ( at present  v1r12p20020606 ).   

The commands to checkout the CMT sources and scripts are (for Windows the instructions have to be run from the command line, e.g. the DOS prompt) 

>  mkdir  CMT
>  cd  CMT
>  cvs  co  -d  <version>   -r  <version>   CMT

On Windows, vcmt can be used for checkout, (fill in the version in the CMT setup box, then click "checkout"),  but the very first checkout of CMT has to be done with CVS, because vcmt will not start up without having a version of CMT available.  


Building CMT

Windows:

You can either build CMT directly, or use the VCMT GUI.  We recommend the use of VCMT, once you have VCMT installed on your setup.  VCMT makes the setup of the environment and the use of CMT quite easy.

Using Microsoft Visual C++ to build CMT

This will compile and link the CMT executable into the CMT/version/VisualC directory.

Using VCMT to build CMT

This will compile and link the CMT executable into the CMT/version/VisualC directory.

Add the directory containing CMT to your PATH

Verification

From a DOS windows, execute the command:
> cmt
The result should be the help instructions of cmt.

UNIX:

Note: These instructions are only needed for those users who do not want to use the central SLAC installation of CMT. i.e. for users who want their own copy

These instructions are only for users, who do not use the central SLAC installation of CMT.

  1. Check out CMT from the repository as described above. Move into the mgr directory of the CMT package
  2. > cd */mgr

    Issue the following commands from the mgr subdirectory. 

     >  chmod +x * [a]
     >  setenv CMTCONFIG `sh cmt_system.sh`  [b] use backslash !
     >  ./INSTALL [c]
     >  source setup.csh [d]
     >  gmake [e]
     >  ./INSTALL [f]

    Notes

    a) is only necessary if the execute bit is not set; some scripts do not get checked out as executable
    b) saves the name for your current platform in the environment variable CMTCONFIG, e.g. i386_linux24 
    c) builds the setup.csh script. Do not omit the "./"
    d) sets up environment variables for running CMT
    e) builds the CMT executable
    f) Does the installation. Don't forget the "./"
  3. Set the CMT environment variables
    At SLAC most of the CMT environment variables are set by the script
    $GLASTROOT/ground/scripts/group.cshrc
    At this stage you need to set up for your local installation only the path
    $CMTROOT/$CMTBIN
    to the cmt executable. CMTBIN has the value Linux, see also the setup described in Developing the Code(Unix).
  4. Verify the environment variables by issuing the commands
  5. > cmt       [gives the help of CMT]
    > env  |   grep CMT

Last Modified January 21, 2003

Back to Main Menu        Previous Step        Next Step (Windows) (Unix)