Updated 2001/06/06

Sun WorkShop[tm] 6 update 2 Fortran 95 Readme

Contents

  1. Introduction
  2. About Sun WorkShop 6 update 2 Fortran 95
  3. New Features
  4. Software Corrections
  5. Problems and Workarounds
  6. Limitations and Incompatibilities
  7. Documentation Errata
  8. Shippable Libraries



A. Introduction

This document contains last-minute information about the release of the Sun WorkShop 6 update 2 Fortran 95 compiler. This document describes the software corrections addressed by this release and lists known problems, limitations, and incompatibilities.

For installation-related and late-breaking information about this release, see the Sun WorkShop 6 update 2 Release Notes. Information in the release notes overrides information in all readme files.

To access the release notes and the full Forte[tm] Developer/Sun WorkShop[tm] documentation set, point your Netscape[tm] Communicator 4.0 or compatible browser to the documentation index (file:/opt/SUNWspro/docs/index.html).

To view the text version of this readme, type the following at a command prompt:

   example% f95 -xhelp=readme
To access the HTML version of this readme, point your Netscape Communicator 4.0 or compatible browser to:
   file:/opt/SUNWspro/docs/index.html
Note - If your Sun WorkShop software is not installed in the /opt directory, ask your system administrator for the equivalent path on your system.
 

B. About Sun WorkShop 6 update 2 Fortran 95

This release of Fortran 95 (f95 and f90) runs on SPARC[tm] processors running Solaris[tm] SPARC Platform Edition versions 2.6, 7 and 8, and is a second update to the Sun WorkShop 6 release.

