Versions Compared

Key

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

...

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) the "bash" shell is:

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

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

...

are not supported by the world-standard conda package management system we use.

The above command needs to be executed every time when a 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:

...

(e.g. .bash_profile file for bash)


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_NO_MODIFY_OMPI_ENV=1

before setting up the ana environment.

Cern Root Users

At LCLS, the ana_env scripts make our cern root installation available to users. Advanced root users may want to run the thisroot.sh script to further setup the root environment. After running the ana_env.sh script, one would execute:

Code Block
source thisroot.sh  # for bash, and thisroot.csh for c shell

however most root users should not need to do this. This script makes all the root utility programs available, and inserts root directories at the start of PATH, LD_LIBRARY_PATH and PYTHONPATH environment variables.

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 the environment variables to a new release or architecture. All path names to a release (test- and base-release) are using an absolute path. This means that changing a directory after running sit_setup will not change a release. When calling sit_setup zero or more parameters are accepted. The first step is to find out which release to use using the following order:

...

ana

...

environment

...

The remaining parameters (that is all parameters except the first if the first parameter is a release name or test-release path) are used to build the SIT_ARCH value. SIT_ARCH is an ordered sequence of 4 values separated by dashes:

  • hardware architecture, such as i686, x86_64, etc.,
  • operating system brief name, such as rhel5, rhel6, rhel7, etc.,
  • compiler name and version, such as gcc41, gcc44, etc.,
  • 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 is used in place of the default one. The simple example is:

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

vs

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

vs

No Format
% sit_setup dbg rhel5 # sets SIT_ARCH to x86_64-rhel5-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 the setup of a 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 script needs to be executed again if a user wants to switch to a different release or to use different build option (debug vs optimized builds).

Obtaining Kerberos ticket

...