<?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 I can build with the Intel in Intel® Distribution for Python*</title>
    <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093949#M413</link>
    <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I can build with the Intel compilers using the NumPy distutils, but the Intel compilers are not recognized by Python distutils. &amp;nbsp;The package I work on performs runtime code generation in Cython and compiles via the Cython pyxinstall command. &amp;nbsp;I can specify the compiler used by this function by generating a distutils.cfg file. &amp;nbsp;However, on Windows, the only options are the default VS compilers, or mingw32. &amp;nbsp;Intel compilers are not recognized, and mingw32 is not Py35 compatible. &amp;nbsp;VS is not an option as I need to include complex.h, and the Cython code that is generated is not compatible with the complex.h from VS 2015. &amp;nbsp;I thought that since Intel has their own compilers that their Python distro would have support for them.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;- Paul&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2016 03:32:36 GMT</pubDate>
    <dc:creator>Paul_N_2</dc:creator>
    <dc:date>2016-06-14T03:32:36Z</dc:date>
    <item>
      <title>Using Intel compilers in distutils</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093947#M411</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;It seems that it is not possible to use the Intel compilers with distutils build and build_ext functionality under Py35 (and likely Py27 as well). &amp;nbsp;Is this going to be supported in later versions? &amp;nbsp;This would aid in getting around limitations set by Visual Studio 2015 (e.g. importing complex.h in Cython).&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;- Paul&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jun 2016 18:34:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093947#M411</guid>
      <dc:creator>Paul_N_2</dc:creator>
      <dc:date>2016-06-12T18:34:01Z</dc:date>
    </item>
    <item>
      <title>Hi Paul,</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093948#M412</link>
      <description>&lt;P&gt;Hi Paul,&lt;/P&gt;

&lt;P&gt;it should be possible to compile with icc.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Setting environment variable CC to icc should work without Intel's distribution (yes, also on windows).&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;What's the issue you're seeing?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;frank&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 08:20:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093948#M412</guid>
      <dc:creator>Frank_S_Intel</dc:creator>
      <dc:date>2016-06-13T08:20:58Z</dc:date>
    </item>
    <item>
      <title>I can build with the Intel</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093949#M413</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I can build with the Intel compilers using the NumPy distutils, but the Intel compilers are not recognized by Python distutils. &amp;nbsp;The package I work on performs runtime code generation in Cython and compiles via the Cython pyxinstall command. &amp;nbsp;I can specify the compiler used by this function by generating a distutils.cfg file. &amp;nbsp;However, on Windows, the only options are the default VS compilers, or mingw32. &amp;nbsp;Intel compilers are not recognized, and mingw32 is not Py35 compatible. &amp;nbsp;VS is not an option as I need to include complex.h, and the Cython code that is generated is not compatible with the complex.h from VS 2015. &amp;nbsp;I thought that since Intel has their own compilers that their Python distro would have support for them.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;- Paul&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 03:32:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093949#M413</guid>
      <dc:creator>Paul_N_2</dc:creator>
      <dc:date>2016-06-14T03:32:36Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093950#M414</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;What are the required environment variables to set the Fortran compiler?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Setting FC77 and FC90 to ifort enables .f compilation, but during a particular build, gfortran seems to be called for linking.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Rob&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 19:54:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093950#M414</guid>
      <dc:creator>P__Robert</dc:creator>
      <dc:date>2016-06-16T19:54:46Z</dc:date>
    </item>
    <item>
      <title>Hi Paul,</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093951#M415</link>
      <description>&lt;P&gt;&lt;BR /&gt;
	Hi Paul,&lt;/P&gt;

&lt;P&gt;Assuming that you have Intel compiler set to PATH, here's a simple example of how you'd use Intel compiler with cython:&lt;/P&gt;

&lt;P&gt;1. Create &lt;STRONG&gt;helloworld.pyx&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE class="brush:python;"&gt;print "Hello World"&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;2. Create &lt;STRONG&gt;setup.py&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:python;"&gt;from distutils.core import setup
from Cython.Build import cythonize

setup(
    ext_modules = cythonize("helloworld.pyx")
)&lt;/PRE&gt;

&lt;P&gt;3. Run:&lt;BR /&gt;
	&lt;STRONG&gt;LDSHARED="icc -shared" CC=icc python setup.py build_ext --inplace&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	To check if the build was successful:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;python -c "import helloworld"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;We have modified distutils so that it pays heed to environment variables on Windows. In order to use Intel compilers on Windows, you'd have to set these to environment before building:&lt;BR /&gt;
	&lt;STRONG&gt;SET CC=icl&lt;BR /&gt;
	SET CXX=icl&lt;BR /&gt;
	SET LD=xilink&lt;BR /&gt;
	SET AR=xilib&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Rohit&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 14:42:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093951#M415</guid>
      <dc:creator>Rohit_J_Intel</dc:creator>
      <dc:date>2016-06-24T14:42:37Z</dc:date>
    </item>
    <item>
      <title>An example illustrating the</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093952#M416</link>
      <description>&lt;P&gt;An example illustrating the manner in which Fortran code can be built as a native extension using Intel compiler and Numpy's distutils -&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1. Create &lt;STRONG&gt;helloworld.f&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;subroutine foo
    print*, "Hello World!"
end&lt;/PRE&gt;

&lt;P&gt;2. Create &lt;STRONG&gt;setup.py&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE class="brush:python;"&gt;from numpy.distutils.core import Extension
from numpy.distutils.core import setup

if __name__ == "__main__":
    ext = Extension(name = 'helloworld', sources = ['helloworld.f'])
    setup(ext_modules = [ext])&lt;/PRE&gt;

&lt;P&gt;3.&amp;nbsp;For building,&amp;nbsp;&lt;BR /&gt;
	i. &amp;nbsp;On Windows: &lt;STRONG&gt;python setup.py build_ext --inplace --fcompiler=intelvem&amp;nbsp;--compiler=intelemw&lt;/STRONG&gt;&lt;BR /&gt;
	ii. On Linux / OSX: &lt;STRONG&gt;python setup.py build_ext --inplace --fcompiler=intelem&amp;nbsp;--compiler=intelem&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;To check if the module was correctly built:&lt;STRONG&gt; python -c "from helloworld import foo; foo()"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Rohit&lt;BR /&gt;
	(p.s. If you have trouble importing this module on Linux, you should do the following:&lt;BR /&gt;
	1. cd &lt;STRONG&gt;IDP_installation/lib/python(2.7|3.5)/site-packages/numpy/distutils/fcompiler&lt;/STRONG&gt;&lt;BR /&gt;
	2. In &lt;STRONG&gt;intel.py&lt;/STRONG&gt;, remove all instances of &lt;STRONG&gt;-openmp&lt;/STRONG&gt;.&lt;BR /&gt;
	3. Rebuild your code using the instructions listed above.)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 19:02:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Using-Intel-compilers-in-distutils/m-p/1093952#M416</guid>
      <dc:creator>Rohit_J_Intel</dc:creator>
      <dc:date>2016-06-24T19:02:00Z</dc:date>
    </item>
  </channel>
</rss>

