next up previous
Next: Routines Available Up: THE STRUCTURE OF THE Previous: CCSL As a FORTRAN

Subsections

The Master File

The complete set of CCSL routines and main programs is held in a Master File . When a new user who wishes to install CCSL on his computer, he should obtain a Master File and a set of perl scripts which can be used to generate a version of the Library and a set of main programs to run on his computer.

It would be possible to provide a FORTRAN Library which could be compiled directly. However, one of the features of the Master File format is that it contains symbolic parameters which allow the dimensions of arrays to be customised. For example, if the user discovers a need for, say, 100 atomic positions, when only 50 are allowed in the standard CCSL, he can remake his Library to cater for this.

It is useful to hold all the code (all routines and all programs) together, even though the resulting file is large. This ensures that when a library and a set of programs is generated, all copies of a particular labelled COMMON block are identical; getting them out of step is a frequent source of error. All the COMMON blocks are listed in alphabetical order of their names at the start of the Master File, many with symbolic dimensions for their arrays (see also Appendix C0.

The Master File also contains all the alternative code for areas which are system or device dependent. Such code has been classified into three types

  1. The strictness with which the F77 standard is imposed.
    the present options are:
    LAX
    Allow very common extensions of the standard, in particular $ FORMAT processing.
    PICKY
    Enforce the standard rigidly
  2. Operating system dependent code.
    UNIX
    Code and system functions understood only by UNIX operating systems eg SETENV, and case dependent file-names.
    VMS
    The same for VMS. eg The READONLY option must be given to open existing files.
  3. Site preferences, of historical origin. After its inception in the now defunct Crystallographic laboratory of the Cavendish Laboratory Cambridge, the library was developed in parallel at the Institut Laue Langevin (ILL) and at the Rutherford Laboratory (RAL) where different preferences developed.
    ILL
    The default extension for Crystal Data files is ".cry". Listing files are called by the name of the program with extension ".lis".
    RAL
    The default extension for Crystal Data files is ".ccl". The user is asked to name his Listing files.
The start of option dependent lines of code are flagged in the master file CS followed by one of the above option words . The line will be unflagged so that it is included in the FORTRAN compilation only if the option word is amongst the chosen options. A minus sign(-) preceeding the option word indicates that the line should be included only of the option is not chosen.

More details of the Master file and the scripts provided to manipulate it are given in Appendix E.

Sequence of Routines

The Master File contains a sequence of routines in alphabetical order of their names. This ordering is usually the most convenient for reference, but is unsuitable for a library on machines which have one-pass loaders. In order to make it possible to generate a sorted list of routines, which may be correctly linked by a one-pass loader. The necessary information is stored in the first (comment) line of each routine, which reads: ``C LEVEL" followed by an integer. Those routines which call nothing else from CCSL are LEVEL 1; those only calling level 1 are LEVEL 2, and so on. The sorted version of the Library should have the routines of the highest level first, then all the next level, and so on down to LEVEL 1.


next up previous
Next: Routines Available Up: THE STRUCTURE OF THE Previous: CCSL As a FORTRAN
P.J. Brown - Institut Laue Langevin, Grenoble, FRANCE. e-mail brown@ill.fr