FFTW
From Vd
FFTW is installed at /site. There are two versions 2 and 3 installed for both AMD and Intel.
- fftw2/
- fftw2.intel/
- fftw3/
- fftw3.intel/
The libraries can be found at /site/fftw<version>/lib/libfftw3.a for the serial version and libfftw3_threads.a for the multi threaded version. Include files are found at /site/fftw<version>/include/ both for fortran (fftw3.f) and C (fftw3.h).
The number of threads are automatically detected from information about the node. The OMP_NUM_THREADS are not read by the FFTW library.
How to use
pathf90 -o fftw-test.x -intrinsic=PGI -I/site/fftw3/include -L/site/fftw3/lib fftw-test.f -lfftw3
The -intrinsic=PGI is needed in order to use the rand(0) calling syntax.
program fftwtest
c
include 'fftw3.f'
parameter (N=4)
double complex in, out
dimension in(N), out(N)
integer i
integer*8 plan
c
do i=1,N
in(i)=cmplx(rand(0),rand(0))
enddo
c
write(*,110) in
c
call dfftw_plan_dft_1d(plan,N,in,out,FFTW_FORWARD,FFTW_ESTIMATE)
call dfftw_execute(plan)
write(*,110) out
c
call dfftw_destroy_plan(plan)
c
110 format(8(f6.2))
c
end
A testrun using a vector length N=100000000 took 39.4 seconds on a titan node.