comparison Lib/fftw-3.2.1/doc/html/.svn/text-base/Installation-on-Unix.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>Installation on Unix - FFTW 3.2.1</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="FFTW 3.2.1">
6 <meta name="generator" content="makeinfo 4.8">
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.2.1, 5 February 2009).
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 <p>
50 <a name="Installation-on-Unix"></a>
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">9.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-362"></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-363"></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_toc.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-portability-364"></a><code>--enable-portable-binary</code>: Disable compiler optimizations that
103 would produce unportable binaries. <b>Important:</b> Use this if you are
104 distributing compiled binaries to people who may not use exactly the
105 same processor as you.
106
107 <li><code>--with-gcc-arch=</code><i>arch</i>: When compiling with <code>gcc</code>, FFTW
108 tries to deduce the current CPU in order to tell <code>gcc</code> what
109 architecture to tune for; this option overrides that guess
110 (i.e. <i>arch</i> should be a valid argument for <code>gcc</code>'s
111 <code>-march</code> or <code>-mtune</code> flags). You might do this because the
112 deduced architecture was wrong or because you want to tune for a
113 different CPU than the one you are compiling with. You can use
114 <code>--without-gcc-arch</code> to disable architecture-specific tuning
115 entirely. Note that if <code>--enable-portable-binary</code> is enabled
116 (above), then we use <code>-mtune</code> but not <code>-march</code>, so the
117 resulting binary will run on any architecture even though it is
118 optimized for a particular one.
119
120 <li><a name="index-precision-365"></a><code>--enable-float</code>: Produces a single-precision version of FFTW
121 (<code>float</code>) instead of the default double-precision (<code>double</code>).
122 See <a href="Precision.html#Precision">Precision</a>.
123
124 <li><a name="index-precision-366"></a><code>--enable-long-double</code>: Produces a long-double precision version of
125 FFTW (<code>long double</code>) instead of the default double-precision
126 (<code>double</code>). The <code>configure</code> script will halt with an error
127 message is <code>long double</code> is the same size as <code>double</code> on your
128 machine/compiler. See <a href="Precision.html#Precision">Precision</a>.
129
130 <li><a name="index-threads-367"></a><code>--enable-threads</code>: Enables compilation and installation of the
131 FFTW threads library (see <a href="Multi_002dthreaded-FFTW.html#Multi_002dthreaded-FFTW">Multi-threaded FFTW</a>), which provides a
132 simple interface to parallel transforms for SMP systems. By default,
133 the threads routines are not compiled.
134
135 <li><code>--enable-openmp</code>: Like <code>--enable-threads</code>, but using OpenMP
136 compiler directives in order to induce parallelism rather than
137 spawning its own threads directly. Useful especially for programs
138 already employing such directives, in order to minimize conflicts
139 between different parallelization mechanisms. Use either
140 <code>--enable-openmp</code> or <code>--enable-threads</code>, not both; in either
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).
142
143 <li><code>--with-combined-threads</code>: By default, if <code>--enable-threads</code>
144 or <code>--enable-openmp</code> are used, the threads support is compiled
145 into a separate library that must be linked in addition to the main
146 FFTW library. This is so that users of the serial library do not need
147 to link the system threads libraries. If
148 <code>--with-combined-threads</code> is specified, however, then no separate
149 threads library is created, and threads are included in the main FFTW
150 library. This is mainly useful under Windows, where no system threads
151 library is required and inter-library dependencies are problematic.
152
153 <li><a name="index-Cell-processor-368"></a><code>--enable-cell</code>: Enables code to exploit the Cell processor
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.
155 By default, code for the Cell processor is not compiled.
156
157 <li><a name="index-Fortran_002dcallable-wrappers-369"></a><code>--disable-fortran</code>: Disables inclusion of Fortran-callable
158 wrapper routines (see <a href="Calling-FFTW-from-Fortran.html#Calling-FFTW-from-Fortran">Calling FFTW from Fortran</a>) in the standard
159 FFTW libraries. These wrapper routines increase the library size by
160 only a negligible amount, so they are included by default as long as
161 the <code>configure</code> script finds a Fortran compiler on your system.
162 (To specify a particular Fortran compiler <i>foo</i>, pass
163 <code>F77=</code><i>foo</i> to <code>configure</code>.)
164
165 <li><code>--with-g77-wrappers</code>: By default, when Fortran wrappers are
166 included, the wrappers employ the linking conventions of the Fortran
167 compiler detected by the <code>configure</code> script. If this compiler is
168 GNU <code>g77</code>, however, then <em>two</em> versions of the wrappers are
169 included: one with <code>g77</code>'s idiosyncratic convention of appending
170 two underscores to identifiers, and one with the more common
171 convention of appending only a single underscore. This way, the same
172 FFTW library will work with both <code>g77</code> and other Fortran
173 compilers, such as GNU <code>gfortran</code>. However, the converse is not
174 true: if you configure with a different compiler, then the
175 <code>g77</code>-compatible wrappers are not included. By specifying
176 <code>--with-g77-wrappers</code>, the <code>g77</code>-compatible wrappers are
177 included in addition to wrappers for whatever Fortran compiler
178 <code>configure</code> finds.
179 <a name="index-g77-370"></a>
180 <li><code>--with-slow-timer</code>: Disables the use of hardware cycle counters,
181 and falls back on <code>gettimeofday</code> or <code>clock</code>. This greatly
182 worsens performance, and should generally not be used (unless you don't
183 have a cycle counter but still really want an optimized plan regardless
184 of the time). See <a href="Cycle-Counters.html#Cycle-Counters">Cycle Counters</a>.
185
186 <li><code>--enable-sse</code>, <code>--enable-sse2</code>, <code>--enable-altivec</code>,
187 <code>--enable-mips-ps</code>:
188 Enable the compilation of SIMD code for SSE (Pentium III+), SSE2
189 (Pentium IV+), AltiVec (PowerPC G4+), or MIPS PS. SSE, AltiVec, and MIPS PS
190 only work with <code>--enable-float</code> (above), while SSE2 only works in double
191 precision (the default). The resulting code will <em>still work</em> on
192 earlier CPUs lacking the SIMD extensions (SIMD is automatically
193 disabled, although the FFTW library is still larger).
194 <ul>
195 <li>These options require a compiler supporting SIMD extensions, and
196 compiler support is still a bit flaky: see the FFTW FAQ for a list of
197 compiler versions that have problems compiling FFTW.
198 <li>With the Linux kernel, you may have to recompile the kernel with the
199 option to support SSE/SSE2/AltiVec (see the &ldquo;Processor type and
200 features&rdquo; settings).
201 <li>With AltiVec and <code>gcc</code>, you may have to use the
202 <code>-mabi=altivec</code> option when compiling any code that links to FFTW,
203 in order to properly align the stack; otherwise, FFTW could crash when
204 it tries to use an AltiVec feature. (This is not necessary on MacOS X.)
205 <li>With SSE/SSE2 and <code>gcc</code>, you should use a version of gcc that
206 properly aligns the stack when compiling any code that links to FFTW.
207 By default, <code>gcc</code> 2.95 and later versions align the stack as
208 needed, but you should not compile FFTW with the <code>-Os</code> option or the
209 <code>-mpreferred-stack-boundary</code> option with an argument less than 4.
210 </ul>
211
212 </ul>
213
214 <p><a name="index-compiler-371"></a>To force <code>configure</code> to use a particular C compiler <i>foo</i>
215 (instead of the default, usually <code>gcc</code>), pass <code>CC=</code><i>foo</i> to the
216 <code>configure</code> script; you may also need to set the flags via the variable
217 <code>CFLAGS</code> as described above.
218 <a name="index-compiler-flags-372"></a>
219 <!-- -->
220
221 </body></html>
222