

This chapter describes the syntax and operation of each option to the pghpf command. Platform-specific node compiler options are not listed - refer to the node compiler manual page on your system for a list of these options. The options are arranged in alphabetical order. On a command line, options need to be preceded by a hyphen (-). This chapter uses the following notation:
Many of the compiler options and arguments have default settings. Some option defaults are affected by environment variables and can be set using the .pghpfrc driver configuration file. Refer to Appendix C, Driver Customization, for details on setting and altering defaults with the driver initialization file.
On systems where an underlying node compiler is coupled to PGHPF, most Fortran node compiler options are also valid as options to the pghpf command. Refer to the documentation for the Fortran node compiler supplied with your system for a list of valid Fortran node compiler command-line options. The PGHPF compiler uses the options -O1 and -O2 for optimization. If you select these options, varying levels of optimization will be applied to your HPF program. If the compiler does not recognize an option, it passes the option to the linker.
In general, the pghpf command accepts de facto standard UNIX compiler command-line options and responds with the expected behavior (that is, for options such as -c, -S, -o, etc). Some command-line options, such as -O1 and -O2, have meaning to both pghpf and the underlying Fortran node compiler, if applicable. In such cases, pghpf interprets the option and also passes it on to the underlying Fortran node compiler. On systems with slightly different spellings (for example, level 2 optimization is specified using -Oscalar2 when invoking the CRAY T3E Fortran node compiler directly), PGHPF passes the appropriate system-specific option along to the Fortran node compiler in the presence of -O<n> options.
Table 2-1 provides a list of pghpf command-line options that are valid on most systems. As noted in the table, some systems do not support all of these options. In addition, most Fortran node compiler options (options to the underlying F77 or F90 compiler) are accepted and passed through to the node compiler as part of the HPF compilation process.
Option |
Description |
|---|---|
-c |
Stops after assembling (results placed in filename.o). |
-Dname[=val ] |
Defines a preprocessor macro name with value val. |
-dryrun |
Show but do not execute all commands. |
-E |
Displays pre-processed HPF file to the standard output. |
-eA |
Valid on the CRAY T3E only. Compile for profiling with Apprentice. Programs compiled with -eA must be linked with the -lapp switch. |
-F |
Saves a pre-processed HPF file in filename.f. |
-fast |
Choose a set of generally optimal optimization switches for both PGHPF and the underlying Fortran node compiler, if applicable. Use the -dryrun option to see which options are passed to the node compiler on your system. |
-g |
Valid
only on SGI, Sun, IBM, and CRAY T3E systems. Compile for debugging with the
TotalView multiprocess debugger. Must be used in combination with
-Mtotalview -Mkeepftn on SGI, Sun, and IBM systems.
-Mtotalview -Mkeepftn are not required on CRAY T3E
systems. To invoke the TotalView debugger on PGHPF-compiled CRAY
T3E programs, use the command "totalview -pghpf a.out" at a CRAY T3E command
prompt (substitute the name of your executable for a.out if appropriate). To
invoke the TotalView debugger on other platforms, see the option
|
-help |
Display the complete list of valid options. |
-Idirectory |
Adds a directory directory to the search path for #include files. |
-Ldirectory |
Adds a directory directory to the search path for library files. |
-llibrary |
Loads the library library, in addition to the standard libraries. |
-O[level] |
Specifies code optimization at the specified level. |
-o filename |
Names the object file filename. |
-r8 |
Interpret REAL variables as DOUBLE PRECISION. |
-time |
Print execution times for the various compiler phases. |
-Uname |
Undefine a preprocessor macro name. |
-V |
Displays the compiler phase version messages. |
-v |
Displays the compiler, assembler and linker phase invocations. |
-W0,arg |
Passes argument arg to the node compiler. |
-W9,arg |
Passes argument arg to the pre-link phase of the compiler. |
-Wa,arg |
Passes argument arg to the assembler. |
-Wl,arg |
Passes argument arg to the linker. |
-Wh,arg |
Passes argument arg to the HPF compiler. |
-w |
Do not print warning messages. |
Table 2-2 lists and briefly describes the HPF-specific options to the pghpf command. Full descriptions follow the table.
Option
|
Description
|
|---|---|
-M[no]autopar |
Where possible, auto-parallelize Fortran DO loops which operate on explicitly distributed data, i.e. data which is subject to HPF data distribution directives. -Mautopar is the default. |
-M[no]backslash |
Determines how the backslash character is treated in quoted strings. |
-Mbyteswapio |
Swap bytes from big-endian to little-endian or vica versa on input and output of unformatted Fortran data. |
-Mcmf |
Provides limited support for CM Fortran compatibility. |
-Mcraft |
(CRAY T3E only) Compile in HPF_CRAFT mode. |
-M[no]dclchk |
Determines whether all program variables must be declared. |
-M[no]depchk |
Compiler checks for potential data dependencies. |
-M[no]dlines |
The compiler treats lines containing "D" in column 1 as executable statements. With -Mnodlines the compiler does not treat lines containing "D" in column 1 as executable statements (does not ignore the "D".) |
-Mextend |
The compiler accepts 132-column source code; without this option lines must be less than or equal to 72 columns wide. |
-Mextract |
Perform a manual extract phase for procedures within INDEPENDENT loops that are to be inlined. See the -Minline option. |
-Mf90 |
Perform compilation for a single processor run using Fortran 90 semantics. This switch causes PGHPF to compile in F90 mode. All first class HPF extensions are still accepted, but the resulting object or executable file will function as if compiled by an F90 compiler. |
-Mfixed |
Assume Fortran 90 fixed form input source. |
-Mfree[form] |
Process source using Fortran 90 freeform input specifications. |
-Mftn |
Stop after HPF compilation and keep the intermediate output file. |
-Mg |
Enables the -Mkeepftn option and compiles the intermediate Fortran file with -g, and also sets the PGHPF compiler flag that makes debugging the generated Fortran output easier by suppressing HPF line numbers in the generated Fortran intermediate file. This option can be used to debug at the intermediate Fortran level using a standard serial debugger, such as gdb. |
-Mhpf2 |
Instructs the compiler to generate code assuming HPF 2.0 semantics. The default is to generate code assuming HPF 1.1 semantics. |
-Minfo |
Instructs the compiler to produce a compile-time listing of optimization and other compilation information to stderr. |
-Minform |
Specifies the minimum level of error severity that the compiler displays. |
-Minline |
Perform procedure inlining within INDEPENDENT loops. |
-Mipa |
Perform Inter-procedural Analysis. |
-Mkeepftn |
Retain the PGHPF-generated Fortran intermediate files. |
-Mkeepstatic |
Keeps the intermediate static initialization file that is normally removed by the compiler. This option is used primarily for debugging purposes. |
-M[no]list |
Specifies whether the compiler creates a listing file. |
-Mlocal |
Compile all program units as default HPF_LOCAL. |
-Mmpi |
Link a version of the HPF runtime libraries and startup routines that use MPI to perform interprocess communications (valid only on SGI IRIX, Solaris/SPARC, IBM RS6000/SP, HP, Linux and Solaris86 platforms). Note: This option must be used at both compile time and link time. |
-Mnofree[form] |
Use fixed-form formatting for file processing. |
-Mnogenblock |
Disable GEN_BLOCK distributions, and treat all GEN_BLOCK distributions using standard BLOCK distribution semantics. |
-Mnohpfc |
Skip the HPF compilation step and compile using the Fortran node compiler if a file with a .f or .F extension is supplied. |
-Mnoindependent |
Ignore all INDEPENDENT directives to DO loops. |
-Mnoprelink |
Skip the static initialization phase of the compilation. |
-Moverlap=size:n |
Set the size of the overlap area for BLOCK-distributed arrays to n rows or columns. |
-Mpreprocess |
Run the cpp-like preprocessor on the input source file regardless of the filename extension. |
-Mprof |
Enable performance profiling with PGPROF; instrument the generated executable program with calls to profile routines and link against the profiler libraries. |
-Mr8 |
Promote REAL variables and constants to DOUBLE PRECISION and COMPLEX to DOUBLE COMPLEX. |
-Mrecursive |
Instructs the compiler to produce code that will allow for recursion of the routines within the file. Note: not all routines can be made recursive. |
-Mrpm |
Link a version of the HPF runtime libraries and startup routines that uses the PGI RPM environment to perform interprocess communication (valid only on SGI IRIX, Solaris/SPARC, HP, Linux, Solaris86, and NT platforms). Note: This option must be used at both compile time and link time. |
-Mrpm1 |
Link a version of the HPF runtime libraries and startup routines that uses the PGI RPM single-process environment for debugging (valid only on SGI IRIX, Solaris/SPARC, HP, Linux, Solaris86, and NT platforms). |
-M[no]sequence |
All variables are created as SEQUENCE variables, where sequential storage is assumed. With -Mnosequence, all variables are created as non-sequential variables unless an explicit SEQUENCE directive is supplied or the variable is an assumed size array. |
-Mserial |
Compile all program units as default HPF_SERIAL. |
-Msmp |
Perform compilation for a shared-memory or logically shared-memory system, and perform interprocess communications using simple shared-memory references rather than calls to message-passing functions (valid only on CRAY T3E, SGI IRIX, Solaris/SPARC, HP, Linux, Solaris86 and NT platforms). This option must be used at both compile time and link time. |
-Mstats |
Link a version of the runtime libraries that gather runtime argument copying and communication statistics. Must be used in combination with the -pghpf -stat runtime option. |
-Mstandard |
Causes the compiler to flag source code that does not conform to the ANSI Fortran 90 standard. |
-Mtotalview |
Compile for debugging with Etnus Totalview on SGI, Sun, and IBM platforms. Must be used in combination with -g -Mkeepftn. |
-Mtv |
Equivalent to -Mtotalview. Must be used in combination with -g -Mkeepftn. |
-Mupcase |
Allow uppercase letters in identifiers. |
Options of the form -M<pghpf_flag> are used to specify PGHPF-specific compilation options. Detailed descriptions of these options are given below.

