<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Inconsistent mkl_link_tool behavior in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145906#M26679</link>
    <description>&lt;P&gt;Intel Gurus,&lt;/P&gt;

&lt;P&gt;This is an odd one that I just can't seem to solve. Namely, on a SLES 11 cluster I have access to, I can do:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(1150) $ $MKLROOT/tools/mkl_link_tool -libs --os=lnx --compiler=gnu_f --parallel=no -check_mkl_presence

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.4
       ==========================================================

Output
======

Linking line:
 -L/usr/local/intel/2017/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
&lt;/PRE&gt;

&lt;P&gt;And on a SLES 12 cluster:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(569) $ $MKLROOT/tools/mkl_link_tool -libs --os=lnx --compiler=gnu_f --parallel=no -check_mkl_presence

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.4
       ==========================================================

Output
======

Linking line:
 -L/nasa/intel/Compiler/2017.4.196/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
&lt;/PRE&gt;

&lt;P&gt;Now, on my RHEL7 desktop:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(1075) $ $MKLROOT/tools/mkl_link_tool -libs --os=lnx --compiler=gnu_f --parallel=no -check_mkl_presence

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.4
       ==========================================================

Intel(R) MKL is not found in /ford1/local/intel/parallel_studio_xe_2017_composer_edition_for_fortran/compilers_and_libraries_2017.4.196/linux/mkl: include file  is not found. Please set architecture using --arch option or MKLROOT environment correctly

Configuration
=============

OS:                     lnx
Architecture:           intel64
Compiler:               gnu_f
Linking:                dynamic
Interface layer:        lp64
Parallel:               no
&lt;/PRE&gt;

&lt;P&gt;So on the RHEL desktop, it fails. And it fails...oddly. The modulefile I use on the desktop to create MKLROOT is the&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;exact&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;same as the one on the SLES 11 cluster except for paths. And MKLROOT is defined similarly on both:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(1152) $ echo $MKLROOT
/usr/local/intel/2017/compilers_and_libraries_2017.4.196/linux/mkl&lt;/PRE&gt;

&lt;PRE class="brush:bash;"&gt;(1076) $ echo $MKLROOT
/ford1/local/intel/parallel_studio_xe_2017_composer_edition_for_fortran/compilers_and_libraries_2017.4.196/linux/mkl
&lt;/PRE&gt;

&lt;P&gt;and MKLROOT is set correctly because I can find $MKLROOT/tools/mkl_link_tool on each...and that seems correct?&lt;/P&gt;

&lt;P&gt;And the arch was detected correctly, but even if I add it:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(1077) $ $MKLROOT/tools/mkl_link_tool -libs --os=lnx --compiler=gnu_f --parallel=no --arch=intel64 -check_mkl_presence

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.4
       ==========================================================

Intel(R) MKL is not found in /ford1/local/intel/parallel_studio_xe_2017_composer_edition_for_fortran/compilers_and_libraries_2017.4.196/linux/mkl: include file  is not found. Please set architecture using --arch option or MKLROOT environment correctly

Configuration
=============

OS:                     lnx
Architecture:           intel64
Compiler:               gnu_f
Linking:                dynamic
Interface layer:        lp64
Parallel:               no

&lt;/PRE&gt;

&lt;P&gt;Now, my hope is that mkl_link_tool was a fun Perl/Python script I could look inside, but no go, it's a compiled program. So, what "include file" is it looking for? It won't tell me (it looks like there is a blank space in the output), so I'm a bit stuck. Perhaps the system admins installed it incorrectly, but as near as I can tell the MKL installation on my desktop is roughly the same as that on the cluster, save the cluster admins installed much more stuff (more FFT, cluster, etc.).&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Matt&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2017 13:26:15 GMT</pubDate>
    <dc:creator>Matt_Thompson</dc:creator>
    <dc:date>2017-10-24T13:26:15Z</dc:date>
    <item>
      <title>Inconsistent mkl_link_tool behavior</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145906#M26679</link>
      <description>&lt;P&gt;Intel Gurus,&lt;/P&gt;

&lt;P&gt;This is an odd one that I just can't seem to solve. Namely, on a SLES 11 cluster I have access to, I can do:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(1150) $ $MKLROOT/tools/mkl_link_tool -libs --os=lnx --compiler=gnu_f --parallel=no -check_mkl_presence

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.4
       ==========================================================

