<?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 Thanks a lot Victoryia, the in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940038#M14415</link>
    <description>&lt;P&gt;Thanks a lot Victoryia, the testcase runs through now and R seems to compile just fine.&lt;/P&gt;
&lt;P&gt;@ Ying:&lt;/P&gt;
&lt;P&gt;thank you for having taken the time to explain what was wrong with the link part.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2013 09:03:08 GMT</pubDate>
    <dc:creator>Thomas_U_</dc:creator>
    <dc:date>2013-07-03T09:03:08Z</dc:date>
    <item>
      <title>Compiling R with serial MKL (failed due to zdotu error?)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940034#M14411</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;I'm trying to get R 3.0.1 to compile using composer_xe_2013.2.146 using the serial MKL. I followed the instructions from &lt;A href="http://software.intel.com/en-us/articles/using-intel-mkl-with-r" target="_blank"&gt;http://software.intel.com/en-us/articles/using-intel-mkl-with-r&lt;/A&gt; , yet at the configure-step, I get&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;checking whether double complex BLAS can be used... no&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;configure then goes on to compile R &lt;STRONG&gt;&lt;EM&gt;without &lt;/EM&gt;&lt;/STRONG&gt;linking the MKL (i.e., the resulting binary uses R's own BLAS implementation, which offers subpar performance).&lt;/P&gt;
&lt;P&gt;Searching around the web, it would appear that I am far from the only one having run this issue, yet I was unable to find any solutions for it. (I found an old discussion about the topic here: &lt;A href="http://software.intel.com/en-us/forums/topic/326016&amp;nbsp;" target="_blank"&gt;http://software.intel.com/en-us/forums/topic/326016&amp;nbsp;&lt;/A&gt;; ... yet it didn't include any solution steps, and in fact I believe in the end the user ended up with an R version that didn't even link with the MKL).&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I investigated the configure-failure, and it stems from the following failed test:&lt;/P&gt;
&lt;P&gt;a Fortran-file (the attached conftestf.f) calls zdotu, and checks the results against a manual dot-product. It sets a failure flag if the zdotu-result and the manual dot-product don't match. This is then called from the C file&amp;nbsp; conftest.c (I'm assuming to test Fortran&amp;lt;&amp;gt;C interfacing or something), which returns the failure-flag as a return code.&lt;/P&gt;
&lt;P&gt;I've attached the files to this post (slightly modified so the failure flag gets printed to stdout). I compile the files with:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;export LIBDIR="/apps/intel/compiler/composer_xe_2013.2.146/mkl/lib/intel64/:/apps/intel/compiler/composer_xe_2013.2.146/compiler/lib/intel64/"&lt;/P&gt;
&lt;P&gt;ifort -c conftestf.f -L$LIBDIR -lmkl_gf_lp64 -lmkl_sequential -lmkl_core&lt;BR /&gt;icc -c conftest.c -L$LIBDIR -lmkl_gf_lp64 -lmkl_sequential -lmkl_core&lt;BR /&gt;icc conftestf.o conftest.o -o conftest -L$LIBDIR -lmkl_gf_lp64 -lmkl_sequential -lmkl_core&lt;BR /&gt;./conftest&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The call to ./conftest will print out the failure flag, which on my machine will always output 1. This makes the configure-test fail and leads R to ignore the MKL I want to link it with.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For full reference, this is how I call ./configure:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;/apps/intel/compiler/composer_xe_2013.2.146/bin/compilervars_global.sh intel64&lt;BR /&gt;/apps/intel/compiler/composer_xe_2013.2.146/mkl/bin/vars/mklvars.sh intel64&lt;BR /&gt;export CC='icc -std=c99 '&lt;BR /&gt;export F77='ifort '&lt;BR /&gt;export CXX='icpc '&lt;BR /&gt;export FC='ifort '&lt;BR /&gt;export CPPFLAGS="-O3 -DNDEBUG -g -march=native "&lt;BR /&gt;export CFLAGS=$CPPFLAGS&lt;BR /&gt;export FCFLAGS=$CPPFLAGS&lt;BR /&gt;export FFLAGS=$CPPFLAGS&lt;BR /&gt;&lt;BR /&gt;export MKL_LIB_PATH=/apps/intel/compiler/composer_xe_2013.2.146/mkl/lib/intel64:/apps/intel/compiler/composer_xe_2013.2.146/compiler/lib/intel64/&lt;BR /&gt;export LD_LIBRARY_PATH=$MKL_LIB_PATH&lt;BR /&gt;export MKL=" -L${MKL_LIB_PATH} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core "&lt;BR /&gt;./configure --with-blas="$MKL" --enable-threads=posix --with-lapack --enable-memory-profiling --enable-R-shlib&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2013 13:23:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940034#M14411</guid>
      <dc:creator>Thomas_U_</dc:creator>
      <dc:date>2013-07-02T13:23:58Z</dc:date>
    </item>
    <item>
      <title>I forgot to add:  any help in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940035#M14412</link>
      <description>&lt;P&gt;I forgot to add:&amp;nbsp; any help in resolving this issue / any pointers on how to get R to compile with the serial MKL would be very appreciated! :)&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2013 13:24:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940035#M14412</guid>
      <dc:creator>Thomas_U_</dc:creator>
      <dc:date>2013-07-02T13:24:53Z</dc:date>
    </item>
    <item>
      <title>Hello Thomas,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940036#M14413</link>
      <description>&lt;P&gt;Hello Thomas,&lt;/P&gt;
