d@0
|
1 <html lang="en">
|
d@0
|
2 <head>
|
d@0
|
3 <title>Installation on Unix - FFTW 3.2.1</title>
|
d@0
|
4 <meta http-equiv="Content-Type" content="text/html">
|
d@0
|
5 <meta name="description" content="FFTW 3.2.1">
|
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="Installation-and-Customization.html#Installation-and-Customization" title="Installation and Customization">
|
d@0
|
9 <link rel="prev" href="Installation-and-Customization.html#Installation-and-Customization" title="Installation and Customization">
|
d@0
|
10 <link rel="next" href="Installation-on-non_002dUnix-systems.html#Installation-on-non_002dUnix-systems" title="Installation on non-Unix systems">
|
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.2.1, 5 February 2009).
|
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="Installation-on-Unix"></a>
|
d@0
|
51 Next: <a rel="next" accesskey="n" href="Installation-on-non_002dUnix-systems.html#Installation-on-non_002dUnix-systems">Installation on non-Unix systems</a>,
|
d@0
|
52 Previous: <a rel="previous" accesskey="p" href="Installation-and-Customization.html#Installation-and-Customization">Installation and Customization</a>,
|
d@0
|
53 Up: <a rel="up" accesskey="u" href="Installation-and-Customization.html#Installation-and-Customization">Installation and Customization</a>
|
d@0
|
54 <hr>
|
d@0
|
55 </div>
|
d@0
|
56
|
d@0
|
57 <h3 class="section">9.1 Installation on Unix</h3>
|
d@0
|
58
|
d@0
|
59 <p>FFTW comes with a <code>configure</code> program in the GNU style.
|
d@0
|
60 Installation can be as simple as:
|
d@0
|
61 <a name="index-configure-362"></a>
|
d@0
|
62 <pre class="example"> ./configure
|
d@0
|
63 make
|
d@0
|
64 make install
|
d@0
|
65 </pre>
|
d@0
|
66 <p>This will build the uniprocessor complex and real transform libraries
|
d@0
|
67 along with the test programs. (We recommend that you use GNU
|
d@0
|
68 <code>make</code> if it is available; on some systems it is called
|
d@0
|
69 <code>gmake</code>.) The “<code>make install</code>” command installs the fftw
|
d@0
|
70 and rfftw libraries in standard places, and typically requires root
|
d@0
|
71 privileges (unless you specify a different install directory with the
|
d@0
|
72 <code>--prefix</code> flag to <code>configure</code>). You can also type
|
d@0
|
73 “<code>make check</code>” to put the FFTW test programs through their paces.
|
d@0
|
74 If you have problems during configuration or compilation, you may want
|
d@0
|
75 to run “<code>make distclean</code>” before trying again; this ensures that
|
d@0
|
76 you don't have any stale files left over from previous compilation
|
d@0
|
77 attempts.
|
d@0
|
78
|
d@0
|
79 <p>The <code>configure</code> script chooses the <code>gcc</code> compiler by default,
|
d@0
|
80 if it is available; you can select some other compiler with:
|
d@0
|
81 <pre class="example"> ./configure CC="<i><the name of your C compiler></i>"
|
d@0
|
82 </pre>
|
d@0
|
83 <p>The <code>configure</code> script knows good <code>CFLAGS</code> (C compiler flags)
|
d@0
|
84 <a name="index-compiler-flags-363"></a>for a few systems. If your system is not known, the <code>configure</code>
|
d@0
|
85 script will print out a warning. In this case, you should re-configure
|
d@0
|
86 FFTW with the command
|
d@0
|
87 <pre class="example"> ./configure CFLAGS="<i><write your CFLAGS here></i>"
|
d@0
|
88 </pre>
|
d@0
|
89 <p>and then compile as usual. If you do find an optimal set of
|
d@0
|
90 <code>CFLAGS</code> for your system, please let us know what they are (along
|
d@0
|
91 with the output of <code>config.guess</code>) so that we can include them in
|
d@0
|
92 future releases.
|
d@0
|
93
|
d@0
|
94 <p><code>configure</code> supports all the standard flags defined by the GNU
|
d@0
|
95 Coding Standards; see the <code>INSTALL</code> file in FFTW or
|
d@0
|
96 <a href="http://www.gnu.org/prep/standards_toc.html">the GNU web page</a>.
|
d@0
|
97 Note especially <code>--help</code> to list all flags and
|
d@0
|
98 <code>--enable-shared</code> to create shared, rather than static, libraries.
|
d@0
|
99 <code>configure</code> also accepts a few FFTW-specific flags, particularly:
|
d@0
|
100
|
d@0
|
101 <ul>
|
d@0
|
102 <li><a name="index-portability-364"></a><code>--enable-portable-binary</code>: Disable compiler optimizations that
|
d@0
|
103 would produce unportable binaries. <b>Important:</b> Use this if you are
|
d@0
|
104 distributing compiled binaries to people who may not use exactly the
|
d@0
|
105 same processor as you.
|
d@0
|
106
|
d@0
|
107 <li><code>--with-gcc-arch=</code><i>arch</i>: When compiling with <code>gcc</code>, FFTW
|
d@0
|
108 tries to deduce the current CPU in order to tell <code>gcc</code> what
|
d@0
|
109 architecture to tune for; this option overrides that guess
|
d@0
|
110 (i.e. <i>arch</i> should be a valid argument for <code>gcc</code>'s
|
d@0
|
111 <code>-march</code> or <code>-mtune</code> flags). You might do this because the
|
d@0
|
112 deduced architecture was wrong or because you want to tune for a
|
d@0
|
113 different CPU than the one you are compiling with. You can use
|
d@0
|
114 <code>--without-gcc-arch</code> to disable architecture-specific tuning
|
d@0
|
115 entirely. Note that if <code>--enable-portable-binary</code> is enabled
|
d@0
|
116 (above), then we use <code>-mtune</code> but not <code>-march</code>, so the
|
d@0
|
117 resulting binary will run on any architecture even though it is
|
d@0
|
118 optimized for a particular one.
|
d@0
|
119
|
d@0
|
120 <li><a name="index-precision-365"></a><code>--enable-float</code>: Produces a single-precision version of FFTW
|
d@0
|
121 (<code>float</code>) instead of the default double-precision (<code>double</code>).
|
d@0
|
122 See <a href="Precision.html#Precision">Precision</a>.
|
d@0
|
123
|
d@0
|
124 <li><a name="index-precision-366"></a><code>--enable-long-double</code>: Produces a long-double precision version of
|
d@0
|
125 FFTW (<code>long double</code>) instead of the default double-precision
|
d@0
|
126 (<code>double</code>). The <code>configure</code> script will halt with an error
|
d@0
|
127 message is <code>long double</code> is the same size as <code>double</code> on your
|
d@0
|
128 machine/compiler. See <a href="Precision.html#Precision">Precision</a>.
|
d@0
|
129
|
d@0
|
130 <li><a name="index-threads-367"></a><code>--enable-threads</code>: Enables compilation and installation of the
|
d@0
|
131 FFTW threads library (see <a href="Multi_002dthreaded-FFTW.html#Multi_002dthreaded-FFTW">Multi-threaded FFTW</a>), which provides a
|
d@0
|
132 simple interface to parallel transforms for SMP systems. By default,
|
d@0
|
133 the threads routines are not compiled.
|
d@0
|
134
|
d@0
|
135 <li><code>--enable-openmp</code>: Like <code>--enable-threads</code>, but using OpenMP
|
d@0
|
136 compiler directives in order to induce parallelism rather than
|
d@0
|
137 spawning its own threads directly. Useful especially for programs
|
d@0
|
138 already employing such directives, in order to minimize conflicts
|
d@0
|
139 between different parallelization mechanisms. Use either
|
d@0
|
140 <code>--enable-openmp</code> or <code>--enable-threads</code>, not both; in either
|
d@0
|
141 case the multi-threaded FFTW interface/library (see <a href="Multi_002dthreaded-FFTW.html#Multi_002dthreaded-FFTW">Multi-threaded FFTW</a>) is compiled (with different back ends).
|
d@0
|
142
|
d@0
|
143 <li><code>--with-combined-threads</code>: By default, if <code>--enable-threads</code>
|
d@0
|
144 or <code>--enable-openmp</code> are used, the threads support is compiled
|
d@0
|
145 into a separate library that must be linked in addition to the main
|
d@0
|
146 FFTW library. This is so that users of the serial library do not need
|
d@0
|
147 to link the system threads libraries. If
|
d@0
|
148 <code>--with-combined-threads</code> is specified, however, then no separate
|
d@0
|
149 threads library is created, and threads are included in the main FFTW
|
d@0
|
150 library. This is mainly useful under Windows, where no system threads
|
d@0
|
151 library is required and inter-library dependencies are problematic.
|
d@0
|
152
|
d@0
|
153 <li><a name="index-Cell-processor-368"></a><code>--enable-cell</code>: Enables code to exploit the Cell processor
|
d@0
|
154 (see <a href="FFTW-on-the-Cell-Processor.html#FFTW-on-the-Cell-Processor">FFTW on the Cell Processor</a>), assuming you have the Cell SDK.
|
d@0
|
155 By default, code for the Cell processor is not compiled.
|
d@0
|
156
|
d@0
|
157 <li><a name="index-Fortran_002dcallable-wrappers-369"></a><code>--disable-fortran</code>: Disables inclusion of Fortran-callable
|
d@0
|
158 wrapper routines (see <a href="Calling-FFTW-from-Fortran.html#Calling-FFTW-from-Fortran">Calling FFTW from Fortran</a>) in the standard
|
d@0
|
159 FFTW libraries. These wrapper routines increase the library size by
|
d@0
|
160 only a negligible amount, so they are included by default as long as
|
d@0
|
161 the <code>configure</code> script finds a Fortran compiler on your system.
|
d@0
|
162 (To specify a particular Fortran compiler <i>foo</i>, pass
|
d@0
|
163 <code>F77=</code><i>foo</i> to <code>configure</code>.)
|
d@0
|
164
|
d@0
|
165 <li><code>--with-g77-wrappers</code>: By default, when Fortran wrappers are
|
d@0
|
166 included, the wrappers employ the linking conventions of the Fortran
|
d@0
|
167 compiler detected by the <code>configure</code> script. If this compiler is
|
d@0
|
168 GNU <code>g77</code>, however, then <em>two</em> versions of the wrappers are
|
d@0
|
169 included: one with <code>g77</code>'s idiosyncratic convention of appending
|
d@0
|
170 two underscores to identifiers, and one with the more common
|
d@0
|
171 convention of appending only a single underscore. This way, the same
|
d@0
|
172 FFTW library will work with both <code>g77</code> and other Fortran
|
d@0
|
173 compilers, such as GNU <code>gfortran</code>. However, the converse is not
|
d@0
|
174 true: if you configure with a different compiler, then the
|
d@0
|
175 <code>g77</code>-compatible wrappers are not included. By specifying
|
d@0
|
176 <code>--with-g77-wrappers</code>, the <code>g77</code>-compatible wrappers are
|
d@0
|
177 included in addition to wrappers for whatever Fortran compiler
|
d@0
|
178 <code>configure</code> finds.
|
d@0
|
179 <a name="index-g77-370"></a>
|
d@0
|
180 <li><code>--with-slow-timer</code>: Disables the use of hardware cycle counters,
|
d@0
|
181 and falls back on <code>gettimeofday</code> or <code>clock</code>. This greatly
|
d@0
|
182 worsens performance, and should generally not be used (unless you don't
|
d@0
|
183 have a cycle counter but still really want an optimized plan regardless
|
d@0
|
184 of the time). See <a href="Cycle-Counters.html#Cycle-Counters">Cycle Counters</a>.
|
d@0
|
185
|
d@0
|
186 <li><code>--enable-sse</code>, <code>--enable-sse2</code>, <code>--enable-altivec</code>,
|
d@0
|
187 <code>--enable-mips-ps</code>:
|
d@0
|
188 Enable the compilation of SIMD code for SSE (Pentium III+), SSE2
|
d@0
|
189 (Pentium IV+), AltiVec (PowerPC G4+), or MIPS PS. SSE, AltiVec, and MIPS PS
|
d@0
|
190 only work with <code>--enable-float</code> (above), while SSE2 only works in double
|
d@0
|
191 precision (the default). The resulting code will <em>still work</em> on
|
d@0
|
192 earlier CPUs lacking the SIMD extensions (SIMD is automatically
|
d@0
|
193 disabled, although the FFTW library is still larger).
|
d@0
|
194 <ul>
|
d@0
|
195 <li>These options require a compiler supporting SIMD extensions, and
|
d@0
|
196 compiler support is still a bit flaky: see the FFTW FAQ for a list of
|
d@0
|
197 compiler versions that have problems compiling FFTW.
|
d@0
|
198 <li>With the Linux kernel, you may have to recompile the kernel with the
|
d@0
|
199 option to support SSE/SSE2/AltiVec (see the “Processor type and
|
d@0
|
200 features” settings).
|
d@0
|
201 <li>With AltiVec and <code>gcc</code>, you may have to use the
|
d@0
|
202 <code>-mabi=altivec</code> option when compiling any code that links to FFTW,
|
d@0
|
203 in order to properly align the stack; otherwise, FFTW could crash when
|
d@0
|
204 it tries to use an AltiVec feature. (This is not necessary on MacOS X.)
|
d@0
|
205 <li>With SSE/SSE2 and <code>gcc</code>, you should use a version of gcc that
|
d@0
|
206 properly aligns the stack when compiling any code that links to FFTW.
|
d@0
|
207 By default, <code>gcc</code> 2.95 and later versions align the stack as
|
d@0
|
208 needed, but you should not compile FFTW with the <code>-Os</code> option or the
|
d@0
|
209 <code>-mpreferred-stack-boundary</code> option with an argument less than 4.
|
d@0
|
210 </ul>
|
d@0
|
211
|
d@0
|
212 </ul>
|
d@0
|
213
|
d@0
|
214 <p><a name="index-compiler-371"></a>To force <code>configure</code> to use a particular C compiler <i>foo</i>
|
d@0
|
215 (instead of the default, usually <code>gcc</code>), pass <code>CC=</code><i>foo</i> to the
|
d@0
|
216 <code>configure</code> script; you may also need to set the flags via the variable
|
d@0
|
217 <code>CFLAGS</code> as described above.
|
d@0
|
218 <a name="index-compiler-flags-372"></a>
|
d@0
|
219 <!-- -->
|
d@0
|
220
|
d@0
|
221 </body></html>
|
d@0
|
222
|