Mercurial > hg > sv-dependency-builds
view src/fftw-3.3.3/doc/html/Using-MPI-Plans.html @ 10:37bf6b4a2645
Add FFTW3
author | Chris Cannam |
---|---|
date | Wed, 20 Mar 2013 15:35:50 +0000 |
parents | |
children |
line wrap: on
line source
<html lang="en"> <head> <title>Using MPI Plans - FFTW 3.3.3</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="FFTW 3.3.3"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="FFTW-MPI-Reference.html#FFTW-MPI-Reference" title="FFTW MPI Reference"> <link rel="prev" href="MPI-Initialization.html#MPI-Initialization" title="MPI Initialization"> <link rel="next" href="MPI-Data-Distribution-Functions.html#MPI-Data-Distribution-Functions" title="MPI Data Distribution Functions"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This manual is for FFTW (version 3.3.3, 25 November 2012). Copyright (C) 2003 Matteo Frigo. Copyright (C) 2003 Massachusetts Institute of Technology. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="Using-MPI-Plans"></a> <p> Next: <a rel="next" accesskey="n" href="MPI-Data-Distribution-Functions.html#MPI-Data-Distribution-Functions">MPI Data Distribution Functions</a>, Previous: <a rel="previous" accesskey="p" href="MPI-Initialization.html#MPI-Initialization">MPI Initialization</a>, Up: <a rel="up" accesskey="u" href="FFTW-MPI-Reference.html#FFTW-MPI-Reference">FFTW MPI Reference</a> <hr> </div> <h4 class="subsection">6.12.3 Using MPI Plans</h4> <p>Once an MPI plan is created, you can execute and destroy it using <code>fftw_execute</code>, <code>fftw_destroy_plan</code>, and the other functions in the serial interface that operate on generic plans (see <a href="Using-Plans.html#Using-Plans">Using Plans</a>). <p><a name="index-collective-function-438"></a><a name="index-MPI-communicator-439"></a>The <code>fftw_execute</code> and <code>fftw_destroy_plan</code> functions, applied to MPI plans, are <em>collective</em> calls: they must be called for all processes in the communicator that was used to create the plan. <p><a name="index-new_002darray-execution-440"></a>You must <em>not</em> use the serial new-array plan-execution functions <code>fftw_execute_dft</code> and so on (see <a href="New_002darray-Execute-Functions.html#New_002darray-Execute-Functions">New-array Execute Functions</a>) with MPI plans. Such functions are specialized to the problem type, and there are specific new-array execute functions for MPI plans: <p><a name="index-fftw_005fmpi_005fexecute_005fdft-441"></a><a name="index-fftw_005fmpi_005fexecute_005fdft_005fr2c-442"></a><a name="index-fftw_005fmpi_005fexecute_005fdft_005fc2r-443"></a><a name="index-fftw_005fmpi_005fexecute_005fr2r-444"></a> <pre class="example"> void fftw_mpi_execute_dft(fftw_plan p, fftw_complex *in, fftw_complex *out); void fftw_mpi_execute_dft_r2c(fftw_plan p, double *in, fftw_complex *out); void fftw_mpi_execute_dft_c2r(fftw_plan p, fftw_complex *in, double *out); void fftw_mpi_execute_r2r(fftw_plan p, double *in, double *out); </pre> <p><a name="index-alignment-445"></a><a name="index-fftw_005fmalloc-446"></a>These functions have the same restrictions as those of the serial new-array execute functions. They are <em>always</em> safe to apply to the <em>same</em> <code>in</code> and <code>out</code> arrays that were used to create the plan. They can only be applied to new arrarys if those arrays have the same types, dimensions, in-placeness, and alignment as the original arrays, where the best way to ensure the same alignment is to use FFTW's <code>fftw_malloc</code> and related allocation functions for all arrays (see <a href="Memory-Allocation.html#Memory-Allocation">Memory Allocation</a>). Note that distributed transposes (see <a href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes">FFTW MPI Transposes</a>) use <code>fftw_mpi_execute_r2r</code>, since they count as rank-zero r2r plans from FFTW's perspective. </body></html>