d@0
|
1 <html lang="en">
|
d@0
|
2 <head>
|
d@0
|
3 <title>Basic distributed-transpose interface - FFTW 3.2alpha3</title>
|
d@0
|
4 <meta http-equiv="Content-Type" content="text/html">
|
d@0
|
5 <meta name="description" content="FFTW 3.2alpha3">
|
d@0
|
6 <meta name="generator" content="makeinfo 4.8">
|
d@0
|
7 <link title="Top" rel="start" href="index.html#Top">
|
d@0
|
8 <link rel="up" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes" title="FFTW MPI Transposes">
|
d@0
|
9 <link rel="prev" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes" title="FFTW MPI Transposes">
|
d@0
|
10 <link rel="next" href="Advanced-distributed_002dtranspose-interface.html#Advanced-distributed_002dtranspose-interface" title="Advanced distributed-transpose interface">
|
d@0
|
11 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
d@0
|
12 <!--
|
d@0
|
13 This manual is for FFTW
|
d@0
|
14 (version 3.2alpha3, 14 August 2007).
|
d@0
|
15
|
d@0
|
16 Copyright (C) 2003 Matteo Frigo.
|
d@0
|
17
|
d@0
|
18 Copyright (C) 2003 Massachusetts Institute of Technology.
|
d@0
|
19
|
d@0
|
20 Permission is granted to make and distribute verbatim copies of
|
d@0
|
21 this manual provided the copyright notice and this permission
|
d@0
|
22 notice are preserved on all copies.
|
d@0
|
23
|
d@0
|
24 Permission is granted to copy and distribute modified versions of
|
d@0
|
25 this manual under the conditions for verbatim copying, provided
|
d@0
|
26 that the entire resulting derived work is distributed under the
|
d@0
|
27 terms of a permission notice identical to this one.
|
d@0
|
28
|
d@0
|
29 Permission is granted to copy and distribute translations of this
|
d@0
|
30 manual into another language, under the above conditions for
|
d@0
|
31 modified versions, except that this permission notice may be
|
d@0
|
32 stated in a translation approved by the Free Software Foundation.
|
d@0
|
33 -->
|
d@0
|
34 <meta http-equiv="Content-Style-Type" content="text/css">
|
d@0
|
35 <style type="text/css"><!--
|
d@0
|
36 pre.display { font-family:inherit }
|
d@0
|
37 pre.format { font-family:inherit }
|
d@0
|
38 pre.smalldisplay { font-family:inherit; font-size:smaller }
|
d@0
|
39 pre.smallformat { font-family:inherit; font-size:smaller }
|
d@0
|
40 pre.smallexample { font-size:smaller }
|
d@0
|
41 pre.smalllisp { font-size:smaller }
|
d@0
|
42 span.sc { font-variant:small-caps }
|
d@0
|
43 span.roman { font-family:serif; font-weight:normal; }
|
d@0
|
44 span.sansserif { font-family:sans-serif; font-weight:normal; }
|
d@0
|
45 --></style>
|
d@0
|
46 </head>
|
d@0
|
47 <body>
|
d@0
|
48 <div class="node">
|
d@0
|
49 <p>
|
d@0
|
50 <a name="Basic-distributed-transpose-interface"></a>
|
d@0
|
51 <a name="Basic-distributed_002dtranspose-interface"></a>
|
d@0
|
52 Next: <a rel="next" accesskey="n" href="Advanced-distributed_002dtranspose-interface.html#Advanced-distributed_002dtranspose-interface">Advanced distributed-transpose interface</a>,
|
d@0
|
53 Previous: <a rel="previous" accesskey="p" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes">FFTW MPI Transposes</a>,
|
d@0
|
54 Up: <a rel="up" accesskey="u" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes">FFTW MPI Transposes</a>
|
d@0
|
55 <hr>
|
d@0
|
56 </div>
|
d@0
|
57
|
d@0
|
58 <h4 class="subsection">6.7.1 Basic distributed-transpose interface</h4>
|
d@0
|
59
|
d@0
|
60 <p>In particular, suppose that we have an <code>n0</code> by <code>n1</code> array in
|
d@0
|
61 row-major order, block-distributed across the <code>n0</code> dimension. To
|
d@0
|
62 transpose this into an <code>n1</code> by <code>n0</code> array block-distributed
|
d@0
|
63 across the <code>n1</code> dimension, we would create a plan by calling the
|
d@0
|
64 following function:
|
d@0
|
65
|
d@0
|
66 <pre class="example"> fftw_plan fftw_mpi_plan_transpose(ptrdiff_t n0, ptrdiff_t n1,
|
d@0
|
67 double *in, double *out,
|
d@0
|
68 MPI_Comm comm, unsigned flags);
|
d@0
|
69 </pre>
|
d@0
|
70 <p><a name="index-fftw_005fmpi_005fplan_005ftranspose-367"></a>
|
d@0
|
71 The input and output arrays (<code>in</code> and <code>out</code>) can be the
|
d@0
|
72 same. The transpose is actually executed by calling
|
d@0
|
73 <code>fftw_execute</code> on the plan, as usual.
|
d@0
|
74 <a name="index-fftw_005fexecute-368"></a>
|
d@0
|
75 The <code>flags</code> are the usual FFTW planner flags, but support
|
d@0
|
76 two additional flags: <code>FFTW_MPI_TRANSPOSED_OUT</code> and/or
|
d@0
|
77 <code>FFTW_MPI_TRANSPOSED_IN</code>. What these flags indicate, for
|
d@0
|
78 transpose plans, is that the output and/or input, respectively, are
|
d@0
|
79 <em>locally</em> transposed. That is, on each process input data is
|
d@0
|
80 normally stored as a <code>local_n0</code> by <code>n1</code> array in row-major
|
d@0
|
81 order, but for an <code>FFTW_MPI_TRANSPOSED_IN</code> plan the input data is
|
d@0
|
82 stored as <code>n1</code> by <code>local_n0</code> in row-major order. Similarly,
|
d@0
|
83 <code>FFTW_MPI_TRANSPOSED_OUT</code> means that the output is <code>n0</code> by
|
d@0
|
84 <code>local_n1</code> instead of <code>local_n1</code> by <code>n0</code>.
|
d@0
|
85 <a name="index-FFTW_005fMPI_005fTRANSPOSED_005fOUT-369"></a><a name="index-FFTW_005fMPI_005fTRANSPOSED_005fIN-370"></a>
|
d@0
|
86 To determine the local size of the array on each process before and
|
d@0
|
87 after the transpose, as well as the amount of storage that must be
|
d@0
|
88 allocated, one should call <code>fftw_mpi_local_size_2d_transposed</code>,
|
d@0
|
89 just as for a 2d DFT as described in the previous section:
|
d@0
|
90 <a name="index-data-distribution-371"></a>
|
d@0
|
91 <pre class="example"> ptrdiff_t fftw_mpi_local_size_2d_transposed
|
d@0
|
92 (ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
|
d@0
|
93 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
|
d@0
|
94 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
|
d@0
|
95 </pre>
|
d@0
|
96 <p><a name="index-fftw_005fmpi_005flocal_005fsize_005f2d_005ftransposed-372"></a>
|
d@0
|
97
|
d@0
|
98 </body></html>
|
d@0
|
99
|