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