annotate src/fftw-3.3.5/doc/html/Installation-on-Unix.html @ 42:2cd0e3b3e1fd

Current fftw source
author Chris Cannam
date Tue, 18 Oct 2016 13:40:26 +0100
parents
children
rev   line source
Chris@42 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Chris@42 2 <html>
Chris@42 3 <!-- This manual is for FFTW
Chris@42 4 (version 3.3.5, 30 July 2016).
Chris@42 5
Chris@42 6 Copyright (C) 2003 Matteo Frigo.
Chris@42 7
Chris@42 8 Copyright (C) 2003 Massachusetts Institute of Technology.
Chris@42 9
Chris@42 10 Permission is granted to make and distribute verbatim copies of this
Chris@42 11 manual provided the copyright notice and this permission notice are
Chris@42 12 preserved on all copies.
Chris@42 13
Chris@42 14 Permission is granted to copy and distribute modified versions of this
Chris@42 15 manual under the conditions for verbatim copying, provided that the
Chris@42 16 entire resulting derived work is distributed under the terms of a
Chris@42 17 permission notice identical to this one.
Chris@42 18
Chris@42 19 Permission is granted to copy and distribute translations of this manual
Chris@42 20 into another language, under the above conditions for modified versions,
Chris@42 21 except that this permission notice may be stated in a translation
Chris@42 22 approved by the Free Software Foundation. -->
Chris@42 23 <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
Chris@42 24 <head>
Chris@42 25 <title>FFTW 3.3.5: Installation on Unix</title>
Chris@42 26
Chris@42 27 <meta name="description" content="FFTW 3.3.5: Installation on Unix">
Chris@42 28 <meta name="keywords" content="FFTW 3.3.5: Installation on Unix">
Chris@42 29 <meta name="resource-type" content="document">
Chris@42 30 <meta name="distribution" content="global">
Chris@42 31 <meta name="Generator" content="makeinfo">
Chris@42 32 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Chris@42 33 <link href="index.html#Top" rel="start" title="Top">
Chris@42 34 <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
Chris@42 35 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
Chris@42 36 <link href="Installation-and-Customization.html#Installation-and-Customization" rel="up" title="Installation and Customization">
Chris@42 37 <link href="Installation-on-non_002dUnix-systems.html#Installation-on-non_002dUnix-systems" rel="next" title="Installation on non-Unix systems">
Chris@42 38 <link href="Installation-and-Customization.html#Installation-and-Customization" rel="prev" title="Installation and Customization">
Chris@42 39 <style type="text/css">
Chris@42 40 <!--
Chris@42 41 a.summary-letter {text-decoration: none}
Chris@42 42 blockquote.smallquotation {font-size: smaller}
Chris@42 43 div.display {margin-left: 3.2em}
Chris@42 44 div.example {margin-left: 3.2em}
Chris@42 45 div.indentedblock {margin-left: 3.2em}
Chris@42 46 div.lisp {margin-left: 3.2em}
Chris@42 47 div.smalldisplay {margin-left: 3.2em}
Chris@42 48 div.smallexample {margin-left: 3.2em}
Chris@42 49 div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
Chris@42 50 div.smalllisp {margin-left: 3.2em}
Chris@42 51 kbd {font-style:oblique}
Chris@42 52 pre.display {font-family: inherit}
Chris@42 53 pre.format {font-family: inherit}
Chris@42 54 pre.menu-comment {font-family: serif}
Chris@42 55 pre.menu-preformatted {font-family: serif}
Chris@42 56 pre.smalldisplay {font-family: inherit; font-size: smaller}
Chris@42 57 pre.smallexample {font-size: smaller}
Chris@42 58 pre.smallformat {font-family: inherit; font-size: smaller}
Chris@42 59 pre.smalllisp {font-size: smaller}
Chris@42 60 span.nocodebreak {white-space:nowrap}
Chris@42 61 span.nolinebreak {white-space:nowrap}
Chris@42 62 span.roman {font-family:serif; font-weight:normal}
Chris@42 63 span.sansserif {font-family:sans-serif; font-weight:normal}
Chris@42 64 ul.no-bullet {list-style: none}
Chris@42 65 -->
Chris@42 66 </style>
Chris@42 67
Chris@42 68
Chris@42 69 </head>
Chris@42 70
Chris@42 71 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
Chris@42 72 <a name="Installation-on-Unix"></a>
Chris@42 73 <div class="header">
Chris@42 74 <p>
Chris@42 75 Next: <a href="Installation-on-non_002dUnix-systems.html#Installation-on-non_002dUnix-systems" accesskey="n" rel="next">Installation on non-Unix systems</a>, Previous: <a href="Installation-and-Customization.html#Installation-and-Customization" accesskey="p" rel="prev">Installation and Customization</a>, Up: <a href="Installation-and-Customization.html#Installation-and-Customization" accesskey="u" rel="up">Installation and Customization</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
Chris@42 76 </div>
Chris@42 77 <hr>
Chris@42 78 <a name="Installation-on-Unix-1"></a>
Chris@42 79 <h3 class="section">10.1 Installation on Unix</h3>
Chris@42 80
Chris@42 81 <p>FFTW comes with a <code>configure</code> program in the GNU style.
Chris@42 82 Installation can be as simple as:
Chris@42 83 <a name="index-configure-2"></a>
Chris@42 84 </p>
Chris@42 85 <div class="example">
Chris@42 86 <pre class="example">./configure
Chris@42 87 make
Chris@42 88 make install
Chris@42 89 </pre></div>
Chris@42 90
Chris@42 91 <p>This will build the uniprocessor complex and real transform libraries
Chris@42 92 along with the test programs. (We recommend that you use GNU
Chris@42 93 <code>make</code> if it is available; on some systems it is called
Chris@42 94 <code>gmake</code>.) The &ldquo;<code>make install</code>&rdquo; command installs the fftw
Chris@42 95 and rfftw libraries in standard places, and typically requires root
Chris@42 96 privileges (unless you specify a different install directory with the
Chris@42 97 <code>--prefix</code> flag to <code>configure</code>). You can also type
Chris@42 98 &ldquo;<code>make check</code>&rdquo; to put the FFTW test programs through their paces.
Chris@42 99 If you have problems during configuration or compilation, you may want
Chris@42 100 to run &ldquo;<code>make distclean</code>&rdquo; before trying again; this ensures that
Chris@42 101 you don&rsquo;t have any stale files left over from previous compilation
Chris@42 102 attempts.
Chris@42 103 </p>
Chris@42 104 <p>The <code>configure</code> script chooses the <code>gcc</code> compiler by default,
Chris@42 105 if it is available; you can select some other compiler with:
Chris@42 106 </p><div class="example">
Chris@42 107 <pre class="example">./configure CC=&quot;<span class="roman"><i>&lt;the name of your C compiler&gt;</i></span>&quot;
Chris@42 108 </pre></div>
Chris@42 109
Chris@42 110 <p>The <code>configure</code> script knows good <code>CFLAGS</code> (C compiler flags)
Chris@42 111 <a name="index-compiler-flags"></a>
Chris@42 112 for a few systems. If your system is not known, the <code>configure</code>
Chris@42 113 script will print out a warning. In this case, you should re-configure
Chris@42 114 FFTW with the command
Chris@42 115 </p><div class="example">
Chris@42 116 <pre class="example">./configure CFLAGS=&quot;<span class="roman"><i>&lt;write your CFLAGS here&gt;</i></span>&quot;
Chris@42 117 </pre></div>
Chris@42 118 <p>and then compile as usual. If you do find an optimal set of
Chris@42 119 <code>CFLAGS</code> for your system, please let us know what they are (along
Chris@42 120 with the output of <code>config.guess</code>) so that we can include them in
Chris@42 121 future releases.
Chris@42 122 </p>
Chris@42 123 <p><code>configure</code> supports all the standard flags defined by the GNU
Chris@42 124 Coding Standards; see the <code>INSTALL</code> file in FFTW or
Chris@42 125 <a href="http://www.gnu.org/prep/standards/html_node/index.html">the GNU web page</a>.
Chris@42 126 Note especially <code>--help</code> to list all flags and
Chris@42 127 <code>--enable-shared</code> to create shared, rather than static, libraries.
Chris@42 128 <code>configure</code> also accepts a few FFTW-specific flags, particularly:
Chris@42 129 </p>
Chris@42 130 <ul>
Chris@42 131 <li> <a name="index-precision-9"></a>
Chris@42 132 <code>--enable-float</code>: Produces a single-precision version of FFTW
Chris@42 133 (<code>float</code>) instead of the default double-precision (<code>double</code>).
Chris@42 134 See <a href="Precision.html#Precision">Precision</a>.
Chris@42 135
Chris@42 136 </li><li> <a name="index-precision-10"></a>
Chris@42 137 <code>--enable-long-double</code>: Produces a long-double precision version of
Chris@42 138 FFTW (<code>long double</code>) instead of the default double-precision
Chris@42 139 (<code>double</code>). The <code>configure</code> script will halt with an error
Chris@42 140 message if <code>long double</code> is the same size as <code>double</code> on your
Chris@42 141 machine/compiler. See <a href="Precision.html#Precision">Precision</a>.
Chris@42 142
Chris@42 143 </li><li> <a name="index-precision-11"></a>
Chris@42 144 <code>--enable-quad-precision</code>: Produces a quadruple-precision version
Chris@42 145 of FFTW using the nonstandard <code>__float128</code> type provided by
Chris@42 146 <code>gcc</code> 4.6 or later on x86, x86-64, and Itanium architectures,
Chris@42 147 instead of the default double-precision (<code>double</code>). The
Chris@42 148 <code>configure</code> script will halt with an error message if the
Chris@42 149 compiler is not <code>gcc</code> version 4.6 or later or if <code>gcc</code>&rsquo;s
Chris@42 150 <code>libquadmath</code> library is not installed. See <a href="Precision.html#Precision">Precision</a>.
Chris@42 151
Chris@42 152 </li><li> <a name="index-threads-3"></a>
Chris@42 153 <code>--enable-threads</code>: Enables compilation and installation of the
Chris@42 154 FFTW threads library (see <a href="Multi_002dthreaded-FFTW.html#Multi_002dthreaded-FFTW">Multi-threaded FFTW</a>), which provides a
Chris@42 155 simple interface to parallel transforms for SMP systems. By default,
Chris@42 156 the threads routines are not compiled.
Chris@42 157
Chris@42 158 </li><li> <code>--enable-openmp</code>: Like <code>--enable-threads</code>, but using OpenMP
Chris@42 159 compiler directives in order to induce parallelism rather than
Chris@42 160 spawning its own threads directly, and installing an &lsquo;<samp>fftw3_omp</samp>&rsquo; library
Chris@42 161 rather than an &lsquo;<samp>fftw3_threads</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>
Chris@42 162 since they compile/install libraries with different names. By default,
Chris@42 163 the OpenMP routines are not compiled.
Chris@42 164
Chris@42 165 </li><li> <code>--with-combined-threads</code>: By default, if <code>--enable-threads</code>
Chris@42 166 is used, the threads support is compiled into a separate library that
Chris@42 167 must be linked in addition to the main FFTW library. This is so that
Chris@42 168 users of the serial library do not need to link the system threads
Chris@42 169 libraries. If <code>--with-combined-threads</code> is specified, however,
Chris@42 170 then no separate threads library is created, and threads are included
Chris@42 171 in the main FFTW library. This is mainly useful under Windows, where
Chris@42 172 no system threads library is required and inter-library dependencies
Chris@42 173 are problematic.
Chris@42 174
Chris@42 175 </li><li> <a name="index-MPI-1"></a>
Chris@42 176 <code>--enable-mpi</code>: Enables compilation and installation of the FFTW
Chris@42 177 MPI library (see <a href="Distributed_002dmemory-FFTW-with-MPI.html#Distributed_002dmemory-FFTW-with-MPI">Distributed-memory FFTW with MPI</a>), which provides
Chris@42 178 parallel transforms for distributed-memory systems with MPI. (By
Chris@42 179 default, the MPI routines are not compiled.) See <a href="FFTW-MPI-Installation.html#FFTW-MPI-Installation">FFTW MPI Installation</a>.
Chris@42 180
Chris@42 181 </li><li> <a name="index-Fortran_002dcallable-wrappers"></a>
Chris@42 182 <code>--disable-fortran</code>: Disables inclusion of legacy-Fortran
Chris@42 183 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
Chris@42 184 FFTW libraries. These wrapper routines increase the library size by
Chris@42 185 only a negligible amount, so they are included by default as long as
Chris@42 186 the <code>configure</code> script finds a Fortran compiler on your system.
Chris@42 187 (To specify a particular Fortran compiler <i>foo</i>, pass
Chris@42 188 <code>F77=</code><i>foo</i> to <code>configure</code>.)
Chris@42 189
Chris@42 190 </li><li> <code>--with-g77-wrappers</code>: By default, when Fortran wrappers are
Chris@42 191 included, the wrappers employ the linking conventions of the Fortran
Chris@42 192 compiler detected by the <code>configure</code> script. If this compiler is
Chris@42 193 GNU <code>g77</code>, however, then <em>two</em> versions of the wrappers are
Chris@42 194 included: one with <code>g77</code>&rsquo;s idiosyncratic convention of appending
Chris@42 195 two underscores to identifiers, and one with the more common
Chris@42 196 convention of appending only a single underscore. This way, the same
Chris@42 197 FFTW library will work with both <code>g77</code> and other Fortran
Chris@42 198 compilers, such as GNU <code>gfortran</code>. However, the converse is not
Chris@42 199 true: if you configure with a different compiler, then the
Chris@42 200 <code>g77</code>-compatible wrappers are not included. By specifying
Chris@42 201 <code>--with-g77-wrappers</code>, the <code>g77</code>-compatible wrappers are
Chris@42 202 included in addition to wrappers for whatever Fortran compiler
Chris@42 203 <code>configure</code> finds.
Chris@42 204 <a name="index-g77"></a>
Chris@42 205
Chris@42 206 </li><li> <code>--with-slow-timer</code>: Disables the use of hardware cycle counters,
Chris@42 207 and falls back on <code>gettimeofday</code> or <code>clock</code>. This greatly
Chris@42 208 worsens performance, and should generally not be used (unless you don&rsquo;t
Chris@42 209 have a cycle counter but still really want an optimized plan regardless
Chris@42 210 of the time). See <a href="Cycle-Counters.html#Cycle-Counters">Cycle Counters</a>.
Chris@42 211
Chris@42 212 </li><li> <code>--enable-sse</code> (single precision),
Chris@42 213 <code>--enable-sse2</code> (single, double),
Chris@42 214 <code>--enable-avx</code> (single, double),
Chris@42 215 <code>--enable-avx2</code> (single, double),
Chris@42 216 <code>--enable-avx512</code> (single, double),
Chris@42 217 <code>--enable-avx-128-fma</code>,
Chris@42 218 <code>--enable-kcvi</code> (single),
Chris@42 219 <code>--enable-altivec</code> (single),
Chris@42 220 <code>--enable-vsx</code> (single, double),
Chris@42 221 <code>--enable-neon</code> (single, double on aarch64),
Chris@42 222 <code>--enable-generic-simd128</code>,
Chris@42 223 and
Chris@42 224 <code>--enable-generic-simd256</code>:
Chris@42 225
Chris@42 226 <p>Enable various SIMD instruction sets. You need compiler that supports
Chris@42 227 the given SIMD extensions, but FFTW will try to detect at runtime
Chris@42 228 whether the CPU supports these extensions. That is, you can compile
Chris@42 229 with<code>--enable-avx</code> and the code will still run on a CPU without AVX
Chris@42 230 support.
Chris@42 231 </p>
Chris@42 232 <ul class="no-bullet">
Chris@42 233 <li>- These options require a compiler supporting SIMD extensions, and
Chris@42 234 compiler support is always a bit flaky: see the FFTW FAQ for a list of
Chris@42 235 compiler versions that have problems compiling FFTW.
Chris@42 236 </li><li>- Because of the large variety of ARM processors and ABIs, FFTW
Chris@42 237 does not attempt to guess the correct <code>gcc</code> flags for generating
Chris@42 238 NEON code. In general, you will have to provide them on the command line.
Chris@42 239 This command line is known to have worked at least once:
Chris@42 240 <div class="example">
Chris@42 241 <pre class="example">./configure --with-slow-timer --host=arm-linux-gnueabi \
Chris@42 242 --enable-single --enable-neon \
Chris@42 243 &quot;CC=arm-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp&quot;
Chris@42 244 </pre></div>
Chris@42 245 </li></ul>
Chris@42 246
Chris@42 247 </li></ul>
Chris@42 248
Chris@42 249 <a name="index-compiler-2"></a>
Chris@42 250 <p>To force <code>configure</code> to use a particular C compiler <i>foo</i>
Chris@42 251 (instead of the default, usually <code>gcc</code>), pass <code>CC=</code><i>foo</i> to the
Chris@42 252 <code>configure</code> script; you may also need to set the flags via the variable
Chris@42 253 <code>CFLAGS</code> as described above.
Chris@42 254 <a name="index-compiler-flags-1"></a>
Chris@42 255 </p>
Chris@42 256 <hr>
Chris@42 257 <div class="header">
Chris@42 258 <p>
Chris@42 259 Next: <a href="Installation-on-non_002dUnix-systems.html#Installation-on-non_002dUnix-systems" accesskey="n" rel="next">Installation on non-Unix systems</a>, Previous: <a href="Installation-and-Customization.html#Installation-and-Customization" accesskey="p" rel="prev">Installation and Customization</a>, Up: <a href="Installation-and-Customization.html#Installation-and-Customization" accesskey="u" rel="up">Installation and Customization</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
Chris@42 260 </div>
Chris@42 261
Chris@42 262
Chris@42 263
Chris@42 264 </body>
Chris@42 265 </html>