<?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 Newbie question on setting environment variables and linking in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Newbie-question-on-setting-environment-variables-and-linking/m-p/1118308#M24798</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I just downloaded and installed Intel MKL on my Windows 10 machine. I'm trying to follow instructions on this page so that I can get started:&lt;/P&gt;

&lt;P&gt;https://software.intel.com/en-us/articles/intel-mkl-113-getting-started"&lt;/P&gt;

&lt;P&gt;I presume that, as in manual installation of LAPACK, gfortran, etc, which I had done before, I need to add the path to the MKL library in my environment variables (Control Panel -&amp;gt; System -&amp;gt; Advanced System Settings -&amp;gt; 'Advanced' tab -&amp;gt; Environment Variables -&amp;gt; Add/Edit). Am I correct? What should be the path?&lt;/P&gt;

&lt;P&gt;I tried to follow the instructions above, but was confused.&lt;/P&gt;

&lt;P&gt;There it says:&lt;/P&gt;

&lt;P&gt;"&lt;EM&gt;A script (batch file on Windows, shell script on other platforms) located in the &amp;lt;mkl install directory&amp;gt;&lt;SPAN style="color:rgb(102, 102, 102)"&gt;&amp;gt;\ compilers_and_libraries_2016\windows\mkl\bin\ directory (by default, it is C:\Program Files (x86)\IntelSWTools\&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color:rgb(102, 102, 102)"&gt;compilers_and_libraries_2016\windows\mkl\bin\) &amp;nbsp;&lt;/SPAN&gt;can be used to set the MKLROOT, LIB, INCLUDE and any required system-specific environment variables to point to the appropriate MKL library directories&lt;/EM&gt;."&lt;/P&gt;

&lt;P&gt;I can locate this easily. But when I try to run things like&lt;/P&gt;

&lt;P&gt;mklvars ia32&lt;/P&gt;

&lt;P&gt;in that folder through Command Prompt, I really don't get anything. Am I doing the right thing anyway?&lt;/P&gt;

&lt;P&gt;The instructions also say&lt;/P&gt;

&lt;P align="left"&gt;"&lt;EM&gt;On a Windows system the following batch files are available to configure the environment for building Intel MKL applications:&lt;/EM&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;EM&gt;mkl\bin\mklvars.bat&amp;nbsp; &amp;lt;arch&amp;gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;EM&gt;or&lt;/EM&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;EM&gt;IA-32 Intel® Architecture:&amp;nbsp; \mkl \bin\ia32\mklvars_ia32.bat&lt;BR /&gt;
	Intel® 64 Architecture:&amp;nbsp; \mkl \bin\intel64\mklvars_intel64.bat&lt;/EM&gt;"&lt;/P&gt;

&lt;P align="left"&gt;I presume that the MKLROOT directory is &lt;EM&gt;&lt;SPAN style="color:rgb(102, 102, 102)"&gt;C:\Program Files (x86)\IntelSWTools\&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color:rgb(102, 102, 102)"&gt;compilers_and_libraries_2016\windows\mkl\bin\&lt;/SPAN&gt;&lt;/EM&gt;, but I can't find the folders ia32 and intel64, or the files mklvars_ia32.bat and mklvars_intel64.bat anywhere.&lt;/P&gt;

&lt;P align="left"&gt;So how should I set the environment variables so that I can compile my source code files through gfortran in Command Prompt? What line should I use to compile and link in Command Prompt?&lt;/P&gt;

&lt;P align="left"&gt;Thanks.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2016 00:30:21 GMT</pubDate>
    <dc:creator>Charles_L_</dc:creator>
    <dc:date>2016-07-06T00:30:21Z</dc:date>
    <item>
      <title>Newbie question on setting environment variables and linking</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Newbie-question-on-setting-environment-variables-and-linking/m-p/1118308#M24798</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I just downloaded and installed Intel MKL on my Windows 10 machine. I'm trying to follow instructions on this page so that I can get started:&lt;/P&gt;

&lt;P&gt;https://software.intel.com/en-us/articles/intel-mkl-113-getting-started"&lt;/P&gt;

&lt;P&gt;I presume that, as in manual installation of LAPACK, gfortran, etc, which I had done before, I need to add the path to the MKL library in my environment variables (Control Panel -&amp;gt; System -&amp;gt; Advanced System Settings -&amp;gt; 'Advanced' tab -&amp;gt; Environment Variables -&amp;gt; Add/Edit). Am I correct? What should be the path?&lt;/P&gt;

&lt;P&gt;I tried to follow the instructions above, but was confused.&lt;/P&gt;

&lt;P&gt;There it says:&lt;/P&gt;

&lt;P&gt;"&lt;EM&gt;A script (batch file on Windows, shell script on other platforms) located in the &amp;lt;mkl install directory&amp;gt;&lt;SPAN style="color:rgb(102, 102, 102)"&gt;&amp;gt;\ compilers_and_libraries_2016\windows\mkl\bin\ directory (by default, it is C:\Program Files (x86)\IntelSWTools\&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color:rgb(102, 102, 102)"&gt;compilers_and_libraries_2016\windows\mkl\bin\) &amp;nbsp;&lt;/SPAN&gt;can be used to set the MKLROOT, LIB, INCLUDE and any required system-specific environment variables to point to the appropriate MKL library directories&lt;/EM&gt;."&lt;/P&gt;

&lt;P&gt;I can locate this easily. But when I try to run things like&lt;/P&gt;

