Applications/Fftw3
From HPC
Revision as of 13:11, 19 April 2017 by Pysdlb (talk | contribs) (Created page with "__TOC__ ==Application Details== *Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input...")
Application Details
- Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data
- Version: 3.3.5 (compiled with gcc)
- Module: fftw3/gcc/3.3.5
- Licence: GNU
Usage
FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).
Module
[username@login01 ~]$ module add fftw3/gcc/3.3.5
Compilation
boost is a library for use either with a compiled binary that requires it, or it could be required at compilation time also.
A typical code snippet requiring is shown below:
#include <fftw3.h> ... { fftw_complex *in, *out; fftw_plan p; ... in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N); out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N); p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE); ... fftw_execute(p); /* repeat as needed */ ... fftw_destroy_plan(p); fftw_free(in); fftw_free(out); }
You must link this code with the fftw3 library. On Viper, link with -lfftw3 -lm.