TuckermanGroup / PINY

PINY cleanup and new feature integration.
Other
12 stars 5 forks source link

Add support for the FFTW library #31

Open OndrejMarsalek opened 10 years ago

OndrejMarsalek commented 10 years ago

This should be pretty straightforward. Can be based on the older version by Joe, but should be added to the 1D wrapper, rather than the 3D FFT functions.

Let's consider whether we really need to keep support for the various special platform libraries. Removing them would simplify things.

OndrejMarsalek commented 10 years ago

We should remove code for irrelevant platform-specific libraries. Only ESSL should be kept.

The generic FFT option should be turned into a compile-time setting, rather than an input setting, so that exactly one FFT library is enabled. This should probably be a silent default if not other FFT libraries are enabled.

Then FFTW should be added as a third compile-time option with a suitable macro.

OndrejMarsalek commented 10 years ago

Doing this in a clean way would require major changes in data structures. We would need a 1D FFT package, whereas currently all the data is kept in the 3D package. For now, we add FFTW in a way that is simple but not very nice.

OndrejMarsalek commented 10 years ago

Some more care is probably needed with memory allocation and alignment:

http://www.fftw.org/fftw3_doc/New_002darray-Execute-Functions.html

OndrejMarsalek commented 10 years ago

The fftw branch has Joe's old code. It does not work, however, (huge forces in wavefunction minimization). Joe's old code does the same, though, at least on my Mac with FFTW 3.3.4.

OndrejMarsalek commented 10 years ago

Hmm, so an empirical FF with PME work fine. We should investigate a bit more. For now, we should at least check for a combination of DFT and FFTW and quit.