<?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 parallel FFT function with OpenMP in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889127#M10261</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I follow this &lt;A target="_blank" href="http://software.intel.com/en-us/articles/different-parallelization-techniques-and-intel-mkl-fft/"&gt;article&lt;/A&gt; and try to use the method (2) to parallel DFTI funtion by OpenMP.&lt;/P&gt;
&lt;P&gt;My main code is like this (fortran)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Equivalence(tmp,tmp1D)&lt;/P&gt;
&lt;P&gt;CALL omp_set_num_threads(2)&lt;BR /&gt; CALL mkl_set_num_threads(1)&lt;/P&gt;
&lt;P&gt;lengths(1)=n&lt;BR /&gt; lengths(2)=n&lt;BR /&gt;!$OMP PARALLEL&lt;BR /&gt; MYID=omp_get_thread_num()&lt;BR /&gt; Status = DftiCreateDescriptor(fftjob,DFTI_DOUBLE,DFTI_COMPLEX,2,lengths)&lt;BR /&gt; Status = DftiSetValue(fftjob,DFTI_NUMBER_OF_TRANSFORMS,2)&lt;BR /&gt; Status = DftiSetValue(fftjob,DFTI_INPUT_DISTANCE,(n**2)/2)&lt;BR /&gt; Status = DftiCommitDescriptor(fftjob)&lt;BR /&gt; Status = DftiComputeBackward(fftjob,tmp1D(((n**2)/2)*MYID+1:((n**2)/2)*(MYID+1)))&lt;BR /&gt; Status = DftiFreeDescriptor(fftjob)&lt;/P&gt;
&lt;P&gt;!$OMP END PARALLEL&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;However, this error message pops while executing my program:&lt;/P&gt;
&lt;P&gt;*** glibc detected *** ./ITPCARTINTPFFT2DII: double free or corruption (top): 0x00002b09d0006ef0 ***...&lt;/P&gt;
&lt;P&gt;The examples in that article is written in C (I am not familiar with C)&lt;/P&gt;
&lt;P&gt;Can someone tells me what's wrong?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Feb 2010 12:57:12 GMT</pubDate>
    <dc:creator>Raemon</dc:creator>
    <dc:date>2010-02-18T12:57:12Z</dc:date>
    <item>
      <title>parallel FFT function with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889127#M10261</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I follow this &lt;A target="_blank" href="http://software.intel.com/en-us/articles/different-parallelization-techniques-and-intel-mkl-fft/"&gt;article&lt;/A&gt; and try to use the method (2) to parallel DFTI funtion by OpenMP.&lt;/P&gt;
&lt;P&gt;My main code is like this (fortran)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Equivalence(tmp,tmp1D)&lt;/P&gt;
&lt;P&gt;CALL omp_set_num_threads(2)&lt;BR /&gt; CALL mkl_set_num_threads(1)&lt;/P&gt;
&lt;P&gt;lengths(1)=n&lt;BR /&gt; lengths(2)=n&lt;BR /&gt;!$OMP PARALLEL&lt;BR /&gt; MYID=omp_get_thread_num()&lt;BR /&gt; Status = DftiCreateDescriptor(fftjob,DFTI_DOUBLE,DFTI_COMPLEX,2,lengths)&lt;BR /&gt; Status = DftiSetValue(fftjob,DFTI_NUMBER_OF_TRANSFORMS,2)&lt;BR /&gt; Status = DftiSetValue(fftjob,DFTI_INPUT_DISTANCE,(n**2)/2)&lt;BR /&gt; Status = DftiCommitDescriptor(fftjob)&lt;BR /&gt; Status = DftiComputeBackward(fftjob,tmp1D(((n**2)/2)*MYID+1:((n**2)/2)*(MYID+1)))&lt;BR /&gt; Status = DftiFreeDescriptor(fftjob)&lt;/P&gt;
&lt;P&gt;!$OMP END PARALLEL&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;However, this error message pops while executing my program:&lt;/P&gt;
&lt;P&gt;*** glibc detected *** ./ITPCARTINTPFFT2DII: double free or corruption (top): 0x00002b09d0006ef0 ***...&lt;/P&gt;
&lt;P&gt;The examples in that article is written in C (I am not familiar with C)&lt;/P&gt;
&lt;P&gt;Can someone tells me what's wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2010 12:57:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889127#M10261</guid>
      <dc:creator>Raemon</dc:creator>
      <dc:date>2010-02-18T12:57:12Z</dc:date>
    </item>
    <item>
      <title>parallel FFT function with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889128#M10262</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I added some comments to used by you arcticle about FORTRAN examples.&lt;/P&gt;
