Finding AVX instructions always fails at cmake configure step

19 views
Skip to first unread message

blais...@gmail.com

unread,
May 4, 2023, 8:52:10 AM5/4/23
to deal.II User Group
Dear all, 
Hope you are well.
I have tried a few ways to enable AVX instructions (which I think my 12th Gen Intel(R) Core(TM) i9-12900K) should support, yet I am always unable to do so. At the Cmake configuration step, the AVX steps all fails whereas the SSE ones succeed.
How can I remedy this issue?
Best
Bruno


Martin Kronbichler

unread,
May 4, 2023, 8:57:43 AM5/4/23
to dea...@googlegroups.com

Dear Bruno,

You need to specify appropriate CXX flags. For example, I always use
  -D CMAKE_CXX_FLAGS="-march=native"
on my local machines (that run the code I'm compiling) or
  -D CMAKE_CXX_FLAGS="-march=icelake-server"
on clusters to be sure the right code gets generated. For example GCC lists the available architectures to specify here:

https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html

Best,
Martin

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/31bda9f7-5312-4674-b235-5e208716db86n%40googlegroups.com.

blais...@gmail.com

unread,
May 4, 2023, 9:06:10 AM5/4/23
to deal.II User Group
Dear Martin,
Now I feel kind off dumb. This is what I was doing to compile an AVX test on the side, did not think to include it this way in the CMAKE procedure.
Thanks! Worked very well and now it detects my AVX2 instructions :).
Best
Bruno
Reply all
Reply to author
Forward
0 new messages