Developer Guide

Developer Guide for Intel® oneAPI Math Kernel Library Linux*

ID 766690
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

Modulefiles to Set Environment Variables

As an alternative, you can use modulefiles to set the environment on Linux*. When the installation of Intel® oneAPI Math Kernel Library (oneMKL) for Linux* is complete, you need to set some environment variables. First, setup modulefiles and directories in <oneapi_root>:

$./modulefiles-setup.sh
$module use modulefiles

Load modulefile:

Architecture Command
For Intel® oneAPI Math Kernel Library (oneMKL) IA-32 architecture $module load mkl32/<version>
For Intel® oneAPI Math Kernel Library (oneMKL) IA-64 architecture $module load mkl/<version>
NOTE:
All existing variables will retain their original values and new values will be prepended to the following variables: LD_LIBRARY_PATH, LIBRARY_PATH, CPATH, PKG_CONFIG_PATH, NLSPATH, TBBROOT . Since MKLROOT should contain only one path, it will be set to the new value and any old value of this variable will be lost.

Unloading the module resets the modified environment variables to their original values and new variables that were created will be undefined. MKLROOT will be undefined on module unload.

Architecture Command
For Intel® oneAPI Math Kernel Library (oneMKL) IA-32 architecture $module unload mkl32/<version>
For Intel® oneAPI Math Kernel Library (oneMKL) IA-64 architecture $module unload mkl/<version>