&lt;P&gt;Also that example in C is to be corrected.&lt;/P&gt;
&lt;P&gt;In your example: memory was corrupted :(&lt;/P&gt;
&lt;P&gt;I can see several problems there&lt;/P&gt;
&lt;P&gt;1)Why DFTI_NUMBER_OF_TRANSFORMS equal 2 is used in every thread?&lt;/P&gt;
&lt;P&gt;2) DFTI_INPUT_DISTANCE should be not in elemets of array but as real offset: not (n**2)/2&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Original C-example is to compute 2d 50x100 in parallel as different subarrays in common 200x100 array.&lt;/P&gt;
&lt;P&gt;But in your test you compute tmp1D(((n**2)/2)*MYID+1:((n**2)/2)*(MYID+1)) data in parallel.&lt;/P&gt;
&lt;P&gt;What isthe idea of your test?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2010 14:40:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889128#M10262</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2010-02-18T14:40:32Z</dc:date>
    </item>
    <item>
      <title>parallel FFT function with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889129#M10263</link>
      <description>&lt;P&gt;Hi, Victor:&lt;/P&gt;
&lt;P&gt;1) Actually I am NOT SURE whether this setting is correct or not. All that I think is the setting should be after the "CreateDescriptor". In addition, I run this test on my notebook, which has a dual-core intel CPU so that I set the value "DFTI_NUMBER_OF_TRANSFORMS" equals to 2.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;2) Well, my original code is threaded by MKL internal threading. It uses "Equivalence" to let an 2D  array be regarded as an 1D array. (In my example, tmp is an 2D n by n array, tmp1D is an 1D n**2 array) This technique is commonly used (eg. /mkl/examples/dftf/source/complex_2d_double_ex1.f90)&lt;/P&gt;
&lt;P&gt;and I think PERHAPS that technique can be worked here. Since here (In my example) the data size=n**2 and the number of cores=2, half of the original data would be calculated at each core ( Specify DFTI_INPUT_DISTANCE=(n**2)/2 )&lt;/P&gt;
&lt;P&gt;In addition, the reason I write tmp1D(((n**2)/2)*MYID+1:((n**2)/2)*(MYID+1)) is:&lt;/P&gt;
&lt;P&gt;I have two core: One is MYID=0 and another is MYID=1&lt;/P&gt;
&lt;P&gt;I'd like to specify core 1(MYID=0) to compute tmp1D(1:n**2/2)&lt;/P&gt;
&lt;P&gt;and specify core 2(MYID=1) to compute the another half:tmp1D(n**2/2+1:n**2)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I hope some fortran examples(FFT parallelization with OpenMP) will be included in the MKL in the future.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Raemon&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2010 21:27:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889129#M10263</guid>
      <dc:creator>Raemon</dc:creator>
      <dc:date>2010-02-18T21:27:17Z</dc:date>
    </item>
    <item>
      <title>parallel FFT function with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889130#M10264</link>
      <description>&lt;P&gt;By the way, I think the example (Using Parallel Mode with Multiple Descriptors Initialized in a Parallel Region) in that &lt;A target="_blank" href="http://software.intel.com/en-us/articles/different-parallelization-techniques-and-intel-mkl-fft/"&gt;article&lt;/A&gt; tells you to set DFTI_INPUT_DISTANCE = 5000 is due to that: In that example, each thread calculates real FFT for matrix (50*100=5000). Since it assums one has four threads, I think DFTI_NUMBER_OF_TRANSFORMS = 4 should be specified in that example instead of specifying DFTI_NUMBER_OF_TRANSFORMS = n (n is the number of cores)&lt;/P&gt;