&lt;P&gt;It seems there is a bug in MKL link line you are using. Please try to build ./conftest using following commands:&lt;/P&gt;
&lt;P&gt;export MKL_ROOT=/apps/intel/compiler/composer_xe_2013.2.146&lt;/P&gt;
&lt;P&gt;ifort -c conftestf.f&lt;BR /&gt;icc -c conftest.c&lt;BR /&gt;icc -o conftest -L${MKL_ROOT}/mkl/lib/intel64 conftestf.o conftest.o -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread&lt;BR /&gt;./conftest&lt;/P&gt;
&lt;P&gt;Please also change MKL environment variable before calling ./configure as follows:&lt;/P&gt;
&lt;P&gt;export MKL=" -L${MKL_LIB_PATH} -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread "&lt;/P&gt;
&lt;P&gt;There is a very useful tool that could be used to check the correctness of MKL link line: &lt;A href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/"&gt;http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Victoriya&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2013 14:36:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940036#M14413</guid>
      <dc:creator>VictoriyaS_F_Intel</dc:creator>
      <dc:date>2013-07-02T14:36:00Z</dc:date>
    </item>
    <item>
      <title>Hi Thomas,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940037#M14414</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;
&lt;P&gt;I update the forum of 326016 today and saw your question here. Thanks a lot for the test case, which help us&amp;nbsp;expose all of&amp;nbsp;the problems actually.&lt;/P&gt;
&lt;P&gt;As victoriya reply, you have 2 problems in the build.&lt;/P&gt;
&lt;P&gt;1. The key problem&amp;nbsp;:&amp;nbsp; the interface :&amp;nbsp; mk_gf_lp64&amp;nbsp; vs. mkl_intel_lp64.&lt;/P&gt;
&lt;P&gt;libmkl_gf_lp64&amp;nbsp; is for LP64 interface library for the GNU Fortran compilers.&lt;/P&gt;
&lt;P&gt;and libmkl_intel_lp64 is for intel compilers.&lt;/P&gt;
&lt;P&gt;So when you call intel fotran compiler , the libmkl_intel_lp64 should be used.&lt;/P&gt;
&lt;P&gt;some user may just have icc, thus they have to gfortran +icc + mkl_gf.&lt;/P&gt;
&lt;P&gt;2. the MKL_LIB_PATH.&lt;/P&gt;
&lt;P&gt;the ld (linker) actully don't recognize &lt;BR /&gt;-L/apps/intel/compiler/composer_xe_2013.2.146/mkl/lib/intel64:/apps/intel/compiler/composer_xe_2013.2.146/compiler/lib/intel64/.&amp;nbsp; Which use &lt;STRONG&gt;:&amp;nbsp;&lt;/STRONG&gt; link two path.&lt;/P&gt;
&lt;P&gt;It is wrong syntax,&amp;nbsp; you may need&amp;nbsp; either&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;-L/apps/intel/compiler/composer_xe_2013.2.146/mkl/lib/intel64&amp;nbsp;&amp;nbsp; (&amp;nbsp;-L/apps/intel/compiler/composer_xe_2013.2.146/compiler/lib/intel64/ can be removed as you are using sequential library)&lt;/P&gt;
&lt;P&gt;or don't do the MKL_LIB_PATH setting,&amp;nbsp;as you have done by&lt;/P&gt;
&lt;P&gt;&amp;gt;source mklvars.sh intel64, which do right setting including LD_LIBRARY_PATH ( which are used in run time) and LIBRARY_PATH (which are used in build time) , both the two env allow use the symbol &lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;( /apps/intel/compiler/composer_xe_2013.2.146/mkl/bin/&lt;STRONG&gt;vars&lt;/STRONG&gt;/mklvars.sh intel64,&amp;nbsp; can you check the folder, by default, it is /apps/intel/compiler/composer_xe_2013.2.146/mkl/bin//mklvars.sh intel64)&lt;/P&gt;
&lt;P&gt;Hope&amp;nbsp;it helps,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 08:56:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940037#M14414</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2013-07-03T08:56:51Z</dc:date>
    </item>
    <item>
      <title>Thanks a lot Victoryia, the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940038#M14415</link>
      <description>&lt;P&gt;Thanks a lot Victoryia, the testcase runs through now and R seems to compile just fine.&lt;/P&gt;
&lt;P&gt;@ Ying:&lt;/P&gt;
&lt;P&gt;thank you for having taken the time to explain what was wrong with the link part.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 09:03:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940038#M14415</guid>
      <dc:creator>Thomas_U_</dc:creator>
      <dc:date>2013-07-03T09:03:08Z</dc:date>
    </item>
    <item>
      <title>I cannot find libmk_gf_lp64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940039#M14416</link>
      <description>&lt;P&gt;I cannot find lib&lt;SPAN style="font-size: 12px;"&gt;mk_gf_lp64.dylib on my Mac (High Sierra). I have installed&amp;nbsp;&lt;/SPAN&gt;mkl_2018.3.185 twice already and it seems not be there (anymore). Also, the&amp;nbsp;mkl_link_line_advisor doesn't use it either... I guess things have changed since 2013. Nonetheless, I still cannot run the configure test correctly that is provided in R and get a&amp;nbsp; segmentation fault 11 after successful compilation and linking.&lt;/P&gt;

&lt;P&gt;It would be great if you could still comment... Thx&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 15:23:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940039#M14416</guid>
      <dc:creator>jagla__bernd</dc:creator>
      <dc:date>2018-08-28T15:23:08Z</dc:date>
    </item>
    <item>
      <title>Hi Jagla, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940040#M14417</link>
      <description>&lt;P&gt;Hi Jagla,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I guess, the problem is that we don't have gfotraned supported for Mac. so you can't find it.&amp;nbsp; if possible, could you&amp;nbsp; try or use Intel Compiler C and fotran + MKL together&amp;nbsp; :&amp;nbsp;https://software.intel.com/en-us/articles/build-r-301-with-intel-c-compiler-and-intel-mkl-on-linux&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Ying&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 08:57:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-R-with-serial-MKL-failed-due-to-zdotu-error/m-p/940040#M14417</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-08-31T08:57:13Z</dc:date>
    </item>
  </channel>
</rss>

