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 Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- FFT library and allocatable arrays

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

John_Kornak

Beginner

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

11-18-2010
05:13 PM

42 Views

FFT library and allocatable arrays

I would appreciate any help I can get with the following:

I would like to be able to perform 2D fft on allocatable arrays, but the problem is that I need to have them as 1-D arrays for the Intel Math Kernel FFT library. The solution given in the manual is to use the equivalence statement but that doesn't work for dynamic arrays. I can think of 2 very clunky solutions:

1) Convert matrices to 1-D before DFT and then back to 2D (but I guess this has considerable overhead?)

2) Index all arrays as 1-D. (likely to lead to a lot of bugs)

I would appreciate any more elegant and efficient solution that I can get!

I am using ifort 11.1 on an iMac with an intel Core i7 processor and running Snow Leopard version 10.6.5. I am embarrased to say that I am not sure how to figure out what version of the math kernel I have but I installed the latest version around a month ago.

Thanks

John

Link Copied

3 Replies

Dmitry_B_Intel

Employee

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

11-18-2010
08:03 PM

42 Views

This issue can be worked around as follows:

[fortran]real input(:,:) complex output(:,:) allocate(input(M,N), output(M/2+1,N)) ... s = DftiComputeForward(desc, input(:,1), output(:,1)) [/fortran]

This technique assumes that compiler will simply pass pointers to the i/o arrays to the compute funcion. This may not work with array sections, like input(1:100:2,1).

MKL version can be printed with this example (see also examples/servicefuncsf in your MKL installation)

[fortran]program mklversion character*(200) :: MKLGetVersionString external MKLGetVersionString print *, trim(MKLGetVersionString()) end program mklversion [/fortran]

Thanks

Dima

Todd_R_Intel

Employee

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

11-19-2010
11:03 AM

42 Views

- If you know the compiler version and update number then you can use the table in our knowledgebase with corresponding library versions. There are now two tables actually: one for the compiler pro line (which it sounds you're currently using) and one for the new Intel Composer XE 2011 products.
- In the doc directory open the mklsupport* file.

John_Kornak

Beginner

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

11-23-2010
02:40 PM

42 Views

Thank you very much Dmitry and Todd. Your solutions worked perfectly for me.

Cheers

John

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