--------------------------------------------------------------------------------- xHPF FORGE High Performance Fortran Parallelizer xHPF --------------------------------------------------------------------------------- NAME xhpf - FORGE High Performance Fortran (HPF) Parallelization Pre-Compiler for Distributed Memory Multi-Processing Systems SYNOPSIS xhpf {-p package_name} \ {PACKAGE OPTIONS} {list_of_files} \ {PARALLELIZATION OPTIONS} \ {OUTPUT OPTION} {MISC OPTIONS} DESCRIPTION xhpf is a parallelizing pre-compiler for High Performance Fortran (HPF) on distributed memory systems. It analyzes a complete HPF program and produces an immediately compilable SPMD (Single Program Multiple Data) parallelized Fortran 77 code containing calls to APRŐs library interface. The runtime library interfaces various data communication systems such as PVM, Linda, and Express to perform runtime data array partitioning and loop distribution. xhpf can be used to automatically develop an HPF parallelization starting with vanilla Fortran 77, or it can be guided by explicit HPF directives. An output parallelization report shows the loop distribution and data array partitioning that were successful, as well as diagnosing syndromes in the program that inhibited parallelization. xhpf performs a complete HPF program consistency check, and is capable of parallelizing array assignment statements, FORALLs, and DO loops. Both serial and parallel performance timing analysis can be obtained with xhpf. In each case, xhpf creates an instrumented program that, when executed on the target system, produces a timing report down to the DO loop level. The instrumented parallel program also indicates timings for data communication and synchronization, and clearly points to the performance bottlenecks and load balancing problems. PACKAGE OPTIONS -H hardware_descriptor_file -T timing_file -I include_path PARALLELIZATION OPTIONS -Auto (default is 1) =None Implement existing parallelization directives =Loops Above+Parallelize related loops =0 Above+Partition related arrays and parallelize related loops =1 Parallelize 1 loop+Above =n Parallelize N unrelated loops and decompose related arrays -f77 Input is pure Fortran 77 only (saves f90->f77 step) -pList Generate a parallelization report to file package_name.lst =option Listing options, combination of p,c,x (parallelization, code, extended). E.g. -plist=pcx -pListFile= list_file Specifies output filename for above.(If there is no package, default is xhpf.lst) -Partition={allocation}{partitioning} Sets default partitioning scheme. allocation is one of: FULL Keep array size the same as original arrays SHRUNK Allocate array size at runtime according to partitioning partitioning is one of: BLOCK Default array partitioning to block CYCLIC Default array partitioning to cyclic E.g. -Partition=SHRUNKBLOCK -EntryPoint NAME When ambiguous, names main program -BenignUnknown Assume that unknown routines have no side effects OUTPUT OPTION One of the following: (the default is -ompf) (Shown with default file name, where pack stands for the package name.) -otsf{= pack_tsf.f} Output a Timed Serial Fortran program -ompf{= pack_mpf.f] Output a Message Passing Fortran parallelized program -otpf{= pack_tpf.f} Output a Timed parallelized program -odpf{= pack_dpf.f} Output original f77 + APR parallelization directives -ohpf{= pack_hpf.f} Output original f77 + HPF parallelization directives MISCELLANEOUS OPTIONS -g Prepare for debugging mpf program -u Do not optimize communications calls -c support Communications provided by one of: P4 | Linda | Express | PVM | PVM3 -f directory_path Specifies location of xhpf system files -Verbose=n Debugging messages are output; default is '-Verbose=0' -help This option will list all possible options PACKAGES FORGE xhpf's facilities rely upon a representation of an entire application program as a single entity. Thus, the xhpf command line provides mechanisms for identifying all of the relevant information about the application as a package prior to producing a parallelized program. A package definition is identified with a 14 character alphanumeric name and contains the following information: * A list of source files which comprise the application. * An optional list of directories to be searched for INCLUDE files. * An optional hardware specification. A default is selected for your site. * An optional serial timing file constructed from a sample test run. To create a package named fapp containing the source files fapp.f, fsub.f, and ffunc.f we would use the command: xhpf -p fapp -a fapp.f fsub.f ffunc.f ^ ^ | |_________________ List of source files being added | |__________________________ Name the package is fapp Whenever xhpf creates a package or looks for an existing package, it looks in the current directory for a subdirectory called APR. Within this subdirectory may be one or more packages. To have xhpf list all of the currently defined packages in the current directory use: xhpf -l Once a package has been created, xhpf can be invoked to add files to the package using: xhpf -p pack -a file names to be added Also, source files can be deleted from the package definition using: xhpf -p pack -r file names to be deleted To have xhpf list the package definition for a particular package use: xhpf -p pack -l To remove a package definition use: xhpf -p pack -r PARALLELIZATION OPERATIONS The real power of xhpf comes from its instrumentation and parallelization capabilities. Time Serial Fortran (tsf) xhpf -p pack -otsf[= pack_tsf.f] This example, will create an instrumented version of your application which will gather timing information and output a timing file from a sample test run. This timing file can be reviewed by the user and can also be used by xhpf. Tell xhpf where this file is by using the -T timingfile package definition option. Also, if you wish to skip the package building phase you can simply use, for example: xhpf fmain.f fsub.f ffunc.f {PACKAGE PARAMETERS} -otsf Generating Parallel Fortran xhpf -p package_name \ [-Auto=option] \ [-plist[=pcx -plistfile[= package.lst]] \ [-ompf[= package_mpf.f] or -otpf[= package_tpf.f] or -ohpf[= package_hpf.f] or -odpf[= package_dpf.f] After obeying any automatic parallelization requests, xhpf will generate either: -ompf[= pack_mpf.f] parallel Fortran with message passing -otpf[= pack_tpf.f] timed version of above -ohpf[= pack_hpf.f] Fortran + HPF directives -odpf[= pack_dpf.f] Fortran + APR directives When the plist option is specified, a parallelization report will be generated on the specified output file name. This file will contain a transcript of any decisions which xhpf made, as well as a listing of the call chain with the embedded partitioning and loop parallelization summary. It will also contain a listing of the source code along with notations about what communications may occur at runtime. If the package already exists and/or contains HPF parallelization and directives, the specified parallelization will be performed if possible. xhpf can also be commanded to make additional parallelization decisions on it own. The auto parallelization strategy option controls this behavior. Auto Parallelization Options are one of the following: -Auto=None User has specified parallelization using HPF directives in the input package and/or interactively using APR's FORGE 90 DMP, which specify exactly which arrays to distribute and which loops to parallelize. xhpf attempts to perform the desired action. -Auto=Loops User specified parallelization (directives or interactively) indicates which arrays to distribute. xhpf attempts to parallelize loops which reference these arrays on their partitioned dimensions. xhpf makes no attempt to distribute any additional arrays. -Auto=0 User inserts HPF data distribution directives. xhpf attempts to parallelize any loops marked by APR DO PAR directives, and automatically distributes arrays referenced thru the loop which are not already distributed. Once this is completed, if any arrays are partitioned, xhpf performs -Auto=Loops above. -Auto[=1] ! this is the default Strategy Option Same as above, except that xhpf next identifies the single highest time consuming loop which can be parallelized. It does this either by using timing information available in the package or by looking for the deepest loop nests. It then partitions any arrays referenced thru those loops. If any new array partitioning result, it attempts to parallelize any loops which reference these newly partitioned arrays. -Auto=n (literal integer constant) Same as above except that instead of finding a single highest time consuming loop, xhpf continues to find up to the number of specified parallelizable loops, all the while partitioning any arrays which are referenced thru the loops which have not already been partitioned. If you wish to skip the package building phase you can simply use: xhpf [-Auto=option] \ [-plist] [-ompf or -otpf or -ohpf or -odpf] xhpf source_file_list is the same as xhpf source_file_list -Auto=1 -ompf HPF DIRECTIVES AND FEATURES xhpf accepts the HPF Subset of Fortran 90 features and the DISTRIBUTE (on 1 dimension), ALIGN, VIEW, INHERIT, TEMPLATE, and INDEPENDENT directives. The REDISTRIBUTE directive is implemented using the APR PARTITION directive. Extrinsic procedures are also implemented. The HPF Subset also includes the WHERE statement and block, array sections and constructors, array assignment, automatic arrays, FORALL, ALLOCATABLE, and ALLOCATE/DEALLOCATE, and assumed shape arrays. SEE ALSO FORGE xHPF User's Guide for complete information. ------------------------------------------------------------------------------------- Applied Parallel Research, Inc. 550 Main St., Suite I, Placerville, CA 95667 916/621-1600 11/93 -------------------------------------------------------------------------------------