I have an application which utilizes fftw, and which could probably benefit from using cuFFT instead. To try it out with minimal investment I simply included the cufft AND cufftw libs (REPLACING the previous fftw-libs), and changed the header from fftw3.h to cufftw.h.
There is an explicit check in the code after a certain fftw-call to create a plan, which checks if a NULL plan was returned, and if so, throws and error. The changes I made to libs and headers, appears to work fine for a number of occasions of this call (I can see the gpu going to work and exiting without error). But at a given call it no longer works; cufftw fails to re-interpret calls to fftw_plan_dft_r2c(…) as well as to fftw_plan_dft_c2r(…). There is no apparent difference in the input between using fftw-libs or cufftw-libs.
I tried to change the calls to haev explicit dimensionality by replcing it with fftw_plan_dft_r2c_3d(…) functions instead, but this did not help.
What I am looking for is experience on the subject; as I understand it the header and libraries being changed is all that should be required for cufftw to step in and work with anything fftw can do (anything which is supported, that is). Is this true? Is there an obvious reason to why the aforementioned function calls would return a NULL plan?