Skip to content

[package list]

PFFT

Technical documentation

PFFT is a parallel FFT package running on top of FFTW. It never left the alpha stage. Downloads are available on the PFFT web page from the author and on GitHub.

The author, Michael Pippig, is no longer in academics. The package has not seen a release since the end of 2014 and the last GitHub commit, which was only a documentation update, dates from 2018. Hence LUST cannot support this package.

Users have reported issues with the package.

One issue is easily identified by analysing the warnings generated by the Cray compiler: Line 828 of kernel/partrafo.c mixes logical and bitwise operations:

if(~transp_flag & (PFFT_TRANSPOSED_IN || PFFT_TRANSPOSED_OUT) ){

Here PFFT_TRANSPOSED_IN is a preprocessor constant with the integer value 1 and PFFT_TRANSPOSED_OUT is a preprocessor constant with the integer value 2. Both mean true when treated as boolean values in a logical operator, but the result of (PFFT_TRANSPOSED_IN || PFFT_TRANSPOSED_OUT) is just the logical value true and could be any nonzero integer, and not necessarily the value 3 which it would get with a bitwise OR operation (|). As this line of code is testing for bits in tranmsp_flag, it is very likely the author intended a bitwise OR. This issue may have remained undetected as many compilers likely replace the logical OR with a bitwise or in the code as this would deliver the correct logical result also, but there is no rule in the C standard that says a compiler could do so.

The correct line is likely:

if(~transp_flag & (PFFT_TRANSPOSED_IN | PFFT_TRANSPOSED_OUT) ){

(unconfirmed by the authors).

It is not clear if there are more issues with this code.

Given that this code has been unmaintained for so long and that it is clear that the code contains bugs and that there will be issues, we do not provide an EasyBuild recipe for this code.

If you want to compile, you can compile it as a regular autotools package. Assuming you use the version from the PFFT web page from the author, load the proper programming environment and cray-fftw module, set the proper environment variables for the compilers:

export CC=cc
export MPICC=cc
export CFLAGS="-O2 -std=c99"
export FC=ftn
export MPIFC=ftn

and run the configure script as indicated in the documentation of PFFT, using --with-fftw3=$FFTW_ROOT.