[ Basic Info | User Guide ]

Basic Information on ratty


Task: ratty
Purpose: FORTRAN preprocessor, so that same code works on more machines
Categories: tools

Ratty is a FORTRAN preprocessor for MIRIAD source code, intended to
make the same FORTRAN code compatible on VMS, SUN, Cray, Alliant,
and Convex. The output is suitable for use with the specified compilers
for these machines.

Usage:

 ratty [-h] [-s system] [-I incdir] [-D symbol] [-bglu [-n start inc]
       [-p data-type] [in] [out]

    system:  compiler/system type, one of
               "alliant"   (alliant unix compiler)
               "alpha"     (DEC alpha compiler)
               "convex"    (CONVEX unix compiler)
               "f2c"       (NETLIBs f2c compiler)
               "f77"       (generic unix compiler)
               "g77"       (GNU g77 compiler)
               "gfortran"  (GNU gfortran chmpiler)
               "hpux"      (HPUX compiler)
               "linux"     (generic Linux compiler)
               "sgi"       (SGI compiler)
               "sun"       (sun unix compiler)
               "unicos"    (Cray Fortran compiler)
               "vms"       (VMS Fortran compiler)

    incdir:  Directory to search for include files.  The -I option may
             be used repeatedly, but must list only one directory for
             each -I parameter (eg, list two directories as
             "-I dir1 -I dir2").

    symbol:  Define this symbol to the preprocessor. Multiple
             definitions are allowed, defining one symbol per -D entry
             (eg, define two symbols as "-D sym1 -D sym2").

    -b:      If specified, backslashes inside quoted textstrings are
             doubled. This allows for compilers which treat the
             backslash as an escape character.

    -g:      If specified, it will direct the code to include line number
             directives for your native compiler, if it understands them.
             This will enable you to run dbx, and look directly at your
             [in] file, instead of your [out] file. Note that standard
             input cannot be used with this option.

    -h:      give some help and exit

    -n:      This gives the start and increment for line numbers generated
             by ratty. The default is 90000 1.

    -l:      Convert all variables, etc, to lower case.

    -u:      Convert all variables, etc, to upper case.
             (some of the system-generated if/then/else/endif/continue
              are not converted to upper case)

    -p:      Give the FORTRAN type to be used for "ptrdiff" data type.

    in:      Input file name. If omitted, standard input is assumed
             and output must be the standard output.

    out:     Output file name. If omitted, standard output is assumed.


Ratty recognizes the standard C preprocessor directives #ifdef,
#ifndef, #else and #endif.

The VAX do/dowhile/enddo extension for do loops is converted to
ANSI-FORTRAN if the host machine does not support this extension.

'IMPLICIT NONE' and 'IMPLICIT UNDEFINED(A-Z)' are converted to
whatever the specified compiler supports.

Certain directives are recognized if the target machine has
vector processing capacities (compilers "unicos", "alliant" and "convex"):

    #maxloop, followed by a number, is converted to "cdir$ shortloop"
    on "unicos" and to "cvd$  shortloop" on "alliant".

    #ivdep is converted to "cdir$ ivdep" on "unicos", to "cvd$  nodepchk"
    on "alliant", and to "c$dir no_recurrence" on "convex".

    #nooptimize is converted to "cdir$ nextscalar" on "unicos" and to
    "cvd$ noconcur" followed by "cvd$ novector" on "alliant".


Generated by miriad@atnf.csiro.au on 21 Jun 2016