<?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 Re: FFTFwd segfaults in Java VM in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/FFTFwd-segfaults-in-Java-VM/m-p/847294#M6204</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/325823"&gt;tctbw&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Javas problematic frame was always in libpthread.so. To disable multithreading I switched to static linking and that solved the problem. But that is not what I want - faster is better. Does anyone have an idea if i could use threading in a java-compliant way?&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: " verdana=""&gt;&lt;SPAN style="mso-spacerun: yes;"&gt;Could you please providethe&lt;/SPAN&gt; orderWidth and orderHeight values. Does it also fail with ippSetNumThreads(1)? &lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 19 Oct 2008 09:13:56 GMT</pubDate>
    <dc:creator>Ying_S_Intel</dc:creator>
    <dc:date>2008-10-19T09:13:56Z</dc:date>
    <item>
      <title>FFTFwd segfaults in Java VM</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/FFTFwd-segfaults-in-Java-VM/m-p/847292#M6202</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;my aim is to filter an image with Java and to use IPP as a fast fft library.&lt;BR /&gt;&lt;BR /&gt;So far I've managed to call the ipp with JNI and to really filter an image the way I want. But as my program continues, the JavaVM segfaults.&lt;BR /&gt;&lt;BR /&gt;I've tracked that segfault back to the call of ippiFFTFwd_RToPack_32f_C4R (without it, nothing segfaults) and I'd really appreciate if you could track down this nasty bug, as I didn't succeed with that.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JNIEXPORT void JNICALL Java_de_ethrandil_imageequalizer_fftutils_impl_PPIImageFFT_setImage&lt;BR /&gt; (JNIEnv *env, jobject obj, jintArray argbArray, jint orderWidth, jint orderHeight)&lt;BR /&gt;{&lt;BR /&gt; const int width = 1&amp;lt;&lt;ORDERWIDTH&gt; const int height = 1&amp;lt;&lt;ORDERHEIGHT&gt; const int pixelCount = width * height;&lt;BR /&gt; const IppiSize imageSize = { width, height };&lt;BR /&gt;&lt;BR /&gt; //Allocate memory for image and ffted image&lt;BR /&gt; Ipp8u* input8u;&lt;BR /&gt; Ipp32f* input32f;&lt;BR /&gt; Ipp32f *fftImage32f;&lt;BR /&gt;&lt;BR /&gt; int stepInput8u, stepInput32f, stepFftImage32f;&lt;BR /&gt; input8u = ippiMalloc_8u_C4(width, height, &amp;amp;stepInput8u);&lt;BR /&gt; input32f = ippiMalloc_32f_C4(width, height, &amp;amp;stepInput32f);&lt;BR /&gt; fftImage32f = ippiMalloc_32f_C4(width, height, &amp;amp;stepFftImage32f);&lt;BR /&gt;&lt;BR /&gt; //Load interlaced pixel values from Java&lt;BR /&gt; //The trick is, that jint is 4 bytes long and so generates an interlaced 4channel pixel.&lt;BR /&gt; (*env)-&amp;gt;GetIntArrayRegion(env, argbArray, 0, pixelCount, (jint*)input8u);&lt;BR /&gt;&lt;BR /&gt; //Convert to 32bit float image&lt;BR /&gt; ippiConvert_8u32f_C4R(input8u, stepInput8u, input32f, stepInput32f, imageSize);&lt;BR /&gt; ippiFree( input8u );&lt;BR /&gt;&lt;BR /&gt; //Allocate FFT-Specs&lt;BR /&gt; IppiFFTSpec_R_32f *spec;&lt;BR /&gt; IppStatus status;&lt;BR /&gt; int bufferSize;&lt;BR /&gt;&lt;BR /&gt; status = ippiFFTInitAlloc_R_32f(&amp;amp;spec, orderWidth, orderHeight, IPP_FFT_DIV_INV_BY_N, ippAlgHintAccurate);&lt;BR /&gt; &lt;BR /&gt; //Perform FFT on 32bit image&lt;BR /&gt; status = ippiFFTFwd_RToPack_32f_C4R( input32f, stepInput32f,&lt;BR /&gt; fftImage32f, stepFftImage32f,&lt;BR /&gt; spec, 0 );&lt;BR /&gt;&lt;BR /&gt; //Drop input image&lt;BR /&gt; ippiFree( input32f );&lt;BR /&gt;&lt;BR /&gt; //Store pointer to ffted Image and Specs in java object&lt;BR /&gt; jclass cls = (*env)-&amp;gt;GetObjectClass(env, obj);&lt;BR /&gt; jfieldID imagePointerFieldID = (*env)-&amp;gt;GetFieldID(env, cls, "_nativeImagePointer", "J");&lt;BR /&gt;&amp;amp;nb
sp; (*env)-&amp;gt;SetLongField(env, obj, imagePointerFieldID, toJava( fftImage32f ));&lt;BR /&gt; jfieldID specPointerFieldID = (*env)-&amp;gt;GetFieldID(env, cls, "_nativeFFTSpecPointer", "J");&lt;BR /&gt; (*env)-&amp;gt;SetLongField(env, obj, specPointerFieldID, toJava( spec ));&lt;BR /&gt;&lt;BR /&gt; return;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am using ipp 5.3.3.075 on 64bit Ubuntu Linux 8.04 and a Core2Duo cpu.&lt;BR /&gt;&lt;/ORDERHEIGHT&gt;&lt;/ORDERWIDTH&gt;</description>
      <pubDate>Sat, 02 Aug 2008 19:43:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/FFTFwd-segfaults-in-Java-VM/m-p/847292#M6202</guid>
      <dc:creator>tctbw</dc:creator>
      <dc:date>2008-08-02T19:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: FFTFwd segfaults in Java VM</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/FFTFwd-segfaults-in-Java-VM/m-p/847293#M6203</link>
      <description>Javas problematic frame was always in libpthread.so. To disable multithreading I switched to static linking and that solved the problem. But that is not what I want - faster is better. Does anyone have an idea if i could use threading in a java-compliant way?&lt;BR /&gt;</description>
      <pubDate>Sun, 03 Aug 2008 09:55:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/FFTFwd-segfaults-in-Java-VM/m-p/847293#M6203</guid>
      <dc:creator>tctbw</dc:creator>
      <dc:date>2008-08-03T09:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: FFTFwd segfaults in Java VM</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/FFTFwd-segfaults-in-Java-VM/m-p/847294#M6204</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/325823"&gt;tctbw&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Javas problematic frame was always in libpthread.so. To disable multithreading I switched to static linking and that solved the problem. But that is not what I want - faster is better. Does anyone have an idea if i could use threading in a java-compliant way?&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: " verdana=""&gt;&lt;SPAN style="mso-spacerun: yes;"&gt;Could you please providethe&lt;/SPAN&gt; orderWidth and orderHeight values. Does it also fail with ippSetNumThreads(1)? &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Oct 2008 09:13:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/FFTFwd-segfaults-in-Java-VM/m-p/847294#M6204</guid>
      <dc:creator>Ying_S_Intel</dc:creator>
      <dc:date>2008-10-19T09:13:56Z</dc:date>
    </item>
  </channel>
</rss>

