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