comparison fft/fftw/fftw-3.3.4/doc/html/MPI-Data-Distribution-Functions.html @ 19:26056e866c29

Add FFTW to comparison table
author Chris Cannam
date Tue, 06 Oct 2015 13:08:39 +0100
parents
children
comparison
equal deleted inserted replaced
18:8db794ca3e0b 19:26056e866c29
1 <html lang="en">
2 <head>
3 <title>MPI Data Distribution Functions - FFTW 3.3.4</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="FFTW 3.3.4">
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="Using-MPI-Plans.html#Using-MPI-Plans" title="Using MPI Plans">
10 <link rel="next" href="MPI-Plan-Creation.html#MPI-Plan-Creation" title="MPI Plan Creation">
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.4, 20 September 2013).
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="MPI-Data-Distribution-Functions"></a>
50 <p>
51 Next:&nbsp;<a rel="next" accesskey="n" href="MPI-Plan-Creation.html#MPI-Plan-Creation">MPI Plan Creation</a>,
52 Previous:&nbsp;<a rel="previous" accesskey="p" href="Using-MPI-Plans.html#Using-MPI-Plans">Using MPI Plans</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.4 MPI Data Distribution Functions</h4>
58
59 <p><a name="index-data-distribution-450"></a>As described above (see <a href="MPI-Data-Distribution.html#MPI-Data-Distribution">MPI Data Distribution</a>), in order to
60 allocate your arrays, <em>before</em> creating a plan, you must first
61 call one of the following routines to determine the required
62 allocation size and the portion of the array locally stored on a given
63 process. The <code>MPI_Comm</code> communicator passed here must be
64 equivalent to the communicator used below for plan creation.
65
66 <p>The basic interface for multidimensional transforms consists of the
67 functions:
68
69 <p><a name="index-fftw_005fmpi_005flocal_005fsize_005f2d-451"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005f3d-452"></a><a name="index-fftw_005fmpi_005flocal_005fsize-453"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005f2d_005ftransposed-454"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005f3d_005ftransposed-455"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005ftransposed-456"></a>
70 <pre class="example"> ptrdiff_t fftw_mpi_local_size_2d(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
71 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
72 ptrdiff_t fftw_mpi_local_size_3d(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2,
73 MPI_Comm comm,
74 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
75 ptrdiff_t fftw_mpi_local_size(int rnk, const ptrdiff_t *n, MPI_Comm comm,
76 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
77
78 ptrdiff_t fftw_mpi_local_size_2d_transposed(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
79 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
80 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
81 ptrdiff_t fftw_mpi_local_size_3d_transposed(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2,
82 MPI_Comm comm,
83 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
84 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
85 ptrdiff_t fftw_mpi_local_size_transposed(int rnk, const ptrdiff_t *n, MPI_Comm comm,
86 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
87 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
88 </pre>
89 <p>These functions return the number of elements to allocate (complex
90 numbers for DFT/r2c/c2r plans, real numbers for r2r plans), whereas
91 the <code>local_n0</code> and <code>local_0_start</code> return the portion
92 (<code>local_0_start</code> to <code>local_0_start + local_n0 - 1</code>) of the
93 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
94 process. See <a href="Basic-and-advanced-distribution-interfaces.html#Basic-and-advanced-distribution-interfaces">Basic and advanced distribution interfaces</a>. For
95 <code>FFTW_MPI_TRANSPOSED_OUT</code> plans, the &lsquo;<samp><span class="samp">_transposed</span></samp>&rsquo; variants
96 are useful in order to also return the local portion of the first
97 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.
98 See <a href="Transposed-distributions.html#Transposed-distributions">Transposed distributions</a>.
99 The advanced interface for multidimensional transforms is:
100
101 <p><a name="index-advanced-interface-457"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005fmany-458"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005fmany_005ftransposed-459"></a>
102 <pre class="example"> ptrdiff_t fftw_mpi_local_size_many(int rnk, const ptrdiff_t *n, ptrdiff_t howmany,
103 ptrdiff_t block0, MPI_Comm comm,
104 ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
105 ptrdiff_t fftw_mpi_local_size_many_transposed(int rnk, const ptrdiff_t *n, ptrdiff_t howmany,
106 ptrdiff_t block0, ptrdiff_t block1, MPI_Comm comm,
107 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
108 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
109 </pre>
110 <p>These differ from the basic interface in only two ways. First, they
111 allow you to specify block sizes <code>block0</code> and <code>block1</code> (the
112 latter for the transposed output); you can pass
113 <code>FFTW_MPI_DEFAULT_BLOCK</code> to use FFTW's default block size as in
114 the basic interface. Second, you can pass a <code>howmany</code> parameter,
115 corresponding to the advanced planning interface below: this is for
116 transforms of contiguous <code>howmany</code>-tuples of numbers
117 (<code>howmany = 1</code> in the basic interface).
118
119 <p>The corresponding basic and advanced routines for one-dimensional
120 transforms (currently only complex DFTs) are:
121
122 <p><a name="index-fftw_005fmpi_005flocal_005fsize_005f1d-460"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005fmany_005f1d-461"></a>
123 <pre class="example"> ptrdiff_t fftw_mpi_local_size_1d(
124 ptrdiff_t n0, MPI_Comm comm, int sign, unsigned flags,
125 ptrdiff_t *local_ni, ptrdiff_t *local_i_start,
126 ptrdiff_t *local_no, ptrdiff_t *local_o_start);
127 ptrdiff_t fftw_mpi_local_size_many_1d(
128 ptrdiff_t n0, ptrdiff_t howmany,
129 MPI_Comm comm, int sign, unsigned flags,
130 ptrdiff_t *local_ni, ptrdiff_t *local_i_start,
131 ptrdiff_t *local_no, ptrdiff_t *local_o_start);
132 </pre>
133 <p><a name="index-FFTW_005fMPI_005fSCRAMBLED_005fOUT-462"></a><a name="index-FFTW_005fMPI_005fSCRAMBLED_005fIN-463"></a>As above, the return value is the number of elements to allocate
134 (complex numbers, for complex DFTs). The <code>local_ni</code> and
135 <code>local_i_start</code> arguments return the portion
136 (<code>local_i_start</code> to <code>local_i_start + local_ni - 1</code>) of the
137 1d array that is stored on this process for the transform
138 <em>input</em>, and <code>local_no</code> and <code>local_o_start</code> are the
139 corresponding quantities for the input. The <code>sign</code>
140 (<code>FFTW_FORWARD</code> or <code>FFTW_BACKWARD</code>) and <code>flags</code> must
141 match the arguments passed when creating a plan. Although the inputs
142 and outputs have different data distributions in general, it is
143 guaranteed that the <em>output</em> data distribution of an
144 <code>FFTW_FORWARD</code> plan will match the <em>input</em> data distribution
145 of an <code>FFTW_BACKWARD</code> plan and vice versa; similarly for the
146 <code>FFTW_MPI_SCRAMBLED_OUT</code> and <code>FFTW_MPI_SCRAMBLED_IN</code> flags.
147 See <a href="One_002ddimensional-distributions.html#One_002ddimensional-distributions">One-dimensional distributions</a>.
148
149 </body></html>
150