&lt;P&gt;mklvars ia32&lt;/P&gt;

&lt;P&gt;in that folder through Command Prompt, I really don't get anything. Am I doing the right thing anyway?&lt;/P&gt;

&lt;P&gt;The instructions also say&lt;/P&gt;

&lt;P align="left"&gt;"&lt;EM&gt;On a Windows system the following batch files are available to configure the environment for building Intel MKL applications:&lt;/EM&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;EM&gt;mkl\bin\mklvars.bat&amp;nbsp; &amp;lt;arch&amp;gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;EM&gt;or&lt;/EM&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;EM&gt;IA-32 Intel® Architecture:&amp;nbsp; \mkl \bin\ia32\mklvars_ia32.bat&lt;BR /&gt;
	Intel® 64 Architecture:&amp;nbsp; \mkl \bin\intel64\mklvars_intel64.bat&lt;/EM&gt;"&lt;/P&gt;

&lt;P align="left"&gt;I presume that the MKLROOT directory is &lt;EM&gt;&lt;SPAN style="color:rgb(102, 102, 102)"&gt;C:\Program Files (x86)\IntelSWTools\&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color:rgb(102, 102, 102)"&gt;compilers_and_libraries_2016\windows\mkl\bin\&lt;/SPAN&gt;&lt;/EM&gt;, but I can't find the folders ia32 and intel64, or the files mklvars_ia32.bat and mklvars_intel64.bat anywhere.&lt;/P&gt;

&lt;P align="left"&gt;So how should I set the environment variables so that I can compile my source code files through gfortran in Command Prompt? What line should I use to compile and link in Command Prompt?&lt;/P&gt;

&lt;P align="left"&gt;Thanks.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 00:30:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Newbie-question-on-setting-environment-variables-and-linking/m-p/1118308#M24798</guid>
      <dc:creator>Charles_L_</dc:creator>
      <dc:date>2016-07-06T00:30:21Z</dc:date>
    </item>
    <item>
      <title>Unfortunately, mkl for</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Newbie-question-on-setting-environment-variables-and-linking/m-p/1118309#M24799</link>
      <description>&lt;P&gt;Unfortunately, mkl for windows isn't set up for use with gfortran. For use with msvc++, the .bat script ought to add the relevant entries in PATH and INCLUDE. &amp;nbsp;The mkl link advisor web app should give examples of the supported usages for linking.&lt;/P&gt;

&lt;P&gt;You would not want permanent conflicting Windows environment variables for mkl and equivalent non-Intel libraries.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;There are pre-built open source libraries such as lapack compatible with some popular versions of gfortran which cover much of the features of mkl sequential.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 02:38:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Newbie-question-on-setting-environment-variables-and-linking/m-p/1118309#M24799</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2016-07-06T02:38:00Z</dc:date>
    </item>
    <item>
      <title>Hi Charles, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Newbie-question-on-setting-environment-variables-and-linking/m-p/1118310#M24800</link>
      <description>&lt;P&gt;Hi Charles,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Right, under windows,&lt;/P&gt;

&lt;P&gt;for C language, MKL only support MSVC ++, or intel C/C++ compiler. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;for fortran language, only support PGI fortran compiler &amp;amp;&amp;nbsp;Intel(R) Fortran Compiler.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Under linux, it can support GNU g++ and gfortran.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;So you may try install one linux Virtual Machine, then try MKL + gfortran.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;STRONG style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;Under Windows*:&amp;nbsp;&lt;/STRONG&gt;&lt;BR style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;" /&gt;
	&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;The&amp;nbsp;command line is like below,&lt;/SPAN&gt;&lt;BR style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;" /&gt;
	&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;&amp;gt;\mkl\bin\mklvars.bat" ia32&lt;/SPAN&gt;&lt;BR style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;" /&gt;
	&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;&amp;gt;cl.exe mkl_lab_solution.c &amp;nbsp;mkl_intel_c.lib mkl_core.lib mkl_intel_thread.lib libiomp5md.lib&lt;/SPAN&gt;&lt;BR style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;" /&gt;
	&lt;BR style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;" /&gt;
	&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;If with Intel&amp;nbsp;Composer XE,&amp;nbsp;as&amp;nbsp;intel mkl is&amp;nbsp;intergrated to&amp;nbsp;it. The command line&amp;nbsp;is simpler,&lt;/SPAN&gt;&lt;BR style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;" /&gt;
	&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;&amp;gt;&amp;nbsp;icl.exe mkl_lab_solution.c /Qmkl&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;Under Linux:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;if with gfortran&lt;/SPAN&gt;&lt;BR style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;" /&gt;
	&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;$source /opt/intel/mkl/bin/mklvars.sh ia32&lt;/SPAN&gt;&lt;BR style="box-sizing: border-box; color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;" /&gt;
	&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;$gfortran &amp;nbsp;a.for&amp;nbsp;&lt;/SPAN&gt;-Wl,--no-as-needed -L${MKLROOT}/lib/ia32 -lmkl_gf -lmkl_core -lmkl_sequential -lpthread -lm -ldl​&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 19.6px;"&gt;Best Regards,&lt;BR /&gt;
	Ying&lt;/SPAN&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 03:29:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Newbie-question-on-setting-environment-variables-and-linking/m-p/1118310#M24800</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-07-06T03:29:45Z</dc:date>
    </item>
  </channel>
</rss>

