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