Developer Guide

Developer Guide for Intel® oneAPI Math Kernel Library macOS*

ID 766688
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Using the Custom Dynamically Linked Shared Library Builder

To build a custom dynamically linked shared library, use the following command:

make target [<options>]

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

Value

Comment

libintel64

The builder uses static Intel® oneAPI Math Kernel Library (oneMKL) interface, threading, and core libraries to build an Intel 64 dynamically linked shared library.

dylibuni

The builder uses the single dynamic library libmkl_rt.dylib to build an Intel 64 dynamically linked shared library.

help

The command prints Help on the custom dynamically linked shared library 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 = {lp64|ilp64}

Defines whether to use LP64 or ILP64 programming interfacefor the Intel 64architecture.The default value is lp64.

threading = {parallel|sequential}

Defines whether to use the Intel® oneAPI Math Kernel Library (oneMKL) in the threaded or sequential mode. The default value isparallel.

Prallel = {intel|tbb}

Specifies whether to use Intel OpenMP or Intel® oneTBB. The default value isintel.

cluster = {yes|no}

(For libintel64only) Specifies whether Intel® oneAPI Math Kernel Library (oneMKL) cluster components (BLACS, ScaLAPACK and/or CDFT) are needed to build the custom shared object. The default value isno.

blacs_mpi = {intelmpi|msmpi}

Specifies the pre-compiled Intel® oneAPI Math Kernel Library (oneMKL) BLACS library to use. Ignored if'cluster=no'. The default value is intelmpi.

All of the above parameters are optional. However, you must make the system and c-runtime (crt) libraries and link.exe available by setting the PATH and LIB environment variables appropriately. You can do this in the following ways:

  • Manually
  • If you are using the Intel compiler, use the compilervars.sh script with the appropriate 32-bit (x86) or 64-bit (x64 or amd-64) architecture flag.

In the simplest case, the command line is:

make ia32

and the missing options have default values. This command creates the  mkl_custom.dylib library . The command takes the list of functions from the user_listfile and uses the native Intel® oneAPI Math Kernel Library (oneMKL) error handlerxerbla.

Here is an example of a more complex case:

make intel64 export=my_func_list.txt name=mkl_small xerbla=my_xerbla.o

In this case, the command creates the mkl_small.dylib library. The command takes the list of functions from my_func_list.txt file and uses the error handler of the user my_xerbla.o.

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201