Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Chang_Lei
Beginner
177 Views

what's my best choice on real-to-real FFT?

Jump to solution

Hi everyone, I'm recently using r-2-r cosine FFT in my poisson solver. AndI wasconfused abouthow to chose fromTT routines, DFT routines and FFTw wrappers in MKL.
My detailed needs are:

1. Forward and backward staggered cosine transform
2. Multiple invoking of above FFT, which means I have many arrays of samelenth to transfer.
3. I want to use multi threads (8+ threads) to compute these transfers.

could someone give me instruction about which one is my best choice and what's the need of system environment(for example, the version of MKL).

Thanks.
Changlei

0 Kudos
1 Solution
Victor_Gladkikh
New Contributor I
177 Views
Hi Changlei

In you case, generalway of using TTis:

"
// Init transform
call ?_init_trig_transfor(...)
// Commit parameters and create DFTI handle
call ?_commit_trig_transfor(a(:,i)..)

// Do a set of forward transform
do i=1,n
call?_forward_trig_transform(a(:,i)...)
enddo

....
// Do a set of backward transform
do i=1,n
call ?_backward_trig_transform(a(:,i)...)
enddo

// Free
callfree_trig_transform(...)
"

Victor

View solution in original post

6 Replies
Chang_Lei
Beginner
177 Views
for example, Description of ipar(10) in TT routines tells me:
"ipar(10) specifies the number of OpenMP threads to run TT routines in the OpenMP
environment of the Poisson Library. The default value is 1. You are highly
recommended not to alter this value. See also Caveat on Parameter
Modifications."
Does this mean I will take great risk to use TT routines with multi_threads?
Victor_Gladkikh
New Contributor I
177 Views
Youcould use multi-threaded version of MKL TT routine without any risk,but I recommend use number of threads = 1for small transform.
Chang_Lei
Beginner
177 Views
Thanks for your suggestion.
Here I have another question, if I have multiarrays (a(1:m,1:n)to transfor. These arrays is a two dimensional matrix. I have to do backward transforms when all forward transforms have been done. Can I invoke the TT routines in this way?
"call ?_init_trig_transfor(...)
do i=1,n
call ?_commit_trig_transfor(a(:,i)..)
call?_forward_trig_transform(a(:,i)...)
enddo
....
do i=1,n
call ?_backward_trig_transform(a(:,i)...)
enddo


or could I call the commit routine onlyonce?
If TT routines support multi-array transform, there will no this question.
Victor_Gladkikh
New Contributor I
178 Views
Hi Changlei

In you case, generalway of using TTis:

"
// Init transform
call ?_init_trig_transfor(...)
// Commit parameters and create DFTI handle
call ?_commit_trig_transfor(a(:,i)..)

// Do a set of forward transform
do i=1,n
call?_forward_trig_transform(a(:,i)...)
enddo

....
// Do a set of backward transform
do i=1,n
call ?_backward_trig_transform(a(:,i)...)
enddo

// Free
callfree_trig_transform(...)
"

Victor

View solution in original post

Chang_Lei
Beginner
177 Views
Hi Victor, Thanks. That's exactly what I need.
When Commit parameters, using:
"
// Commit parameters and create DFTI handle
call ?_commit_trig_transfor(a(:,i)..)
"
You mean I can commit it using any column of matrix a? I'll try that.
Best regards!
Victor_Gladkikh
New Contributor I
177 Views
Hi Chang,

Yes you canuse in ?_commit_trig_transfor routine any columns of the matrix a.

Best regards,
Victor
Reply