Output
======

Linking line:
 -L/usr/local/intel/2017/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
&lt;/PRE&gt;

&lt;P&gt;And on a SLES 12 cluster:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(569) $ $MKLROOT/tools/mkl_link_tool -libs --os=lnx --compiler=gnu_f --parallel=no -check_mkl_presence

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.4
       ==========================================================

Output
======

Linking line:
 -L/nasa/intel/Compiler/2017.4.196/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
&lt;/PRE&gt;

&lt;P&gt;Now, on my RHEL7 desktop:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(1075) $ $MKLROOT/tools/mkl_link_tool -libs --os=lnx --compiler=gnu_f --parallel=no -check_mkl_presence

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.4
       ==========================================================

Intel(R) MKL is not found in /ford1/local/intel/parallel_studio_xe_2017_composer_edition_for_fortran/compilers_and_libraries_2017.4.196/linux/mkl: include file  is not found. Please set architecture using --arch option or MKLROOT environment correctly

Configuration
=============

OS:                     lnx
Architecture:           intel64
Compiler:               gnu_f
Linking:                dynamic
Interface layer:        lp64
Parallel:               no
&lt;/PRE&gt;

&lt;P&gt;So on the RHEL desktop, it fails. And it fails...oddly. The modulefile I use on the desktop to create MKLROOT is the&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;exact&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;same as the one on the SLES 11 cluster except for paths. And MKLROOT is defined similarly on both:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(1152) $ echo $MKLROOT
/usr/local/intel/2017/compilers_and_libraries_2017.4.196/linux/mkl&lt;/PRE&gt;

&lt;PRE class="brush:bash;"&gt;(1076) $ echo $MKLROOT
/ford1/local/intel/parallel_studio_xe_2017_composer_edition_for_fortran/compilers_and_libraries_2017.4.196/linux/mkl
&lt;/PRE&gt;

&lt;P&gt;and MKLROOT is set correctly because I can find $MKLROOT/tools/mkl_link_tool on each...and that seems correct?&lt;/P&gt;

&lt;P&gt;And the arch was detected correctly, but even if I add it:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(1077) $ $MKLROOT/tools/mkl_link_tool -libs --os=lnx --compiler=gnu_f --parallel=no --arch=intel64 -check_mkl_presence

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.4
       ==========================================================

Intel(R) MKL is not found in /ford1/local/intel/parallel_studio_xe_2017_composer_edition_for_fortran/compilers_and_libraries_2017.4.196/linux/mkl: include file  is not found. Please set architecture using --arch option or MKLROOT environment correctly

Configuration
=============

OS:                     lnx
Architecture:           intel64
Compiler:               gnu_f
Linking:                dynamic
Interface layer:        lp64
Parallel:               no

&lt;/PRE&gt;

&lt;P&gt;Now, my hope is that mkl_link_tool was a fun Perl/Python script I could look inside, but no go, it's a compiled program. So, what "include file" is it looking for? It won't tell me (it looks like there is a blank space in the output), so I'm a bit stuck. Perhaps the system admins installed it incorrectly, but as near as I can tell the MKL installation on my desktop is roughly the same as that on the cluster, save the cluster admins installed much more stuff (more FFT, cluster, etc.).&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 13:26:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145906#M26679</guid>
      <dc:creator>Matt_Thompson</dc:creator>
      <dc:date>2017-10-24T13:26:15Z</dc:date>
    </item>
    <item>
      <title>Additional. On my colleague's</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145907#M26680</link>
      <description>&lt;P&gt;Additional. On my colleague's Macbook Pro:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;$MKLROOT/tools/mkl_link_tool -libs --os=mac --compiler=intel_f --parallel=no -check_mkl_presence

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.5
       ==========================================================

Intel(R) MKL is not found in /opt/intel/compilers_and_libraries_2018.0.104/mac/mkl: include file  is not found. Please set architecture using --arch option or MKLROOT environment correctly

Configuration
=============

OS:                     mac
Architecture:           intel64
Compiler:               intel_f
Linking:                dynamic
Interface layer:        lp64
Parallel:               no&lt;/PRE&gt;

