How to compile and install SIMRES (ver.5.0.1)

Requirements:
--------------

Source files with SIMRES are available at
http://omega.ujf.cas.cz/restrax
 
For compilation, Fortran 90 (or F77 with extensions) is required. 
Automatic creation of makefile is available for Absoft Fortran 95 on PC/Linux 
and Digital Fortran on Alpha/OSF1. 
Contact authors (JS) for help with porting to other systems.
 
Installed PGPLOT library (libpgplot.so) is required to compile and run
SIMRES (see http://astro.caltech.edu/~tjp/pgplot).

If you just install binaries, skip to the section INSTALLATION.
=========
Compiling
==========

Unzip the distribution, e.g.

% gunzip < simres-5.0.1.tar.gz | tar -xf -

The distribution will be placed in a new subdirectory:
simres-5.0.1

Make the distribution root your current directory and use following
commands to compile SIMRES

% configure <sys> -all
% make
 
<sys> defines the configuration file './config/config.<sys>' with system
dependent linker and compiler options. There should be config.<sys>
files available for following systems/compilers:
 - Linux/Absoft Fortran 95 (Absoft)
 - OSF1/Digital Fortran 90 (DEC)
 
Use one of these files as a template for porting to other systems.


Optionally, you can create also html docummentation of the source files,
% make srcdoc

or pack binary distribution,
% make distbin

You can test the program now - make the distribution root your current
directory and start SIMRES by calling the starting script:

% start

Follow the steps described in the section "Test the program ..." below.

=================
Installation:
=================

Call "Install <dir>" with the <dir> argument specifying installation
directory, e.g.

% Install /usr/local/simres

NOTE: the installation directory must already exist and you need write
permissions to it.

Running:
--------

1) Start SIMRES using the script "start" in the installation directory.
It should provide a choice from several scattering models and instrument
configurations. The script can be called from any directory. To permit
access for all system users, make a link e.g. to /usr/local/bin,

% ln -sf <installation directory>/start /usr/local/bin/restrax
% chmod 755 /usr/local/bin/simres

and start restrax from any directory:

% simres

2) You may edit the "start" script to add/modify paths to instrument
configurations and EXCI libraries.


"restrax.ini" file 
------------------
The "restrax.ini" file is read on the start-up from current directory or
from the directory with instrument configuration. It contains default
input values required when you start RESTRAX (configuration file, path
to data files, data filename etc..). You can also specify a job file to be 
executeed on startup (JOB=filename).

Environment variables
----------------------
Environment variables for PGPLOT and shared library loader are defined
in the starting script "start" or "restrax_run". You can edit these
scripts to set the environment according to your requirements.

The shared library with EXCI subroutine is searched by default in the
current directory. If not found, it is searched according to the paths
defined in the starting script (LD_LIBRARY_PATH).


Test the program using demo job file
-------------------------------------
Start restrax from any directory if the program is already
installed on the system (see the section "Running"), e.g.

% simres

From the following menus, select default (just starts the program with
default instrument setup) or try a demo session. It should start a tutorial-like
session from a job file - just read comments and press ENTER when asked for.
You can interupt the execution of a job file by typing <Q><ENTER> and continue
working interactively. 

Starting scripts
--------------------
The "restrax_run" file is an example of the starting scripts, which
can be called either directly (with appropriate options, see comments
in it) or from the menu in the script "start". You may use these
files as a template for your own start-up configuration.
Starting RESTRAX from a script permits to set environment variables and
starting options according to your requirements. 

  
  
   
