Intel(R) Math Kernel Library for the Linux* OS User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
Intel® Math Kernel Library for the Linux* OS User’s Guide October 2007 Document Number: 314774-005US World Wide Web: http://developer.intel.com Version Version Information Date -001 Original issue. Documents Intel® Math Kernel Library (Intel® MKL) 9.0 gold September 2006 release. -002 Documents Intel® MKL 9.1 beta release. “Getting Started”, “LINPACK and MP January 2007 LINPACK Benchmarks” chapters and “Support for Third-Party and Removed Interfaces” appendix added. Existing chapters extended. Document restruc- tured. List of examples added. -003 Documents Intel® MKL 9.1 gold release. Existing chapters extended. Docu- June 2007 ment restructured. More aspects of ILP64 interface discussed. Section “Config- uring Eclipse CDT to Link with Intel MKL” added to chapter 3. Cluster content is organized into one separate chapter 9 “Working with Intel® Math Kernel Library Cluster Software” and restructured, appropriate links added. -004 Documents Intel® MKL 10.0 Beta release. Layered design model has been September 2007 described in chapter 3 and the content of the entire book adjusted to the model. Automation of setting environment variables at startup has been described in chapter 4. New Intel MKL threading controls have been described in chapter 6. The User’s Guide for Intel MKL merged with the one for Intel MKL Cluster Edition to reflect consolidation of the respective products. -005 Documents Intel® MKL 10.0 Gold release. Configuring of Eclipse CDT 4.0 to October 2007 link with Intel MKL has been described in chapter 3. Intel® Compatibility OpenMP* run-time compiler library (libiomp) has been described. ii 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. 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. Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or by visiting Intel's Web Site. Intel processor numbers are not a measure of performance. Processor numbers differentiate features within each processor family, not across different processor families. See http://www.intel.com/products/processor_number for details. BunnyPeople, Celeron, Celeron Inside, Centrino, Centrino Atom, Centrino Atom Inside, Centrino Inside, Centrino logo, Core Inside, FlashFile, i960, InstantIP, Intel, Intel logo, Intel386, Intel486, IntelDX2, IntelDX4, IntelSX2, Intel Atom, Intel Atom Inside, Intel Core, Intel Inside, Intel Inside logo, Intel. Leap ahead., Intel. Leap ahead. logo, Intel NetBurst, Intel NetMerge, Intel NetStructure, Intel SingleDriver, Intel SpeedStep, Intel StrataFlash, Intel Viiv, Intel vPro, Intel XScale, IPLink, Itanium, Itanium Inside, MCS, MMX, Oplus, OverDrive, PDCharm, Pentium, Pentium Inside, skoool, Sound Mark, The Journey Inside, VTune, Xeon, and Xeon Inside are trademarks of Intel Corporation in the U.S. and other countries. * Other names and brands may be claimed as the property of others. Copyright © 2006 - 2008, Intel Corporation. All rights reserved. iii Contents Chapter 1 Overview Technical Support ....................................................................... 1-1 About This Document .................................................................. 1-1 Purpose................................................................................. 1-2 Audience ............................................................................... 1-2 Document Organization ........................................................... 1-2 Term and Notational Conventions.............................................. 1-4 Chapter 2 Getting Started Checking Your Installation............................................................ 2-1 Obtaining Version Information ...................................................... 2-2 Compiler Support ....................................................................... 2-2 Before You Begin Using Intel MKL ................................................. 2-2 Chapter 3 Intel® Math Kernel Library Structure High-level Directory Structure ...................................................... 3-1 Layered Model Concept................................................................ 3-2 Layers................................................................................... 3-3 Sequential Version of the Library .................................................. 3-4 Support for ILP64 Programming.................................................... 3-5 Intel® MKL Versions ................................................................. 3-11 Directory Structure in Detail....................................................... 3-11 Dummy Libraries .................................................................. 3-19 Accessing the Intel® Math Kernel Library Documentation............... 3-19 Contents of the Documentation Directory................................. 3-20 iv Intel® Math Kernel Library User’s Guide Accessing Man Pages ............................................................ 3-20 Chapter 4 Configuring Your Development Environment Setting Environment Variables...................................................... 4-1 Automating the Process........................................................... 4-1 Configuring Eclipse CDT to Link with Intel MKL .............................. 4-2 Configuring Eclipse CDT 4.0 ..................................................... 4-2 Configuring Eclipse CDT 3.x ..................................................... 4-3 Customizing the Library Using the Configuration File ....................... 4-4 Note on the Configuration file for Out-of-Core (OOC) PARDISO* Solver................................................................................. 4-5 Chapter 5 Linking Your Application with Intel® Math Kernel Library Selecting Between Linkage Models................................................ 5-1 Static Linking......................................................................... 5-1 Dynamic Linking..................................................................... 5-2 Making the Choice .................................................................. 5-2 Intel MKL-specific Linking Recommendations .............................. 5-3 Link Command Syntax ................................................................ 5-3 Selecting Libraries to Link............................................................ 5-6 Linking Examples ................................................................... 5-7 Linking with Interface Libraries................................................. 5-9 Linking with Threading Libraries ............................................... 5-9 Notes on Linking .................................................................. 5-11 Building Custom Shared Objects................................................. 5-11 Intel MKL Custom Shared Object Builder.................................. 5-11 Specifying Makefile Parameters .............................................. 5-12 Specifying List of Functions.................................................... 5-12 Chapter 6 Managing Performance and Memory Using Intel® MKL Parallelism ....................................................... 6-1 Techniques to Set the Number of Threads .................................. 6-3 Avoiding Conflicts in the Execution Environment ......................... 6-3 Setting the Number of Threads Using OpenMP* Environment Variable .............................................................................. 6-4 v Contents Changing the Number of Threads at Run Time............................ 6-5 Using Additional Threading Control ........................................... 6-8 Tips and Techniques to Improve Performance ................................ 6-13 Coding Techniques................................................................. 6-13 Hardware Configuration Tips ................................................... 6-14 Managing Multi-core Performance ............................................ 6-15 Operating on Denormals........................................................