&lt;P&gt;Am I right?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Raemon&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2010 22:04:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889130#M10264</guid>
      <dc:creator>Raemon</dc:creator>
      <dc:date>2010-02-18T22:04:04Z</dc:date>
    </item>
    <item>
      <title>parallel FFT function with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889131#M10265</link>
      <description>&lt;P&gt;Raemon,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Asking you about the idea behind your test I wanted to know what computations should be done in n*n array. Please explain what work is to be done as a whole, what is to be done in every thread.&lt;/P&gt;
&lt;P&gt;You know, DFTI_NUMBER_OF_TRANSFORMS &amp;gt; 1means that DftiCompute function will compute multiple DFTs and DFTI_INPUT_DISTANCE/DFTI_OUTPUT_DISTANCE say about how to calculate next input/output arrays of sucn series (please see MKL docs)&lt;/P&gt;
&lt;P&gt;In your case 2D array you devided on two parts but every thread computes 2 series. As a result you corrupted the memory because DISTANCE is tobe offset for input/output arrays and NUMBER_OF_TRANSFORMS = 2&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2010 07:25:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889131#M10265</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2010-02-19T07:25:17Z</dc:date>
    </item>
    <item>
      <title>parallel FFT function with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889132#M10266</link>
      <description>&lt;P&gt;Hi, Victor:&lt;/P&gt;
&lt;P&gt;Thanks for your correction. All I want to do is parallel FFT with OpenMP&lt;/P&gt;
&lt;P&gt;and turn off the MKL internal threading. So that I don't need to&lt;/P&gt;
&lt;P&gt;1) set DFTI_NUMBER_OF_TRANSFORMS = number of cores&lt;/P&gt;
&lt;P&gt;2) set DFTI_INPUT_DISTANCE = input_distance&lt;/P&gt;
&lt;P&gt;Since this way parallels FFT with MKL&lt;/P&gt;
&lt;BR /&gt;
&lt;P&gt;However, I am confused in the provided C example:&lt;/P&gt;
&lt;PRE&gt;[fortran]#include "mkl_dfti.h"&lt;BR /&gt;&lt;BR /&gt;#include "omp.h"&lt;BR /&gt;void main () {&lt;BR /&gt;float _Complex x[200][100];&lt;BR /&gt;&lt;BR /&gt;MKL_LONG len[2];&lt;BR /&gt;&lt;BR /&gt;//...put input data into x&lt;J&gt;&lt;K&gt; 0&amp;lt;=j&amp;lt;=199, 0&amp;lt;=k&amp;lt;=99&lt;BR /&gt;&lt;BR /&gt;len[0] = 50; len[1] = 100;&lt;BR /&gt;// each thread calculates real FFT for matrix (50*100)&lt;BR /&gt;&lt;BR /&gt;#pragma omp parallel {&lt;BR /&gt;&lt;BR /&gt;DFTI_DESCRIPTOR_HANDLE my_desc_handle;&lt;BR /&gt;&lt;BR /&gt;MKL_LONG myStatus;&lt;BR /&gt;&lt;BR /&gt;int myID = omp_get_thread_num ();&lt;BR /&gt;&lt;BR /&gt;myStatus = DftiCreateDescriptor (&amp;amp;my_desc_handle, DFTI_SINGLE,&lt;BR /&gt;&lt;BR /&gt;DFTI_COMPLEX, 2, len);&lt;BR /&gt;&lt;BR /&gt;myStatus = DftiCommitDescriptor (my_desc_handle);&lt;BR /&gt;&lt;BR /&gt;myStatus = DftiComputeForward (my_desc_handle, &amp;amp;x [myID * len[0]] [0] );&lt;BR /&gt;myStatus = DftiFreeDescriptor (&amp;amp;my_desc_handle);&lt;BR /&gt;&lt;BR /&gt;} /* End OpenMP parallel region */&lt;BR /&gt;&lt;BR /&gt;}[/fortran]&lt;/K&gt;&lt;/J&gt;&lt;/PRE&gt;
What does &lt;B&gt;line 31&lt;/B&gt; do? How to express this line in FORTRAN?&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Raemon&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2010 17:48:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889132#M10266</guid>
      <dc:creator>Raemon</dc:creator>
      <dc:date>2010-02-19T17:48:58Z</dc:date>
    </item>
    <item>
      <title>parallel FFT function with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889133#M10267</link>
      <description>&lt;P&gt;This is my current scheme:&lt;/P&gt;
