comparison src/fftw-3.3.8/doc/html/MPI-Data-Distribution-Functions.html @ 167:bd3cc4d1df30

Add FFTW 3.3.8 source, and a Linux build
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 19 Nov 2019 14:52:55 +0000
parents
children
comparison
equal deleted inserted replaced
166:cbd6d7e562c7 167:bd3cc4d1df30
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.8, 24 May 2018).
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 6.3, http://www.gnu.org/software/texinfo/ -->
24 <head>
25 <title>FFTW 3.3.8: MPI Data Distribution Functions</title>
26
27 <meta name="description" content="FFTW 3.3.8: MPI Data Distribution Functions">
28 <meta name="keywords" content="FFTW 3.3.8: 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.indentedblock {margin-right: 0em}
43 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
44 blockquote.smallquotation {font-size: smaller}
45 div.display {margin-left: 3.2em}
46 div.example {margin-left: 3.2em}
47 div.lisp {margin-left: 3.2em}
48 div.smalldisplay {margin-left: 3.2em}
49 div.smallexample {margin-left: 3.2em}
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.nolinebreak {white-space: nowrap}
61 span.roman {font-family: initial; font-weight: normal}
62 span.sansserif {font-family: sans-serif; font-weight: normal}
63 ul.no-bullet {list-style: none}
64 -->
65 </style>
66
67
68 </head>
69
70 <body lang="en">
71 <a name="MPI-Data-Distribution-Functions"></a>
72 <div class="header">
73 <p>
74 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>
75 </div>
76 <hr>
77 <a name="MPI-Data-Distribution-Functions-1"></a>
78 <h4 class="subsection">6.12.4 MPI Data Distribution Functions</h4>
79
80 <a name="index-data-distribution-5"></a>
81 <p>As described above (see <a href="MPI-Data-Distribution.html#MPI-Data-Distribution">MPI Data Distribution</a>), in order to
82 allocate your arrays, <em>before</em> creating a plan, you must first
83 call one of the following routines to determine the required
84 allocation size and the portion of the array locally stored on a given
85 process. The <code>MPI_Comm</code> communicator passed here must be
86 equivalent to the communicator used below for plan creation.
87 </p>
88 <p>The basic interface for multidimensional transforms consists of the
89 functions:
90 </p>
91 <a name="index-fftw_005fmpi_005flocal_005fsize_005f2d-2"></a>
92 <a name="index-fftw_005fmpi_005flocal_005fsize_005f3d"></a>
93 <a name="index-fftw_005fmpi_005flocal_005fsize"></a>
94 <a name="index-fftw_005fmpi_005flocal_005fsize_005f2d_005ftransposed-1"></a>
95 <a name="index-fftw_005fmpi_005flocal_005fsize_005f3d_005ftransposed-1"></a>
96 <a name="index-fftw_005fmpi_005flocal_005fsize_005ftransposed"></a>
97 <div class="example">
98 <pre class="example">ptrdiff_t fftw_mpi_local_size_2d(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
99 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
100 ptrdiff_t fftw_mpi_local_size_3d(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2,
101 MPI_Comm comm,
102 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
103 ptrdiff_t fftw_mpi_local_size(int rnk, const ptrdiff_t *n, MPI_Comm comm,
104 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
105
106 ptrdiff_t fftw_mpi_local_size_2d_transposed(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
107 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
108 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
109 ptrdiff_t fftw_mpi_local_size_3d_transposed(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2,
110 MPI_Comm comm,
111 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
112 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
113 ptrdiff_t fftw_mpi_local_size_transposed(int rnk, const ptrdiff_t *n, MPI_Comm comm,
114 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
115 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
116 </pre></div>
117
118 <p>These functions return the number of elements to allocate (complex
119 numbers for DFT/r2c/c2r plans, real numbers for r2r plans), whereas
120 the <code>local_n0</code> and <code>local_0_start</code> return the portion
121 (<code>local_0_start</code> to <code>local_0_start + local_n0 - 1</code>) of the
122 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>
123 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>
128 transposed output.
129 See <a href="Transposed-distributions.html#Transposed-distributions">Transposed distributions</a>.
130 The advanced interface for multidimensional transforms is:
131 </p>
132 <a name="index-advanced-interface-5"></a>
133 <a name="index-fftw_005fmpi_005flocal_005fsize_005fmany-1"></a>
134 <a name="index-fftw_005fmpi_005flocal_005fsize_005fmany_005ftransposed-1"></a>
135 <div class="example">
136 <pre class="example">ptrdiff_t fftw_mpi_local_size_many(int rnk, const ptrdiff_t *n, ptrdiff_t howmany,
137 ptrdiff_t block0, MPI_Comm comm,
138 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
139 ptrdiff_t fftw_mpi_local_size_many_transposed(int rnk, const ptrdiff_t *n, ptrdiff_t howmany,
140 ptrdiff_t block0, ptrdiff_t block1, MPI_Comm comm,
141 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
142 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
143 </pre></div>
144
145 <p>These differ from the basic interface in only two ways. First, they
146 allow you to specify block sizes <code>block0</code> and <code>block1</code> (the
147 latter for the transposed output); you can pass
148 <code>FFTW_MPI_DEFAULT_BLOCK</code> to use FFTW&rsquo;s default block size as in
149 the basic interface. Second, you can pass a <code>howmany</code> parameter,
150 corresponding to the advanced planning interface below: this is for
151 transforms of contiguous <code>howmany</code>-tuples of numbers
152 (<code>howmany = 1</code> in the basic interface).
153 </p>
154 <p>The corresponding basic and advanced routines for one-dimensional
155 transforms (currently only complex DFTs) are:
156 </p>
157 <a name="index-fftw_005fmpi_005flocal_005fsize_005f1d-1"></a>
158 <a name="index-fftw_005fmpi_005flocal_005fsize_005fmany_005f1d"></a>
159 <div class="example">
160 <pre class="example">ptrdiff_t fftw_mpi_local_size_1d(
161 ptrdiff_t n0, MPI_Comm comm, int sign, unsigned flags,
162 ptrdiff_t *local_ni, ptrdiff_t *local_i_start,
163 ptrdiff_t *local_no, ptrdiff_t *local_o_start);
164 ptrdiff_t fftw_mpi_local_size_many_1d(
165 ptrdiff_t n0, ptrdiff_t howmany,
166 MPI_Comm comm, int sign, unsigned flags,
167 ptrdiff_t *local_ni, ptrdiff_t *local_i_start,
168 ptrdiff_t *local_no, ptrdiff_t *local_o_start);
169 </pre></div>
170
171 <a name="index-FFTW_005fMPI_005fSCRAMBLED_005fOUT-1"></a>
172 <a name="index-FFTW_005fMPI_005fSCRAMBLED_005fIN-1"></a>
173 <p>As above, the return value is the number of elements to allocate
174 (complex numbers, for complex DFTs). The <code>local_ni</code> and
175 <code>local_i_start</code> arguments return the portion
176 (<code>local_i_start</code> to <code>local_i_start + local_ni - 1</code>) of the
177 1d array that is stored on this process for the transform
178 <em>input</em>, and <code>local_no</code> and <code>local_o_start</code> are the
179 corresponding quantities for the input. The <code>sign</code>
180 (<code>FFTW_FORWARD</code> or <code>FFTW_BACKWARD</code>) and <code>flags</code> must
181 match the arguments passed when creating a plan. Although the inputs
182 and outputs have different data distributions in general, it is
183 guaranteed that the <em>output</em> data distribution of an
184 <code>FFTW_FORWARD</code> plan will match the <em>input</em> data distribution
185 of an <code>FFTW_BACKWARD</code> plan and vice versa; similarly for the
186 <code>FFTW_MPI_SCRAMBLED_OUT</code> and <code>FFTW_MPI_SCRAMBLED_IN</code> flags.
187 See <a href="One_002ddimensional-distributions.html#One_002ddimensional-distributions">One-dimensional distributions</a>.
188 </p>
189 <hr>
190 <div class="header">
191 <p>
192 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>
193 </div>
194
195
196
197 </body>
198 </html>