Community
cancel
Showing results for 
Search instead for 
Did you mean: 
e_ustimenko
Beginner
197 Views

MKL vs Eclipse

Hello, my friends developers.
But after settings Eclipse out some errors:
ld: cannot find -l/home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32/libmkl_intel_thread.a
ld: cannot find -l/home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32/libmkl_core.a
ld: cannot find -l/home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32/libmkl_intel.a
ld: cannot find -l/home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32/libmkl_intel_thread.ald: cannot find -l/home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32/libmkl_core.ald: cannot find -l/home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32/libmkl_intel.a
From your article I can't do
"For Managed Make projects, you can specify settings for a particular build. To do this:..."

Thank u for help.
0 Kudos
11 Replies
Dmitry_B_Intel
Employee
197 Views

Hi Evgeny,

The dash-ell options (-lxxx) should receive the name of the library less the "lib" prefix and suffix, i.e. should look like -lmkl_intel_thread -lmkl_core and so on. The path should go to dash-cap-ell option (-L). User guide says about this:

  • Specify the names of the Intel MKL libraries to link with your application, for example, mkl_intel_lp64, mkl_intel_thread_lp64, mkl_core, and iomp5 (compilers typically require library names rather than library file names, so omit the "lib" prefix and "a" extension).

  • Thanks
    Dima

    e_ustimenko
    Beginner
    197 Views

    Where I should write iomp5 in Eclipse?
    e_ustimenko
    Beginner
    197 Views

    Let's I write my setting step by step, and u will correct my acts.
    1. Go toC/C++ General>Paths and Symbols>Includesand set the Intel Math Kernel Library (Intel MKL) include path, that is, /home/evgeny/Soft/IntelParallelStudio/mkl/include
    2.Go toC/C++ Build>Settings>Tool Settings, and add to Additional Libraries(-l) three libraries:
      • /home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32/libmkl_intel.a
      • /home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32/libmkl_intel_thread.a
      • /home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32/libmkl_core.a
    3. Then add to Search Directory for libraries(-L)/home/evgeny/Soft/IntelParallelStudio/mkl/lib/ia32
    After that I don't understand, what I should do next step.
    Dmitry_B_Intel
    Employee
    197 Views

    I don't have an installation of Eclipse that I could use follow your steps.

    In the "Additional libraries (-l)" you should add this, instead of what you shown:
    mkl_intel
    mkl_intel_thread
    mkl_core

    Here you could also add iomp5

    The "Library search directory (-L)" looks set correctly. You should probably also add the path to compiler libraries here as well:
    /home/evgeny/Soft/IntelParallelStudio/compiler/lib/ia32
    or
    /home/evgeny/Soft/IntelParallelStudio/lib/ia32

    Alternatively, ifIntel compiler is used as linker, then adding linker options -mkl and -openmp should do the work. The former adds necessary libraries and locates them in proper places of your installation of Parallel Studio. The latter one does the same with repect to OpenMP runtime (i.e. iomp5).

    Dima

    e_ustimenko
    Beginner
    197 Views

    Thank u for an answer, but I have an error, when try to run the application.

    error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory
    I try change directories, where found thelibiomp5.so, but it isn't helpfull.
    Gennady_F_Intel
    Moderator
    197 Views

    please add this dir to the LD_LIBRARY_PATH
    e_ustimenko
    Beginner
    197 Views

    What is the LD_LIBRARY_PATH? Where I should find it, because in my file system I haven't that file.
    timintel
    Beginner
    197 Views

    LD_LIBRARY_PATH environment variable is set correctly for the OpenMP library by source'ing the compilervars script with current Intel compiler installations, or the mklvars script in some past versions of MKL.
    It's the usual method in Unix-like systems for adding paths to search for shared libraries; the ldconfig method may be available as an alternative.
    e_ustimenko
    Beginner
    197 Views

    I try to write in console "source LD_LIBRARY_PATH /home/evgeny/Soft/IntelParallelStudio/lib/ia32" and I see
    bash:LD_LIBRARY_PATH: No such file or directory
    timintel
    Beginner
    197 Views

    If you don't want to source a provided script, such as the compilervars.sh script in the current releases, you simply put the path in LD_LIBRARY_PATH e.g.:
    export LD_LIBRARY_PATH=/home/evgeny/Soft/IntelParallelStudio/lib/ia32
    If that's the directory where your .so resides, and you use an sh compatible shell.
    mecej4
    Black Belt
    197 Views

    LD_LIBRARY_PATH is not a file; it is an environment variable that must be set properly for executables produced by the Intel compiler to work properly. Please type the command (do not type the first '$' yourself; it stands for whatever the command prompt string is on your system)

    $ echo $LD_LIBRARY_PATH

    and report the output.

    To set LD_LIBRARY_PATH to the path that you gave, the command is

    $ export LD_LIBRARY_PATH=/home/evgeny/Soft/IntelParallelStudio/lib/ia32
    Reply