The kf77
command invokes a driver program that
automatically calls KAP, the DEC Fortran compiler, and the linker.
kf77
Because kf77
calls KAP and the DEC Fortran compiler,
you can substitute the kf77
command for the Fortran
command. For example, to use kf77
to compile
myprog.f
with the default KAP switch settings, use
the command:
kf77 myprog.f
The kf77
command uses the KAP preprocessor on
myprog.f
, compiles the result with the DEC Fortran
compiler, links the object code into an executable image, and
produces the following files:
myprog.cmp.f
- the optimized source file
myprog.out
- the annotated source file
showing default KAP switch settings
a.out
- the executable file
To see a list of the KAP switches and DEC Fortran
compiler switches passed by kf77
, use the
-verbose
switch as follows:
kf77 myprog.f -v
An example of the output from -verbose
is as
follows:
oursmp> kf77 -v matmul.f timing_fortran.o /usr/bin/kapf -cmp=./matmul.cmp.f matmul.f -tune=EV4 KAP/Digital_UA_F 3.2 k301117 971123 26-Nov-1997 10:01:07 KAP/Digital_UA_F 3.2 k301117 971123 : 0 errors in file matmul.f /usr/bin/f77 -fast -v ./matmul.cmp.f timing_fortran.o -tune host -non_shared /usr/lib/cmplrs/fort/decfort -fast -tune host -non_shared -switch fe_platinum -o /tmp/forAAAaaegBa.o ./matmul.cmp.f /usr/bin/cc -v -non_shared /usr/lib/cmplrs/fort/for_main.o /tmp/forAAAaaegBa.o -O4 timing_fortran.o -lUfor -lfor -lFutil -lm -lots -qlc_r /usr/lib/cmplrs/cc/ld -g0 -O4 -non_shared /usr/lib/cmplrs/cc/crt0.o /usr/lib/cmplrs/fort/for_main.o /tmp/forAAAaaegBa.o timing_fortran.o -lUfor -lfor -lFutil -lm -lots -qlc_r -lc /usr/lib/cmplrs/cc/ld: 0.46u 0.39s 0:05 15% 0+30k 197+198io 14pf+0w 30stk+4944mem
The final resource usage appears in C-shell format at the end.
kf77
The -fkapargs
switch specifies one or more
KAP command switches to the KAP preprocessor. For example,
to use kf77
to optimize and compile the file
myprog.f
using KAP switches for general
optimization, use the command:
kf77 -fkapargs='-optimize=5 -roundoff=3 -scalaropt=3 -list=myprog_annotated.lis' \ myprog.f
The following files result:
myprog.cmp.f
- the optimized source file
myprog_annotated.lis
- the annotated
source file renamed with the -list
switch
a.out
- the executable file
For descriptions of all KAP command switches, see Chapter 4.
kf77
Any command-line switch that is valid for the Fortran compiler
or the linker is valid for the kf77
command. You can
specify compiler switches and KAP switches on the same line. For
example, to optimize and compile the file myprog.f
using KAP switches for general optimization and to specify the
name of the executable file with the DEC Fortran compiler switch,
-o
, use the following command:
kf77 -fkapargs='-optimize=5 -roundoff=3 -scalaropt=3' -o=myprog.exe myprog.f
The following files result:
myprog.cmp.f
- the optimized source file
myprog.out
- the annotated source file
myprog.exe
- the executable file renamed
with the -o
switch
The kf77
command specifies the DEC Fortran
compiler switches -notransform_loops
, -
tune host
, and -fast
, by default. To
override any of the individual compiler switches encompassed
by -fast
, specify them on the kf77
command line. For example, the following command sets the
compiler switch -math_library accurate
and
overrides the default -math_library fast
set by
-fast
:
kf77 -math_library accurate myprog.f
For information about the -fast
compiler switch, see
the DEC Fortran User's Guide.
The kf77
command specifies the DIGITAL UNIX
default linker switch -non_shared
. The
-non_shared
switch causes the image to be linked
with archive libraries instead of with shared libraries.
To override the -non_shared
default, specify
-call_shared
on the command line, for example:
kf77 -call_shared myprog.f
Copyright © Digital Equipment Corporation. 1997. All Rights Reserved.