comparison src/fftw-3.3.3/doc/html/Installation-on-Unix.html @ 95:89f5e221ed7b

Add FFTW3
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
comparison
equal deleted inserted replaced
94:d278df1123f9 95:89f5e221ed7b
1 <html lang="en">
2 <head>
3 <title>Installation on Unix - FFTW 3.3.3</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="FFTW 3.3.3">
6 <meta name="generator" content="makeinfo 4.13">
7 <link title="Top" rel="start" href="index.html#Top">
8 <link rel="up" href="Installation-and-Customization.html#Installation-and-Customization" title="Installation and Customization">
9 <link rel="prev" href="Installation-and-Customization.html#Installation-and-Customization" title="Installation and Customization">
10 <link rel="next" href="Installation-on-non_002dUnix-systems.html#Installation-on-non_002dUnix-systems" title="Installation on non-Unix systems">
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.3, 25 November 2012).
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="Installation-on-Unix"></a>
50 <p>
51 Next:&nbsp;<a rel="next" accesskey="n" href="Installation-on-non_002dUnix-systems.html#Installation-on-non_002dUnix-systems">Installation on non-Unix systems</a>,
52 Previous:&nbsp;<a rel="previous" accesskey="p" href="Installation-and-Customization.html#Installation-and-Customization">Installation and Customization</a>,
53 Up:&nbsp;<a rel="up" accesskey="u" href="Installation-and-Customization.html#Installation-and-Customization">Installation and Customization</a>
54 <hr>
55 </div>
56
57 <h3 class="section">10.1 Installation on Unix</h3>
58
59 <p>FFTW comes with a <code>configure</code> program in the GNU style.
60 Installation can be as simple as:
61 <a name="index-configure-608"></a>
62 <pre class="example"> ./configure
63 make
64 make install
65 </pre>
66 <p>This will build the uniprocessor complex and real transform libraries
67 along with the test programs. (We recommend that you use GNU
68 <code>make</code> if it is available; on some systems it is called
69 <code>gmake</code>.) The &ldquo;<code>make install</code>&rdquo; command installs the fftw
70 and rfftw libraries in standard places, and typically requires root
71 privileges (unless you specify a different install directory with the
72 <code>--prefix</code> flag to <code>configure</code>). You can also type
73 &ldquo;<code>make check</code>&rdquo; to put the FFTW test programs through their paces.
74 If you have problems during configuration or compilation, you may want
75 to run &ldquo;<code>make distclean</code>&rdquo; before trying again; this ensures that
76 you don't have any stale files left over from previous compilation
77 attempts.
78
79 <p>The <code>configure</code> script chooses the <code>gcc</code> compiler by default,
80 if it is available; you can select some other compiler with:
81 <pre class="example"> ./configure CC="<i>&lt;the name of your C compiler&gt;</i>"
82 </pre>
83 <p>The <code>configure</code> script knows good <code>CFLAGS</code> (C compiler flags)
84 <a name="index-compiler-flags-609"></a>for a few systems. If your system is not known, the <code>configure</code>
85 script will print out a warning. In this case, you should re-configure
86 FFTW with the command
87 <pre class="example"> ./configure CFLAGS="<i>&lt;write your CFLAGS here&gt;</i>"
88 </pre>
89 <p>and then compile as usual. If you do find an optimal set of
90 <code>CFLAGS</code> for your system, please let us know what they are (along
91 with the output of <code>config.guess</code>) so that we can include them in
92 future releases.
93
94 <p><code>configure</code> supports all the standard flags defined by the GNU
95 Coding Standards; see the <code>INSTALL</code> file in FFTW or
96 <a href="http://www.gnu.org/prep/standards/html_node/index.html">the GNU web page</a>.
97 Note especially <code>--help</code> to list all flags and
98 <code>--enable-shared</code> to create shared, rather than static, libraries.
99 <code>configure</code> also accepts a few FFTW-specific flags, particularly:
100
101 <ul>
102 <li><a name="index-precision-610"></a><code>--enable-float</code>: Produces a single-precision version of FFTW
103 (<code>float</code>) instead of the default double-precision (<code>double</code>).
104 See <a href="Precision.html#Precision">Precision</a>.
105
106 <li><a name="index-precision-611"></a><code>--enable-long-double</code>: Produces a long-double precision version of
107 FFTW (<code>long double</code>) instead of the default double-precision
108 (<code>double</code>). The <code>configure</code> script will halt with an error
109 message if <code>long double</code> is the same size as <code>double</code> on your
110 machine/compiler. See <a href="Precision.html#Precision">Precision</a>.
111
112 <li><a name="index-precision-612"></a><code>--enable-quad-precision</code>: Produces a quadruple-precision version
113 of FFTW using the nonstandard <code>__float128</code> type provided by
114 <code>gcc</code> 4.6 or later on x86, x86-64, and Itanium architectures,
115 instead of the default double-precision (<code>double</code>). The
116 <code>configure</code> script will halt with an error message if the
117 compiler is not <code>gcc</code> version 4.6 or later or if <code>gcc</code>'s
118 <code>libquadmath</code> library is not installed. See <a href="Precision.html#Precision">Precision</a>.
119
120 <li><a name="index-threads-613"></a><code>--enable-threads</code>: Enables compilation and installation of the
121 FFTW threads library (see <a href="Multi_002dthreaded-FFTW.html#Multi_002dthreaded-FFTW">Multi-threaded FFTW</a>), which provides a
122 simple interface to parallel transforms for SMP systems. By default,
123 the threads routines are not compiled.
124
125 <li><code>--enable-openmp</code>: Like <code>--enable-threads</code>, but using OpenMP
126 compiler directives in order to induce parallelism rather than
127 spawning its own threads directly, and installing an &lsquo;<samp><span class="samp">fftw3_omp</span></samp>&rsquo; library
128 rather than an &lsquo;<samp><span class="samp">fftw3_threads</span></samp>&rsquo; library (see <a href="Multi_002dthreaded-FFTW.html#Multi_002dthreaded-FFTW">Multi-threaded FFTW</a>). You can use both <code>--enable-openmp</code> and <code>--enable-threads</code>
129 since they compile/install libraries with different names. By default,
130 the OpenMP routines are not compiled.
131
132 <li><code>--with-combined-threads</code>: By default, if <code>--enable-threads</code>
133 is used, the threads support is compiled into a separate library that
134 must be linked in addition to the main FFTW library. This is so that
135 users of the serial library do not need to link the system threads
136 libraries. If <code>--with-combined-threads</code> is specified, however,
137 then no separate threads library is created, and threads are included
138 in the main FFTW library. This is mainly useful under Windows, where
139 no system threads library is required and inter-library dependencies
140 are problematic.
141
142 <li><a name="index-MPI-614"></a><code>--enable-mpi</code>: Enables compilation and installation of the FFTW
143 MPI library (see <a href="Distributed_002dmemory-FFTW-with-MPI.html#Distributed_002dmemory-FFTW-with-MPI">Distributed-memory FFTW with MPI</a>), which provides
144 parallel transforms for distributed-memory systems with MPI. (By
145 default, the MPI routines are not compiled.) See <a href="FFTW-MPI-Installation.html#FFTW-MPI-Installation">FFTW MPI Installation</a>.
146
147 <li><a name="index-Fortran_002dcallable-wrappers-615"></a><code>--disable-fortran</code>: Disables inclusion of legacy-Fortran
148 wrapper routines (see <a href="Calling-FFTW-from-Legacy-Fortran.html#Calling-FFTW-from-Legacy-Fortran">Calling FFTW from Legacy Fortran</a>) in the standard
149 FFTW libraries. These wrapper routines increase the library size by
150 only a negligible amount, so they are included by default as long as
151 the <code>configure</code> script finds a Fortran compiler on your system.
152 (To specify a particular Fortran compiler <i>foo</i>, pass
153 <code>F77=</code><i>foo</i> to <code>configure</code>.)
154
155 <li><code>--with-g77-wrappers</code>: By default, when Fortran wrappers are
156 included, the wrappers employ the linking conventions of the Fortran
157 compiler detected by the <code>configure</code> script. If this compiler is
158 GNU <code>g77</code>, however, then <em>two</em> versions of the wrappers are
159 included: one with <code>g77</code>'s idiosyncratic convention of appending
160 two underscores to identifiers, and one with the more common
161 convention of appending only a single underscore. This way, the same
162 FFTW library will work with both <code>g77</code> and other Fortran
163 compilers, such as GNU <code>gfortran</code>. However, the converse is not
164 true: if you configure with a different compiler, then the
165 <code>g77</code>-compatible wrappers are not included. By specifying
166 <code>--with-g77-wrappers</code>, the <code>g77</code>-compatible wrappers are
167 included in addition to wrappers for whatever Fortran compiler
168 <code>configure</code> finds.
169 <a name="index-g77-616"></a>
170 <li><code>--with-slow-timer</code>: Disables the use of hardware cycle counters,
171 and falls back on <code>gettimeofday</code> or <code>clock</code>. This greatly
172 worsens performance, and should generally not be used (unless you don't
173 have a cycle counter but still really want an optimized plan regardless
174 of the time). See <a href="Cycle-Counters.html#Cycle-Counters">Cycle Counters</a>.
175
176 <li><code>--enable-sse</code>, <code>--enable-sse2</code>, <code>--enable-avx</code>,
177 <code>--enable-altivec</code>, <code>--enable-neon</code>: Enable the compilation of
178 SIMD code for SSE (Pentium III+), SSE2 (Pentium IV+), AVX (Sandy Bridge,
179 Interlagos), AltiVec (PowerPC G4+), NEON (some ARM processors). SSE,
180 AltiVec, and NEON only work with <code>--enable-float</code> (above). SSE2
181 works in both single and double precision (and is simply SSE in single
182 precision). The resulting code will <em>still work</em> on earlier CPUs
183 lacking the SIMD extensions (SIMD is automatically disabled, although
184 the FFTW library is still larger).
185 <ul>
186 <li>These options require a compiler supporting SIMD extensions, and
187 compiler support is always a bit flaky: see the FFTW FAQ for a list of
188 compiler versions that have problems compiling FFTW.
189 <li>With AltiVec and <code>gcc</code>, you may have to use the
190 <code>-mabi=altivec</code> option when compiling any code that links to FFTW,
191 in order to properly align the stack; otherwise, FFTW could crash when
192 it tries to use an AltiVec feature. (This is not necessary on MacOS X.)
193 <li>With SSE/SSE2 and <code>gcc</code>, you should use a version of gcc that
194 properly aligns the stack when compiling any code that links to FFTW.
195 By default, <code>gcc</code> 2.95 and later versions align the stack as
196 needed, but you should not compile FFTW with the <code>-Os</code> option or the
197 <code>-mpreferred-stack-boundary</code> option with an argument less than 4.
198 <li>Because of the large variety of ARM processors and ABIs, FFTW
199 does not attempt to guess the correct <code>gcc</code> flags for generating
200 NEON code. In general, you will have to provide them on the command line.
201 This command line is known to have worked at least once:
202 <pre class="example"> ./configure --with-slow-timer --host=arm-linux-gnueabi \
203 --enable-single --enable-neon \
204 "CC=arm-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp"
205 </pre>
206 </ul>
207
208 </ul>
209
210 <p><a name="index-compiler-617"></a>To force <code>configure</code> to use a particular C compiler <i>foo</i>
211 (instead of the default, usually <code>gcc</code>), pass <code>CC=</code><i>foo</i> to the
212 <code>configure</code> script; you may also need to set the flags via the variable
213 <code>CFLAGS</code> as described above.
214 <a name="index-compiler-flags-618"></a>
215 <!-- -->
216
217 </body></html>
218