DIGITAL Software Product Description ___________________________________________________________________ PRODUCT NAME: DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Sys- tems SPD 37.54.09 DESCRIPTION This is the Software Product Description (SPD) for DIGITAL[TM] For- tran Version 5.0 for DIGITAL UNIX[R] (formerly DEC OSF/1[R]). DIGI- TAL Fortran contains both the DIGITAL Fortran 90 Version 5.0 software and the DIGITAL Fortran 77 Version 5.0 software. The following descrip- tion refers to DIGITAL Fortran unless a specific reference to the 90 or 77 product is needed to distinguish between the two software prod- ucts. DIGITAL Fortran is an implementation of the FORTRAN programming lan- guage that supports the FORTRAN 66, FORTRAN 77, and Fortran 90 stan- dards. DIGITAL Fortran runs on and generates native object code for DIGITAL UNIX Alpha systems. DIGITAL Fortran 77 fully supports the following standards: o FORTRAN 66 (ANSI X3.9-1966) o FORTRAN 77 (ANSI X3.9-1978) o ISO 1539-1980(E) o MIL-STD-1753 o FIPS-69-1 (DIGITAL Fortran meets the requirements of this standard by conforming to the ANSI Standard and by including a flagger. The flagger optionally produces diagnostic messages for compile-time elements that do not conform to the Full-Level ANSI FORTRAN X3.198- 1992 Standard.) October 1997 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 DIGITAL Fortran 90 supports all of the standards that DIGITAL Fortran 77 supports plus the following new standards: o FORTRAN 90 (ANSI X3.198-1992) o ISO 1539-1991(E) DIGITAL Fortran 90 supports most statement, library, and directive ex- tensions from the HPF-2 draft specification (High Performance FORTRAN Language Specification, Version 2.0.delta, October 19, 1996) and sup- ports statement, library, and directive extensions from the HPF spec- ification (CRPC-TR92225, Center for Research on Parallel Computation, Rice University, 1993). DIGITAL Fortran supports extensions to the ISO and ANSI standards, in- cluding a number of extensions defined by DIGITAL Fortran for the var- ious DIGITAL Fortran platforms (operating system/architecture pairs). In addition to DIGITAL UNIX Alpha systems, DIGITAL Fortran platforms include: o DIGITAL Visual Fortran for Intel[R] systems under Windows NT[TM] and Windows 95[R] and for Alpha systems under Windows NT o DIGITAL Fortran 90 and DIGITAL Fortran 77 on OpenVMS[TM] Alpha sys- tems o DIGITAL Fortran 77 on OpenVMS VAX[TM] systems Major additions to the FORTRAN 77 standard introduced by the FORTRAN 90 standard include: o Array operations o Improved facilities for numeric computation o Parameterized intrinsic data types o User-defined data types o Facilities for modular data and procedure definitions o Pointers o The concept of language evolution 2 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 o Support for DATE_AND_TIME intrinsic for obtaining dates using a four- digit year format DIGITAL Fortran includes the following features and enhancements in both DIGITAL Fortran 90 and DIGITAL Fortran 77: o Support for linking against static and shared libraries o Support for creating sharable code to be put into a shared library o Support for stack-based storage o Support for dynamic memory allocation o Support for reading and writing binary data files in nonnative for- mats, including IEEE[R] (little-endian and big-endian), VAX, IBM[R] System\360, and CRAY[R] integer and floating point formats o User control over IEEE floating point exception handling, report- ing, and resulting values o Control for memory boundary alignment of items in COMMON and fields in structures and warnings for unaligned data o Directives to control listing page titles and subtitles, object file identification field, COMMON and record field alignment, and some attributes of COMMON blocks o Composite data declarations using STRUCTURE, END STRUCTURE, and RECORD statements, and access to record components through field refer- ences o Explicit specification of storage allocation units for data types such as: INTEGER*4 LOGICAL*4 REAL*4 REAL*8 COMPLEX*8 o Support for 64-bit signed integers using INTEGER*8 and LOGICAL*8 o Support for 128-bit floating point reals using REAL*16 3 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 o A set of data types: - BYTE - LOGICAL*1, LOGICAL*2, LOGICAL*4, LOGICAL*8 - INTEGER*1, INTEGER*2, INTEGER*4, INTEGER*8 - REAL*4, REAL*8, REAL*16 - COMPLEX*8, COMPLEX*16, DOUBLE COMPLEX - POINTER (CRAY style) o Data statement style initialization in type declaration statements o AUTOMATIC and STATIC statements o Bit constants to initialize LOGICAL, REAL, and INTEGER values and participate in arithmetic and logical expressions o Built-in functions %LOC, %REF, and %VAL o VOLATILE statement o Bit manipulation functions o Binary, hexadecimal, and octal constants and Z and O format edit descriptors applicable to all data types o I/O unit numbers that can be any nonnegative INTEGER*4 value o Variable amounts of data can be read from and written to "STREAM" files, which contain no record delimiters o ENCODE and DECODE statements o ACCEPT, TYPE, and REWRITE input/output statements o DEFINE FILE, UNLOCK, and DELETE statements o USEROPEN subroutine invocation at file OPEN time o Debug statements in source o Generation of a source listing file with optional machine code rep- resentation of the executable source 4 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 o Generation of a symbolic assembly language representation of the executable source that can be assembled o Variable format expressions in a FORMAT statement o Optional run-time bounds checking of array subscripts and charac- ter substrings o 31-character identifiers that can include dollar sign ($) and un- derscore (_) o Language elements that support the various extended range and ex- tended precision floating point architectural features: - 32-bit IEEE S_floating data type, with an 8-bit exponent and 24- bit mantissa, which provides a range of 1.17549435E-38 (normal- ized) to 3.40282347E38 (the IEEE denormalized limit is 1.40129846E- 45) and a precision of typically 7 decimal digits - 64-bit IEEE T_floating data type, with an 11-bit exponent and 53-bit mantissa, which provides a range of 2.2250738585072013D- 308 (normalized) to 1.7976931348623158D308 (the IEEE denormal- ized limit is 4.94065645841246544D-324) and a precision of typ- ically 15 decimal digits - 128-bit IEEE extended X_floating data type, with a 15-bit ex- ponent and a 113-bit mantissa, which provides a range of approx- imately 6.48Q-4966 to 1.18Q4932 and a precision of typically 33 decimal digits o Command line control for: - The size of default INTEGER, REAL, and DOUBLE PRECISION data items - The levels and types of optimization to be applied to the pro- gram - The directories to search for INCLUDE files - Inclusion or suppression of various compile-time warnings - Inclusion or suppression of run-time checking for various I/O and computational errors 5 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 - Control over whether compilation terminates after a specific num- ber of errors has been found - Choosing whether executing code will be thread-reentrant DIGITAL Fortran 90 includes the following features and enhancements: o Kind types for all of the hardware-supported data types: - For 1-, 2-, 4-, and 8-byte LOGICAL data: LOGICAL (KIND=1) LOGICAL (KIND=2) LOGICAL (KIND=4) LOGICAL (KIND=8) - For 1-, 2-, 4-, and 8-byte INTEGER data: INTEGER (KIND=1) INTEGER (KIND=2) INTEGER (KIND=4) INTEGER (KIND=8) - For 4-, 8-, and 16-byte REAL data: REAL (KIND=4) REAL (KIND=8) REAL (KIND=16) - For single precision and double precision COMPLEX data: COMPLEX (KIND=4) COMPLEX (KIND=8) o The following features of the proposed Fortran 95 standard: - FORALL statement and construct - Automatic deallocation of ALLOCATABLE arrays - Dim argument to MAXLOC and MINLOC - PURE user-defined subprograms - ELEMENTAL user-defined subprograms (a restricted form of a pure procedure) 6 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 - Pointer initialization (initial value) - The NULL intrinsic to nullify a pointer - Derived-type structure initialization - CPU_TIME intrinsic subroutine - Kind argument to CEILING and FLOOR intrinsics - Nested WHERE constructs, masked ELSEWHERE statement, and named WHERE constructs - Comments allowed in namelist input - Generic identifier in END INTERFACE statements - Detection of Obsolescent and/or Deleted features listed in the proposed Fortran 95 standard. DIGITAL Fortran flags these deleted and obsolescent features, but fully supports them. o The following features found in DIGITAL Visual Fortran: - # Constants-constants using other than base 10 - C Strings-NULL terminated strings - Conditional Compilation And Metacommand Expressions ($define, $undefine, $if, $elseif, $else, $endif) - $FREEFORM, $NOFREEFORM, $FIXEDFORM-source file format - $INTEGER, $REAL-selects size - $FIXEDFORMLINESIZE-line length for fixed form source - $STRICT, $NOSTRICT-F90 conformance - $PACK-structure packing - $ATTRIBUTES ALIAS-external name for a subprogram or common block - $ATTRIBUTES C, STDCALL-calling and naming conventions - $ATTRIBUTES VALUE, REFERENCE-calling conventions - \ Descriptor-prevents writing an end-of-record mark - Ew.dDe and Gw.dDe Edit Descriptors-similar to Ew.dEe and Gw.dEe 7 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 - 7200 Character Statement Length - Free form infinite line length - $DECLARE and $NODECLARE == IMPLICIT NONE - $ATTRIBUTES EXTERN-variable allocated in another source file - $ATTRIBUTES VARYING-variable number of arguments - $ATTRIBUTES ALLOCATABLE-allocatable array - Mixing Subroutines/Functions in Generic Interfaces - $MESSAGE-output message during compilation - $LINE == C's #line - INT1 converts to one byte integer by truncating - INT2 converts to two byte integer by truncating - INT4 converts to four byte integer by truncating - COTAN returns cotangent - DCOTAN returns double precision cotangent - IMAG returns the imaginary part of complex number - IBCHNG reverses value of bit - ISHA shifts arithmetically left or right - ISHC performs a circular shift - ISHL shifts logically left or right o Support for directed decomposition for parallel processing on shared memory multiprocessor systems using source code directives: - PARALLEL and END PARALLEL directives to define parallel regions - PARALLEL and PSECTIONS directives to define parallel work con- structs - PRIVATE and SHARED attributes to describe data local or global to the threads of execution 8 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 - CRITICAL SECTION directive to define a guarded region where one thread executes at a time - TASK COMMON directive to allow each thread to have a local copy of a COMMON block - Environment variables to control resource utilization at run- time - Library routines to query and adjust the run-time parallel en- vironment o A number of High Performance Fortran (HPF) features, including: - The data parallel FORALL statement and construct - Execution model procedure prefixes: EXTRINSIC(HPF) EXTRINSIC(HPF_LOCAL) EXTRINSIC(HPF_SERIAL) - PURE procedure prefix to specify a lack of procedure side ef- fects - The following HPF data alignment and distribution directives: ALIGN DISTRIBUTE INHERIT PROCESSORS TEMPLATE SHADOW ON (in conjunction with INDEPENDENT loops) - Many HPF-2 approved extensions, including: * HPF_LOCAL routines, and all HPF_LOCAL_LIBRARY routines ex- cept LOCAL_BLKCNT, LOCAL_LINDEX, and LOCAL_UINDEX * HPF_SERIAL routines * ON directive within INDEPENDENT loops 9 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 * RESIDENT directive used in conjunction with INDEPENDENT loops * Mapping of derived type components * Shadow width declarations - HPF intrinsic procedures and library routines: * NUMBER_OF_PROCESSORS and PROCESSORS_SHAPE * Reduction functions * Combining scatter functions * Parallel prefix and suffix functions * Sorting functions * System Inquiry Intrinsics * Computational Intrinsics * Mapping inquiry subroutines * Bit manipulation functions * Array reduction functions * Array combining scatter functions * Array parallel prefix and suffix functions * Array sorting functions GRADE_UP, GRADE_DOWN * All HPF_LOCAL_LIBRARY routines except LOCAL_BLKCNT, LOCAL_ LINDEX, and LOCAL_UINDEX - HPF INDEPENDENT directive - HPF SEQUENCE and NOSEQUENCE directives DIGITAL Fortran 77 contains the following extensions to the FORTRAN 77 standard: o Support for recursive subprograms o IMPLICIT NONE statements o INCLUDE statement 10 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 o NAMELIST-directed I/O o DO WHILE and ENDDO statements o Use of exclamation point (!) for end of line comments o Generation of Cross Reference Listings o Support for NTT Technical Requirement TR550001, Multivendor Inte- gration Architecture (MIA) Version 1.1, Division 2, Part 3-2, Pro- gramming Language FORTRAN o Support for automatic arrays o Support for the following SELECT CASE - CASE - CASE DEFAULT - END SELECT statements. o Support for the EXIT and CYCLE statements and for construct names on DO - END DO statements o Reporting of unused and uninitialized variables o Support for DATE_AND_TIME intrinsic for obtaining dates using a four- digit year format DIGITAL Fortran provides a multiphase optimizer that is capable of per- forming optimizations across entire programs. Specific optimizations performed by both DIGITAL Fortran 90 and DIGITAL Fortran 77 include: o Constant folding o Optimizations of arithmetic IF, logical IF, and block IF-THEN-ELSE o Global common subexpression elimination o Removal of invariant expressions from loops o Global allocation of general registers across program units o In-line expansion of statement functions and routines o Optimization of array addressing in loops o Value propagation o Deletion of redundant and unreachable code 11 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 o Loop unrolling o Thorough dependence analysis o Software pipelining to rearrange instructions between different un- rolled loop iterations o Optimized interface to intrinsic functions o Loop transformation optimizations that apply to array references within loops, including: - Loop blocking - Loop distribution - Loop fusion - Loop interchange - Loop scalar replacement - Outer loop unrolling o Speculative code scheduling, where a conditionally executed instruc- tion is moved to a position before a test instruction and executed unconditionally. This reduces instruction latency stalls. (Perfor- mance may be reduced somewhat, because the run-time system must dis- miss exceptions caused by speculative instructions.) Specific optimizations performed by DIGITAL Fortran 90 include: o Array temporary elimination o A number of HPF-specific optimizations, including: - Message vectorization - Nearest-neighbor optimizations for improved communication per- formance of constructs typically seen in PDE solvers - Parallelism of reductions - Run-time preprocessing of loops for improved performance of ir- regular data access code 12 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 - Many other communication-based optimizations Run-Time Library Redistribution: The DIGITAL Fortran kit may include updated Run-Time Library share- able images. DIGITAL grants the user a nonexclusive royalty-free world- wide right to reproduce and distribute the executable version of the Run-Time Library (the "RTLs"), provided that the user does all of the following: o Distributes the RTLs only in conjunction with and as a part of the user's software application product that is designed to operate in the DIGITAL UNIX environment. o Does not use DIGITAL's name, logo, or trademarks to market the user's software application product. o Includes DIGITAL's copyright notice for DIGITAL Fortran on the user's product disk label and/or on the title page of the documentation for software application product. o Agrees to indemnify, hold harmless, and defend DIGITAL from and against any claims or lawsuits, including attorney's fees, that arise or result from the use or distribution of the software application prod- uct. o Except as expressly provided herein, DIGITAL grants no implied or express license under any of its patents, copyrights, trade secrets, trademarks, or any license or other proprietary interests and rights. For DIGITAL UNIX Alpha systems, the RTL images are designated as: libfor.a, libfor.so libUfor.a, libUfor.so libFutil.a, libFutil.so libshpf.a, libshpf.so (DIGITAL Fortran 90 only) for_msg.cat 13 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 HARDWARE REQUIREMENTS Processors Supported: Any Alpha system that is capable of running DIGITAL UNIX Version 4.0. Disk Space Requirements: Disk space required for installation: Root file system: / 0 MB Other file systems: /usr 28 MB /tmp 1 MB /var 0 MB Disk space required for use (permanent): Root file system: /0 MB Other file systems: /usr 24 MB /var 0 MB These sizes are approximate; actual sizes may vary depending on the user's system environment, configuration, and software options. Memory Requirements: For systems used to compile a program for parallel execution with the -wsf flag, a minimum of 64 MB of physical memory is recommended. SOFTWARE REQUIREMENTS o DIGITAL UNIX Operating System Version 4.0 (SPD 41.61.xx) o DIGITAL UNIX Developers' Toolkit Version 4.0 (SPD 44.36.xx) for DIG- ITAL UNIX Version 4.0 respectively. 14 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 OPTIONAL SOFTWARE REQUIREMENTS DIGITAL Parallel Software Environment (SPD 51.09.05) is required to link and execute High Performance Fortran programs compiled for par- allel execution, using the -wsf compiler option, on multiple Alpha sys- tems. The DIGITAL Parallel Software Environment is available only for DIGITAL Alpha systems running DIGITAL UNIX. KAP[R] for DEC[TM] Fortran[TM] V3.1 for DIGITAL UNIX KAP for DEC Fortran 90 V3.1 for DIGITAL UNIX DIGITAL Extended Math Library V3.3 for DIGITAL UNIX GROWTH CONSIDERATIONS The minimum hardware/software requirements for any future version of DIGITAL Fortran may be different from the requirements for the cur- rent version. DISTRIBUTION MEDIA Media and documentation for DIGITAL Fortran is available on the DIG- ITAL CD-ROM Software Library for DIGITAL UNIX Alpha Layered Products (QA-054AA-H8). Documentation in printed hardcopy format can be ordered separately. ORDERING INFORMATION Software Licenses: Unlimited System Use: QL-MV2A*-AA Personal Use: QL-MV2AM-2B Concurrent Use: QL-MV2AM-3B Concurrent 5 Pack: QL-MV2AM-3C Concurrent 10 Pack: QL-MV2AM-3D Software Documentation: DIGITAL Fortran 90 Documentation: QA-MV2AA-GZ 15 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 DIGITAL Fortran 77 Documentation: QA-MV2AB-GZ Software Product Services: QT-MV2*-** * Denotes variant fields. For additional information on available li- censes, services, and media, refer to the appropriate price book. SOFTWARE LICENSING This software is furnished only under license. For more information about DIGITAL's licensing terms and policies, contact your local DIG- ITAL office. LICENSE MANAGEMENT FACILITY SUPPORT DIGITAL Fortran supports DIGITAL's License Management Facility. License units for DIGITAL Fortran are allocated on an Unlimited Sys- tem Use plus Concurrent Use basis. Each Concurrent Use license allows any one individual at a time to use the layered product. SOFTWARE PRODUCT SERVICES A variety of service options are available from DIGITAL. For more in- formation, contact your local DIGITAL office. SOFTWARE WARRANTY Warranty for this software product is provided by DIGITAL with the pur- chase of a license for the product. This means that DIGITAL will rem- edy any nonconformance when it is reported to DIGITAL by the customer during the warranty period. 16 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 The warranty period is one year. It begins when the software is in- stalled or thirty days after delivery to the end user, whichever oc- curs first and expires one year later. All warranty related support for this software will end one year after release of the subsequent versions. Warranty is provided in the country of purchase. DIGITAL will provide a service location that will accept reporting (in format prescribed by DIGITAL) of a nonconformance problem caused when using the licensed software under normal conditions as defined by this SPD. DIGITAL will remedy a nonconformance problem in the current unaltered release of the licensed software by issuing a correction information such as: o Correction documentation o Corrected code o Notice of availability of corrected code o A restriction or a bypass The customer will be responsible for the preparation and submission of the problem report to the service location. WARRANTY EXCLUSION DIGITAL DOES NOT WARRANT THAT THE SOFTWARE LICENSED TO CUSTOMER SHALL BE ERROR FREE, THAT THE SOFTWARE SHALL OPERATE WITH ANY HARDWARE AND SOFTWARE OTHER THAN AS SPECIFIED IN THIS SPD, THAT THE SOFTWARE SHALL SATISFY CUSTOMER'S OWN SPECIFIC REQUIREMENTS, OR THAT COPIES OF THE SOFTWARE OTHER THAN THOSE PROVIDED OR AUTHORIZED BY DIGITAL SHALL CON- FORM TO THE SPD. DIGITAL MAKES NO WARRANTIES WITH RESPECT TO THE FITNESS AND OPERABIL- ITY OF MODIFICATIONS NOT MADE BY DIGITAL. IF THE SOFTWARE FAILS TO FUNCTION FOR REASONS STATED ABOVE, THE CUS- TOMER'S WARRANTY WILL BE INVALIDATED AND ALL SERVICE CALLS WILL BE BIL- LABLE AT THE PREVAILING PER CALL RATES. 17 DIGITAL Fortran Version 5.0 for DIGITAL UNIX Alpha Systems SPD 37.54.09 This Software Warranty is effective for licensed software products or- dered in the United States after October 1988 and supersedes all prior versions. The above information is valid at time of release. Please contact your local DIGITAL office for the most up-to-date information. Trademark and copyright information: [R] CRAY is a registered trademark of Cray Research, Inc. [R] IBM is a registered trademark of International Business Ma- chines Corporation. [R] IEEE is a registered trademark of the Institute of Electrical and Electronics Engineers, Inc. [R] Intel is a registered trademark of Intel Corporation. [R] KAP is a registered trademark of Kuck and Associates, Inc. [R] Microsoft and Windows 95 are registered trademarks of Mi- crosoft Corporation. [R] OSF and OSF/1 are registered trademarks of Open Software Foundation, Inc. [R] UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Ltd. [TM] The DIGITAL Logo, DEC, DEC Fortran, DIGITAL, OpenVMS, and VAX are trademarks of Digital Equipment Corporation [TM] Windows NT, NT, and Windows are trademarks of Microsoft Cor- poration. © 1997 Digital Equipment Corporation. All rights reserved. 18