&lt;P&gt;
&lt;PRE&gt;[fxfortran]	Equivalence(tmp,tmp1D)			!# tmp(n,n), tmp1d(n**2)

	 CALL omp_set_num_threads(2) 
	 CALL mkl_set_num_threads(1) 
	lengths(1)=n/2 
	lengths(2)=n 

	!$OMP PARALLEL
	MYID=omp_get_thread_num()		!# MYID=0 for Core1, MYID=1 for Core2 
	write(*,*)((n**2)/2)*MYID+1,((n**2)/2)*(MYID+1) 
	Status=DftiCreateDescriptor(fftjob,DFTI_DOUBLE,DFTI_COMPLEX,2,lengths) 
	Status=DftiSetValue(fftjob,DFTI_NUMBER_OF_USER_THREADS,1) 
	Status=DftiCommitDescriptor(fftjob) 
	Status=DftiComputeForward(fftjob,tmp1D(((n**2)/2)*MYID+1:((n**2)/2)*(MYID+1))) 
	!#Core1 computes tmp1D(1:n**2/2) ;          
	!#Core2 computes tmp1D(n**2/2+1:n**2) 
	Status=DftiFreeDescriptor(fftjob)
	!$OMP END PARALLEL[/fxfortran]&lt;/PRE&gt;
&lt;/P&gt;
Error still emerges while execution. I think the provided C example cannot be translated into FORTRAN. Does anyone parallel FFT in FORTRAN with OpenMP threading?</description>
      <pubDate>Fri, 19 Feb 2010 21:05:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889133#M10267</guid>
      <dc:creator>Raemon</dc:creator>
      <dc:date>2010-02-19T21:05:07Z</dc:date>
    </item>
    <item>
      <title>parallel FFT function with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889134#M10268</link>
      <description>&lt;P&gt;Hi,Raemon&lt;/P&gt;
&lt;P&gt;This C-example computes 2d FFT problems 50x100 in parallel when all data are located in 200x100 array.&lt;/P&gt;
&lt;P&gt;So that each thread (from 0..3) computes FFT of his own data what is presented in line #31.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2010 09:51:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889134#M10268</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2010-02-24T09:51:06Z</dc:date>
    </item>
    <item>
      <title>parallel FFT function with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889135#M10269</link>
      <description>&lt;DIV id="tiny_quote"&gt;
