4 Known Problems and Workarounds
- 1 - 6.0 MIPSpro Power C Release Notes - 2 - Document Number 007-1670-010 ________________________________________________ Contributors: Written by Bill Johnson and Todd Smith Production by Valerie Franklin Engineering contributions by Bill Johnson and Todd Smith ________________________________________________ c Copyright 1994, Silicon Graphics, Inc. - All rights reserved This document contains proprietary information of Silicon Graphics, Inc. The contents of this document may not be disclosed to third parties, copied, or duplicated in any form, in whole or in part, without the prior written permission of Silicon Graphics, Inc. Restricted Rights Legend Use, duplication, or disclosure of the technical data contained in this document by the Government is subject to restrictions as set forth in subdivision (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013, and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement. Unpublished rights reserved under the Copyright Laws of the United States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. 6.0 MIPSpro Power C Release Notes - 3 - Document Number 007-1670-010 Silicon Graphics, Inc. Mountain View, California Silicon Graphics and IRIS are registered trademarks and MIPSpro Power C, IRIS POWER Series, IRIS-4D, Personal IRIS, IRIS Indigo, and IRIX are trademarks of Silicon Graphics, Inc. 1. Introduction The MIPSpro Power C software option is a parallel processing version of the standard C compiler. The software has three major components: o The Power C Analyzer (pca), which analyzes serial C source code to find loops that can be executed in parallel on multiple processors. It then rewrites the original program, inserting compiler directives to mark the parallel code. You can run this analyzer either as an automatic part of compilation or as a stand-alone analysis tool. o The multiprocessing C source-to-source translator (mpc), which recognizes the parallel directives and generates parallel C code containing calls to the run-time library. o A library of run-time routines (libmp.a) that distribute and synchronize parallel sections of code across multiple processors. Additional components of the product are: o The manual page for pca. o The manual page for mpc. o A gifts directory containing: a ``quick check'' procedure for verifying successful installation, a sample benchmark program, on-line copies of all code examples in the MIPSpro Power C User's Guide, and on-line versions of all of the code examples in - 4 - Practical Parallel Programming, by Dr. Barr E. Bauer, Academic Press, 1991. o An on-line copy of these release notes. Note: Packaged with these release notes is a separate sheet that contains the Software License Agreement. This software is provided to you solely under the terms and conditions of the Software License Agreement. Please take a few moments to review the Agreement. This document contains the following chapters: 1. Introduction 2. Installation Information 3. New Features and Bug Fixes 4. Known Problems and Workarounds 1.1 Release_Identification_Information Following is the release identification information for MIPSpro Power C: Software Option Product MIPSpro Power C Version 6.0 Product Code SC4-PWRC-6.0 System Software Requirements 4D1-6.0, IRIS Development Option 6.0 1.2 Hardware_Requirements You can only install MIPSpro Power C on an SGI Power Challenge system. The complete package takes about 3.5 megabytes of disk space. A minimum of 12 megabytes of memory is recommended for the best compile-time performance. Note: This version of Power C is designed to only support Power Challenge systems running IRIX 6.0. Both Power C itself and the executables it generates can only - 5 - be run on a Power Challenge system. 1.3 On-Line_Release_Notes After you install the on-line documentation for a product (the relnotes subsystem), you can view the release notes on your screen. If you have a graphics system, select ``Release Notes'' from the Tools submenu of the Toolchest. This displays the grelnotes(1) graphical browser for the on-line release notes. Refer to the grelnotes(1) man page for information on options to this command. If you do not have a graphics system, you can use the relnotes command. Refer to the relnotes(1) man page for accessing the on-line release notes. 1.4 Product_Support Silicon Graphics, Inc., provides a comprehensive product support maintenance program for its products. If you are in North America and would like support for your Silicon Graphics-supported products, contact the Technical Assistance Center at 1-800-800-4SGI. If you are outside North America, contact the Silicon Graphics subsidiary or authorized distributor in your country. - 1 - 6.0 MIPSpro Power C Release Notes - 2 - ________________________________________________ Contributors: Written by Bill Johnson and Todd Smith Engineering contributions by Bill Johnson and Todd Smith ________________________________________________ c Copyright 1994, Silicon Graphics, Inc. - All rights reserved This document contains proprietary information of Silicon Graphics, Inc. The contents of this document may not be disclosed to third parties, copied, or duplicated in any form, in whole or in part, without the prior written permission of Silicon Graphics, Inc. Restricted Rights Legend Use, duplication, or disclosure of the technical data contained in this document by the Government is subject to restrictions as set forth in subdivision (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013, and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement. Unpublished rights reserved under the Copyright Laws of the United States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. 6.0 MIPSpro Power C Release Notes Document Number 007-1670-010 - 3 - Silicon Graphics, Inc. Mountain View, California Silicon Graphics and IRIS are registered trademarks and MIPSpro Power C, IRIS POWER Series, IRIS-4D, Personal IRIS, IRIS Indigo, and IRIX are trademarks of Silicon Graphics, Inc. 2. Installation_Information This chapter lists supplemental information to the IRIS Software Installation Guide. The information listed here is product-specific; use it with the installation guide to install this product. 2.1 MIPSpro_Power_C_Subsystems Following is a description of the MIPSpro Power C subsystems: pwrc_dev.sw.pca The Power C Analyzer (pca). pwrc_dev.sw.mpc The multiprocessing C source-to-source translator (mpc). pwrc_dev.sw.lib The Power C run-time library (libmp). pwrc_dev.opt.gifts Optional sample test code. pwrc_dev.man.pca The on-line man page for pca. pwrc_dev.man.mpc The on-line man page for mpc. pwrc_dev.man.relnotes The (optional) on-line release notes. 2.1.1 Gifts_Directory_Contents One of the MIPSpro Power C subsystems, pwrc_dev.sw.gifts, contains sample code that you might find useful. This subsystem is not loaded by default, so you must ask for it explicitly at installation time if you want it to be loaded. - 4 - This subsystem loads into /usr/people/4Dgifts/examples/powerc and contains the following subdirectories: barr Contains on-line versions of all of the code examples in Practical Parallel Programming, by Dr. Barr E. Bauer, Academic Press, 1991. livermore Contains the well-known Lawrence Livermore Loops benchmark program, which has been translated into C. quick_check Contains a very short test program, which can be compiled, linked, and executed to verify the correct installation and operation of MIPSpro Power C. users_guide Contains all of the source code examples in the MIPSpro Power C User's Guide. Each of the subdirectories contains a README file that further describes the contents of the directory and a Makefile to build the sample programs. 2.2 MIPSpro_Power_C_Subsystem_Disk_Use This section lists the subsystems (and their sizes) of the MIPSpro Power C option. If you are installing this option for the first time, the subsystems marked ``default'' are the ones that are installed when you choose the ``defaults'' or ``automatic'' menu items during the installation procedure. Note: The listed subsystem sizes are approximate. Refer to the IRIS Software Installation Guide for information on finding exact sizes. Subsystem Name Subsystem Size (512-byte blocks) - 5 - pwrc_dev.sw.pca (default) 7203 pwrc_dev.sw.lib (default) 175 pwrc_dev.sw.mpc (default) 1238 pwrc_dev.opt.gifts 373 pwrc_dev.man.pca (default) 28 pwrc_dev.man.mpc (default) 10 pwrc_dev.man.relnotes 14 By default, the sample code and on-line release notes are not installed. They and the man pages are not required to successfully run the analyzer or the multiprocessing C compiler. It is possible (although not recommended) to omit either pwrc_dev.sw.pca or pwrc_dev.sw.mpc and pwrc_dev.sw.lib depending on your needs. If you will be using only the multiprocessing C source-to-source translator with code containing hand-inserted parallel directives, you can safely omit pwrc_dev.sw.pca. If you wish to use only the analyzer and do not plan to compile any parallel code, you can omit pwrc_dev.sw.mpc and pwrc_dev.sw.lib without harm. Finally, note that linked, executable code developed using MIPSpro Power C is fully self- contained and does not require MIPSpro Power C to be installed on the target system. 2.3 Installation_Method All of the subsystems for MIPSpro Power C can be installed using IRIX. You do not need to use the miniroot. Refer to the IRIS Software Installation Guide for complete installation instructions. The procedure for installing the CROSS64 development option (to be installed from the 6.0 IDO CD-ROM onto a machine running 5.2 IRIX) is specialized. For the details of this procedure, consult the 6.0 IRIX Development Option release notes. For information about using the CROSS64 development option, see the release notes for the 6.0 Baae Compiler Development Option. - 6 - 2.4 Prerequisites MIPSpro Power C requires that the standard C compiler (found in the IRIS Development Option) already be installed on your workstation. 2.5 Other_Installation_Information The installation medium for MIPSpro Power C contains a ``quick check'' procedure for verifying correct installation and operation of the product. This procedure is part of the pwrc_dev.sw.gifts subsystem which, by default, is not installed. You must specify at installation time if you wish this loaded. If you have installed the pwrc_dev.opt.gifts subsystem, perform the following steps to check MIPSpro Power C's installation and operation: su cd /usr/people/4Dgifts/examples/powerc/quick_check make all ./test make clean The test program takes between 10 seconds and 2 minutes to execute, depending on your hardware configuration. It is self-checking and prints a final OK! upon successful completion. - 1 - 6.0 MIPSpro Power C Release Notes - 2 - ________________________________________________ Contributors: Written by Bill Johnson and Todd Smith Engineering contributions by Bill Johnson and Todd Smith ________________________________________________ c Copyright 1994, Silicon Graphics, Inc. - All rights reserved This document contains proprietary information of Silicon Graphics, Inc. The contents of this document may not be disclosed to third parties, copied, or duplicated in any form, in whole or in part, without the prior written permission of Silicon Graphics, Inc. Restricted Rights Legend Use, duplication, or disclosure of the technical data contained in this document by the Government is subject to restrictions as set forth in subdivision (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013, and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement. Unpublished rights reserved under the Copyright Laws of the United States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. 6.0 MIPSpro Power C Release Notes Document Number 007-1670-010 - 3 - Silicon Graphics, Inc. Mountain View, California Silicon Graphics and IRIS are registered trademarks and MIPSpro Power C, IRIS POWER Series, IRIS-4D, Personal IRIS, IRIS Indigo, and IRIX are trademarks of Silicon Graphics, Inc. 3. New_Features_and_Bug_Fixes This chapter details the changes in MIPSpro Power C since the last release. o Translation of parallel directives into C code with parallel run-time library calls is now done separately from the normal C compilation process by mpc, which acts as a source-to-source filter. This decoupling makes both phases more reliable. In addition, this makes it possible, using the -pca keep option, to see the fully parallelized C source code. o The Power C Analyzer, pca, and the parallelizing source-to-source filter, mpc, have both been enhanced to correctly compile code for 64-bit processors. o As mentioned in the previous release notes, variables in the shared list of #pragma parallel previously were occasionally passed by value. This has been fixed. o As mentioned in the previous release notes, the analyzer would sometimes insert typedef's into structure definitions. This has been fixed. o Variables of type "long long" previously were sometimes handled incorrectly in inter-process communication. This has been fixed. o The Power C Analyzer has undergone major revision, fixing many bugs which previously caused it to abort or produce incorrect or inefficient code. o Line numbers for the purposes of debugging, etc., now always refer to the original - 4 - source file rather than to one of its various transformed versions. o The default value for the -arclimit option to pca has changed from 2000 to 5000. o The default for the -machine option to pca has changed from -machine=s to -nomachine. o The options -cplc, -fuse, -hli, -namepart, -unroll3, and -64 have been added to pca for control of cache usage, loop fusion, hoisting of loop invariant code, loop fission, loop unrolling, and 64-bit operation. For more information on these options, see the pca man page. - 1 - 6.0 MIPSpro Power C Release Notes - 2 - ________________________________________________ Contributors: Written by Bill Johnson and Todd Smith Engineering contributions by Bill Johnson and Todd Smith ________________________________________________ c Copyright 1994, Silicon Graphics, Inc. - All rights reserved This document contains proprietary information of Silicon Graphics, Inc. The contents of this document may not be disclosed to third parties, copied, or duplicated in any form, in whole or in part, without the prior written permission of Silicon Graphics, Inc. Restricted Rights Legend Use, duplication, or disclosure of the technical data contained in this document by the Government is subject to restrictions as set forth in subdivision (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013, and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement. Unpublished rights reserved under the Copyright Laws of the United States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. 6.0 MIPSpro Power C Release Notes Document Number 007-1670-010 - 3 - Silicon Graphics, Inc. Mountain View, California Silicon Graphics and IRIS are registered trademarks and MIPSpro Power C, IRIS POWER Series, IRIS-4D, Personal IRIS, IRIS Indigo, and IRIX are trademarks of Silicon Graphics, Inc. 4. Known_Problems_and_Workarounds This chapter lists known problems in this release of MIPSpro Power C. o A large number of extra warnings are emitted by the compiler when compiling with Power C; however, they are not indicative of any real problems. Only those warnings which occur when compiling without Power C actually indicate possible problems with your program. o The translation performed by mpc uses some identifiers which actually belong in the ANSI user namespace, typically beginning with "_mp". You may have a legal ANSI problem which uses identifiers of this type, but if you experience a name conflict, you may have to rename those variables. o Given input code which already contains parallel directives, the analyzer may pass them through in a syntactically incorrect form, causing errors in subsequent compiler passes. It is generally desirable to avoid running the analyzer on code which already contains parallel directives. o In violation of the ANSI C standard, expressions of the form (X && X), where X is a constant, are sometimes folded to simply (X) by the analyzer. This often causes no trouble, for example, when the expression is being used as the condition in an "if" statement, but can cause serious problems in certain situations, such as when the result of the expression is to be passed to a function, etc. - 4 - o If within a function body you declare and call a second function, mpc may create code with extra functions which call the second function but lack its declaration, which can cause compile-time prototype errors. The way to avoid this problem is to declare functions at the file scope level (globally) rather than within functions.