Note - Fortran on Solaris Intel IA-32 Platforms Discontinued:
Development of the Fortran compilers (f77 and f95) and the Sun Performance Library for the Solaris Intel IA-32 platform has been discontinued.  We suggest you contact  the Portland Group (http://www.pgroup.com) about their development tools for the Solaris IA-32 platform.
 


C. New Features

This section describes the new and changed features in this release of Sun WorkShop 6 update 2 Fortran 95. In addition, it lists the new features that were introduced in the Sun WorkShop 6 and Sun WorkShop 6 update 1 releases of the Fortran 95.

See also the What's New in Sun WorkShop 6 update 2, which describes all the new features in Sun WorkShop 6 and its updates. You can access this book by pointing your browser to http://docs.sun.com. Click Search Book Titles Only, and Ignore old editions, and search for "What's New."

  1. Sun WorkShop 6 update 2 New Features
  2. Sun WorkShop 6 update 1 New Features
  3. Sun WorkShop 6 New Features


  1. Sun WorkShop 6 update 2 New Features

    The Sun WorkShop 6 update 2 Fortran 95 includes the following new and changed features.

    1. ALLOCATABLE Attribute Extended
    2. VALUE Attribute from Fortran 2000
    3. OpenMP 2.0 Fortran API Supported
    4. OpenMP Library Interface
    5. Interprocedural Optimiization (-xipo)
    6. VAX Fortran Structures
    7. Stream I/O
    8. Global Program Checking
    9. Fortran Library Interface
    10. New and Changed -xtarget, -xchip Values


    1. ALLOCATABLE Attribute Extended Recent decisions by the Fortran 95 standards organizations have extended the data entities allowed for the ALLOCATABLE attribute. Previously this attribute was limited to locally stored array variables. It is now allowed on:
      • array components of structures
      • dummy arrays
      • array function results

      Allocatable entities remain forbidden in all places where they may be storage-associated (COMMON blocks and EQUIVALENCE statements). Allocatable array components may appear in SEQUENCE types, but objects of such types are then prohibited from COMMON and EQUIVALENCE. See the Fortran User's Guide appendix C.

    2. VALUE Attribute from Fortran 2000

      f95 recognizes the VALUE type declaration attribute. Specifying a subprogram dummy input argument with this attribute indicates that the actual argument is passed "by value". The following example demonstrates the use of the VALUE attribute with a C main program calling a Fortran 95 subprogram with a literal value as an argument:
       

      C code:
       #include <stdlib.h>
       int main(int ac, char *av[])
       {
            to_fortran(12);
       }
      
      Fortran code:
          subroutine to_fortran(i)
          integer, value :: i
          print *, i
          end
      
      

      See the Fortran User's Guide appendix C.

    3. OpenMP2.0 Fortran API Supported

      f95 now supports the OpenMP 2.0 API specifications for Fortran 95. Enhancements include WORKSHARE, REDUCTION for arrays, THREADPRIVATE for variables, COPYPRIVATE for SINGLE directives.

      See http://www.openmp.org/specs for the OpenMP 2.0 specifications. The OpenMP readme (in PDF) summarizes the OpenMP directives. See also the Fortran User's Guide appendix E.

    4. OpenMP Library Interface

      The compiler now provides an include file and an interface module for defining the interfaces to the OpenMP Fortran library routines. Supply either of the following statements in every program unit that references the OpenMP library to insure proper type declarations:

           INCLUDE 'omp_lib.h'
      
      or
           USE omp_lib
      

      See the Fortran User's Guide appendix E.

    5. Interprocedural Optimization (-xipo)

      This new compiler flag performs whole-program optimizations by invoking an interprocedural analysis pass. Unlike -xcrossfile, -xipo will perform optimizations across all object files in the link step, and is not limited to just the source files on the compile command.

      -xipo is particularly useful when compiling and linking large multi-file applications. Object files compiled with this flag have analysis information compiled within them that enables interprocedural analysis across source and pre-compiled program files. However, analysis and optimization is limited to the object files compiled with -xipo, and does not extend to object files in libraries.

      When compiling and linking are performed in separate steps, -xipo must be specified in both steps to be effective.

      Example, in a single compile/link step:

      f95 -xipo -xO4 -o prog  part1.f part2.f part3.f
      
      The optimizer performs crossfile inlining across all three source files. This is done in the final link step, so the compilation of the source files need not all take place in a single compilation and could be over a number of separate compilations, each specifying -xipo.

      Example, in separate compile/link steps:

      f95 -xipo -xO4 -c part1.f part2.f 
      f95 -xipo -xO4 -c part3.f
      f95 -xipo -xO4 -o prog  part1.o part2.o part3.o
      
      
      The object files created in the compile steps have additional analysis information compiled within them to permit crossfile optimizations to take place at the link step.

      A restriction is that libraries, even if compiled with -xipo do not participate in crossfile interprocedural analysis, as shown in this example:

      f95 -xipo -xO4 one.f two.f three.f
      ar -r mylib.a one.o two.o three.o
      ...
      f95 -xipo -xO4 -o myprog main.f four.f mylib.a
      
      
      Here interprocedural optimizations will be performed between one.f, two.f and three.f, and between main.f and four.f, but not between main.f or four.f and the routines on mylib.a. (The first compilation may generate warnings about undefined symbols, but the interprocedural optimizations will be performed because it is a compile and link step.)

      Other important information about -xipo:
       

      • requires at least optimization level -xO4.
      • conflicts with -xcrossfile. If used together will result in a compilation error.
      • objects compiled without -xipo can be linked freely with objects compiled with -xipo.

      In this release crossfile subprogram inlining is the only interprocedural optimization performed by -xipo. See the Fortran User's Guide chapter 3.

    6. VAX Fortran Structures

      To aid migration of programs from f77, f95 accepts VAX Fortran STRUCTURE and UNION statements, a precursor of Fortran 95 "derived types". See the Fortran User's Guide, appendix C.

    7. Stream I/O

      Another feature proposed for Fortran 2000 is a new "stream I/O" scheme, which treats a data file as a continuous sequence of bytes, addressable by a positive integer starting from 1. Enable stream I/O by declaring a file with ACCESS='STREAM'. Position files with READ or WRITE statements with the POS=integer_expression specifier. See the Fortran User's Guide, appendix C.

    8. Global Program Checking

      Invoked by the -Xlist options, GPC on f95 now looks more like f77, and includes suboptions -Xlistc -Xlisth -Xlists -Xlistvn and -Xlistw[n]. See the Fortran User's Guide, chapter 3.

    9. Fortran Library Interface

      f95 recognizes the include file system.inc for declaring the proper data types for the Fortran library. Supply the statement INCLUDE 'system.inc' in every routine that references non-intrinsic Fortran library routines to insure proper typing of return values. See the Fortran Library Reference.

    10. New and Changed Values for -xchip and -xtarget

      The -xchip option now accepts the value ultra2e for specifying the UltraSPARC IIe processor.

      Also, the implied -xarch setting for the following -xtarget values has changed from v8 to v8plusa:

      • entr2/1170
      • entr2/1200
      • entr2/2170
      • entr2/2200
      • entr3000
      • entr4000
      • entr5000
      • entr6000
      • ultra
      • ultra/140
      • ultra/170
      • ultra/200
      • ultra2
      • ultra2/1170
      • ultra2/1200
      • ultra2/1300
      • ultra2/2170
      • ultra2/2200
      • ultra2/2300
      • ultra2e
      • ultra2i
      • ultra3


  2. Sun WorkShop 6 update 1 New Features

    Sun WorkShop 6 update 1 Fortran 95 included the following new and changed features.

    1. UltraSPARC[tm] III Support
    2. Support for int2
    3. Mixed-Language Linking with -xlang
    4. Prefetch added to -fast

    1. UltraSPARC III Support

      The -xtarget and -xchip options now accept ultra3, and the compiler will generate optimized code for the UltraSPARC III processor.  Compile with the following flags when compiling and running on an UltraSPARC III platform: -fast -xcrossfile

      The -fast option automatically selects the proper options when running on an UltraSPARC III platform.

      For cross-compilation (compiling on a platform other than UltraSPARC III but generating binaries intended to run on an UltraSPARC III processor) , add:

            -xtarget=ultra3  -xarch={v8plusb|v9b}

      (Use -xarch=v9b to compile for 64-bit code generation.)

      Note that programs compiled specifically for the UltraSPARC III platform with -xarch={v8plusb|v9b} will not operate on platforms other than UltraSPARC III. Use -xarch={v8plusa/v9a} to compile programs to run compatibly on UltraSPARC I, II, and III.

      Performance profiling, -xprofile={collect:|use:}, is particularly useful on the UltraSPARC III platform by enabling the compiler to identify the most frequently executed sections of code and perform localized optimizations to best advantage.

    2. Support for the  int2 Intrinsic:

      The Fortran 95 (and Fortran 77) compilers now support the int2 intrinsic for conversion of data types to 2-byte integer. Use of int2 as an intrinsic ( M=int2(J) ) appears in many legacy Fortran 77 codes, and is implemented in the Fortran 95 compiler for compatibility. int  is the preferred  Fortran 95 standard intrinsic ( M=int(J,2)).

    3. Mixed-Language Linking with -xlang:

      The new -xlang option provides an easy way to link object files and libraries compiled by f77 with f95 object files. The proper runtime environment is insured when using -xlang.
      % f95 -o myprog -xlang=f77 myprog.o myf77sub.o
      When linking C++ and Fortran 95 and/or Fortran 77 object files, link with the C++ compiler and specify -xlang=f95. (See the C++ man page CC(1) for details.)

    4. Prefetch added to -fast:

      The -xprefetch flag has been added to the -fast  option set. -fast automatically sets a number of optimization flags for best execution speed on the compiling platform. Adding -xprefetch takes advantage of the UltraSPARC II and III prefetch mechanism, and can add a substantial performance gain in code with loops that process data.



  3. Sun WorkShop 6 New Features

    The Sun WorkShop 6 Fortran 95 included the following new and changed features.

    1. Compliance
    2. New Command
    3. File Extensions
    4. Debugging Optimized Code
    5. F77 Flags
    6. New Flags
    7. OpenMP
    8. Interval Arithmetic Extensions
    9. FORM="BINARY" I/O Extension
    10. Cray-Style Parallelization Directives
    11. Enhanced Array Optimizations
    12. Sun WorkShop Online Help

    1. Compliance:

      The Fortran 95 compiler is fully compliant with the Fortran 95 standard.

    2. New Command:

      The Fortran 95 compiler is invoked by both the f90 and f95 command. The f95 command is new. f90 is equivalent to f95.

    3. File Extensions:

      The compiler will accept source files with .f95 and .F95 extensions as well as .f90 and .F90

    4. Debugging Optimized Code:

      The restrictions on compiling with -g have been relaxed so that it is now possible to compile at -O4 and -O5 and/or any of the parallelization flags (-parallel, -explicitpar, -autopar) with debugging (-g).

    5. F77 Flags:

      Most of the Fortran 77 compiler, f77, compiler flags are now implemented in f95/f90.  See the f95 man page for details. These include:

      • -erroff  turn off selected error messages
      • -errtags  display error messages with tags
      • -ext_names  create external names with/without underscores
      • -fpp       specify source code preprocessor
      • -loopinfo   show which loops parallelized
      • -sbfast  produce browser table information
      • -silent  suppress compiler messages
      • -U   allow lower and upper case
      • -u   imply IMPLICIT NONE
      • -xcrossfile  enable optimization across files
      • -xF  allow function-level reordering for Analyzer
      • -xinline     compile functions inline
      • -xtypemap  specify default data sizes
      • -xprefetch     allows automatic and explicit generation of prefetch instructions on UltraSPARC platforms (-xprefetch=explicit enables new $PRAGMA SPARC_PREFETCH directives).

       
    6. New Flags:

      The following new flags are implemented in f95/f90:

      • -aligncommon      align common block elements to specified byte boundaries
      • -mp=openmp      accept OpenMP directives
      • -openmp              macro combination of options for OpenMP parallelization
      • -r8const                promote single-precision constants to REAL*8
      • -xia           enable interval arithmetic environment
      • -xinterval    enable processing of interval arithmetic extensions
      • -xmemalign   specify general alignment of data elements
      • -xrecursive    allow recursive calls without RECURSIVE attribute

       
    7. OpenMP:

      This release of Fortran 95 implements the OpenMP interface for explicit parallelization, including a set of source code directives, run-time library routines, and environment variables. Preliminary documentation describing the OpenMP directives accepted by Fortran 95 appears in the Fortran User's Guide. This information also appears as a PDF file in the READMEs directory, omp_directives.pdf . The OpenMP specifications can be viewed at http://www.openmp.org/  (Parallelization features require a Forte Developer for HPC license.)

    8. Interval Arithmetic Extensions:

      This release of Fortran 95 also implements extensions for interval arithmetic computation. See the Fortran 95 Interval Arithmetic Programming Guide,  and the interval arithmetic Readme file.

    9. FORM="BINARY" I/O Extension:

      Specifying this new option in an OPEN(..) statement causes the file to be treated as a sequential binary (unformatted) file with no record marks. This enables data to be written and read as a continuous stream of bytes, and provides compatibility with other vendor systems. It is implemented in both the Fortran 95 (f95/f90) and Fortran 77 (f77) compilers.

       Effect of FORM="BINARY" on I/O operations:

      • WRITE statement: Data is written to the file in binary, with as many bytes transferred as there is specified in the output list.
      • READ statement: Data is read into the variables on the input list, with as many bytes transferred as demanded by the list. Because there are no record marks on the file, there will be no "end-of-record" error detection. The only error detected is end-of-file, or abnormal system errors.
      • INQUIRE statement: INQUIRE on a file opened with FORM="BINARY" returns:

        FORM="BINARY"
        ACCESS="SEQUENTIAL"
        SEQUENTIAL="YES"
        DIRECT="NO"
        FORMATTED="NO"
        UNFORMATTED="YES"
        RECL= and NEXTREC= are undefined.

      • BACKSPACE statement: Not allowed - returns an error.
      • ENDFILE statement: Truncates file at current position, as usual.
      • REWIND statement: Repositions file to beginning of data, as usual.

    10. Cray-Style Parallelization Directives:

      The AUTOSCOPE qualifier has been implemented with Cray-style directives.

    11. Enhanced Array Optimization:

      The compiler performs aggressive array optimizations at levels -O4 and -O5.

    12. Sun WorkShop online help

      now interprets f95 error diagnostics in the Building window. Like C compiler error diagnostics, these f95 error messages have hyperlinks to help pages that explain the diagnostic message.


D. Software Corrections

Many of the problems reported with previous releases of the Fortran 95 compiler have been corrected in this release.
 


E. Problems and Workarounds

This section discusses the following software bugs that could not be fixed in time for this release. For updates, check Forte Developer Products Hot News , http://www.sun.com/forte/developer/, and the database of freely available software patches on http://access1.sun.com/.

  1. OpenMP and etime()
  2. Passing character pointers in derived types
  3. Internal Error on derived types with SEQUENCE
  4. The value of SIGN(X,-0.)
  5. -Xlist not checking sizes
  6. Unused routines get dbx warnings
  7. Assigning statement labels in internal subroutines
  8. Formatted write can occasionally damage data in the heap
  9. -Xlist gives wrong diagnostics
  10. DBX "whatis" on Generic Functions
  11. Explicit Parallelization With OpenMP, Sun, or Cray Directives
  12. Declaring OpenMP Support Functions
  13. Misplaced C$PAR Directives Causes Error
  14. f95 vs. f77 Handling of Direct Access I/O
  15. Use of TRANSPOSE With MATMUL
  16. Loops with bounds expressions
  17. ASSIGNed FORMATs and -xarch=v9
  18. Parallelization and unlimited stacksize
  19. Complicated VAX structures
  20. OpenMP 2.0 Known Problems
  1. OpenMP and etime():

    As documented, the Fortran library function etime(3f) checks the PARALLEL environment variable, but not the OMP_NUM_THREADS variable. This can give surprising results to OpenMP users who set the OMP_NUM_THREADS environment variable only. Run OpenMP programs with both PARALLEL and OMP_NUM_THREADS environment variables set to the same value. (4432799)

  2. Passing character pointers in derived types:

    The compiler may pass the wrong length when the argument to a subprogram is a character pointer that is a component of a derived type:

            type generic_type
            character*30, pointer :: name(:)
            end type generic_type
    
            type (generic_type) generic
            allocate(generic%name(10))
    
            call sub(generic%name)
    
    
    (4434212)

  3. Internal Error on derived types with SEQUENCE:

    Some correct codes containing derived types with a SEQUENCE statement cause an Internal Error diagnostic when compiled with certain options. Try removing the SEQUENCE statement or compiling with different options. (4448683)

  4. The value of SIGN(X,-0.):

    The intrinsic function SIGN gives the wrong value (for Fortran 95) when the second argument is a negative zero. The F95 standard now requires that a negative result be returned in this case, whereas the F90 standard required a positive result. (4436909)

  5. -Xlist not checking sizes:

    -Xlist does not check for common blocks and records that are too large for the compiler. (4441297)

  6. Unused routines get dbx warnings:

    When a routine appears in an interface but is not used, the debugger incorrectly warns that it can't find the function symbol:

            interface bar
                subroutine never_used()
                end subroutine never_used
            end interface bar
            print *, 'hello world'
            end
    
        (dbx) dbx: warning: Can't find function symbol for 'never_used_' :
    
    
    A workaround is simply to ignore the warnings. (4429931)

  7. Assigning statement labels in internal subroutines:

    When an internal subroutine assigns a FORMAT statement label to an integer that is local to the containing program, and an attempt is made to use the variable in a different internal subroutine, the program may fail at runtime with a segmentation fault. The recommendation is to rewrite codes in strict compliance with section 9.4.1.1 in the Fortran 95 standard, requiring that a FORMAT statement appear in the same scoping unit as the statement referencing the FORMAT specifier. (4439038)

  8. Formatted write can occasionally damage data in the heap:

    Under some rare circumstances, a formatted write can damage data in the heap:

        pointer (pa, a)
            open(10, file="data")
    
            i = 0
            write (10, 10) i, real(i), cmplx(i)
    
            pa = malloc(4)
            a = 12.0
            print *, a, pa
            do i = 1, 250
               write (10, 10) i, real(i), cmplx(i)
               call flush(10)
               print *,i, a, pa
            enddo
    10      format(i5, 3f20.2)
            print *, a, pa
            end
    
    
    Workaround is to avoid the combination of Cray pointers, formatted write, and explicit call to flush(). (4446899)

  9. -Xlist gives wrong diagnostics:

    -Xlist produces wrong diagnostics when an array section is used as an actual argument. Here's an example:

        subroutine sub(A)
        integer A(:)
        end
    
        interface
        subroutine sub(A)
        integer A(:)
        end subroutine sub
        end interface
    
        integer B(10)
        call sub(B(2:3))
        end
    
    
    The code is perfectly legal, but an incorrect -Xlist diagnostic appears in the listing file:
        12          call sub(B(2:3))
                    ^
    **** ERR  #323:  argument #1 is expression, but dummy argument is array
    
    
    (4431479)

  10. DBX "whatis" on Generic Functions:
    The dbx whatis command on generic functions does not give information on the specific functions. (4347207)
     
  11. Explicit Parallelization With OpenMP, Sun, or Cray Directives:

    Calling a contained subprogram from within a parallel region does not function correctly. Here is a simple example demonstrating this situation, using OpenMP directives:

            program main
            call sub
            end program main
    
            subroutine sub
            real a(100), s, t1, t2
            integer i
            do i = 1,100
                    a(i) = i
            enddo
            s = 32
            t1 = 1
            t2 = 3
    !$omp parallel shared(a) private(s)
            call sub1(a, s)
    !$omp end parallel
            print *,' a = ', a
            contains
            subroutine sub1(b, t3) 
            real b(:), t3
            integer i
            integer omp_get_thread_num
    !$omp do
            do i = 1,size(b)
                    b(i) = omp_get_thread_num() + t3
            enddo
    !$omp end do
            print *,omp_get_thread_num(),'t1 = ', t1, ' t2 = ', t2, 
         &  't3 = ', t3, ' s = ', s
    !$omp critical
            t1 = t1+1
    !$omp end critical
            end subroutine sub1
            end subroutine sub
    
    Here sub1 is a procedure contained in subroutine sub, and called within a parallel region in sub. Although this is perfectly legal Fortran 95, currently the compiler emits the following error message
    "ERROR: A call to an internal procedure is illegal within a parallel region."
    
    
    (4306893)

  12. Declaring OpenMP Support Functions:

    Certain standard OpenMP support functions were treated incorrectly in the Sun WorkShop 6 compiler release as intrinsics. This bug has been fixed in the Sun WorkShop 6 update 1 and update 2 releases. However, this might mean that some codes that were incorrectly written but ran using the previous compiler could stop working with this release. (Recall that intrinsic functions need not be explicitly typed.) With this release of the f95 compiler, explicit declarations of the OpenMP external functions are required.

    The include file omp_lib.h, and interface module omp_lib are provided to insure these external declarations are made correctly. See the Fortran User's Guide, appendix E, for details.

  13. Misplaced C$PAR Directives Causes Error:

    In some cases a fixed-format C$PAR directive placed a few lines above a  DO loop can cause an internal compiler error. Place the directive immediately above the DO loop to which it applies.

  14. f95 vs. f77 Handling of Direct Access I/O:

    There is a difference between the way f77 and f95 handle record overflow writing direct access files. The f77 compiler will overwrite records following the record directly addressed. However, the f95 compiler will generate a runtime Error 1010 - record too long. This means that a common practice used in some f77 programs to open a file for direct access with RECL=1 and treating it as a binary file (an unformatted file with no explicit record structure) does not work with f95. The suggested workaround to achieve this is to open the file as a sequential file with FORM=BINARY. (4367635)

  15. Use of TRANSPOSE With MATMUL:

    With optimization levels -O3 or higher, use of the TRANSPOSE intrinsic as an argument to a MATMUL instrinsic call may cause incorrect results if the argument to TRANSPOSE is an array, or array expression, whose first dimension is not the same size as its second dimension. (4459066).

  16. Loops with bounds expressions:

    Sometimes f95 may fail to compile a small DO loop containing only assignment statements where the loop bounds are expressions that could overlap the left-hand side of the statements in the loop. For example

          SUBROUTINE sub(a,b)
    
          INTEGER a(0:10000,0:2000),b(0:2000)
          INTEGER i,nr
    
              DO nr=1,m
                DO i=b(0)+1,b(0)+a(0,nr)
                  b(i)=a(i,nr)
                ENDDO
                b(0)=b(0)+a(0,nr)
              ENDDO
    
          RETURN
          END
    
    A workaround is to compile at optimization -O2 or lower, or rewrite the DO loop by using temporary variables as the loop bounds. (4461100).

  17. ASSIGNed FORMATs and -xarch=v9:

    The following program involving ASSIGNED FORMATs does not run if compiled with -xarch=v9 -xO2. The program is not standard conforming because a format is assigned in the main program but the assigned format is used in an internal subroutine. But this fact is not diagnosed. (In Forte Developer 6 update 1 it did not compile.)

     
    program IDATATR
       assign 40 to IFMT
       call sub1
    40 format(4(e30.20))
    
    contains
    
       subroutine sub1
         assign 40 to IFMT
         call sub5
    40   format(4(e60.50))
       end subroutine sub1
    
      subroutine sub5
        write(unit=6, fmt = IFMT) 5.6
        stop
      end subroutine sub5
    end program  IDATATR
    
    (4439038).

  18. Parallelization and unlimited stacksize:

    There have been reports that some parallel programs perform better when stacksize is not unlimited. That is,

       % limit stacksize unlimited
    
    may not work as well as
       % limit stacksize 8196
    
    These reports were not fully investigated at "press time", and you should want to check the release notes to see if there is any further information. (4463458).

  19. Complicated VAX structures:

    Vax structures is a new feature in the f95 compiler. However, some complicated nested Vax structures can confuse the compiler. For example, compiling

          STRUCTURE /STR3/ 
            STRUCTURE R
             STRUCTURE Z
                REAL*8 X
             END STRUCTURE
            END STRUCTURE
          END STRUCTURE
          END
    
    produces the internal compiler error message
    Assertion failed: type == Integer, file ../srcfw/FWio.c, line 1940
    
    (4465612).

  20. OpenMP 2.0 Known Problems

    The following are known problems with Fortran 95 OpenMP 2.0 in this release of Forte Developer 6 / Sun WorkShop 6 update 2:

    1. Allocatable, dynamic array in copyprivate clause.
      An allocatable, dynamic array in subroutine that appears in a copyprivate clause causes program to fail at runtime.
         
         Example code:
         
            subroutine sub(n)
            integer n
            real, dimension(:), allocatable :: a
            
            allocate (a(n))
            
      !$omp single
            a = 22
      !$omp end single copyprivate (a)
      
            print *, loc(a), a 
            deallocate (a)
            end subroutine sub
      
            program main
      
      !$omp parallel      
            call sub (10)
      !$omp end parallel      
            end
      
      copyprivate(a) in the above example should broadcast all elements of the array a (belonging to the thread that executes single) to other copies of a.

      Currently such an example fails at runtime with incorrect results or a segmentation fault. (4417729)

    2. Assumed-shape arrays:
      Assumed-shape arrays cannot be declared PRIVATE, FIRSTPRIVATE, LASTPRIVATE, or COPYPRIVATE. If an assumed-shape array is declared PRIVATE, FIRSTPRIVATE, or LASTPRIVATE, the compiler issues an error message. If an assumed shape array is declared COPYPRIVATE, the program produces incorrect results at runtime. (4418961)

    3. WORKSHARE within FORALL:
      Use of an array assignment in the body of a WORKSHARE construct contained within a FORALL constuct can lead to incorrect results or segmentation fault at runtime. (4448831)

    4. WORKSHARE within PARALLEL dynamic extent:
      A WORKSHARE construct in the dynamic extent (but not the lexical extent) of a PARALLEL construct may fail at runtime if the WORKSHARE construct contains the RESHAPE intrinsic, or involves an array reduction function (such as SUM.) (4433878, 4433331)

    5. ORDERED parallel DO with negative loop step:
      The ORDERED directive might not work correctly if the loop step is negative, as in the following example:
      
              PROGRAM P
      !$OMP PARALLEL DO ORDERED
              DO I = 3, 1, -1
      !$OMP ORDERED
                 PRINT *, I
      !$OMP END ORDERED
              END DO
              END PROGRAM P
      
      
      Incorrect results or an infinite loop might occur. (4458791)

    6. Nested sections bound to different parallel directives:
      The compiler may incorrectly parse nested sections bound to different parallel directives, as in the following example:
      
            REAL CX, CY, CZ 
            REAL X(N), Y(N), Z(N)
      
            CX = 0.1
            CY = 0.2
            CZ = 0.3
            X = 1
            Y = 2
            Z = 3
      
      !$OMP PARALLEL
      !$OMP SECTIONS
      !$OMP   SECTION
      !$OMP     PARALLEL
      !$OMP       SECTIONS 
      !$OMP         SECTION
                      X = X + CX
      !$OMP         SECTION
                      Y = Y + CY
      !$OMP       END SECTIONS
      !$OMP     END PARALLEL
       
      !$OMP   SECTION
                Z = Z + CZ
      !$OMP END SECTIONS NOWAIT
      !$OMP END PARALLEL
      
            END
      
      
      The compiler incorrectly issues error messages about the nesting of the PARALLEL and SECTIONS directives. (4458787)

F. Limitations and Incompatibilities

This section discusses the following incompatibilities between the Sun WorkShop 6 update 2 Fortran 95 Compiler and previous releases.


G. Documentation Errata


H. Shippable Libraries

If your executable uses a Sun dynamic library listed in the file named below, your license includes the right to redistribute the library to your customer.

/opt/SUNWspro/READMEs/runtime.libraries     in a standard install of Sun WorkShop

You may not redistribute or otherwise disclose the header files, source code, object modules, or static libraries of object modules in any form.

The License to Use appears in the End User Object Code License, viewable from the back of the plastic case containing the CDROM.


Copyright 2001 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303, U.S.A. All rights reserved.

Sun, Sun Microsystems, the Sun logo, docs.sun.com, and Solaris are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S. and other countries.