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