注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

一粒浮尘

飘渺虚无

 
 
 

日志

 
 

Using the ILP64 Interface vs. LP64 Interface  

2014-10-10 10:43:06|  分类: Intel |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Using the ILP64 Interface vs. LP64 Interface

The Intel MKL ILP64 libraries use the 64-bit integer type (necessary for indexing large arrays, with more than 231-1 elements), whereas the LP64 libraries index arrays with the 32-bit integer type.

The LP64 and ILP64 interfaces are implemented in the Interface layer. Link with the following interface libraries for the LP64 or ILP64 interface, respectively:

  • libmkl_intel_lp64.a or libmkl_intel_ilp64.a for static linking
  • libmkl_intel_lp64.so or libmkl_intel_ilp64.so for dynamic linking

The ILP64 interface provides for the following:

  • Support large data arrays (with more than 231-1 elements)
  • Enable compiling your Fortran code with the -i8 compiler option

The LP64 interface provides compatibility with the previous Intel MKL versions because "LP64" is just a new name for the only interface that the Intel MKL versions lower than 9.1 provided. Choose the ILP64 interface if your application uses Intel MKL for calculations with large data arrays or the library may be used so in future.

Intel MKL provides the same include directory for the ILP64 and LP64 interfaces.

Compiling for LP64/ILP64

The table below shows how to compile for the ILP64 and LP64 interfaces:

Fortran

Compiling for ILP64

ifort -i8 -I<mkl directory>/include ...

Compiling for LP64

ifort -I<mkl directory>/include ...

C or C++

Compiling for ILP64

icc -DMKL_ILP64 -I<mkl directory>/include ...

Compiling for LP64

icc -I<mkl directory>/include ...

Caution

Linking of an application compiled with the -i8 or -DMKL_ILP64 option to the LP64 libraries may result in unpredictable consequences and erroneous output.

Coding for ILP64

You do not need to change existing code if you are not using the ILP64 interface.

To migrate to ILP64 or write new code for ILP64, use appropriate types for parameters of the Intel MKL functions and subroutines:

Integer Types

Fortran

C or C++

32-bit integers

INTEGER*4 or
INTEGER(KIND=4)

int

Universal integers for ILP64/LP64:

  • 64-bit for ILP64

  • 32-bit otherwise

INTEGER
without specifying KIND

MKL_INT

Universal integers for ILP64/LP64:

  • 64-bit integers

INTEGER*8 or
INTEGER(KIND=8)

MKL_INT64

FFT interface integers for ILP64/LP64

INTEGER
without specifying KIND

MKL_LONG

To determine the type of an integer parameter of a function, use appropriate include files. For functions that support only a Fortran interface, use the C/C++ include files *.h.

The above table explains which integer parameters of functions become 64-bit and which remain 32-bit for ILP64. The table applies to most Intel MKL functions except some VML and VSL functions, which require integer parameters to be 64-bit or 32-bit regardless of the interface:

  • VML: The mode parameter of VML functions is 64-bit.

  • Random Number Generators (RNG):

    All discrete RNG except viRngUniformBits64 are 32-bit.

    The viRngUniformBits64 generator function and vslSkipAheadStream service function are 64-bit.

  • Summary Statistics: The estimate parameter of the vslsSSCompute/vsldSSCompute function is 64-bit.

Refer to the Intel MKL Reference Manual for more information.

To better understand ILP64 interface details, see also examples and tests.

Limitations

All Intel MKL function domains support ILP64 programming with the following exceptions:

  • FFTW interfaces to Intel MKL:
    • FFTW 2.x wrappers do not support ILP64.

    • FFTW 3.2 wrappers support ILP64 by a dedicated set of functions plan_guru64.

  • GMP* Arithmetic Functions do not support ILP64.

Note

GMP Arithmetic Functions are deprecated and will be removed in a future release.

  评论这张
 
阅读(800)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017