The normalization of data array conserves for both forward and backward dist_fft. And array is not centered after fft.
This is how you do it in dist_fft. Note that the
dist_fft routines require you to have
for 2D, and
for 3D.
planForward = dist_fft_create_plan(type, dimension, DIST_FFT_FORWARD,
forwardFlags, comm);
planInverse = dist_fft_create_plan(type, dimension, DIST_FFT_INVERSE,
inverseFlags, comm);
dist_fft_local_dimensions(planForward, &local_dimension, &local_start, &local_storage_size); DIST_FFT_MALLOC_DATA(data, local_storage_size);The initial array is truncated along the last dimension. For example, if a
DIST_FFT_MALLOC_WORKSPACE(workspace, local_storage_size);
start = local_start * nx * ny
limit = (local_start + local_dimension) * nx * ny
FOR(index = start; index < limit; index++){
local_index = index - start;
c_re(data, local_index) = c_re(f,index);
c_im(data, local_index) = c_im(f,index);
}
dist_fft_execute(planForward, data, workspace); dist_fft_execute(planInverse, data, workspace);
DIST_FFT_FREE_WORKSPACE(workspace); dist_fft_destroy_plan(planForward); dist_fft_destroy_plan(planInverse); MPI_Finalize();
DIST_FFT_COLUMN_INPUT refers to array indexing with
being the fast array index.
Test results on the Stony Brook cluster for dist_fft FFTs, using 32 processors:
| N |
data | order | input | output | Seconds |
|---|---|---|---|---|---|
| float | split | COL | COL | 13.4 | |
| float | interleaved | COL | COL | 18.0 | |
| float | split | COL | COL | 4.1 | |
| float | interleaved | COL | COL | 3.5 | |
| float | split | ROW | ROW | 8.5 | |
| float | interleaved | ROW | ROW | 6.8 | |
| float | split | ROW | COL | 6.4 | |
| float | interleaved | ROW | COL | 5.2 | |
| float | split | COL | ROW | 6.2 | |
| float | interleaved | COL | ROW | 5.2 | |
| double | split | COL | COL | 6.6 | |
| double | interleaved | COL | COL | 4.4 |
Microscope User 2008-04-30