Turn on suggestions

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

Showing results for

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

Masrul

Beginner

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

07-11-2016
08:33 AM

160 Views

3-D FFT via 1-D conversion

Hello all,

I am trying to do 3-D FFT complex to complex. First i converted Q to complex QC then reshape 3D to 1D. Then I did FFT. Could anybody tell, if i did any mistake?

! convert Q to complex QC QC=cmplx(Q,0.d0,16) ! Reshape 3D to 1D QC_1d=reshape(QC,(/nfftdim1*nfftdim2*nfftdim3/)) ! Initializing DFFT stuff FFT_length(1)=nfftdim1 FFT_length(2)=nfftdim2 FFT_length(3)=nfftdim3 ! Initializing Forward DFFT status=DftiCreateDescriptor(forward_desc,DFTI_DOUBLE,DFTI_COMPLEX, 3, FFT_length) status=DftiCommitDescriptor(forward_desc) ! Doing Forward FFT status=DftiComputeForward(forward_desc, QC_1d)

Link Copied

6 Replies

McCalpinJohn

Black Belt

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

07-11-2016
03:25 PM

160 Views

A three-dimensional FFT is not the same as a one-dimensional FFT on the concatenated data.

It is common to decompose large one-dimensional FFTs into pseudo-2D or pseudo-3D arrays, but the transforms have to be done in a specific order (longest stride first, unit-stride last), and the intermediate results must be multiplied by the correct "twiddle factors" between steps. If this is done correctly, the result will be the transpose of the pseudo-2D or pseudo-3D result, so an additional transposition is typically required.

To do a three-dimensional FFT, you simply perform a collection of 1D FFTs in each of the three directions. If your fast 1D FFTs are set up for contiguous data, then you will need to transpose the data before each of the 1D transforms, but many packages (including MKL) are set up to handle this automatically.

Masrul

Beginner

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

07-11-2016
03:32 PM

160 Views

So referring your last para of comment, I did correctly?

--Masrul

McCalpinJohn

Black Belt

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

07-12-2016
10:00 AM

160 Views

It looks like you have set up the `DftiCreateDescriptor`

for a 3D transform.

Why are you doing the "reshape" operation? The MKL examples (e.g., https://software.intel.com/en-us/node/522290) don't do this....

Masrul

Beginner

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

07-12-2016
01:13 PM

160 Views

Dr. McCalpin;

I am following link: https://software.intel.com/en-us/node/471390 , example number 3. Would you please look at example #3. I understand, what you are saying but above link saying otherwise.

Thanks

Masrul

McCalpinJohn

Black Belt

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

07-13-2016
12:48 PM

160 Views

Sorry -- I got confused by the C++ stuff.

What sort of trouble are you getting? Is MKL complaining about the arguments or are you getting the wrong results?

Masrul

Beginner

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

07-13-2016
12:58 PM

160 Views

Dr. McCalpin;

Actually i am using it in Particle Mesh Ewald potentail energy calculation, Where i got some discrepancy at precision level or decimal level. That's why i am double checking if discrepancy from FFT part.

--Masrul

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.