Compaq Software Product Description ___________________________________________________________________ PRODUCT NAME: KAP C Version 3.2 for OpenVMS Alpha \SPD 38.51.08) DESCRIPTION The Compaq KAP [TM] C product is developed by Kuck & Associates, In- corporated (KAI), and is distributed under Compaq Computer Corpora- tion Standard Terms and Conditions. The KAP C for OpenVMS Alpha prod- uct is supported on the Compaq C for OpenVMS Alpha compiler only. The KAP C optimizer is a C-language source-to-source preprocessor that restructures code for improved performance on serial and parallel pro- cessors. The KAP optimizer performs an interprocedural dependence anal- ysis (IPA), allowing it to use advanced optimizations safely. It in- tegrates with the Compaq C compiler for seamless operation. Major ca- pabilities of the Compaq KAP optimizer include: 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 The KAP product provides true shared memory multiprocessing capabil- ities for Compaq AlphaServer Symmetric Multiprocessing (SMP) systems, providing the ability to do automatic decomposition of C. December 1999 When performing automatic parallel decomposition, the KAP optimizer will: 1. Analyze the code. 2. Identify the compute intensive loops that are candidates for par- allelization. 3. Determine whether the selected loops can be safely executed in par- allel. 4. Transform the code, creating and managing the parallel threads. 5. Insert all necessary synchronization points. Because a primary objective of the automatic parallel decomposition facility is to produce a correct parallel program, the KAP optimizer must often pass up opportunities to parallelize loops that cannot be properly analyzed due to lack of information or complex program struc- ture. Parallel Run-Time Environment The Compaq KAP optimizers for C, Fortran 77, and Fortran 90 all share a common run-time environment based on DECthreads. Programs may be com- posed of modules written in one or more of the three languages, and may be parallelized by use of the appropriate KAP optimizers. A program parallelized with the Compaq KAP optimizer may be given one or more of the following options at run-time by setting environment variables: o Set the number of threads to use (normally set to number of pro- cessors). o Schedule for fastest turnaround or maximum throughput. o Allocate additional thread stack space. Loop Optimizations 2 The KAP optimizer provides a variety of loop transformations intended to improve execution performance. These include: o Inner loop unrolling o Loop interchange o Loop fusion/splitting o Loop rerolling o Loop distribution o Loop peeling Memory Management Optimizations The KAP optimizer provides several optimizations to conserve memory resources and improve data locality. These include: o Outer loop (two-dimensional) unrolling to block data for improved cache performance o Natural data alignment Function Inlining The KAP optimizer can selectively insert both function and subroutine code into the main code stream, a capability known as "inlining." In- lining a function allows the KAP optimizer to include the function code in its IPA, resulting in a more thorough analysis and optimization. Inlining also eliminates the function call overhead and may enable bet- ter code scheduling by the compiler. In addition to inlining, the KAP optimizer can perform selective IPA operations on a function or subroutine. When this option is selected, the function or subroutine is temporarily inlined while IPA is per- formed, 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 in- line library file built and maintained by the KAP optimizer. 3 Scalar Optimizations KAP can perform many standard scalar compiler optimizations, includ- ing: 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 KAP 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 in- clude: o Call tree of entire program o KAP options used for each program unit o Loop 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 o Transformed program listing Control of KAP Options The KAP optimizer is provided with a set of default option settings. Although the default settings make the optimizer easier to use, they may not provide optimal performance for every program. And, because some of the transformations change the order of computation, some nu- merical differences in results may occur in sensitive programs. The 4 KAP optimizer provides a large set of command qualifiers and in-source directives and assertions that allow the advanced user to customize KAP transformations for a particular application program. For cases where the application is sensitive to accumulated rounding error, the optimization level may need to be reduced. Consult the user documen- tation for advice on using the many options provided. Run-Time Library Distribution The KAP C kit includes one or more Run-Time Libraries that are needed to support the execution of certain KAP functions. 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 the 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 C Version 6.2 for OpenVMS Alpha and DEC C Version 6.0 for OpenVMS Alpha, the KAP C I/O library is designated as KIO.OLB. The par- allel library is designated as KMP.OLB. HARDWARE REQUIREMENTS Processors Supported Any Alpha system capable of running OpenVMS Alpha Version 7.2. Refer to the OpenVMS Software Product Description (SPD 25.01.xx) for details. 5 Disk Space Requirements (Block Cluster Size = 1) Disk space required for 20,000 blocks installation: (10MB) Disk space required for 20,000 blocks use (permanent): (10MB) 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 o OpenVMS Alpha Operating System Version 7.2 o Compaq C Version 6.2 for OpenVMS Alpha OR o DEC C Version 6.0 for OpenVMS Alpha SOFTWARE LICENSING This software is furnished only under a license. For more information about the Compaq licensing terms and policies, contact your local Com- paq office. LICENSE MANAGEMENT FACILITY SUPPORT This layered product supports the OpenVMS License Management Facil- ity. License units for this product are allocated on a capacity basis. 6 For more information on the License Management Facility, refer to the OpenVMS Operating System Software Product Description or the License Management Facility manual of the OpenVMS Operating System documen- tation set. For more information about Compaq's licensing terms and policies, con- tact your local Compaq office. CLUSTER ENVIRONMENT This layered product is fully supported when installed on any valid and licensed OpenVMS Cluster* configuration. The HARDWARE REQUIREMENTS section of this product's Software Product Description detail any spe- cial hardware required by this product. * OpenVMS Cluster configurations are fully described in the OpenVMS Cluster Software Product Description (29.78.xx) and include CI, Eth- ernet, and Mixed Interconnect configurations. OPENVMS TAILORING CLASSES The following OpenVMS classes are required for full functionality of this layered product: o OpenVMS Required Saveset o Programming Support o Utilities For more information on the OpenVMS classes and tailoring, refer to the OpenVMS Operating System Software Product Description (SPD 25.01.xx). GROWTH CONSIDERATIONS The minimum hardware and software requirements for any future version of this product may be different from the requirements for the cur- rent version. 7 DISTRIBUTION MEDIA The KAP C for OpenVMS Alpha product is available on the OpenVMS Al- pha Software Layered Products Library Package (QA-03XAA-H8). The li- brary package includes media and documentation on CD-ROM. The software documentation for this product is also available as part of the OpenVMS Alpha Online Documentation CD-ROM Library (QA-4KM8A- G8). A hardcopy documentation set can be ordered separately (QA-0HFAA- GZ). YEAR 2000 READY This product is Year 2000 Ready. This product is defined: "Year 2000 Ready" products are defined by Com- paq as products capable of accurately processing, providing, and/or receiving date data from, into and between the twentieth and the twenty- first centuries, and years 1999 and 2000, including leap year calcu- lations, when used in accordance with the associated product documen- tation and provided that all hardware, firmware and software used in combination with such products properly exchange accurate date data with the products. For additional information visit the DIGITAL brand area on Compaq's Year 2000 Ready web site located at http://www.compaq.com/year2000/warranties3.html. 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. 8 ORDERING INFORMATION Software License: QL-0HFA*-** Software Update License: QL-0HF**-RA Software Documentation(hardcopy): QA-0HFAA-GZ Software Product Services: QT-0HFA*-** * Denotes variant fields. The above information is valid at time of release. Please contact your local Compaq office for the most up-to-date information. SOFTWARE PRODUCT SERVICES A variety of service options are available from Compaq. For more in- formation, contact your local Compaq office. TRADEMARK INFORMATION [TM] Compaq, the Compaq Logo, Alpha, DIGITAL, the Digital logo, DEC, DECwindows, OpenVMS, VAX, VAX Document, and VMS are registered in the U.S. Patent and Trademark Office. [TM] DECthreads is a trademark of Compaq Computer Corporation. [TM] KAP is a trademark of Kuck & Associates, Incorporated, Cham- paign, IL. © 1999 Compaq Computer Corporation. COMPAQ Registered in U.S. Patent and Trademark Office. Microsoft and Windows NT are registered trademarks of Microsoft Corporation in the United States and/or other countries. Intel, Pentium, and Intel Inside are registered trademarks of Intel Corporation in the United States and/or other countries. UNIX and The Open Group are registered trademarks of The Open Group in the United States and/or other countries. All other product names mentioned herein 9 may be trademarks or registered trademarks of their respective companies. Confidential computer software. Valid license from Compaq or authorized sublicensor required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. Compaq shall not be liable for technical or editorial errors or omissions contained herein. The information in this document is subject to change without notice. 10