2D Plimpton FFTDriver when using 3D blocks #704
Replies: 2 comments 7 replies
|
Sounds like you are doing 2D FFT on boundaries, which look like a task required for the James method for a self-gravity solver (https://ui.adsabs.harvard.edu/abs/2019ApJS..241...24M/abstract). @sanghyukmoon has a version for that gravity solver, which may have a functionality you need. I think he didn't use the Athena's FFT wrapper for that task though. |
|
Due to the problems you mentioned, I had to use FFTW and Plimpton's remap routines directly rather than utilizing AthenaFFT wrappers. To do the 2D FFT starting from block-decomposed data, I create communicators involving only those ranks at the boundary (https://github.com/sanghyukmoon/athena/blob/0d63120317b5bd95328b9501e1a017ae24cd7c2b/src/gravity/james_gravity.cpp#L346-L358). The rank and size within these boundary communicators (which is different from those associated with MPI_COMM_WORLD) are then used to assign the start/end indices for y- and z-pencil decomposition (for x-boundaries) needed to perform 1D FFTs along each dimension (https://github.com/sanghyukmoon/athena/blob/0d63120317b5bd95328b9501e1a017ae24cd7c2b/src/gravity/james_gravity.cpp#L379-L407). I hope this can provide a starting point for your application. |
Uh oh!
There was an error while loading. Please reload this page.
I'd like to get thoughts on the most efficient way to use the parallel FFT package in Athena++. I've seen the fft.cpp pgen but this doesn't answer all my questions.
My use case is summarised below but I am basically solving an ODE in Fourier space (this is a correction step for electric field driving of flux emergence).
I think I have a rough method worked out but I don't think it is very efficient. Its below.
Eventually I will set this up as internal functions like the Turbulence FFT.
There seems to be a weird disconnect in setting up the FFTW plans and the data load/retrieval where the latter is based off the underlying block but not the dimensions of the plan. I will need to change the load/retrieval by the look of it.
Does anyone have efficiency advice for the FFT workflow?
Does anyone have any advice for the 2D FFT ambiguity when using Athena++ with 3D?
All reactions