1 An overview of HP Fortran

When you use the f90 command to compile a Fortran program, the command invokes a number of components—and not just the compiler—to create the executable. By default, f90 invokes different components to parse the source files for syntax errors, produce an intermediate code, optimize the intermediate code, produce object code, search a set of library files for any additional object code that may be required, and link all of the object code into an executable file that you run without further processing.

For example, consider a program that consists of three source files: x.f90, y.f90, and z.f90. The following command line will process the source files and, if they are syntactically correct, produce an executable file with the default name a.out:

$ f90 x.f90 y.f90 z.f90

After compilation is complete, you can execute the program by invoking the name of the executable, as follows:

$ a.out

However, it is likely that you’ll want to control what components act on your program and what they do to it. For example, you may want to give the executable a name other than a.out or to link in other libraries than the default ones. The HP Fortran compiler supports a variety of command-line options that enable you to control the compilation process. This chapter provides an overview of the process and of the options that enable you to control the different components invoked by the f90 command.

NOTE: To get a summary listing of all f90 options, refer to the f90(1) manpage or use the command, as shown here:

$ f90 +usage

For a full description of the options, see the most current version of the Parallel Programming Guide for HP-UX Systems.

The HP Fortran compiler environment

The HP Fortran compiler environment illustrates the compilation process, showing the different components of the HP Fortran compiler environment; active processes are unshaded and data elements are shaded. With the exception of the performance analysis tools and the debugger (WDB), all components are invoked by the f90 command. The C preprocessor and linker can also be separately invoked by the cpp and ld commands; see the cpp(1)and ld(1) manpages, respectively, for more information. The remaining sections in this chapter briefly describe the different components and the command-line options that control them. Included in each section are references to other parts of this manual for more detailed information.

8An overview of HP Fortran