annotate src/fftw-3.3.8/doc/html/Installation-on-Unix.html @ 82:d0c2a83c1364

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