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