AVX and AVX512 instruction detection

47 views
Skip to first unread message

blais...@gmail.com

unread,
Apr 20, 2022, 7:50:34 AM4/20/22
to deal.II User Group
Dear all,
I hope you are well.

I was wondering if there was anything specific that had to be done to enable deal.II to leverage AVX and AVX512 instructions on intel processors?

By default, it seems that on my intel machine, these vectorization instructions are not detected, e.g.:
-- Performing Test DEAL_II_HAVE_SSE2
-- Performing Test DEAL_II_HAVE_SSE2 - Success
-- Performing Test DEAL_II_HAVE_AVX
-- Performing Test DEAL_II_HAVE_AVX - Failed
-- Performing Test DEAL_II_HAVE_AVX512
-- Performing Test DEAL_II_HAVE_AVX512 - Failed
-- Performing Test DEAL_II_HAVE_ALTIVEC
-- Performing Test DEAL_II_HAVE_ALTIVEC - Failed


However, I can see that avx  is a supported set of instruction on my processor by looking at /proc/cpuinfo.

Is there something I am missing that needs to be done to enable full support of vectorization instruction?

Best :)
Bruno

Wolfgang Bangerth

unread,
Apr 20, 2022, 11:26:23 AM4/20/22
to dea...@googlegroups.com

Bruno,
I believe that you need to configure with
-DDEAL_II_ALLOW_PLATFORM_INTROSPECTION=ON to enable compiling with more
than what the basic platform (in your case, x86_64) guarantees.

Best
W.

On 4/20/22 05:50, blais...@gmail.com wrote:
> *** Caution: EXTERNAL Sender ***
> --
> The deal.II project is located at http://www.dealii.org/
> <https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dealii.org%2F&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C983fad17ba5542ac1c2408da22c3fc51%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637860523389379469%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vT%2Bs6vn06VPCX4C2IMpDJrMMgBZtYcIlNMKHHa4bUxM%3D&reserved=0>
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fforum%2Fdealii%3Fhl%3Den&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C983fad17ba5542ac1c2408da22c3fc51%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637860523389379469%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=LpSgKdmDZrX3BMtLkHeMn%2Fg7fMiOcWsgngfsPQxOecI%3D&reserved=0>
> ---
> You received this message because you are subscribed to the Google
> Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to dealii+un...@googlegroups.com
> <mailto:dealii+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/afbf2a90-29ac-41a2-945c-918f4517f863n%40googlegroups.com
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fdealii%2Fafbf2a90-29ac-41a2-945c-918f4517f863n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C983fad17ba5542ac1c2408da22c3fc51%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637860523389379469%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EOmx%2BHKi3VYd8JYSjTHjH0jdv8%2BZJDK0HeZrwYm1Kho%3D&reserved=0>.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Matthias Maier

unread,
Apr 20, 2022, 12:22:03 PM4/20/22
to dea...@googlegroups.com
Hi Bruno,

You'll have to explicitly enable the instruction set with your
CXXFLAGS. For example, by compiling via

$ cmake -DDEAL_II_CXX_FLAGS="-march=native" [...]

Best,
Matthias
Reply all
Reply to author
Forward
0 new messages