Setting Environment Variables

When the installation of Intel MKL for macOS* is complete, set the INCLUDE, MKLROOT, DYLD_LIBRARY_PATH, MANPATH, LIBRARY_PATH, CPATH, and NLSPATH environment variables in the command shell using one of the script files in the bin subdirectory of the Intel MKL installation directory.

Choose the script corresponding to your command shell:

Shell

Script File

C

mklvars.csh

Bash

mklvars.sh

The scripts accept the parameters, explained in the following table:

Setting Specified

Required
(Yes/No)

Possible Values

Comment

Architecture

Yes,
when applicable

ia32

intel64

 

Use of Intel MKL Fortran modules precompiled with the Intel® Fortran compiler

No

mod

Supply this parameter only if you are using this compiler.

Programming interface (LP64 or ILP64)

No

lp64, default

ilp64

 

For example:

  • The command
    mklvars.sh ia32
    sets the environment for Intel MKL to use the IA-32 architecture.
  • The command
    mklvars.sh intel64 mod ilp64
    sets the environment for Intel MKL to use the Intel 64 architecture, ILP64 programming interface, and Fortran modules.
  • The command
    mklvars.sh intel64 mod
    sets the environment for Intel MKL to use the Intel 64 architecture, LP64 interface, and Fortran modules.

Note

Supply the parameter specifying the architecture first, if it is needed. Values of the other two parameters can be listed in any order.

For more complete information about compiler optimizations, see our Optimization Notice.