Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

as(1)

ld(1)

cpp(1)

prof(1)

dbg(1)

FC(1)  —  Kubota Pacfic Computer Inc. (Fortran User Commands)

NAME

fc − Fortran compiler

SYNOPSIS

fc [ options ] [ files ] [ options ] [ files ]

DESCRIPTION

The fc command is an interface to the Titan 1500/3000 Compilation System.  The compilation tools consist of a preprocessor, compiler, assembler, and link editor.  The fc command processes the supplied options and then executes the various tools with the proper arguments.  The fc command accepts several types of files as arguments:

Files whose names end with .f are taken to be Fortran source programs and may be preprocessed, compiled, optimized, assembled, and link edited.  The compilation process may be stopped after the completion of any pass if the appropriate options are supplied.  If the compilation process runs through the assembler then an object program is produced and is left in the file whose name is that of the source with .o substituted for .f.  However, the .o file is normally deleted if a single Fortran program is compiled and then immediately link edited.  In the same way, files whose names end in .s are taken to be assembly source programs, and may be assembled and link edited; and files whose names end in .i are taken to be preprocessed Fortran source programs and may be compiled, optimized, assembled and link edited.  Files whose names do not end in .f, .s or .i are handed to the link editor. 

Since the fc command usually creates files in the current directory during the compilation process, it is necessary to run the fc command in a directory in which a file can be created. 

The following options are interpreted by fc:

−all_doubles
Set all undeclared floating point variables, all declared floating point variables, and floating point constants to be as if they were declared REAL∗8.  If they were COMPLEX∗8, they are to COMPLEX∗16.  Integers are allocated 8 bytes of storage instead of 4 bytes. 

−ast=number
Allow the compiler to set the initial allocation for the program internal representation to the user defined number bytes.  Normally, users should not invoke this flag unless the program is terminated with the internal error. 

−blanks72
Pad with blanks on right to column 72.

−c Suppress the link editing phase of the compilation, and do not remove any produced object files. 

−case_sensitive
Insist that user defined variables must be case sensitive.  The default is -nocase_sensitive. 

−catalog=name.in
Create a database of functions available to be inlined.  This option creates two files: the database name.in and an associated file name.id.  Each use of catalog adds to the catalog; it does not replace previous versions. 

−continuations=n
Set the number n of continuation lines the compiler accepts for any statement.  The default is 19. 

−cpp
Invoke the C preprocessor on the source file before compiling.

−cross_reference
Generate a cross-reference, if a listing is generated.

−Dname
Define name to have the value of 1, to the preprocessor. 

−Dname=val
Define name to have the value of val, to the preprocessor. 

−debug
Add debug data to the object file. Force optimization level to zero. This is synonymous with -g. 

−double_precision
Set all undeclared floating point variables and all declared floating point variables to be as if they were declared REAL∗8.  If they were COMPLEX∗8, they are then set to COMPLEX∗16.  -nodouble_precision is the default. 

−d_lines
Compile source file lines with a ’D’ or ’d’ in column 1.

−E Run only cpp(1) on the named C programs, and send the result to the standard output.

−extend_source
Extend the statement field of a source line from columns 1 through 72 to columns 1 through 132.

−fast
Perform some optimization which may lose small amounts of precision.

−full_report
Produce a detailed vectorizer report.

−fullsubcheck
Generate code to check that every subscript in every array reference is within the bounds of the appropriate array dimensions.

−g Generate additional information needed for the use of dbg(1).  Force optimization level to zero.  This option is synonymous with -debug. 

−I Suppress the default searching for preprocessor included files in /usr/include. 

−Idir Search for preprocessor include files in dir. Neither -I option affects the Fortran INCLUDE statement. 

−i Suppress the automatic production of #ident information. 

−implicit
Make all variables in a program untyped.

−include_listing
List included source files as well as the original source file when generating a listing.

−inline
Instruct the compiler to enable function inlining.

−i4 Interpret INTEGER and LOGICAL declarations as if they had been written INTEGER∗4 and LOGICAL∗4. 

−list Generate a listing from the compilation. 

−messages
Allow warning messages to be printed.

−Npaths=name.in
Instruct the compiler to make use of the database of functions listed in the catalog name.in as the source for inlining. 

−no_assoc
Assume floating point is not associative.  Force the floating point operation to be in the same order as the program specifies (e.g. no vectorized sum or dot product reductions).

−no_directive
Do not apply compiler directives.

−novector
Not generate no vector code for any loop.  This option is especially useful at optimization level 03 when you desire parallel code but no vector code.

−O0 Turn off all optimizations. 

−O1 Perform common subexpression elimination and instruction scheduling.  If nothing is specified, this -O1 is the default setting of compiler optimization level. 

−O2 Perform -O1 and vectorization. 

−O3 Perform -O2 and parallelization. 

−O This is synonymous with -O1. 

