<?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 Beginner's guide to compile MKL in windows10 without a full VS2015 installation in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Beginner-s-guide-to-compile-MKL-in-windows10-without-a-full/m-p/1069082#M22131</link>
    <description>&lt;P&gt;I would like to share my experience compiling MKL in windows 10 without a full VS2015 installation. Hopefully this will save some unnecessary trial and error efforts.&amp;nbsp;Since I was doing it on my Intel laptop, which&amp;nbsp;has a very precious and limited SSD space (unless you charge your department for an SSD upgrade), I cannot afford (&amp;gt;16GB) full VS2015&amp;nbsp;installation on my precious SSD.&lt;/P&gt;

&lt;P&gt;Here are the steps:&lt;/P&gt;

&lt;P&gt;1. You can get a full-fledge (&amp;gt;16GB installation) VS2015 from ISM (Intel Software Market). But I opted for visualcppbuildtools_full.exe&amp;nbsp;from &lt;A href="http://landinghub.visualstudio.com/visual-cpp-build-tools" rel="nofollow"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="http://landinghub.visualstudio.com/visual-cpp-build-tools" target="_blank"&gt;http://landinghub.visualstudio.com/visual-cpp-build-tools&lt;/A&gt;. Download and install it (You can skip the windows SDK to save disk space)&lt;/P&gt;

&lt;P&gt;2.&amp;nbsp;Download and install&amp;nbsp;MKL from &lt;A href="https://software.intel.com/en-us/intel-mkl"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://software.intel.com/en-us/intel-mkl" target="_blank"&gt;https://software.intel.com/en-us/intel-mkl&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;3. Assuming that no1 and no2 are installed to the default target directory. Edit "compilervar_arch.bat" in the following path: C:\IntelSWTools\compilers_and_libraries_2017.2.187\windows\bin\compilervars_arch.bat&lt;/P&gt;

