Visible to Intel only — GUID: GUID-5AED4A85-5343-48BC-B78B-7636D164B53A
Visible to Intel only — GUID: GUID-5AED4A85-5343-48BC-B78B-7636D164B53A
Using the Custom Shared Object Builder
To build a custom shared object, 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 |
---|---|
libia32 | The builder uses static Intel® oneAPI Math Kernel Library (oneMKL) interface, threading, and core libraries to build a custom shared object for the IA-32 architecture. |
libintel64 | The builder uses static Intel® oneAPI Math Kernel Library (oneMKL) interface, threading, and core libraries to build a custom shared object for the Intel® 64 architecture. |
help | The command prints Help on the custom shared object 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 is parallel. |
parallel = {intel|tbb|gnu} | Specifies whether to use Intel OpenMP, Intel® oneTBB, or GNU OpenMP (for the GNU compiler only). The default value is intel. |
cluster = {yes|no} | (For libintel64 only) 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 is no. |
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. |
blacs_name = <lib name> | Specifies the name (without extension) of a custom Intel® oneAPI Math Kernel Library (oneMKL) BLACS library to use. Ignored if'cluster=no'. 'blacs_mpi' is ignored if 'blacs_name' was explicitly specified. The default value is mkl_blacs_<blacs_mpi>_<interface>. |
mpi = <lib name> | Specifies the name (without extension) of the MPI library used to build the custom DLL. Ignored if 'cluster=no'. The default value is impi. |
export = <file name> | Specifies the full name of the file that contains the list of entry-point functions to be included in the shared object. The default name is user_example_list (no extension). |
name = <so name> | Specifies the name of the library to be created. By default, the names of the created library is mkl_custom.so. |
xerbla = <error handler> | Specifies the name of the object file <user_xerbla>.o that contains the user's error handler. The makefile adds this error handler to the library for use instead of the default Intel® oneAPI Math Kernel Library (oneMKL) error handler xerbla. If you omit this parameter, the native Intel® oneAPI Math Kernel Library (oneMKL)xerbla is used. See the description of the xerbla function in the Intel® oneAPI Math Kernel Library (oneMKL) Developer Reference to develop your own error handler. |
MKLROOT = <mkl directory> | Specifies the location of Intel® oneAPI Math Kernel Library (oneMKL) libraries used to build the customshared object. By default, the builder uses the Intel® oneAPI Math Kernel Library (oneMKL) installation directory. |
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 setvars.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 libia32
and the missing options have default values. This command creates the mkl_custom.so library. The command takes the list of functions from the user_example_list file and uses the native Intel® oneAPI Math Kernel Library (oneMKL) error handlerxerbla.
Here is an example of a more complex case:
make libintel64 export=my_func_list name=mkl_small xerbla=my_xerbla.o
In this case, the command creates the mkl_small.so library. The command takes the list of functions from the my_func_list 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 |