Intel® Math Kernel Library 2018 Update 2 Developer Guide

Using the Custom Dynamic-link Library Builder in the Command-line Mode

To build a custom DLL, use the following command:

nmake target [<options>]

The following table lists possible values of target and explains what the command does for each value:

Value

Comment

libia32

The builder uses static Intel MKL interface, threading, and core libraries to build a custom DLL for the IA-32 architecture.

libintel64

The builder uses static Intel MKL interface, threading, and core libraries to build a custom DLL for the Intel® 64 architecture.

dllia32

The builder uses the single dynamic library libmkl_rt.dll to build a custom DLL for the IA-32 architecture.

dllintel64

The builder uses the single dynamic library libmkl_rt.dll to build a custom DLL for the Intel® 64 architecture.

help

The command prints Help on the custom DLL builder

The <options> placeholder stands for the list of parameters that define macros to be used by the makefile. The following table describes these parameters:

Parameter [Values]

Description

interface

Defines which programming interface to use.Possible values:

  • For the IA-32 architecture, {cdecl|stdcall}. The default value is cdecl.
  • For the Intel 64 architecture, {lp64|ilp64}. The default value is lp64.
threading = {parallel|sequential}

Defines whether to use the Intel MKL in the threaded or sequential mode. The default value is parallel.

export = <file name>

Specifies the full name of the file that contains the list of entry-point functions to be included in the DLL. The default name is user_example_list (no extension).

name = <dll name>

Specifies the name of the dll and interface library to be created. By default, the names of the created libraries are mkl_custom.dll and mkl_custom.lib.

xerbla = <error handler>

Specifies the name of the object file <user_xerbla>.obj that contains the user's error handler. The makefile adds this error handler to the library for use instead of the default Intel MKL error handler xerbla. If you omit this parameter, the native Intel MKL xerbla is used. See the description of the xerbla function in the Intel MKL Developer Reference on how to develop your own error handler. For the IA-32 architecture, the object file should be in the interface defined by the interface macro (cdecl or stdcall).

MKLROOT = <mkl directory>

Specifies the location of Intel MKL libraries used to build the custom DLL. By default, the builder uses the Intel MKL installation directory.

buf_lib

Manages resolution of the __security_cookie external references in the custom DLL on systems based on the Intel® 64 architecture.

By default, the makefile uses the bufferoverflowu.lib library of Microsoft SDK builds 1289 or higher. This library resolves the __security_cookie external references.

To avoid using this library, set the empty value of this parameter. Therefore, if you are using an older SDK, set buf_lib= .

CAUTION

Use the buf_lib parameter only with the empty value. Incorrect value of the parameter causes builder errors.

crt = <c run-time library>

Specifies the name of the Microsoft C run-time library to be used to build the custom DLL. By default, the builder uses msvcrt.lib.

manifest = {yes|no|embed}

Manages the creation of a Microsoft manifest for the custom DLL:

  • If manifest=yes, the manifest file with the name defined by the name parameter above and the manifest extension will be created.
  • If manifest=no, the manifest file will not be created.
  • If manifest=embed, the manifest will be embedded into the DLL.

By default, the builder does not use the manifest parameter.

All the above parameters are optional.

In the simplest case, the command line is nmake ia32, and the missing options have default values. This command creates the  mkl_custom.dll and mkl_custom.lib libraries with the cdecl interface for processors using the IA-32 architecture. The command takes the list of functions from the functions_list file and uses the native Intel MKL error handler xerbla.

An example of a more complex case follows:

nmake ia32 interface=stdcall export=my_func_list.txt name=mkl_smallxerbla=my_xerbla.obj

In this case, the command creates the mkl_small.dll and mkl_small.lib libraries with the stdcall interface for processors using the IA-32 architecture. The command takes the list of functions from my_func_list.txt file and uses the user's error handler my_xerbla.obj.

The process is similar for processors using the Intel® 64 architecture.

Optimization Notice

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804

See Also