Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- How to parallelize FFT computation in MKL?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

hadesmajesty

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-07-2010
05:42 AM

50 Views

How to parallelize FFT computation in MKL?

I try to parallelize the fft computation in each row of the matrix fu(m,2), but the result is not correct. The following is my code:

type(DFTI_DESCRIPTOR), SAVE,POINTER :: My_FFT_Handle

nthreads=omp_get_max_threads ();

Status = DftiCreateDescriptor(My_FFT_Handle, DFTI_DOUBLE, DFTI_REAL, 1, m)

Status = DftiSetValue (My_FFT_Handle, DFTI_NUMBER_OF_USER_THREADS, nThreads);

Status = DftiCommitDescriptor(My_FFT_Handle)

!$OMP PARALLEL DO

do ic=1,2

Status = DftiComputeForward(My_FFT_Handle,fu(:,ic))

end do

!$OMP END PARALLEL DO

stop

The results of fu(:,2) is sometimes not correct. Whats wrong in the code?

Thank you.

Link Copied

3 Replies

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-07-2010
09:04 AM

50 Views

Please look at the example #4 from the KB "Different parallelization techniques and Intel MKL FFT"

Dmitry_B_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-07-2010
09:21 PM

50 Views

The real in-place FFT specified by DftiCreateDescriptor(..., DFTI_REAL, 1, M) accepts input of M real values and needs space of M+2 real elements for output. That means the matrix should be declared/allocated thus:

double precision fu(M+2,2)

Thanks

Dima

hadesmajesty

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-07-2010
10:38 PM

50 Views

It seems there is no difference by allocating fu(M+2,2) in sequential code, but by doing this in parallel code, I can obtain the correct result.

By the way, the additional data in fu(M+1:M+2,:) are meaningless and they are there to just make the routine work, are they?

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.