Resources

6-Mar-2015


All you need to create a new version of transp..

Directories

/home/pshare/transp_versions
Parent directory for the transp version directories. Curently a link to /common/transp_shared/Code/transp on the transp shared data disk
/home/pshare/scripts
Contains scripts for creating a new transp version. These are also linked from transp_versions, for convenience

Files & Scripts

Linked from transp_versions:

clone_transp
Creates a copy of an existing transp directory tree ( perl )
prepare_transp
Updates files to prepare a new version for use
./lljob/lltransp.pl
[ alias LLjob ] - submits a transp command to the load leveller 

In /home/pshare :

alias
Sets up command aliases for convenient transp maintenance
settrn2
Sets up transp environment for any version of transp. Requires that $TRANSPROOT be defined
transp_window <version>
Creates a new Xwindow, then calls settrn2 & hello
hello
Navigates to users working directory ( $WORKROOT) and sets up some variables for JETtransp

In $TRANSPROOT

Info
Text file describing the transp version ( creation date, pppl version etc )
transprc
Sets up version specific environment variables - compiler names, run time library definitions etc

Environment variables

A selection of the variables which may be required during transp installation. All are defined ( in settrn2 ) relative to the current TRANSPROOT directory

CODESYSDIR
Root directory for transp code management system
LOGDIR
Directory for installation log files
SC
Transp scripts directory - $CODESYSDIR/csh
TMPDIR
Transp directory for temporary files
TRANSPROOT
Root directory for the current transp version
XE
Directory which stores the transp executables

Command aliases

 These alaises are supplied to simplify frequently used command sequences. They are set up by the command source ~jconboy/jec_login  alias , which also sources the file ~pshare/alias

Aliases are ( mostly ) defined with a leading upper case character, to distinguish them from native Unix commands

Alias Definition Function

Cfl

(diff --side --text -b -W160) Compares two files

Date

(ls -lrt) Lists a directory in date order

LLjob

/home/pshare/transp_versions/lljob/lltransp.pl Submits a transp load leveller job

LLq

llq | egrep $USER Displays load leveller queue for User

Last

ls -lrt !^ | tail -8 Shows 8 last used files in directory

Linkcheck

egrep -A1 %linkcheck Checks status of transp linkcheck script

Log

