annotate src/fftw-3.3.3/doc/html/Using-MPI-Plans.html @ 95:89f5e221ed7b

Add FFTW3
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
rev   line source
cannam@95 1 <html lang="en">
cannam@95 2 <head>
cannam@95 3 <title>Using MPI Plans - FFTW 3.3.3</title>
cannam@95 4 <meta http-equiv="Content-Type" content="text/html">
cannam@95 5 <meta name="description" content="FFTW 3.3.3">
cannam@95 6 <meta name="generator" content="makeinfo 4.13">
cannam@95 7 <link title="Top" rel="start" href="index.html#Top">
cannam@95 8 <link rel="up" href="FFTW-MPI-Reference.html#FFTW-MPI-Reference" title="FFTW MPI Reference">
cannam@95 9 <link rel="prev" href="MPI-Initialization.html#MPI-Initialization" title="MPI Initialization">
cannam@95 10 <link rel="next" href="MPI-Data-Distribution-Functions.html#MPI-Data-Distribution-Functions" title="MPI Data Distribution Functions">
cannam@95 11 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
cannam@95 12 <!--
cannam@95 13 This manual is for FFTW
cannam@95 14 (version 3.3.3, 25 November 2012).
cannam@95 15
cannam@95 16 Copyright (C) 2003 Matteo Frigo.
cannam@95 17
cannam@95 18 Copyright (C) 2003 Massachusetts Institute of Technology.
cannam@95 19
cannam@95 20 Permission is granted to make and distribute verbatim copies of
cannam@95 21 this manual provided the copyright notice and this permission
cannam@95 22 notice are preserved on all copies.
cannam@95 23
cannam@95 24 Permission is granted to copy and distribute modified versions of
cannam@95 25 this manual under the conditions for verbatim copying, provided
cannam@95 26 that the entire resulting derived work is distributed under the
cannam@95 27 terms of a permission notice identical to this one.
cannam@95 28
cannam@95 29 Permission is granted to copy and distribute translations of this
cannam@95 30 manual into another language, under the above conditions for
cannam@95 31 modified versions, except that this permission notice may be
cannam@95 32 stated in a translation approved by the Free Software Foundation.
cannam@95 33 -->
cannam@95 34 <meta http-equiv="Content-Style-Type" content="text/css">
cannam@95 35 <style type="text/css"><!--
cannam@95 36 pre.display { font-family:inherit }
cannam@95 37 pre.format { font-family:inherit }
cannam@95 38 pre.smalldisplay { font-family:inherit; font-size:smaller }
cannam@95 39 pre.smallformat { font-family:inherit; font-size:smaller }
cannam@95 40 pre.smallexample { font-size:smaller }
cannam@95 41 pre.smalllisp { font-size:smaller }
cannam@95 42 span.sc { font-variant:small-caps }
cannam@95 43 span.roman { font-family:serif; font-weight:normal; }
cannam@95 44 span.sansserif { font-family:sans-serif; font-weight:normal; }
cannam@95 45 --></style>
cannam@95 46 </head>
cannam@95 47 <body>
cannam@95 48 <div class="node">
cannam@95 49 <a name="Using-MPI-Plans"></a>
cannam@95 50 <p>
cannam@95 51 Next:&nbsp;<a rel="next" accesskey="n" href="MPI-Data-Distribution-Functions.html#MPI-Data-Distribution-Functions">MPI Data Distribution Functions</a>,
cannam@95 52 Previous:&nbsp;<a rel="previous" accesskey="p" href="MPI-Initialization.html#MPI-Initialization">MPI Initialization</a>,
cannam@95 53 Up:&nbsp;<a rel="up" accesskey="u" href="FFTW-MPI-Reference.html#FFTW-MPI-Reference">FFTW MPI Reference</a>
cannam@95 54 <hr>
cannam@95 55 </div>
cannam@95 56
cannam@95 57 <h4 class="subsection">6.12.3 Using MPI Plans</h4>
cannam@95 58
cannam@95 59 <p>Once an MPI plan is created, you can execute and destroy it using
cannam@95 60 <code>fftw_execute</code>, <code>fftw_destroy_plan</code>, and the other functions
cannam@95 61 in the serial interface that operate on generic plans (see <a href="Using-Plans.html#Using-Plans">Using Plans</a>).
cannam@95 62
cannam@95 63 <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
cannam@95 64 MPI plans, are <em>collective</em> calls: they must be called for all processes
cannam@95 65 in the communicator that was used to create the plan.
cannam@95 66
cannam@95 67 <p><a name="index-new_002darray-execution-440"></a>You must <em>not</em> use the serial new-array plan-execution functions
cannam@95 68 <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
cannam@95 69 problem type, and there are specific new-array execute functions for MPI plans:
cannam@95 70
cannam@95 71 <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>
cannam@95 72 <pre class="example"> void fftw_mpi_execute_dft(fftw_plan p, fftw_complex *in, fftw_complex *out);
cannam@95 73 void fftw_mpi_execute_dft_r2c(fftw_plan p, double *in, fftw_complex *out);
cannam@95 74 void fftw_mpi_execute_dft_c2r(fftw_plan p, fftw_complex *in, double *out);
cannam@95 75 void fftw_mpi_execute_r2r(fftw_plan p, double *in, double *out);
cannam@95 76 </pre>
cannam@95 77 <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
cannam@95 78 new-array execute functions. They are <em>always</em> safe to apply to
cannam@95 79 the <em>same</em> <code>in</code> and <code>out</code> arrays that were used to
cannam@95 80 create the plan. They can only be applied to new arrarys if those
cannam@95 81 arrays have the same types, dimensions, in-placeness, and alignment as
cannam@95 82 the original arrays, where the best way to ensure the same alignment
cannam@95 83 is to use FFTW's <code>fftw_malloc</code> and related allocation functions
cannam@95 84 for all arrays (see <a href="Memory-Allocation.html#Memory-Allocation">Memory Allocation</a>). Note that distributed
cannam@95 85 transposes (see <a href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes">FFTW MPI Transposes</a>) use
cannam@95 86 <code>fftw_mpi_execute_r2r</code>, since they count as rank-zero r2r plans
cannam@95 87 from FFTW's perspective.
cannam@95 88
cannam@95 89 </body></html>
cannam@95 90