Hi,
I am trying to compute the r2c transform of a 3D distributed field and to get as much performance as possible from your library.
However, I get a very slow forward-backward transform, even on a single core.
Could you help me to get a faster piece of code?
Here is the version I have for the moment, where the number of indexes by rank is given by the external solver we use.
// get the indexes - here used as an example. In practise, will be given by the main solver.
const int real_limits[3] = {16, 16, 16};
heffte::box3d<> const real_idx = {{0, 0, 0}, {real_limits[0]-1, real_limits[1]-1, real_limits[2]-1}};
heffte::box3d<> const cplx_idx = {{0, 0, 0}, {real_limits[0]/2-1, real_limits[1]-1, real_limits[2]-1}};
// set the r2c direction (what is that?)
int r2c_dir = 0;
// setup the fft
heffte::fft3d_r2c<heffte::backend::fftw> fft(real_idx, cplx_idx, r2c_dir, comm);
// set iota memory
std::vector<double> heffte_data(fft.size_inbox());
std::iota(heffte_data.begin(), heffte_data.end(), 0);
// do a few solves
for (int iter=0; iter<n_warm; ++iter){
// warm up heffte
auto output = fft.forward(heffte_data, scale::none);
auto inverse = fft.backward(output);
}
Regarding this piece of code, I have a few questions:
- am I missing something performance-wise? The code seems to be very slow compared to other FFT solvers.
- what is this the purpose of
r2c_dir? I guess it's the direction in which the first/last mode is dropped?
- are the data to be understood in a cell-centered or node-centered way?
- how can I impose even/odd symmetry?
Thanks a lot for your help and your time.
Hi,
I am trying to compute the r2c transform of a 3D distributed field and to get as much performance as possible from your library.
However, I get a very slow forward-backward transform, even on a single core.
Could you help me to get a faster piece of code?
Here is the version I have for the moment, where the number of indexes by rank is given by the external solver we use.
Regarding this piece of code, I have a few questions:
r2c_dir? I guess it's the direction in which the first/last mode is dropped?Thanks a lot for your help and your time.