* * IBM(R) * IBM XL Fortran Advanced Edition Version 8.1 for Mac OS X * 5724-G13 * * Licensed Materials - Property of IBM * (C) Copyright IBM Corp. 2004. All Rights Reserved. * * IBM is trademark or registered trademark of International Business * Machines Corporation in the U.S., other countries or both. * * US Government Users Restricted Rights - Use, duplication or disclosure * restricted by GSA ADP Schedule Contract with IBM Corp. * *** IBM XL Fortran Advanced Edition Version 8.1 for Mac OS X *** This README file contains updated information about IBM XL Fortran Advanced Edition Version 8.1 that is not available in our online help. For a database of known problems, solutions, and frequently asked questions (Technotes) on Mac OS X and other platforms, see: http://www.ibm.com/software/awdtools/fortran/support/ The instructions in this file assume that you are using the default installation locations (paths that begin with "/opt"). If you are using non-default locations, specify the appropriate relocation path before "/opt". In addition to the XL Fortran compiler for Mac OS X, IBM also produces the XL C/C++ compiler for Mac OS X. For more information, see: http://www.ibm.com/software/awdtools/ccompilers By using IBM XL Fortran Advanced Edition Version 8.1 for Mac OS X, you agree to the terms of the license as specified in the following files: - license.pdf - LicenseAgreement.pdf These files are located in the root directory of the installation CD or disk image. After installation, they are located in the following directory: /opt/ibmcmp/xlf/8.1 The SMP run-time environment (packages xlsmp.msg.rte.pkg and xlsmp.rte.pkg) is a Technology Preview and is not for redistribution. README Content ============== This document contains the following sections: I. Operating System Support II. Installation Instructions III. Technology Preview IV. January 2005 XL Fortran Advanced Edition Version 8.1 for Mac OS X Update V. September 2004 XL Fortran Advanced Edition Version 8.1 for Mac OS X Update VI. June 2004 XL Fortran Advanced Edition Version 8.1 for Mac OS X Update VII. March 2004 XL Fortran Advanced Edition Version 8.1 for Mac OS X Update VIII. Updates to the Product Documentation I. Operating System Support =========================== IBM XL Fortran Advanced Edition Version 8.1 supports Mac OS X versions 10.2 and 10.3. II. Installation Instructions ============================= You must uninstall any XL Fortran evaluation compilers before installing this update. For complete installation instructions, see the Installation Guide. A PDF file is located at /doc/en_US/pdf/install.pdf on the installation CD or disk image. XL Fortran Run-Time Environment ------------------------------- The XL Fortran run-time environment can be redistributed with your application. These packages, xlf.msg.rte.pkg and xlf.rte.pkg, are located in the /runtime directory of the CD or disk image file. For information about redistributing the XL Fortran run-time environment, see the license agreement. III. Technology Preview ======================= The following is provided as part of the Technology Preview: - OpenMP Fortran API, Version 2.0 - SMP options and directives These features are not part of the XL Fortran compiler product. The purpose of the technology preview is to showcase early results of development work. There is no support for these features. For information about the Technology Preview, see: /doc/en_US/pdf/techpreview.pdf on the installation CD or disk image. IV. January 2005 XL Fortran Advanced Edition Version 8.1 for Mac OS X Update ============================================================ Viewing Documentation Using the Apple Help Center ------------------------------------------------- Mac OS X 10.2 ------------- To display the HTML version of the documentation use the following steps: a) From the Finder application menu, click Help. b) Select Mac Help. c) Click on Help Center on the button bar. d) Select IBM XL Fortran from the drawer. Mac OS 10.3 ----------- To display the HTML version of the documentation use the following steps: a) From the Finder application menu, click Help. b) Select Mac Help. c) From the Help Viewer application menu, click Library. d) Select IBM XL Fortran Compiler. Language Reference Errata ------------------------- The following corrections and additions apply to the IBM XL Fortran Edition V 8.1 for Mac OS X Language Reference: Expressions and Assignment -------------------------- The section on Initialization Expressions now contains an additional rule: The transformational function IEEE_SELECTED_REAL_KIND from the intrinsic module IEEE_ARITHMETIC can also be referenced. In the section on Specification Expressions, the following bullet: A reference to an array inquiry function (except ALLOCATED), the bit inquiry function BIT_SIZE, the character inquiry functions LEN and NEW_LINE, the kind inquiry function KIND, or a numeric inquiry function. Each argument is either a restricted expression, or it is a variable whose properties inquired about are not dependent on the upper bound of the last dimension of an assumed-size array, not defined by an expression that is not a restricted expression, or not definable by an ALLOCATE statement or by a pointer assignment statement. now reads: A reference to an array inquiry function (except ALLOCATED), the bit inquiry function BIT_SIZE, the character inquiry functions LEN and NEW_LINE, the kind inquiry function KIND, an IEEE inquiry function, or a numeric inquiry function. Each argument is either a restricted expression, or it is a variable whose properties inquired about are not dependent on the upper bound of the last dimension of an assumed-size array, not defined by an expression that is not a restricted expression, or not definable by an ALLOCATE statement or by a pointer assignment statement. Comma-Separated Input/Output ---------------------------- Note: This function is an IBM extension. When reading floating-point data using format-directed input/output, a comma that appears in the input terminates the field. This can be useful for reading files containing comma-separated values. Example: The following program reads two reals using the E edit descriptor. It requires that the field width be 16 characters. The program attempts to read the remaining characters in the record as a character string. > cat read.f real a,b character*10 c open(11, access='sequential', form='formatted') read(11, '(2e16.10, A)') a,b,c print *, a print *, b print *, c end If the floating-point fields are 16 characters wide, as the format specifies, the program executes correctly. (0.4000000000E+02 is 16 characters long) > cat fort.11 0.4000000000E+020.3000000000E+02hello > a.out 40.00000000 30.00000000 hello But if the floating-point input contains less than 16 characters, errors occur because parts of the next field are read. (0.400000E+02 is 12 characters long) > cat fort.11 0.400000E+020.3000000E+02hello > a.out 1525-097 A READ statement using decimal base input found the invalid digit '.' in the input file. The program will recover by assuming a zero in its place. 1525-097 A READ statement using decimal base input found the invalid digit 'h' in the input file. The program will recover by assuming a zero in its place. 1525-097 A READ statement using decimal base input found the invalid digit 'e' in the input file. The program will recover by assuming a zero in its place. 1525-097 A READ statement using decimal base input found the invalid digit 'l' in the input file. The program will recover by assuming a zero in its place. 1525-097 A READ statement using decimal base input found the invalid digit 'l' in the input file. The program will recover by assuming a zero in its place. 1525-097 A READ statement using decimal base input found the invalid digit 'o' in the input file. The program will recover by assuming a zero in its place. INF 0.0000000000E+00 If you use commas to terminate the fields, the floating-point values are read correctly. (0.400000E+02 is 12 characters long, but the fields are separated by commas.) > cat fort.11 0.400000E+02,0.3000000E+02,hello > a.out 40.00000000 30.00000000 hello Directives ---------- STREAM_UNROLL, UNROLL, UNROLL_AND_FUSE -------------------------------------- The -qipa=level=2 option is not sufficient to enable user-directed loop unrolling as stated under the STREAM_UNROLL directive. In order to enable user-directed loop unrolling, you must specify one of the following compiler options: -O4 or higher -qhot -qsmp Note that if the -qstrict option is in effect, no stream unrolling will occur. If you want to enable stream unrolling with the -qhot option alone, you must also specify -qnostrict. User's Guide Errata -------------------- The following corrections apply to the IBM XL Fortran Advanced Edition Version 8.1 for Mac OS X User's Guide: Editing, Compiling, Linking, and Running XL Fortran Programs ------------------------------------------------------------ In the "Setting Run-Time Options" section, under the "XLFRTEOPTS Environment Variable" heading, the example for the "buffering=" run-time option now reads: Fortran main program: integer(4) p1,p2,p3 print *,'Reading p1 in Fortran...' read(5,*) p1 call c_func(p2) print *,'Reading p3 in Fortran...' read(5,*) p3 print *,'p1 p2 p3 Read: ',p1,p2,p3 end C subroutine (c_func.c): #include void c_func(int *p2) { int n1 = -1; printf("Reading p2 in C...\n"); setbuf(stdin, NULL); /* Specifies no buffering for stdin */ fscanf(stdin,"%d",&n1); *p2=n1; fflush(stdout); } Input data file (infile): 11111 22222 33333 44444 The main program runs by using infile as redirected standard input, as follows: $ main < infile If you turn on buffering=disable_preconn the results are as follows: Reading p1 in Fortran... Reading p2 in C... Reading p3 in Fortran... p1 p2 p3 Read: 11111 22222 33333 If you turn on buffering=enable the results are unpredictable. XL Fortran Compiler-Option Reference ------------------------------------ -qflttrap Option ---------------- Specifying the -qflttrap option at the link step overrides the compile-time setting, as this option is recognized during linking with the IPA optimizer. -qipa=threads Option -------------------- Specifying -qipa=threads can reduce IPA optimization time. The threads suboption allows the IPA optimizer to run portions of the optimization process in parallel threads, which can speed up the compilation process on multi-processor systems. V. September 2004 XL Fortran Advanced Edition Version 8.1 for Mac OS X Update ============================================================= User's Guide Errata -------------------- The following corrections apply to the IBM XL Fortran Advanced Edition Version 8.1 for Mac OS X User's Guide: -qsmallstack=dynlenonheap Option -------------------------------- Specifying -qsmallstack=dynlenonheap affects storage allocation and minimizes stack usage, where applicable. This suboption affects automatic objects that have nonconstant character lengths or a nonconstant array bound. When specified, automatic variables are allocated on the heap. When you do not specify -qsmallstack=dynlenonheap, automatic variables are allocated on the stack. -qwarn64 Option --------------- Syntax -qwarn64 | -qnowarn64 ---------- Aids in porting code from a 32-bit environment to a 64-bit environment by detecting the truncation of an 8-byte integer pointer to 4 bytes. The -qwarn64 option uses informational messages to identify statements that may cause problems with the 32-bit to 64-bit migration. Rules The default setting is -qnowarn64. The compiler flags the following situations with informational messages: - The assignment of a reference to the LOC intrinsic to an INTEGER(4) variable. - The assignment between an INTEGER(4) variable or INTEGER(4) constant and an integer pointer. - The specification of an integer pointer within a common block. - The specification of an integer pointer within an equivalence statement. Xcode templates --------------- XL Fortran Advanced Edition V8.1 for Mac OS X includes two new Xcode templates for use with XL compiler family. - XL Fortran Project Template - XL Fortran and XL C & C++ Mixed Project Template Use the XL Fortran Project Template for Fortran projects that use the XL Fortran compiler. Use the XL Fortran and XL C & C++ Mixed Project Template for mixed projects that use XL Fortran and XL C & C++. XL C/C++ is the default compiler selected for this template, and requires that the XL C & C++ compiler be installed on your system. NOTE: In case XL C & C++ compiler is not installed on your computer, do NOT attempt to use the XL Fortran and XL C & C++ Mixed Project Template. By using the new project templates provided for Xcode, you can now create a project that is customized to use IBM XL compilers. The new Xcode templates are installed when the XL Fortran compiler update is applied. When you start Xcode you will find the IBM templates in the same list as other templates bundled with Xcode. Xcode 1.5 Support ----------------- This update contains support for Xcode 1.5. If Xcode is already installed when you install XL Fortran, the installation script automatically integrates the Fortran compiler with Xcode. If you install Xcode after you install XL Fortran, you can execute the following command to integrate the Fortran compiler with Xcode: /opt/ibmcmp/xlf/8.1/exe/xlf_ide_plugin_install VI. June 2004 XL Fortran Advanced Edition Version 8.1 for Mac OS X Update ========================================================= Traceback Listing ----------------- In section 'XL Fortran Run-Time Exceptions' of the XL Fortran Advanced Edition Version 8.1 for Mac OS X User's Guide, the following text: traceback listing If you compile the program with the -g option, the traceback shows source line numbers in addition to the address offsets." now reads traceback listing In the XL Fortran Advanced Edition Version 8.1 for Mac OS X compiler, traceback listing does not show line numbers. VII. March 2004 XL Fortran Advanced Edition Version 8.1 for Mac OS X Update =========================================================== Xcode 1.1 Support ----------------- This update contains support for Xcode 1.1. If Xcode is already installed when you install XL Fortran, the installation script automatically integrates the Fortran compiler with Xcode. If you install Xcode after you install XL Fortran, you can execute the following command to integrate the Fortran compiler with Xcode: /opt/ibmcmp/xlf/8.1/exe/xlf_ide_plugin_install Prebind Support --------------- Prebinding an application allows the compiler to determine the addresses of shared library symbols at link time. This can save time when launching an application as the symbol addresses are predetermined. To build a shared library with prebinding enabled, specify the following compiler options: -prebind -seg1addr
where:
is the starting address for your shared library. Apple has reserved the 0x00000000 to 0x3FFFFFFF address range for applications. If your address range overlaps the address range used by any other shared library, prebinding is disabled. To prebind an application to shared libraries that have prebinding enabled, specify the following compiler option: -prebind To take advantage of prebinding, recompile existing applications with the -prebind compiler option. If you do not want to use prebinding, you can continue to run your applications without recompiling. IBM compilers use the 0xD4105000 to 0xD4C00000 address range. This is part of the address range that Apple has set aside for third-party products. In the unlikely event that you install another product that has an overlapping address range, prebinding is disabled. Changes to cppoptions --------------------- In Chapter 3 of the XL Fortran User's Guide, under the heading, "Attributes" the following text: cppoptions A string of options that are separated by commas, to be processed by cpp as if you entered them on the command line before any other option. This attribute is needed because some cpp options are usually required to produce output that can be compiled by XL Fortran. The default options are -C (which preserves any C-style comments in the output) and -P (which prevents #line directives from being generated). now reads: cppoptions A string of options that are separated by commas, to be processed by cpp as if you entered them on the command line before any other option. This attribute is needed because some cpp options are usually required to produce output that can be compiled by XL Fortran. The default option is -C (which preserves any C-style comments in the output). VIII. Updates to the Product Documentation ========================================== Uninstallation Instructions --------------------------- To uninstall XL Fortran (except for the SMP and XL Fortran run-time libraries), issue the following commands. These commands assume that you have installed XL Fortran in the default location. /opt/ibmcmp/xlf/8.1/exe/xlf_ide_plugin_uninstall /bin/rm -f /opt/ibmcmp/xlf/8.1/lib/libxlcmp*.dylib /bin/rm -rf /opt/ibmcmp/xlf/8.1/samples /bin/rm -rf /opt/ibmcmp/xlf/8.1/doc /bin/rm -rf /opt/ibmcmp/xlf/8.1/man /bin/rm -rf /opt/ibmcmp/xlf/8.1 /bin/rm -rf /Library/Receipts/xlf.lic.pkg /bin/rm -rf /Library/Receipts/xlf.cmp.pkg /bin/rm -rf /Library/Receipts/xlf.samples.pkg (optional package) /bin/rm -rf /Library/Receipts/xlf.help.pkg (optional package) /bin/rm -f /etc/opt/ibmcmp/xlf/8.1/xlf.cfg /bin/rm -f /etc/opt/ibmcmp/xlf/8.1/gxlf.cfg /bin/rm -f /Library/Documentation/Help/ibmxlf If you no longer need the SMP libraries, which are used by both XL Fortran and XL C/C++, delete them as follows. Do not delete these libraries if you have XL C/C++ installed on your system or if you have any Fortran, C, or C++ applications that link to these libraries. /bin/rm -rf /Library/Receipts/xlsmp.*.pkg /bin/rm -f /opt/ibmcmp/lib/libxlomp_ser.*.dylib /bin/rm -f /opt/ibmcmp/lib/libxlsmp.*.dylib /bin/rm -f /opt/ibmcmp/msg/en_US/smprt.cat /bin/rm -rf /opt/ibmcmp/xlsmp If you do not have any applications that require the XL Fortran run-time libraries, delete them as follows. /bin/rm -rf /Library/Receipts/xlf.msg.rte.pkg /bin/rm -rf /Library/Receipts/xlf.rte.pkg /bin/rm -f /opt/ibmcmp/msg/en_US/xrfmsg90.cat /bin/rm -f /opt/ibmcmp/lib/libxlf*.dylib