[petsc-users] AVX in Petsc?

Jed Brown jedbrown at mcs.anl.gov
Mon Jan 23 06:34:04 CST 2012


On Mon, Jan 23, 2012 at 05:53, Dominik Szczerba <dominik at itis.ethz.ch>wrote:

> Does Petsc in any way leverages AVX?
> Would I need to explicitly enable it somehow or will be taken over by
> the system and the compiler?
> Compiling with GNU on SMP linux and Cray XT6.
>

AVX should be used by vendor BLAS if you have a recent implementation (but
Intel might still check for "GenuineIntel" 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's possible, but I doubt
it. It generally won't make a performance difference for sparse kernels or
for BLAS level 1 because these operations are memory bound.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120123/48f49867/attachment.htm>


More information about the petsc-users mailing list