Developer Guide

Developer Guide for Intel® oneAPI Math Kernel Library Linux*

ID 766690
Date 12/16/2022

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

Document Table of Contents

Automating the Process of Setting Environment Variables

To automate setting of the INCLUDE, MKLROOT, LD_LIBRARY_PATH, MANPATH, LIBRARY_PATH, CPATH, and NLSPATH environment variables, add vars.*sh to your shell profile so that each time you login, the script automatically executes and sets the paths to the appropriate Intel® oneAPI Math Kernel Library directories. To do this, with a local user account, edit the following files by adding the appropriate script to the path manipulation section right before exporting variables:






or ~/.profile

# setting up oneMKL environment for bash

. <absolute_path_to_installed_oneMKL>/bin
/ [<arch>] [mod] [lp64|ilp64]



# setting up oneMKL environment for sh

. <absolute_path_to_installed_oneMKL>/bin
/ [<arch>] [mod] [lp64|ilp64]



# setting up oneMKL environment for sh

. <absolute_path_to_installed_oneMKL>/bin
/vars.csh [<arch>] [mod] [lp64|ilp64]

In the above commands, the architecture parameter <arch> is one of {ia32|intel64|mic}.

If you have super user permissions, add the same commands to a general-systemfile in/etc/profile(for bash and sh) or in/etc/csh.login(for csh).


Before uninstalling Intel® oneAPI Math Kernel Library, remove the above commands from all profile files where the script execution was added. Otherwise you may experience problems logging in.