ls -rt $LOGDIR/* | tail -1 Returns name of latest log file

Logchk

egrep -A1 %link `Log` Linkcheck status for last logfile

P

pushd Adds directory to stack

Qenv

printenv | egrep -i Searches for a string in environment variables

Qt

echo $TRANSPROOT Displays current transp version

Search

egrep -i Find a string in a file ( case insensitive )

Tail

tail -$LINES Displays 1 screen full of data from end of a file

Xtail

xterm -bg LightGrey -geometry 100x70 -T !^ -e tail -f !^ Launches an X-window to display logfile for a runing process

jec

source ~jconboy/jec_login Sets up these aliases 

qd

dirs Displays directory stack

qq

pwd ; whoami Who & where am I ??

Scripts

The script files in transp_versions are actually links to ~pshare/scripts/csh, & are stored in the (local ) CVS repository ~pshare/CVSroot.

clone_transp   

# Use
#     >cd /home/pshare/transp_versions
#     >set tv `pwd`
#     >echo $tv
#     /common/transp_shared/Code/transp
#     >$SC/clone df Stv/JET_61 $tv/JET_62
#
# nb opt is case insensitive..
#
# Arguments
#     Options InputRoot, OutputRoot
#
# Options
#     Max    Copy everything except the external libs
#     Df     Copy source + makefiles ready for a build
#     Min    link everything
#     MAST   link ( nearly ) everything
#

clone_transp creates a new Transp directory structure, which may be a complete copy of the original (Max option), a copy of the source, with empty object & executable directories (Df), or be links to the input version (Min).  The Min option is useful to create a version for testing scipts, for example.

The Input and OutputRoot variables should be set to the actual directory names, to ensure that any links cannot be changed inadvertantly at a later date.

prepare_transp

This script prepares a new version of Transp for test running. It launches a text editor ($EDITOR) to create the files Info and transprc if these dont exist, and creates the files init and modules/Root (from templates in transp_versions/_VN_ . The init file defines $TRANSPROOT for batch jobs, and modules/Root defines the version number for the modules system.

prepare_transp will run $CS/ckdirs, which creates the directories for each library or module (under codesys) if this has not been done. It also creates empty result and data directories, so that test runs are forced to rerun the data preparation steps.

settrn2

This is the 'standard' Transp login script, used by all versions. Since csh lacks a subroutine construct, the script calls itself with different options, selected by the login type. Available options are

>source ~/settrn2 help

Useage
source ~/settrn2 <opt> {-db}
-db Activate debug output


settrn2 -I- Settrn2 options :-
mpi init host source tty source tr_root tr_dir tr_work tr_path tr_lib tr_run loadlevel prep whouse mds grid transprc
alias xtranspin du

showversion Show current transp version
showpath Show current $PATH setting
checkpath Report path directories not in current version
Option

Function

init Prints version information; checks if user is member of the Transp group
OS Sets flags - $FC10, $SL6 - to identify OS version
du Display (/common/transp_shared) disk usage
tty Sets up terminal type
grid_cert Diplays grid certificate status
grid sets grid related parameters - see codesys/source/doc/tr_start.doc
host sets host related info
idl sets IDL path
mds sets variables for accessing MDSplus trees
mpi (For mpi batch ) - process n waits 20*n seconds on startup; prevents file access conflicts
tr_module Initialises modules for transp
tr_root Ensures $TRANSPROOT definition is valid
tr_dir Sets up aliases for the Transp directories
tr_runs Sets up env variables ($TWD etc) for the current run. $TWD is a link - $WORKROOT/.@runs/${TR_VNM}_${SETTRN_PROC}
to the current working directory
unset Unsets the variables set by tr_dir
tr_work Sets $WORKDIR to point to /tmp/$USER/Transp/work for batch jobs; all working files are stored on this (local) disk
tr_path Sets $PATH, checking that all directories exist
Sets PERL5OPT to include directories for PERL modules
tr_lib Sets $LD_LIBRARY_PATH
loadlevel Sets $LLDIR to ~pshare/ll
source Sets CVSROOT (now redundant)
prep Runs $SR/init - initialisation for JETtransp
prompt Sets terminal prompt to Transp vn number
transprc sources the (Version specific) file $TRANSPROOT/transprc
alias Defines a few more aliases, why not ??
xtranspin Sets uid path etc for xtranspin
showpath Shows current path, in a readable manner
showversion Shows version info & runs checkpath
checkpath Shows elements of $PATH not from the current version
whouse Sets variables needed by data warehouse module
   

showversion

JET_62A>source ~pshare/settrn2 alias
JET_62A>Sett showversion
settrn2 -I- Transp root directory is /common/transp_shared/Code/transp/JET_62A
settrn2 -I- Codesysdir is /common/transp_shared/Code/transp/JET_62/codesys
settrn2 -I- Executables are in /common/transp_shared/Code/transp/JET_62/codesys/exe
settrn2 -I- Directories in PATH, but not from this version :-
/home/jetsys/OldSoftware/globus-4.0.5/bin
/home/jetsys/OldSoftware/globus-4.0.5/bin
/home/jetsys/OldSoftware/globus-4.0.5/sbin
/home/pshare/lib_sl6/lf95/bin
/home/pshare/ompi_lf_1.6.5/bin
/home/pshare/scripts/whouse
/common/transp_shared/Code/transp/JET_62/codesys/qcsh
/common/transp_shared/Code/transp/JET_62/bin
/common/transp_shared/Code/transp/JET_62/codesys/csh
/common/transp_shared/Code/transp/JET_62/codesys/exe
/home/pshare/bin
/home/pshare/csh

transprc

The file $TRANSPROOT/transprc contains definitions that vary between versions of transp, typically related to changes in the OS or new versions of external libraries. For example, the introduction of modules requires initialisation procedures which would fail on earlier versions where modules were unavailable.

Modules

transprc adds the directory /home/pshare/modules to the modules path. This contains

NULL
removes all existing module definitions
transp/JET
loads Lahey, mdsplus, globus etc
Loads $TRANSPROOT/Root to define $TRANSPROOT (to the modules system .. )
Sets up LD_LIBRARY_PATH, LDFLAGS etc
pgfrt
Sets up the Portland compiler run time library, which is required by several system utilities (eg jetdsp )