glastpack* Use Case

This use case will demonstrate using glastpack to create a local user area, and build against
a known version of GlastRelease.

  1. Move into your NFS User Space and then create a new directory using glastpack:

    glastpack.pl create myLocalDir
    cd myLocalDir

View the contents of this new directory and verify there is a file named CMTPATH.
 

  1. To add a path to a known build area, enter:

    glastpack.pl add /nfs/farm/g/glast/u30/

Note:  The order of the paths does matter; packages located in the paths at the front
of the list have priority over those that appear in paths further down in the CMTPATH list.

Your CMTPATH file might now look like:

# The first entry must be /nfs/farm/g/glast/u33/joeUser/myLocalDir
CMTPATH=/nfs/farm/g/glast/u33/joeUser/myLocalDir:/nfs/farm/g/glast/u30/builds/
rh9_gcc32/GlastRelease/GlastRelease-v5r0p2:

Note: The second and third lines above should all be on one line.

  1. Try running the Gleam application.

Note: If you desire to modify the jobOptions file that is used as input to the application,
it is recommended that you copy a known jobOptions file from the Gleam package.

Example #1 - Running Interactively:

cp /nfs/farm/g/glast/u30/builds/rh9_gcc32/GlastRelease/GlastRelease-v5r0p2/Gleam/v5r8/src/default.txt

    Then modify the jobOptions as desired.

    You are now ready to run the job.

    1. If you are not already in the bash shell, at the command line enter:
    2. bash

    3. Login to glastpack (so that CMTPATH becomes available for subsequent
      glastpack and CMT commands):
    4. glastpack.pl login

    5. Run the application:
    6. glastpack.pl run Gleam Gleam.exe default.txt


Example #2 -Using the SLAC Linux Batch Farm:

glastpack can also be used to submit jobs to the SLAC batch system:

bsub -q medium glastpack.pl run Gleam Gleam.exe myPath/jobOptions.txt

CAUTION: glastpack writes a single .cmtrc file. When you submit to batch, be careful to have one CMT setting in use for all of the jobs; otherwise, it is not certain which version of the .cmtrc file will be used.

Workaround: For Monte Carlo (MC) data, scripts are normally used to run the CMT setup file and then the executable, enabling different MCs to be active at the same time. For example you would:

  • First source the setup file, e.g., Gleam/v5r8p1/cmt/setup.sh
  • Then run the exe directly, e.g., Gleam/v5r8p1/rh9_gcc32/Gleam.exe myJobOptions.txt

By doing bsub here, the environment variables are inherited from sourcing setup.sh.

 

Note: For additional information, refer to:

Using the SLAC Batch Farm, by Richard Dubois

More about glastpack:

  • glastpack also encapsulates the Unix commands necessary for setting the CMTPATH,
    doing runtime configuration, and launching builds.
  • To see a list of all available glastpack commands, from the command line, enter:

    glastpack.pl

  • To get details about a particular glastpack command, enter:

    glastpack.pl [name of command]

 

Related Topics


* A GLAST package management tool.

 

Last updated by: Chuck Patterson 06/29/2007

 

 

06/29/2007