comparison src/fftw-3.3.5/doc/html/MPI-Data-Distribution-Functions.html @ 127:7867fa7e1b6b

Current fftw source
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 18 Oct 2016 13:40:26 +0100
parents
children
comparison
equal deleted inserted replaced
126:4a7071416412 127:7867fa7e1b6b
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- This manual is for FFTW
4 (version 3.3.5, 30 July 2016).
5
6 Copyright (C) 2003 Matteo Frigo.
7
8 Copyright (C) 2003 Massachusetts Institute of Technology.
9
10 Permission is granted to make and distribute verbatim copies of this
11 manual provided the copyright notice and this permission notice are
12 preserved on all copies.
13
14 Permission is granted to copy and distribute modified versions of this
15 manual under the conditions for verbatim copying, provided that the
16 entire resulting derived work is distributed under the terms of a
17 permission notice identical to this one.
18
19 Permission is granted to copy and distribute translations of this manual
20 into another language, under the above conditions for modified versions,
21 except that this permission notice may be stated in a translation
22 approved by the Free Software Foundation. -->
23 <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
24 <head>
25 <title>FFTW 3.3.5: MPI Data Distribution Functions</title>
26
27 <meta name="description" content="FFTW 3.3.5: MPI Data Distribution Functions">
28 <meta name="keywords" content="FFTW 3.3.5: MPI Data Distribution Functions">
29 <meta name="resource-type" content="document">
30 <meta name="distribution" content="global">
31 <meta name="Generator" content="makeinfo">
32 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
33 <link href="index.html#Top" rel="start" title="Top">
34 <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
35 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
36 <link href="FFTW-MPI-Reference.html#FFTW-MPI-Reference" rel="up" title="FFTW MPI Reference">
37 <link href="MPI-Plan-Creation.html#MPI-Plan-Creation" rel="next" title="MPI Plan Creation">
38 <link href="Using-MPI-Plans.html#Using-MPI-Plans" rel="prev" title="Using MPI Plans">
39 <style type="text/css">
40 <!--
41 a.summary-letter {text-decoration: none}
42 blockquote.smallquotation {font-size: smaller}
43 div.display {margin-left: 3.2em}
44 div.example {margin-left: 3.2em}
45 div.indentedblock {margin-left: 3.2em}
46 div.lisp {margin-left: 3.2em}
47 div.smalldisplay {margin-left: 3.2em}
48 div.smallexample {margin-left: 3.2em}
49 div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
50 div.smalllisp {margin-left: 3.2em}
51 kbd {font-style:oblique}
52 pre.display {font-family: inherit}
53 pre.format {font-family: inherit}
54 pre.menu-comment {font-family: serif}
55 pre.menu-preformatted {font-family: serif}
56 pre.smalldisplay {font-family: inherit; font-size: smaller}
57 pre.smallexample {font-size: smaller}
58 pre.smallformat {font-family: inherit; font-size: smaller}
59 pre.smalllisp {font-size: smaller}
60 span.nocodebreak {white-space:nowrap}
61 span.nolinebreak {white-space:nowrap}
62 span.roman {font-family:serif; font-weight:normal}
63 span.sansserif {font-family:sans-serif; font-weight:normal}
64 ul.no-bullet {list-style: none}
65 -->
66 </style>
67
68
69 </head>
70
71 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
72 <a name="MPI-Data-Distribution-Functions"></a>
73 <div class="header">
74 <p>
75 Next: <a href="MPI-Plan-Creation.html#MPI-Plan-Creation" accesskey="n" rel="next">MPI Plan Creation</a>, Previous: <a href="Using-MPI-Plans.html#Using-MPI-Plans" accesskey="p" rel="prev">Using MPI Plans</a>, Up: <a href="FFTW-MPI-Reference.html#FFTW-MPI-Reference" accesskey="u" rel="up">FFTW MPI Reference</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
76 </div>
77 <hr>
78 <a name="MPI-Data-Distribution-Functions-1"></a>
79 <h4 class="subsection">6.12.4 MPI Data Distribution Functions</h4>
80
81 <a name="index-data-distribution-5"></a>
82 <p>As described above (see <a href="MPI-Data-Distribution.html#MPI-Data-Distribution">MPI Data Distribution</a>), in order to
83 allocate your arrays, <em>before</em> creating a plan, you must first
84 call one of the following routines to determine the required
85 allocation size and the portion of the array locally stored on a given
86 process. The <code>MPI_Comm</code> communicator passed here must be
87 equivalent to the communicator used below for plan creation.
88 </p>
89 <p>The basic interface for multidimensional transforms consists of the
90 functions:
91 </p>
92 <a name="index-fftw_005fmpi_005flocal_005fsize_005f2d-2"></a>
93 <a name="index-fftw_005fmpi_005flocal_005fsize_005f3d"></a>
94 <a name="index-fftw_005fmpi_005flocal_005fsize"></a>
95 <a name="index-fftw_005fmpi_005flocal_005fsize_005f2d_005ftransposed-1"></a>
96 <a name="index-fftw_005fmpi_005flocal_005fsize_005f3d_005ftransposed-1"></a>
97 <a name="index-fftw_005fmpi_005flocal_005fsize_005ftransposed"></a>
98 <div class="example">
99 <pre class="example">ptrdiff_t fftw_mpi_local_size_2d(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
100 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
101 ptrdiff_t fftw_mpi_local_size_3d(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2,
102 MPI_Comm comm,
103 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
104 ptrdiff_t fftw_mpi_local_size(int rnk, const ptrdiff_t *n, MPI_Comm comm,
105 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
106
107 ptrdiff_t fftw_mpi_local_size_2d_transposed(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
108 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
109 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
110 ptrdiff_t fftw_mpi_local_size_3d_transposed(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2,
111 MPI_Comm comm,
112 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
113 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
114 ptrdiff_t fftw_mpi_local_size_transposed(int rnk, const ptrdiff_t *n, MPI_Comm comm,
115 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
116 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
117 </pre></div>
118
119 <p>These functions return the number of elements to allocate (complex
120 numbers for DFT/r2c/c2r plans, real numbers for r2r plans), whereas
121 the <code>local_n0</code> and <code>local_0_start</code> return the portion
122 (<code>local_0_start</code> to <code>local_0_start + local_n0 - 1</code>) of the
123 first dimension of an n<sub>0</sub>&nbsp;&times;&nbsp;n<sub>1</sub>&nbsp;&times;&nbsp;n<sub>2</sub>&nbsp;&times;&nbsp;&hellip;&nbsp;&times;&nbsp;n<sub>d-1</sub> array that is stored on the local
124 process. See <a href="Basic-and-advanced-distribution-interfaces.html#Basic-and-advanced-distribution-interfaces">Basic and advanced distribution interfaces</a>. For
125 <code>FFTW_MPI_TRANSPOSED_OUT</code> plans, the &lsquo;<samp>_transposed</samp>&rsquo; variants
126 are useful in order to also return the local portion of the first
127 dimension in the n<sub>1</sub>&nbsp;&times;&nbsp;n<sub>0</sub>&nbsp;&times;&nbsp;n<sub>2</sub>&nbsp;&times;&hellip;&times;&nbsp;n<sub>d-1</sub> transposed output.
128 See <a href="Transposed-distributions.html#Transposed-distributions">Transposed distributions</a>.
129 The advanced interface for multidimensional transforms is:
130 </p>
131 <a name="index-advanced-interface-5"></a>
132 <a name="index-fftw_005fmpi_005flocal_005fsize_005fmany-1"></a>
133 <a name="index-fftw_005fmpi_005flocal_005fsize_005fmany_005ftransposed-1"></a>
134 <div class="example">
135 <pre class="example">ptrdiff_t fftw_mpi_local_size_many(int rnk, const ptrdiff_t *n, ptrdiff_t howmany,
136 ptrdiff_t block0, MPI_Comm comm,
137 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
138 ptrdiff_t fftw_mpi_local_size_many_transposed(int rnk, const ptrdiff_t *n, ptrdiff_t howmany,
139 ptrdiff_t block0, ptrdiff_t block1, MPI_Comm comm,
140 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
141 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
142 </pre></div>
143
144 <p>These differ from the basic interface in only two ways. First, they
145 allow you to specify block sizes <code>block0</code> and <code>block1</code> (the
146 latter for the transposed output); you can pass
147 <code>FFTW_MPI_DEFAULT_BLOCK</code> to use FFTW&rsquo;s default block size as in
148 the basic interface. Second, you can pass a <code>howmany</code> parameter,
149 corresponding to the advanced planning interface below: this is for
150 transforms of contiguous <code>howmany</code>-tuples of numbers
151 (<code>howmany = 1</code> in the basic interface).
152 </p>
153 <p>The corresponding basic and advanced routines for one-dimensional
154 transforms (currently only complex DFTs) are:
155 </p>
156 <a name="index-fftw_005fmpi_005flocal_005fsize_005f1d-1"></a>
157 <a name="index-fftw_005fmpi_005flocal_005fsize_005fmany_005f1d"></a>
158 <div class="example">
159 <pre class="example">ptrdiff_t fftw_mpi_local_size_1d(
160 ptrdiff_t n0, MPI_Comm comm, int sign, unsigned flags,
161 ptrdiff_t *local_ni, ptrdiff_t *local_i_start,
162 ptrdiff_t *local_no, ptrdiff_t *local_o_start);
163 ptrdiff_t fftw_mpi_local_size_many_1d(
164 ptrdiff_t n0, ptrdiff_t howmany,
165 MPI_Comm comm, int sign, unsigned flags,
166 ptrdiff_t *local_ni, ptrdiff_t *local_i_start,
167 ptrdiff_t *local_no, ptrdiff_t *local_o_start);
168 </pre></div>
169
170 <a name="index-FFTW_005fMPI_005fSCRAMBLED_005fOUT-1"></a>
171 <a name="index-FFTW_005fMPI_005fSCRAMBLED_005fIN-1"></a>
172 <p>As above, the return value is the number of elements to allocate
173 (complex numbers, for complex DFTs). The <code>local_ni</code> and
174 <code>local_i_start</code> arguments return the portion
175 (<code>local_i_start</code> to <code>local_i_start + local_ni - 1</code>) of the
176 1d array that is stored on this process for the transform
177 <em>input</em>, and <code>local_no</code> and <code>local_o_start</code> are the
178 corresponding quantities for the input. The <code>sign</code>
179 (<code>FFTW_FORWARD</code> or <code>FFTW_BACKWARD</code>) and <code>flags</code> must
180 match the arguments passed when creating a plan. Although the inputs
181 and outputs have different data distributions in general, it is
182 guaranteed that the <em>output</em> data distribution of an
183 <code>FFTW_FORWARD</code> plan will match the <em>input</em> data distribution
184 of an <code>FFTW_BACKWARD</code> plan and vice versa; similarly for the
185 <code>FFTW_MPI_SCRAMBLED_OUT</code> and <code>FFTW_MPI_SCRAMBLED_IN</code> flags.
186 See <a href="One_002ddimensional-distributions.html#One_002ddimensional-distributions">One-dimensional distributions</a>.
187 </p>
188 <hr>
189 <div class="header">
190 <p>
191 Next: <a href="MPI-Plan-Creation.html#MPI-Plan-Creation" accesskey="n" rel="next">MPI Plan Creation</a>, Previous: <a href="Using-MPI-Plans.html#Using-MPI-Plans" accesskey="p" rel="prev">Using MPI Plans</a>, Up: <a href="FFTW-MPI-Reference.html#FFTW-MPI-Reference" accesskey="u" rel="up">FFTW MPI Reference</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
192 </div>
193
194
195
196 </body>
197 </html>