COMPAQ Software Product Description ___________________________________________________________________ PRODUCT NAME: Compaq KAP[TM] C/OpenMP Version 4.2 SPD 45.73.11 for Tru64 UNIX[R] DESCRIPTION The Compaq KAP C/OpenMP optimizer is a C-language source-to-source pre- processor that restructures code for improved performance on serial and parallel processors. The Compaq KAP C/OpenMP optimizer performs an interprocedural dependence analysis (IPA), allowing it to use ad- vanced optimizations safely. When installed, the Compaq KAP C/OpenMP optimizer integrates with the Compaq C compiler for seamless opera- tion. The Compaq KAP[TM] for C/OpenMP for Tru64 UNIX product is developed by KAI Software, a Division of Intel Americas, Inc. (KAI), and is dis- tributed under Compaq Computer Corporation's Standard Terms and Con- ditions. This product is the successor to DIGITAL KAP for C for DIG- ITAL UNIX. Major Optimization Capabilities o Automatic parallel decomposition for SMP o Loop optimizations o Memory management optimizations o Scalar optimizations o Function inlining o Informational program listings Parallel Decomposition Support June 2001 The Compaq KAP C/OpenMP product provides true shared memory multipro- cessing capabilities for Compaq AlphaServer Symmetric Multiprocess- ing (SMP) systems, providing the ability to do automatic and guided automatic decomposition of C codes. The Compaq KAP C/OpenMP V4.2 prod- uct supports the OpenMP C directives, as defined in the specification published by the OpenMP Architecture Review Board (http://www.openmp.org). The Compaq KAP C/OpenMP V4.2 product now automatically inserts OpenMP parallel directives for processing by the Compaq C compiler, rather than calls to a parallel run time library. There is no support for OpenMP C++ directives. When performing automatic parallel decomposition, the Compaq KAP C/OpenMP optimizer will: 1. analyze the code; 2. identify the compute intensive loops that are candidates for par- allelization 3. determine if the selected loops can be safely executed in paral- lel; 4. transform the code, inserting OpenMP directives; 5. insert all necessary synchronization points. Because a primary objective of the automatic parallel decomposition facility is to produce a correct parallel program, the Compaq KAP C/OpenMP optimizer must often pass up opportunities to parallelize loops that cannot be properly analyzed due to lack of information or complex pro- gram structure. The advanced programmer can often improve parallel ef- ficiency by guiding the Compaq KAP C/OpenMP optimizer in performing automatic parallel decomposition, supplying missing information through the use of directives, assertions, and command line options. Parallel Run Time Environment For programs parallelized using OpenMP directives, consult the Com- paq C documentation for run time options. 2 NOTE: Modules using OpenMP directives and processed by the compiler may not be mixed with modules using the Compaq KAP parallel RTL pro- duced by previous versions of the Compaq KAP optimizer. Loop Optimizations The Compaq KAP C/OpenMP optimizer provides a variety of loop trans- formations intended to improve execution performance. These include: o Inner loop unrolling o Loop interchange o Loop fusion o Loop splitting o Loop rerolling o Loop distribution o Loop peeling Memory Management Optimizations The Compaq KAP C/OpenMP optimizer provides several optimizations to conserve memory resources and improve data locality. These include: o Outer loop (two-dimensional) unrolling to block data for the cache o Natural data alignment Function Inlining The Compaq KAP C/OpenMP optimizer can selectively insert both func- tion and subroutine code into the main code stream, a capability re- ferred to as "inlining". Inlining a function allows the Compaq KAP C/OpenMP optimizer to include the function code in its IPA, resulting in a more thorough analysis and optimization. Inlining also eliminates the call overhead and may enable better code scheduling by the compiler. 3 In addition to inlining, the Compaq KAP C/OpenMP optimizer can per- form only the IPA operation on a function or subroutine. When this op- tion is selected, the function or subroutine is temporarily inlined while IPA is performed, and then is removed. The IPA option provides the benefit of an improved interprocedural analysis without the code size expansion that results from inlining. The source of function and subroutine code for inlining or IPA can be a specific set of files, or a special inline library file that is built and maintained by the Compaq KAP C/OpenMP optimizer. Scalar Optimizations The Compaq KAP C/OpenMP optimizer can perform many standard scalar com- piler optimizations, including: o Dead code elimination o Induction variable recognition o Invariant IF restructuring o Reciprocal substitution o Global forward substitution o Lifetime analysis Informational Program Listings The Compaq KAP C/OpenMP optimizer optionally provides an informational listing file, outlining the results of its processing. The content of the listing file may be controlled through an option switch. Content options include: o Call tree of entire program o KAP options used for each program unit o Loop optimization table for each program unit o Program unit names inserted in error output as they are processed o Compilation performance statistics o Loop summary table, summarizing number of loops transformed 4 o Transformed program listing Control of KAP Options The Compaq KAP C/OpenMP optimizer is provided with a set of default option settings. While the default settings make the optimizer eas- ier to use, they may not provide optimal performance for every pro- gram. And, since some of the transformations change the order of com- putation, some numerical differences in results may occur in sensi- tive programs. The Compaq KAP C/OpenMP optimizer provides a large set of command qualifiers and in-source directives and assertions that al- low the advanced user to customize KAP transformations for a partic- ular application program. For cases where the application is sensi- tive to accumulated rounding error, the optimization level may need to be reduced. Consult the user documentation for advice on using the many options provided. Run-Time Library Distribution The Compaq KAP C/OpenMP kit includes one or more Run-Time Libraries that are needed to support the execution of certain Compaq KAP func- tions. You may copy and distribute royalty-free the Run-Time Libraries (the "RTLs") with your application, provided that you: o distribute the RTLs only in conjunction with and as a part of your application; o include KAI's copyright notice on each copy of the application; o do not use the Compaq or KAI name, logo, or trademarks to market your application; o agree to indemnify, hold harmless, and defend both Compaq and KAI from and against any claims or lawsuits, including attorney's fees, that arise or result from the use or distribution of your appli- cation. For Compaq KAP C/OpenMP V4.2, the RTL images are designated as: o libkio.a 5 HARDWARE REQUIREMENTS Compaq KAP C/OpenMP V4.2 for Tru64 UNIX will operate on any AlphaS- tation or AlphaServer capable of running Tru64 UNIX. Disk Space Requirements Disk space required for installation: Root file system: / 0 KB Other file systems: /usr 10,000 KB /tmp 3 KB /var 0 KB Disk space required for use (permanent): Root file system: / 0 KB Other file systems: /usr 10,000 KB /var 0 KB These counts refer to the disk space required on the system disk. The sizes are approximate; actual sizes may vary depending on the user's system environment, configuration, and software options. SOFTWARE REQUIREMENTS For Compaq Tru64 UNIX Systems: o Compaq Tru64 UNIX Operating System, V4.0D-V4.0G or V5.0-V5.1 o Developer's Toolkit for Tru64 UNIX V4.0D-V4.0G or V5.0-V5.1 (SPD 44.36) o For V4.0F only, Developer's Toolkit Supplement V4.0F 6 GROWTH CONSIDERATIONS The minimum hardware/software requirements for any future version of this product may be different from the requirements for the current version. DISTRIBUTION MEDIA This product is distributed on the Compaq CD-ROM Software Library for Tru64 UNIX and is also available as an individual product CD-ROM. The software documentation for this product is available as part of the Tru64 UNIX Online Documentation Library on CD-ROM (QA-054AA-H8), and is also available as a printed documentation set. ORDERING INFORMATION Unlimited Use Software QL-0HHA*-AA Licenses: Concurrent Use Software QL-0HHAM-3B License: Software Media/Documentation:QA-0HHAA-H8 Software Documentation: QA-0HHAA-GZ Software Product Ser- QT-0HHA*-** vices: * Denotes variant fields. For additional information on available li- censes, services, and media, refer to the appropriate price book. SOFTWARE LICENSING This software is furnished under license from Compaq Computer Corpo- ration. For more information about the Compaq licensing terms and poli- cies, contact your local Compaq office or Compaq partner. License Management Facility Support 7 This layered product supports the Tru64 UNIX License Management Fa- cility. License units for this product are allocated on either an Unlimited System Use basis or a Concurrent Use basis. For more information on the Tru64 UNIX License Management Facility, refer to the Tru64 UNIX Operating System Software Product Description (SPD 41.61.xx) or documentation. SOFTWARE PRODUCT SERVICES A variety of service options are available from Compaq. For more in- formation, contact your local Compaq office or Compaq partner. SOFTWARE WARRANTY This software is provided by Compaq with a 90 day conformance warranty in accordance with the Compaq warranty terms applicable to the license purchase. The above information is valid at time of release. Please contact your local Compaq office for the most up-to-date information. [R] Compaq and the Compaq Logo are registered in the United States Trademark and Patent Office. [TM] AlphaStation, AlphaServer, Tru64 and DECthreads are trade- marks of Compaq Information Technologies, L.P. [R] UNIX is a registered trademark of the Open Group in the United States and other countries. [TM] KAP and KAI are trademarks of Intel Corporation. All other product names mentioned herein may be trademarks or regis- tered trademarks of their respective companies. 8 Confidential computer software. Valid license from Compaq or autho- rized sublicensor required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Soft- ware Documentation, and Technical Data for Commercial Items are li- censed to the U.S. Government under vendor's standard commercial li- cense. Compaq shall not be liable for technical or editorial errors or omis- sions contained herein. The information in this document is provided "as is" without warranty of any kind and is subject to change with- out notice. The warranties for Compaq products are set forth in the express limited warranty statements accompanying such products. Noth- ing herein should be construed as constituting an additional warranty. ©2001 Compaq Computer Corporation 9