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.