Intel(R) Math Kernel Library for the Windows* OS User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
Intel® Math Kernel Library for the Windows* OS User’s Guide August 2008 Document Number: 315930-006US World Wide Web: http://developer.intel.com Version Version Information Date -001 Original issue. Documents Intel® Math Kernel Library (Intel® MKL) 9.1 beta January 2007 release. -002 Documents Intel® MKL 9.1 gold release. Document restructured. More June 2007 aspects of ILP64 interface discussed. Section “Selecting Between Static and Dynamic Linking” added to chapter 5; section “Changing the Number of Pro- cessors for Threading at Run Time” and details on redefining memory func- tions added to chapter 6; section ”Calling LAPACK, BLAS, and CBLAS Routines from C Language Environments” added to chapter 7. Cluster content is orga- nized into one separate chapter 9 “Working with Intel® Math Kernel Library Cluster Software” and restructured, appropriate links added. -003 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. 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 Edi- tion to reflect consolidation of the respective products. -004 Documents Intel® MKL 10.0 Gold release. Intel® Compatibility OpenMP* run- October 2007 time compiler library (libiomp) has been described. -005 Documents Intel® MKL 10.1 beta release. Information on dummy libraries in May 2008 Table "High-level directory structure" has been further detailed. Information on the Intel MKL configuration file removed. Instructions on creation/configur- ing of a project running an Intel MKL example in the Microsoft Visual Studio* IDE have been added to chapter 4. Section "Support for Boost uBLAS Matrix- Matrix Multiplication" has been added to chapter 7. Chapter “Getting Assis- tance for Programming in the Microsoft Visual Studio* IDE” has been added. -006 Documents Intel® MKL 10.1 gold release. Linking examples for IA-32 archi- August 2008 tecture and section "Linking with Computational Libraries" have been added to chapter 5. Integration of DSS/PARDISO into the layered structure has been- documented. Two Fortran code examples have been added. Integration of a Microsoft Visual Studio IDE project with Intel MKL 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 © 2007 - 2008, Intel Corporation. All rights reserved. Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation. 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-3 Chapter 2 Getting Started Checking Your Installation............................................................ 2-1 Obtaining Version Information ...................................................... 2-2 Compiler Support ....................................................................... 2-2 Using Intel MKL Code Examples .................................................... 2-3 Before You Begin Using Intel MKL ................................................. 2-3 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-10 Directory Structure in Detail....................................................... 3-10 Dummy Libraries .................................................................. 3-21 Contents of the Documentation Directory................................. 3-22 iv Intel® Math Kernel Library User’s Guide Chapter 4 Configuring Your Development Environment Setting Environment Variables...................................................... 4-1 Configuring the Microsoft Visual C/C++* Development System to Link with Intel MKL.......................................................................... 4-1 Configuring Intel® Visual Fortran to Link with Intel MKL .................. 4-2 Integrating a Microsoft Visual Studio* IDE Project with Intel MKL...... 4-2 Configuring a Project to Run an Intel MKL Example in the Microsoft Visual Studio* IDE 2008............................................................ 4-4 Creating and Configuring the Intel® C/C++ and/or Microsoft Visual C++* 2008 Project............................................................... 4-5 Creating and Configuring the Intel® Visual Fortran Project........... 4-8 Support Files for Intel MKL Examples ...................................... 4-11 Known Limitations ................................................................ 4-11 Note on the Configuration file for Out-of-Core (OOC) DSS/PARDISO* Solver................................................................................... 4-11 Chapter 5 Linking Your Application with Intel® Math Kernel Library Selecting Between Linkage Models................................................ 5-1 Static Linking......................................................................... 5-1 Dynamic Linking..................................................................... 5-1 Making the Choice .................................................................. 5-2 Intel MKL-specific Linking Recommendations .............................. 5-2 Selecting Libraries to Link............................................................ 5-3 Linking Examples ................................................................... 5-4 Linking with Threading Libraries ............................................... 5-6 Linking with Computational Libraries ......................................... 5-8 Note on Linking with Threading Libraries ................................. 5-11 Note for Users of Systems Based on Intel® 64 and IA-64 Architectures ..................................................................... 5-11 Building Custom DLL................................................................