Difference between revisions of "Set up PSDM software"

From cctbx_xfel
Jump to: navigation, search
(Moved bash_profile code from cctbx.xfel setup page.)
(Comments, thanks to mamin@.)
Line 51: Line 51:
  
 
== Keeping up to date with PSDM releases==
 
== Keeping up to date with PSDM releases==
 +
 +
<!-- XXX THIS IS NOT TO BE RUN UNTIL LATER -->
  
 
Since the ''cctbx.xfel'' modules do not critically depend on any particular version of the PSDM software, it is generally possible to closely track the latest version of the PSDM distribution.  To upgrade to the current PSDM release, do
 
Since the ''cctbx.xfel'' modules do not critically depend on any particular version of the PSDM software, it is generally possible to closely track the latest version of the PSDM distribution.  To upgrade to the current PSDM release, do

Revision as of 21:20, 5 February 2014

Prerequisites

The PSDM software distribution must be installed. PSDM provides installation and maintenance instructions at PSDM software distribution. The distribution can be installed anywhere on the filesystem; it is generally possible to install the PSDM software distribution without superuser privileges.

The installation root directory affects the absolute paths used in these instructions and differs from site to site. Some common installation root directories are listed below.

Site Installation root directory Notes
BNL /usr/local/crys/psdm
CCI, LBNL /net/viper/raid1/psdm Only available on viper.lbl.gov
SLAC /reg/g/psdm

Create a test release and an analysis package

In what follows it is assumed that the PSDM software distribution is installed at /reg/g/psdm. Substitute /reg/g/psdm with the appropriate path in the instructions below. These steps only need to be performed once.

A test release, which refers to a particular release of the LCLS packages, is represented by a directory in the file system, often called analysis-rel or myrelease. An analysis package within the test release in turn refers to the files implementing the analysis modules of the package. Details about installing of a test release and analysis packages are covered in Analysis Workbook. Quick Tour. In a bash shell, the environment is prepared for PSDM using

$ . /reg/g/psdm/etc/ana_env.sh

For csh, the corresponding command is

% source /reg/g/psdm/etc/ana_env.csh

Sourcing ana_env.sh or ana_env.csh only modifies the environment of the current shell, and would have to be repeated every time a new shell is started. To make the changes persistent, add

test -r /reg/g/psdm/etc/ana_env.sh && . /reg/g/psdm/etc/ana_env.sh

to ~/.bashrc, or

test -r /reg/g/psdm/etc/ana_env.csh && source /reg/g/psdm/etc/ana_env.csh

to ~/.cshrc as appropriate.

This ensures the environment is properly prepared for non-interactive shells, e.g. the shells that are used to run jobs submitted to the cluster. To also be able to use the PSDM software from interactive shells, it is recommended that bash-users put

test -r "${HOME}/.bashrc" && . "${HOME}/.bashrc"

near the top of ~/.bash_profile. There is no need to edit any additional files for csh-users, because csh always reads ~/.cshrc.

A test released based on the most current LCLS software is then set up in the current working directory using

$ newrel ana-current myrelease
$ cd myrelease
$ sit_setup
$ newpkg my_ana_pkg

Note that the names for the test release and the analysis package, myrelease and my_ana_pkg, as well as the location of the myrelease directory are common, but nevertheless arbitrary, choices.

Keeping up to date with PSDM releases

Since the cctbx.xfel modules do not critically depend on any particular version of the PSDM software, it is generally possible to closely track the latest version of the PSDM distribution. To upgrade to the current PSDM release, do

$ cd myrelease
$ relupgrade ana-current

If relinfo does not output ana-current after that, one can edit ~/myrelease/.sit_release manually to that effect. Then rebuild

$ scons -c
$ scons


External links