sabrelogo

Sabre

Installation dependent functions

Sabre manual

The Sabre source code is divided into 2 parts, the invariant code in the file sabre.f90 and the installation dependent part in macdep_parallel.f90 (which is suitable for serial Sabre as well. Also included is macdep_in_stata.f90 for building the sabreStata plugin). (There are also a number of source files containing code from the HSL library. These should not require change and should not be used independently of Sabre.) Both parts include a header file, limitsf90_standalone.h (or limitsf90_plugin.h), which defines the limits on the main data arrays in the program.

Sabre.f90 should not require change for any compiler on any computer, both for serial and parallel versions. macdep_parallel.f90 and macdep_in_stata.f90 contain code which is compiler and machine dependent and which may require change before compilation. Limitsf90_standalone.h (or limitsf90_plugin.h) may require change before compilation to either increase limits to accommodate a large problem or to reduce limits to allow the compiled program to fit into available memory. The main implementation dependent areas are described below.

The input and output channels

In subroutine BEGIN in files macdep_parallel.f90 and macdep_in_stata.f90, set the following constants to suitable values for your installation.
  • INCH is an integer which should be set to the channel number of the primary input (often the keyboard of a terminal)
  • OUTCH is an integer which should be set to the channel number of the primary output (often the screen of a terminal)
  • OOUTCH is an integer which should be set to the channel number used by the OUTPUT command
  • INPCH is an integer which should be set to the channel number used by the INPUT command
  • RINCH is an integer which should be set to the channel number used by the READ command when reading from a file

Machine accuracy and storage of reals and integers

  • From your Fortran computer manual, find out the largest double precision real number allowed by your compiler. Find the largest power of 10 which is less than this number - we refer to this number as Z1. For example, if the largest double precision real is around 1.7 x 10**308, then set Z1 to be 1.0 x 10**308. Then, calculate the following quantity: ZL1=loge(Z1)
  • Similarly, find the smallest double precision real number allowed by your compiler. Find the smallest power of 10 which is greater than this number; call this quantity Z2. Then calculate ZL2, defined by ZL2=loge(Z2)
  • Finally, find the largest integer number allowed by your compiler. Call this quantity IZ.
  • Set the double precision real values Z1,ZL1,Z2,ZL2 and the integer value IZ in subroutine BEGIN in file macdep.f.

Text handling

  • If your machine uses the ASCII collating sequence for characters, then no changes are necessary to logical function CALPHA and subroutine LOWER. If not, these routines will need to be rewritten.
  • Logical function CALPHA has one argument, a character. It should return .TRUE. if the letter is alphabetic (i.e. lies in the set [A-Z][a-z][$]) and .FALSE. otherwise.
  • Subroutine LOWER has two functions. It strips out $ characters from the input line, then converts all alphabetic characters to lower case. The $ characters are removed to increase SABRE's compatibility with the GLIM program.

Special subroutines

The two routines SCRSET and PROMPT are machine dependent, and may need to be rewritten for your machine and/or compiler.

Subroutine SCRSET

SCRSET is called at both the start and end of a run. The purpose of SCRSET is to initialise and clear the screen at the start of a SABRE session, and to clear the screen on a sparc machine, or close down any windows if running in a windowed environment, at the end of the session. Code is given for a VT100 terminal for a Sparc machine.

Subroutine PROMPT

This routine outputs a prompt to the primary output channel, leaving the cursor at the character to the right of the prompt text.

Setting user preferences


The size of the data storage area

The data area is used for the storage of data, including dummy variables, and is used by the model fitting routines for inverting matrices.

To change the default size of the data area set the value of the variable MXX in the header file limitsf90_standalone.h (or limitsf90_plugin.h) to the required value before compiling.

The size of the response storage area and the maximum number of observations

The response storage area (equal to four times the maximum number of observations) is used for the storage of the response variate and the number of observations per case, and is used in the model fitting for storage of response related quantities.

To change the default size of the response storage area give a new value for the maximum number of observations MAXY in the header file limitsf90_standalone.h (or limitsf90_plugin.h) before compiling.

The maximum number of variables

To change the default value for the maximum number of variables set the value of the variable MAXVAR in the header file limitsf90_standalone.h (or limitsf90_plugin.h) to the required value before compiling.

The size of the parameter storage area and the maximum number of parameters

The parameter storage area is used for the storage of the current parameter estimates, the variance-covariance matrix and the aliasing indicators and is used in the model fitting for calculating numerical derivatives.

To change the default size of the parameter storage area set the value of the variable MAXPAR in the header file limitsf90_standalone.h (or limitsf90_plugin.h) to the required value before compiling.

Note that all of these default limits can be changed at run time by using the appropriate command line options.

Go to: Sabre home page | Sabre manual | Downloading & Installing Sabre | Sabre examples | Training materials | Sabre mailing list | Contact us

Other links: Centre for e-Science | Centre for Applied Statistics