Intel® Fortran Compiler for Linux* Systems User's Guide, Volume II

Total Page:16

File Type:pdf, Size:1020Kb

Intel® Fortran Compiler for Linux* Systems User's Guide, Volume II Intel® Fortran Compiler for Linux* Systems User's Guide Volume II: Optimizing Applications Document Number: 253260-002 Disclaimer and Legal Information Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING L IABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Intel products are not intended for use in medical, life saving, or life sustaining applications. This User's Guide Volume II as well as the software described in it is furnished under license and may only be used or copied in accordance with the terms of the license. The information in this manual is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Intel Corporation. Intel Corporation assumes no responsibility or liability for any errors or inaccuracies that may appear in this document or any software that may be provided in association with this document. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The software described in this User's Guide Volume II may contain software defects which may cause the product to deviate from published specifications. Current characterized software defects are available on request. Intel SpeedStep, Intel Thread Checker, Celeron, Dialogic, i386, i486, iCOMP, Intel, Intel logo, Intel386, Intel486, Intel740, IntelDX2, IntelDX4, IntelSX2, Intel Inside, Intel Inside logo, Intel NetBurst, Intel NetStructure, Intel Xeon, Intel XScale, Itanium, MMX, MMX logo, Pentium, Pentium II Xeon, Pentium III Xeon, Pentium M, and VTune are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. * Other names and brands may be claimed as the property of others. Copyright © Intel Corporation 2003-2004. Portions © Copyright 2001 Hewlett-Packard Development Company, L.P. Table Of Contents Optimizing Applications: Overview .....................................................................9 How to Use This Document .............................................................................11 Notation Conventions...................................................................................11 Programming for High Performance.................................................................13 Programming for High Performance: Overview .............................................13 Programming Guidelines..............................................................................13 Setting Data Type and Alignment..............................................................13 Using Arrays Efficiently.............................................................................20 Improving I/O Performance.......................................................................25 Improving Run-time Efficiency ..................................................................30 Using Intrinsics for Itanium®-based Systems ............................................33 Coding Guidelines for Intel® Architectures................................................34 Analyzing and Timing Your Application.........................................................37 Using Intel Performance Analysis Tools ....................................................37 Timing Your Application............................................................................38 Compiler Optimizations ...................................................................................41 Compiler Optimizations Overview.................................................................41 Optimizing the Compilation Process .............................................................41 Optimizing the Compilation Process Overview ..........................................41 Efficient Compilation.................................................................................41 Little-endian-to-Big-endian Conversion .....................................................45 iii Table Of Contents Default Compiler Optimizations.................................................................48 Using Compilation Options .......................................................................51 Optimizing Different Application Types .........................................................61 Optimizing Different Application Types Overview.......................................61 Setting Optimizations with -On Options.....................................................62 Restricting Optimizations..........................................................................65 Floating-point Arithmetic Optimizations.........................................................66 Options Used for Both IA-32 and Itanium® Architectures...........................66 Floating-point Arithmetic Precision for IA-32 Systems................................69 Floating-point Arithmetic Precision for Itanium®-based Systems................70 Improving/Restricting FP Arithmetic Precision ...........................................71 Optimizing for Specific Processors ...............................................................73 Optimizing for Specific Processors Overview.............................................73 Targeting a Processor, -tpp{n} ..................................................................73 Processor-specific Optimization (IA-32 only) .............................................75 Automatic Processor-specific Optimization (IA-32 only).............................76 Processor-specific Run-time Checks, IA-32 Systems.................................77 Interprocedural Optimizations (IPO)..............................................................79 Overview of Interprocedural Optimizations ................................................79 IPO Compilation Model.............................................................................80 Command Line for Creating an IPO Executable ........................................81 Generating Multiple IPO Object Files ........................................................82 Capturing Intermediate Outputs of IPO .....................................................83 iv Table Of Contents Creating an IPO Executable Using xild......................................................83 Code Layout and Multi-Object IPO............................................................85 Compilation with Real Object Files............................................................86 Creating a Library from IPO Objects..........................................................87 Using -ip with -Qoption Specifiers .............................................................88 Inline Expansion of Functions ...................................................................90 Profile-guided Optimizations.........................................................................93 Profile-guided Optimizations Overview......................................................93 Profile-guided Optimizations Methodology and Usage Model.....................94 Basic PGO Options ..................................................................................97 Advanced PGO Options ...........................................................................98 PGO Environment Variables.....................................................................99 Example of Profile-Guided Optimization ..................................................100 Merging the .dyn Files ............................................................................101 Using profmerge to Relocate the Source Files.........................................102 Code-coverage Tool ...............................................................................103 Test Prioritization Tool ............................................................................111 PGO API: Profile Information Generation Support ...................................118 High-level Language Optimizations (HLO)..................................................121 HLO Overview........................................................................................121 Loop Transformations.............................................................................122 Scalar Replacement (IA-32 Only)............................................................123 Loop Unrolling with -unroll[n]...................................................................123 v Table Of Contents Memory Dependency with IVDEP Directive.............................................124 Prefetching.............................................................................................125 Parallel Programming with Intel® Fortran.......................................................127 Parallelism: an Overview............................................................................127 Parallel Program Development ...............................................................128 Auto-vectorization (IA-32 Only)...................................................................130
Recommended publications
  • Intel® Software Products Highlights and Best Practices
    Intel® Software Products Highlights and Best Practices Edmund Preiss Business Development Manager Entdecken Sie weitere interessante Artikel und News zum Thema auf all-electronics.de! Hier klicken & informieren! Agenda • Key enhancements and highlights since ISTEP’11 • Industry segments using Intel® Software Development Products • Customer Demo and Best Practices Copyright© 2012, Intel Corporation. All rights reserved. 2 *Other brands and names are the property of their respective owners. Key enhancements & highlights since ISTEP’11 3 All in One -- Intel® Cluster Studio XE 2012 Analysis & Correctness Tools Shared & Distributed Memory Application Development Intel Cluster Studio XE supports: -Shared Memory Processing MPI Libraries & Tools -Distributed Memory Processing Compilers & Libraries Programming Models -Hybrid Processing Copyright© 2012, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Intel® VTune™ Amplifier XE New VTune Amplifier XE features very well received by Software Developers Key reasons : • More intuitive – Improved GUI points to application inefficiencies • Preconfigured & customizable analysis profiles • Timeline View highlights concurrency issues • New Event/PC counter ratio analysis concept easy to grasp Copyright© 2012, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Intel® VTune™ Amplifier XE The Old Way versus The New Way The Old Way: To see if there is an issue with branch misprediction, multiply event value (86,400,000) by 14 cycles, then divide by CPU_CLK_UNHALTED.THREAD (5,214,000,000). Then compare the resulting value to a threshold. If it is too high, investigate. The New Way: Look at the Branch Mispredict metric, and see if any cells are pink.
    [Show full text]
  • Intel(R) Math Kernel Library for Linux* OS User's Guide
    Intel® Math Kernel Library for Linux* OS User's Guide MKL 10.3 - Linux* OS Document Number: 315930-012US Legal Information Legal Information INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL(R) PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information. The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.
    [Show full text]
  • Intel® Math Kernel Library for Windows* OS User's Guide
    Intel® Math Kernel Library for Windows* OS User's Guide Intel® MKL - Windows* OS Document Number: 315930-027US Legal Information Contents Contents Legal Information................................................................................7 Introducing the Intel® Math Kernel Library...........................................9 Getting Help and Support...................................................................11 Notational Conventions......................................................................13 Chapter 1: Overview Document Overview.................................................................................15 What's New.............................................................................................15 Related Information.................................................................................15 Chapter 2: Getting Started Checking Your Installation.........................................................................17 Setting Environment Variables ..................................................................17 Compiler Support.....................................................................................19 Using Code Examples...............................................................................19 What You Need to Know Before You Begin Using the Intel® Math Kernel Library...............................................................................................19 Chapter 3: Structure of the Intel® Math Kernel Library Architecture Support................................................................................23
    [Show full text]
  • Quick-Reference Guide to Optimization with Intel® Compilers
    Quick Reference Guide to Optimization with Intel® C++ and Fortran Compilers v19.1 For IA-32 processors, Intel® 64 processors, Intel® Xeon Phi™ processors and compatible non-Intel processors. Contents Application Performance .............................................................................................................................. 2 General Optimization Options and Reports ** ............................................................................................. 3 Parallel Performance ** ................................................................................................................................ 4 Recommended Processor-Specific Optimization Options ** ....................................................................... 5 Optimizing for the Intel® Xeon Phi™ x200 product family ............................................................................ 6 Interprocedural Optimization (IPO) and Profile-Guided Optimization (PGO) Options ................................ 7 Fine-Tuning (All Processors) ** ..................................................................................................................... 8 Floating-Point Arithmetic Options .............................................................................................................. 10 Processor Code Name With Instruction Set Extension Name Synonym .................................................... 11 Frequently Used Processor Names in Compiler Options ...........................................................................
    [Show full text]
  • Intel(R) Fortran Compiler Options
    Intel(R) Fortran Compiler Options Document Number: 307780-005US Disclaimer and Legal Information INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL(R) PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information. The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.
    [Show full text]
  • Intel® Fortran Compiler for Linux* Systems Options Quick Reference Guide
    Intel® Fortran Compiler Options Quick Reference Intel® Fortran Compiler for Linux* Systems Options Quick Reference Guide Legal Information Document Number: 253258-002 Disclaimer and Legal Information Disclaimer and Legal Information Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Intel products are not intended for use in medical, life saving, or life sustaining applications. This Quick Reference Guide as well as the software described in it is furnished under license and may only be used or copied in accordance with the terms of the license. The information in this document is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Intel Corporation. Intel Corporation assumes no responsibility or liability for any errors or inaccuracies that may appear in this document or any software that may be provided in association with this document. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.
    [Show full text]
  • Data Layout Optimization Techniques for Modern and Emerging Architectures
    DATA LAYOUT OPTIMIZATION TECHNIQUES FOR MODERN AND EMERGING ARCHITECTURES DISSERTATION Presented in Partial Fulfillment of the Requirements for the Degree Doctor of Philosophy in the Graduate School of The Ohio State University By Qingda Lu, B.E., M.S. ***** The Ohio State University 2008 Dissertation Committee: Approved by Dr. P. Sadayappan, Adviser Dr. Xiaodong Zhang Adviser Dr. J. Ramanujam Graduate Program in Dr. Atanas Rountev Computer Science and Engineering c Copyright by ° Qingda Lu 2008 ABSTRACT The never-ending pursuit of higher performance is one fundamental driving force of computer science research. Although the semiconductor industry has fulfilled Moore’s Law over the last forty years by doubling transistor density every two years, the effectiveness of hardware advances cannot be fully exploited due to the mismatch between the architectural environment and the user program. Program optimization is a key to bridge this gap. In this dissertation, instead of restructuring programs’ control flow as in many previous efforts, we have applied several new data layout optimization techniques to answer many optimization challenges on modern and emerging architectures. In particular, the developed techniques and their unique contributions are as follows. We describe an approach where a class of computations is modeled in terms of con- • stituent operations that are empirically measured, thereby allowing modeling of the overall execution time. The performance model with empirically determined cost components is used to perform data layout
    [Show full text]
  • Intel® Composer XE 2013 Product Brief
    HIGH PERFORMANCE INTEL C++ AND FORTRAN COMPILERS WITH INTEL PERFORMANCE LIBRARIES Intel® Composer XE 2013 Product Brief Key Features Fortran, C++, and Libraries in One Convenient Package . Leadership Application Intel Composer XE 2013 SP1 is for Fortran developers who want a matching C++ compiler. It Performance combines all the compilers and tools from Intel® C++ Composer XE and Intel® Fortran Composer . Powerful Parallelism Models XE to help deliver outstanding performance for your applications as they run on systems using Simplify Multicore Support Intel® Core™ or Xeon® processors, compatible processors, and Intel® Xeon Phi™ coprocessors. Take advantage of a significant savings compared to purchasing individual components. Optimized Libraries For Threading, Math, Media And Data Processing It’s available on Windows* and Linux*. For Windows users, use of this suite requires that Compatible with Leading Microsoft Visual Studio* 2008, 2010 or 2012 is installed on your system. Development Environments Intel Composer XE features compiler-based innovations in vectorization and parallel programming to simplify development of performance-oriented application software. Among these are Intel® Cilk™ Plus, OpenMP* 4.0 features, and guided auto-parallelization. It’s compatible with leading C++ compilers and developer environments on Windows and Linux. “Intel makes great C++ and Fortran compilers as well as math libraries” Intel Performance Libraries are also included – Intel® Math Kernel Library (Intel® MKL) for Dr. Ronald C. Young, President, Multipath advanced math processing and Intel® Integrated Performance Primitives (Intel® IPP) for Corporation multimedia, signal and data processing. These libraries offer highly optimized, threaded, and specialized functions that speed development and add application performance. A bonus for C++ developers is Intel® Threading Building Blocks (Intel® TBB), which helps simplify adding Also available with one language: parallelism so that applications can take advantage of Intel multicore and many-core processor .
    [Show full text]
  • Intel Parallel Studio XE 2015 Professional
    Intel® Parallel Studio XE 2015 Create faster code faster with this comprehensive parallel software development suite. Faster code: Boost applications performance that scales on today’s and next-gen processors . Create code faster: Utilize a toolset that simplifies creating fast, reliable parallel code What’s New . Performance boost using explicit vectorization and optimization reports . Expanded standards support for OpenMP 4.0, MPI 3.0, Full C++ 2011, Full Fortran 2003 support and Fortran 2008 BLOCK support . Faster thread debugging and expanded performance profiling Deliver top application performance and reliability with Intel® Parallel Studio XE. This C++ and Fortran tool suite simplifies the development, debug, and tuning of code that helps you utilize parallel processing to boost application performance. Get more performance with less effort on compatible Intel® processors and coprocessors. Intel® Parallel Studio XE comes in three editions based on your development needs. Composer Edition includes compilers, performance libraries, and parallel models optimized to build fast parallel code. Professional Edition includes everything in the Composer edition. It adds performance profiler, threading design/prototyping, and memory & thread debugger to design, build, debug and tune fast parallel code. Cluster Edition includes everything in the Professional edition. It adds a MPI cluster communications library, along with MPI error checking and tuning to design, build, debug and tune fast parallel code that includes MPI. Intel® Parallel Studio
    [Show full text]
  • Intel® Parallel Studio XE 2020 Update 4 Release Notes
    Intel® Parallel StudIo Xe 2020 uPdate 4 22 October 2020 Contents 1 Introduction ................................................................................................................................................... 2 2 Product Contents ......................................................................................................................................... 3 2.1 Additional Information for Intel-provided Debug Solutions ..................................................... 4 2.2 Microsoft Visual Studio Shell Deprecation ....................................................................................... 4 2.3 Intel® Software Manager ........................................................................................................................... 5 2.4 Supported and Unsupported Versions .............................................................................................. 5 3 What’s New ..................................................................................................................................................... 5 3.1 Intel® Xeon Phi™ Product Family Updates ...................................................................................... 10 4 System Requirements ............................................................................................................................. 11 4.1 Processor Requirements........................................................................................................................ 11 4.2 Disk Space Requirements
    [Show full text]
  • Intel® Composer XE 2011 for Windows* and Linux*
    ADVANCED COMPILERS AND LIBRARIES Intel® Composer XE 2011 For Windows* and Linux* Product Brief Get High Performance with Intel® Composer XE 2011 Intel® Composer XE 2011 Intel® Composer XE is a tool bundle that includes the latest generation of For Windows* and Linux* Intel® C/C++ Compiler—Intel® C++ Compiler XE 12.0, and the latest Intel® Fortran compiler, Intel® Visual Fortran Compiler XE 12.0. In addition, the package contains the following Intel performance and parallel libraries: Intel® Math Kernel Library (Intel® MKL), Intel® Integrated Performance Primitives (Intel® IPP), and Intel® Threading Building Blocks (Intel® TBB). Intel® Composer XE 2011 replaces the popular Intel® Compiler Suite Professional Edition 11.1 bundle. This edition contains support for Intel® Architecture (IA)-32 and Intel® 64 architectures, available for Windows* and Linux* platforms. Build High-Performance Serial and Parallel Applications for Multicore Intel Composer XE delivers performance-oriented features to software engineers using C/ C++ and Fortran, enabling them to develop and maintain high-performance and enterprise applications on the latest IA processors, including the upcoming Intel processor codenamed Learn the New Names Sandy Bridge. Many tools in the Intel® Parallel Studio XE line are next-generation advancements of familiar industry-leading Intel® software Its combination of industry-leading optimizing compilers for IA, including support for the development products. See below to learn industry-standard OpenMP*, new innovations such as Intel® Parallel Building Blocks (Intel® more—and to help guide you during the PBB), and advanced vectorization support easier and faster development of fully optimized upgrade process. applications. The Intel Fortran compiler implements Co-Array Fortran as part of the Fortran New Name Old Name 2008 standard.
    [Show full text]
  • Intel® Parallel Studio XE 2020 Update 1 Release Notes
    Intel® Parallel StudIo Xe 2020 uPdate 1 2 April 2020 Contents 1 Introduction ................................................................................................................................................... 2 2 Product Contents ......................................................................................................................................... 3 2.1 Additional Information for Intel-provided Debug Solutions ..................................................... 4 2.2 Microsoft Visual Studio Shell Deprecation ....................................................................................... 4 2.3 Intel® Software Manager ........................................................................................................................... 5 2.4 Supported and Unsupported Versions .............................................................................................. 5 3 What’s New ..................................................................................................................................................... 5 3.1 Intel® Xeon Phi™ Product Family Updates ...................................................................................... 13 4 System Requirements ............................................................................................................................. 13 4.1 Processor Requirements........................................................................................................................ 13 4.2 Disk Space Requirements .....................................................................................................................
    [Show full text]