&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1267005104833="83" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=439864" href="https://community.intel.com/en-us/profile/439864/" class="basic"&gt;Raemon&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="margin-left: 2px; margin-right: 2px; background-color: #e5e5e5; border: 1px inset; padding: 5px;"&gt;&lt;I&gt;
&lt;P&gt;This is my current scheme:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;DIV class="dp-highlighter"&gt;
&lt;DIV class="bar"&gt;
&lt;DIV class="tools"&gt;&lt;A href="http://software.intel.com/en-us/forums/post_edit.php#" onclick="dp.sh.Toolbar.Command('CollapseSource',this);return false;"&gt;- collapse source&lt;/A&gt;&lt;A href="http://software.intel.com/en-us/forums/post_edit.php#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/A&gt;&lt;A href="http://software.intel.com/en-us/forums/post_edit.php#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/A&gt;&lt;A href="http://software.intel.com/en-us/forums/post_edit.php#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/A&gt;&lt;A href="http://software.intel.com/en-us/forums/post_edit.php#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/A&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;SPAN class="keyword bold"&gt;Equivalence&lt;/SPAN&gt;&lt;SPAN&gt;(tmp,tmp1D)&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;!#tmp(n,n),tmp1d(n**2) &lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword bold"&gt;CALL&lt;/SPAN&gt;&lt;SPAN&gt;omp_set_num_threads(2) &lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword bold"&gt;CALL&lt;/SPAN&gt;&lt;SPAN&gt;mkl_set_num_threads(1) &lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="alt"&gt;&lt;SPAN&gt;lengths(1)=n/2 &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;lengths(2)=n &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;!$OMPPARALLEL &lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="alt"&gt;&lt;SPAN&gt;MYID=omp_get_thread_num()&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;!#MYID=0forCore1,MYID=1forCore2 &lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword bold"&gt;write&lt;/SPAN&gt;&lt;SPAN&gt;(*,*)((n**2)/2)*MYID+1,((n**2)/2)*(MYID+1) &lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="alt"&gt;&lt;SPAN&gt;Status=DftiCreateDescriptor(fftjob,DFTI_DOUBLE,DFTI_COMPLEX,2,lengths) &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Status=DftiSetValue(fftjob,DFTI_NUMBER_OF_USER_THREADS,1) &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="alt"&gt;&lt;SPAN&gt;Status=DftiCommitDescriptor(fftjob) &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Status=DftiComputeForward(fftjob,tmp1D(((n**2)/2)*MYID+1:((n**2)/2)*(MYID+1))) &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;!#Core1computestmp1D(1:n**2/2); &lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;!#Core2computestmp1D(n**2/2+1:n**2) &lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="alt"&gt;&lt;SPAN&gt;Status=DftiFreeDescriptor(fftjob) &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;!$OMPENDPARALLEL&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;/DIV&gt;
Error still emerges while execution. I think the provided C example cannot be translated into FORTRAN. Does anyone parallel FFT in FORTRAN with OpenMP threading?&lt;/I&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Well, suppose that n is even in your test (see line #5)&lt;/P&gt;
&lt;P&gt;You want to have 2 threads but no MKL parallelization according to lines #3-4.&lt;/P&gt;
&lt;P&gt;In line #11 you want to calculate inplace 2D FFT of the problem (n/2) x n on each thread.&lt;/P&gt;
&lt;P&gt;Each thread creates fftjob as DFTI DESRIPTOR. To be correct it should be private.&lt;/P&gt;
&lt;P&gt;Line #12 is not needed already because DFTI_NUMBER_OF_USER_THREADS == 1 is by default.&lt;/P&gt;
&lt;P&gt;But if you want to share fftjob as DFTI DESRIPTOR than the value of DFTI_NUMBER_OF_USER_THREADS should be equal to number of threads.&lt;/P&gt;
&lt;P&gt;On line #14 you should set input address to calculate FFT for each thread.&lt;/P&gt;
&lt;P&gt;However, the length of these data must be always(n/2)* n but in your case they depend of MYID :(&lt;/P&gt;
&lt;P&gt;Therefore,it seemsyour test calculates two different 2d FFTs (of the same problem) in n x n array, is it so?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2010 10:10:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/parallel-FFT-function-with-OpenMP/m-p/889135#M10269</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2010-02-24T10:10:53Z</dc:date>
    </item>
  </channel>
</rss>

