Timeline for normalization in FFTW3
Current License: CC BY-SA 4.0
Post Revisions
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 1, 2025 at 12:37 | answer | added | Brian Reinhold | timeline score: 0 | |
| Nov 1, 2025 at 11:11 | comment | added | Brian Reinhold | @VladimirFГероямслава Maybe that's the case today, but the program I am working with was written back in the 1980's to run on IBM ATs, 386s and 486s using F77 in extended DOS long before MPIs capabilities were found. So arrays were written A(i,j,k). Actually they were often converted to one-D arrays for speed and you were responsible for the indexing of the correct wave component. All graphics were done writing directly to video memory using assembly. I am trying to upgrade this F77 to F90 and replacing the classic FFT991 library with FFTW3. | |
| Oct 31, 2025 at 6:12 | comment | added | Vladimir F Героям слава | In meteorology, the arrays are most often indexed A(k,j,i) so one would actually use the "normal" order Nx, Ny, Nz when calling FFTW. It is done in order to have vertical columns contiguous and do MPI distribution in horizontal. | |
| Oct 30, 2025 at 13:48 | history | edited | Brian Reinhold | CC BY-SA 4.0 |
added 24 characters in body
|
| Oct 30, 2025 at 13:46 | comment | added | Brian Reinhold | @MartinBrown Good idea and that's exactly how I am trying to approach it. I am doing a spectral meteorological model and there one typically does spectral to grid, compute nonlinear terms, and then grid to spectral. Since we work in spectral space the 'inverse' transform is the grid to spectral which is opposite of the documentation definition. That confused me for a while. Given that, I have lined up some code that does spectral to grid and then grid to spectral one after the other. That way I can find out what the normalization is with the help of the debugger. | |
| Oct 30, 2025 at 13:41 | comment | added | Brian Reinhold | @VladimirFГероямслава I guess I should have put horzArr%G1 is a 2-d array of dimension currentDims%IXMAX, currentDims%IYMAX. I was careless. | |
| Oct 29, 2025 at 18:48 | history | edited | Vladimir F Героям слава |
edited tags
|
|
| Oct 29, 2025 at 18:47 | comment | added | Vladimir F Героям слава |
Note that I have no idea what currentDims%IXMAX is and how it is related to Nx. Try to show a minimal reproducible example.
|
|
| Oct 29, 2025 at 18:44 | comment | added | Vladimir F Героям слава | What are you seeing? Is your result simply different by a multiplicative factor? Can you compute the factor? The normalisation in FFTW always requires the logical transform size. | |
| Oct 29, 2025 at 17:20 | comment | added | Martin Brown | I can't recall which normalisation convention FFTW3 uses for that r2r transform. If you take it on a round trip without trying to normalise it at all what factor does it get multiplied by? Fence post errors are all too easy in C/FORTRAN hybrid interface code. | |
| Oct 29, 2025 at 17:03 | history | asked | Brian Reinhold | CC BY-SA 4.0 |