−o filename
Place the output into filename. 

−object
Generate object files.

−onetrip
Generate code to guarantee that all DO loops execute at least once.  This is a compatibility feature for programs originally written for use with Fortran 66.  The default is -noonetrip. 

−P Run only cpp(1) on the named Fortran programs and leave the result in corresponding files suffixed .i.  This option is passed to cpp(1).

−p Generate code to profile the loaded program during execution.  (See prof(1) and mkprof(1).) 

−ploop
Generate code which allows loops within a single routine to be profiled separately.

−r Produce a relocatable output file. 

−S Compile and do not assemble the named Fortran programs, and leave the assembler output in corresponding files suffixed .s. 

−safe_strings
Generate code that corrects for mismatched string parameters.  If the type of parameters being passed are truly matched, avoid this option because it causes some performance degradation.

−safe=procs
Cause the compiler to compile a procedure for parallel execution.

−save
All variables declared are saved.

−standard
Check for standard Fortran 77 usage.

−subcheck
Produce code to check at runtime to ensure that each array element accessed is actually part of the appropriate array. However, at optimization level 02 and higher, this option ignores the vector mask.  This means that some operations may generate subscriptranges that are not actually in the code.

−Uname
Undefine name. 

−V Prints a single line of version information with the release number of the compilation system. Version numbers corresponding to the release number of each executing component are also printed.  Version numbers vary independently of each other and of the release number. 

−verbose
Use verbose message output.

−vreport
Invoke the vector reporting facility and tell the user what vectorization has been done. A detailed listing is provided for each loop nest and suggestions for achieving better performance are included.

−vsummary
Invoke the vector reporting facility and tell the user what vectorization has been done. Print out what statements are and are not vectorized in each loop. This output is in Fortran-like notation.

−w Suppress warning messages during compilation. 

−yname
Print uses and definitions of name. 

−43 Cause the compiler to use /usr/lib/bsd/libc.a instead of /usr/lib/libc.a.  In another word, this option cause the compiler to use BSD library files instead of System V library files. 

The fc command recognizes −B hhhhhhh, −D hhhhhhh, −esym, −L, −Ldir, −ltag, −m, −n, −ofilename, −opct, −p, −r, −s, −T hhhhhhh, −t, −uname, −V, and −yname and passes these options and their arguments directly to the loader.  See the manual pages for cpp(1) and ld(1) for descriptions.

Other arguments are taken to be Fortran compatible object programs, typically produced by an earlier fc run, or perhaps libraries of Fortran compatible routines and are passed directly to the link editor.  These programs, together with the results of any compilations specified, are link edited (in the order given) to produce an executable program with name a.out. 

FILES

file.f Fortran source file

file.i preprocessed Fortran source file

file.o object file

file.s assembly language file

a.out link edited output

LIBDIR/fcrt0.o start-up routine

LIBDIR/file.i inlined functions file

LIBDIR/file.V vector reporting facility file

LIBDIR/file.L listing file

TMPDIR/∗ temporary files

LIBDIR/cpp preprocessor, cpp(1)

LIBDIR/comp compiler

BINDIR/as assembler, as(1)

BINDIR/ld link editor, ld(1)

LIBDIR/libc.a} standard C library

LIBDIR is usually /lib

BINDIR is usually /bin

TMPDIR is usually /tmp but can be redefined by setting the environment variable TMPDIR [see tempnam() in tmpnam(3S)], and exporting it to the environment in which the programs run. 

ENVIRONMENT VARIABLES

Setting a couple of shell environment variables to either VMS or BSD allows you to decide how files should be read and written.  These variables are: UNFORMATTED_IO
UNFORMATTED_INPUT
UNFORMATTED_OUTPUT The setting of UNFORMATTED_IO takes precedence over the other two variables.  If it is set, any setting of UNFORMATTED_INPUT or UNFORMATTED_OUTPUT is ignored.  The available settings are described below:

UNFORMATTED_INPUT BSD
On input, the record length is measured in bytes; there is no padding.

UNFORMATTED_INPUT VMS
Default.
On input, the length is in words; padding rounds up to even 4-byte boundaries.

UNFORMATTED_OUTPUT BSD
On output, the record length is written in bytes; there is no padding.

UNFORMATTED_OUTPUT VMS
Default.
On output, the record length is written in words (length rounded up to nearest 4-byte boundary) and padding is up to the nearest 4-byte boundary.

UNFORMATTED_IO BSD
On input and output, the record length is both read and written in bytes; there is no padding.

UNFORMATTED_IO VMS
Default.
On input and output, the record length is read and written in words (rounded up to the nearest 4-byte boundary); padding is up to the nearest 4-byte boundary.

SEE ALSO

as(1), ld(1), cpp(1), prof(1), dbg(1)
Programmer’s Guide
Fortran Reference Manual

March 13, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026