----------------------------------------------------------------------------- DPF FORGE Magic/DM Automatic Fortran Parallelizer DPF ----------------------------------------------------------------------------- NAME dpf - FORGE Magic/DM Automatic Parallelization Pre-Compiler for Distributed Memory Multi-Processing Systems SYNOPSIS dpf {-p package_name} \ {PACKAGE OPTIONS} {list_of_files} \ {PARALLELIZATION OPTIONS} \ {OUTPUT OPTION} {MISC OPTIONS} DESCRIPTION dpf is a parallelizing pre-compiler for Fortran on distributed memory systems. It analyzes a complete Fortran 77 program and produces a SPMD (Single Program - Multiple Data) parallelized code containing calls to a library interface to perform runtime data array partitioning and loop distribution. The runtime library interfaces various data communication systems such as PVM, Linda, and Express. dpf can be used to automatically develop a parallelization strategy of array partitioning and loop distribution, or it can be guided by explicit user 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. Both serial and parallel performance timing analysis can be obtained with dpf. In each case, dpf 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 -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 dpf.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 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 dpf system files -Verbose=n Debugging messages are output; default is '-Verbose=0' -help This option will list all possible options PACKAGES FORGE Magic/DM's facilities rely upon a representation of an entire application program as a single entity. Thus, the dpf 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: dpf -p fapp -a fapp.f fsub.f ffunc.f ^ ^ | |_________________ List of source files being added | |__________________________ Name the package is fapp Whenever dpf 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 dpf list all of the currently defined packages in the current directory use: dpf -l Once a package has been created, dpf can be invoked to add files to the package using: dpf -p pack -a file names to be added Also, source files can be deleted from the package definition using: dpf -p pack -r file names to be deleted To have dpf list the package definition for a particular package use: dpf -p pack -l To remove a package definition use: dpf -p pack -r PARALLELIZATION OPERATIONS The real power of dpf comes from its instrumentation and parallelization capabilities. Time Serial Fortran (tsf) dpf -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 dpf. Tell dpf 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: dpf fmain.f fsub.f ffunc.f {PACKAGE PARAMETERS} -otsf Generating Parallel Fortran dpf -p package_name \ [-Auto=option] \ [-plist[=pcx -plistfile[= package.lst]] \ [-ompf[= package_mpf.f] or -otpf[= package_tpf.f] or -odpf[= package_dpf.f] After obeying any automatic parallelization requests, dpf will generate either: -ompf[= pack_mpf.f] parallel Fortran with message passing -otpf[= pack_tpf.f] timed version of above -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 dpf 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 APR parallelization and directives, the specified parallelization will be performed if possible. dpf 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 APR directives in the input package and/or interactively using other APR products, which specify exactly which arrays to distribute and which loops to parallelize. dpf attempts to perform the desired action. -Auto=Loops User specified parallelization (directives or interactively) indicates which arrays to distribute. dpf attempts to parallelize loops which reference these arrays on their partitioned dimensions. dpf makes no attempt to distribute any additional arrays. -Auto=0 User inserts APR loop parallelization and/or data distribution directives. dpf attempts to parallelize any marked loops and automatically distributes arrays referenced thru the loop which are not already distributed. Once this is completed, if any arrays are partitioned, dpf performs -Auto=Loops above. (Loops are marked using the CAPR DO PAR directive.) -Auto[=1] ! this is the default Strategy Option Same as above, except that dpf 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, dpf 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: dpf [-Auto=option] \ [-plist] [-ompf or -otpf or -odpf] dpf source_file_list is the same as dpf source_file_list -Auto=1 -ompf SEE ALSO FORGE Magic/DM User's Guide for complete information on dpf. ------------------------------------------------------------------------ Applied Parallel Research, Inc. 550 Main St., Suite I, Placerville CA 95667 916/621-1600 11/93 ------------------------------------------------------------------------