annotate src/fftw-3.3.3/doc/html/Installation-on-Unix.html @ 83:ae30d91d2ffe

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