E-155 Analysis on Unix
This note describes how to link and run E-155 analysis executables
on Unix at SLAC. It is similar to E143, and practically identical to E154.
M. Daoudi, 10-Dec-93
Last update: 11-Dec-96
Have lots of fun!
- In your .login add the following line to select the development
version of code:
- Create a directory where you work. Keep your source code (i.e. Fortran
and C files), include files (typically common blocks) etc in it.
- To make the executable, move to this directory, then
$E155_COM/e155mak or(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). You will most likely want to specify
the name of the subroutine(s) you want to test.
If you don't want to provide your own
options, just hit <CR> at the prompt and the program will link with preset
Alternatively you can supply the name of the options file as an argument
to the link command, for example:
$E155_COM/e155mak debug mye155.opt
An executable called e155anl.exe (or e155anl_dbg.exe if debug) will be
created in the current directory
You can supply the following (optional) parameters in an input file
Note: The object files specified in the option MYOBJS will be linked only,
without looking at any dependency. The source files specified in MYCODE will be probed
to know if they need to be recompiled (changes, new include file ...).
(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.)
- Alternate name (and directory) for the executable
- Compilation options for the xlf90 Fortran compiler
- Linking options for xlf90
- Optimization flag for compiling and linking of code
- Private source code (fortran or c) to compile and link
- Private object files to be linked only
- Private libraries
- Alternate directory for source (.f) files
- Redefine directory where INCLUDE files are to be found
Here is an example of a user options file:
For faster execution of the code, use the following option: OPTFLG='-O2'
Zen's C Libraries:
The production (prod) versions of ALIB and CLIB are normally used.
This is governed by the environment variables $ALIB and $CLIB, which are
set in the setprod and setdev scripts.
It is crucial that the same version of ALIB be specified in
the file anal-sdb.dat.
Otherwise, the program will very likely crash.
- 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). Make sure you have the appropriate
anal-setup.dat files, then type:
$E155_COM/e155run or (to run the debug version).
You will then be prompted for the name of the executable.
If you hit <CR>
e155anl.exe will be run.
By default, this is the name
that is used when creating a new executable; you can modify it with the linking option EXE
as explained above.
When the execution of the program starts, some information will scroll on
your window and a "Run-Control" window will open up if you had specified
it in your file
In debug mode you will enter the debugger: after having set some
breakpoints (use man pages or ask an expert), then click on
"continue" to start the execution of the program.
When using e155run, the program will try to look at constant files in the current
directory first, if not there, it will take them in $E155CON. This allows to have
a private constant file in current directory and all the others in group directory.
This can be changed by changing the environment variable CONPATH.
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
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.
- If you find some of the commands mentioned above too long to type, you can
define aliases (symbols) in your .cshrc file to replace them.
- The linking of the executable is based on the Unix facility make. One of its
advantages is that before it executes any operation in a given step it first
checks the dates of the files involved in this step. For example among a list
of several object (.o) files it will recompile only those whose corresponding
source (.f) files are newer than the objects.