<?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 The CPU compiler uses the in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947253#M18602</link>
    <description>&lt;P&gt;The CPU compiler uses the presence of _Cilk_shared to invoke the MIC compiler.&amp;nbsp; If the mkl libraries had _Cilk_shared in them then we would be always generating code for MIC even if the application does not do any offload.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2013 21:34:10 GMT</pubDate>
    <dc:creator>Ravi_N_Intel</dc:creator>
    <dc:date>2013-05-06T21:34:10Z</dc:date>
    <item>
      <title>Using mkl/fftw in Cilk_shared functions</title>
      <link>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947248#M18597</link>
      <description>&lt;P&gt;Apologies if this is already asked and answered; the forum search isn't great...&lt;/P&gt;
&lt;P&gt;What's involved in calling the MKL fftw wrappers from a _Cilk_shared function?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;src/math/fft_mkl.c(238): error: illegal to call a non-shared function in a _Cilk_shared context&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fftwf_execute(fftobject-&amp;gt;plan);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I feel like I'm missing something rather fundamental...&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 10:00:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947248#M18597</guid>
      <dc:creator>phik</dc:creator>
      <dc:date>2013-05-02T10:00:25Z</dc:date>
    </item>
    <item>
      <title>A function must be written as</title>
      <link>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947249#M18598</link>
      <description>&lt;P&gt;A function must be written as a _Cilk_shared function before it can be used in a _Cilk_shared context. There is nothing you as a user can do to change this. And in general, the fftw wrappers are not thread safe. Depending on what you are trying to do, the fftw wrappers might not be you best choice. Are you trying to port code that is already using fftw calls?&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2013 17:44:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947249#M18598</guid>
      <dc:creator>Frances_R_Intel</dc:creator>
      <dc:date>2013-05-03T17:44:14Z</dc:date>
    </item>
    <item>
      <title>Hi Frances--</title>
      <link>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947250#M18599</link>
      <description>&lt;P&gt;Hi Frances--&lt;/P&gt;
&lt;P&gt;Thanks for your prompt reply!&lt;/P&gt;
&lt;P&gt;I understand that I can't do it as a user, but Intel goes to such great lengths to tell us that the MKL libraries are provided both for the CPU and the MIC -- so it seemed inconceivable to me that these would not be _Cilk_shared functions?&amp;nbsp; Are you basically saying "sorry, if you use FFTs, then you can't use Cilk offload"?&amp;nbsp; That seems like a rather gaping hole in the model, doesn't it?&lt;/P&gt;
&lt;P&gt;Or is it just the fftw wrappers?&amp;nbsp; If I use the MKL functions directly, should I expect to find that those are _Cilk_shared?&lt;/P&gt;
&lt;P&gt;I think I've already decided that there are too many unanswered questions about the Cilk offload black box for me to use anyway, so I suppose it doesn't really matter.&amp;nbsp; But surely MKL FFTs and Cilk offload aren't actually mutually exclusive?&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2013 02:13:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947250#M18599</guid>
      <dc:creator>phik</dc:creator>
      <dc:date>2013-05-04T02:13:32Z</dc:date>
    </item>
    <item>
      <title>You can invoke MKL functions</title>
      <link>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947251#M18600</link>
      <description>&lt;P&gt;You can invoke MKL functions from _Cilk_shared functions.&lt;BR /&gt;Make sure the header files are surrounded by push/pop _CIlk_shared attribute&lt;/P&gt;
&lt;P&gt;eg:-&lt;BR /&gt;#pragma offload_attribute(push,_Cilk_shared)&lt;BR /&gt;#include&amp;nbsp; "mkl.h"&lt;BR /&gt;#pragma offload_attribute(pop)&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 17:17:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947251#M18600</guid>
      <dc:creator>Ravi_N_Intel</dc:creator>
      <dc:date>2013-05-06T17:17:22Z</dc:date>
    </item>
    <item>
      <title>Ah ha!  I had no idea that</title>
      <link>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947252#M18601</link>
      <description>&lt;P&gt;Ah ha!&amp;nbsp; I had no idea that pragma offload_attribute could also be applied to function prototypes.&lt;/P&gt;
&lt;P&gt;I'm still shocked that the headers don't ship with _Cilk_shared already applied, but that workaround makes sense.&amp;nbsp; Thanks very much.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 21:05:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947252#M18601</guid>
      <dc:creator>phik</dc:creator>
      <dc:date>2013-05-06T21:05:22Z</dc:date>
    </item>
    <item>
      <title>The CPU compiler uses the</title>
      <link>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947253#M18602</link>
      <description>&lt;P&gt;The CPU compiler uses the presence of _Cilk_shared to invoke the MIC compiler.&amp;nbsp; If the mkl libraries had _Cilk_shared in them then we would be always generating code for MIC even if the application does not do any offload.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 21:34:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947253#M18602</guid>
      <dc:creator>Ravi_N_Intel</dc:creator>
      <dc:date>2013-05-06T21:34:10Z</dc:date>
    </item>
    <item>
      <title>Quote:Ravi Narayanaswamy</title>
      <link>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947254#M18603</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Ravi Narayanaswamy (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;You can invoke MKL functions from _Cilk_shared functions.&lt;BR /&gt;
	Make sure the header files are surrounded by push/pop _CIlk_shared attribute&lt;/P&gt;

&lt;P&gt;eg:-&lt;BR /&gt;
	#pragma offload_attribute(push,_Cilk_shared)&lt;BR /&gt;
	#include&amp;nbsp; "mkl.h"&lt;BR /&gt;
	#pragma offload_attribute(pop)&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thank you very much. I also meet the similar problem which the malloc or strlen can not use in&amp;nbsp;&lt;SPAN style="font-size: 16.26px;"&gt;_Cilk_shared functions.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 16.26px;"&gt;I use this method and it works !&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 08:21:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Using-mkl-fftw-in-Cilk-shared-functions/m-p/947254#M18603</guid>
      <dc:creator>王_子_</dc:creator>
      <dc:date>2018-03-08T08:21:42Z</dc:date>
    </item>
  </channel>
</rss>

