Developer Guide

  • 2021.1
  • 12/04/2020
  • Public Content
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
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
IA-32 architecture
$module load
mkl32/<version>
For
Intel® oneAPI Math Kernel Library
IA-64
architecture
$module load mkl
/<version>
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
IA-32 architecture
$module unload
mkl32/<version>
For
Intel® oneAPI Math Kernel Library
IA-64
architecture
$module unload mkl
/<version>

Product and Performance Information

1

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