- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
call dfftw_plan_dft_c2r_1d(plan_backward,
& lons_lat,outv,inv,FFTW_ESTIMATE)
do n=1,lot
outv(:)=syn_gr_a_1(:,n)
call dfftw_execute(plan_backward)
syn_gr_a_2(:,n)=inv(:)
end do
call dfftw_destroy_plan(plan_backward)
This function that contains this code is called 1000s of times during the execution of the model.
In this case, the length of each vector is 576 and the number executed is 515. I am getting similar answers to the original code, but it isn't going any faster.
Is this an issue with the wrapper script, and should I be trying to figure out the DFT syntax for this?
Thanks,
Craig
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Craig,
Replacinguse ofFFTW3 interface with use of DFTI interface will not give noticeableperformance advantage.
However, you may getimproved performance if you plan for multiple transforms in a single call of dfftw_execute instead of executing single transform in the loop. Could you look at DFFTW_PLAN_MANY_DFT_C2R, and rearrange your code to something like this:
call dfftw_plan_many_dft_c2r(plan,1,lons_lat, lot, syn_gr_a_1,dontcare,1,
size(syn_gr_a_1,dim=1),syn_gr_a_2,dontcare,1,size(syn_gr_a_2,dim=1),FFTW_ESTIMATE)
call dfftw_execute(plan) !former do n=1,lot ... enddo
Thanks,
Dima
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Craig,
Replacinguse ofFFTW3 interface with use of DFTI interface will not give noticeableperformance advantage.
However, you may getimproved performance if you plan for multiple transforms in a single call of dfftw_execute instead of executing single transform in the loop. Could you look at DFFTW_PLAN_MANY_DFT_C2R, and rearrange your code to something like this:
call dfftw_plan_many_dft_c2r(plan,1,lons_lat, lot, syn_gr_a_1,dontcare,1,
size(syn_gr_a_1,dim=1),syn_gr_a_2,dontcare,1,size(syn_gr_a_2,dim=1),FFTW_ESTIMATE)
call dfftw_execute(plan) !former do n=1,lot ... enddo
Thanks,
Dima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Craig,
Replacinguse ofFFTW3 interface with use of DFTI interface will not give noticeableperformance advantage.
However, you may getimproved performance if you plan for multiple transforms in a single call of dfftw_execute instead of executing single transform in the loop. Could you look at DFFTW_PLAN_MANY_DFT_C2R, and rearrange your code to something like this:
call dfftw_plan_many_dft_c2r(plan,1,lons_lat, lot, syn_gr_a_1,dontcare,1,
size(syn_gr_a_1,dim=1),syn_gr_a_2,dontcare,1,size(syn_gr_a_2,dim=1),FFTW_ESTIMATE)
call dfftw_execute(plan) !former do n=1,lot ... enddo
Thanks,
Dima
Thanks for the guideance. Using this works.

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