E-143 Offline Analysis on Unix

M. Daoudi, 10-Dec-93 Last update: 11-Oct-94

This note describes how to link and run E-143 offline analysis executables on the Unix farm at SLAC.

  1. In your .login add the following two lines:

    source /usr/local/esa/e143ola/com/setcern
    source /usr/local/esa/e143ola/com/setprod

  2. Define the environment variable MY_ROOT to point to the directory where you want to run your own E-143 analysis jobs. This directory should have the same (sub)directory structure as:

    /u/ea/young/e143ola/pro/ (or $E143_ROOT)

    and the environment variables MYBIN, MYSRC, MYOBJ, ... etc should also be defined. This can be done once and for all in your .login file.

  3. To link the executable, move to the directory $MYOBJ (cd $MYOBJ), then type:

    $E143_COM/e143mak or
    $E143_COM/e143mak debug
    (if you want the debug version).

    You will be prompted for an (optional) input file in which you have specified your own compiling/linking options (see below for the available user options and required syntax). If you don't want to provide your own options, just hit <CR> at the prompt and the program will link with preset defaults.
    Alternatively you can supply the name of the options file as an argument to the link command, for example:

    $E143_COM/e143mak debug mye143.opt

    An executable called e143anl.exe (or e143anl_dbg.exe if debug) will be created in the directory $MYBIN

  4. To run the executable, login to one of the machines morgan01, morgan02, or morgan03, define the environment variable DISPLAY to the workstation (or X-term) you are using (also don't forget to type "xhost +" on the local machine), move to the directory $MYTAPE (cd $MYTAPE), then type:

    $E143_COM/e143run or
    $E143_COM/e143run debug
    (to run the debug version).

    You will then be prompted for the name of the executable, if you hit <CR> the executable $MYBIN/e143anl.exe will be run. By default, this is the name that is used in step 3 above; you can modify it with the linking option EXE as explained below.

    When the execution of the program starts, some information will scroll on your window and a "Run-Control" window will open up.
    In debug mode you will enter the dbx debugger: after having set some breakpoints (man dbx or ask an expert), type "ignore io", then type "run" to start the execution of the program.

    Linking Options:

    In step 3 you can supply the following (optional) parameters in an input file (e.g. mye143.opt):
    EXE:
    Alternate name (and directory) for the executable
    FFLAGS:
    Compilation options for the xlf Fortran compiler
    LFLAGS:
    Linking options for xlf
    OPTFLG:
    Optimization flag for compiling and linking of code
    MYOBJS:
    Private object files
    MYLIBS:
    Private libraries
    SRCDIR:
    Alternate directory for source (.f) files
    MYINC:
    Redefine directory where INCLUDE files are to be found
    Note: If the object files specified in the option MYOBJS are not present in the directory $MYOBJ, an attempt will be made to compile them from the corresponding source (.f) files. Three directories are searched for these .f files in the following order:
             $MYOBJ  
             $SRCDIR   if specified in the options file
             $MYSRC   
    
    (There are other parameters that can be modified that I will not mention here, for instance you can use a different version of the CERN library by just modifying the parameter CERN in your options files.)

    Here is an example of a user options file:

    MYOBJS='use_endrun.o use_init.o'
    SRCDIR=/u/ea/daoudi/other/sources
    FFLAGS='-D'
    EXE=/u/ea/daoudi/e143/work/testit.exe
    MYLIBS=mycalclib.a
    LFLAGS='-C'
    OPTFLG='-O'
    MYINC=/u/ea/daoudi/e143/test/inc/
    
    Comments:

    Optimization:

    For faster execution of the code, use the following option: OPTFLG='-O3'

    Zen's C Libraries:

    In order to link to Zen's development version of his C libraries add the following options:
    ALIB=/usr/local/esa/alib/dev/lib
    CLIB=/usr/local/esa/clib/dev/lib
    By default, the production (prod) version is used.

    Private constants:

    In step 4, you will be prompted for the option to use your private constants. If you choose this option you should enter the name of the directory that contains your private constant files. You can enter either the full path name of that directory or an environment variable referring to it, example:

    $MYCON or ~/e143/anl/conor /u/ea/daoudi/e143/anl/con

    Please try to keep ONLY constants files in this directory.
    If you choose not to use private constants then just answer NO (or < CR>) when asked in step 4, and the default constants from $E143CON will be used.

    Cleaning up:

    Occasionally your jobs will not end gracefully, and as a result some processes may still be active after they are done. In order to clean up these left over processes type:

    $E143_COM/e143cleanup

    You are encouraged to issue this command at the end of each run. However, be careful when issuing this command for it may delete another job you are running on the same machine from a different window, for example.

    Miscellaneous:

Have lots of fun!