&lt;P&gt;(ie. comment out the existence check for devenv.exe, which&amp;nbsp;I don't have without a full VS2015 installation; Left is the edit, right is the original file)&lt;/P&gt;

&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="compilervars_arch.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/10310iA70AC1576B3EE053/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="compilervars_arch.png" alt="compilervars_arch.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Now we are ready to play with some examples provided in the MKL installation: C:\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl\examples&lt;/P&gt;

&lt;P&gt;I would recommend unzipping it out and copying a small examples to your "My Documents" area&lt;/P&gt;

&lt;P&gt;Let me walk you&amp;nbsp;with one simple example. I will show you 3 ways&amp;nbsp;of compiling it. Let's try out examples_core_c\cblas\. Copy out data\cblas_sgemm_batchx.d, source\cblas_sgemm_batchx.c, source\common_func.c, source\mkl_example.h, cblas.lst, makefile. Please maintain the same directory structure as in the example folder:&lt;/P&gt;

&lt;P&gt;.\&lt;BR /&gt;
	|-- cblas.lst&lt;BR /&gt;
	|-- data&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; `-- cblas_sgemm_batchx.d&lt;BR /&gt;
	|-- makefile&lt;BR /&gt;
	|-- source&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; |-- cblas_sgemm_batchx.c&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; |-- common_func.c&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; `-- mkl_example.h&lt;/P&gt;

&lt;P&gt;Open up a windows console: windows-R: cmd, cd into the folder you copied over&amp;nbsp;that example, ie. when you dir, you should&amp;nbsp;see&amp;nbsp;makefile, cblas.lst, data, source.&amp;nbsp;Then type the following:&lt;/P&gt;

&lt;P&gt;(I have a 64bit windows10 hp laptop, which is a quite generic IntelIT laptop&amp;nbsp;for every employee, hence the "intel64" at the end of the following line)&lt;/P&gt;

&lt;P&gt;&amp;gt;call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\bin\compilervars.bat" intel64&lt;/P&gt;

&lt;P&gt;This command will setup your environment variables. This will also call "compilervars_arch.bat", that in turn calls "vcvarsall.bat" (the VS2015 env var setup)&lt;/P&gt;

&lt;P&gt;These are the 3 ways to compile:&lt;/P&gt;

&lt;P&gt;1. Using nmake from VS2015, since the MKL example provides us&amp;nbsp;a "makefile". I don't have&amp;nbsp;icc on my machine, so I will just use cl.exe from VS2015&lt;/P&gt;

&lt;P&gt;&amp;gt;nmake libintel64 function=cblas_sgemm_batch+ compiler=msvs /f makefile&lt;/P&gt;

&lt;P&gt;The exe in under _results\ folder. Run this to checkout the exe&lt;/P&gt;

&lt;P&gt;&amp;gt;_results\msvs_lp64_parallel_intel64_lib\cblas_sgemm_batchx.exe data\cblas_sgemm_batchx.d&lt;/P&gt;

&lt;P&gt;2. Directly invoking cl.exe&lt;/P&gt;

&lt;P&gt;&amp;gt;cl.exe /w /MT /Femy_cl /IC:\Users\hpandana\myhomedir\mkl_test\my_cl\source source\common_func.c source\cblas_sgemm_batchx.c mkl_core.lib mkl_intel_lp64.lib mkl_intel_thread.lib libiomp5md.lib&lt;/P&gt;

&lt;P&gt;(some explanations: /Fe specifies my output exe filename, eg. my_cl.exe in this example; I copied over that example to this path: C:\Users\hpandana\myhomedir\mkl_test\my_cl, so please edit&amp;nbsp;your /I include path&amp;nbsp;accordingly. This method does not require "makefile", and its supporting "cblas.lst" file)&lt;/P&gt;

&lt;P&gt;C:\Users\hpandana\myhomedir\mkl_test\my_cl\&lt;BR /&gt;
	|-- data&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; `-- cblas_sgemm_batchx.d&lt;BR /&gt;
	`-- source&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; |-- cblas_sgemm_batchx.c&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; |-- common_func.c&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; `-- mkl_example.h&lt;/P&gt;

&lt;P&gt;Just like before, to&amp;nbsp;try out the exe:&lt;/P&gt;

&lt;P&gt;&amp;gt;my_cl.exe data\cblas_sgemm_batchx.d&lt;/P&gt;

&lt;P&gt;3. Using gcc. I have the strawberry perl (from ISM) installed,&amp;nbsp;that comes with gcc. Any mingw gcc should work as well. Again&amp;nbsp;it is installed at the default target directory (ie. C:\strawberry). I copied over the example again:&lt;/P&gt;

&lt;P&gt;C:\Users\hpandana\myhomedir\mkl_test\my_gcc\&lt;BR /&gt;
	|-- data&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; `-- cblas_sgemm_batchx.d&lt;BR /&gt;
	`-- source&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; |-- cblas_sgemm_batchx.c&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; |-- common_func.c&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; `-- mkl_example.h&lt;/P&gt;

&lt;P&gt;(please edit the -I include paths, and -L libpaths&amp;nbsp;in the following line accordingly)&lt;/P&gt;

&lt;P&gt;&amp;gt;gcc.exe -o my_gcc -IC:\strawberry\c\include -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl\include" -IC:\Users\hpandana\myhomedir\mkl_test\my_cl\source -LC:\strawberry\c\lib -LC:\strawberry\c\lib\gcc\x86_64-w64-mingw32\4.7.3 -L"C:\IntelSWTools\compilers_and_libraries_2017.2.187\windows\redist\intel64_win\mkl" -L"C:\IntelSWTools\compilers_and_libraries_2017.2.187\windows\redist\intel64_win\compiler" source\common_func.c source\cblas_sgemm_batchx.c -lmkl_core -lmkl_rt -lmkl_intel_thread -liomp5md&lt;/P&gt;

&lt;P&gt;Again, to try out the exe:&lt;/P&gt;

&lt;P&gt;&amp;gt;my_gcc.exe data\cblas_sgemm_batchx.d&lt;/P&gt;

&lt;P&gt;That's all. Hope it helps&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Herman&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2017 00:35:40 GMT</pubDate>
    <dc:creator>Herman_P_Intel</dc:creator>
    <dc:date>2017-03-29T00:35:40Z</dc:date>
    <item>
      <title>Beginner's guide to compile MKL in windows10 without a full VS2015 installation</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Beginner-s-guide-to-compile-MKL-in-windows10-without-a-full/m-p/1069082#M22131</link>
      <description>&lt;P&gt;I would like to share my experience compiling MKL in windows 10 without a full VS2015 installation. Hopefully this will save some unnecessary trial and error efforts.&amp;nbsp;Since I was doing it on my Intel laptop, which&amp;nbsp;has a very precious and limited SSD space (unless you charge your department for an SSD upgrade), I cannot afford (&amp;gt;16GB) full VS2015&amp;nbsp;installation on my precious SSD.&lt;/P&gt;

&lt;P&gt;Here are the steps:&lt;/P&gt;

&lt;P&gt;1. You can get a full-fledge (&amp;gt;16GB installation) VS2015 from ISM (Intel Software Market). But I opted for visualcppbuildtools_full.exe&amp;nbsp;from &lt;A href="http://landinghub.visualstudio.com/visual-cpp-build-tools" rel="nofollow"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="http://landinghub.visualstudio.com/visual-cpp-build-tools" target="_blank"&gt;http://landinghub.visualstudio.com/visual-cpp-build-tools&lt;/A&gt;. Download and install it (You can skip the windows SDK to save disk space)&lt;/P&gt;

&lt;P&gt;2.&amp;nbsp;Download and install&amp;nbsp;MKL from &lt;A href="https://software.intel.com/en-us/intel-mkl"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://software.intel.com/en-us/intel-mkl" target="_blank"&gt;https://software.intel.com/en-us/intel-mkl&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;3. Assuming that no1 and no2 are installed to the default target directory. Edit "compilervar_arch.bat" in the following path: C:\IntelSWTools\compilers_and_libraries_2017.2.187\windows\bin\compilervars_arch.bat&lt;/P&gt;

&lt;P&gt;(ie. comment out the existence check for devenv.exe, which&amp;nbsp;I don't have without a full VS2015 installation; Left is the edit, right is the original file)&lt;/P&gt;

&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="compilervars_arch.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/10310iA70AC1576B3EE053/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="compilervars_arch.png" alt="compilervars_arch.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Now we are ready to play with some examples provided in the MKL installation: C:\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl\examples&lt;/P&gt;

&lt;P&gt;I would recommend unzipping it out and copying a small examples to your "My Documents" area&lt;/P&gt;

&lt;P&gt;Let me walk you&amp;nbsp;with one simple example. I will show you 3 ways&amp;nbsp;of compiling it. Let's try out examples_core_c\cblas\. Copy out data\cblas_sgemm_batchx.d, source\cblas_sgemm_batchx.c, source\common_func.c, source\mkl_example.h, cblas.lst, makefile. Please maintain the same directory structure as in the example folder:&lt;/P&gt;

&lt;P&gt;.\&lt;BR /&gt;
	|-- cblas.lst&lt;BR /&gt;
	|-- data&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; `-- cblas_sgemm_batchx.d&lt;BR /&gt;
	|-- makefile&lt;BR /&gt;
	|-- source&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; |-- cblas_sgemm_batchx.c&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; |-- common_func.c&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; `-- mkl_example.h&lt;/P&gt;

&lt;P&gt;Open up a windows console: windows-R: cmd, cd into the folder you copied over&amp;nbsp;that example, ie. when you dir, you should&amp;nbsp;see&amp;nbsp;makefile, cblas.lst, data, source.&amp;nbsp;Then type the following:&lt;/P&gt;

&lt;P&gt;(I have a 64bit windows10 hp laptop, which is a quite generic IntelIT laptop&amp;nbsp;for every employee, hence the "intel64" at the end of the following line)&lt;/P&gt;

&lt;P&gt;&amp;gt;call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\bin\compilervars.bat" intel64&lt;/P&gt;

&lt;P&gt;This command will setup your environment variables. This will also call "compilervars_arch.bat", that in turn calls "vcvarsall.bat" (the VS2015 env var setup)&lt;/P&gt;

&lt;P&gt;These are the 3 ways to compile:&lt;/P&gt;

&lt;P&gt;1. Using nmake from VS2015, since the MKL example provides us&amp;nbsp;a "makefile". I don't have&amp;nbsp;icc on my machine, so I will just use cl.exe from VS2015&lt;/P&gt;

&lt;P&gt;&amp;gt;nmake libintel64 function=cblas_sgemm_batch+ compiler=msvs /f makefile&lt;/P&gt;

&lt;P&gt;The exe in under _results\ folder. Run this to checkout the exe&lt;/P&gt;

&lt;P&gt;&amp;gt;_results\msvs_lp64_parallel_intel64_lib\cblas_sgemm_batchx.exe data\cblas_sgemm_batchx.d&lt;/P&gt;

&lt;P&gt;2. Directly invoking cl.exe&lt;/P&gt;

&lt;P&gt;&amp;gt;cl.exe /w /MT /Femy_cl /IC:\Users\hpandana\myhomedir\mkl_test\my_cl\source source\common_func.c source\cblas_sgemm_batchx.c mkl_core.lib mkl_intel_lp64.lib mkl_intel_thread.lib libiomp5md.lib&lt;/P&gt;

&lt;P&gt;(some explanations: /Fe specifies my output exe filename, eg. my_cl.exe in this example; I copied over that example to this path: C:\Users\hpandana\myhomedir\mkl_test\my_cl, so please edit&amp;nbsp;your /I include path&amp;nbsp;accordingly. This method does not require "makefile", and its supporting "cblas.lst" file)&lt;/P&gt;

&lt;P&gt;C:\Users\hpandana\myhomedir\mkl_test\my_cl\&lt;BR /&gt;
	|-- data&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; `-- cblas_sgemm_batchx.d&lt;BR /&gt;
	`-- source&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; |-- cblas_sgemm_batchx.c&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; |-- common_func.c&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; `-- mkl_example.h&lt;/P&gt;

&lt;P&gt;Just like before, to&amp;nbsp;try out the exe:&lt;/P&gt;

&lt;P&gt;&amp;gt;my_cl.exe data\cblas_sgemm_batchx.d&lt;/P&gt;

&lt;P&gt;3. Using gcc. I have the strawberry perl (from ISM) installed,&amp;nbsp;that comes with gcc. Any mingw gcc should work as well. Again&amp;nbsp;it is installed at the default target directory (ie. C:\strawberry). I copied over the example again:&lt;/P&gt;

&lt;P&gt;C:\Users\hpandana\myhomedir\mkl_test\my_gcc\&lt;BR /&gt;
	|-- data&lt;BR /&gt;
	|&amp;nbsp;&amp;nbsp; `-- cblas_sgemm_batchx.d&lt;BR /&gt;
	`-- source&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; |-- cblas_sgemm_batchx.c&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; |-- common_func.c&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; `-- mkl_example.h&lt;/P&gt;

&lt;P&gt;(please edit the -I include paths, and -L libpaths&amp;nbsp;in the following line accordingly)&lt;/P&gt;

&lt;P&gt;&amp;gt;gcc.exe -o my_gcc -IC:\strawberry\c\include -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl\include" -IC:\Users\hpandana\myhomedir\mkl_test\my_cl\source -LC:\strawberry\c\lib -LC:\strawberry\c\lib\gcc\x86_64-w64-mingw32\4.7.3 -L"C:\IntelSWTools\compilers_and_libraries_2017.2.187\windows\redist\intel64_win\mkl" -L"C:\IntelSWTools\compilers_and_libraries_2017.2.187\windows\redist\intel64_win\compiler" source\common_func.c source\cblas_sgemm_batchx.c -lmkl_core -lmkl_rt -lmkl_intel_thread -liomp5md&lt;/P&gt;

&lt;P&gt;Again, to try out the exe:&lt;/P&gt;

&lt;P&gt;&amp;gt;my_gcc.exe data\cblas_sgemm_batchx.d&lt;/P&gt;

&lt;P&gt;That's all. Hope it helps&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Herman&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 00:35:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Beginner-s-guide-to-compile-MKL-in-windows10-without-a-full/m-p/1069082#M22131</guid>
      <dc:creator>Herman_P_Intel</dc:creator>
      <dc:date>2017-03-29T00:35:40Z</dc:date>
    </item>
    <item>
      <title>Hi Herman, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Beginner-s-guide-to-compile-MKL-in-windows10-without-a-full/m-p/1069083#M22132</link>
      <description>&lt;P&gt;Hi Herman,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks for sharing the experience. I think it would be helpful if some guy would like to compile MKL or other Intel library without VS full package installation, they probably could refer this case.&lt;/P&gt;

&lt;P&gt;regards,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 02:05:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Beginner-s-guide-to-compile-MKL-in-windows10-without-a-full/m-p/1069083#M22132</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2017-03-29T02:05:24Z</dc:date>
    </item>
  </channel>
</rss>

