HP Fortran for HP-UX v2.9 Release Note Manufacturing Part Number: 5991-0697 E1204 U.S.A. © Copyright 1979-2004 Hewlett-Packard Development Company, L.P.
Legal Notices The information in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material. Warranty.
HP Fortran for HP-UX v2.9 Announcement 1 HP Fortran for HP-UX v2.9 Announcement HP Fortran for HP-UX is a modern, powerful mathematical and scientific language that supports array-handling, data-abstraction, and data hiding. This Release Note describes HP Fortran for HP-UX v2.9. HP Fortran v2.9 is supported on Hewlett-Packard servers and workstations running HP-UX 11i Version 2.0 operating systems for PA-RISC and Itaniumâ-based systems. HP Fortran v2.9 supports both 32- and 64-bit addressing.
HP Fortran for HP-UX v2.9 What’s in This Version What’s in This Version The HP Fortran v2.9 compiler has been significantly enhanced with many Tru64 Fortran features (detailed below). Additionally, a new and improved high-level optimizer was added. Compile-time performance is expected to improve for source files that experienced large slow down in compilation speed at optimization level +O3. In addition, Fortran v2.
HP Fortran for HP-UX v2.9 What’s in This Version +cfc The +cfc flag has been added to the Fortran compiler. +cfc allows you access to the newly-implemented Tru64 Fortran options.You can call them in one of two ways: /opt/fortran90/tru64/f90 opt/fortran90/bin and then place +cfc in the command line It is important to note that +cfc requires the following runtime library patches to function properly: • PHSS_31970—liblO77 11.22/11.23 0409 • PHSS_31971—libcl 11.11 • PHSS_31972—libcl 11.
HP Fortran for HP-UX v2.9 What’s in This Version • Modifed EPC to allow for finer-grained control of alignment attributes for COMMONs, record fields, and SEQUENCE derived types (previously, these could not be specified individually). • Modified BRIDGE to allow U2 unaligned record field subtypes to be emitted in 2, 4, and 8 byte record modes (previously only done for packed fields).
HP Fortran for HP-UX v2.
HP Fortran for HP-UX v2.9 What’s in This Version Additionally, the following defaults for Tru64 mode were changed: • +U77 always on • locals on stack (+save) • +nopadsrc • -altparam For a complete list of the Tru64 options, please refer to the f90(1) man page. Other new or revised directives/options The following reflects recent changes/additions to directives and options: +O[no]failsafe • • This option is now supported for the Itaniumâ processor family.
HP Fortran for HP-UX v2.9 What’s in This Version The IVDEP directive is applied to a DO loop in which the user knows that dependences are in lexical order. For example, if two memory references in the loop touch the same memory location and one of them modifies the memory location, then the first reference to touch the location has to be the one that appears earlier lexically in the program source code. This assumes that the right-hand side of an assignment statement is earlier than the left-hand side.
HP Fortran for HP-UX v2.9 What’s in This Version -ipo (For Itanium â-based systems only) Enables interprocedural optimizations across files. Object files produced using this option contain intermediate code in IELF format. At linke time, ld automatically invokes the interprocedural optimizer u2comp if any of the input object files is an IELF file. This option is ignored at optimization levels +O1 and +O2. It is enabled by default when +O4 or +Ofaster are used.
HP Fortran for HP-UX v2.9 What’s in This Version +DOosname • Sets the target operating system for the compiler. • Intended for enabling optimizations that are not backward compatible. • Can be used at any level of optimization. • PA-RISC—based system recognized values for osname are 11.0 and 11.0EP9806. Itaniumâ—based system recognized values for osname are 11.20, 11.22, and 11.23. +DOosname selects optimizations that are compatible with operating system version osname and later.
HP Fortran for HP-UX v2.9 What’s in This Version • !$HP$ OPTIMIZE level 2 on • !$HP$ OPTIMIZE level 1 off • !$HP$ OPTIMIZE level 0 off • !$HP$ OPTIMIZE level 2 off • !$HP$ optimize assume_no_parameters_overlaps on • !$HP$ optimize assume_no_parameters_overlaps off â Binary I/O Conversions (for Itanium —based systems) This feature enables the specification of a binary conversion to happen to all unformatted sequential data on reads and writes to various units.
HP Fortran for HP-UX v2.9 What’s in This Version Specifying a binary conversion There are three ways to specify what file/unit should be converted, and which conversion to apply (in priority, with highest priority listed first): • Environment variable: “FORT_CONVERT” • Environment variable: “FORT_CONVERT”—all I/O units • Argument to OPEN: “CONVERT=” Typically, code is written via the CONVERT=argument to OPEN and INQUIRE.
HP Fortran for HP-UX v2.9 What’s in This Version Then compile with: /opt/fortran90/bin/f90 foo.f -lunalign +noppu If you need to drop the +noppu, then add an alias directive as follows: !$HP$ALIAS allow_unaligned_data_access=’allow_unaligned_data_access’ PROGRAM bs30 INTEGER*2 i2(10) INTEGER*4 i4 EQUIVALENCE (i2(2), i4) DATA I4 /z’FFFF0000’/ i4=12 call allow_unaligned_data_access() print *,i4 END Then compile with: /opt/fortran90/bin/f90 foo.
HP Fortran for HP-UX v2.9 What’s in This Version More information Complete information about this feature is available in the Parallel Programming Guide for HP-UX Systems. Linking HP Fortran 90 routines When calling HP Fortran 90 routines on the HP 9000 Series 700/800, you must include the appropriate run-time libraries by adding certain arguments to the aCC command when linking your program.These arguments depend on how the Fortran 90 routines were compiled. 32-bit PA-RISC 1.
HP Fortran for HP-UX v2.9 What’s in This Version A significant advantage of HP Caliper is that it requires no special compilation, link options, or libraries for your Itanium-based programs.
HP Fortran for HP-UX v2.9 Documentation error—I/O Formatting Documentation error—I/O Formatting A documentation error was found on page 225 of the HP Fortran Programmer’s Reference (part number B3908-90006).
HP Fortran for HP-UX v2.9 Known Problems and Workarounds Known Problems and Workarounds This section details known problems and workarounds for HP Fortran. • When very large arrays are declared to be local to a subroutine, the arrays are privatized. This means that the arrays are allocated in stack space.Workaround: The default stack size for an OPENMP thread is 8 megabytes. This can be changed by setting the environment variable CPS_STACK_SIZE.
HP Fortran for HP-UX v2.9 Known Problems and Workarounds • When creating 64-bit shared executables (such as when +DD64 is specified) the +Z option is on by default. The +Z option (equivalent to +pic=long) is the only PIC option supported for 64-bit executables. If the +z option (equivalent to +pic=short) is specified when creating 64-bit code, it instead maps to +Z.
HP Fortran for HP-UX v2.9 Known Problems and Workarounds Workaround: To avoid this, use +O2 optimization instead of +O3.
HP Fortran for HP-UX v2.9 Restrictions in HP Fortran Restrictions in HP Fortran This section lists restrictions you should observe when using the HP Fortran compiler and when using HP Fortran language features in your programs. +FPI +FPI will not work when calling any type of runtime libraries or intrinsics. Object files generated at optimization level 4 Object files generated by the compiler at optimization level 4, called intermediate object files, are intended to be temporary files.
HP Fortran for HP-UX v2.9 Restrictions in HP Fortran To parallelize your code, use another directive such as loop_parallel. In loops defined with NODEPCHK, we recommend that you not invoke parallelism.
HP Fortran for HP-UX v2.9 System Compatibility Information and Installation Requirements System Compatibility Information and Installation Requirements This section describes system requirements for the installation and running of HP Fortran v2.9. Software requirements The HP Fortran v2.9 compiler requires approximately 264 megabytes (MB) of disk space. This includes approximately 172 MB for the compiler, with remaining space for other components such as the debuggers.
HP Fortran for HP-UX v2.9 System Compatibility Information and Installation Requirements • B3907DB—HP Fortran Workstations • B3909DB—HP Fortran Servers To display the product number and the release version of your HP Fortran compiler, execute this HP-UX command: what /opt/fortran90/bin/f90 Specifying the +version option (entering f90 +version) displays compiler version information to standard output without compiling.
HP Fortran for HP-UX v2.9 Current Fixes Current Fixes This section describes issues that have been resolved in this version of HP Fortran v2.9: â Itanium -based platforms The following current resolutions are for Itaniumâ-based systems: PHSS_31323 (11.22)/PHSS_31324 (11.23) • When writing dictionary records to an output module dictionary, name table pointers such as idref were replaced with md string pointers.
HP Fortran for HP-UX v2.9 Current Fixes • Wrong code was generated when parentheses were around a character string variable that was a parameter to a subroutine/function. • The compiler aborted when various dictrec entries were left without types. • Radix aborted when used in a write statement.
HP Fortran for HP-UX v2.9 Previous Fixes Previous Fixes The following subsections, “Fortran90 on Itanium-based platforms” and “Fortran90 on HP-UX/PA-RISC”, describe issues that were resolved in previous versions of HP Fortran for HP-UX: â Fortran90 on Itanium -based platforms The following list describes problems that were fixed in previous versions of HP Fortran for Itaniumâ-based platforms. PHSS_31013 (11.22)/PHSS_31014 (11.23) • It was impossible to handle variables that were visible via modules.
HP Fortran for HP-UX v2.9 Previous Fixes • Calling a generic intrinsic with an INTEGER*2 argument now calls the INTEGER*2 version of the intrinsic and if necessary, interprets other arguments that are constants as INTEGER*2 constants. • There was a syntax error when the imaginary part of a complex constant ended with a space. • Wrong answers were received from Cray targets as DO loop bounds and high optimization levels. • Ucode-2 from int2 + iand(int2,int4) was incorrect.
HP Fortran for HP-UX v2.9 Previous Fixes • The message on promotion of Cray pointers to integers was clarified. • Real*16 arguments were not accepted for the sngl intrinisic. • Passing an array structure component as an argument to a subroutine or intrinsic caused a compiler assertion when the array had a rank greater than one. PHSS_30277/PHSS_30559 (11.22) and PHSS_30278/PHSS_30560 (11.23) • Math inlining was suppressed for outlined parallel/workshare regions.
HP Fortran for HP-UX v2.9 Previous Fixes • SPECcpu2000 occasionally failed to collect the flow.data file. • There was a performance loss of implementation of a matrix multiplication. • Occasionally, there was a compiler internal error with OMP PARALLEL PRIVATE equivalence variables. • A module with a declared zero size would abort with +DD64. • The compiler occasionally asserted in FE. • There was a compiler abort with CHARACTER, POINTER, and DIMENSION initialized fields.
HP Fortran for HP-UX v2.9 Previous Fixes • An enhancement was made for +DD64 technical applications. PHSS_29295 (11.22) • Oversubscripting of common array (invalid source) yielded wrong answers at high optimization levels. • Wrong answers were received at +O3. • There were issues with POINTER arrays. • Declaring _F90_F_STOP did not return. • SPECcpu2000 code failed to collect flow.data file. • Performance loss of implementation of a matrix multiplication.
HP Fortran for HP-UX v2.9 Previous Fixes PHSS_28487 • The compiler appeared to be generating extra local variables, as evidenced by looking at the stack in the debugger. • The compiler aborted, error 8901, with -g on a structure with unions. • When compiling some f90 codes with +O3 +Oopenmp, the compiler occasionally asserted after inlining a routine that was passed a record containing a dope vector. • There was an internal compiler error at +O2.
HP Fortran for HP-UX v2.9 Previous Fixes • There sometimes was a segmentation violation during cloning of a vararg routine. • When compiling a file not in the current directory with +cpp_keep, the filename given in error and warning messages may be incorrect. • +Oparallel disables speculative loads in parallel regions. • Default cpp options were identical between PA and IA; they should be different. • When using +asm/-S in combination with +P/+Oprofile, +asm/-S were occasionally ignored.
HP Fortran for HP-UX v2.9 Previous Fixes • Compiling with +Oparmsoverlap resulted in low level optimizer failure. • The loop unroll factor was not being honored on loops which are inlined or cloned. • Compiling with +Ofenvaccess resulted in compiler abort. • The directive c$dir sync_routine was ignored with a warning if +Oopenmp was used. It should be supported regardless of optimization levels. • The compiler did not catch illegal parameters on a deferred shape array.
HP Fortran for HP-UX v2.9 Previous Fixes • The compiler occasionally aborted when named parameters were used in some calls. PHSS_26864 • The SIGXCPU signal did not abort programs that had the UNIX95 environment variable set when the programs were linked. • The compiler generated an error message for read(f(),*) when f was a character function. • The compiler generated an error message for a labelled ENDDO statement. • Traceback information did not always output when the compiler aborted.
HP Fortran for HP-UX v2.9 Previous Fixes PHSS_26378 • Occasionally there were extremely long (infinite) compiles on case statements. • When using allocatable arrays embedded in a f90 record type, the program would bus error or seg fault during the program execution. • The compiler aborted when -g was specified with union map regions containing only one component. • The program received wrong answers at +O2. • GDB could not stop at the end of a program due to missing SLT entry.
HP Fortran for HP-UX v2.9 Previous Fixes • A wrong answer was received at optimization level +O2 due to use of EQUIVALENCE. • A wrong answer was received at optimization level +O2 when using the LOC intrinsic. • The compiler was slow to compile case selectors with a range. • The compiler issued a bogus error. • The compiler generated wrong answers in wide mode at optimization level +O3 when using integer*8 induction variables.
HP Fortran for HP-UX v2.9 Previous Fixes • The compiler reported the wrong line number in error messages when the -I include path is used. • The compiler gave incorrect results for integer*1. • The compiler aborted compiling set_num_threads call using +autodbl in 64-bit mode. • The compiler issued an error 300 message when compiling a generic function.
HP Fortran for HP-UX v2.9 Previous Fixes • The compiler aborted with a low-level optimizer message • The compiler was changed to suppress errors for c$doacross, c$$, *$$, and !$$. • The compiler emitted a warning for an OMP parallel directive. • The compiler aborted when a module was used multiple times within the same source file. • The compiler issued an error message for c$$$. • The compiler generated a missing label assertion on Open MP code.
HP Fortran for HP-UX v2.9 Previous Fixes • There was occasionally excessive compile time for data statements that create large initialized arrays. • +Ostore_ordering was not being honored. • Exact +cat option placement on command line changed behavior. • Empty directive nests were not being supported. • The omp_set_num_threads intrinsic did not behave as expected. • There were problems with -exec/-dynamic/-minshared interactions. • There was a +DD64 assigned format compiler abort.
HP Fortran for HP-UX v2.9 Previous Fixes • Externally declared omp callables were not getting the right linkages. • There was an assert on an unexpected DLABEL. • OMP callables required treatment as external rather than intrinsic. • Reduction on subtract incorrectly subtracted. • There was a memory corruption on large OMP codes. • There was an occasional problem with automatic arrays privatized in parallel region. • Some OpenMP reductions were not recognized as valid.
HP Fortran for HP-UX v2.9 Previous Fixes • Occasionally, inlined code created a situation where loop recognition failed to recognize a perfect nest, thereby disabling a critical interchange. The HLO loop recognition phase has been improved to handle such cases. • Previously, +i8 +O2 caused an infinite loop in the compiler. • Using +i8 and +O2 occasionally resulted in an internal error with the Fortran compiler.
HP Fortran for HP-UX v2.9 Previous Fixes • -g +objdebug now works in the same manner as +objdebuf -g so that +objdebug takes precedence. • The compiler would occasionally run out of memory at optimization level +O3. • SELECT CASE statements with REAL*4 ranges/values failed when +autodbl4 used. • Explicit double precision constants (3.0D4) were corrupted when +autodbl was specified. • The ADJUSTL intrinsic returned wrong answers when its argument was a parenthesized character constant.
HP Fortran for HP-UX v2.9 Previous Fixes • All of the compiler directive code has been reimplemented. Many observed and undiscovered bugs with memory class and loop-based directives have been fixed. • An unsubscripted integer array used as a FORMAT is now assumed to be a character string format, and not an ASSIGN statement format. • Zero-length character type array constructors caused an internal error. • The ftnxx environment variables were ignored in wide mode. • When a library (.
HP Fortran for HP-UX v2.9 Previous Fixes • The handling of A(:) versus A(numeric:numeric) was reevaluated. • Wrong answers were occasionally received from an array assignment with dependence. • Wrong answers were received at +O2. • Calling a generic intrinsic with an INTEGER*2 argument now calls the INTEGER*2 version of the intrinsic and if necessary, interprets other arguments that are constants as INTEGER*2 constants.
HP Fortran for HP-UX v2.9 Previous Fixes • Real*16 arguments were not accepted for the sngl intrinisic. • Wrong answers were received in unsigned 32 and int64 comparisons at +O1 and higher. • Passing an array structure component as an argument to a subroutine or intrinsic caused a compiler assertion when the array had a rank greater than one. • There was inferior STREAMS performance on PA8800. PHSS_29512 • Wrong answers were given at high opt levels with wide mode.
HP Fortran for HP-UX v2.9 Previous Fixes PHSS_28996 (PA-RISC) • Wrong answers were received at +O3. • Subroutines ran much slower when compiled at +O3 than at +O2 for POINTER and ALLOCATABLE arrays. • Goto in OpenMP occasionally caused the compiler to fail. • There was an exponential allocation problem. • Occasionally, “private initialized used record” caused an assert. • Wrong answers were received in last (inout) arg to date_and_time intrinsic at +O2 and +O3.
HP Fortran for HP-UX v2.9 Previous Fixes • A Caliper error sometimes resulted with errant unwind information; should be backed out. • There was a blockstack overflow. • DFIELD was not found. • There was a zext assert. • ‘$OPTIMIZE level X off ’ should default to command line opt level setting. • Occasionally, Wcount1 failed. • +objdebug was missing line numbers. • There was a tcg assert on ICUP. PHSS_28913 • There was occasional poor performance of POINTER formal arguments.
HP Fortran for HP-UX v2.9 Previous Fixes PHSS_28486 • Multiplication by -1 and FNEG gave different answers for real*16. • The compiler occasionally generated extra local variables as evidenced by looking at the stack in the debugger. • The compiler occasionally aborted with -g on a structure with unions. • There was incorrect runtime behavior when using +i8.
HP Fortran for HP-UX v2.9 Previous Fixes • The compiler issued an error message when the first argument to an elemental procedure was not an array. • Extensive use of automatic arrays in a subroutine with a very high call count resulted in performance degradation due to using malloc for automatic array allocation. • There was a segmentation fault compiling incomplete program.
HP Fortran for HP-UX v2.9 Previous Fixes • The compiler aborted at +O3 in replace_interval. • Wrong answers were received from code within OMP locks. • Program aborted during runtime in $$divoI. • The compiler aborted during compiling rshift. • Segmentation fault when executing subroutines with a large number of arguments. • The compiler issued Error 215, Dummy argument or a private procedure cannot have a type that is private.
HP Fortran for HP-UX v2.9 Previous Fixes • MIN1 and MAX1 calls are now converted internally to MIN0 and MAX0 when integer arguments are specified. • The compiler did not look for the alias name for function and subroutine interfaces. • The compiler aborts with redefinition of macro type. • Updated the compiler to accept label formats. • The compiler maintained context beyond the statement function context. • Emit subtype alignment of 16 bits for item. PHSS_26376 (10.20) and PHSS_26377 (11.
HP Fortran for HP-UX v2.9 Previous Fixes • The namespace table was not large enough to handle the source file. PHSS_26066 (10.20) and PHSS_26067 (11.x) • The compiler needed to check for valid frame size before running with bad input. • The compiler assumed loop indices to be integer*4 regardless of the compilation mode, causing unnecessary conversions during runtime. • An invalid but common idiom of equivalencing length 1 array to the beginning of a common block caused over optimization.
HP Fortran for HP-UX v2.9 Previous Fixes • The +i8 switch was not compatible with some of the OMP internal intrinsics. • The compiler incorrectly reported the hash line number instead of the line number. • The compiler failed to convert some types. • The compiler did not allow dimension as a function result attribute. PHSS_25771 (10.20) and PHSS_25772 (11.x) • The CRAY target object was not being handled properly by intrinsics.
HP Fortran for HP-UX v2.9 Previous Fixes PHSS_25520 (10.20) and PHSS_25521 (11.x) • Fixed uninitialized register problem causing intermittent wrong answers at high optimization levels. • Fixed problem with code to determine where the character length is stored is aborting. • Fixed problem of over-writing memory due to overflow of 16 bit field describing debugger position. • Fixed handling of the 'type' form of the print statement so that the label is recognized. PHSS_25413 (10.
HP Fortran for HP-UX v2.9 Previous Fixes • Fixed problem so that OMP directives are not lost. • Fixed bug in compiler for implicit open of file with unit number greater than 99. Fixes not present in prior patch releases • Occasionally, there were problems with type keyword placement. • There was a TCG in_descriptor.C assert. • When compiling ftn code, a compiler error resulted. • An unused warning, “invalid arc calculation,” was removed.
HP Fortran for HP-UX v2.9 Previous Fixes • The compiler was using the incorrect variable hashlinenumber, which did not always track line number. • When propogating type tags from uplevel imported module to the nested routine, the compiler was not checking to see if the type tags had already been set. • The compiler inadvertently modified loops not directly attached to OMP DO directives. • The compiler was not correctly typing I*8 induction variables.
HP Fortran for HP-UX v2.9 Previous Fixes • An upgrade of the compiler now results in copy out semantics to optimize for contiguous memory when pointers to arrays are passed as parameters. • Wrong answers resulted when copying large string constants. • The compiler now allows “SAVE” to be specified more than once for a variable. • The Fortran 90 compiler generated different output than the FORTRAN 77 compiler for 2**(-1).
HP Fortran for HP-UX v2.9 Previous Fixes PHSS_23243 (10.20) and PHSS_23244 (11.x) • The compiler did not allow a called “C” subroutine to modify a string literal parameter. PHSS_23025 (10.20) and PHSS_23026 (11.x) • The compiler asserted on source with large number of tokens. • Occasionally, there was an internal compiler error using +Oopenmp. • Return 0 was not handled properly. • The compiler now returns an error for the non-supported Complex(16).
HP Fortran for HP-UX v2.9 Previous Fixes • IXOR of logical*1 was not supported. • A new switch, +io77, was added to support E and G format treatment of leading zeros to match FORTRAN 77 compiler output for easier comparison of prior results. • +fastallocatable caused errors with allocatable arrays that were SAVEd. • There was a Compiler Internal Error when a module defined a COMMON block and USEd another module that also defined the same COMMON block. PHSS_22290 (10.20) and PHSS_22291 (11.
HP Fortran for HP-UX v2.9 Previous Fixes • Assigning 65535 to an integer*2 generated an error message. • Parallel reduction overflows were not handled correctly. • There was a difference in literal printing between f77 +es and f90 +extend_source. • Issues with Union overlapping other variables were resolved. • Assigned format labels in wide mode were not being handled correctly. • LOGICAL FUNCTION G*1() syntax was not accepted by f90, but was accepted by f77.
HP Fortran for HP-UX v2.9 Software Availability in Native Languages Software Availability in Native Languages There are no non-English translations for HP Fortran v2.9 for HP-UX 11i v2.