Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Include Page
Related_Topics_Div_Close
Related_Topics_Div_Close
 
Include Page
PageMenuBegin
PageMenuBegin
 
Table of Contents
 
Include Page
PageMenuEnd
PageMenuEnd

Accounts and Resources

A description of the LCLS computing resources can be found at the PCDS Computing page.

Setting Up the Software Environment

For the analysis software to work correctly it has to run in a correct environment. LCLS Analysis environment consists of few environment variables that either point to a location of specific directories or define some configuration options such as type of the machine, compiler versions, etc. Users do not need to set environment variables manually, instead users need to execute just one simple command which defines the complete environment. The command that needs to be run from Bourne-type shell (e.g. bash) is:

Code Block
. /reg/g/psdm/etc/ana_env.sh

For C-type shell (e.g. tcsh) the command should be:

Code Block
source /reg/g/psdm/etc/ana_env.csh

The above command needs to be executed every time when user logs in, for convenience it should be added to the user's shell login script. In case of bash shell here is the line of code that should be placed into ~/.bashrc file:

Code Block
test -f /reg/g/psdm/etc/ana_env.sh && . /reg/g/psdm/etc/ana_env.sh

For tcsh the following code should be added to ~/.cshrc:

Code Block
if ( -f /reg/g/psdm/etc/ana_env.csh ) source /reg/g/psdm/etc/ana_env.csh

Environment variables

This paragraph is informational and you can skip it if you are not interested in the internals of this setup. Various procedures, scripts, etc. depend on a small number of the environment variables which define location of various parts of the software and the system. Here are the variables that have to be present in the user's shell environment:

  • SIT_ENV – defines the type of the SIT environment, can be default for regular setup or ana for analysis environment
  • SIT_ROOT – defines the location of the top directory for the PSDM software, usually /reg/g/psdm.
  • SIT_RELDIR – directory with regular PSDM release
  • SIT_RELEASE – the name of the software release to use, something like "current" or "ana-1.1.5"
  • SIT_ARCH – the name of the hardware/software architecture to use like x86_64-slc5-gcc41-opt
  • SIT_DATA – list of directories where the data files reside. These are not regular XTC data files, bur rather some additional data that software needs. Usually it includes "./data" and $SIT_RELDIR/$SIT_RELEASE/data (that is "data" directory in the releases) but can also be extended to include other locations.
  • SIT_REPOS – the locations of all "base" releases. Currently we only support single base release so this variable would look like $SIT_RELDIR/$SIT_RELEASE

Derived variables:

  • PATH – should be extended to include ./arch/$SIT_ARCH/bin and$SIT_RELDIR/$SIT_RELEASE/arch/$SIT_ARCH/bin
  • LD_LIBRARY_PATH – should be extended to include ./arch/$SIT_ARCH/lib and$SIT_RELDIR/$SIT_RELEASE/arch/$SIT_ARCH/lib
  • PYTHONPATH – should be extended to include ./arch/$SIT_ARCH/python and$SIT_RELDIR/$SIT_RELEASE/arch/$SIT_ARCH/python

All these variables could be set manually, but there is a single convenience script which can be sourced from the users' shell which does all the tedious work.

Setup scripts and their effect

Regular way to handle environment setup would be to use a special setup script which need to be sourced by user's shell. For convenience this can be included into a user's login script (.bashrc/.cshrc). The exact name of the script depends on the shell flavor and also on the type of the environment. For the data-management environment one needs to use:

No Format
(ba)sh: . /reg/g/psdm/etc/sit_env.sh
(t)csh: source /reg/g/psdm/etc/sit_env.csh

For analysis environment the commands are:

No Format
(ba)sh: . /reg/g/psdm/etc/ana_env.sh
(t)csh: source /reg/g/psdm/etc/ana_env.csh

By default script will use "current" as the release name (or "ana-current" for analysis environment), this can be changed if user's home directory contains file named SIT_RELEASE with the different release name in it.

Above scripts will define the alias sit_setup (sourcing the $SIT_ROOT/bin/sit_setup.{sh,csh}). This alias can be used to quickly change SIT_RELEASESIT_ARCH and all derived variables. To do that user calls sit_setup with zero or more parameters. Depending on the current working directory and parameters the script will change SIT_RELEASE:

  • if the first parameter to the script names a valid release (present in $SIT_RELDIR) then its name is used forSIT_RELEASE
  • otherwise, if it is run from the release directory where .sit_release file is present its content is used for the release name
  • otherwise if $HOME/SIT_RELEASE is present its content is used for the release name
  • otherwise "current" or "ana-current" is used as the release name depending on environment type

Remaining parameters (that is all parameters except first when first parameter is a release name) are used to build SIT_ARCHvalue. SIT_ARCH is an ordered sequence of 4 values separated by dashes:

  1. hardware architecture, such as i686, x86_64, sparc, etc.,
  2. operating system brief name, such as slc5, sol, winxp, etc.,
  3. compiler name and version, such as gcc43, cc58, msc8, etc.,
  4. debug/optimize/profile option, one of dbg, opt, prof.

The parameters to the sit_setup script can be used to specify one of the possible options for any of the four above items. If a parameter matches one of the possible options for the SIT_ARCH items, then that option used in place of the default one. The simple example is:

No Format
% sit_setup          # sets SIT_ARCH to x86_64-slc5-gcc41-opt

vs

No Format
% sit_setup dbg      # sets SIT_ARCH to x86_64-slc5-gcc41-dbg

vs

No Format
% sit_setup dbg slc4 # sets SIT_ARCH to x86_64-slc4-gcc41-dbg

The SIT_ARCH options which are not specified on the command line are given their default values which depend on a particular platform/OS/release combination.

Additionally sit_setup accepts keyword options which provide explicit values for different parts of the SIT_ARCH variable. This is useful when the script is used for setup of the completely new release, as in this case the script cannot always make a decision about such values as compiler name/version. The keyword options are:

  • -p processor – define processor type explicitly
  • -o os – define OS name explicitly
  • -c compiler – define compiler explicitly
  • -b build – define build type explicitly
  • -a name – define SIT_ARCH explicitly
  • -e env – overrides current value of SIT_ENV

The sit_setup script is executed on every logon and sets up the environment suitable for running PSDM software from the current production release. The script needs to be executed again if user wants to switch to a different release or to use different build option (debug vs optimized builds).

Obtaining Kerberos ticket

If you plan to work with code repository and use commands like svnaddpkg, etc. then for authorization you will need to obtain a Kerberos ticket. Ticket can be obtained at any time after you logged in by running command kinit which will prompt your for your regular password. Kerberos ticket is valid for 25 hours after which time one needs to re-run the command. Without ticket svn will print an error message "authorization failed" when it tries to access repository (some svn commands do not require repository access).

An overview of the framework

...