<div class="gmail_quote">On Mon, Jan 23, 2012 at 05:53, Dominik Szczerba <span dir="ltr">&lt;<a href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":3ta">Does Petsc in any way leverages AVX?<br>
Would I need to explicitly enable it somehow or will be taken over by<br>
the system and the compiler?<br>
Compiling with GNU on SMP linux and Cray XT6.</div></blockquote></div><br><div>AVX should be used by vendor BLAS if you have a recent implementation (but Intel might still check for &quot;GenuineIntel&quot; and switch to the slow version, so perhaps try ACML instead of MKL). With any given compiler, just grep the disassembly to see if AVX instructions are used. It&#39;s possible, but I doubt it. It generally won&#39;t make a performance difference for sparse kernels or for BLAS level 1 because these operations are memory bound.</div>
<div><br></div><div>If you use sparse direct solvers for large problems, most of the work will end up being in dense factorization, so you would benefit. If you use matrix-free methods for nontrivial physics, you can benefit from using AVX instructions, but of course you are responsible for doing that, usually by writing in assembly or using intrinsics (perhaps with the C++ overloaded wrappers), because compilers are quite bad at automatic vectorization.</div>