@@ -204,22 +204,34 @@ compile *MRtrix3* on a modern distro (within a virtual machine for
204204example), package it up, and install it on any Linux system without
205205worrying about dependencies.
206206
207- Important: setting the CPU architecture
208- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
209-
210- By default, ``configure `` will cause the build script to generate code
211- suitable to run on your current CPU (using the ``-march=native ``
212- option). This means the executables will likely *not run * on a different
213- CPUs with different instruction sets, resulting in 'illegal instruction'
214- runtime errors. If you intend to run *MRtrix3 * on a variety of different
215- systems with a range of CPUs, or you have no idea what the CPU is on
216- your target system, it is safest to specify an empty (generic) architecture
217- when configuring *MRtrix3 *, before invoking ``./build ``::
218-
219- ARCH= ./configure
207+ Setting the CPU architecture for optimal performance
208+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
209+
210+ By default, ``configure `` will cause the build script to produce generic code
211+ suitable for any current CPU. If you want to ensure optimal performance on your
212+ system, you can request that ``configure `` produce code tailored to your
213+ specific CPU architecture, which will allow it to use all available CPU
214+ instructions and tune the code differently. This can improve performance
215+ particularly for linear algebra operations as `Eigen
216+ <http://eigen.tuxfamily.org> `__ will then make use of these extensions.
217+ However, note that this means the executables produced will likely *not run * on
218+ a different CPUs with different instruction sets, resulting in 'illegal
219+ instruction' runtime errors. If you intend to run *MRtrix3 * on a variety of
220+ different systems with a range of CPUs, or you have no idea what the CPU is on
221+ your target system, it is safest to avoid changing the default.
222+
223+ Specifying a different CPU architecture is done by setting the ``ARCH `` environment
224+ variable prior to invoking ``./configure ``. The value of this variable will
225+ then be passed to the compiler via the ``-march `` option. To get the best
226+ performance *on the current system *, you can specify ``native `` as
227+ the architecture, leaving it up to the compiler to detect your particular CPU
228+ and its available instructions. For example::
229+
230+ export ARCH=native
231+ ./configure
220232 ./build
221233
222- For more specific architectures, you can provide any values from the `list of
234+ For more specific architectures, you can provide any value from the `list of
223235specifiers understood by the compiler
224236<https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/x86-Options.html#x86-Options> `_,
225237for example ``ARCH='sandybridge' ./configure ``
@@ -238,7 +250,7 @@ required). Then, from the main *MRtrix3* folder::
238250
239251 ./build clean
240252 git pull
241- ARCH="" ./configure -static [-nogui]
253+ ./configure -static [-nogui]
242254 ./build
243255
244256Note that this requires the availability of static versions of the
@@ -341,7 +353,7 @@ required). Then, from the main *MRtrix3* folder::
341353
342354 ./build clean
343355 git pull
344- ARCH="" ./configure [-nogui]
356+ ./configure [-nogui]
345357 ./build
346358 ./package_mrtrix -standalone
347359
0 commit comments