
Intel® Math Kernel Library for OS X* Developer Guide Intel® MKL 11.3 - OS X* Revision: 053 Legal Information Contents Contents Legal Information................................................................................ 7 Getting Help and Support..................................................................... 9 Introducing the Intel® Math Kernel Library.........................................11 What's New........................................................................................ 13 Notational Conventions...................................................................... 15 Related Information........................................................................... 17 Chapter 1: Getting Started Checking Your Installation......................................................................... 19 Setting Environment Variables .................................................................. 19 Compiler Support.....................................................................................20 Using Code Examples............................................................................... 21 What You Need to Know Before You Begin Using the Intel® Math Kernel Library............................................................................................... 21 Chapter 2: Structure of the Intel® Math Kernel Library Architecture Support................................................................................ 23 High-level Directory Structure....................................................................23 Layered Model Concept.............................................................................24 Chapter 3: Linking Your Application with the Intel® Math Kernel Library Linking Quick Start...................................................................................27 Using the -mkl Compiler Option......................................................... 27 Using the Single Dynamic Library.......................................................28 Selecting Libraries to Link with.......................................................... 28 Using the Link-line Advisor................................................................29 Using the Command-line Link Tool..................................................... 29 Linking Examples..................................................................................... 30 Linking on IA-32 Architecture Systems............................................... 30 Linking on Intel(R) 64 Architecture Systems........................................ 31 Linking in Detail.......................................................................................32 Listing Libraries on a Link Line...........................................................32 Dynamically Selecting the Interface and Threading Layer...................... 33 Linking with Interface Libraries.......................................................... 34 Using the ILP64 Interface vs. LP64 Interface............................... 34 Using the SP2DP Interface........................................................ 36 Linking with Fortran 95 Interface Libraries.................................. 37 Linking with Threading Libraries.........................................................37 Linking with Compiler Run-time Libraries............................................ 38 Linking with System Libraries............................................................ 39 Building Custom Dynamically Linked Shared Libraries .................................. 39 Using the Custom Dynamically Linked Shared Library Builder.................39 Composing a List of Functions .......................................................... 40 Specifying Function Names............................................................... 41 Distributing Your Custom Dynamically Linked Shared Library................. 41 3 Intel® Math Kernel Library for OS X* Developer Guide Chapter 4: Managing Performance and Memory Improving Performance with Threading....................................................... 43 OpenMP* Threaded Functions and Problems........................................ 43 Functions Threaded with Intel® Threading Building Blocks......................45 Avoiding Conflicts in the Execution Environment...................................46 Techniques to Set the Number of Threads........................................... 46 Setting the Number of Threads Using an OpenMP* Environment Variable......................................................................................47 Changing the Number of OpenMP* Threads at Run Time....................... 47 Using Additional Threading Control.....................................................49 Intel MKL-specific Environment Variables for OpenMP Threading Control...............................................................................50 MKL_DYNAMIC........................................................................51 MKL_DOMAIN_NUM_THREADS.................................................. 51 Setting the Environment Variables for Threading Control...............53 Calling Intel MKL Functions from Multi-threaded Applications................. 53 Using Intel® Hyper-Threading Technology............................................ 54 Improving Performance for Small Size Problems ..........................................55 Using MKL_DIRECT_CALL in C Applications..........................................55 Using MKL_DIRECT_CALL in Fortran Applications..................................56 Limitations of the Direct Call ............................................................ 56 Other Tips and Techniques to Improve Performance......................................57 Coding Techniques........................................................................... 57 Improving Intel(R) MKL Performance on Specific Processors.................. 58 Operating on Denormals................................................................... 58 Fast Fourier Transform Optimized Radices........................................... 58 Using Memory Functions .......................................................................... 58 Avoiding Memory Leaks in Intel MKL...................................................58 Redefining Memory Functions............................................................ 58 Chapter 5: Language-specific Usage Options Using Language-Specific Interfaces with Intel® Math Kernel Library.................61 Interface Libraries and Modules......................................................... 61 Fortran 95 Interfaces to LAPACK and BLAS..........................................62 Compiler-dependent Functions and Fortran 90 Modules.........................63 Mixed-language Programming with the Intel Math Kernel Library.................... 63 Calling LAPACK, BLAS, and CBLAS Routines from C/C++ Language Environments..............................................................................64 Using Complex Types in C/C++......................................................... 65 Calling BLAS Functions that Return the Complex Values in C/C++ Code.. 66 Chapter 6: Obtaining Numerically Reproducible Results Getting Started with Conditional Numerical Reproducibility ........................... 70 Specifying Code Branches......................................................................... 71 Reproducibility Conditions......................................................................... 72 Setting the Environment Variable for Conditional Numerical Reproducibility......73 Code Examples........................................................................................73 Chapter 7: Coding Tips Example of Data Alignment....................................................................... 77 4 Contents Using Predefined Preprocessor Symbols for Intel® MKL Version-Dependent Compilation.........................................................................................78 Chapter 8: Managing Output Using Intel MKL Verbose Mode................................................................... 81 Version Information Line...................................................................81 Call Description Line.........................................................................82 Chapter 9: Working with the Intel® Math Kernel Library Cluster Software Linking with Intel MKL Cluster Software...................................................... 85 Setting the Number of OpenMP* Threads.................................................... 86 Using Shared Libraries..............................................................................87 Interaction with the Message-passing Interface............................................87 Using a Custom Message-Passing Interface................................................. 88 Examples of Linking for Clusters................................................................ 89 Examples for Linking a C Application.................................................. 89 Examples for Linking a Fortran Application.......................................... 90 Chapter 10: Managing Behavior of the Intel(R) Math Kernel Library with Environment Variables Managing Behavior of Function Domains..................................................... 91 Setting the Default Mode of Vector Math with an Environment Variable... 91 Managing Performance of the Cluster Fourier Transform Functions..........92 Instruction Set Specific Dispatching on Intel® Architectures............................93
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages116 Page
-
File Size-