Mercurial > hg > batch-feature-extraction-tool
comparison Lib/fftw-3.2.1/doc/html/.svn/text-base/An-improved-replacement-for-MPI_005fAlltoall.html.svn-base @ 0:25bf17994ef1
First commit. VS2013, Codeblocks and Mac OSX configuration
author | Geogaddi\David <d.m.ronan@qmul.ac.uk> |
---|---|
date | Thu, 09 Jul 2015 01:12:16 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:25bf17994ef1 |
---|---|
1 <html lang="en"> | |
2 <head> | |
3 <title>An improved replacement for MPI_Alltoall - FFTW 3.2alpha3</title> | |
4 <meta http-equiv="Content-Type" content="text/html"> | |
5 <meta name="description" content="FFTW 3.2alpha3"> | |
6 <meta name="generator" content="makeinfo 4.8"> | |
7 <link title="Top" rel="start" href="index.html#Top"> | |
8 <link rel="up" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes" title="FFTW MPI Transposes"> | |
9 <link rel="prev" href="Advanced-distributed_002dtranspose-interface.html#Advanced-distributed_002dtranspose-interface" title="Advanced distributed-transpose interface"> | |
10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> | |
11 <!-- | |
12 This manual is for FFTW | |
13 (version 3.2alpha3, 14 August 2007). | |
14 | |
15 Copyright (C) 2003 Matteo Frigo. | |
16 | |
17 Copyright (C) 2003 Massachusetts Institute of Technology. | |
18 | |
19 Permission is granted to make and distribute verbatim copies of | |
20 this manual provided the copyright notice and this permission | |
21 notice are preserved on all copies. | |
22 | |
23 Permission is granted to copy and distribute modified versions of | |
24 this manual under the conditions for verbatim copying, provided | |
25 that the entire resulting derived work is distributed under the | |
26 terms of a permission notice identical to this one. | |
27 | |
28 Permission is granted to copy and distribute translations of this | |
29 manual into another language, under the above conditions for | |
30 modified versions, except that this permission notice may be | |
31 stated in a translation approved by the Free Software Foundation. | |
32 --> | |
33 <meta http-equiv="Content-Style-Type" content="text/css"> | |
34 <style type="text/css"><!-- | |
35 pre.display { font-family:inherit } | |
36 pre.format { font-family:inherit } | |
37 pre.smalldisplay { font-family:inherit; font-size:smaller } | |
38 pre.smallformat { font-family:inherit; font-size:smaller } | |
39 pre.smallexample { font-size:smaller } | |
40 pre.smalllisp { font-size:smaller } | |
41 span.sc { font-variant:small-caps } | |
42 span.roman { font-family:serif; font-weight:normal; } | |
43 span.sansserif { font-family:sans-serif; font-weight:normal; } | |
44 --></style> | |
45 </head> | |
46 <body> | |
47 <div class="node"> | |
48 <p> | |
49 <a name="An-improved-replacement-for-MPI_Alltoall"></a> | |
50 <a name="An-improved-replacement-for-MPI_005fAlltoall"></a> | |
51 Previous: <a rel="previous" accesskey="p" href="Advanced-distributed_002dtranspose-interface.html#Advanced-distributed_002dtranspose-interface">Advanced distributed-transpose interface</a>, | |
52 Up: <a rel="up" accesskey="u" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes">FFTW MPI Transposes</a> | |
53 <hr> | |
54 </div> | |
55 | |
56 <h4 class="subsection">6.7.3 An improved replacement for MPI_Alltoall</h4> | |
57 | |
58 <p>We close this section by noting that FFTW's MPI transpose routines can | |
59 be thought of as a generalization for the <code>MPI_Alltoall</code> function | |
60 (albeit only for floating-point types), and in some circumstances can | |
61 function as an improved replacement. | |
62 <a name="index-MPI_005fAlltoall-376"></a> | |
63 <code>MPI_Alltoall</code> is defined by the MPI standard as: | |
64 | |
65 <pre class="example"> int MPI_Alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype, | |
66 void *recvbuf, int recvcnt, MPI_Datatype recvtype, | |
67 MPI_Comm comm); | |
68 </pre> | |
69 <p>In particular, for <code>double*</code> arrays <code>in</code> and <code>out</code>, | |
70 consider the call: | |
71 | |
72 <pre class="example"> MPI_Alltoall(in, howmany, MPI_DOUBLE, out, howmany MPI_DOUBLE, comm); | |
73 </pre> | |
74 <p>This is completely equivalent to: | |
75 | |
76 <pre class="example"> MPI_Comm_size(comm, &P); | |
77 plan = fftw_mpi_plan_many_transpose(P, P, howmany, 1, 1, in, out, comm, FFTW_ESTIMATE); | |
78 fftw_execute(plan); | |
79 fftw_destroy_plan(plan); | |
80 </pre> | |
81 <p>That is, computing a P × P transpose on <code>P</code> processes, | |
82 with a block size of 1, is just a standard all-to-all communication. | |
83 | |
84 <p>However, using the FFTW routine instead of <code>MPI_Alltoall</code> may | |
85 have certain advantages. First of all, FFTW's routine can operate | |
86 in-place <code>in == out</code>) whereas <code>MPI_Alltoall</code> can only | |
87 operate out-of-place. | |
88 <a name="index-in_002dplace-377"></a> | |
89 Second, even for out-of-place plans, FFTW's routine may be faster, | |
90 especially if you need to perform the all-to-all communication many | |
91 times and can afford to use <code>FFTW_MEASURE</code> or | |
92 <code>FFTW_PATIENT</code>. It should certainly be no slower, not including | |
93 the time to create the plan, since one of the possible algorithms that | |
94 FFTW uses for an out-of-place transpose <em>is</em> simply to call | |
95 <code>MPI_Alltoall</code>. However, FFTW also considers several other | |
96 possible algorithms that, depending on your MPI implementation and | |
97 your hardware, may be faster. | |
98 <a name="index-FFTW_005fMEASURE-378"></a><a name="index-FFTW_005fPATIENT-379"></a> | |
99 <!-- --> | |
100 | |
101 </body></html> | |
102 |