Intel® MKL Command-line Link Tool

The Intel® Math Kernel Library (Intel® MKL) Link Tool is an executable program that can help to build an application using Intel® MKL or simplify building the application with Intel® MKL. The Intel MKL Link Tool can add all needed options and libraries for the application and advises on which environment variables to use.
The tool supports three modes:

  • Inquiry mode: In this mode, the tool can return the compiler options, libraries, or environment variables necessary to build and execute the application. Usage:

    • Get Intel MKL libraries:
        mkl_link_tool –libs [Intel MKL Link Tool options]

    • Get compilation options:
        mkl_link_tool -opts [Intel MKL Link Tool options]

    • Get environment variables for application executable:
        mkl_link_tool -env [Intel MKL Link Tool options]

  • Compilation mode: In this mode the Intel MKL Link Tool can build the application. Usage:
      mkl_link_tool [options] <compiler> [options2] file1 [file2 ...]


      options represents any number of  Link Tool options 
      compiler represents the compiler name: ifort, icc (icpc, icl), cl, gcc (g++), gfortran, pgcc (pgcp), pgf77 (pgf90, pgf95, pgfortran), mpiic, mpiifort, mpic (mpic++), mpif77 (mpif90, mpif95)
      options2 represents any number of compiler options


  • Interactive mode: This mode allows users to go through all possible Intel MKL Link Tool supported options. The output provides libraries, options, or environment variables as in the inquiry mode, or a built application as in the compilation mode (depending on what you specify). Usage:

      mkl_link_tool -interactive

Use the -help option for full help with the Intel MKL Link Tool and to show the defaults for the current system.

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


anonymous's picture

Hey gryghash,

I was also was looking for it in our box and couldn't find it ... I guess it was not installed (?) (... I do not administer the box where we have intel_mkl_developer_XE_2011 installed). In any case, Intel provides "similar" facility online:

gryghash's picture

I have the MKL that comes with Intel Cluster Studio 2012, but there is no mkl_link_tool at all. I did a find starting at $MKLROOT .

Yury Boyarkin (Intel)'s picture

there's a small correction regarding Interactive mode
to launch it please use the following option
mkl_link_tool -interactive

anonymous's picture

Yes, sounds nice. But where do we get this mkl_link_tool ?

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.