&lt;P&gt;So it does seem to be some "installed on cluster" vs "installed on desktop" issue? Maybe we aren't installing everything correctly?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 13:28:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145907#M26680</guid>
      <dc:creator>Matt_Thompson</dc:creator>
      <dc:date>2017-10-24T13:28:56Z</dc:date>
    </item>
    <item>
      <title>Hi Matt,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145908#M26681</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;

&lt;P&gt;I can reproduce your problem with 2017.4.196, but not all machines can produce, thus I suppose the link tool may require to check with mkl.h file under $MKLROOT/include when you use -check_mkl_presence option. I am wondering if you installed mkl for c on the RHEL7&amp;nbsp;? or just for fortran? Cause if you only installed mkl for fortran, there's no mkl.h. We will also check with script of link tool to find root cause.&lt;/P&gt;

&lt;P&gt;Currently, you may could try to remove -check_mkl_presence to avoid error message.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 08:35:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145908#M26681</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2017-10-25T08:35:00Z</dc:date>
    </item>
    <item>
      <title>Fiona,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145909#M26682</link>
      <description>&lt;P&gt;Fiona,&lt;/P&gt;

&lt;P&gt;We do not seem to have it. Since we only have a license for Intel Fortran, it's possible the sysadmins don't install MKL for C...or are they allowed to? I'll talk with them. I've never installed Intel Fortran outside of Betas, and then I usually just say "give me everything" so I get things like TBB which I've never used!&lt;/P&gt;

&lt;P&gt;As for the removal of -check_mkl_presence, I technically can't because of make. If I remove it I get:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;(102) $ $MKLROOT/tools/mkl_link_tool -libs --os=lnx --compiler=gnu_f --parallel=no --arch=intel64

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.4
       ==========================================================

Output
======

Linking line:
 -L$(MKLROOT)/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
&lt;/PRE&gt;

&lt;P&gt;But, I read that through a makefile with:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;  ifdef MKLROOT
     ifeq ($(wildcard $(MKLROOT)/tools/mkl_link_tool),$(MKLROOT)/tools/mkl_link_tool)
        LIB_SCI = $(shell $(MKLROOT)/tools/mkl_link_tool -libs --os=$(MKL_OS) --compiler=$(MKL_COMPILER) --parallel=no -check_mkl_presence)
     endif
  else
&lt;/PRE&gt;

&lt;P&gt;The issue is that the shell tries to resolve the $(MKLROOT). /bin/sh might know $MKLROOT, but not $(MKLROOT) so when I try to echo out LIB_SCI:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;/bin/sh: MKLROOT: command not found
         LIB_SCI =  -L/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
&lt;/PRE&gt;

&lt;P&gt;The $(MKLROOT) is failed, and the -L is resolved as a null-string.&lt;/P&gt;

&lt;P&gt;I was able to hack around it a bit, but I'll talk with my sysadmins.&lt;/P&gt;

&lt;P&gt;Any chance mkl_link_tool can failover if mkl.h is not there and look for a Fortran file (mkl.fi, say)?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 14:46:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145909#M26682</guid>
      <dc:creator>Matt_Thompson</dc:creator>
      <dc:date>2017-10-25T14:46:38Z</dc:date>
    </item>
    <item>
      <title>I talked with the sysadmins</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145910#M26683</link>
      <description>&lt;P&gt;I talked with the sysadmins and it looks like "Intel MKL core libraries for C/C++" are not part of the default install for the Parallel Studio Composer Edition for Fortran Linux. It's a custom build.&lt;/P&gt;

&lt;P&gt;I'm having them re-install, but it would be nice if mkl_link_tool would play nice with a "just Fortran" install.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 15:49:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145910#M26683</guid>
      <dc:creator>Matt_Thompson</dc:creator>
      <dc:date>2017-10-25T15:49:18Z</dc:date>
    </item>
    <item>
      <title>Hi Matt,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145911#M26684</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;

&lt;P&gt;The problem has been solved and will target on MKL2018u2, thank you.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2018 01:29:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Inconsistent-mkl-link-tool-behavior/m-p/1145911#M26684</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2018-01-13T01:29:50Z</dc:date>
    </item>
  </channel>
</rss>

